1{
2  "version": 3,
3  "sources": ["../../../config/process-shim.js", "../../../src/main/js/helpers/browser.ts", "../../../src/main/js/helpers/extensionsHandler.ts", "../../../node_modules/lodash/lodash.js", "../../../node_modules/querystring/decode.js", "../../../node_modules/querystring/encode.js", "../../../node_modules/querystring/index.js", "../../../src/main/js/helpers/cookies.ts", "../../../src/main/js/types/system.ts", "../../../src/main/js/helpers/system.ts", "../../../node_modules/invariant/browser.js", "../../../node_modules/warning/browser.js", "../../../node_modules/history/lib/PathUtils.js", "../../../node_modules/history/lib/Actions.js", "../../../node_modules/history/lib/LocationUtils.js", "../../../node_modules/history/lib/ExecutionEnvironment.js", "../../../node_modules/history/lib/DOMUtils.js", "../../../node_modules/history/lib/DOMStateStorage.js", "../../../node_modules/history/lib/BrowserProtocol.js", "../../../node_modules/history/lib/RefreshProtocol.js", "../../../node_modules/history/lib/AsyncUtils.js", "../../../node_modules/history/lib/runTransitionHook.js", "../../../node_modules/history/lib/createHistory.js", "../../../node_modules/history/lib/createBrowserHistory.js", "../../../node_modules/history/lib/HashProtocol.js", "../../../node_modules/history/lib/createHashHistory.js", "../../../node_modules/history/lib/createMemoryHistory.js", "../../../node_modules/history/lib/useBasename.js", "../../../node_modules/history/lib/useBeforeUnload.js", "../../../node_modules/strict-uri-encode/index.js", "../../../node_modules/object-assign/index.js", "../../../node_modules/query-string/index.js", "../../../node_modules/history/lib/useQueries.js", "../../../node_modules/history/lib/index.js", "../../../node_modules/react/cjs/react.production.min.js", "../../../node_modules/react/index.js", "../../../node_modules/fbjs/lib/emptyObject.js", "../../../node_modules/fbjs/lib/invariant.js", "../../../node_modules/create-react-class/factory.js", "../../../node_modules/create-react-class/index.js", "../../../node_modules/prop-types/lib/ReactPropTypesSecret.js", "../../../node_modules/prop-types/factoryWithThrowingShims.js", "../../../node_modules/prop-types/index.js", "../../../node_modules/react-router/es/routerWarning.js", "../../../node_modules/react-router/es/PatternUtils.js", "../../../node_modules/react-router/es/computeChangedRoutes.js", "../../../node_modules/react-router/es/AsyncUtils.js", "../../../node_modules/react-router/es/TransitionUtils.js", "../../../node_modules/react-router/es/isActive.js", "../../../node_modules/react-router/es/PromiseUtils.js", "../../../node_modules/react-router/es/getComponents.js", "../../../node_modules/react-router/es/RouteUtils.js", "../../../node_modules/react-router/es/matchRoutes.js", "../../../node_modules/react-router/es/createTransitionManager.js", "../../../node_modules/react-router/es/InternalPropTypes.js", "../../../node_modules/react-is/cjs/react-is.production.min.js", "../../../node_modules/react-is/index.js", "../../../node_modules/react-router/es/getRouteParams.js", "../../../node_modules/react-router/es/ContextUtils.js", "../../../node_modules/react-router/es/RouterContext.js", "../../../node_modules/react-router/es/RouterUtils.js", "../../../node_modules/react-router/es/Router.js", "../../../node_modules/react-router/es/PropTypes.js", "../../../node_modules/react-router/es/Link.js", "../../../node_modules/react-router/es/IndexLink.js", "../../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js", "../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js", "../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js", "../../../node_modules/react-router/es/withRouter.js", "../../../node_modules/react-router/es/Redirect.js", "../../../node_modules/react-router/es/IndexRedirect.js", "../../../node_modules/react-router/es/IndexRoute.js", "../../../node_modules/react-router/es/Route.js", "../../../node_modules/react-router/es/createMemoryHistory.js", "../../../node_modules/react-router/es/match.js", "../../../node_modules/react-router/es/useRouterHistory.js", "../../../node_modules/react-router/es/applyRouterMiddleware.js", "../../../node_modules/react-router/es/createRouterHistory.js", "../../../node_modules/react-router/es/browserHistory.js", "../../../node_modules/react-router/es/hashHistory.js", "../../../node_modules/react-router/es/index.js", "../../../src/main/js/helpers/getHistory.ts", "../../../src/main/js/helpers/handleRequiredAuthentication.ts", "../../../src/main/js/helpers/request.ts", "../../../src/main/js/api/l10n.ts", "../../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js", "../../../node_modules/date-fns/is_date/index.js", "../../../node_modules/date-fns/parse/index.js", "../../../node_modules/date-fns/add_days/index.js", "../../../node_modules/date-fns/add_milliseconds/index.js", "../../../node_modules/date-fns/add_hours/index.js", "../../../node_modules/date-fns/start_of_week/index.js", "../../../node_modules/date-fns/start_of_iso_week/index.js", "../../../node_modules/date-fns/get_iso_year/index.js", "../../../node_modules/date-fns/start_of_iso_year/index.js", "../../../node_modules/date-fns/start_of_day/index.js", "../../../node_modules/date-fns/difference_in_calendar_days/index.js", "../../../node_modules/date-fns/set_iso_year/index.js", "../../../node_modules/date-fns/add_iso_years/index.js", "../../../node_modules/date-fns/add_minutes/index.js", "../../../node_modules/date-fns/get_days_in_month/index.js", "../../../node_modules/date-fns/add_months/index.js", "../../../node_modules/date-fns/add_quarters/index.js", "../../../node_modules/date-fns/add_seconds/index.js", "../../../node_modules/date-fns/add_weeks/index.js", "../../../node_modules/date-fns/add_years/index.js", "../../../node_modules/date-fns/are_ranges_overlapping/index.js", "../../../node_modules/date-fns/closest_index_to/index.js", "../../../node_modules/date-fns/closest_to/index.js", "../../../node_modules/date-fns/compare_asc/index.js", "../../../node_modules/date-fns/compare_desc/index.js", "../../../node_modules/date-fns/difference_in_calendar_iso_weeks/index.js", "../../../node_modules/date-fns/difference_in_calendar_iso_years/index.js", "../../../node_modules/date-fns/difference_in_calendar_months/index.js", "../../../node_modules/date-fns/get_quarter/index.js", "../../../node_modules/date-fns/difference_in_calendar_quarters/index.js", "../../../node_modules/date-fns/difference_in_calendar_weeks/index.js", "../../../node_modules/date-fns/difference_in_calendar_years/index.js", "../../../node_modules/date-fns/difference_in_days/index.js", "../../../node_modules/date-fns/difference_in_milliseconds/index.js", "../../../node_modules/date-fns/difference_in_hours/index.js", "../../../node_modules/date-fns/sub_iso_years/index.js", "../../../node_modules/date-fns/difference_in_iso_years/index.js", "../../../node_modules/date-fns/difference_in_minutes/index.js", "../../../node_modules/date-fns/difference_in_months/index.js", "../../../node_modules/date-fns/difference_in_quarters/index.js", "../../../node_modules/date-fns/difference_in_seconds/index.js", "../../../node_modules/date-fns/difference_in_weeks/index.js", "../../../node_modules/date-fns/difference_in_years/index.js", "../../../node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js", "../../../node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js", "../../../node_modules/date-fns/locale/en/build_format_locale/index.js", "../../../node_modules/date-fns/locale/en/index.js", "../../../node_modules/date-fns/distance_in_words/index.js", "../../../node_modules/date-fns/distance_in_words_strict/index.js", "../../../node_modules/date-fns/distance_in_words_to_now/index.js", "../../../node_modules/date-fns/each_day/index.js", "../../../node_modules/date-fns/end_of_day/index.js", "../../../node_modules/date-fns/end_of_hour/index.js", "../../../node_modules/date-fns/end_of_week/index.js", "../../../node_modules/date-fns/end_of_iso_week/index.js", "../../../node_modules/date-fns/end_of_iso_year/index.js", "../../../node_modules/date-fns/end_of_minute/index.js", "../../../node_modules/date-fns/end_of_month/index.js", "../../../node_modules/date-fns/end_of_quarter/index.js", "../../../node_modules/date-fns/end_of_second/index.js", "../../../node_modules/date-fns/end_of_today/index.js", "../../../node_modules/date-fns/end_of_tomorrow/index.js", "../../../node_modules/date-fns/end_of_year/index.js", "../../../node_modules/date-fns/end_of_yesterday/index.js", "../../../node_modules/date-fns/start_of_year/index.js", "../../../node_modules/date-fns/get_day_of_year/index.js", "../../../node_modules/date-fns/get_iso_week/index.js", "../../../node_modules/date-fns/is_valid/index.js", "../../../node_modules/date-fns/format/index.js", "../../../node_modules/date-fns/get_date/index.js", "../../../node_modules/date-fns/get_day/index.js", "../../../node_modules/date-fns/is_leap_year/index.js", "../../../node_modules/date-fns/get_days_in_year/index.js", "../../../node_modules/date-fns/get_hours/index.js", "../../../node_modules/date-fns/get_iso_day/index.js", "../../../node_modules/date-fns/get_iso_weeks_in_year/index.js", "../../../node_modules/date-fns/get_milliseconds/index.js", "../../../node_modules/date-fns/get_minutes/index.js", "../../../node_modules/date-fns/get_month/index.js", "../../../node_modules/date-fns/get_overlapping_days_in_ranges/index.js", "../../../node_modules/date-fns/get_seconds/index.js", "../../../node_modules/date-fns/get_time/index.js", "../../../node_modules/date-fns/get_year/index.js", "../../../node_modules/date-fns/is_after/index.js", "../../../node_modules/date-fns/is_before/index.js", "../../../node_modules/date-fns/is_equal/index.js", "../../../node_modules/date-fns/is_first_day_of_month/index.js", "../../../node_modules/date-fns/is_friday/index.js", "../../../node_modules/date-fns/is_future/index.js", "../../../node_modules/date-fns/is_last_day_of_month/index.js", "../../../node_modules/date-fns/is_monday/index.js", "../../../node_modules/date-fns/is_past/index.js", "../../../node_modules/date-fns/is_same_day/index.js", "../../../node_modules/date-fns/start_of_hour/index.js", "../../../node_modules/date-fns/is_same_hour/index.js", "../../../node_modules/date-fns/is_same_week/index.js", "../../../node_modules/date-fns/is_same_iso_week/index.js", "../../../node_modules/date-fns/is_same_iso_year/index.js", "../../../node_modules/date-fns/start_of_minute/index.js", "../../../node_modules/date-fns/is_same_minute/index.js", "../../../node_modules/date-fns/is_same_month/index.js", "../../../node_modules/date-fns/start_of_quarter/index.js", "../../../node_modules/date-fns/is_same_quarter/index.js", "../../../node_modules/date-fns/start_of_second/index.js", "../../../node_modules/date-fns/is_same_second/index.js", "../../../node_modules/date-fns/is_same_year/index.js", "../../../node_modules/date-fns/is_saturday/index.js", "../../../node_modules/date-fns/is_sunday/index.js", "../../../node_modules/date-fns/is_this_hour/index.js", "../../../node_modules/date-fns/is_this_iso_week/index.js", "../../../node_modules/date-fns/is_this_iso_year/index.js", "../../../node_modules/date-fns/is_this_minute/index.js", "../../../node_modules/date-fns/is_this_month/index.js", "../../../node_modules/date-fns/is_this_quarter/index.js", "../../../node_modules/date-fns/is_this_second/index.js", "../../../node_modules/date-fns/is_this_week/index.js", "../../../node_modules/date-fns/is_this_year/index.js", "../../../node_modules/date-fns/is_thursday/index.js", "../../../node_modules/date-fns/is_today/index.js", "../../../node_modules/date-fns/is_tomorrow/index.js", "../../../node_modules/date-fns/is_tuesday/index.js", "../../../node_modules/date-fns/is_wednesday/index.js", "../../../node_modules/date-fns/is_weekend/index.js", "../../../node_modules/date-fns/is_within_range/index.js", "../../../node_modules/date-fns/is_yesterday/index.js", "../../../node_modules/date-fns/last_day_of_week/index.js", "../../../node_modules/date-fns/last_day_of_iso_week/index.js", "../../../node_modules/date-fns/last_day_of_iso_year/index.js", "../../../node_modules/date-fns/last_day_of_month/index.js", "../../../node_modules/date-fns/last_day_of_quarter/index.js", "../../../node_modules/date-fns/last_day_of_year/index.js", "../../../node_modules/date-fns/max/index.js", "../../../node_modules/date-fns/min/index.js", "../../../node_modules/date-fns/set_date/index.js", "../../../node_modules/date-fns/set_day/index.js", "../../../node_modules/date-fns/set_day_of_year/index.js", "../../../node_modules/date-fns/set_hours/index.js", "../../../node_modules/date-fns/set_iso_day/index.js", "../../../node_modules/date-fns/set_iso_week/index.js", "../../../node_modules/date-fns/set_milliseconds/index.js", "../../../node_modules/date-fns/set_minutes/index.js", "../../../node_modules/date-fns/set_month/index.js", "../../../node_modules/date-fns/set_quarter/index.js", "../../../node_modules/date-fns/set_seconds/index.js", "../../../node_modules/date-fns/set_year/index.js", "../../../node_modules/date-fns/start_of_month/index.js", "../../../node_modules/date-fns/start_of_today/index.js", "../../../node_modules/date-fns/start_of_tomorrow/index.js", "../../../node_modules/date-fns/start_of_yesterday/index.js", "../../../node_modules/date-fns/sub_days/index.js", "../../../node_modules/date-fns/sub_hours/index.js", "../../../node_modules/date-fns/sub_milliseconds/index.js", "../../../node_modules/date-fns/sub_minutes/index.js", "../../../node_modules/date-fns/sub_months/index.js", "../../../node_modules/date-fns/sub_quarters/index.js", "../../../node_modules/date-fns/sub_seconds/index.js", "../../../node_modules/date-fns/sub_weeks/index.js", "../../../node_modules/date-fns/sub_years/index.js", "../../../node_modules/date-fns/index.js", "../../../src/main/js/helpers/dates.ts", "../../../src/main/js/helpers/storage.ts", "../../../src/main/js/helpers/l10n.ts", "../../../node_modules/scheduler/cjs/scheduler.production.min.js", "../../../node_modules/scheduler/index.js", "../../../node_modules/react-dom/cjs/react-dom.production.min.js", "../../../node_modules/react-dom/index.js", "../../../node_modules/react-helmet-async/node_modules/react-fast-compare/index.js", "../../../node_modules/shallowequal/index.js", "../../../node_modules/react-helmet-async/src/constants.js", "../../../node_modules/react-helmet-async/src/utils.js", "../../../node_modules/react-helmet-async/src/server.js", "../../../node_modules/react-helmet-async/src/Provider.js", "../../../node_modules/react-helmet-async/src/client.js", "../../../node_modules/react-helmet-async/src/Dispatcher.js", "../../../node_modules/react-helmet-async/src/index.js", "../../../node_modules/intl-messageformat-parser/lib/types.js", "../../../node_modules/intl-messageformat-parser/lib/parser.js", "../../../node_modules/intl-messageformat-parser/lib/normalize.js", "../../../node_modules/intl-messageformat-parser/lib/skeleton.js", "../../../node_modules/intl-messageformat-parser/lib/index.js", "../../../node_modules/intl-format-cache/lib/index.js", "../../../node_modules/intl-messageformat/lib/formatters.js", "../../../node_modules/intl-messageformat/lib/core.js", "../../../node_modules/intl-messageformat/lib/index.js", "../../../node_modules/@formatjs/intl-utils/src/invariant.ts", "../../../node_modules/@formatjs/intl-utils/src/units.ts", "../../../node_modules/@formatjs/intl-utils/src/number-types.ts", "../../../node_modules/@formatjs/intl-utils/src/index.ts", "../../../node_modules/react-intl/lib/utils.js", "../../../node_modules/react-intl/lib/components/injectIntl.js", "../../../node_modules/react-intl/lib/components/createFormattedComponent.js", "../../../node_modules/react-intl/lib/formatters/number.js", "../../../node_modules/react-intl/lib/formatters/relativeTime.js", "../../../node_modules/react-intl/lib/formatters/dateTime.js", "../../../node_modules/react-intl/lib/formatters/plural.js", "../../../node_modules/react-intl/lib/formatters/message.js", "../../../node_modules/shallow-equal/objects/index.js", "../../../node_modules/react-intl/lib/formatters/list.js", "../../../node_modules/react-intl/lib/formatters/displayName.js", "../../../node_modules/react-intl/lib/components/provider.js", "../../../node_modules/react-intl/lib/components/relative.js", "../../../node_modules/react-intl/lib/components/message.js", "../../../node_modules/react-intl/lib/index.js", "../../../node_modules/react-redux/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js", "../../../node_modules/react-redux/es/utils/PropTypes.js", "../../../node_modules/react-redux/es/utils/warning.js", "../../../node_modules/react-redux/es/components/Provider.js", "../../../node_modules/react-redux/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js", "../../../node_modules/react-redux/node_modules/@babel/runtime/helpers/esm/extends.js", "../../../node_modules/react-redux/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js", "../../../node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js", "../../../node_modules/react-redux/node_modules/react-is/index.js", "../../../node_modules/react-redux/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js", "../../../node_modules/react-redux/es/utils/Subscription.js", "../../../node_modules/react-redux/es/components/connectAdvanced.js", "../../../node_modules/react-redux/es/utils/shallowEqual.js", "../../../node_modules/symbol-observable/es/ponyfill.js", "../../../node_modules/symbol-observable/es/index.js", "../../../node_modules/redux/es/redux.js", "../../../node_modules/react-redux/es/utils/isPlainObject.js", "../../../node_modules/react-redux/es/utils/verifyPlainObject.js", "../../../node_modules/react-redux/es/connect/wrapMapToProps.js", "../../../node_modules/react-redux/es/connect/mapDispatchToProps.js", "../../../node_modules/react-redux/es/connect/mapStateToProps.js", "../../../node_modules/react-redux/es/connect/mergeProps.js", "../../../node_modules/react-redux/es/connect/verifySubselectors.js", "../../../node_modules/react-redux/es/connect/selectorFactory.js", "../../../node_modules/react-redux/es/connect/connect.js", "../../../node_modules/react-redux/es/index.js", "../../../node_modules/@babel/runtime/helpers/inheritsLoose.js", "../../../node_modules/@emotion/sheet/dist/sheet.browser.esm.js", "../../../node_modules/@emotion/stylis/dist/stylis.browser.esm.js", "../../../node_modules/@emotion/weak-memoize/dist/weak-memoize.browser.esm.js", "../../../node_modules/@emotion/cache/dist/cache.browser.esm.js", "../../../node_modules/@emotion/utils/dist/utils.browser.esm.js", "../../../node_modules/@emotion/hash/dist/hash.browser.esm.js", "../../../node_modules/@emotion/unitless/dist/unitless.browser.esm.js", "../../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js", "../../../node_modules/@emotion/serialize/dist/serialize.browser.esm.js", "../../../node_modules/@emotion/css/dist/css.browser.esm.js", "../../../node_modules/@emotion/core/dist/core.browser.esm.js", "../../../node_modules/@babel/runtime/helpers/defineProperty.js", "../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js", "../../../node_modules/@emotion/styled-base/dist/styled-base.browser.esm.js", "../../../node_modules/@emotion/styled/dist/styled.browser.esm.js", "../../../node_modules/classnames/index.js", "../../../src/main/js/app/theme.js", "../../../src/main/js/components/icons/Icon.tsx", "../../../src/main/js/components/icons/AlertErrorIcon.tsx", "../../../src/main/js/components/icons/AlertSuccessIcon.tsx", "../../../src/main/js/components/icons/AlertWarnIcon.tsx", "../../../src/main/js/components/icons/InfoIcon.tsx", "../../../src/main/js/components/ui/DeferredSpinner.tsx", "../../../src/main/js/components/ui/Alert.tsx", "../../../src/main/js/components/lazyLoadComponent.tsx", "../../../src/main/js/app/components/a11y/A11yContext.tsx", "../../../src/main/js/app/components/a11y/A11ySkipTarget.tsx", "../../../src/main/js/app/components/embed-docs-modal/SuggestionsContext.ts", "../../../src/main/js/app/components/embed-docs-modal/Suggestions.tsx", "../../../src/main/js/store/globalMessages.ts", "../../../src/main/js/apps/quality-profiles/utils.ts", "../../../src/main/js/types/component.ts", "../../../src/main/js/types/security.ts", "../../../src/main/js/helpers/branch-like.ts", "../../../src/main/js/helpers/urls.ts", "../../../src/main/js/types/alm-settings.ts", "../../../src/main/js/apps/settings/utils.ts", "../../../src/main/js/apps/settings/store/definitions.ts", "../../../src/main/js/apps/settings/store/settingsPage.ts", "../../../src/main/js/store/appState.ts", "../../../src/main/js/apps/settings/store/values.ts", "../../../src/main/js/apps/settings/store/rootReducer.ts", "../../../src/main/js/store/branches.ts", "../../../src/main/js/store/languages.ts", "../../../src/main/js/store/metrics.ts", "../../../node_modules/redux-thunk/es/index.js", "../../../src/main/js/store/utils/configureStore.ts", "../../../src/main/js/app/utils/getStore.ts", "../../../src/main/js/app/utils/throwGlobalError.ts", "../../../src/main/js/api/users.ts", "../../../src/main/js/helpers/users.ts", "../../../src/main/js/store/users.ts", "../../../src/main/js/store/rootReducer.ts", "../../../src/main/js/components/hoc/utils.ts", "../../../src/main/js/components/hoc/withCurrentUser.tsx", "../../../src/main/js/components/ui/NavBarTabs.tsx", "../../../src/main/js/apps/account/components/Nav.tsx", "../../../src/main/js/helpers/colors.ts", "../../../src/main/js/components/ui/GenericAvatar.tsx", "../../../src/main/js/components/ui/Avatar.tsx", "../../../src/main/js/apps/account/components/UserCard.tsx", "../../../src/main/js/apps/account/components/Account.tsx", "../../../src/main/js/components/icons/HelpIcon.tsx", "../../../src/main/js/components/controls/ScreenPositionFixer.tsx", "../../../src/main/js/components/controls/Tooltip.tsx", "../../../src/main/js/components/controls/HelpTooltip.tsx", "../../../src/main/js/components/hoc/whenLoggedIn.tsx", "../../../src/main/js/apps/account/profile/UserExternalIdentity.tsx", "../../../src/main/js/apps/account/profile/Profile.tsx", "../../../src/main/js/components/icons/ChevronRightIcon.tsx", "../../../src/main/js/components/icons/ClearIcon.tsx", "../../../src/main/js/components/icons/DeleteIcon.tsx", "../../../src/main/js/components/icons/EditIcon.tsx", "../../../src/main/js/components/controls/buttons.tsx", "../../../src/main/js/components/ui/MandatoryFieldMarker.tsx", "../../../src/main/js/components/ui/MandatoryFieldsExplanation.tsx", "../../../src/main/js/components/common/ResetPasswordForm.tsx", "../../../src/main/js/components/common/InstanceMessage.tsx", "../../../src/main/js/api/user-tokens.ts", "../../../src/main/js/components/controls/ClickEventBoundary.tsx", "../../../node_modules/react-modal/lib/helpers/tabbable.js", "../../../node_modules/react-modal/lib/helpers/focusManager.js", "../../../node_modules/react-modal/lib/helpers/scopeTab.js", "../../../node_modules/react-modal/node_modules/warning/warning.js", "../../../node_modules/exenv/index.js", "../../../node_modules/react-modal/lib/helpers/safeHTMLElement.js", "../../../node_modules/react-modal/lib/helpers/ariaAppHider.js", "../../../node_modules/react-modal/lib/helpers/classList.js", "../../../node_modules/react-modal/lib/helpers/portalOpenInstances.js", "../../../node_modules/react-modal/lib/helpers/bodyTrap.js", "../../../node_modules/react-modal/lib/components/ModalPortal.js", "../../../node_modules/react-lifecycles-compat/react-lifecycles-compat.cjs.js", "../../../node_modules/react-modal/lib/components/Modal.js", "../../../node_modules/react-modal/lib/index.js", "../../../src/main/js/components/controls/Modal.tsx", "../../../src/main/js/components/controls/SimpleModal.tsx", "../../../src/main/js/components/controls/ConfirmModal.tsx", "../../../src/main/js/components/controls/ModalButton.tsx", "../../../src/main/js/components/controls/ConfirmButton.tsx", "../../../src/main/js/components/intl/DateFormatter.tsx", "../../../src/main/js/components/intl/DateTimeFormatter.tsx", "../../../src/main/js/components/intl/dateUtils.ts", "../../../src/main/js/components/intl/DateFromNow.tsx", "../../../src/main/js/helpers/path.ts", "../../../src/main/js/apps/users/components/TokensFormItem.tsx", "../../../node_modules/clipboard/dist/clipboard.js", "../../../src/main/js/components/icons/CopyIcon.tsx", "../../../src/main/js/components/controls/clipboard.tsx", "../../../src/main/js/apps/users/components/TokensFormNewToken.tsx", "../../../src/main/js/apps/users/components/TokensForm.tsx", "../../../src/main/js/apps/account/components/Tokens.tsx", "../../../src/main/js/apps/account/components/Security.tsx", "../../../src/main/js/api/components.ts", "../../../src/main/js/helpers/types.ts", "../../../src/main/js/helpers/measures.ts", "../../../src/main/js/components/controls/ListFooter.tsx", "../../../src/main/js/components/icons/BugTrackerIcon.tsx", "../../../src/main/js/components/icons/ContinuousIntegrationIcon.tsx", "../../../src/main/js/components/icons/DetachIcon.tsx", "../../../src/main/js/components/icons/HouseIcon.tsx", "../../../src/main/js/components/icons/SCMIcon.tsx", "../../../src/main/js/components/icons/ProjectLinkIcon.tsx", "../../../src/main/js/helpers/projectLinks.ts", "../../../node_modules/valid-url/index.js", "../../../src/main/js/app/utils/isValidUri.ts", "../../../src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx", "../../../src/main/js/components/ui/Level.tsx", "../../../src/main/js/apps/account/projects/ProjectCard.tsx", "../../../src/main/js/apps/account/projects/Projects.tsx", "../../../src/main/js/apps/account/projects/ProjectsContainer.tsx", "../../../src/main/js/api/notifications.ts", "../../../src/main/js/components/hoc/withNotifications.tsx", "../../../src/main/js/components/controls/Checkbox.tsx", "../../../src/main/js/apps/account/notifications/NotificationsList.tsx", "../../../src/main/js/apps/account/notifications/SonarCloudNotifications.tsx", "../../../src/main/js/apps/account/notifications/GlobalNotifications.tsx", "../../../src/main/js/components/icons/SearchIcon.tsx", "../../../src/main/js/components/controls/SearchBox.tsx", "../../../src/main/js/components/ui/popups.tsx", "../../../src/main/js/components/controls/DocumentClickHandler.tsx", "../../../src/main/js/helpers/keycodes.ts", "../../../src/main/js/components/controls/EscKeydownHandler.tsx", "../../../src/main/js/components/controls/OutsideClickHandler.tsx", "../../../src/main/js/components/controls/Toggler.tsx", "../../../src/main/js/components/controls/Dropdown.tsx", "../../../src/main/js/apps/account/notifications/ProjectModal.tsx", "../../../src/main/js/components/icons/ChevronDownIcon.tsx", "../../../src/main/js/components/icons/OpenCloseIcon.tsx", "../../../src/main/js/components/controls/BoxedGroupAccordion.tsx", "../../../src/main/js/apps/account/notifications/ProjectNotifications.tsx", "../../../src/main/js/apps/account/notifications/Projects.tsx", "../../../src/main/js/apps/account/notifications/Notifications.tsx", "../../../src/main/js/apps/account/routes.ts", "../../../src/main/js/api/application.ts", "../../../src/main/js/app/utils/addGlobalSuccessMessage.ts", "../../../src/main/js/components/icons/BranchIcon.tsx", "../../../src/main/js/components/icons/DropdownIcon.tsx", "../../../src/main/js/components/icons/SettingsIcon.tsx", "../../../src/main/js/components/controls/ActionsDropdown.tsx", "../../../src/main/js/api/branches.ts", "../../../node_modules/react-input-autosize/lib/AutosizeInput.js", "../../../node_modules/react-select/node_modules/classnames/index.js", "../../../node_modules/react-select/dist/react-select.es.js", "../../../src/main/js/components/controls/Select.tsx", "../../../src/main/js/components/icons/QualifierIcon.tsx", "../../../src/main/js/apps/application-console/BranchSelectItem.tsx", "../../../src/main/js/apps/application-console/ProjectBranchRow.tsx", "../../../src/main/js/apps/application-console/CreateBranchForm.tsx", "../../../src/main/js/apps/application-console/BranchRowActions.tsx", "../../../src/main/js/apps/application-console/ApplicationProjectBranch.tsx", "../../../src/main/js/apps/application-console/ApplicationBranches.tsx", "../../../src/main/js/components/controls/RadioToggle.tsx", "../../../src/main/js/components/controls/SelectListListElement.tsx", "../../../src/main/js/components/controls/SelectListListContainer.tsx", "../../../src/main/js/components/controls/SelectList.tsx", "../../../src/main/js/apps/application-console/ApplicationProjects.tsx", "../../../src/main/js/apps/application-console/EditForm.tsx", "../../../src/main/js/apps/application-console/ApplicationConsoleAppRenderer.tsx", "../../../src/main/js/apps/application-console/ApplicationConsoleApp.tsx", "../../../src/main/js/apps/application-console/routes.ts", "../../../src/main/js/api/settings.ts", "../../../src/main/js/types/settings.ts", "../../../node_modules/dompurify/src/utils.js", "../../../node_modules/dompurify/src/tags.js", "../../../node_modules/dompurify/src/attrs.js", "../../../node_modules/dompurify/src/regexp.js", "../../../node_modules/dompurify/src/purify.js", "../../../src/main/js/helpers/sanitize.ts", "../../../src/main/js/apps/application-settings/ReportFrequencyForm.tsx", "../../../src/main/js/apps/application-settings/ApplicationSettingsApp.tsx", "../../../src/main/js/apps/application-settings/routes.ts", "../../../src/main/js/types/extension.ts", "../../../src/main/js/apps/settings/store/actions.ts", "../../../src/main/js/apps/audit-logs/utils.ts", "../../../src/main/js/components/icons/CalendarIcon.tsx", "../../../src/main/js/components/icons/ChevronLeftIcon.tsx", "../../../node_modules/react-day-picker/src/LocaleUtils.js", "../../../node_modules/react-day-picker/src/keys.js", "../../../node_modules/react-day-picker/src/Caption.js", "../../../node_modules/react-day-picker/src/classNames.js", "../../../node_modules/react-day-picker/src/Navbar.js", "../../../node_modules/react-day-picker/src/Weekdays.js", "../../../node_modules/react-day-picker/src/DateUtils.js", "../../../node_modules/react-day-picker/src/Helpers.js", "../../../node_modules/react-day-picker/src/Day.js", "../../../node_modules/react-day-picker/src/ModifiersUtils.js", "../../../node_modules/react-day-picker/src/Month.js", "../../../node_modules/react-day-picker/src/Weekday.js", "../../../node_modules/react-day-picker/src/DayPicker.js", "../../../node_modules/react-day-picker/src/PropTypes.js", "../../../node_modules/react-day-picker/DayPicker.js", "../../../src/main/js/components/controls/DateInput.tsx", "../../../src/main/js/components/controls/DateRangeInput.tsx", "../../../src/main/js/components/controls/Radio.tsx", "../../../src/main/js/apps/audit-logs/components/DownloadButton.tsx", "../../../src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx", "../../../src/main/js/apps/audit-logs/components/AuditApp.tsx", "../../../src/main/js/apps/audit-logs/routes.ts", "../../../src/main/js/api/ce.ts", "../../../src/main/js/helpers/query.ts", "../../../src/main/js/types/tasks.ts", "../../../src/main/js/apps/background-tasks/constants.ts", "../../../src/main/js/apps/background-tasks/utils.ts", "../../../src/main/js/apps/background-tasks/components/Footer.tsx", "../../../src/main/js/components/icons/PlusCircleIcon.tsx", "../../../src/main/js/apps/background-tasks/components/NoWorkersSupportPopup.tsx", "../../../src/main/js/apps/background-tasks/components/WorkersForm.tsx", "../../../src/main/js/apps/background-tasks/components/Workers.tsx", "../../../src/main/js/apps/background-tasks/components/Header.tsx", "../../../src/main/js/apps/background-tasks/components/CurrentsFilter.tsx", "../../../src/main/js/apps/background-tasks/components/DateFilter.tsx", "../../../src/main/js/apps/background-tasks/components/StatusFilter.tsx", "../../../src/main/js/apps/background-tasks/components/TypesFilter.tsx", "../../../src/main/js/apps/background-tasks/components/Search.tsx", "../../../src/main/js/apps/background-tasks/components/StatPendingCount.tsx", "../../../src/main/js/apps/background-tasks/components/StatPendingTime.tsx", "../../../src/main/js/apps/background-tasks/components/StatStillFailing.tsx", "../../../src/main/js/apps/background-tasks/components/Stats.tsx", "../../../src/main/js/apps/background-tasks/components/ScannerContext.tsx", "../../../src/main/js/apps/background-tasks/components/Stacktrace.tsx", "../../../src/main/js/components/icons/WarningIcon.tsx", "../../../src/main/js/components/common/AnalysisWarningsModal.tsx", "../../../src/main/js/apps/background-tasks/components/TaskActions.tsx", "../../../src/main/js/components/icons/PullRequestIcon.tsx", "../../../src/main/js/apps/background-tasks/components/TaskType.tsx", "../../../src/main/js/apps/background-tasks/components/TaskComponent.tsx", "../../../src/main/js/components/intl/TimeFormatter.tsx", "../../../src/main/js/apps/background-tasks/components/TaskDate.tsx", "../../../src/main/js/apps/background-tasks/components/TaskDay.tsx", "../../../src/main/js/apps/background-tasks/components/TaskExecutionTime.tsx", "../../../src/main/js/apps/background-tasks/components/TaskId.tsx", "../../../src/main/js/components/icons/PendingIcon.tsx", "../../../src/main/js/apps/background-tasks/components/TaskStatus.tsx", "../../../src/main/js/apps/background-tasks/components/TaskSubmitter.tsx", "../../../src/main/js/apps/background-tasks/components/Task.tsx", "../../../src/main/js/apps/background-tasks/components/Tasks.tsx", "../../../src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx", "../../../src/main/js/apps/background-tasks/routes.ts", "../../../src/main/js/api/auth.ts", "../../../src/main/js/api/languages.ts", "../../../src/main/js/api/metrics.ts", "../../../src/main/js/api/quality-gates.ts", "../../../src/main/js/helpers/qualityGates.ts", "../../../src/main/js/store/rootActions.ts", "../../../src/main/js/apps/code/bucket.ts", "../../../src/main/js/types/metrics.ts", "../../../src/main/js/apps/code/utils.ts", "../../../src/main/js/apps/code/components/ComponentName.tsx", "../../../src/main/js/apps/code/components/Breadcrumbs.tsx", "../../../node_modules/keymaster/keymaster.js", "../../../src/main/js/components/ui/PageActions.tsx", "../../../src/main/js/helpers/component.ts", "../../../src/main/js/components/hoc/withKeyboardNavigation.tsx", "../../../src/main/js/components/hoc/withScrollTo.tsx", "../../../src/main/js/components/workspace/context.ts", "../../../src/main/js/components/ui/Rating.tsx", "../../../src/main/js/components/measure/utils.ts", "../../../src/main/js/components/measure/Measure.tsx", "../../../src/main/js/apps/code/components/ComponentMeasure.tsx", "../../../src/main/js/components/icons/PinIcon.tsx", "../../../src/main/js/apps/code/components/ComponentPin.tsx", "../../../src/main/js/apps/code/components/Component.tsx", "../../../src/main/js/apps/code/components/ComponentsEmpty.tsx", "../../../src/main/js/apps/code/components/ComponentsHeader.tsx", "../../../src/main/js/apps/code/components/Components.tsx", "../../../src/main/js/components/hoc/withRouter.tsx", "../../../src/main/js/apps/code/components/Search.tsx", "../../../src/main/js/components/SourceViewer/components/DuplicationPopup.tsx", "../../../src/main/js/components/SourceViewer/helpers/duplications.ts", "../../../src/main/js/components/SourceViewer/helpers/getCoverageStatus.ts", "../../../src/main/js/components/SourceViewer/helpers/highlight.ts", "../../../src/main/js/components/SourceViewer/helpers/issueLocations.ts", "../../../src/main/js/components/SourceViewer/helpers/indexing.ts", "../../../src/main/js/api/issues.ts", "../../../src/main/js/components/icons/BugIcon.tsx", "../../../src/main/js/components/icons/CodeSmellIcon.tsx", "../../../src/main/js/components/icons/SecurityHotspotIcon.tsx", "../../../src/main/js/components/icons/VulnerabilityIcon.tsx", "../../../src/main/js/types/issues.ts", "../../../src/main/js/helpers/constants.ts", "../../../src/main/js/helpers/issues.ts", "../../../src/main/js/components/SourceViewer/helpers/loadIssues.ts", "../../../src/main/js/components/common/LocationIndex.tsx", "../../../src/main/js/components/common/LocationMessage.tsx", "../../../src/main/js/components/issue/actions.ts", "../../../src/main/js/components/common/SelectListItem.tsx", "../../../src/main/js/components/common/SelectList.tsx", "../../../src/main/js/components/issue/popups/SetAssigneePopup.tsx", "../../../src/main/js/components/issue/components/IssueAssign.tsx", "../../../src/main/js/components/common/FormattingTips.tsx", "../../../src/main/js/components/issue/popups/CommentPopup.tsx", "../../../src/main/js/components/issue/components/IssueCommentAction.tsx", "../../../src/main/js/components/icons/SeverityIcon.tsx", "../../../src/main/js/components/shared/SeverityHelper.tsx", "../../../src/main/js/components/issue/popups/SetSeverityPopup.tsx", "../../../src/main/js/components/issue/components/IssueSeverity.tsx", "../../../src/main/js/components/icons/TagsIcon.tsx", "../../../src/main/js/components/tags/TagsList.tsx", "../../../src/main/js/components/common/MultiSelectOption.tsx", "../../../src/main/js/components/common/MultiSelect.tsx", "../../../src/main/js/components/tags/TagsSelector.tsx", "../../../src/main/js/components/issue/popups/SetIssueTagsPopup.tsx", "../../../src/main/js/components/issue/components/IssueTags.tsx", "../../../src/main/js/components/icons/StatusIcon.tsx", "../../../src/main/js/components/shared/StatusHelper.tsx", "../../../src/main/js/components/issue/popups/SetTransitionPopup.tsx", "../../../src/main/js/components/issue/components/IssueTransition.tsx", "../../../src/main/js/components/icons/IssueIcon.tsx", "../../../src/main/js/components/icons/IssueTypeIcon.tsx", "../../../src/main/js/components/issue/popups/SetTypePopup.tsx", "../../../src/main/js/components/issue/components/IssueType.tsx", "../../../src/main/js/components/issue/components/IssueActionsBar.tsx", "../../../src/main/js/components/issue/popups/CommentDeletePopup.tsx", "../../../src/main/js/components/issue/components/IssueCommentLine.tsx", "../../../src/main/js/components/icons/LinkIcon.tsx", "../../../src/main/js/components/issue/components/IssueChangelogDiff.tsx", "../../../src/main/js/components/issue/popups/ChangelogPopup.tsx", "../../../src/main/js/components/issue/components/IssueChangelog.tsx", "../../../src/main/js/types/rules.ts", "../../../src/main/js/components/common/DocumentationTooltip.tsx", "../../../src/main/js/components/icons/SonarLintIcon.tsx", "../../../src/main/js/components/issue/components/IssueMessage.tsx", "../../../src/main/js/components/icons/FilterIcon.tsx", "../../../src/main/js/components/issue/popups/SimilarIssuesPopup.tsx", "../../../src/main/js/components/issue/components/SimilarIssuesFilter.tsx", "../../../src/main/js/components/issue/components/IssueTitleBar.tsx", "../../../src/main/js/components/issue/IssueView.tsx", "../../../src/main/js/components/issue/Issue.tsx", "../../../src/main/js/components/SourceViewer/components/LineIssuesList.tsx", "../../../src/main/js/components/SourceViewer/components/LineCode.tsx", "../../../src/main/js/components/SourceViewer/components/LineCoverage.tsx", "../../../src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx", "../../../src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx", "../../../src/main/js/components/SourceViewer/SourceViewerContext.tsx", "../../../src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx", "../../../src/main/js/components/SourceViewer/components/LineNumber.tsx", "../../../src/main/js/components/SourceViewer/components/SCMPopup.tsx", "../../../src/main/js/components/SourceViewer/components/LineSCM.tsx", "../../../src/main/js/components/SourceViewer/components/Line.tsx", "../../../src/main/js/components/SourceViewer/helpers/lines.ts", "../../../src/main/js/components/SourceViewer/SourceViewerCode.tsx", "../../../src/main/js/components/icons/ListIcon.tsx", "../../../src/main/js/api/measures.ts", "../../../src/main/js/components/ui/DuplicationsRating.tsx", "../../../node_modules/d3-path/src/path.js", "../../../node_modules/d3-path/src/index.js", "../../../node_modules/d3-shape/src/constant.js", "../../../node_modules/d3-shape/src/math.js", "../../../node_modules/d3-shape/src/arc.js", "../../../node_modules/d3-shape/src/curve/linear.js", "../../../node_modules/d3-shape/src/point.js", "../../../node_modules/d3-shape/src/line.js", "../../../node_modules/d3-shape/src/area.js", "../../../node_modules/d3-shape/src/descending.js", "../../../node_modules/d3-shape/src/identity.js", "../../../node_modules/d3-shape/src/pie.js", "../../../node_modules/d3-shape/src/curve/basis.js", "../../../node_modules/d3-shape/src/index.js", "../../../src/main/js/components/charts/DonutChart.tsx", "../../../src/main/js/components/ui/CoverageRating.tsx", "../../../src/main/js/components/SourceViewer/components/MeasuresOverlayMeasure.tsx", "../../../src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx", "../../../src/main/js/components/SourceViewer/SourceViewerHeader.tsx", "../../../src/main/js/components/icons/ExpandSnippetIcon.tsx", "../../../src/main/js/components/SourceViewer/SourceViewerHeaderSlim.tsx", "../../../src/main/js/components/SourceViewer/SourceViewerBase.tsx", "../../../src/main/js/components/SourceViewer/SourceViewer.tsx", "../../../src/main/js/helpers/scrolling.ts", "../../../src/main/js/apps/code/components/SourceViewerWrapper.tsx", "../../../src/main/js/apps/code/components/CodeApp.tsx", "../../../src/main/js/apps/code/routes.ts", "../../../src/main/js/apps/coding-rules/query.ts", "../../../src/main/js/helpers/csv.ts", "../../../src/main/js/api/quality-profiles.ts", "../../../src/main/js/api/rules.ts", "../../../src/main/js/components/common/FiltersHeader.tsx", "../../../src/main/js/components/common/ScreenPositionHelper.tsx", "../../../src/main/js/components/icons/BackIcon.tsx", "../../../src/main/js/helpers/pages.ts", "../../../src/main/js/apps/issues/utils.ts", "../../../src/main/js/apps/coding-rules/components/BulkChangeModal.tsx", "../../../src/main/js/apps/coding-rules/components/BulkChange.tsx", "../../../src/main/js/components/facet/FacetBox.tsx", "../../../src/main/js/components/facet/FacetHeader.tsx", "../../../src/main/js/components/facet/FacetItem.tsx", "../../../src/main/js/components/facet/FacetItemsList.tsx", "../../../src/main/js/components/facet/ListStyleFacetFooter.tsx", "../../../src/main/js/components/facet/MultipleSelectionHint.tsx", "../../../src/main/js/components/facet/ListStyleFacet.tsx", "../../../src/main/js/helpers/search.tsx", "../../../src/main/js/helpers/security-standard.ts", "../../../src/main/js/apps/issues/sidebar/StandardFacet.tsx", "../../../src/main/js/apps/coding-rules/components/Facet.tsx", "../../../src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx", "../../../src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx", "../../../src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx", "../../../src/main/js/apps/coding-rules/components/InheritanceFacet.tsx", "../../../src/main/js/apps/coding-rules/components/LanguageFacet.tsx", "../../../src/main/js/apps/coding-rules/components/ProfileFacet.tsx", "../../../src/main/js/apps/coding-rules/components/RepositoryFacet.tsx", "../../../src/main/js/apps/coding-rules/components/StatusFacet.tsx", "../../../src/main/js/apps/coding-rules/components/TagFacet.tsx", "../../../src/main/js/apps/coding-rules/components/TemplateFacet.tsx", "../../../src/main/js/apps/coding-rules/components/TypeFacet.tsx", "../../../src/main/js/apps/coding-rules/components/FacetsList.tsx", "../../../src/main/js/components/common/PageCounter.tsx", "../../../src/main/js/components/controls/ReloadButton.tsx", "../../../src/main/js/components/ui/PageShortcutsTooltip.tsx", "../../../src/main/js/apps/coding-rules/components/PageActions.tsx", "../../../src/main/js/components/shared/TypeHelper.tsx", "../../../src/main/js/helpers/strings.ts", "../../../src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx", "../../../src/main/js/apps/coding-rules/components/CustomRuleButton.tsx", "../../../src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx", "../../../src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx", "../../../src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx", "../../../src/main/js/components/hoc/withAppState.tsx", "../../../src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx", "../../../src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx", "../../../src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx", "../../../src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx", "../../../src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx", "../../../src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx", "../../../src/main/js/apps/coding-rules/components/ActivationFormModal.tsx", "../../../src/main/js/apps/coding-rules/components/ActivationButton.tsx", "../../../src/main/js/apps/coding-rules/components/RuleInheritanceIcon.tsx", "../../../src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx", "../../../src/main/js/apps/coding-rules/components/RuleDetails.tsx", "../../../src/main/js/apps/coding-rules/components/RuleListItem.tsx", "../../../src/main/js/apps/coding-rules/components/App.tsx", "../../../src/main/js/apps/coding-rules/routes.ts", "../../../src/main/js/apps/component-measures/config/bubbles.ts", "../../../src/main/js/apps/component-measures/config/domains.ts", "../../../src/main/js/apps/component-measures/utils.ts", "../../../src/main/js/components/icons/BubblesIcon.tsx", "../../../src/main/js/apps/component-measures/sidebar/FacetMeasureValue.tsx", "../../../src/main/js/apps/component-measures/sidebar/DomainFacet.tsx", "../../../src/main/js/apps/component-measures/sidebar/ProjectOverviewFacet.tsx", "../../../src/main/js/apps/component-measures/sidebar/Sidebar.tsx", "../../../src/main/js/apps/component-measures/config/complementary.ts", "../../../src/main/js/apps/component-measures/drilldown/ComponentCell.tsx", "../../../src/main/js/apps/component-measures/drilldown/MeasureCell.tsx", "../../../src/main/js/apps/component-measures/drilldown/ComponentsListRow.tsx", "../../../src/main/js/apps/component-measures/drilldown/EmptyResult.tsx", "../../../src/main/js/apps/component-measures/drilldown/ComponentsList.tsx", "../../../src/main/js/apps/component-measures/drilldown/FilesView.tsx", "../../../node_modules/d3-array/src/ascending.js", "../../../node_modules/d3-array/src/bisector.js", "../../../node_modules/d3-array/src/bisect.js", "../../../node_modules/d3-array/src/extent.js", "../../../node_modules/d3-array/src/range.js", "../../../node_modules/d3-array/src/ticks.js", "../../../node_modules/d3-array/src/max.js", "../../../node_modules/d3-array/src/min.js", "../../../node_modules/d3-array/src/index.js", "../../../node_modules/d3-scale/src/init.js", "../../../node_modules/d3-scale/src/ordinal.js", "../../../node_modules/d3-scale/src/band.js", "../../../node_modules/d3-color/src/define.js", "../../../node_modules/d3-color/src/color.js", "../../../node_modules/d3-color/src/math.js", "../../../node_modules/d3-color/src/lab.js", "../../../node_modules/d3-color/src/cubehelix.js", "../../../node_modules/d3-color/src/index.js", "../../../node_modules/d3-interpolate/src/basis.js", "../../../node_modules/d3-interpolate/src/basisClosed.js", "../../../node_modules/d3-interpolate/src/constant.js", "../../../node_modules/d3-interpolate/src/color.js", "../../../node_modules/d3-interpolate/src/rgb.js", "../../../node_modules/d3-interpolate/src/numberArray.js", "../../../node_modules/d3-interpolate/src/array.js", "../../../node_modules/d3-interpolate/src/date.js", "../../../node_modules/d3-interpolate/src/number.js", "../../../node_modules/d3-interpolate/src/object.js", "../../../node_modules/d3-interpolate/src/string.js", "../../../node_modules/d3-interpolate/src/value.js", "../../../node_modules/d3-interpolate/src/round.js", "../../../node_modules/d3-interpolate/src/transform/decompose.js", "../../../node_modules/d3-interpolate/src/transform/parse.js", "../../../node_modules/d3-interpolate/src/transform/index.js", "../../../node_modules/d3-interpolate/src/zoom.js", "../../../node_modules/d3-interpolate/src/index.js", "../../../node_modules/d3-scale/src/constant.js", "../../../node_modules/d3-scale/src/number.js", "../../../node_modules/d3-scale/src/continuous.js", "../../../node_modules/d3-format/src/formatDecimal.js", "../../../node_modules/d3-format/src/exponent.js", "../../../node_modules/d3-format/src/formatGroup.js", "../../../node_modules/d3-format/src/formatNumerals.js", "../../../node_modules/d3-format/src/formatSpecifier.js", "../../../node_modules/d3-format/src/formatTrim.js", "../../../node_modules/d3-format/src/formatPrefixAuto.js", "../../../node_modules/d3-format/src/formatRounded.js", "../../../node_modules/d3-format/src/formatTypes.js", "../../../node_modules/d3-format/src/identity.js", "../../../node_modules/d3-format/src/locale.js", "../../../node_modules/d3-format/src/defaultLocale.js", "../../../node_modules/d3-format/src/precisionFixed.js", "../../../node_modules/d3-format/src/precisionPrefix.js", "../../../node_modules/d3-format/src/precisionRound.js", "../../../node_modules/d3-format/src/index.js", "../../../node_modules/d3-scale/src/tickFormat.js", "../../../node_modules/d3-scale/src/linear.js", "../../../node_modules/d3-scale/src/nice.js", "../../../node_modules/d3-time/src/interval.js", "../../../node_modules/d3-time/src/millisecond.js", "../../../node_modules/d3-time/src/duration.js", "../../../node_modules/d3-time/src/second.js", "../../../node_modules/d3-time/src/minute.js", "../../../node_modules/d3-time/src/hour.js", "../../../node_modules/d3-time/src/day.js", "../../../node_modules/d3-time/src/week.js", "../../../node_modules/d3-time/src/month.js", "../../../node_modules/d3-time/src/year.js", "../../../node_modules/d3-time/src/utcMinute.js", "../../../node_modules/d3-time/src/utcHour.js", "../../../node_modules/d3-time/src/utcDay.js", "../../../node_modules/d3-time/src/utcWeek.js", "../../../node_modules/d3-time/src/utcMonth.js", "../../../node_modules/d3-time/src/utcYear.js", "../../../node_modules/d3-time/src/index.js", "../../../node_modules/d3-time-format/src/locale.js", "../../../node_modules/d3-time-format/src/defaultLocale.js", "../../../node_modules/d3-time-format/src/isoFormat.js", "../../../node_modules/d3-time-format/src/isoParse.js", "../../../node_modules/d3-time-format/src/index.js", "../../../node_modules/d3-scale/src/time.js", "../../../node_modules/d3-scale/src/index.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_global.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_core.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_a-function.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_ctx.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_is-object.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_an-object.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_fails.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_descriptors.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_dom-create.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_ie8-dom-define.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_to-primitive.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dp.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_property-desc.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_hide.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_has.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_cof.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_iobject.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_defined.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_to-iobject.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_to-integer.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_to-length.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_to-absolute-index.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_array-includes.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_library.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_shared.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_uid.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_shared-key.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys-internal.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-bug-keys.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-keys.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gops.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-pie.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_to-object.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-assign.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.assign.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/object/assign.js", "../../../node_modules/babel-runtime/core-js/object/assign.js", "../../../node_modules/babel-runtime/helpers/extends.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gpo.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-sap.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-prototype-of.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-prototype-of.js", "../../../node_modules/babel-runtime/core-js/object/get-prototype-of.js", "../../../node_modules/babel-runtime/helpers/classCallCheck.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.define-property.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/object/define-property.js", "../../../node_modules/babel-runtime/core-js/object/define-property.js", "../../../node_modules/babel-runtime/helpers/createClass.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_string-at.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_iterators.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-dps.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_html.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-create.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_wks.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_set-to-string-tag.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-create.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-define.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.string.iterator.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_add-to-unscopables.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-step.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.array.iterator.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/web.dom.iterable.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-ext.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/iterator.js", "../../../node_modules/babel-runtime/core-js/symbol/iterator.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_meta.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_wks-define.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_enum-keys.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopn-ext.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_object-gopd.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.symbol.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.to-string.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.async-iterator.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es7.symbol.observable.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/index.js", "../../../node_modules/babel-runtime/core-js/symbol.js", "../../../node_modules/babel-runtime/helpers/typeof.js", "../../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_set-proto.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.set-prototype-of.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/object/set-prototype-of.js", "../../../node_modules/babel-runtime/core-js/object/set-prototype-of.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.create.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/object/create.js", "../../../node_modules/babel-runtime/core-js/object/create.js", "../../../node_modules/babel-runtime/helpers/inherits.js", "../../../node_modules/react-virtualized/dist/commonjs/vendor/detectElementResize.js", "../../../node_modules/react-virtualized/dist/commonjs/AutoSizer/AutoSizer.js", "../../../node_modules/react-virtualized/dist/commonjs/AutoSizer/index.js", "../../../src/main/js/components/charts/ColorBoxLegend.tsx", "../../../src/main/js/components/charts/ColorGradientLegend.tsx", "../../../node_modules/d3-hierarchy/src/hierarchy/count.js", "../../../node_modules/d3-hierarchy/src/hierarchy/each.js", "../../../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js", "../../../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js", "../../../node_modules/d3-hierarchy/src/hierarchy/sum.js", "../../../node_modules/d3-hierarchy/src/hierarchy/sort.js", "../../../node_modules/d3-hierarchy/src/hierarchy/path.js", "../../../node_modules/d3-hierarchy/src/hierarchy/ancestors.js", "../../../node_modules/d3-hierarchy/src/hierarchy/descendants.js", "../../../node_modules/d3-hierarchy/src/hierarchy/leaves.js", "../../../node_modules/d3-hierarchy/src/hierarchy/links.js", "../../../node_modules/d3-hierarchy/src/hierarchy/index.js", "../../../node_modules/d3-hierarchy/src/accessors.js", "../../../node_modules/d3-hierarchy/src/constant.js", "../../../node_modules/d3-hierarchy/src/treemap/round.js", "../../../node_modules/d3-hierarchy/src/treemap/dice.js", "../../../node_modules/d3-hierarchy/src/treemap/slice.js", "../../../node_modules/d3-hierarchy/src/treemap/squarify.js", "../../../node_modules/d3-hierarchy/src/treemap/index.js", "../../../node_modules/d3-hierarchy/src/index.js", "../../../src/main/js/components/charts/TreeMapRect.tsx", "../../../src/main/js/components/charts/TreeMap.tsx", "../../../src/main/js/apps/component-measures/drilldown/TreeMapView.tsx", "../../../src/main/js/apps/component-measures/components/Breadcrumb.tsx", "../../../src/main/js/apps/component-measures/components/Breadcrumbs.tsx", "../../../src/main/js/apps/component-measures/components/MeasureContentHeader.tsx", "../../../src/main/js/components/charts/Histogram.tsx", "../../../src/main/js/components/charts/LanguageDistribution.tsx", "../../../src/main/js/components/icons/HistoryIcon.tsx", "../../../src/main/js/helpers/periods.ts", "../../../src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx", "../../../src/main/js/apps/component-measures/components/MeasureHeader.tsx", "../../../src/main/js/components/icons/TreeIcon.tsx", "../../../src/main/js/components/icons/TreemapIcon.tsx", "../../../src/main/js/apps/component-measures/components/MeasureViewSelect.tsx", "../../../src/main/js/apps/component-measures/components/MeasureContent.tsx", "../../../node_modules/d3-selection/src/namespaces.js", "../../../node_modules/d3-selection/src/namespace.js", "../../../node_modules/d3-selection/src/creator.js", "../../../node_modules/d3-selection/src/selector.js", "../../../node_modules/d3-selection/src/selection/select.js", "../../../node_modules/d3-selection/src/selectorAll.js", "../../../node_modules/d3-selection/src/selection/selectAll.js", "../../../node_modules/d3-selection/src/matcher.js", "../../../node_modules/d3-selection/src/selection/filter.js", "../../../node_modules/d3-selection/src/selection/sparse.js", "../../../node_modules/d3-selection/src/selection/enter.js", "../../../node_modules/d3-selection/src/constant.js", "../../../node_modules/d3-selection/src/selection/data.js", "../../../node_modules/d3-selection/src/selection/exit.js", "../../../node_modules/d3-selection/src/selection/join.js", "../../../node_modules/d3-selection/src/selection/merge.js", "../../../node_modules/d3-selection/src/selection/order.js", "../../../node_modules/d3-selection/src/selection/sort.js", "../../../node_modules/d3-selection/src/selection/call.js", "../../../node_modules/d3-selection/src/selection/nodes.js", "../../../node_modules/d3-selection/src/selection/node.js", "../../../node_modules/d3-selection/src/selection/size.js", "../../../node_modules/d3-selection/src/selection/empty.js", "../../../node_modules/d3-selection/src/selection/each.js", "../../../node_modules/d3-selection/src/selection/attr.js", "../../../node_modules/d3-selection/src/window.js", "../../../node_modules/d3-selection/src/selection/style.js", "../../../node_modules/d3-selection/src/selection/property.js", "../../../node_modules/d3-selection/src/selection/classed.js", "../../../node_modules/d3-selection/src/selection/text.js", "../../../node_modules/d3-selection/src/selection/html.js", "../../../node_modules/d3-selection/src/selection/raise.js", "../../../node_modules/d3-selection/src/selection/lower.js", "../../../node_modules/d3-selection/src/selection/append.js", "../../../node_modules/d3-selection/src/selection/insert.js", "../../../node_modules/d3-selection/src/selection/remove.js", "../../../node_modules/d3-selection/src/selection/clone.js", "../../../node_modules/d3-selection/src/selection/datum.js", "../../../node_modules/d3-selection/src/selection/on.js", "../../../node_modules/d3-selection/src/selection/dispatch.js", "../../../node_modules/d3-selection/src/selection/index.js", "../../../node_modules/d3-selection/src/select.js", "../../../node_modules/d3-selection/src/index.js", "../../../node_modules/d3-dispatch/src/dispatch.js", "../../../node_modules/d3-dispatch/src/index.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/namespaces.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/namespace.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/creator.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selector.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/select.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selectorAll.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/selectAll.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/matcher.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/filter.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/sparse.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/enter.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/constant.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/data.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/exit.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/join.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/merge.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/order.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/sort.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/call.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/nodes.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/node.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/size.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/empty.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/each.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/attr.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/window.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/style.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/property.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/classed.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/text.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/html.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/raise.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/lower.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/append.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/insert.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/remove.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/clone.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/datum.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/on.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/dispatch.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/selection/index.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/select.js", "../../../node_modules/d3-drag/node_modules/d3-selection/src/index.js", "../../../node_modules/d3-drag/src/noevent.js", "../../../node_modules/d3-drag/src/nodrag.js", "../../../node_modules/d3-drag/src/index.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/namespaces.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/namespace.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/creator.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selector.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/select.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selectorAll.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/selectAll.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/matcher.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/filter.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/sparse.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/enter.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/constant.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/data.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/exit.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/join.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/merge.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/order.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/sort.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/call.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/nodes.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/node.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/size.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/empty.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/each.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/attr.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/window.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/style.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/property.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/classed.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/text.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/html.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/raise.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/lower.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/append.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/insert.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/remove.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/clone.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/datum.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/on.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/dispatch.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/selection/index.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/select.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/sourceEvent.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/point.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/mouse.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/touch.js", "../../../node_modules/d3-zoom/node_modules/d3-selection/src/index.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/namespaces.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/namespace.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/creator.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selector.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/select.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selectorAll.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/selectAll.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/matcher.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/filter.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/sparse.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/enter.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/constant.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/data.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/exit.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/join.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/merge.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/order.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/sort.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/call.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/nodes.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/node.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/size.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/empty.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/each.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/attr.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/window.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/style.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/property.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/classed.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/text.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/html.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/raise.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/lower.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/append.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/insert.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/remove.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/clone.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/datum.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/on.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/dispatch.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/selection/index.js", "../../../node_modules/d3-transition/node_modules/d3-selection/src/index.js", "../../../node_modules/d3-timer/src/timer.js", "../../../node_modules/d3-timer/src/timeout.js", "../../../node_modules/d3-timer/src/index.js", "../../../node_modules/d3-transition/src/transition/schedule.js", "../../../node_modules/d3-transition/src/interrupt.js", "../../../node_modules/d3-transition/src/selection/interrupt.js", "../../../node_modules/d3-transition/src/transition/tween.js", "../../../node_modules/d3-transition/src/transition/interpolate.js", "../../../node_modules/d3-transition/src/transition/attr.js", "../../../node_modules/d3-transition/src/transition/attrTween.js", "../../../node_modules/d3-transition/src/transition/delay.js", "../../../node_modules/d3-transition/src/transition/duration.js", "../../../node_modules/d3-transition/src/transition/ease.js", "../../../node_modules/d3-transition/src/transition/filter.js", "../../../node_modules/d3-transition/src/transition/merge.js", "../../../node_modules/d3-transition/src/transition/on.js", "../../../node_modules/d3-transition/src/transition/remove.js", "../../../node_modules/d3-transition/src/transition/select.js", "../../../node_modules/d3-transition/src/transition/selectAll.js", "../../../node_modules/d3-transition/src/transition/selection.js", "../../../node_modules/d3-transition/src/transition/style.js", "../../../node_modules/d3-transition/src/transition/styleTween.js", "../../../node_modules/d3-transition/src/transition/text.js", "../../../node_modules/d3-transition/src/transition/textTween.js", "../../../node_modules/d3-transition/src/transition/transition.js", "../../../node_modules/d3-transition/src/transition/end.js", "../../../node_modules/d3-transition/src/transition/index.js", "../../../node_modules/d3-ease/src/cubic.js", "../../../node_modules/d3-ease/src/index.js", "../../../node_modules/d3-transition/src/selection/transition.js", "../../../node_modules/d3-transition/src/selection/index.js", "../../../node_modules/d3-transition/src/active.js", "../../../node_modules/d3-transition/src/index.js", "../../../node_modules/d3-zoom/src/constant.js", "../../../node_modules/d3-zoom/src/event.js", "../../../node_modules/d3-zoom/src/transform.js", "../../../node_modules/d3-zoom/src/noevent.js", "../../../node_modules/d3-zoom/src/zoom.js", "../../../node_modules/d3-zoom/src/index.js", "../../../src/main/js/components/charts/BubbleChart.tsx", "../../../src/main/js/components/charts/ColorRatingsLegend.tsx", "../../../src/main/js/apps/component-measures/drilldown/BubbleChart.tsx", "../../../src/main/js/apps/component-measures/components/MeasureOverview.tsx", "../../../src/main/js/apps/component-measures/components/MeasureOverviewContainer.tsx", "../../../src/main/js/apps/component-measures/components/MeasuresEmpty.tsx", "../../../src/main/js/apps/component-measures/components/App.tsx", "../../../src/main/js/apps/component-measures/routes.ts", "../../../src/main/js/types/plugins.ts", "../../../src/main/js/api/plugins.ts", "../../../src/main/js/api/static.ts", "../../../src/main/js/components/ui/NavBar.tsx", "../../../src/main/js/types/editions.ts", "../../../src/main/js/helpers/editions.ts", "../../../src/main/js/app/components/GlobalFooterBranding.tsx", "../../../src/main/js/app/components/GlobalFooter.tsx", "../../../src/main/js/app/components/GlobalFooterContainer.tsx", "../../../src/main/js/app/components/SimpleContainer.tsx", "../../../src/main/js/app/components/NotFound.tsx", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/common/unicode.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/common/error-codes.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/tokenizer/preprocessor.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/tokenizer/named-entity-data.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/tokenizer/index.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/common/html.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/parser/open-element-stack.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/parser/formatting-element-list.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/utils/mixin.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/extensions/location-info/parser-mixin.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/tree-adapters/default.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/utils/merge-options.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/common/doctype.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/common/foreign-content.js", "../../../node_modules/hast-util-raw/node_modules/parse5/lib/parser/index.js", "../../../node_modules/unist-util-position/index.js", "../../../node_modules/xtend/immutable.js", "../../../node_modules/property-information/lib/util/schema.js", "../../../node_modules/property-information/lib/util/merge.js", "../../../node_modules/property-information/normalize.js", "../../../node_modules/property-information/lib/util/info.js", "../../../node_modules/property-information/lib/util/types.js", "../../../node_modules/property-information/lib/util/defined-info.js", "../../../node_modules/property-information/lib/util/create.js", "../../../node_modules/property-information/lib/xlink.js", "../../../node_modules/property-information/lib/xml.js", "../../../node_modules/property-information/lib/util/case-sensitive-transform.js", "../../../node_modules/property-information/lib/util/case-insensitive-transform.js", "../../../node_modules/property-information/lib/xmlns.js", "../../../node_modules/property-information/lib/aria.js", "../../../node_modules/property-information/lib/html.js", "../../../node_modules/property-information/html.js", "../../../node_modules/property-information/lib/svg.js", "../../../node_modules/property-information/svg.js", "../../../node_modules/property-information/find.js", "../../../node_modules/hast-util-parse-selector/index.js", "../../../node_modules/space-separated-tokens/index.js", "../../../node_modules/comma-separated-tokens/index.js", "../../../node_modules/hastscript/factory.js", "../../../node_modules/hastscript/svg.js", "../../../node_modules/hastscript/html.js", "../../../node_modules/hastscript/index.js", "../../../node_modules/ccount/index.js", "../../../node_modules/hast-util-from-parse5/index.js", "../../../node_modules/inline-style-parser/index.js", "../../../node_modules/style-to-object/index.js", "../../../node_modules/hast-util-to-parse5/node_modules/unist-util-is/convert.js", "../../../node_modules/hast-util-to-parse5/node_modules/hast-to-hyperscript/index.js", "../../../node_modules/zwitch/index.js", "../../../node_modules/hast-util-to-parse5/index.js", "../../../node_modules/hast-util-raw/index.js", "../../../node_modules/rehype-raw/index.js", "../../../node_modules/hast-to-hyperscript/node_modules/style-to-object/index.js", "../../../node_modules/unist-util-is/convert.js", "../../../node_modules/hast-to-hyperscript/index.js", "../../../node_modules/@mapbox/hast-util-table-cell-style/node_modules/unist-util-is/convert.js", "../../../node_modules/@mapbox/hast-util-table-cell-style/node_modules/unist-util-visit-parents/index.js", "../../../node_modules/@mapbox/hast-util-table-cell-style/node_modules/unist-util-visit/index.js", "../../../node_modules/@mapbox/hast-util-table-cell-style/index.js", "../../../node_modules/rehype-react/index.js", "../../../node_modules/github-slugger/node_modules/emoji-regex/index.js", "../../../node_modules/github-slugger/index.js", "../../../node_modules/unist-util-visit-parents/index.js", "../../../node_modules/unist-util-visit/index.js", "../../../node_modules/hast-util-to-string/index.js", "../../../node_modules/hast-util-is-element/index.js", "../../../node_modules/hast-util-has-property/index.js", "../../../node_modules/rehype-slug/index.js", "../../../node_modules/extend/index.js", "../../../node_modules/bail/index.js", "../../../node_modules/unist-util-stringify-position/index.js", "../../../node_modules/vfile-message/index.js", "../../../node_modules/path-browserify/index.js", "../../../node_modules/replace-ext/index.js", "../../../node_modules/vfile/node_modules/is-buffer/index.js", "../../../node_modules/vfile/core.js", "../../../node_modules/vfile/index.js", "../../../node_modules/trough/wrap.js", "../../../node_modules/trough/index.js", "../../../node_modules/is-plain-obj/index.js", "../../../node_modules/unified/index.js", "../../../node_modules/inherits/inherits_browser.js", "../../../node_modules/unherit/index.js", "../../../node_modules/state-toggle/index.js", "../../../node_modules/vfile-location/index.js", "../../../node_modules/remark-parse/lib/unescape.js", "../../../node_modules/is-decimal/index.js", "../../../node_modules/is-hexadecimal/index.js", "../../../node_modules/is-alphabetical/index.js", "../../../node_modules/is-alphanumerical/index.js", "../../../node_modules/parse-entities/decode-entity.browser.js", "../../../node_modules/parse-entities/index.js", "../../../node_modules/remark-parse/lib/decode.js", "../../../node_modules/remark-parse/lib/tokenizer.js", "../../../node_modules/markdown-escapes/index.js", "../../../node_modules/remark-parse/lib/block-elements.js", "../../../node_modules/remark-parse/lib/defaults.js", "../../../node_modules/remark-parse/lib/set-options.js", "../../../node_modules/unist-util-remove-position/node_modules/unist-util-is/convert.js", "../../../node_modules/unist-util-remove-position/node_modules/unist-util-visit-parents/index.js", "../../../node_modules/unist-util-remove-position/node_modules/unist-util-visit/index.js", "../../../node_modules/unist-util-remove-position/index.js", "../../../node_modules/remark-parse/lib/parse.js", "../../../node_modules/is-whitespace-character/index.js", "../../../node_modules/remark-parse/lib/tokenize/newline.js", "../../../node_modules/repeat-string/index.js", "../../../node_modules/trim-trailing-lines/index.js", "../../../node_modules/remark-parse/lib/tokenize/code-indented.js", "../../../node_modules/remark-parse/lib/tokenize/code-fenced.js", "../../../node_modules/trim/index.js", "../../../node_modules/remark-parse/lib/util/interrupt.js", "../../../node_modules/remark-parse/lib/tokenize/blockquote.js", "../../../node_modules/remark-parse/lib/tokenize/heading-atx.js", "../../../node_modules/remark-parse/lib/tokenize/thematic-break.js", "../../../node_modules/remark-parse/lib/util/get-indentation.js", "../../../node_modules/remark-parse/lib/util/remove-indentation.js", "../../../node_modules/remark-parse/lib/tokenize/list.js", "../../../node_modules/remark-parse/lib/tokenize/heading-setext.js", "../../../node_modules/remark-parse/lib/util/html.js", "../../../node_modules/remark-parse/lib/tokenize/html-block.js", "../../../node_modules/remark-parse/node_modules/collapse-white-space/index.js", "../../../node_modules/remark-parse/lib/util/normalize.js", "../../../node_modules/remark-parse/lib/tokenize/footnote-definition.js", "../../../node_modules/remark-parse/lib/tokenize/definition.js", "../../../node_modules/remark-parse/lib/tokenize/table.js", "../../../node_modules/remark-parse/lib/tokenize/paragraph.js", "../../../node_modules/remark-parse/lib/locate/escape.js", "../../../node_modules/remark-parse/lib/tokenize/escape.js", "../../../node_modules/remark-parse/lib/locate/tag.js", "../../../node_modules/remark-parse/lib/tokenize/auto-link.js", "../../../node_modules/remark-parse/lib/locate/url.js", "../../../node_modules/remark-parse/lib/tokenize/url.js", "../../../node_modules/remark-parse/lib/tokenize/html-inline.js", "../../../node_modules/remark-parse/lib/locate/link.js", "../../../node_modules/remark-parse/lib/tokenize/link.js", "../../../node_modules/remark-parse/lib/tokenize/reference.js", "../../../node_modules/remark-parse/lib/locate/strong.js", "../../../node_modules/remark-parse/lib/tokenize/strong.js", "../../../node_modules/is-word-character/index.js", "../../../node_modules/remark-parse/lib/locate/emphasis.js", "../../../node_modules/remark-parse/lib/tokenize/emphasis.js", "../../../node_modules/remark-parse/lib/locate/delete.js", "../../../node_modules/remark-parse/lib/tokenize/delete.js", "../../../node_modules/remark-parse/lib/locate/code-inline.js", "../../../node_modules/remark-parse/lib/tokenize/code-inline.js", "../../../node_modules/remark-parse/lib/locate/break.js", "../../../node_modules/remark-parse/lib/tokenize/break.js", "../../../node_modules/remark-parse/lib/tokenize/text.js", "../../../node_modules/remark-parse/lib/parser.js", "../../../node_modules/remark-parse/index.js", "../../../node_modules/remark-stringify/lib/util/identity.js", "../../../node_modules/remark-stringify/lib/util/enter-link-reference.js", "../../../node_modules/remark-stringify/lib/defaults.js", "../../../node_modules/stringify-entities/index.js", "../../../node_modules/is-alphanumeric/index.js", "../../../node_modules/remark-stringify/lib/util/entity-prefix-length.js", "../../../node_modules/remark-stringify/lib/escape.js", "../../../node_modules/remark-stringify/lib/set-options.js", "../../../node_modules/mdast-util-compact/node_modules/unist-util-is/convert.js", "../../../node_modules/mdast-util-compact/node_modules/unist-util-visit-parents/index.js", "../../../node_modules/mdast-util-compact/node_modules/unist-util-visit/index.js", "../../../node_modules/mdast-util-compact/index.js", "../../../node_modules/remark-stringify/lib/macro/compile.js", "../../../node_modules/remark-stringify/lib/macro/one.js", "../../../node_modules/remark-stringify/lib/macro/all.js", "../../../node_modules/remark-stringify/lib/macro/block.js", "../../../node_modules/remark-stringify/lib/macro/ordered-items.js", "../../../node_modules/remark-stringify/lib/macro/unordered-items.js", "../../../node_modules/remark-stringify/lib/visitors/root.js", "../../../node_modules/remark-stringify/lib/visitors/text.js", "../../../node_modules/remark-stringify/lib/visitors/heading.js", "../../../node_modules/remark-stringify/lib/visitors/paragraph.js", "../../../node_modules/remark-stringify/lib/visitors/blockquote.js", "../../../node_modules/remark-stringify/lib/visitors/list.js", "../../../node_modules/remark-stringify/lib/util/pad.js", "../../../node_modules/remark-stringify/lib/visitors/list-item.js", "../../../node_modules/longest-streak/index.js", "../../../node_modules/remark-stringify/lib/visitors/inline-code.js", "../../../node_modules/remark-stringify/lib/visitors/code.js", "../../../node_modules/remark-stringify/lib/visitors/html.js", "../../../node_modules/remark-stringify/lib/visitors/thematic-break.js", "../../../node_modules/remark-stringify/lib/visitors/strong.js", "../../../node_modules/remark-stringify/lib/visitors/emphasis.js", "../../../node_modules/remark-stringify/lib/visitors/break.js", "../../../node_modules/remark-stringify/lib/visitors/delete.js", "../../../node_modules/remark-stringify/lib/util/enclose-uri.js", "../../../node_modules/remark-stringify/lib/util/enclose-title.js", "../../../node_modules/remark-stringify/lib/visitors/link.js", "../../../node_modules/remark-stringify/lib/util/copy-identifier-encoding.js", "../../../node_modules/remark-stringify/lib/util/label.js", "../../../node_modules/remark-stringify/lib/visitors/link-reference.js", "../../../node_modules/remark-stringify/lib/visitors/image-reference.js", "../../../node_modules/remark-stringify/lib/visitors/definition.js", "../../../node_modules/remark-stringify/lib/visitors/image.js", "../../../node_modules/remark-stringify/lib/visitors/footnote.js", "../../../node_modules/remark-stringify/lib/visitors/footnote-reference.js", "../../../node_modules/remark-stringify/lib/visitors/footnote-definition.js", "../../../node_modules/markdown-table/index.js", "../../../node_modules/remark-stringify/lib/visitors/table.js", "../../../node_modules/remark-stringify/lib/visitors/table-cell.js", "../../../node_modules/remark-stringify/lib/compiler.js", "../../../node_modules/remark-stringify/index.js", "../../../node_modules/remark/index.js", "../../../node_modules/remark-custom-blocks/node_modules/space-separated-tokens/index.js", "../../../node_modules/remark-custom-blocks/dist/index.js", "../../../node_modules/unist-builder/index.js", "../../../node_modules/unist-util-generated/index.js", "../../../node_modules/mdast-util-definitions/index.js", "../../../node_modules/mdast-util-to-hast/lib/all.js", "../../../node_modules/mdast-util-to-hast/lib/one.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js", "../../../node_modules/mdast-util-to-hast/lib/wrap.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/list.js", "../../../node_modules/mdast-util-to-hast/lib/footer.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/break.js", "../../../node_modules/detab/index.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/code.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/delete.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/footnote.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/heading.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/html.js", "../../../node_modules/mdurl/encode.js", "../../../node_modules/mdast-util-to-hast/lib/revert.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/image.js", "../../../node_modules/collapse-white-space/index.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/link.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/list-item.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/root.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/strong.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/table.js", "../../../node_modules/trim-lines/index.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/text.js", "../../../node_modules/mdast-util-to-hast/lib/handlers/index.js", "../../../node_modules/mdast-util-to-hast/lib/index.js", "../../../node_modules/mdast-util-to-hast/index.js", "../../../node_modules/remark-rehype/index.js", "../../../src/main/js/components/docs/DocCollapsibleBlock.tsx", "../../../src/main/js/components/docs/DocImg.tsx", "../../../src/main/js/components/docs/DocLink.tsx", "../../../node_modules/hast-util-sanitize/lib/index.js", "../../../node_modules/hast-util-sanitize/index.js", "../../../node_modules/remark-react/index.js", "../../../node_modules/mdast-util-to-string/index.js", "../../../node_modules/mdast-util-toc/lib/to-expression.js", "../../../node_modules/mdast-util-toc/lib/search.js", "../../../node_modules/mdast-util-toc/lib/contents.js", "../../../node_modules/mdast-util-toc/lib/index.js", "../../../node_modules/mdast-util-toc/index.js", "../../../src/main/js/components/docs/plugins/remark-only-toc.js", "../../../src/main/js/components/docs/DocToc.tsx", "../../../src/main/js/components/docs/DocTooltipLink.tsx", "../../../src/main/js/components/docs/DocMarkdownBlock.tsx", "../../../src/main/js/helpers/markdown.js", "../../../src/main/js/apps/documentation/navTreeUtils.ts", "../../../src/main/js/apps/documentation/documentation.directory-loader.js", "../../../src/main/js/apps/documentation/pages.ts", "../../../src/main/js/apps/documentation/utils.ts", "../../../src/main/js/apps/documentation/components/MenuItem.tsx", "../../../src/main/js/apps/documentation/components/MenuBlock.tsx", "../../../src/main/js/apps/documentation/components/MenuExternalLink.tsx", "../../../src/main/js/apps/documentation/components/Menu.tsx", "../../../node_modules/lunr/lunr.js", "../../../src/main/js/apps/documentation/components/SearchResultEntry.tsx", "../../../src/main/js/apps/documentation/components/SearchResults.tsx", "../../../src/main/js/apps/documentation/components/Sidebar.tsx", "../../../src/main/js/apps/documentation/components/App.tsx", "../../../src/main/js/apps/documentation/routes.ts", "../../../src/main/js/api/user_groups.ts", "../../../src/main/js/apps/groups/components/DeleteForm.tsx", "../../../src/main/js/apps/groups/components/Form.tsx", "../../../src/main/js/apps/groups/components/Header.tsx", "../../../src/main/js/components/icons/BulletListIcon.tsx", "../../../src/main/js/apps/groups/components/EditMembersModal.tsx", "../../../src/main/js/apps/groups/components/EditMembers.tsx", "../../../src/main/js/apps/groups/components/ListItem.tsx", "../../../src/main/js/apps/groups/components/List.tsx", "../../../src/main/js/apps/groups/components/App.tsx", "../../../src/main/js/apps/groups/routes.ts", "../../../src/main/js/components/common/EmptySearch.tsx", "../../../src/main/js/apps/issues/actions.ts", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocations.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigatorLocation.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssueComponent.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssue.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.tsx", "../../../src/main/js/components/controls/BackButton.tsx", "../../../src/main/js/apps/issues/conciseIssuesList/ConciseIssuesListHeader.tsx", "../../../src/main/js/apps/issues/sidebar/AssigneeFacet.tsx", "../../../src/main/js/apps/issues/sidebar/AuthorFacet.tsx", "../../../src/main/js/components/charts/BarChart.tsx", "../../../src/main/js/apps/issues/sidebar/CreationDateFacet.tsx", "../../../src/main/js/apps/issues/sidebar/DirectoryFacet.tsx", "../../../src/main/js/apps/issues/sidebar/FileFacet.tsx", "../../../src/main/js/apps/issues/sidebar/LanguageFacet.tsx", "../../../src/main/js/apps/issues/sidebar/ProjectFacet.tsx", "../../../src/main/js/apps/issues/sidebar/ResolutionFacet.tsx", "../../../src/main/js/apps/issues/sidebar/RuleFacet.tsx", "../../../src/main/js/apps/issues/sidebar/ScopeFacet.tsx", "../../../src/main/js/apps/issues/sidebar/SeverityFacet.tsx", "../../../src/main/js/apps/issues/sidebar/StatusFacet.tsx", "../../../src/main/js/apps/issues/sidebar/TagFacet.tsx", "../../../src/main/js/apps/issues/sidebar/TypeFacet.tsx", "../../../src/main/js/apps/issues/sidebar/Sidebar.tsx", "../../../src/main/js/components/controls/SearchSelect.tsx", "../../../src/main/js/apps/issues/components/BulkChangeModal.tsx", "../../../src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx", "../../../src/main/js/apps/issues/components/ListItem.tsx", "../../../src/main/js/apps/issues/components/IssuesList.tsx", "../../../src/main/js/apps/issues/crossComponentSourceViewer/utils.ts", "../../../src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx", "../../../src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx", "../../../src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx", "../../../src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx", "../../../src/main/js/apps/issues/components/IssuesSourceViewer.tsx", "../../../src/main/js/apps/issues/components/MyIssuesFilter.tsx", "../../../src/main/js/apps/issues/components/NoIssues.tsx", "../../../src/main/js/apps/issues/components/NoMyIssues.tsx", "../../../src/main/js/components/icons/HomeIcon.tsx", "../../../src/main/js/components/controls/HomePageSelect.tsx", "../../../src/main/js/apps/issues/components/IssuesCounter.tsx", "../../../src/main/js/apps/issues/components/TotalEffort.tsx", "../../../src/main/js/apps/issues/components/PageActions.tsx", "../../../src/main/js/apps/issues/components/App.tsx", "../../../src/main/js/apps/issues/components/AppContainer.tsx", "../../../src/main/js/api/system.ts", "../../../src/main/js/apps/maintenance/components/App.tsx", "../../../src/main/js/apps/maintenance/components/MaintenanceAppContainer.tsx", "../../../src/main/js/apps/maintenance/components/SetupAppContainer.tsx", "../../../src/main/js/apps/maintenance/routes.tsx", "../../../src/main/js/app/components/AdminContext.tsx", "../../../src/main/js/apps/marketplace/components/PluginRiskConsentBox.tsx", "../../../src/main/js/api/nav.ts", "../../../src/main/js/apps/marketplace/components/EditionBox.tsx", "../../../src/main/js/apps/marketplace/EditionBoxes.tsx", "../../../src/main/js/apps/marketplace/Footer.tsx", "../../../src/main/js/apps/marketplace/Header.tsx", "../../../src/main/js/components/icons/EllipsisIcon.tsx", "../../../src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx", "../../../src/main/js/apps/marketplace/components/PluginChangeLog.tsx", "../../../src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx", "../../../src/main/js/apps/marketplace/components/PluginDescription.tsx", "../../../src/main/js/apps/marketplace/components/PluginLicense.tsx", "../../../src/main/js/apps/marketplace/components/PluginOrganization.tsx", "../../../src/main/js/components/icons/CheckIcon.tsx", "../../../src/main/js/apps/marketplace/components/PluginUpdateButton.tsx", "../../../src/main/js/apps/marketplace/components/PluginActions.tsx", "../../../src/main/js/apps/marketplace/components/PluginStatus.tsx", "../../../src/main/js/apps/marketplace/components/PluginUrls.tsx", "../../../src/main/js/apps/marketplace/components/PluginAvailable.tsx", "../../../src/main/js/apps/marketplace/components/PluginUpdateItem.tsx", "../../../src/main/js/apps/marketplace/components/PluginUpdates.tsx", "../../../src/main/js/apps/marketplace/components/PluginInstalled.tsx", "../../../src/main/js/apps/marketplace/PluginsList.tsx", "../../../src/main/js/apps/marketplace/Search.tsx", "../../../src/main/js/apps/marketplace/utils.ts", "../../../src/main/js/apps/marketplace/App.tsx", "../../../src/main/js/apps/marketplace/AppContainer.tsx", "../../../src/main/js/apps/marketplace/routes.ts", "../../../src/main/js/api/projectActivity.ts", "../../../src/main/js/api/time-machine.ts", "../../../src/main/js/types/project-activity.ts", "../../../src/main/js/components/activity-graph/utils.ts", "../../../src/main/js/apps/overview/utils.ts", "../../../src/main/js/components/activity-graph/AddGraphMetricPopup.tsx", "../../../src/main/js/components/activity-graph/AddGraphMetric.tsx", "../../../src/main/js/components/activity-graph/GraphsHeader.tsx", "../../../src/main/js/components/charts/AdvancedTimeline.tsx", "../../../src/main/js/components/icons/ChartLegendIcon.tsx", "../../../src/main/js/components/activity-graph/GraphsLegendItem.tsx", "../../../src/main/js/components/activity-graph/GraphsLegendCustom.tsx", "../../../src/main/js/components/activity-graph/GraphsLegendStatic.tsx", "../../../src/main/js/components/activity-graph/GraphsTooltipsContent.tsx", "../../../src/main/js/components/activity-graph/GraphsTooltipsContentCoverage.tsx", "../../../src/main/js/components/activity-graph/GraphsTooltipsContentDuplication.tsx", "../../../src/main/js/app/components/ComponentContext.tsx", "../../../src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx", "../../../src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx", "../../../src/main/js/apps/projectActivity/components/EventInner.tsx", "../../../src/main/js/components/activity-graph/GraphsTooltipsContentEvents.tsx", "../../../src/main/js/components/activity-graph/GraphsTooltipsContentIssues.tsx", "../../../src/main/js/components/activity-graph/GraphsTooltips.tsx", "../../../src/main/js/components/activity-graph/GraphHistory.tsx", "../../../src/main/js/components/activity-graph/GraphsHistory.tsx", "../../../src/main/js/components/common/ActivityLink.tsx", "../../../src/main/js/apps/overview/branches/Event.tsx", "../../../src/main/js/apps/overview/branches/Analysis.tsx", "../../../src/main/js/apps/overview/branches/ActivityPanel.tsx", "../../../src/main/js/components/ui/DismissableAlert.tsx", "../../../src/main/js/apps/settings/components/AdditionalCategoryKeys.ts", "../../../src/main/js/apps/overview/branches/FirstAnalysisNextStepsNotif.tsx", "../../../src/main/js/components/controls/BoxedTabs.tsx", "../../../src/main/js/api/component-report.ts", "../../../src/main/js/components/controls/ComponentReportActionsRenderer.tsx", "../../../src/main/js/components/controls/ComponentReportActions.tsx", "../../../src/main/js/components/shared/DrilldownLink.tsx", "../../../src/main/js/apps/overview/components/MeasurementLabel.tsx", "../../../src/main/js/apps/overview/branches/DrilldownMeasureValue.tsx", "../../../src/main/js/apps/overview/branches/ApplicationLeakPeriodInfo.tsx", "../../../src/main/js/apps/overview/branches/ProjectLeakPeriodInfo.tsx", "../../../src/main/js/apps/overview/branches/LeakPeriodInfo.tsx", "../../../src/main/js/apps/overview/components/IssueLabel.tsx", "../../../src/main/js/apps/overview/components/IssueRating.tsx", "../../../src/main/js/apps/overview/branches/DebtValue.tsx", "../../../src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx", "../../../src/main/js/apps/overview/branches/MeasuresPanelIssueMeasureRow.tsx", "../../../src/main/js/apps/overview/branches/MeasuresPanelNoNewCode.tsx", "../../../src/main/js/apps/overview/branches/MeasuresPanel.tsx", "../../../src/main/js/apps/overview/branches/NoCodeWarning.tsx", "../../../src/main/js/apps/overview/components/SonarLintPromotion.tsx", "../../../src/main/js/apps/overview/components/QualityGateCondition.tsx", "../../../src/main/js/apps/overview/components/QualityGateConditions.tsx", "../../../src/main/js/apps/overview/branches/QualityGatePanelSection.tsx", "../../../src/main/js/apps/overview/branches/QualityGatePanel.tsx", "../../../src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx", "../../../src/main/js/apps/overview/branches/BranchOverview.tsx", "../../../src/main/js/api/alm-settings.ts", "../../../src/main/js/components/tutorials/components/SentenceWithHighlights.tsx", "../../../src/main/js/components/tutorials/components/AllSet.tsx", "../../../src/main/js/components/tutorials/components/Step.tsx", "../../../src/main/js/components/tutorials/components/AllSetStep.tsx", "../../../src/main/js/components/tutorials/components/FinishButton.tsx", "../../../src/main/js/components/tutorials/components/RenderOptions.tsx", "../../../src/main/js/components/tutorials/types.ts", "../../../src/main/js/components/common/CodeSnippet.tsx", "../../../src/main/js/components/tutorials/components/CompilationInfo.tsx", "../../../src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/AlertClassicEditor.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/PrepareAnalysisCommand.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/PublishSteps.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/DotNet.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/JavaGradle.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/JavaMaven.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/Other.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/ExtensionInstallationStepContent.tsx", "../../../src/main/js/components/tutorials/utils.ts", "../../../src/main/js/components/tutorials/components/EditTokenModal.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/ServiceEndpointStepContent.tsx", "../../../src/main/js/components/tutorials/azure-pipelines/AzurePipelinesTutorial.tsx", "../../../src/main/js/components/hoc/withCLanguageFeature.tsx", "../../../src/main/js/components/tutorials/components/YamlFileStep.tsx", "../../../src/main/js/components/tutorials/components/CreateYmlFile.tsx", "../../../src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts", "../../../src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts", "../../../src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts", "../../../src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts", "../../../src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts", "../../../src/main/js/components/tutorials/components/SentenceWithFilename.tsx", "../../../src/main/js/components/tutorials/components/DefaultProjectKey.tsx", "../../../src/main/js/components/tutorials/bitbucket-pipelines/PreambuleYaml.tsx", "../../../src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx", "../../../src/main/js/components/tutorials/components/TokenStepGenerator.tsx", "../../../src/main/js/components/tutorials/bitbucket-pipelines/RepositoryVariables.tsx", "../../../src/main/js/components/tutorials/bitbucket-pipelines/BitbucketPipelinesTutorial.tsx", "../../../src/main/js/components/tutorials/github-action/commands/CFamily.tsx", "../../../src/main/js/components/tutorials/github-action/commands/DotNet.tsx", "../../../src/main/js/components/tutorials/github-action/commands/Gradle.tsx", "../../../src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx", "../../../src/main/js/components/tutorials/github-action/commands/Others.tsx", "../../../src/main/js/components/tutorials/github-action/AnalysisCommand.tsx", "../../../src/main/js/components/tutorials/github-action/SecretStep.tsx", "../../../src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx", "../../../src/main/js/components/tutorials/gitlabci/EnvironmentVariablesStep.tsx", "../../../src/main/js/components/tutorials/gitlabci/ProjectKeyStep.tsx", "../../../src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx", "../../../src/main/js/components/tutorials/gitlabci/YmlFileStep.tsx", "../../../src/main/js/components/tutorials/gitlabci/GitLabCITutorial.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/CreateJenkinsfileBulletPoint.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/CFamilly.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsScanner.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsMSBuild.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetFramework.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/DotNet.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx", "../../../src/main/js/components/tutorials/jenkins/buildtool-steps/Other.tsx", "../../../src/main/js/components/tutorials/jenkins/JenkinsfileStep.tsx", "../../../src/main/js/components/tutorials/components/LabelActionPair.tsx", "../../../src/main/js/components/tutorials/components/LabelValuePair.tsx", "../../../src/main/js/components/tutorials/jenkins/MultiBranchPipelineStep.tsx", "../../../src/main/js/components/tutorials/jenkins/PipelineStep.tsx", "../../../src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx", "../../../src/main/js/components/tutorials/jenkins/SelectAlmStep.tsx", "../../../src/main/js/components/tutorials/jenkins/WebhookStepBitbucket.tsx", "../../../src/main/js/components/tutorials/jenkins/WebhookStepGithub.tsx", "../../../src/main/js/components/tutorials/jenkins/WebhookStepGitLab.tsx", "../../../src/main/js/components/tutorials/jenkins/WebhookStep.tsx", "../../../src/main/js/components/tutorials/jenkins/JenkinsTutorial.tsx", "../../../src/main/js/components/tutorials/manual/BuildToolForm.tsx", "../../../src/main/js/components/tutorials/manual/commands/DownloadBuildWrapper.tsx", "../../../src/main/js/components/tutorials/manual/commands/DownloadScanner.tsx", "../../../src/main/js/components/tutorials/manual/commands/ExecBuildWrapper.tsx", "../../../src/main/js/components/tutorials/manual/DoneNextSteps.tsx", "../../../src/main/js/components/tutorials/manual/commands/ExecScanner.tsx", "../../../src/main/js/components/tutorials/manual/commands/ClangGCCCommand.tsx", "../../../src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx", "../../../src/main/js/components/tutorials/manual/commands/DotNetCore.tsx", "../../../src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx", "../../../src/main/js/components/tutorials/manual/commands/DotNet.tsx", "../../../src/main/js/components/tutorials/manual/commands/JavaGradle.tsx", "../../../src/main/js/components/tutorials/manual/commands/JavaMaven.tsx", "../../../src/main/js/components/tutorials/manual/commands/Other.tsx", "../../../src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx", "../../../src/main/js/components/tutorials/manual/ProjectAnalysisStep.tsx", "../../../src/main/js/components/tutorials/manual/TokenStep.tsx", "../../../src/main/js/components/tutorials/manual/ManualTutorial.tsx", "../../../src/main/js/components/tutorials/TutorialSelectionRenderer.tsx", "../../../src/main/js/components/tutorials/TutorialSelection.tsx", "../../../src/main/js/apps/overview/components/EmptyOverview.tsx", "../../../src/main/js/apps/overview/pullRequests/AfterMergeEstimate.tsx", "../../../src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx", "../../../src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx", "../../../src/main/js/apps/overview/components/App.tsx", "../../../src/main/js/apps/overview/routes.ts", "../../../src/main/js/api/permissions.ts", "../../../src/main/js/apps/permission-templates/utils.ts", "../../../src/main/js/apps/permission-templates/components/Form.tsx", "../../../src/main/js/apps/permission-templates/components/Header.tsx", "../../../src/main/js/apps/permission-templates/components/ListHeader.tsx", "../../../src/main/js/apps/permission-templates/components/DeleteForm.tsx", "../../../src/main/js/apps/permission-templates/components/ActionsCell.tsx", "../../../src/main/js/apps/permission-templates/components/Defaults.tsx", "../../../src/main/js/apps/permission-templates/components/NameCell.tsx", "../../../src/main/js/apps/permission-templates/components/PermissionCell.tsx", "../../../src/main/js/apps/permission-templates/components/ListItem.tsx", "../../../src/main/js/apps/permission-templates/components/List.tsx", "../../../src/main/js/apps/permission-templates/components/Home.tsx", "../../../src/main/js/apps/permissions/utils.ts", "../../../src/main/js/components/icons/GroupIcon.tsx", "../../../src/main/js/apps/permissions/shared/components/PermissionCell.tsx", "../../../src/main/js/apps/permissions/shared/components/GroupHolder.tsx", "../../../src/main/js/apps/permissions/shared/components/PermissionHeader.tsx", "../../../src/main/js/apps/permissions/shared/components/UserHolder.tsx", "../../../src/main/js/apps/permissions/shared/components/HoldersList.tsx", "../../../src/main/js/apps/permissions/shared/components/SearchForm.tsx", "../../../src/main/js/apps/permission-templates/components/TemplateDetails.tsx", "../../../src/main/js/apps/permission-templates/components/TemplateHeader.tsx", "../../../src/main/js/apps/permission-templates/components/Template.tsx", "../../../src/main/js/apps/permission-templates/components/App.tsx", "../../../src/main/js/apps/permission-templates/routes.ts", "../../../src/main/js/apps/permissions/global/components/AllHoldersList.tsx", "../../../src/main/js/apps/permissions/global/components/PageHeader.tsx", "../../../src/main/js/apps/permissions/global/components/App.tsx", "../../../src/main/js/components/common/VisibilitySelector.tsx", "../../../src/main/js/apps/permissions/project/components/AllHoldersList.tsx", "../../../src/main/js/apps/permissions/project/components/ApplyTemplate.tsx", "../../../src/main/js/apps/permissions/project/components/PageHeader.tsx", "../../../src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx", "../../../src/main/js/apps/permissions/project/components/App.tsx", "../../../src/main/js/apps/permissions/project/components/AppContainer.ts", "../../../src/main/js/apps/permissions/routes.ts", "../../../src/main/js/components/icons/MeasuresIcon.tsx", "../../../src/main/js/components/common/MeasuresLink.tsx", "../../../src/main/js/apps/portfolio/utils.ts", "../../../src/main/js/apps/portfolio/components/Effort.tsx", "../../../src/main/js/apps/portfolio/components/MainRating.tsx", "../../../src/main/js/apps/portfolio/components/RatingFreshness.tsx", "../../../src/main/js/apps/portfolio/components/MetricBox.tsx", "../../../src/main/js/apps/portfolio/components/UnsubscribeEmailModal.tsx", "../../../src/main/js/apps/portfolio/components/WorstProjects.tsx", "../../../src/main/js/apps/portfolio/components/App.tsx", "../../../src/main/js/apps/portfolio/routes.ts", "../../../src/main/js/apps/projectActivity/actions.ts", "../../../src/main/js/apps/projectActivity/utils.ts", "../../../src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx", "../../../src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx", "../../../src/main/js/apps/projectActivity/components/Event.tsx", "../../../src/main/js/apps/projectActivity/components/Events.tsx", "../../../src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx", "../../../src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx", "../../../src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx", "../../../src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx", "../../../node_modules/react-draggable/build/webpack/universalModuleDefinition", "../../../node_modules/react-draggable/build/webpack/bootstrap", "../../../node_modules/react-draggable/build/node_modules/prop-types/index.js", "../../../node_modules/react-draggable/build/external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}", "../../../node_modules/react-draggable/build/external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}", "../../../node_modules/react-draggable/build/node_modules/classnames/index.js", "../../../node_modules/react-draggable/build/lib/cjs.js", "../../../node_modules/react-draggable/build/node_modules/prop-types/factoryWithThrowingShims.js", "../../../node_modules/react-draggable/build/node_modules/prop-types/lib/ReactPropTypesSecret.js", "../../../node_modules/react-draggable/build/lib/utils/shims.js", "../../../node_modules/react-draggable/build/lib/utils/getPrefix.js", "../../../node_modules/react-draggable/build/lib/utils/domFns.js", "../../../node_modules/react-draggable/build/lib/utils/positionFns.js", "../../../node_modules/react-draggable/build/lib/DraggableCore.js", "../../../node_modules/react-draggable/build/lib/Draggable.js", "../../../src/main/js/components/charts/ZoomTimeLine.tsx", "../../../src/main/js/components/activity-graph/GraphsZoom.tsx", "../../../src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx", "../../../src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx", "../../../src/main/js/apps/projectActivity/components/ProjectActivityEventSelectOption.tsx", "../../../src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx", "../../../src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx", "../../../src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx", "../../../src/main/js/apps/projectActivity/routes.ts", "../../../src/main/js/api/newCodePeriod.ts", "../../../src/main/js/apps/projectBaseline/utils.ts", "../../../src/main/js/apps/projectBaseline/components/AppHeader.tsx", "../../../src/main/js/components/icons/RecommendedIcon.tsx", "../../../src/main/js/components/controls/RadioCard.tsx", "../../../src/main/js/apps/projectBaseline/components/BaselineSettingAnalysis.tsx", "../../../src/main/js/components/controls/ValidationInput.tsx", "../../../src/main/js/apps/projectBaseline/components/BaselineSettingDays.tsx", "../../../src/main/js/apps/projectBaseline/components/BaselineSettingPreviousVersion.tsx", "../../../src/main/js/apps/projectBaseline/components/BaselineSettingReferenceBranch.tsx", "../../../src/main/js/apps/projectBaseline/components/BranchAnalysisListRenderer.tsx", "../../../src/main/js/apps/projectBaseline/components/BranchAnalysisList.tsx", "../../../src/main/js/apps/projectBaseline/components/BranchBaselineSettingModal.tsx", "../../../src/main/js/components/icons/BranchLikeIcon.tsx", "../../../src/main/js/apps/projectBaseline/components/BranchListRow.tsx", "../../../src/main/js/apps/projectBaseline/components/BranchList.tsx", "../../../src/main/js/apps/projectBaseline/components/ProjectBaselineSelector.tsx", "../../../src/main/js/apps/projectBaseline/components/App.tsx", "../../../src/main/js/apps/projectBaseline/components/AppContainer.ts", "../../../src/main/js/apps/projectBaseline/routes.ts", "../../../src/main/js/components/common/BranchStatus.tsx", "../../../src/main/js/components/controls/Toggle.tsx", "../../../src/main/js/apps/projectBranches/components/BranchPurgeSetting.tsx", "../../../src/main/js/apps/projectBranches/components/BranchLikeRow.tsx", "../../../src/main/js/apps/projectBranches/components/BranchLikeTable.tsx", "../../../src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx", "../../../src/main/js/apps/projectBranches/components/RenameBranchModal.tsx", "../../../src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx", "../../../src/main/js/apps/projectBranches/components/LifetimeInformationRenderer.tsx", "../../../src/main/js/apps/projectBranches/components/LifetimeInformation.tsx", "../../../src/main/js/apps/projectBranches/components/App.tsx", "../../../src/main/js/apps/projectBranches/routes.ts", "../../../src/main/js/api/project-dump.ts", "../../../src/main/js/apps/projectDump/components/Export.tsx", "../../../src/main/js/apps/projectDump/components/Import.tsx", "../../../src/main/js/apps/projectDump/ProjectDumpApp.tsx", "../../../src/main/js/apps/projectDump/routes.ts", "../../../src/main/js/app/utils/handleRequiredAuthorization.ts", "../../../src/main/js/apps/projectQualityGate/constants.ts", "../../../src/main/js/components/common/DisableableSelectOption.tsx", "../../../src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx", "../../../src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx", "../../../src/main/js/apps/projectQualityGate/ProjectQualityGateApp.tsx", "../../../src/main/js/apps/projectQualityGate/routes.ts", "../../../src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx", "../../../src/main/js/apps/projectQualityProfiles/constants.ts", "../../../src/main/js/apps/projectQualityProfiles/components/SetQualityProfileModal.tsx", "../../../src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx", "../../../src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesApp.tsx", "../../../src/main/js/apps/projectQualityProfiles/routes.ts", "../../../src/main/js/apps/projects/query.ts", "../../../src/main/js/apps/projects/utils.ts", "../../../src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx", "../../../src/main/js/apps/projects/visualizations/Coverage.tsx", "../../../src/main/js/apps/projects/visualizations/Duplications.tsx", "../../../src/main/js/apps/projects/visualizations/Maintainability.tsx", "../../../src/main/js/apps/projects/visualizations/Reliability.tsx", "../../../src/main/js/apps/projects/visualizations/Risk.tsx", "../../../src/main/js/apps/projects/visualizations/Security.tsx", "../../../src/main/js/apps/projects/visualizations/Visualizations.tsx", "../../../src/main/js/apps/projects/filters/SearchFilterContainer.tsx", "../../../src/main/js/app/components/extensions/CreateApplicationForm.tsx", "../../../src/main/js/types/permissions.ts", "../../../src/main/js/apps/projects/components/ApplicationCreation.tsx", "../../../src/main/js/apps/projects/components/PerspectiveSelectOption.tsx", "../../../src/main/js/apps/projects/components/PerspectiveSelect.tsx", "../../../src/main/js/components/icons/ChevronsIcon.tsx", "../../../src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx", "../../../src/main/js/apps/projects/components/ProjectCreationMenu.tsx", "../../../src/main/js/components/icons/SortAscIcon.tsx", "../../../src/main/js/components/icons/SortDescIcon.tsx", "../../../src/main/js/apps/projects/components/ProjectsSortingSelectOption.tsx", "../../../src/main/js/apps/projects/components/ProjectsSortingSelect.tsx", "../../../src/main/js/apps/projects/components/PageHeader.tsx", "../../../src/main/js/helpers/ratings.ts", "../../../src/main/js/apps/projects/filters/Filter.tsx", "../../../src/main/js/apps/projects/filters/FilterHeader.tsx", "../../../src/main/js/apps/projects/filters/CoverageFilter.tsx", "../../../src/main/js/apps/projects/filters/DuplicationsFilter.tsx", "../../../src/main/js/apps/projects/filters/SearchableFilterFooter.tsx", "../../../src/main/js/apps/projects/filters/SearchableFilterOption.tsx", "../../../src/main/js/apps/projects/filters/LanguagesFilter.tsx", "../../../src/main/js/apps/projects/filters/LanguagesFilterContainer.tsx", "../../../src/main/js/apps/projects/filters/IssuesFilter.tsx", "../../../src/main/js/apps/projects/filters/MaintainabilityFilter.tsx", "../../../src/main/js/apps/projects/filters/NewCoverageFilter.tsx", "../../../src/main/js/apps/projects/filters/NewDuplicationsFilter.tsx", "../../../src/main/js/apps/projects/filters/NewLinesFilter.tsx", "../../../src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx", "../../../src/main/js/apps/projects/filters/NewReliabilityFilter.tsx", "../../../src/main/js/apps/projects/filters/NewSecurityFilter.tsx", "../../../src/main/js/apps/projects/filters/QualifierFilter.tsx", "../../../src/main/js/apps/projects/filters/QualityGateFilter.tsx", "../../../src/main/js/apps/projects/filters/ReliabilityFilter.tsx", "../../../src/main/js/apps/projects/filters/SecurityFilter.tsx", "../../../src/main/js/apps/projects/filters/SecurityReviewFilter.tsx", "../../../src/main/js/components/ui/SizeRating.tsx", "../../../src/main/js/apps/projects/filters/SizeFilter.tsx", "../../../src/main/js/apps/projects/filters/TagsFilter.tsx", "../../../src/main/js/apps/projects/components/ClearAll.tsx", "../../../src/main/js/apps/projects/components/FavoriteFilter.tsx", "../../../src/main/js/apps/projects/components/FavoriteFilterContainer.tsx", "../../../src/main/js/apps/projects/components/PageSidebar.tsx", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/object/get-own-property-descriptor.js", "../../../node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js", "../../../node_modules/clsx/dist/clsx.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/utils/calculateSizeAndPositionDataAndUpdateScrollOffset.js", "../../../node_modules/babel-runtime/helpers/objectWithoutProperties.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/types.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/utils/CellSizeAndPositionManager.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/utils/maxElementSize.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/utils/ScalingCellSizeAndPositionManager.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.object.keys.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/object/keys.js", "../../../node_modules/babel-runtime/core-js/object/keys.js", "../../../node_modules/react-virtualized/dist/commonjs/utils/createCallbackMemoizer.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/defaultOverscanIndicesGetter.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/utils/updateScrollIndexHelper.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/defaultCellRangeRenderer.js", "../../../node_modules/dom-helpers/node_modules/@babel/runtime/helpers/interopRequireDefault.js", "../../../node_modules/dom-helpers/cjs/canUseDOM.js", "../../../node_modules/dom-helpers/cjs/scrollbarSize.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_classof.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_an-instance.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-call.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_is-array-iter.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator-method.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_for-of.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_species-constructor.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_invoke.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_task.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_microtask.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_new-promise-capability.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_perform.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_user-agent.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_promise-resolve.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_redefine-all.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_set-species.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/_iter-detect.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es7.promise.finally.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/modules/es7.promise.try.js", "../../../node_modules/babel-runtime/node_modules/core-js/library/fn/promise.js", "../../../node_modules/babel-runtime/core-js/promise.js", "../../../node_modules/react-virtualized/dist/commonjs/utils/animationFrame.js", "../../../node_modules/react-virtualized/dist/commonjs/utils/requestAnimationTimeout.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/Grid.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/accessibilityOverscanIndicesGetter.js", "../../../node_modules/react-virtualized/dist/commonjs/Grid/index.js", "../../../node_modules/react-virtualized/dist/commonjs/List/types.js", "../../../node_modules/react-virtualized/dist/commonjs/List/List.js", "../../../node_modules/react-virtualized/dist/commonjs/List/index.js", "../../../node_modules/react-virtualized/dist/commonjs/WindowScroller/utils/onScroll.js", "../../../node_modules/react-virtualized/dist/commonjs/WindowScroller/utils/dimensions.js", "../../../node_modules/react-virtualized/dist/commonjs/WindowScroller/WindowScroller.js", "../../../node_modules/react-virtualized/dist/commonjs/WindowScroller/index.js", "../../../src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx", "../../../src/main/js/apps/projects/components/EmptyInstance.tsx", "../../../src/main/js/apps/projects/components/NoFavoriteProjects.tsx", "../../../src/main/js/components/common/PrivacyBadgeContainer.tsx", "../../../src/main/js/api/favorites.ts", "../../../src/main/js/components/icons/FavoriteIcon.tsx", "../../../src/main/js/components/controls/FavoriteButton.tsx", "../../../src/main/js/components/controls/Favorite.tsx", "../../../src/main/js/apps/projects/components/project-card/ProjectCardLanguages.tsx", "../../../src/main/js/apps/projects/components/project-card/ProjectCardLanguagesContainer.tsx", "../../../src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx", "../../../src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx", "../../../src/main/js/apps/projects/components/project-card/ProjectCardQualityGate.tsx", "../../../src/main/js/apps/projects/components/project-card/ProjectCard.tsx", "../../../src/main/js/apps/projects/components/ProjectsList.tsx", "../../../src/main/js/apps/projects/components/AllProjects.tsx", "../../../src/main/js/apps/projects/components/AllProjectsContainer.tsx", "../../../src/main/js/apps/projects/components/DefaultPageSelector.tsx", "../../../src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AzureForm.tsx", "../../../src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx", "../../../src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx", "../../../src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx", "../../../src/main/js/apps/settings/components/almIntegration/GithubForm.tsx", "../../../src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx", "../../../src/main/js/api/alm-integrations.ts", "../../../src/main/js/apps/create/project/AzurePersonalAccessTokenForm.tsx", "../../../src/main/js/apps/create/project/types.ts", "../../../src/main/js/apps/create/project/AzureProjectAccordion.tsx", "../../../src/main/js/apps/create/project/AzureProjectsList.tsx", "../../../src/main/js/apps/create/project/CreateProjectPageHeader.tsx", "../../../src/main/js/apps/create/project/WrongBindingCountAlert.tsx", "../../../src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx", "../../../src/main/js/apps/create/project/AzureProjectCreate.tsx", "../../../src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx", "../../../src/main/js/apps/create/project/PersonalAccessTokenForm.tsx", "../../../src/main/js/apps/create/project/BitbucketCloudProjectCreateRender.tsx", "../../../src/main/js/apps/create/project/BitbucketCloudProjectCreate.tsx", "../../../src/main/js/apps/create/project/BitbucketProjectAccordion.tsx", "../../../src/main/js/apps/create/project/BitbucketRepositories.tsx", "../../../src/main/js/apps/create/project/BitbucketSearchResults.tsx", "../../../src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx", "../../../src/main/js/apps/create/project/BitbucketProjectCreateRenderer.tsx", "../../../src/main/js/apps/create/project/constants.ts", "../../../src/main/js/apps/create/project/BitbucketProjectCreate.tsx", "../../../src/main/js/apps/create/project/CreateProjectModeSelection.tsx", "../../../src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx", "../../../src/main/js/apps/create/project/GitHubProjectCreate.tsx", "../../../src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx", "../../../src/main/js/apps/create/project/GitlabProjectCreateRenderer.tsx", "../../../src/main/js/apps/create/project/GitlabProjectCreate.tsx", "../../../src/main/js/components/common/ProjectKeyInput.tsx", "../../../src/main/js/helpers/projects.ts", "../../../src/main/js/apps/create/project/ManualProjectCreate.tsx", "../../../src/main/js/apps/create/project/CreateProjectPage.tsx", "../../../src/main/js/apps/projects/routes.ts", "../../../src/main/js/apps/projectsManagement/CreateProjectForm.tsx", "../../../src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx", "../../../src/main/js/apps/projectsManagement/Header.tsx", "../../../src/main/js/apps/projectsManagement/RestoreAccessModal.tsx", "../../../src/main/js/apps/projectsManagement/ProjectRowActions.tsx", "../../../src/main/js/apps/projectsManagement/ProjectRow.tsx", "../../../src/main/js/apps/projectsManagement/Projects.tsx", "../../../src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx", "../../../src/main/js/apps/projectsManagement/DeleteModal.tsx", "../../../src/main/js/apps/projectsManagement/Search.tsx", "../../../src/main/js/apps/projectsManagement/App.tsx", "../../../src/main/js/apps/projectsManagement/routes.ts", "../../../src/main/js/apps/quality-gates/utils.ts", "../../../src/main/js/apps/quality-gates/components/ConditionOperator.tsx", "../../../src/main/js/apps/quality-gates/components/MetricSelect.tsx", "../../../src/main/js/apps/quality-gates/components/ThresholdInput.tsx", "../../../src/main/js/apps/quality-gates/components/ConditionModal.tsx", "../../../src/main/js/apps/quality-gates/components/Condition.tsx", "../../../src/main/js/apps/quality-gates/components/Conditions.tsx", "../../../src/main/js/apps/quality-gates/components/Projects.tsx", "../../../src/main/js/types/quality-gates.ts", "../../../src/main/js/apps/quality-gates/components/PermissionItem.tsx", "../../../src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx", "../../../src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModal.tsx", "../../../src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx", "../../../src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx", "../../../src/main/js/apps/quality-gates/components/DetailsContent.tsx", "../../../src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx", "../../../src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx", "../../../src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx", "../../../src/main/js/apps/quality-gates/components/DetailsHeader.tsx", "../../../src/main/js/apps/quality-gates/components/Details.tsx", "../../../src/main/js/apps/quality-gates/components/List.tsx", "../../../src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx", "../../../src/main/js/apps/quality-gates/components/ListHeader.tsx", "../../../src/main/js/apps/quality-gates/components/App.tsx", "../../../src/main/js/apps/quality-gates/routes.ts", "../../../src/main/js/apps/quality-profiles/components/App.tsx", "../../../src/main/js/apps/quality-profiles/components/AppContainer.tsx", "../../../src/main/js/apps/quality-profiles/components/ProfileLink.tsx", "../../../src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx", "../../../src/main/js/apps/quality-profiles/home/EvolutionRules.tsx", "../../../src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx", "../../../src/main/js/apps/quality-profiles/home/Evolution.tsx", "../../../src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx", "../../../src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx", "../../../src/main/js/apps/quality-profiles/home/PageHeader.tsx", "../../../src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx", "../../../src/main/js/apps/quality-profiles/types.ts", "../../../src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx", "../../../src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx", "../../../src/main/js/apps/quality-profiles/components/ProfileActions.tsx", "../../../src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx", "../../../src/main/js/apps/quality-profiles/home/ProfilesList.tsx", "../../../src/main/js/apps/quality-profiles/home/HomeContainer.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileHeader.tsx", "../../../src/main/js/apps/quality-profiles/components/ProfileNotFound.tsx", "../../../src/main/js/apps/quality-profiles/components/ProfileContainer.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileExporters.tsx", "../../../src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx", "../../../src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileProjects.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileRulesRowTotal.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileRules.tsx", "../../../src/main/js/apps/quality-profiles/details/ProfileDetails.tsx", "../../../src/main/js/apps/quality-profiles/changelog/ParameterChange.tsx", "../../../src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx", "../../../src/main/js/apps/quality-profiles/changelog/ChangesList.tsx", "../../../src/main/js/apps/quality-profiles/changelog/Changelog.tsx", "../../../src/main/js/apps/quality-profiles/changelog/ChangelogEmpty.tsx", "../../../src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx", "../../../src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx", "../../../src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx", "../../../src/main/js/apps/quality-profiles/compare/ComparisonEmpty.tsx", "../../../src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx", "../../../src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx", "../../../src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx", "../../../src/main/js/apps/quality-profiles/routes.ts", "../../../src/main/js/components/controls/GlobalMessages.tsx", "../../../src/main/js/app/components/GlobalMessagesContainer.tsx", "../../../src/main/js/apps/sessions/components/LoginForm.tsx", "../../../src/main/js/components/controls/IdentityProviderLink.tsx", "../../../src/main/js/apps/sessions/components/OAuthProviders.tsx", "../../../src/main/js/apps/sessions/components/Login.tsx", "../../../src/main/js/apps/sessions/components/LoginContainer.tsx", "../../../src/main/js/app/components/RecentHistory.ts", "../../../src/main/js/apps/sessions/components/Logout.tsx", "../../../src/main/js/apps/sessions/components/Unauthorized.tsx", "../../../src/main/js/apps/sessions/routes.ts", "../../../src/main/js/apps/settings/components/DefinitionActions.tsx", "../../../src/main/js/components/icons/LockIcon.tsx", "../../../src/main/js/apps/settings/components/inputs/InputForSecured.tsx", "../../../src/main/js/apps/settings/components/inputs/InputForBoolean.tsx", "../../../src/main/js/apps/settings/components/inputs/InputForJSON.tsx", "../../../src/main/js/apps/settings/components/inputs/SimpleInput.tsx", "../../../src/main/js/apps/settings/components/inputs/InputForNumber.tsx", "../../../src/main/js/apps/settings/components/inputs/InputForPassword.tsx", "../../../src/main/js/apps/settings/components/inputs/InputForSingleSelectList.tsx", "../../../src/main/js/apps/settings/components/inputs/InputForString.tsx", "../../../src/main/js/apps/settings/components/inputs/InputForText.tsx", "../../../src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx", "../../../src/main/js/apps/settings/components/inputs/MultiValueInput.tsx", "../../../src/main/js/apps/settings/components/inputs/PropertySetInput.tsx", "../../../src/main/js/apps/settings/components/inputs/Input.tsx", "../../../src/main/js/apps/settings/components/Definition.tsx", "../../../src/main/js/apps/settings/components/DefinitionsList.tsx", "../../../src/main/js/apps/settings/components/EmailForm.tsx", "../../../src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx", "../../../src/main/js/apps/settings/components/CategoryDefinitionsList.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx", "../../../src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AlmTab.tsx", "../../../src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx", "../../../src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx", "../../../src/main/js/apps/settings/components/AnalysisScope.tsx", "../../../src/main/js/apps/settings/components/CategoryOverrides.ts", "../../../src/main/js/apps/settings/components/Languages.tsx", "../../../src/main/js/apps/settings/components/NewCodePeriod.tsx", "../../../src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx", "../../../src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx", "../../../src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx", "../../../src/main/js/apps/settings/components/AdditionalCategories.tsx", "../../../src/main/js/apps/settings/components/AllCategoriesList.tsx", "../../../src/main/js/apps/settings/components/SettingsSearchRenderer.tsx", "../../../src/main/js/apps/settings/components/SettingsSearch.tsx", "../../../src/main/js/apps/settings/components/PageHeader.tsx", "../../../src/main/js/apps/settings/components/SettingsApp.tsx", "../../../src/main/js/apps/settings/encryption/EncryptionForm.tsx", "../../../src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx", "../../../src/main/js/apps/settings/encryption/EncryptionApp.tsx", "../../../src/main/js/apps/settings/routes.ts", "../../../src/main/js/components/upgrade/SystemUpgradeIntermediate.tsx", "../../../src/main/js/components/upgrade/SystemUpgradeItem.tsx", "../../../src/main/js/components/upgrade/utils.ts", "../../../src/main/js/components/upgrade/SystemUpgradeForm.tsx", "../../../src/main/js/components/upgrade/SystemUpgradeButton.tsx", "../../../src/main/js/app/components/update-notification/UpdateNotification.tsx", "../../../src/main/js/apps/system/utils.ts", "../../../src/main/js/components/common/StatusIndicator.tsx", "../../../src/main/js/apps/system/components/info-items/HealthCauseItem.tsx", "../../../src/main/js/apps/system/components/info-items/HealthItem.tsx", "../../../src/main/js/apps/system/components/info-items/SysInfoItem.tsx", "../../../src/main/js/apps/system/components/info-items/Section.tsx", "../../../src/main/js/apps/system/components/info-items/HealthCard.tsx", "../../../src/main/js/apps/system/components/ClusterSysInfos.tsx", "../../../src/main/js/components/common/RestartButton.tsx", "../../../src/main/js/apps/system/components/ChangeLogLevelForm.tsx", "../../../src/main/js/apps/system/components/PageActions.tsx", "../../../src/main/js/apps/system/components/PageHeader.tsx", "../../../src/main/js/apps/system/components/StandaloneSysInfos.tsx", "../../../src/main/js/apps/system/components/App.tsx", "../../../src/main/js/apps/system/routes.ts", "../../../src/main/js/apps/tutorials/components/TutorialsApp.tsx", "../../../src/main/js/apps/tutorials/routes.ts", "../../../src/main/js/apps/users/components/UserScmAccountInput.tsx", "../../../src/main/js/apps/users/components/UserForm.tsx", "../../../src/main/js/apps/users/Header.tsx", "../../../src/main/js/apps/users/Search.tsx", "../../../src/main/js/apps/users/components/TokensFormModal.tsx", "../../../src/main/js/apps/users/components/DeactivateForm.tsx", "../../../src/main/js/apps/users/components/PasswordForm.tsx", "../../../src/main/js/apps/users/components/UserActions.tsx", "../../../src/main/js/apps/users/components/GroupsForm.tsx", "../../../src/main/js/apps/users/components/UserGroups.tsx", "../../../src/main/js/apps/users/components/UserListItemIdentity.tsx", "../../../src/main/js/apps/users/components/UserScmAccounts.tsx", "../../../src/main/js/apps/users/components/UserListItem.tsx", "../../../src/main/js/apps/users/UsersList.tsx", "../../../src/main/js/apps/users/utils.ts", "../../../src/main/js/apps/users/UsersApp.tsx", "../../../src/main/js/apps/users/routes.ts", "../../../src/main/js/api/web-api.ts", "../../../src/main/js/apps/web-api/utils.ts", "../../../src/main/js/apps/web-api/components/ActionChangelog.tsx", "../../../src/main/js/apps/web-api/components/DeprecatedBadge.tsx", "../../../src/main/js/apps/web-api/components/InternalBadge.tsx", "../../../src/main/js/apps/web-api/components/Params.tsx", "../../../src/main/js/apps/web-api/components/ResponseExample.tsx", "../../../src/main/js/apps/web-api/components/Action.tsx", "../../../src/main/js/apps/web-api/components/Domain.tsx", "../../../src/main/js/apps/web-api/components/Menu.tsx", "../../../src/main/js/apps/web-api/components/Search.tsx", "../../../src/main/js/apps/web-api/components/WebApiApp.tsx", "../../../src/main/js/apps/web-api/routes.ts", "../../../src/main/js/api/webhooks.ts", "../../../src/main/js/components/controls/ModalValidationField.tsx", "../../../src/main/js/components/controls/InputValidationField.tsx", "../../../node_modules/tslib/tslib.js", "../../../node_modules/tslib/modules/index.js", "../../../node_modules/formik/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js", "../../../node_modules/gud/index.js", "../../../node_modules/fbjs/lib/emptyFunction.js", "../../../node_modules/fbjs/lib/warning.js", "../../../node_modules/create-react-context/lib/implementation.js", "../../../node_modules/create-react-context/lib/index.js", "../../../node_modules/lodash.clonedeep/index.js", "../../../node_modules/lodash.topath/index.js", "../../../node_modules/react-fast-compare/index.js", "../../../node_modules/formik/node_modules/deepmerge/dist/es.js", "../../../node_modules/formik/src/connect.tsx", "../../../node_modules/formik/src/utils.ts", "../../../node_modules/formik/src/Formik.tsx", "../../../node_modules/formik/src/Field.tsx", "../../../node_modules/formik/src/Form.tsx", "../../../node_modules/formik/src/withFormik.tsx", "../../../node_modules/formik/src/FieldArray.tsx", "../../../node_modules/formik/src/FastField.tsx", "../../../src/main/js/components/controls/ValidationForm.tsx", "../../../src/main/js/components/controls/ValidationModal.tsx", "../../../src/main/js/apps/webhooks/components/CreateWebhookForm.tsx", "../../../src/main/js/apps/webhooks/components/PageActions.tsx", "../../../src/main/js/apps/webhooks/components/PageHeader.tsx", "../../../src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx", "../../../src/main/js/apps/webhooks/components/DeliveryItem.tsx", "../../../src/main/js/apps/webhooks/components/DeliveryAccordion.tsx", "../../../src/main/js/apps/webhooks/components/DeliveriesForm.tsx", "../../../src/main/js/apps/webhooks/components/WebhookActions.tsx", "../../../src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx", "../../../src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx", "../../../src/main/js/apps/webhooks/components/WebhookItem.tsx", "../../../src/main/js/apps/webhooks/components/WebhooksList.tsx", "../../../src/main/js/apps/webhooks/components/App.tsx", "../../../src/main/js/apps/webhooks/routes.ts", "../../../src/main/js/app/components/indexation/IndexationContext.ts", "../../../src/main/js/components/hoc/withIndexationContext.tsx", "../../../src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx", "../../../src/main/js/components/hoc/withIndexationGuard.tsx", "../../../src/main/js/app/components/KeyboardShortcutsModal.tsx", "../../../src/main/js/helpers/analytics.js", "../../../src/main/js/app/components/extensions/exposeLibraries.ts", "../../../src/main/js/helpers/extensions.ts", "../../../src/main/js/app/components/PageTracker.tsx", "../../../src/main/js/app/components/App.tsx", "../../../src/main/js/components/workspace/WorkspacePortal.tsx", "../../../src/main/js/components/workspace/WorkspaceComponentTitle.tsx", "../../../src/main/js/components/workspace/WorkspaceNavItem.tsx", "../../../src/main/js/components/workspace/WorkspaceNavComponent.tsx", "../../../src/main/js/components/icons/LightBulbIcon.tsx", "../../../src/main/js/components/workspace/WorkspaceRuleTitle.tsx", "../../../src/main/js/components/workspace/WorkspaceNavRule.tsx", "../../../src/main/js/components/workspace/WorkspaceNav.tsx", "../../../src/main/js/components/icons/CollapseIcon.tsx", "../../../src/main/js/components/icons/ExpandIcon.tsx", "../../../src/main/js/components/icons/MinimizeIcon.tsx", "../../../src/main/js/components/workspace/WorkspaceHeader.tsx", "../../../src/main/js/components/workspace/WorkspaceRuleDetails.tsx", "../../../src/main/js/components/workspace/WorkspaceRuleViewer.tsx", "../../../src/main/js/components/workspace/WorkspaceComponentViewer.tsx", "../../../src/main/js/components/workspace/Workspace.tsx", "../../../src/main/js/app/components/a11y/A11yProvider.tsx", "../../../src/main/js/app/components/a11y/A11ySkipLinks.tsx", "../../../src/main/js/app/components/embed-docs-modal/SuggestionsProvider.tsx", "../../../src/main/js/app/components/indexation/IndexationNotificationHelper.ts", "../../../src/main/js/app/components/indexation/IndexationContextProvider.tsx", "../../../src/main/js/types/indexation.ts", "../../../src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx", "../../../src/main/js/app/components/indexation/IndexationNotification.tsx", "../../../src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx", "../../../src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx", "../../../src/main/js/components/icons/ClockIcon.tsx", "../../../src/main/js/app/components/search/utils.ts", "../../../src/main/js/app/components/search/SearchShowMore.tsx", "../../../src/main/js/app/components/search/SearchResults.tsx", "../../../src/main/js/app/components/search/SearchResult.tsx", "../../../src/main/js/app/components/search/Search.tsx", "../../../src/main/js/app/components/nav/global/GlobalNavBranding.tsx", "../../../src/main/js/app/components/nav/global/GlobalNavMenu.tsx", "../../../src/main/js/app/components/nav/global/GlobalNavUser.tsx", "../../../src/main/js/app/components/nav/global/GlobalNav.tsx", "../../../src/main/js/app/components/promotion-notification/PromotionNotification.tsx", "../../../src/main/js/api/marketplace.ts", "../../../src/main/js/apps/marketplace/components/LicensePromptModal.tsx", "../../../src/main/js/app/components/StartupModal.tsx", "../../../src/main/js/app/components/GlobalContainer.tsx", "../../../src/main/js/app/components/MigrationContainer.tsx", "../../../src/main/js/app/components/ComponentContainerNotFound.tsx", "../../../src/main/js/components/ui/ContextNavBar.tsx", "../../../src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx", "../../../src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx", "../../../src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx", "../../../src/main/js/app/components/nav/component/branch-like/CurrentBranchLike.tsx", "../../../src/main/js/app/components/nav/component/branch-like/MenuItem.tsx", "../../../src/main/js/app/components/nav/component/branch-like/MenuItemList.tsx", "../../../src/main/js/app/components/nav/component/branch-like/Menu.tsx", "../../../src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx", "../../../src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx", "../../../src/main/js/app/components/nav/component/Breadcrumb.tsx", "../../../src/main/js/app/components/nav/component/Header.tsx", "../../../src/main/js/app/components/nav/component/ComponentNavWarnings.tsx", "../../../src/main/js/app/components/nav/component/HeaderMeta.tsx", "../../../src/main/js/app/components/nav/component/Menu.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/InfoDrawer.tsx", "../../../src/main/js/api/project-badges.ts", "../../../src/main/js/app/components/nav/component/projectInformation/badges/utils.ts", "../../../src/main/js/app/components/nav/component/projectInformation/badges/BadgeButton.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/badges/BadgeParams.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/InfoDrawerPage.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/ProjectInformationPages.ts", "../../../src/main/js/app/components/nav/component/projectInformation/DrawerLink.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx", "../../../src/main/js/api/projectLinks.ts", "../../../src/main/js/app/components/nav/component/projectInformation/meta/MetaLinks.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityGate.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityProfiles.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/meta/MetaTagsSelector.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/ProjectInformationRenderer.tsx", "../../../src/main/js/app/components/nav/component/projectInformation/ProjectInformation.tsx", "../../../src/main/js/app/components/nav/component/ComponentNav.tsx", "../../../src/main/js/app/components/ComponentContainer.tsx", "../../../src/main/js/app/components/extensions/Extension.tsx", "../../../src/main/js/app/components/extensions/ProjectPageExtension.tsx", "../../../src/main/js/api/security-hotspots.ts", "../../../src/main/js/types/security-hotspots.ts", "../../../src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx", "../../../src/main/js/apps/security-hotspots/components/FilterBar.tsx", "../../../src/main/js/apps/security-hotspots/utils.ts", "../../../src/main/js/components/icons/ChevronUpIcon.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotListItem.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotCategory.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotList.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx", "../../../src/main/js/apps/security-hotspots/components/assignee/AssigneeSelectionRenderer.tsx", "../../../src/main/js/apps/security-hotspots/components/assignee/AssigneeSelection.tsx", "../../../src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx", "../../../src/main/js/apps/security-hotspots/components/assignee/Assignee.tsx", "../../../src/main/js/app/utils/addGlobalErrorMessage.ts", "../../../src/main/js/helpers/sonarlint.ts", "../../../src/main/js/apps/security-hotspots/components/HotspotOpenInIdeOverlay.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotCommentPopup.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx", "../../../src/main/js/apps/security-hotspots/components/status/StatusDescription.tsx", "../../../src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx", "../../../src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx", "../../../src/main/js/apps/security-hotspots/components/status/Status.tsx", "../../../src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotViewerRenderer.tsx", "../../../src/main/js/apps/security-hotspots/components/HotspotViewer.tsx", "../../../src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx", "../../../src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx", "../../../src/main/js/app/components/ProjectAdminContainer.tsx", "../../../src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx", "../../../src/main/js/apps/projectDeletion/Form.tsx", "../../../src/main/js/apps/projectDeletion/Header.tsx", "../../../src/main/js/apps/projectDeletion/App.tsx", "../../../src/main/js/apps/projectLinks/CreationModal.tsx", "../../../src/main/js/apps/projectLinks/Header.tsx", "../../../src/main/js/apps/projectLinks/LinkRow.tsx", "../../../src/main/js/apps/projectLinks/Table.tsx", "../../../src/main/js/apps/projectLinks/App.tsx", "../../../src/main/js/apps/projectKey/UpdateForm.tsx", "../../../src/main/js/apps/projectKey/Key.tsx", "../../../src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx", "../../../src/main/js/app/components/nav/settings/SystemRestartNotif.tsx", "../../../src/main/js/app/components/nav/settings/SettingsNav.tsx", "../../../src/main/js/app/components/AdminContainer.tsx", "../../../src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx", "../../../src/main/js/app/components/FormattingHelp.tsx", "../../../src/main/js/app/components/SimpleSessionsContainer.tsx", "../../../src/main/js/app/components/Landing.tsx", "../../../src/main/js/app/components/extensions/GlobalPageExtension.tsx", "../../../src/main/js/app/components/extensions/PortfoliosPage.tsx", "../../../src/main/js/app/components/ResetPassword.tsx", "../../../src/main/js/apps/change-admin-password/constants.ts", "../../../src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx", "../../../src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx", "../../../src/main/js/app/components/PluginRiskConsent.tsx", "../../../src/main/js/app/utils/startReactApp.tsx", "../../../src/main/js/app/index.ts", "../../../src/main/js/app/styles/sonar.ts"],
4  "sourcesContent": ["/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function dummy_process_cwd() {\n  return '';\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { EnhancedWindow } from '../types/browser';\n\nexport const IS_SSR = typeof window === 'undefined';\n\nexport function getEnhancedWindow() {\n  return (window as unknown) as EnhancedWindow;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n// Do not import dependencies in this helper, to keep initial bundle load as small as possible\n\nimport { ExtensionStartMethod } from '../types/extension';\nimport { getEnhancedWindow } from './browser';\n\nconst WEB_ANALYTICS_EXTENSION = 'sq-web-analytics';\n\nconst extensions: T.Dict<ExtensionStartMethod> = {};\n\nfunction registerExtension(key: string, start: ExtensionStartMethod) {\n  extensions[key] = start;\n}\n\nfunction setWebAnalyticsPageChangeHandler(pageHandler: (pathname: string) => void) {\n  registerExtension(WEB_ANALYTICS_EXTENSION, pageHandler);\n}\n\nexport function installExtensionsHandler() {\n  getEnhancedWindow().registerExtension = registerExtension;\n}\n\nexport function installWebAnalyticsHandler() {\n  getEnhancedWindow().setWebAnalyticsPageChangeHandler = setWebAnalyticsPageChangeHandler;\n}\n\nexport function getExtensionFromCache(key: string): Function | undefined {\n  return extensions[key];\n}\n\nexport function getWebAnalyticsPageHandlerFromCache(): Function | undefined {\n  return extensions[WEB_ANALYTICS_EXTENSION];\n}\n", "/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.17.21';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function',\n      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading whitespace. */\n  var reTrimStart = /^\\s+/;\n\n  /** Used to match a single whitespace character. */\n  var reWhitespace = /\\s/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /**\n   * Used to validate the `validate` option in `_.template` variable.\n   *\n   * Forbids characters which could potentially change the meaning of the function argument definition:\n   * - \"(),\" (modification of function parameters)\n   * - \"=\" (default value)\n   * - \"[]{}\" (destructuring of function parameters)\n   * - \"/\" (beginning of a comment)\n   * - whitespace\n   */\n  var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.trim`.\n   *\n   * @private\n   * @param {string} string The string to trim.\n   * @returns {string} Returns the trimmed string.\n   */\n  function baseTrim(string) {\n    return string\n      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n      : string;\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n   * character of `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the index of the last non-whitespace character.\n   */\n  function trimmedEndIndex(string) {\n    var index = string.length;\n\n    while (index-- && reWhitespace.test(string.charAt(index))) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {number} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      if (iteratees.length) {\n        iteratees = arrayMap(iteratees, function(iteratee) {\n          if (isArray(iteratee)) {\n            return function(value) {\n              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n            }\n          }\n          return iteratee;\n        });\n      } else {\n        iteratees = [identity];\n      }\n\n      var index = -1;\n      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n          return object;\n        }\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      var low = 0,\n          high = array == null ? 0 : array.length;\n      if (high === 0) {\n        return 0;\n      }\n\n      value = iteratee(value);\n      var valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      return object == null || delete object[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Check that cyclic values are equal.\n      var arrStacked = stack.get(array);\n      var othStacked = stack.get(other);\n      if (arrStacked && othStacked) {\n        return arrStacked == other && othStacked == array;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Check that cyclic values are equal.\n      var objStacked = stack.get(object);\n      var othStacked = stack.get(other);\n      if (objStacked && othStacked) {\n        return objStacked == other && othStacked == object;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of elements split into groups the length of `size`.\n     * If `array` can't be split evenly, the final chunk will be the remaining\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        result[pair[0]] = pair[1];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     *\n     * // Combining several predicates using `_.overEvery` or `_.overSome`.\n     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n     * // => objects for ['fred', 'barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 30 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = baseTrim(value);\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('d\u00E9j\u00E0 vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n      // and escape the comment, thus injecting code that gets evaled.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/\\s/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Throw an error if a forbidden character was found in `variable`, to prevent\n      // potential command injection attacks.\n      else if (reForbiddenIdentifierChars.test(variable)) {\n        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n      }\n\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return baseTrim(string);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.slice(0, trimmedEndIndex(string) + 1);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     *\n     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    define(function() {\n      return _;\n    });\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else if (freeModule) {\n    // Export for Node.js.\n    (freeModule.exports = _)._ = _;\n    // Export for CommonJS support.\n    freeExports._ = _;\n  }\n  else {\n    // Export to the global object.\n    root._ = _;\n  }\n}.call(this));\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (Array.isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return Object.keys(obj).map(function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (Array.isArray(obj[k])) {\n        return obj[k].map(function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).filter(Boolean).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n", "'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { memoize } from 'lodash';\n\nconst parseCookies = memoize(\n  (documentCookie: string): T.Dict<string> => {\n    const rawCookies = documentCookie.split('; ');\n    const cookies: T.Dict<string> = {};\n    rawCookies.forEach(candidate => {\n      const [key, value] = candidate.split('=');\n      cookies[key] = value;\n    });\n    return cookies;\n  }\n);\n\nexport function getCookie(name: string): string | undefined {\n  return parseCookies(document.cookie)[name];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport interface SystemUpgradeDownloadUrls {\n  downloadDatacenterUrl?: string;\n  downloadDeveloperUrl?: string;\n  downloadEnterpriseUrl?: string;\n  downloadUrl: string;\n}\n\nexport interface SystemUpgrade extends SystemUpgradeDownloadUrls {\n  changeLogUrl?: string;\n  description?: string;\n  releaseDate?: string;\n  version: string;\n}\n\nexport enum InstanceType {\n  SonarQube = 'SonarQube',\n  SonarCloud = 'SonarCloud'\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { InstanceType } from '../types/system';\nimport { getEnhancedWindow } from './browser';\n\nexport function getBaseUrl() {\n  return getEnhancedWindow().baseUrl;\n}\n\nexport function getSystemStatus() {\n  return getEnhancedWindow().serverStatus;\n}\n\nexport function getInstance() {\n  return getEnhancedWindow().instance;\n}\n\nexport function isOfficial() {\n  return getEnhancedWindow().official;\n}\n\nexport function isSonarCloud() {\n  return getInstance() === InstanceType.SonarCloud;\n}\n\nexport function getReactDomContainerSelector() {\n  return '#content';\n}\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n", "/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n        '`warning(condition, format, ...args)` requires a warning ' +\n        'message argument'\n      );\n    }\n\n    if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n      throw new Error(\n        'The warning format should be able to uniquely identify this ' +\n        'warning. Please, use a more descriptive format than: ' + format\n      );\n    }\n\n    if (!condition) {\n      var argIndex = 0;\n      var message = 'Warning: ' +\n        format.replace(/%s/g, function() {\n          return args[argIndex++];\n        });\n      if (typeof console !== 'undefined') {\n        console.error(message);\n      }\n      try {\n        // This error was thrown as a convenience so that you can use this stack\n        // to find the callsite that caused this warning to fire.\n        throw new Error(message);\n      } catch(x) {}\n    }\n  };\n}\n\nmodule.exports = warning;\n", "'use strict';\n\nexports.__esModule = true;\nexports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) {\n  var _parsePath = parsePath(path),\n      pathname = _parsePath.pathname,\n      search = _parsePath.search,\n      hash = _parsePath.hash;\n\n  return createPath({\n    pathname: pathname,\n    search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value,\n    hash: hash\n  });\n};\n\nvar stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) {\n  var _parsePath2 = parsePath(path),\n      pathname = _parsePath2.pathname,\n      search = _parsePath2.search,\n      hash = _parsePath2.hash;\n\n  return createPath({\n    pathname: pathname,\n    search: search.replace(new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), function (match, prefix, suffix) {\n      return prefix === '?' ? prefix : suffix;\n    }),\n    hash: hash\n  });\n};\n\nvar getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) {\n  var _parsePath3 = parsePath(path),\n      search = _parsePath3.search;\n\n  var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)'));\n  return match && match[1];\n};\n\nvar extractPath = function extractPath(string) {\n  var match = string.match(/^(https?:)?\\/\\/[^\\/]*/);\n  return match == null ? string : string.substring(match[0].length);\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n  var pathname = extractPath(path);\n  var search = '';\n  var hash = '';\n\n  process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(path === pathname, 'A path must be pathname + search + hash only, not a full URL like \"%s\"', path) : void 0;\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substring(hashIndex);\n    pathname = pathname.substring(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substring(searchIndex);\n    pathname = pathname.substring(0, searchIndex);\n  }\n\n  if (pathname === '') pathname = '/';\n\n  return {\n    pathname: pathname,\n    search: search,\n    hash: hash\n  };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n  if (location == null || typeof location === 'string') return location;\n\n  var basename = location.basename,\n      pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n  var path = (basename || '') + pathname;\n\n  if (search && search !== '?') path += search;\n\n  if (hash) path += hash;\n\n  return path;\n};", "'use strict';\n\nexports.__esModule = true;\n/**\n * Indicates that navigation was caused by a call to history.push.\n */\nvar PUSH = exports.PUSH = 'PUSH';\n\n/**\n * Indicates that navigation was caused by a call to history.replace.\n */\nvar REPLACE = exports.REPLACE = 'REPLACE';\n\n/**\n * Indicates that navigation was caused by some other action such\n * as using a browser's back/forward buttons and/or manually manipulating\n * the URL in a browser's location bar. This is the default.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate\n * for more information.\n */\nvar POP = exports.POP = 'POP';", "'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.statesAreEqual = exports.createLocation = exports.createQuery = undefined;\n\nvar _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; };\n\nvar _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; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _PathUtils = require('./PathUtils');\n\nvar _Actions = require('./Actions');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createQuery = exports.createQuery = function createQuery(props) {\n  return _extends(Object.create(null), props);\n};\n\nvar createLocation = exports.createLocation = function createLocation() {\n  var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/';\n  var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP;\n  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n  var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input;\n\n  process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(!object.path, 'Location descriptor objects should have a `pathname`, not a `path`.') : void 0;\n\n  var pathname = object.pathname || '/';\n  var search = object.search || '';\n  var hash = object.hash || '';\n  var state = object.state;\n\n  return {\n    pathname: pathname,\n    search: search,\n    hash: hash,\n    state: state,\n    action: action,\n    key: key\n  };\n};\n\nvar isDate = function isDate(object) {\n  return Object.prototype.toString.call(object) === '[object Date]';\n};\n\nvar statesAreEqual = exports.statesAreEqual = function statesAreEqual(a, b) {\n  if (a === b) return true;\n\n  var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n  var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n  if (typeofA !== typeofB) return false;\n\n  !(typeofA !== 'function') ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'You must not store functions in location state') : (0, _invariant2.default)(false) : void 0;\n\n  // Not the same object, but same type.\n  if (typeofA === 'object') {\n    !!(isDate(a) && isDate(b)) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') : (0, _invariant2.default)(false) : void 0;\n\n    if (!Array.isArray(a)) {\n      var keysofA = Object.keys(a);\n      var keysofB = Object.keys(b);\n      return keysofA.length === keysofB.length && keysofA.every(function (key) {\n        return statesAreEqual(a[key], b[key]);\n      });\n    }\n\n    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n      return statesAreEqual(item, b[index]);\n    });\n  }\n\n  // All other serializable types (string, number, boolean)\n  // should be strict equal.\n  return false;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.key === b.key &&\n  // a.action === b.action && // Different action !== location change.\n  a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && statesAreEqual(a.state, b.state);\n};", "'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);", "'use strict';\n\nexports.__esModule = true;\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopstateOnHashchange = exports.supportsPopstateOnHashchange = function supportsPopstateOnHashchange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};", "'use strict';\n\nexports.__esModule = true;\nexports.readState = exports.saveState = undefined;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar QuotaExceededErrors = {\n  QuotaExceededError: true,\n  QUOTA_EXCEEDED_ERR: true\n};\n\nvar SecurityErrors = {\n  SecurityError: true\n};\n\nvar KeyPrefix = '@@History/';\n\nvar createKey = function createKey(key) {\n  return KeyPrefix + key;\n};\n\nvar saveState = exports.saveState = function saveState(key, state) {\n  if (!window.sessionStorage) {\n    // Session storage is not available or hidden.\n    // sessionStorage is undefined in Internet Explorer when served via file protocol.\n    process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') : void 0;\n\n    return;\n  }\n\n  try {\n    if (state == null) {\n      window.sessionStorage.removeItem(createKey(key));\n    } else {\n      window.sessionStorage.setItem(createKey(key), JSON.stringify(state));\n    }\n  } catch (error) {\n    if (SecurityErrors[error.name]) {\n      // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any\n      // attempt to access window.sessionStorage.\n      process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available due to security settings') : void 0;\n\n      return;\n    }\n\n    if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) {\n      // Safari \"private mode\" throws QuotaExceededError.\n      process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : void 0;\n\n      return;\n    }\n\n    throw error;\n  }\n};\n\nvar readState = exports.readState = function readState(key) {\n  var json = void 0;\n  try {\n    json = window.sessionStorage.getItem(createKey(key));\n  } catch (error) {\n    if (SecurityErrors[error.name]) {\n      // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any\n      // attempt to access window.sessionStorage.\n      process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, '[history] Unable to read state; sessionStorage is not available due to security settings') : void 0;\n\n      return undefined;\n    }\n  }\n\n  if (json) {\n    try {\n      return JSON.parse(json);\n    } catch (error) {\n      // Ignore invalid JSON.\n    }\n  }\n\n  return undefined;\n};", "'use strict';\n\nexports.__esModule = true;\nexports.go = exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getUserConfirmation = exports.getCurrentLocation = undefined;\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _DOMStateStorage = require('./DOMStateStorage');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar needsHashchangeListener = _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)();\n\nvar _createLocation = function _createLocation(historyState) {\n  var key = historyState && historyState.key;\n\n  return (0, _LocationUtils.createLocation)({\n    pathname: window.location.pathname,\n    search: window.location.search,\n    hash: window.location.hash,\n    state: key ? (0, _DOMStateStorage.readState)(key) : undefined\n  }, undefined, key);\n};\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {\n  var historyState = void 0;\n  try {\n    historyState = window.history.state || {};\n  } catch (error) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    historyState = {};\n  }\n\n  return _createLocation(historyState);\n};\n\nvar getUserConfirmation = exports.getUserConfirmation = function getUserConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\nvar startListener = exports.startListener = function startListener(listener) {\n  var handlePopState = function handlePopState(event) {\n    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) // Ignore extraneous popstate events in WebKit\n      return;\n    listener(_createLocation(event.state));\n  };\n\n  (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n  var handleUnpoppedHashChange = function handleUnpoppedHashChange() {\n    return listener(getCurrentLocation());\n  };\n\n  if (needsHashchangeListener) {\n    (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange);\n  }\n\n  return function () {\n    (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n    if (needsHashchangeListener) {\n      (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange);\n    }\n  };\n};\n\nvar updateLocation = function updateLocation(location, updateState) {\n  var state = location.state,\n      key = location.key;\n\n\n  if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state);\n\n  updateState({ key: key }, (0, _PathUtils.createPath)(location));\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location) {\n  return updateLocation(location, function (state, path) {\n    return window.history.pushState(state, null, path);\n  });\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location) {\n  return updateLocation(location, function (state, path) {\n    return window.history.replaceState(state, null, path);\n  });\n};\n\nvar go = exports.go = function go(n) {\n  if (n) window.history.go(n);\n};", "'use strict';\n\nexports.__esModule = true;\nexports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;\n\nvar _BrowserProtocol = require('./BrowserProtocol');\n\nObject.defineProperty(exports, 'getUserConfirmation', {\n  enumerable: true,\n  get: function get() {\n    return _BrowserProtocol.getUserConfirmation;\n  }\n});\nObject.defineProperty(exports, 'go', {\n  enumerable: true,\n  get: function get() {\n    return _BrowserProtocol.go;\n  }\n});\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {\n  return (0, _LocationUtils.createLocation)(window.location);\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location) {\n  window.location.href = (0, _PathUtils.createPath)(location);\n  return false; // Don't update location\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location) {\n  window.location.replace((0, _PathUtils.createPath)(location));\n  return false; // Don't update location\n};", "\"use strict\";\n\nexports.__esModule = true;\nvar loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) {\n  var currentTurn = 0,\n      isDone = false;\n  var isSync = false,\n      hasNext = false,\n      doneArgs = void 0;\n\n  var done = function done() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    isDone = true;\n\n    if (isSync) {\n      // Iterate instead of recursing if possible.\n      doneArgs = args;\n      return;\n    }\n\n    callback.apply(undefined, args);\n  };\n\n  var next = function next() {\n    if (isDone) return;\n\n    hasNext = true;\n\n    if (isSync) return; // Iterate instead of recursing if possible.\n\n    isSync = true;\n\n    while (!isDone && currentTurn < turns && hasNext) {\n      hasNext = false;\n      work(currentTurn++, next, done);\n    }\n\n    isSync = false;\n\n    if (isDone) {\n      // This means the loop finished synchronously.\n      callback.apply(undefined, doneArgs);\n      return;\n    }\n\n    if (currentTurn >= turns && hasNext) {\n      isDone = true;\n      callback();\n    }\n  };\n\n  next();\n};", "'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar runTransitionHook = function runTransitionHook(hook, location, callback) {\n  var result = hook(location, callback);\n\n  if (hook.length < 2) {\n    // Assume the hook runs synchronously and automatically\n    // call the callback with the return value.\n    callback(result);\n  } else {\n    process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(result === undefined, 'You should not \"return\" in a transition hook with a callback argument; ' + 'call the callback instead') : void 0;\n  }\n};\n\nexports.default = runTransitionHook;", "'use strict';\n\nexports.__esModule = true;\n\nvar _AsyncUtils = require('./AsyncUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _runTransitionHook = require('./runTransitionHook');\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _Actions = require('./Actions');\n\nvar _LocationUtils = require('./LocationUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createHistory = function createHistory() {\n  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var getCurrentLocation = options.getCurrentLocation,\n      getUserConfirmation = options.getUserConfirmation,\n      pushLocation = options.pushLocation,\n      replaceLocation = options.replaceLocation,\n      go = options.go,\n      keyLength = options.keyLength;\n\n\n  var currentLocation = void 0;\n  var pendingLocation = void 0;\n  var beforeListeners = [];\n  var listeners = [];\n  var allKeys = [];\n\n  var getCurrentIndex = function getCurrentIndex() {\n    if (pendingLocation && pendingLocation.action === _Actions.POP) return allKeys.indexOf(pendingLocation.key);\n\n    if (currentLocation) return allKeys.indexOf(currentLocation.key);\n\n    return -1;\n  };\n\n  var updateLocation = function updateLocation(nextLocation) {\n    var currentIndex = getCurrentIndex();\n\n    currentLocation = nextLocation;\n\n    if (currentLocation.action === _Actions.PUSH) {\n      allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]);\n    } else if (currentLocation.action === _Actions.REPLACE) {\n      allKeys[currentIndex] = currentLocation.key;\n    }\n\n    listeners.forEach(function (listener) {\n      return listener(currentLocation);\n    });\n  };\n\n  var listenBefore = function listenBefore(listener) {\n    beforeListeners.push(listener);\n\n    return function () {\n      return beforeListeners = beforeListeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var listen = function listen(listener) {\n    listeners.push(listener);\n\n    return function () {\n      return listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, callback) {\n    (0, _AsyncUtils.loopAsync)(beforeListeners.length, function (index, next, done) {\n      (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) {\n        return result != null ? done(result) : next();\n      });\n    }, function (message) {\n      if (getUserConfirmation && typeof message === 'string') {\n        getUserConfirmation(message, function (ok) {\n          return callback(ok !== false);\n        });\n      } else {\n        callback(message !== false);\n      }\n    });\n  };\n\n  var transitionTo = function transitionTo(nextLocation) {\n    if (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation) || pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) return; // Nothing to do\n\n    pendingLocation = nextLocation;\n\n    confirmTransitionTo(nextLocation, function (ok) {\n      if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation\n\n      pendingLocation = null;\n\n      if (ok) {\n        // Treat PUSH to same path like REPLACE to be consistent with browsers\n        if (nextLocation.action === _Actions.PUSH) {\n          var prevPath = (0, _PathUtils.createPath)(currentLocation);\n          var nextPath = (0, _PathUtils.createPath)(nextLocation);\n\n          if (nextPath === prevPath && (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE;\n        }\n\n        if (nextLocation.action === _Actions.POP) {\n          updateLocation(nextLocation);\n        } else if (nextLocation.action === _Actions.PUSH) {\n          if (pushLocation(nextLocation) !== false) updateLocation(nextLocation);\n        } else if (nextLocation.action === _Actions.REPLACE) {\n          if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation);\n        }\n      } else if (currentLocation && nextLocation.action === _Actions.POP) {\n        var prevIndex = allKeys.indexOf(currentLocation.key);\n        var nextIndex = allKeys.indexOf(nextLocation.key);\n\n        if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL\n      }\n    });\n  };\n\n  var push = function push(input) {\n    return transitionTo(createLocation(input, _Actions.PUSH));\n  };\n\n  var replace = function replace(input) {\n    return transitionTo(createLocation(input, _Actions.REPLACE));\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength || 6);\n  };\n\n  var createHref = function createHref(location) {\n    return (0, _PathUtils.createPath)(location);\n  };\n\n  var createLocation = function createLocation(location, action) {\n    var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey();\n    return (0, _LocationUtils.createLocation)(location, action, key);\n  };\n\n  return {\n    getCurrentLocation: getCurrentLocation,\n    listenBefore: listenBefore,\n    listen: listen,\n    transitionTo: transitionTo,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    createKey: createKey,\n    createPath: _PathUtils.createPath,\n    createHref: createHref,\n    createLocation: createLocation\n  };\n};\n\nexports.default = createHistory;", "'use strict';\n\nexports.__esModule = true;\n\nvar _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; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar _BrowserProtocol = require('./BrowserProtocol');\n\nvar BrowserProtocol = _interopRequireWildcard(_BrowserProtocol);\n\nvar _RefreshProtocol = require('./RefreshProtocol');\n\nvar RefreshProtocol = _interopRequireWildcard(_RefreshProtocol);\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _createHistory = require('./createHistory');\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Creates and returns a history object that uses HTML5's history API\n * (pushState, replaceState, and the popstate event) to manage history.\n * This is the recommended method of managing history in browsers because\n * it provides the cleanest URLs.\n *\n * Note: In browsers that do not support the HTML5 history API full\n * page reloads will be used to preserve clean URLs. You can force this\n * behavior using { forceRefresh: true } in options.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Browser history needs a DOM') : (0, _invariant2.default)(false) : void 0;\n\n  var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)();\n  var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol;\n\n  var getUserConfirmation = Protocol.getUserConfirmation,\n      getCurrentLocation = Protocol.getCurrentLocation,\n      pushLocation = Protocol.pushLocation,\n      replaceLocation = Protocol.replaceLocation,\n      go = Protocol.go;\n\n\n  var history = (0, _createHistory2.default)(_extends({\n    getUserConfirmation: getUserConfirmation }, options, {\n    getCurrentLocation: getCurrentLocation,\n    pushLocation: pushLocation,\n    replaceLocation: replaceLocation,\n    go: go\n  }));\n\n  var listenerCount = 0,\n      stopListener = void 0;\n\n  var startListener = function startListener(listener, before) {\n    if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo);\n\n    var unlisten = before ? history.listenBefore(listener) : history.listen(listener);\n\n    return function () {\n      unlisten();\n\n      if (--listenerCount === 0) stopListener();\n    };\n  };\n\n  var listenBefore = function listenBefore(listener) {\n    return startListener(listener, true);\n  };\n\n  var listen = function listen(listener) {\n    return startListener(listener, false);\n  };\n\n  return _extends({}, history, {\n    listenBefore: listenBefore,\n    listen: listen\n  });\n};\n\nexports.default = createBrowserHistory;", "'use strict';\n\nexports.__esModule = true;\nexports.replaceLocation = exports.pushLocation = exports.startListener = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;\n\nvar _BrowserProtocol = require('./BrowserProtocol');\n\nObject.defineProperty(exports, 'getUserConfirmation', {\n  enumerable: true,\n  get: function get() {\n    return _BrowserProtocol.getUserConfirmation;\n  }\n});\nObject.defineProperty(exports, 'go', {\n  enumerable: true,\n  get: function get() {\n    return _BrowserProtocol.go;\n  }\n});\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _DOMStateStorage = require('./DOMStateStorage');\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HashChangeEvent = 'hashchange';\n\nvar getHashPath = function getHashPath() {\n  // We can't use window.location.hash here because it's not\n  // consistent across browsers - Firefox will pre-decode it!\n  var href = window.location.href;\n  var hashIndex = href.indexOf('#');\n  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n  return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n  var hashIndex = window.location.href.indexOf('#');\n\n  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation(pathCoder, queryKey) {\n  var path = pathCoder.decodePath(getHashPath());\n  var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey);\n\n  var state = void 0;\n  if (key) {\n    path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey);\n    state = (0, _DOMStateStorage.readState)(key);\n  }\n\n  var init = (0, _PathUtils.parsePath)(path);\n  init.state = state;\n\n  return (0, _LocationUtils.createLocation)(init, undefined, key);\n};\n\nvar prevLocation = void 0;\n\nvar startListener = exports.startListener = function startListener(listener, pathCoder, queryKey) {\n  var handleHashChange = function handleHashChange() {\n    var path = getHashPath();\n    var encodedPath = pathCoder.encodePath(path);\n\n    if (path !== encodedPath) {\n      // Always be sure we have a properly-encoded hash.\n      replaceHashPath(encodedPath);\n    } else {\n      var currentLocation = getCurrentLocation(pathCoder, queryKey);\n\n      if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events\n\n      prevLocation = currentLocation;\n\n      listener(currentLocation);\n    }\n  };\n\n  // Ensure the hash is encoded properly.\n  var path = getHashPath();\n  var encodedPath = pathCoder.encodePath(path);\n\n  if (path !== encodedPath) replaceHashPath(encodedPath);\n\n  (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n\n  return function () {\n    return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n  };\n};\n\nvar updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) {\n  var state = location.state,\n      key = location.key;\n\n\n  var path = pathCoder.encodePath((0, _PathUtils.createPath)(location));\n\n  if (state !== undefined) {\n    path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key);\n    (0, _DOMStateStorage.saveState)(key, state);\n  }\n\n  prevLocation = location;\n\n  updateHash(path);\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location, pathCoder, queryKey) {\n  return updateLocation(location, pathCoder, queryKey, function (path) {\n    if (getHashPath() !== path) {\n      pushHashPath(path);\n    } else {\n      process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0;\n    }\n  });\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location, pathCoder, queryKey) {\n  return updateLocation(location, pathCoder, queryKey, function (path) {\n    if (getHashPath() !== path) replaceHashPath(path);\n  });\n};", "'use strict';\n\nexports.__esModule = true;\n\nvar _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; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _HashProtocol = require('./HashProtocol');\n\nvar HashProtocol = _interopRequireWildcard(_HashProtocol);\n\nvar _createHistory = require('./createHistory');\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar DefaultQueryKey = '_k';\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar HashPathCoders = {\n  hashbang: {\n    encodePath: function encodePath(path) {\n      return path.charAt(0) === '!' ? path : '!' + path;\n    },\n    decodePath: function decodePath(path) {\n      return path.charAt(0) === '!' ? path.substring(1) : path;\n    }\n  },\n  noslash: {\n    encodePath: function encodePath(path) {\n      return path.charAt(0) === '/' ? path.substring(1) : path;\n    },\n    decodePath: addLeadingSlash\n  },\n  slash: {\n    encodePath: addLeadingSlash,\n    decodePath: addLeadingSlash\n  }\n};\n\nvar createHashHistory = function createHashHistory() {\n  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Hash history needs a DOM') : (0, _invariant2.default)(false) : void 0;\n\n  var queryKey = options.queryKey,\n      hashType = options.hashType;\n\n\n  process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(queryKey !== false, 'Using { queryKey: false } no longer works. Instead, just don\\'t ' + 'use location state if you don\\'t want a key in your URL query string') : void 0;\n\n  if (typeof queryKey !== 'string') queryKey = DefaultQueryKey;\n\n  if (hashType == null) hashType = 'slash';\n\n  if (!(hashType in HashPathCoders)) {\n    process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0;\n\n    hashType = 'slash';\n  }\n\n  var pathCoder = HashPathCoders[hashType];\n\n  var getUserConfirmation = HashProtocol.getUserConfirmation;\n\n\n  var getCurrentLocation = function getCurrentLocation() {\n    return HashProtocol.getCurrentLocation(pathCoder, queryKey);\n  };\n\n  var pushLocation = function pushLocation(location) {\n    return HashProtocol.pushLocation(location, pathCoder, queryKey);\n  };\n\n  var replaceLocation = function replaceLocation(location) {\n    return HashProtocol.replaceLocation(location, pathCoder, queryKey);\n  };\n\n  var history = (0, _createHistory2.default)(_extends({\n    getUserConfirmation: getUserConfirmation }, options, {\n    getCurrentLocation: getCurrentLocation,\n    pushLocation: pushLocation,\n    replaceLocation: replaceLocation,\n    go: HashProtocol.go\n  }));\n\n  var listenerCount = 0,\n      stopListener = void 0;\n\n  var startListener = function startListener(listener, before) {\n    if (++listenerCount === 1) stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey);\n\n    var unlisten = before ? history.listenBefore(listener) : history.listen(listener);\n\n    return function () {\n      unlisten();\n\n      if (--listenerCount === 0) stopListener();\n    };\n  };\n\n  var listenBefore = function listenBefore(listener) {\n    return startListener(listener, true);\n  };\n\n  var listen = function listen(listener) {\n    return startListener(listener, false);\n  };\n\n  var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();\n\n  var go = function go(n) {\n    process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n\n    history.go(n);\n  };\n\n  var createHref = function createHref(path) {\n    return '#' + pathCoder.encodePath(history.createHref(path));\n  };\n\n  return _extends({}, history, {\n    listenBefore: listenBefore,\n    listen: listen,\n    go: go,\n    createHref: createHref\n  });\n};\n\nexports.default = createHashHistory;", "'use strict';\n\nexports.__esModule = true;\n\nvar _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; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createHistory = require('./createHistory');\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nvar _Actions = require('./Actions');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createStateStorage = function createStateStorage(entries) {\n  return entries.filter(function (entry) {\n    return entry.state;\n  }).reduce(function (memo, entry) {\n    memo[entry.key] = entry.state;\n    return memo;\n  }, {});\n};\n\nvar createMemoryHistory = function createMemoryHistory() {\n  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  if (Array.isArray(options)) {\n    options = { entries: options };\n  } else if (typeof options === 'string') {\n    options = { entries: [options] };\n  }\n\n  var getCurrentLocation = function getCurrentLocation() {\n    var entry = entries[current];\n    var path = (0, _PathUtils.createPath)(entry);\n\n    var key = void 0,\n        state = void 0;\n    if (entry.key) {\n      key = entry.key;\n      state = readState(key);\n    }\n\n    var init = (0, _PathUtils.parsePath)(path);\n\n    return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key);\n  };\n\n  var canGo = function canGo(n) {\n    var index = current + n;\n    return index >= 0 && index < entries.length;\n  };\n\n  var go = function go(n) {\n    if (!n) return;\n\n    if (!canGo(n)) {\n      process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0;\n\n      return;\n    }\n\n    current += n;\n    var currentLocation = getCurrentLocation();\n\n    // Change action to POP\n    history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP }));\n  };\n\n  var pushLocation = function pushLocation(location) {\n    current += 1;\n\n    if (current < entries.length) entries.splice(current);\n\n    entries.push(location);\n\n    saveState(location.key, location.state);\n  };\n\n  var replaceLocation = function replaceLocation(location) {\n    entries[current] = location;\n    saveState(location.key, location.state);\n  };\n\n  var history = (0, _createHistory2.default)(_extends({}, options, {\n    getCurrentLocation: getCurrentLocation,\n    pushLocation: pushLocation,\n    replaceLocation: replaceLocation,\n    go: go\n  }));\n\n  var _options = options,\n      entries = _options.entries,\n      current = _options.current;\n\n\n  if (typeof entries === 'string') {\n    entries = [entries];\n  } else if (!Array.isArray(entries)) {\n    entries = ['/'];\n  }\n\n  entries = entries.map(function (entry) {\n    return (0, _LocationUtils.createLocation)(entry);\n  });\n\n  if (current == null) {\n    current = entries.length - 1;\n  } else {\n    !(current >= 0 && current < entries.length) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : (0, _invariant2.default)(false) : void 0;\n  }\n\n  var storage = createStateStorage(entries);\n\n  var saveState = function saveState(key, state) {\n    return storage[key] = state;\n  };\n\n  var readState = function readState(key) {\n    return storage[key];\n  };\n\n  return _extends({}, history, {\n    canGo: canGo\n  });\n};\n\nexports.default = createMemoryHistory;", "'use strict';\n\nexports.__esModule = true;\n\nvar _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; };\n\nvar _runTransitionHook = require('./runTransitionHook');\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar useBasename = function useBasename(createHistory) {\n  return function () {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    var history = createHistory(options);\n    var basename = options.basename;\n\n\n    var addBasename = function addBasename(location) {\n      if (!location) return location;\n\n      if (basename && location.basename == null) {\n        if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) {\n          location.pathname = location.pathname.substring(basename.length);\n          location.basename = basename;\n\n          if (location.pathname === '') location.pathname = '/';\n        } else {\n          location.basename = '';\n        }\n      }\n\n      return location;\n    };\n\n    var prependBasename = function prependBasename(location) {\n      if (!basename) return location;\n\n      var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location;\n      var pname = object.pathname;\n      var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/';\n      var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname;\n      var pathname = normalizedBasename + normalizedPathname;\n\n      return _extends({}, object, {\n        pathname: pathname\n      });\n    };\n\n    // Override all read methods with basename-aware versions.\n    var getCurrentLocation = function getCurrentLocation() {\n      return addBasename(history.getCurrentLocation());\n    };\n\n    var listenBefore = function listenBefore(hook) {\n      return history.listenBefore(function (location, callback) {\n        return (0, _runTransitionHook2.default)(hook, addBasename(location), callback);\n      });\n    };\n\n    var listen = function listen(listener) {\n      return history.listen(function (location) {\n        return listener(addBasename(location));\n      });\n    };\n\n    // Override all write methods with basename-aware versions.\n    var push = function push(location) {\n      return history.push(prependBasename(location));\n    };\n\n    var replace = function replace(location) {\n      return history.replace(prependBasename(location));\n    };\n\n    var createPath = function createPath(location) {\n      return history.createPath(prependBasename(location));\n    };\n\n    var createHref = function createHref(location) {\n      return history.createHref(prependBasename(location));\n    };\n\n    var createLocation = function createLocation(location) {\n      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args)));\n    };\n\n    return _extends({}, history, {\n      getCurrentLocation: getCurrentLocation,\n      listenBefore: listenBefore,\n      listen: listen,\n      push: push,\n      replace: replace,\n      createPath: createPath,\n      createHref: createHref,\n      createLocation: createLocation\n    });\n  };\n};\n\nexports.default = useBasename;", "'use strict';\n\nexports.__esModule = true;\n\nvar _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; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _ExecutionEnvironment = require('./ExecutionEnvironment');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar startListener = function startListener(getPromptMessage) {\n  var handleBeforeUnload = function handleBeforeUnload(event) {\n    var message = getPromptMessage();\n\n    if (typeof message === 'string') {\n      (event || window.event).returnValue = message;\n      return message;\n    }\n\n    return undefined;\n  };\n\n  (0, _DOMUtils.addEventListener)(window, 'beforeunload', handleBeforeUnload);\n\n  return function () {\n    return (0, _DOMUtils.removeEventListener)(window, 'beforeunload', handleBeforeUnload);\n  };\n};\n\n/**\n * Returns a new createHistory function that can be used to create\n * history objects that know how to use the beforeunload event in web\n * browsers to cancel navigation.\n */\nvar useBeforeUnload = function useBeforeUnload(createHistory) {\n  !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'useBeforeUnload only works in DOM environments') : (0, _invariant2.default)(false) : void 0;\n\n  return function (options) {\n    var history = createHistory(options);\n\n    var listeners = [];\n    var stopListener = void 0;\n\n    var getPromptMessage = function getPromptMessage() {\n      var message = void 0;\n      for (var i = 0, len = listeners.length; message == null && i < len; ++i) {\n        message = listeners[i].call();\n      }return message;\n    };\n\n    var listenBeforeUnload = function listenBeforeUnload(listener) {\n      if (listeners.push(listener) === 1) stopListener = startListener(getPromptMessage);\n\n      return function () {\n        listeners = listeners.filter(function (item) {\n          return item !== listener;\n        });\n\n        if (listeners.length === 0 && stopListener) {\n          stopListener();\n          stopListener = null;\n        }\n      };\n    };\n\n    return _extends({}, history, {\n      listenBeforeUnload: listenBeforeUnload\n    });\n  };\n};\n\nexports.default = useBeforeUnload;", "'use strict';\nmodule.exports = function (str) {\n\treturn encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n\t\treturn '%' + c.charCodeAt(0).toString(16).toUpperCase();\n\t});\n};\n", "/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n", "'use strict';\nvar strictUriEncode = require('strict-uri-encode');\nvar objectAssign = require('object-assign');\n\nfunction encoderForArrayFormat(opts) {\n\tswitch (opts.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn function (key, value, index) {\n\t\t\t\treturn value === null ? [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[',\n\t\t\t\t\tindex,\n\t\t\t\t\t']'\n\t\t\t\t].join('') : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[',\n\t\t\t\t\tencode(index, opts),\n\t\t\t\t\t']=',\n\t\t\t\t\tencode(value, opts)\n\t\t\t\t].join('');\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn function (key, value) {\n\t\t\t\treturn value === null ? encode(key, opts) : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[]=',\n\t\t\t\t\tencode(value, opts)\n\t\t\t\t].join('');\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn function (key, value) {\n\t\t\t\treturn value === null ? encode(key, opts) : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'=',\n\t\t\t\t\tencode(value, opts)\n\t\t\t\t].join('');\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(opts) {\n\tvar result;\n\n\tswitch (opts.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn function (key, value, accumulator) {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn function (key, value, accumulator) {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t} else if (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn function (key, value, accumulator) {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction encode(value, opts) {\n\tif (opts.encode) {\n\t\treturn opts.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t} else if (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input)).sort(function (a, b) {\n\t\t\treturn Number(a) - Number(b);\n\t\t}).map(function (key) {\n\t\t\treturn input[key];\n\t\t});\n\t}\n\n\treturn input;\n}\n\nexports.extract = function (str) {\n\treturn str.split('?')[1] || '';\n};\n\nexports.parse = function (str, opts) {\n\topts = objectAssign({arrayFormat: 'none'}, opts);\n\n\tvar formatter = parserForArrayFormat(opts);\n\n\t// Create an object with no prototype\n\t// https://github.com/sindresorhus/query-string/issues/47\n\tvar ret = Object.create(null);\n\n\tif (typeof str !== 'string') {\n\t\treturn ret;\n\t}\n\n\tstr = str.trim().replace(/^(\\?|#|&)/, '');\n\n\tif (!str) {\n\t\treturn ret;\n\t}\n\n\tstr.split('&').forEach(function (param) {\n\t\tvar parts = param.replace(/\\+/g, ' ').split('=');\n\t\t// Firefox (pre 40) decodes `%3D` to `=`\n\t\t// https://github.com/sindresorhus/query-string/pull/37\n\t\tvar key = parts.shift();\n\t\tvar val = parts.length > 0 ? parts.join('=') : undefined;\n\n\t\t// missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tval = val === undefined ? null : decodeURIComponent(val);\n\n\t\tformatter(decodeURIComponent(key), val, ret);\n\t});\n\n\treturn Object.keys(ret).sort().reduce(function (result, key) {\n\t\tvar val = ret[key];\n\t\tif (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(val);\n\t\t} else {\n\t\t\tresult[key] = val;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n};\n\nexports.stringify = function (obj, opts) {\n\tvar defaults = {\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none'\n\t};\n\n\topts = objectAssign(defaults, opts);\n\n\tvar formatter = encoderForArrayFormat(opts);\n\n\treturn obj ? Object.keys(obj).sort().map(function (key) {\n\t\tvar val = obj[key];\n\n\t\tif (val === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (val === null) {\n\t\t\treturn encode(key, opts);\n\t\t}\n\n\t\tif (Array.isArray(val)) {\n\t\t\tvar result = [];\n\n\t\t\tval.slice().forEach(function (val2) {\n\t\t\t\tif (val2 === undefined) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresult.push(formatter(key, val2, result.length));\n\t\t\t});\n\n\t\t\treturn result.join('&');\n\t\t}\n\n\t\treturn encode(key, opts) + '=' + encode(val, opts);\n\t}).filter(function (x) {\n\t\treturn x.length > 0;\n\t}).join('&') : '';\n};\n", "'use strict';\n\nexports.__esModule = true;\n\nvar _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; };\n\nvar _queryString = require('query-string');\n\nvar _runTransitionHook = require('./runTransitionHook');\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar defaultStringifyQuery = function defaultStringifyQuery(query) {\n  return (0, _queryString.stringify)(query).replace(/%20/g, '+');\n};\n\nvar defaultParseQueryString = _queryString.parse;\n\n/**\n * Returns a new createHistory function that may be used to create\n * history objects that know how to handle URL queries.\n */\nvar useQueries = function useQueries(createHistory) {\n  return function () {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    var history = createHistory(options);\n    var stringifyQuery = options.stringifyQuery,\n        parseQueryString = options.parseQueryString;\n\n\n    if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n    if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n    var decodeQuery = function decodeQuery(location) {\n      if (!location) return location;\n\n      if (location.query == null) location.query = parseQueryString(location.search.substring(1));\n\n      return location;\n    };\n\n    var encodeQuery = function encodeQuery(location, query) {\n      if (query == null) return location;\n\n      var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location;\n      var queryString = stringifyQuery(query);\n      var search = queryString ? '?' + queryString : '';\n\n      return _extends({}, object, {\n        search: search\n      });\n    };\n\n    // Override all read methods with query-aware versions.\n    var getCurrentLocation = function getCurrentLocation() {\n      return decodeQuery(history.getCurrentLocation());\n    };\n\n    var listenBefore = function listenBefore(hook) {\n      return history.listenBefore(function (location, callback) {\n        return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback);\n      });\n    };\n\n    var listen = function listen(listener) {\n      return history.listen(function (location) {\n        return listener(decodeQuery(location));\n      });\n    };\n\n    // Override all write methods with query-aware versions.\n    var push = function push(location) {\n      return history.push(encodeQuery(location, location.query));\n    };\n\n    var replace = function replace(location) {\n      return history.replace(encodeQuery(location, location.query));\n    };\n\n    var createPath = function createPath(location) {\n      return history.createPath(encodeQuery(location, location.query));\n    };\n\n    var createHref = function createHref(location) {\n      return history.createHref(encodeQuery(location, location.query));\n    };\n\n    var createLocation = function createLocation(location) {\n      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      var newLocation = history.createLocation.apply(history, [encodeQuery(location, location.query)].concat(args));\n\n      if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query);\n\n      return decodeQuery(newLocation);\n    };\n\n    return _extends({}, history, {\n      getCurrentLocation: getCurrentLocation,\n      listenBefore: listenBefore,\n      listen: listen,\n      push: push,\n      replace: replace,\n      createPath: createPath,\n      createHref: createHref,\n      createLocation: createLocation\n    });\n  };\n};\n\nexports.default = useQueries;", "'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.Actions = exports.useQueries = exports.useBeforeUnload = exports.useBasename = exports.createMemoryHistory = exports.createHashHistory = exports.createHistory = undefined;\n\nvar _LocationUtils = require('./LocationUtils');\n\nObject.defineProperty(exports, 'locationsAreEqual', {\n  enumerable: true,\n  get: function get() {\n    return _LocationUtils.locationsAreEqual;\n  }\n});\n\nvar _createBrowserHistory = require('./createBrowserHistory');\n\nvar _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);\n\nvar _createHashHistory2 = require('./createHashHistory');\n\nvar _createHashHistory3 = _interopRequireDefault(_createHashHistory2);\n\nvar _createMemoryHistory2 = require('./createMemoryHistory');\n\nvar _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);\n\nvar _useBasename2 = require('./useBasename');\n\nvar _useBasename3 = _interopRequireDefault(_useBasename2);\n\nvar _useBeforeUnload2 = require('./useBeforeUnload');\n\nvar _useBeforeUnload3 = _interopRequireDefault(_useBeforeUnload2);\n\nvar _useQueries2 = require('./useQueries');\n\nvar _useQueries3 = _interopRequireDefault(_useQueries2);\n\nvar _Actions2 = require('./Actions');\n\nvar _Actions = _interopRequireWildcard(_Actions2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.createHistory = _createBrowserHistory2.default;\nexports.createHashHistory = _createHashHistory3.default;\nexports.createMemoryHistory = _createMemoryHistory3.default;\nexports.useBasename = _useBasename3.default;\nexports.useBeforeUnload = _useBeforeUnload3.default;\nexports.useQueries = _useQueries3.default;\nexports.Actions = _Actions;", "/** @license React v16.13.0\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var l=require(\"object-assign\"),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.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}\nvar D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,\"setState\")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};\nfunction G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}var I=H.prototype=new G;I.constructor=H;l(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=\"\"+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}}\nfunction N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}}\nfunction S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)}\nfunction T(a,b,c,e){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 c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e)}else if(null===a||\"object\"!==typeof a?f=null:(f=B&&a[B]||a[\"@@iterator\"],f=\"function\"===typeof f?f:null),\"function\"===typeof f)for(a=f.call(a),k=\n0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if(\"object\"===d)throw c=\"\"+a,Error(C(31,\"[object Object]\"===c?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":c,\"\"));return g}function V(a,b,c){return null==a?0:T(a,\"\",b,c)}function U(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++)}\nfunction aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?\"\":(\"\"+a.key).replace(P,\"$&/\")+\"/\")+c)),e.push(a))}function X(a,b,c,e,d){var g=\"\";null!=c&&(g=(\"\"+c).replace(P,\"$&/\")+\"/\");b=R(b,g,e,d);V(a,aa,b);S(b)}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a}\nvar ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}};\nexports.Component=F;exports.Fragment=r;exports.Profiler=u;exports.PureComponent=H;exports.StrictMode=t;exports.Suspense=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba;\nexports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=l({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=\"\"+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type,\nkey:d,ref:g,props:e,_owner:k}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:x,render:a}};exports.isValidElement=O;\nexports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};\nexports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version=\"16.13.0\";\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.production.min.js');\n} else {\n  module.exports = require('./cjs/react.development.js');\n}\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n  Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar _invariant = require('fbjs/lib/invariant');\n\nif (process.env.NODE_ENV !== 'production') {\n  var warning = require('fbjs/lib/warning');\n}\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n  return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (process.env.NODE_ENV !== 'production') {\n  ReactPropTypeLocationNames = {\n    prop: 'prop',\n    context: 'context',\n    childContext: 'child context'\n  };\n} else {\n  ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n  /**\n   * Policies that describe methods in `ReactClassInterface`.\n   */\n\n  var injectedMixins = [];\n\n  /**\n   * Composite components are higher-level components that compose other composite\n   * or host components.\n   *\n   * To create a new type of `ReactClass`, pass a specification of\n   * your new class to `React.createClass`. The only requirement of your class\n   * specification is that you implement a `render` method.\n   *\n   *   var MyComponent = React.createClass({\n   *     render: function() {\n   *       return <div>Hello World</div>;\n   *     }\n   *   });\n   *\n   * The class specification supports a specific protocol of methods that have\n   * special meaning (e.g. `render`). See `ReactClassInterface` for\n   * more the comprehensive protocol. Any other properties and methods in the\n   * class specification will be available on the prototype.\n   *\n   * @interface ReactClassInterface\n   * @internal\n   */\n  var ReactClassInterface = {\n    /**\n     * An array of Mixin objects to include when defining your component.\n     *\n     * @type {array}\n     * @optional\n     */\n    mixins: 'DEFINE_MANY',\n\n    /**\n     * An object containing properties and methods that should be defined on\n     * the component's constructor instead of its prototype (static methods).\n     *\n     * @type {object}\n     * @optional\n     */\n    statics: 'DEFINE_MANY',\n\n    /**\n     * Definition of prop types for this component.\n     *\n     * @type {object}\n     * @optional\n     */\n    propTypes: 'DEFINE_MANY',\n\n    /**\n     * Definition of context types for this component.\n     *\n     * @type {object}\n     * @optional\n     */\n    contextTypes: 'DEFINE_MANY',\n\n    /**\n     * Definition of context types this component sets for its children.\n     *\n     * @type {object}\n     * @optional\n     */\n    childContextTypes: 'DEFINE_MANY',\n\n    // ==== Definition methods ====\n\n    /**\n     * Invoked when the component is mounted. Values in the mapping will be set on\n     * `this.props` if that prop is not specified (i.e. using an `in` check).\n     *\n     * This method is invoked before `getInitialState` and therefore cannot rely\n     * on `this.state` or use `this.setState`.\n     *\n     * @return {object}\n     * @optional\n     */\n    getDefaultProps: 'DEFINE_MANY_MERGED',\n\n    /**\n     * Invoked once before the component is mounted. The return value will be used\n     * as the initial value of `this.state`.\n     *\n     *   getInitialState: function() {\n     *     return {\n     *       isOn: false,\n     *       fooBaz: new BazFoo()\n     *     }\n     *   }\n     *\n     * @return {object}\n     * @optional\n     */\n    getInitialState: 'DEFINE_MANY_MERGED',\n\n    /**\n     * @return {object}\n     * @optional\n     */\n    getChildContext: 'DEFINE_MANY_MERGED',\n\n    /**\n     * Uses props from `this.props` and state from `this.state` to render the\n     * structure of the component.\n     *\n     * No guarantees are made about when or how often this method is invoked, so\n     * it must not have side effects.\n     *\n     *   render: function() {\n     *     var name = this.props.name;\n     *     return <div>Hello, {name}!</div>;\n     *   }\n     *\n     * @return {ReactComponent}\n     * @required\n     */\n    render: 'DEFINE_ONCE',\n\n    // ==== Delegate methods ====\n\n    /**\n     * Invoked when the component is initially created and about to be mounted.\n     * This may have side effects, but any external subscriptions or data created\n     * by this method must be cleaned up in `componentWillUnmount`.\n     *\n     * @optional\n     */\n    componentWillMount: 'DEFINE_MANY',\n\n    /**\n     * Invoked when the component has been mounted and has a DOM representation.\n     * However, there is no guarantee that the DOM node is in the document.\n     *\n     * Use this as an opportunity to operate on the DOM when the component has\n     * been mounted (initialized and rendered) for the first time.\n     *\n     * @param {DOMElement} rootNode DOM element representing the component.\n     * @optional\n     */\n    componentDidMount: 'DEFINE_MANY',\n\n    /**\n     * Invoked before the component receives new props.\n     *\n     * Use this as an opportunity to react to a prop transition by updating the\n     * state using `this.setState`. Current props are accessed via `this.props`.\n     *\n     *   componentWillReceiveProps: function(nextProps, nextContext) {\n     *     this.setState({\n     *       likesIncreasing: nextProps.likeCount > this.props.likeCount\n     *     });\n     *   }\n     *\n     * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n     * transition may cause a state change, but the opposite is not true. If you\n     * need it, you are probably looking for `componentWillUpdate`.\n     *\n     * @param {object} nextProps\n     * @optional\n     */\n    componentWillReceiveProps: 'DEFINE_MANY',\n\n    /**\n     * Invoked while deciding if the component should be updated as a result of\n     * receiving new props, state and/or context.\n     *\n     * Use this as an opportunity to `return false` when you're certain that the\n     * transition to the new props/state/context will not require a component\n     * update.\n     *\n     *   shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n     *     return !equal(nextProps, this.props) ||\n     *       !equal(nextState, this.state) ||\n     *       !equal(nextContext, this.context);\n     *   }\n     *\n     * @param {object} nextProps\n     * @param {?object} nextState\n     * @param {?object} nextContext\n     * @return {boolean} True if the component should update.\n     * @optional\n     */\n    shouldComponentUpdate: 'DEFINE_ONCE',\n\n    /**\n     * Invoked when the component is about to update due to a transition from\n     * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n     * and `nextContext`.\n     *\n     * Use this as an opportunity to perform preparation before an update occurs.\n     *\n     * NOTE: You **cannot** use `this.setState()` in this method.\n     *\n     * @param {object} nextProps\n     * @param {?object} nextState\n     * @param {?object} nextContext\n     * @param {ReactReconcileTransaction} transaction\n     * @optional\n     */\n    componentWillUpdate: 'DEFINE_MANY',\n\n    /**\n     * Invoked when the component's DOM representation has been updated.\n     *\n     * Use this as an opportunity to operate on the DOM when the component has\n     * been updated.\n     *\n     * @param {object} prevProps\n     * @param {?object} prevState\n     * @param {?object} prevContext\n     * @param {DOMElement} rootNode DOM element representing the component.\n     * @optional\n     */\n    componentDidUpdate: 'DEFINE_MANY',\n\n    /**\n     * Invoked when the component is about to be removed from its parent and have\n     * its DOM representation destroyed.\n     *\n     * Use this as an opportunity to deallocate any external resources.\n     *\n     * NOTE: There is no `componentDidUnmount` since your component will have been\n     * destroyed by that point.\n     *\n     * @optional\n     */\n    componentWillUnmount: 'DEFINE_MANY',\n\n    /**\n     * Replacement for (deprecated) `componentWillMount`.\n     *\n     * @optional\n     */\n    UNSAFE_componentWillMount: 'DEFINE_MANY',\n\n    /**\n     * Replacement for (deprecated) `componentWillReceiveProps`.\n     *\n     * @optional\n     */\n    UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n\n    /**\n     * Replacement for (deprecated) `componentWillUpdate`.\n     *\n     * @optional\n     */\n    UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n\n    // ==== Advanced methods ====\n\n    /**\n     * Updates the component's currently mounted DOM representation.\n     *\n     * By default, this implements React's rendering and reconciliation algorithm.\n     * Sophisticated clients may wish to override this.\n     *\n     * @param {ReactReconcileTransaction} transaction\n     * @internal\n     * @overridable\n     */\n    updateComponent: 'OVERRIDE_BASE'\n  };\n\n  /**\n   * Similar to ReactClassInterface but for static methods.\n   */\n  var ReactClassStaticInterface = {\n    /**\n     * This method is invoked after a component is instantiated and when it\n     * receives new props. Return an object to update state in response to\n     * prop changes. Return null to indicate no change to state.\n     *\n     * If an object is returned, its keys will be merged into the existing state.\n     *\n     * @return {object || null}\n     * @optional\n     */\n    getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n  };\n\n  /**\n   * Mapping from class specification keys to special processing functions.\n   *\n   * Although these are declared like instance properties in the specification\n   * when defining classes using `React.createClass`, they are actually static\n   * and are accessible on the constructor instead of the prototype. Despite\n   * being static, they must be defined outside of the \"statics\" key under\n   * which all other static methods are defined.\n   */\n  var RESERVED_SPEC_KEYS = {\n    displayName: function(Constructor, displayName) {\n      Constructor.displayName = displayName;\n    },\n    mixins: function(Constructor, mixins) {\n      if (mixins) {\n        for (var i = 0; i < mixins.length; i++) {\n          mixSpecIntoComponent(Constructor, mixins[i]);\n        }\n      }\n    },\n    childContextTypes: function(Constructor, childContextTypes) {\n      if (process.env.NODE_ENV !== 'production') {\n        validateTypeDef(Constructor, childContextTypes, 'childContext');\n      }\n      Constructor.childContextTypes = _assign(\n        {},\n        Constructor.childContextTypes,\n        childContextTypes\n      );\n    },\n    contextTypes: function(Constructor, contextTypes) {\n      if (process.env.NODE_ENV !== 'production') {\n        validateTypeDef(Constructor, contextTypes, 'context');\n      }\n      Constructor.contextTypes = _assign(\n        {},\n        Constructor.contextTypes,\n        contextTypes\n      );\n    },\n    /**\n     * Special case getDefaultProps which should move into statics but requires\n     * automatic merging.\n     */\n    getDefaultProps: function(Constructor, getDefaultProps) {\n      if (Constructor.getDefaultProps) {\n        Constructor.getDefaultProps = createMergedResultFunction(\n          Constructor.getDefaultProps,\n          getDefaultProps\n        );\n      } else {\n        Constructor.getDefaultProps = getDefaultProps;\n      }\n    },\n    propTypes: function(Constructor, propTypes) {\n      if (process.env.NODE_ENV !== 'production') {\n        validateTypeDef(Constructor, propTypes, 'prop');\n      }\n      Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n    },\n    statics: function(Constructor, statics) {\n      mixStaticSpecIntoComponent(Constructor, statics);\n    },\n    autobind: function() {}\n  };\n\n  function validateTypeDef(Constructor, typeDef, location) {\n    for (var propName in typeDef) {\n      if (typeDef.hasOwnProperty(propName)) {\n        // use a warning instead of an _invariant so components\n        // don't show up in prod but only in __DEV__\n        if (process.env.NODE_ENV !== 'production') {\n          warning(\n            typeof typeDef[propName] === 'function',\n            '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n              'React.PropTypes.',\n            Constructor.displayName || 'ReactClass',\n            ReactPropTypeLocationNames[location],\n            propName\n          );\n        }\n      }\n    }\n  }\n\n  function validateMethodOverride(isAlreadyDefined, name) {\n    var specPolicy = ReactClassInterface.hasOwnProperty(name)\n      ? ReactClassInterface[name]\n      : null;\n\n    // Disallow overriding of base class methods unless explicitly allowed.\n    if (ReactClassMixin.hasOwnProperty(name)) {\n      _invariant(\n        specPolicy === 'OVERRIDE_BASE',\n        'ReactClassInterface: You are attempting to override ' +\n          '`%s` from your class specification. Ensure that your method names ' +\n          'do not overlap with React methods.',\n        name\n      );\n    }\n\n    // Disallow defining methods more than once unless explicitly allowed.\n    if (isAlreadyDefined) {\n      _invariant(\n        specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',\n        'ReactClassInterface: You are attempting to define ' +\n          '`%s` on your component more than once. This conflict may be due ' +\n          'to a mixin.',\n        name\n      );\n    }\n  }\n\n  /**\n   * Mixin helper which handles policy validation and reserved\n   * specification keys when building React classes.\n   */\n  function mixSpecIntoComponent(Constructor, spec) {\n    if (!spec) {\n      if (process.env.NODE_ENV !== 'production') {\n        var typeofSpec = typeof spec;\n        var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n        if (process.env.NODE_ENV !== 'production') {\n          warning(\n            isMixinValid,\n            \"%s: You're attempting to include a mixin that is either null \" +\n              'or not an object. Check the mixins included by the component, ' +\n              'as well as any mixins they include themselves. ' +\n              'Expected object but got %s.',\n            Constructor.displayName || 'ReactClass',\n            spec === null ? null : typeofSpec\n          );\n        }\n      }\n\n      return;\n    }\n\n    _invariant(\n      typeof spec !== 'function',\n      \"ReactClass: You're attempting to \" +\n        'use a component class or function as a mixin. Instead, just use a ' +\n        'regular object.'\n    );\n    _invariant(\n      !isValidElement(spec),\n      \"ReactClass: You're attempting to \" +\n        'use a component as a mixin. Instead, just use a regular object.'\n    );\n\n    var proto = Constructor.prototype;\n    var autoBindPairs = proto.__reactAutoBindPairs;\n\n    // By handling mixins before any other properties, we ensure the same\n    // chaining order is applied to methods with DEFINE_MANY policy, whether\n    // mixins are listed before or after these methods in the spec.\n    if (spec.hasOwnProperty(MIXINS_KEY)) {\n      RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n    }\n\n    for (var name in spec) {\n      if (!spec.hasOwnProperty(name)) {\n        continue;\n      }\n\n      if (name === MIXINS_KEY) {\n        // We have already handled mixins in a special case above.\n        continue;\n      }\n\n      var property = spec[name];\n      var isAlreadyDefined = proto.hasOwnProperty(name);\n      validateMethodOverride(isAlreadyDefined, name);\n\n      if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n        RESERVED_SPEC_KEYS[name](Constructor, property);\n      } else {\n        // Setup methods on prototype:\n        // The following member methods should not be automatically bound:\n        // 1. Expected ReactClass methods (in the \"interface\").\n        // 2. Overridden methods (that were mixed in).\n        var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n        var isFunction = typeof property === 'function';\n        var shouldAutoBind =\n          isFunction &&\n          !isReactClassMethod &&\n          !isAlreadyDefined &&\n          spec.autobind !== false;\n\n        if (shouldAutoBind) {\n          autoBindPairs.push(name, property);\n          proto[name] = property;\n        } else {\n          if (isAlreadyDefined) {\n            var specPolicy = ReactClassInterface[name];\n\n            // These cases should already be caught by validateMethodOverride.\n            _invariant(\n              isReactClassMethod &&\n                (specPolicy === 'DEFINE_MANY_MERGED' ||\n                  specPolicy === 'DEFINE_MANY'),\n              'ReactClass: Unexpected spec policy %s for key %s ' +\n                'when mixing in component specs.',\n              specPolicy,\n              name\n            );\n\n            // For methods which are defined more than once, call the existing\n            // methods before calling the new property, merging if appropriate.\n            if (specPolicy === 'DEFINE_MANY_MERGED') {\n              proto[name] = createMergedResultFunction(proto[name], property);\n            } else if (specPolicy === 'DEFINE_MANY') {\n              proto[name] = createChainedFunction(proto[name], property);\n            }\n          } else {\n            proto[name] = property;\n            if (process.env.NODE_ENV !== 'production') {\n              // Add verbose displayName to the function, which helps when looking\n              // at profiling tools.\n              if (typeof property === 'function' && spec.displayName) {\n                proto[name].displayName = spec.displayName + '_' + name;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n\n  function mixStaticSpecIntoComponent(Constructor, statics) {\n    if (!statics) {\n      return;\n    }\n\n    for (var name in statics) {\n      var property = statics[name];\n      if (!statics.hasOwnProperty(name)) {\n        continue;\n      }\n\n      var isReserved = name in RESERVED_SPEC_KEYS;\n      _invariant(\n        !isReserved,\n        'ReactClass: You are attempting to define a reserved ' +\n          'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n          'as an instance property instead; it will still be accessible on the ' +\n          'constructor.',\n        name\n      );\n\n      var isAlreadyDefined = name in Constructor;\n      if (isAlreadyDefined) {\n        var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)\n          ? ReactClassStaticInterface[name]\n          : null;\n\n        _invariant(\n          specPolicy === 'DEFINE_MANY_MERGED',\n          'ReactClass: You are attempting to define ' +\n            '`%s` on your component more than once. This conflict may be ' +\n            'due to a mixin.',\n          name\n        );\n\n        Constructor[name] = createMergedResultFunction(Constructor[name], property);\n\n        return;\n      }\n\n      Constructor[name] = property;\n    }\n  }\n\n  /**\n   * Merge two objects, but throw if both contain the same key.\n   *\n   * @param {object} one The first object, which is mutated.\n   * @param {object} two The second object\n   * @return {object} one after it has been mutated to contain everything in two.\n   */\n  function mergeIntoWithNoDuplicateKeys(one, two) {\n    _invariant(\n      one && two && typeof one === 'object' && typeof two === 'object',\n      'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'\n    );\n\n    for (var key in two) {\n      if (two.hasOwnProperty(key)) {\n        _invariant(\n          one[key] === undefined,\n          'mergeIntoWithNoDuplicateKeys(): ' +\n            'Tried to merge two objects with the same key: `%s`. This conflict ' +\n            'may be due to a mixin; in particular, this may be caused by two ' +\n            'getInitialState() or getDefaultProps() methods returning objects ' +\n            'with clashing keys.',\n          key\n        );\n        one[key] = two[key];\n      }\n    }\n    return one;\n  }\n\n  /**\n   * Creates a function that invokes two functions and merges their return values.\n   *\n   * @param {function} one Function to invoke first.\n   * @param {function} two Function to invoke second.\n   * @return {function} Function that invokes the two argument functions.\n   * @private\n   */\n  function createMergedResultFunction(one, two) {\n    return function mergedResult() {\n      var a = one.apply(this, arguments);\n      var b = two.apply(this, arguments);\n      if (a == null) {\n        return b;\n      } else if (b == null) {\n        return a;\n      }\n      var c = {};\n      mergeIntoWithNoDuplicateKeys(c, a);\n      mergeIntoWithNoDuplicateKeys(c, b);\n      return c;\n    };\n  }\n\n  /**\n   * Creates a function that invokes two functions and ignores their return vales.\n   *\n   * @param {function} one Function to invoke first.\n   * @param {function} two Function to invoke second.\n   * @return {function} Function that invokes the two argument functions.\n   * @private\n   */\n  function createChainedFunction(one, two) {\n    return function chainedFunction() {\n      one.apply(this, arguments);\n      two.apply(this, arguments);\n    };\n  }\n\n  /**\n   * Binds a method to the component.\n   *\n   * @param {object} component Component whose method is going to be bound.\n   * @param {function} method Method to be bound.\n   * @return {function} The bound method.\n   */\n  function bindAutoBindMethod(component, method) {\n    var boundMethod = method.bind(component);\n    if (process.env.NODE_ENV !== 'production') {\n      boundMethod.__reactBoundContext = component;\n      boundMethod.__reactBoundMethod = method;\n      boundMethod.__reactBoundArguments = null;\n      var componentName = component.constructor.displayName;\n      var _bind = boundMethod.bind;\n      boundMethod.bind = function(newThis) {\n        for (\n          var _len = arguments.length,\n            args = Array(_len > 1 ? _len - 1 : 0),\n            _key = 1;\n          _key < _len;\n          _key++\n        ) {\n          args[_key - 1] = arguments[_key];\n        }\n\n        // User is trying to bind() an autobound method; we effectively will\n        // ignore the value of \"this\" that the user is trying to use, so\n        // let's warn.\n        if (newThis !== component && newThis !== null) {\n          if (process.env.NODE_ENV !== 'production') {\n            warning(\n              false,\n              'bind(): React component methods may only be bound to the ' +\n                'component instance. See %s',\n              componentName\n            );\n          }\n        } else if (!args.length) {\n          if (process.env.NODE_ENV !== 'production') {\n            warning(\n              false,\n              'bind(): You are binding a component method to the component. ' +\n                'React does this for you automatically in a high-performance ' +\n                'way, so you can safely remove this call. See %s',\n              componentName\n            );\n          }\n          return boundMethod;\n        }\n        var reboundMethod = _bind.apply(boundMethod, arguments);\n        reboundMethod.__reactBoundContext = component;\n        reboundMethod.__reactBoundMethod = method;\n        reboundMethod.__reactBoundArguments = args;\n        return reboundMethod;\n      };\n    }\n    return boundMethod;\n  }\n\n  /**\n   * Binds all auto-bound methods in a component.\n   *\n   * @param {object} component Component whose method is going to be bound.\n   */\n  function bindAutoBindMethods(component) {\n    var pairs = component.__reactAutoBindPairs;\n    for (var i = 0; i < pairs.length; i += 2) {\n      var autoBindKey = pairs[i];\n      var method = pairs[i + 1];\n      component[autoBindKey] = bindAutoBindMethod(component, method);\n    }\n  }\n\n  var IsMountedPreMixin = {\n    componentDidMount: function() {\n      this.__isMounted = true;\n    }\n  };\n\n  var IsMountedPostMixin = {\n    componentWillUnmount: function() {\n      this.__isMounted = false;\n    }\n  };\n\n  /**\n   * Add more to the ReactClass base class. These are all legacy features and\n   * therefore not already part of the modern ReactComponent.\n   */\n  var ReactClassMixin = {\n    /**\n     * TODO: This will be deprecated because state should always keep a consistent\n     * type signature and the only use case for this, is to avoid that.\n     */\n    replaceState: function(newState, callback) {\n      this.updater.enqueueReplaceState(this, newState, callback);\n    },\n\n    /**\n     * Checks whether or not this composite component is mounted.\n     * @return {boolean} True if mounted, false otherwise.\n     * @protected\n     * @final\n     */\n    isMounted: function() {\n      if (process.env.NODE_ENV !== 'production') {\n        warning(\n          this.__didWarnIsMounted,\n          '%s: isMounted is deprecated. Instead, make sure to clean up ' +\n            'subscriptions and pending requests in componentWillUnmount to ' +\n            'prevent memory leaks.',\n          (this.constructor && this.constructor.displayName) ||\n            this.name ||\n            'Component'\n        );\n        this.__didWarnIsMounted = true;\n      }\n      return !!this.__isMounted;\n    }\n  };\n\n  var ReactClassComponent = function() {};\n  _assign(\n    ReactClassComponent.prototype,\n    ReactComponent.prototype,\n    ReactClassMixin\n  );\n\n  /**\n   * Creates a composite component class given a class specification.\n   * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n   *\n   * @param {object} spec Class specification (which must define `render`).\n   * @return {function} Component constructor function.\n   * @public\n   */\n  function createClass(spec) {\n    // To keep our warnings more understandable, we'll use a little hack here to\n    // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n    // unnecessarily identify a class without displayName as 'Constructor'.\n    var Constructor = identity(function(props, context, updater) {\n      // This constructor gets overridden by mocks. The argument is used\n      // by mocks to assert on what gets mounted.\n\n      if (process.env.NODE_ENV !== 'production') {\n        warning(\n          this instanceof Constructor,\n          'Something is calling a React component directly. Use a factory or ' +\n            'JSX instead. See: https://fb.me/react-legacyfactory'\n        );\n      }\n\n      // Wire up auto-binding\n      if (this.__reactAutoBindPairs.length) {\n        bindAutoBindMethods(this);\n      }\n\n      this.props = props;\n      this.context = context;\n      this.refs = emptyObject;\n      this.updater = updater || ReactNoopUpdateQueue;\n\n      this.state = null;\n\n      // ReactClasses doesn't have constructors. Instead, they use the\n      // getInitialState and componentWillMount methods for initialization.\n\n      var initialState = this.getInitialState ? this.getInitialState() : null;\n      if (process.env.NODE_ENV !== 'production') {\n        // We allow auto-mocks to proceed as if they're returning null.\n        if (\n          initialState === undefined &&\n          this.getInitialState._isMockFunction\n        ) {\n          // This is probably bad practice. Consider warning here and\n          // deprecating this convenience.\n          initialState = null;\n        }\n      }\n      _invariant(\n        typeof initialState === 'object' && !Array.isArray(initialState),\n        '%s.getInitialState(): must return an object or null',\n        Constructor.displayName || 'ReactCompositeComponent'\n      );\n\n      this.state = initialState;\n    });\n    Constructor.prototype = new ReactClassComponent();\n    Constructor.prototype.constructor = Constructor;\n    Constructor.prototype.__reactAutoBindPairs = [];\n\n    injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n    mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n    mixSpecIntoComponent(Constructor, spec);\n    mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n    // Initialize the defaultProps property after all mixins have been merged.\n    if (Constructor.getDefaultProps) {\n      Constructor.defaultProps = Constructor.getDefaultProps();\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      // This is a tag to indicate that the use of these method names is ok,\n      // since it's used with createClass. If it's not, then it's likely a\n      // mistake so we'll warn you to use the static property, property\n      // initializer or constructor respectively.\n      if (Constructor.getDefaultProps) {\n        Constructor.getDefaultProps.isReactClassApproved = {};\n      }\n      if (Constructor.prototype.getInitialState) {\n        Constructor.prototype.getInitialState.isReactClassApproved = {};\n      }\n    }\n\n    _invariant(\n      Constructor.prototype.render,\n      'createClass(...): Class specification must implement a `render` method.'\n    );\n\n    if (process.env.NODE_ENV !== 'production') {\n      warning(\n        !Constructor.prototype.componentShouldUpdate,\n        '%s has a method called ' +\n          'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n          'The name is phrased as a question because the function is ' +\n          'expected to return a value.',\n        spec.displayName || 'A component'\n      );\n      warning(\n        !Constructor.prototype.componentWillRecieveProps,\n        '%s has a method called ' +\n          'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',\n        spec.displayName || 'A component'\n      );\n      warning(\n        !Constructor.prototype.UNSAFE_componentWillRecieveProps,\n        '%s has a method called UNSAFE_componentWillRecieveProps(). ' +\n          'Did you mean UNSAFE_componentWillReceiveProps()?',\n        spec.displayName || 'A component'\n      );\n    }\n\n    // Reduce time spent doing lookups by setting these on the prototype.\n    for (var methodName in ReactClassInterface) {\n      if (!Constructor.prototype[methodName]) {\n        Constructor.prototype[methodName] = null;\n      }\n    }\n\n    return Constructor;\n  }\n\n  return createClass;\n}\n\nmodule.exports = factory;\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar React = require('react');\nvar factory = require('./factory');\n\nif (typeof React === 'undefined') {\n  throw Error(\n    'create-react-class could not find the React object. If you are using script tags, ' +\n      'make sure that React is being loaded before create-react-class.'\n  );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n  React.Component,\n  React.isValidElement,\n  ReactNoopUpdateQueue\n);\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n  function shim(props, propName, componentName, location, propFullName, secret) {\n    if (secret === ReactPropTypesSecret) {\n      // It is still safe when called from React.\n      return;\n    }\n    var err = new Error(\n      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n      'Use PropTypes.checkPropTypes() to call them. ' +\n      'Read more at http://fb.me/use-check-prop-types'\n    );\n    err.name = 'Invariant Violation';\n    throw err;\n  };\n  shim.isRequired = shim;\n  function getShim() {\n    return shim;\n  };\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n  var ReactPropTypes = {\n    array: shim,\n    bool: shim,\n    func: shim,\n    number: shim,\n    object: shim,\n    string: shim,\n    symbol: shim,\n\n    any: shim,\n    arrayOf: getShim,\n    element: shim,\n    elementType: shim,\n    instanceOf: getShim,\n    node: shim,\n    objectOf: getShim,\n    oneOf: getShim,\n    oneOfType: getShim,\n    shape: getShim,\n    exact: getShim,\n\n    checkPropTypes: emptyFunctionWithReset,\n    resetWarningCache: emptyFunction\n  };\n\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactIs = require('react-is');\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n", "import warning from 'warning';\n\nvar warned = {};\n\nexport default function routerWarning(falseToWarn, message) {\n  // Only issue deprecation warnings once.\n  if (message.indexOf('deprecated') !== -1) {\n    if (warned[message]) {\n      return;\n    }\n\n    warned[message] = true;\n  }\n\n  message = '[react-router] ' + message;\n\n  for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n    args[_key - 2] = arguments[_key];\n  }\n\n  warning.apply(undefined, [falseToWarn, message].concat(args));\n}\n\nexport function _resetWarned() {\n  warned = {};\n}", "import invariant from 'invariant';\n\nfunction escapeRegExp(string) {\n  return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction _compilePattern(pattern) {\n  var regexpSource = '';\n  var paramNames = [];\n  var tokens = [];\n\n  var match = void 0,\n      lastIndex = 0,\n      matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\\*\\*|\\*|\\(|\\)|\\\\\\(|\\\\\\)/g;\n  while (match = matcher.exec(pattern)) {\n    if (match.index !== lastIndex) {\n      tokens.push(pattern.slice(lastIndex, match.index));\n      regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index));\n    }\n\n    if (match[1]) {\n      regexpSource += '([^/]+)';\n      paramNames.push(match[1]);\n    } else if (match[0] === '**') {\n      regexpSource += '(.*)';\n      paramNames.push('splat');\n    } else if (match[0] === '*') {\n      regexpSource += '(.*?)';\n      paramNames.push('splat');\n    } else if (match[0] === '(') {\n      regexpSource += '(?:';\n    } else if (match[0] === ')') {\n      regexpSource += ')?';\n    } else if (match[0] === '\\\\(') {\n      regexpSource += '\\\\(';\n    } else if (match[0] === '\\\\)') {\n      regexpSource += '\\\\)';\n    }\n\n    tokens.push(match[0]);\n\n    lastIndex = matcher.lastIndex;\n  }\n\n  if (lastIndex !== pattern.length) {\n    tokens.push(pattern.slice(lastIndex, pattern.length));\n    regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length));\n  }\n\n  return {\n    pattern: pattern,\n    regexpSource: regexpSource,\n    paramNames: paramNames,\n    tokens: tokens\n  };\n}\n\nvar CompiledPatternsCache = Object.create(null);\n\nexport function compilePattern(pattern) {\n  if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern);\n\n  return CompiledPatternsCache[pattern];\n}\n\n/**\n * Attempts to match a pattern on the given pathname. Patterns may use\n * the following special characters:\n *\n * - :paramName     Matches a URL segment up to the next /, ?, or #. The\n *                  captured string is considered a \"param\"\n * - ()             Wraps a segment of the URL that is optional\n * - *              Consumes (non-greedy) all characters up to the next\n *                  character in the pattern, or to the end of the URL if\n *                  there is none\n * - **             Consumes (greedy) all characters up to the next character\n *                  in the pattern, or to the end of the URL if there is none\n *\n *  The function calls callback(error, matched) when finished.\n * The return value is an object with the following properties:\n *\n * - remainingPathname\n * - paramNames\n * - paramValues\n */\nexport function matchPattern(pattern, pathname) {\n  // Ensure pattern starts with leading slash for consistency with pathname.\n  if (pattern.charAt(0) !== '/') {\n    pattern = '/' + pattern;\n  }\n\n  var _compilePattern2 = compilePattern(pattern),\n      regexpSource = _compilePattern2.regexpSource,\n      paramNames = _compilePattern2.paramNames,\n      tokens = _compilePattern2.tokens;\n\n  if (pattern.charAt(pattern.length - 1) !== '/') {\n    regexpSource += '/?'; // Allow optional path separator at end.\n  }\n\n  // Special-case patterns like '*' for catch-all routes.\n  if (tokens[tokens.length - 1] === '*') {\n    regexpSource += '$';\n  }\n\n  var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n  if (match == null) {\n    return null;\n  }\n\n  var matchedPath = match[0];\n  var remainingPathname = pathname.substr(matchedPath.length);\n\n  if (remainingPathname) {\n    // Require that the match ends at a path separator, if we didn't match\n    // the full path, so any remaining pathname is a new path segment.\n    if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n      return null;\n    }\n\n    // If there is a remaining pathname, treat the path separator as part of\n    // the remaining pathname for properly continuing the match.\n    remainingPathname = '/' + remainingPathname;\n  }\n\n  return {\n    remainingPathname: remainingPathname,\n    paramNames: paramNames,\n    paramValues: match.slice(1).map(function (v) {\n      return v && decodeURIComponent(v);\n    })\n  };\n}\n\nexport function getParamNames(pattern) {\n  return compilePattern(pattern).paramNames;\n}\n\nexport function getParams(pattern, pathname) {\n  var match = matchPattern(pattern, pathname);\n  if (!match) {\n    return null;\n  }\n\n  var paramNames = match.paramNames,\n      paramValues = match.paramValues;\n\n  var params = {};\n\n  paramNames.forEach(function (paramName, index) {\n    params[paramName] = paramValues[index];\n  });\n\n  return params;\n}\n\n/**\n * Returns a version of the given pattern with params interpolated. Throws\n * if there is a dynamic segment of the pattern for which there is no param.\n */\nexport function formatPattern(pattern, params) {\n  params = params || {};\n\n  var _compilePattern3 = compilePattern(pattern),\n      tokens = _compilePattern3.tokens;\n\n  var parenCount = 0,\n      pathname = '',\n      splatIndex = 0,\n      parenHistory = [];\n\n  var token = void 0,\n      paramName = void 0,\n      paramValue = void 0;\n  for (var i = 0, len = tokens.length; i < len; ++i) {\n    token = tokens[i];\n\n    if (token === '*' || token === '**') {\n      paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;\n\n      !(paramValue != null || parenCount > 0) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing splat #%s for path \"%s\"', splatIndex, pattern) : invariant(false) : void 0;\n\n      if (paramValue != null) pathname += encodeURI(paramValue);\n    } else if (token === '(') {\n      parenHistory[parenCount] = '';\n      parenCount += 1;\n    } else if (token === ')') {\n      var parenText = parenHistory.pop();\n      parenCount -= 1;\n\n      if (parenCount) parenHistory[parenCount - 1] += parenText;else pathname += parenText;\n    } else if (token === '\\\\(') {\n      pathname += '(';\n    } else if (token === '\\\\)') {\n      pathname += ')';\n    } else if (token.charAt(0) === ':') {\n      paramName = token.substring(1);\n      paramValue = params[paramName];\n\n      !(paramValue != null || parenCount > 0) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing \"%s\" parameter for path \"%s\"', paramName, pattern) : invariant(false) : void 0;\n\n      if (paramValue == null) {\n        if (parenCount) {\n          parenHistory[parenCount - 1] = '';\n\n          var curTokenIdx = tokens.indexOf(token);\n          var tokensSubset = tokens.slice(curTokenIdx, tokens.length);\n          var nextParenIdx = -1;\n\n          for (var _i = 0; _i < tokensSubset.length; _i++) {\n            if (tokensSubset[_i] == ')') {\n              nextParenIdx = _i;\n              break;\n            }\n          }\n\n          !(nextParenIdx > 0) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Path \"%s\" is missing end paren at segment \"%s\"', pattern, tokensSubset.join('')) : invariant(false) : void 0;\n\n          // jump to ending paren\n          i = curTokenIdx + nextParenIdx - 1;\n        }\n      } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue);else pathname += encodeURIComponent(paramValue);\n    } else {\n      if (parenCount) parenHistory[parenCount - 1] += token;else pathname += token;\n    }\n  }\n\n  !(parenCount <= 0) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Path \"%s\" is missing end paren', pattern) : invariant(false) : void 0;\n\n  return pathname.replace(/\\/+/g, '/');\n}", "import { getParamNames } from './PatternUtils';\n\nfunction routeParamsChanged(route, prevState, nextState) {\n  if (!route.path) return false;\n\n  var paramNames = getParamNames(route.path);\n\n  return paramNames.some(function (paramName) {\n    return prevState.params[paramName] !== nextState.params[paramName];\n  });\n}\n\n/**\n * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by\n * the change from prevState to nextState. We leave routes if either\n * 1) they are not in the next state or 2) they are in the next state\n * but their params have changed (i.e. /users/123 => /users/456).\n *\n * leaveRoutes are ordered starting at the leaf route of the tree\n * we're leaving up to the common parent route. enterRoutes are ordered\n * from the top of the tree we're entering down to the leaf route.\n *\n * changeRoutes are any routes that didn't leave or enter during\n * the transition.\n */\nfunction computeChangedRoutes(prevState, nextState) {\n  var prevRoutes = prevState && prevState.routes;\n  var nextRoutes = nextState.routes;\n\n  var leaveRoutes = void 0,\n      changeRoutes = void 0,\n      enterRoutes = void 0;\n  if (prevRoutes) {\n    var parentIsLeaving = false;\n    leaveRoutes = prevRoutes.filter(function (route) {\n      if (parentIsLeaving) {\n        return true;\n      } else {\n        var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);\n        if (isLeaving) parentIsLeaving = true;\n        return isLeaving;\n      }\n    });\n\n    // onLeave hooks start at the leaf route.\n    leaveRoutes.reverse();\n\n    enterRoutes = [];\n    changeRoutes = [];\n\n    nextRoutes.forEach(function (route) {\n      var isNew = prevRoutes.indexOf(route) === -1;\n      var paramsChanged = leaveRoutes.indexOf(route) !== -1;\n\n      if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);\n    });\n  } else {\n    leaveRoutes = [];\n    changeRoutes = [];\n    enterRoutes = nextRoutes;\n  }\n\n  return {\n    leaveRoutes: leaveRoutes,\n    changeRoutes: changeRoutes,\n    enterRoutes: enterRoutes\n  };\n}\n\nexport default computeChangedRoutes;", "export function loopAsync(turns, work, callback) {\n  var currentTurn = 0,\n      isDone = false;\n  var sync = false,\n      hasNext = false,\n      doneArgs = void 0;\n\n  function done() {\n    isDone = true;\n    if (sync) {\n      // Iterate instead of recursing if possible.\n      doneArgs = [].concat(Array.prototype.slice.call(arguments));\n      return;\n    }\n\n    callback.apply(this, arguments);\n  }\n\n  function next() {\n    if (isDone) {\n      return;\n    }\n\n    hasNext = true;\n    if (sync) {\n      // Iterate instead of recursing if possible.\n      return;\n    }\n\n    sync = true;\n\n    while (!isDone && currentTurn < turns && hasNext) {\n      hasNext = false;\n      work.call(this, currentTurn++, next, done);\n    }\n\n    sync = false;\n\n    if (isDone) {\n      // This means the loop finished synchronously.\n      callback.apply(this, doneArgs);\n      return;\n    }\n\n    if (currentTurn >= turns && hasNext) {\n      isDone = true;\n      callback();\n    }\n  }\n\n  next();\n}\n\nexport function mapAsync(array, work, callback) {\n  var length = array.length;\n  var values = [];\n\n  if (length === 0) return callback(null, values);\n\n  var isDone = false,\n      doneCount = 0;\n\n  function done(index, error, value) {\n    if (isDone) return;\n\n    if (error) {\n      isDone = true;\n      callback(error);\n    } else {\n      values[index] = value;\n\n      isDone = ++doneCount === length;\n\n      if (isDone) callback(null, values);\n    }\n  }\n\n  array.forEach(function (item, index) {\n    work(item, index, function (error, value) {\n      done(index, error, value);\n    });\n  });\n}", "function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { loopAsync } from './AsyncUtils';\n\nvar PendingHooks = function PendingHooks() {\n  var _this = this;\n\n  _classCallCheck(this, PendingHooks);\n\n  this.hooks = [];\n\n  this.add = function (hook) {\n    return _this.hooks.push(hook);\n  };\n\n  this.remove = function (hook) {\n    return _this.hooks = _this.hooks.filter(function (h) {\n      return h !== hook;\n    });\n  };\n\n  this.has = function (hook) {\n    return _this.hooks.indexOf(hook) !== -1;\n  };\n\n  this.clear = function () {\n    return _this.hooks = [];\n  };\n};\n\nexport default function getTransitionUtils() {\n  var enterHooks = new PendingHooks();\n  var changeHooks = new PendingHooks();\n\n  function createTransitionHook(hook, route, asyncArity, pendingHooks) {\n    var isSync = hook.length < asyncArity;\n\n    var transitionHook = function transitionHook() {\n      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      hook.apply(route, args);\n\n      if (isSync) {\n        var callback = args[args.length - 1];\n        // Assume hook executes synchronously and\n        // automatically call the callback.\n        callback();\n      }\n    };\n\n    pendingHooks.add(transitionHook);\n\n    return transitionHook;\n  }\n\n  function getEnterHooks(routes) {\n    return routes.reduce(function (hooks, route) {\n      if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks));\n      return hooks;\n    }, []);\n  }\n\n  function getChangeHooks(routes) {\n    return routes.reduce(function (hooks, route) {\n      if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks));\n      return hooks;\n    }, []);\n  }\n\n  function runTransitionHooks(length, iter, callback) {\n    if (!length) {\n      callback();\n      return;\n    }\n\n    var redirectInfo = void 0;\n    function replace(location) {\n      redirectInfo = location;\n    }\n\n    loopAsync(length, function (index, next, done) {\n      iter(index, replace, function (error) {\n        if (error || redirectInfo) {\n          done(error, redirectInfo); // No need to continue.\n        } else {\n          next();\n        }\n      });\n    }, callback);\n  }\n\n  /**\n   * Runs all onEnter hooks in the given array of routes in order\n   * with onEnter(nextState, replace, callback) and calls\n   * callback(error, redirectInfo) when finished. The first hook\n   * to use replace short-circuits the loop.\n   *\n   * If a hook needs to run asynchronously, it may use the callback\n   * function. However, doing so will cause the transition to pause,\n   * which could lead to a non-responsive UI if the hook is slow.\n   */\n  function runEnterHooks(routes, nextState, callback) {\n    enterHooks.clear();\n    var hooks = getEnterHooks(routes);\n    return runTransitionHooks(hooks.length, function (index, replace, next) {\n      var wrappedNext = function wrappedNext() {\n        if (enterHooks.has(hooks[index])) {\n          next.apply(undefined, arguments);\n          enterHooks.remove(hooks[index]);\n        }\n      };\n      hooks[index](nextState, replace, wrappedNext);\n    }, callback);\n  }\n\n  /**\n   * Runs all onChange hooks in the given array of routes in order\n   * with onChange(prevState, nextState, replace, callback) and calls\n   * callback(error, redirectInfo) when finished. The first hook\n   * to use replace short-circuits the loop.\n   *\n   * If a hook needs to run asynchronously, it may use the callback\n   * function. However, doing so will cause the transition to pause,\n   * which could lead to a non-responsive UI if the hook is slow.\n   */\n  function runChangeHooks(routes, state, nextState, callback) {\n    changeHooks.clear();\n    var hooks = getChangeHooks(routes);\n    return runTransitionHooks(hooks.length, function (index, replace, next) {\n      var wrappedNext = function wrappedNext() {\n        if (changeHooks.has(hooks[index])) {\n          next.apply(undefined, arguments);\n          changeHooks.remove(hooks[index]);\n        }\n      };\n      hooks[index](state, nextState, replace, wrappedNext);\n    }, callback);\n  }\n\n  /**\n   * Runs all onLeave hooks in the given array of routes in order.\n   */\n  function runLeaveHooks(routes, prevState) {\n    for (var i = 0, len = routes.length; i < len; ++i) {\n      if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState);\n    }\n  }\n\n  return {\n    runEnterHooks: runEnterHooks,\n    runChangeHooks: runChangeHooks,\n    runLeaveHooks: runLeaveHooks\n  };\n}", "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; };\n\nimport { matchPattern } from './PatternUtils';\n\nfunction deepEqual(a, b) {\n  if (a == b) return true;\n\n  if (a == null || b == null) return false;\n\n  if (Array.isArray(a)) {\n    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n      return deepEqual(item, b[index]);\n    });\n  }\n\n  if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') {\n    for (var p in a) {\n      if (!Object.prototype.hasOwnProperty.call(a, p)) {\n        continue;\n      }\n\n      if (a[p] === undefined) {\n        if (b[p] !== undefined) {\n          return false;\n        }\n      } else if (!Object.prototype.hasOwnProperty.call(b, p)) {\n        return false;\n      } else if (!deepEqual(a[p], b[p])) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  return String(a) === String(b);\n}\n\n/**\n * Returns true if the current pathname matches the supplied one, net of\n * leading and trailing slash normalization. This is sufficient for an\n * indexOnly route match.\n */\nfunction pathIsActive(pathname, currentPathname) {\n  // Normalize leading slash for consistency. Leading slash on pathname has\n  // already been normalized in isActive. See caveat there.\n  if (currentPathname.charAt(0) !== '/') {\n    currentPathname = '/' + currentPathname;\n  }\n\n  // Normalize the end of both path names too. Maybe `/foo/` shouldn't show\n  // `/foo` as active, but in this case, we would already have failed the\n  // match.\n  if (pathname.charAt(pathname.length - 1) !== '/') {\n    pathname += '/';\n  }\n  if (currentPathname.charAt(currentPathname.length - 1) !== '/') {\n    currentPathname += '/';\n  }\n\n  return currentPathname === pathname;\n}\n\n/**\n * Returns true if the given pathname matches the active routes and params.\n */\nfunction routeIsActive(pathname, routes, params) {\n  var remainingPathname = pathname,\n      paramNames = [],\n      paramValues = [];\n\n  // for...of would work here but it's probably slower post-transpilation.\n  for (var i = 0, len = routes.length; i < len; ++i) {\n    var route = routes[i];\n    var pattern = route.path || '';\n\n    if (pattern.charAt(0) === '/') {\n      remainingPathname = pathname;\n      paramNames = [];\n      paramValues = [];\n    }\n\n    if (remainingPathname !== null && pattern) {\n      var matched = matchPattern(pattern, remainingPathname);\n      if (matched) {\n        remainingPathname = matched.remainingPathname;\n        paramNames = [].concat(paramNames, matched.paramNames);\n        paramValues = [].concat(paramValues, matched.paramValues);\n      } else {\n        remainingPathname = null;\n      }\n\n      if (remainingPathname === '') {\n        // We have an exact match on the route. Just check that all the params\n        // match.\n        // FIXME: This doesn't work on repeated params.\n        return paramNames.every(function (paramName, index) {\n          return String(paramValues[index]) === String(params[paramName]);\n        });\n      }\n    }\n  }\n\n  return false;\n}\n\n/**\n * Returns true if all key/value pairs in the given query are\n * currently active.\n */\nfunction queryIsActive(query, activeQuery) {\n  if (activeQuery == null) return query == null;\n\n  if (query == null) return true;\n\n  return deepEqual(query, activeQuery);\n}\n\n/**\n * Returns true if a <Link> to the given pathname/query combination is\n * currently active.\n */\nexport default function isActive(_ref, indexOnly, currentLocation, routes, params) {\n  var pathname = _ref.pathname,\n      query = _ref.query;\n\n  if (currentLocation == null) return false;\n\n  // TODO: This is a bit ugly. It keeps around support for treating pathnames\n  // without preceding slashes as absolute paths, but possibly also works\n  // around the same quirks with basenames as in matchRoutes.\n  if (pathname.charAt(0) !== '/') {\n    pathname = '/' + pathname;\n  }\n\n  if (!pathIsActive(pathname, currentLocation.pathname)) {\n    // The path check is necessary and sufficient for indexOnly, but otherwise\n    // we still need to check the routes.\n    if (indexOnly || !routeIsActive(pathname, routes, params)) {\n      return false;\n    }\n  }\n\n  return queryIsActive(query, currentLocation.query);\n}", "export function isPromise(obj) {\n  return obj && typeof obj.then === 'function';\n}", "import { mapAsync } from './AsyncUtils';\nimport { isPromise } from './PromiseUtils';\n\nfunction getComponentsForRoute(nextState, route, callback) {\n  if (route.component || route.components) {\n    callback(null, route.component || route.components);\n    return;\n  }\n\n  var getComponent = route.getComponent || route.getComponents;\n  if (getComponent) {\n    var componentReturn = getComponent.call(route, nextState, callback);\n    if (isPromise(componentReturn)) componentReturn.then(function (component) {\n      return callback(null, component);\n    }, callback);\n  } else {\n    callback();\n  }\n}\n\n/**\n * Asynchronously fetches all components needed for the given router\n * state and calls callback(error, components) when finished.\n *\n * Note: This operation may finish synchronously if no routes have an\n * asynchronous getComponents method.\n */\nfunction getComponents(nextState, callback) {\n  mapAsync(nextState.routes, function (route, index, callback) {\n    getComponentsForRoute(nextState, route, callback);\n  }, callback);\n}\n\nexport default getComponents;", "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; };\n\nimport React from 'react';\n\nfunction isValidChild(object) {\n  return object == null || React.isValidElement(object);\n}\n\nexport function isReactChildren(object) {\n  return isValidChild(object) || Array.isArray(object) && object.every(isValidChild);\n}\n\nfunction createRoute(defaultProps, props) {\n  return _extends({}, defaultProps, props);\n}\n\nexport function createRouteFromReactElement(element) {\n  var type = element.type;\n  var route = createRoute(type.defaultProps, element.props);\n\n  if (route.children) {\n    var childRoutes = createRoutesFromReactChildren(route.children, route);\n\n    if (childRoutes.length) route.childRoutes = childRoutes;\n\n    delete route.children;\n  }\n\n  return route;\n}\n\n/**\n * Creates and returns a routes object from the given ReactChildren. JSX\n * provides a convenient way to visualize how routes in the hierarchy are\n * nested.\n *\n *   import { Route, createRoutesFromReactChildren } from 'react-router'\n *\n *   const routes = createRoutesFromReactChildren(\n *     <Route component={App}>\n *       <Route path=\"home\" component={Dashboard}/>\n *       <Route path=\"news\" component={NewsFeed}/>\n *     </Route>\n *   )\n *\n * Note: This method is automatically used when you provide <Route> children\n * to a <Router> component.\n */\nexport function createRoutesFromReactChildren(children, parentRoute) {\n  var routes = [];\n\n  React.Children.forEach(children, function (element) {\n    if (React.isValidElement(element)) {\n      // Component classes may have a static create* method.\n      if (element.type.createRouteFromReactElement) {\n        var route = element.type.createRouteFromReactElement(element, parentRoute);\n\n        if (route) routes.push(route);\n      } else {\n        routes.push(createRouteFromReactElement(element));\n      }\n    }\n  });\n\n  return routes;\n}\n\n/**\n * Creates and returns an array of routes from the given object which\n * may be a JSX route, a plain object route, or an array of either.\n */\nexport function createRoutes(routes) {\n  if (isReactChildren(routes)) {\n    routes = createRoutesFromReactChildren(routes);\n  } else if (routes && !Array.isArray(routes)) {\n    routes = [routes];\n  }\n\n  return routes;\n}", "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; };\n\nimport { loopAsync } from './AsyncUtils';\nimport { isPromise } from './PromiseUtils';\nimport { matchPattern } from './PatternUtils';\nimport warning from './routerWarning';\nimport { createRoutes } from './RouteUtils';\n\nfunction getChildRoutes(route, location, paramNames, paramValues, callback) {\n  if (route.childRoutes) {\n    return [null, route.childRoutes];\n  }\n  if (!route.getChildRoutes) {\n    return [];\n  }\n\n  var sync = true,\n      result = void 0;\n\n  var partialNextState = {\n    location: location,\n    params: createParams(paramNames, paramValues)\n  };\n\n  var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) {\n    childRoutes = !error && createRoutes(childRoutes);\n    if (sync) {\n      result = [error, childRoutes];\n      return;\n    }\n\n    callback(error, childRoutes);\n  });\n\n  if (isPromise(childRoutesReturn)) childRoutesReturn.then(function (childRoutes) {\n    return callback(null, createRoutes(childRoutes));\n  }, callback);\n\n  sync = false;\n  return result; // Might be undefined.\n}\n\nfunction getIndexRoute(route, location, paramNames, paramValues, callback) {\n  if (route.indexRoute) {\n    callback(null, route.indexRoute);\n  } else if (route.getIndexRoute) {\n    var partialNextState = {\n      location: location,\n      params: createParams(paramNames, paramValues)\n    };\n\n    var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) {\n      callback(error, !error && createRoutes(indexRoute)[0]);\n    });\n\n    if (isPromise(indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) {\n      return callback(null, createRoutes(indexRoute)[0]);\n    }, callback);\n  } else if (route.childRoutes || route.getChildRoutes) {\n    var onChildRoutes = function onChildRoutes(error, childRoutes) {\n      if (error) {\n        callback(error);\n        return;\n      }\n\n      var pathless = childRoutes.filter(function (childRoute) {\n        return !childRoute.path;\n      });\n\n      loopAsync(pathless.length, function (index, next, done) {\n        getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) {\n          if (error || indexRoute) {\n            var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]);\n            done(error, routes);\n          } else {\n            next();\n          }\n        });\n      }, function (err, routes) {\n        callback(null, routes);\n      });\n    };\n\n    var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes);\n    if (result) {\n      onChildRoutes.apply(undefined, result);\n    }\n  } else {\n    callback();\n  }\n}\n\nfunction assignParams(params, paramNames, paramValues) {\n  return paramNames.reduce(function (params, paramName, index) {\n    var paramValue = paramValues && paramValues[index];\n\n    if (Array.isArray(params[paramName])) {\n      params[paramName].push(paramValue);\n    } else if (paramName in params) {\n      params[paramName] = [params[paramName], paramValue];\n    } else {\n      params[paramName] = paramValue;\n    }\n\n    return params;\n  }, params);\n}\n\nfunction createParams(paramNames, paramValues) {\n  return assignParams({}, paramNames, paramValues);\n}\n\nfunction matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) {\n  var pattern = route.path || '';\n\n  if (pattern.charAt(0) === '/') {\n    remainingPathname = location.pathname;\n    paramNames = [];\n    paramValues = [];\n  }\n\n  // Only try to match the path if the route actually has a pattern, and if\n  // we're not just searching for potential nested absolute paths.\n  if (remainingPathname !== null && pattern) {\n    try {\n      var matched = matchPattern(pattern, remainingPathname);\n      if (matched) {\n        remainingPathname = matched.remainingPathname;\n        paramNames = [].concat(paramNames, matched.paramNames);\n        paramValues = [].concat(paramValues, matched.paramValues);\n      } else {\n        remainingPathname = null;\n      }\n    } catch (error) {\n      callback(error);\n    }\n\n    // By assumption, pattern is non-empty here, which is the prerequisite for\n    // actually terminating a match.\n    if (remainingPathname === '') {\n      var match = {\n        routes: [route],\n        params: createParams(paramNames, paramValues)\n      };\n\n      getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {\n        if (error) {\n          callback(error);\n        } else {\n          if (Array.isArray(indexRoute)) {\n            var _match$routes;\n\n            process.env.NODE_ENV !== 'production' ? warning(indexRoute.every(function (route) {\n              return !route.path;\n            }), 'Index routes should not have paths') : void 0;\n            (_match$routes = match.routes).push.apply(_match$routes, indexRoute);\n          } else if (indexRoute) {\n            process.env.NODE_ENV !== 'production' ? warning(!indexRoute.path, 'Index routes should not have paths') : void 0;\n            match.routes.push(indexRoute);\n          }\n\n          callback(null, match);\n        }\n      });\n\n      return;\n    }\n  }\n\n  if (remainingPathname != null || route.childRoutes) {\n    // Either a) this route matched at least some of the path or b)\n    // we don't have to load this route's children asynchronously. In\n    // either case continue checking for matches in the subtree.\n    var onChildRoutes = function onChildRoutes(error, childRoutes) {\n      if (error) {\n        callback(error);\n      } else if (childRoutes) {\n        // Check the child routes to see if any of them match.\n        matchRoutes(childRoutes, location, function (error, match) {\n          if (error) {\n            callback(error);\n          } else if (match) {\n            // A child route matched! Augment the match and pass it up the stack.\n            match.routes.unshift(route);\n            callback(null, match);\n          } else {\n            callback();\n          }\n        }, remainingPathname, paramNames, paramValues);\n      } else {\n        callback();\n      }\n    };\n\n    var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes);\n    if (result) {\n      onChildRoutes.apply(undefined, result);\n    }\n  } else {\n    callback();\n  }\n}\n\n/**\n * Asynchronously matches the given location to a set of routes and calls\n * callback(error, state) when finished. The state object will have the\n * following properties:\n *\n * - routes       An array of routes that matched, in hierarchical order\n * - params       An object of URL parameters\n *\n * Note: This operation may finish synchronously if no routes have an\n * asynchronous getChildRoutes method.\n */\nexport default function matchRoutes(routes, location, callback, remainingPathname) {\n  var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];\n  var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n\n  if (remainingPathname === undefined) {\n    // TODO: This is a little bit ugly, but it works around a quirk in history\n    // that strips the leading slash from pathnames when using basenames with\n    // trailing slashes.\n    if (location.pathname.charAt(0) !== '/') {\n      location = _extends({}, location, {\n        pathname: '/' + location.pathname\n      });\n    }\n    remainingPathname = location.pathname;\n  }\n\n  loopAsync(routes.length, function (index, next, done) {\n    matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) {\n      if (error || match) {\n        done(error, match);\n      } else {\n        next();\n      }\n    });\n  }, callback);\n}", "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; };\n\nimport warning from './routerWarning';\nimport computeChangedRoutes from './computeChangedRoutes';\nimport getTransitionUtils from './TransitionUtils';\nimport _isActive from './isActive';\nimport getComponents from './getComponents';\nimport matchRoutes from './matchRoutes';\n\nfunction hasAnyProperties(object) {\n  for (var p in object) {\n    if (Object.prototype.hasOwnProperty.call(object, p)) return true;\n  }return false;\n}\n\nexport default function createTransitionManager(history, routes) {\n  var state = {};\n\n  var _getTransitionUtils = getTransitionUtils(),\n      runEnterHooks = _getTransitionUtils.runEnterHooks,\n      runChangeHooks = _getTransitionUtils.runChangeHooks,\n      runLeaveHooks = _getTransitionUtils.runLeaveHooks;\n\n  // Signature should be (location, indexOnly), but needs to support (path,\n  // query, indexOnly)\n\n\n  function isActive(location, indexOnly) {\n    location = history.createLocation(location);\n\n    return _isActive(location, indexOnly, state.location, state.routes, state.params);\n  }\n\n  var partialNextState = void 0;\n\n  function match(location, callback) {\n    if (partialNextState && partialNextState.location === location) {\n      // Continue from where we left off.\n      finishMatch(partialNextState, callback);\n    } else {\n      matchRoutes(routes, location, function (error, nextState) {\n        if (error) {\n          callback(error);\n        } else if (nextState) {\n          finishMatch(_extends({}, nextState, { location: location }), callback);\n        } else {\n          callback();\n        }\n      });\n    }\n  }\n\n  function finishMatch(nextState, callback) {\n    var _computeChangedRoutes = computeChangedRoutes(state, nextState),\n        leaveRoutes = _computeChangedRoutes.leaveRoutes,\n        changeRoutes = _computeChangedRoutes.changeRoutes,\n        enterRoutes = _computeChangedRoutes.enterRoutes;\n\n    runLeaveHooks(leaveRoutes, state);\n\n    // Tear down confirmation hooks for left routes\n    leaveRoutes.filter(function (route) {\n      return enterRoutes.indexOf(route) === -1;\n    }).forEach(removeListenBeforeHooksForRoute);\n\n    // change and enter hooks are run in series\n    runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) {\n      if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);\n\n      runEnterHooks(enterRoutes, nextState, finishEnterHooks);\n    });\n\n    function finishEnterHooks(error, redirectInfo) {\n      if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);\n\n      // TODO: Fetch components after state is updated.\n      getComponents(nextState, function (error, components) {\n        if (error) {\n          callback(error);\n        } else {\n          // TODO: Make match a pure function and have some other API\n          // for \"match and update state\".\n          callback(null, null, state = _extends({}, nextState, { components: components }));\n        }\n      });\n    }\n\n    function handleErrorOrRedirect(error, redirectInfo) {\n      if (error) callback(error);else callback(null, redirectInfo);\n    }\n  }\n\n  var RouteGuid = 1;\n\n  function getRouteID(route) {\n    var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n    return route.__id__ || create && (route.__id__ = RouteGuid++);\n  }\n\n  var RouteHooks = Object.create(null);\n\n  function getRouteHooksForRoutes(routes) {\n    return routes.map(function (route) {\n      return RouteHooks[getRouteID(route)];\n    }).filter(function (hook) {\n      return hook;\n    });\n  }\n\n  function transitionHook(location, callback) {\n    matchRoutes(routes, location, function (error, nextState) {\n      if (nextState == null) {\n        // TODO: We didn't actually match anything, but hang\n        // onto error/nextState so we don't have to matchRoutes\n        // again in the listen callback.\n        callback();\n        return;\n      }\n\n      // Cache some state here so we don't have to\n      // matchRoutes() again in the listen callback.\n      partialNextState = _extends({}, nextState, { location: location });\n\n      var hooks = getRouteHooksForRoutes(computeChangedRoutes(state, partialNextState).leaveRoutes);\n\n      var result = void 0;\n      for (var i = 0, len = hooks.length; result == null && i < len; ++i) {\n        // Passing the location arg here indicates to\n        // the user that this is a transition hook.\n        result = hooks[i](location);\n      }\n\n      callback(result);\n    });\n  }\n\n  /* istanbul ignore next: untestable with Karma */\n  function beforeUnloadHook() {\n    // Synchronously check to see if any route hooks want\n    // to prevent the current window/tab from closing.\n    if (state.routes) {\n      var hooks = getRouteHooksForRoutes(state.routes);\n\n      var message = void 0;\n      for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) {\n        // Passing no args indicates to the user that this is a\n        // beforeunload hook. We don't know the next location.\n        message = hooks[i]();\n      }\n\n      return message;\n    }\n  }\n\n  var unlistenBefore = void 0,\n      unlistenBeforeUnload = void 0;\n\n  function removeListenBeforeHooksForRoute(route) {\n    var routeID = getRouteID(route);\n    if (!routeID) {\n      return;\n    }\n\n    delete RouteHooks[routeID];\n\n    if (!hasAnyProperties(RouteHooks)) {\n      // teardown transition & beforeunload hooks\n      if (unlistenBefore) {\n        unlistenBefore();\n        unlistenBefore = null;\n      }\n\n      if (unlistenBeforeUnload) {\n        unlistenBeforeUnload();\n        unlistenBeforeUnload = null;\n      }\n    }\n  }\n\n  /**\n   * Registers the given hook function to run before leaving the given route.\n   *\n   * During a normal transition, the hook function receives the next location\n   * as its only argument and can return either a prompt message (string) to show the user,\n   * to make sure they want to leave the page; or `false`, to prevent the transition.\n   * Any other return value will have no effect.\n   *\n   * During the beforeunload event (in browsers) the hook receives no arguments.\n   * In this case it must return a prompt message to prevent the transition.\n   *\n   * Returns a function that may be used to unbind the listener.\n   */\n  function listenBeforeLeavingRoute(route, hook) {\n    var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks);\n    var routeID = getRouteID(route, true);\n\n    RouteHooks[routeID] = hook;\n\n    if (thereWereNoRouteHooks) {\n      // setup transition & beforeunload hooks\n      unlistenBefore = history.listenBefore(transitionHook);\n\n      if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook);\n    }\n\n    return function () {\n      removeListenBeforeHooksForRoute(route);\n    };\n  }\n\n  /**\n   * This is the API for stateful environments. As the location\n   * changes, we update state and call the listener. We can also\n   * gracefully handle errors and redirects.\n   */\n  function listen(listener) {\n    function historyListener(location) {\n      if (state.location === location) {\n        listener(null, state);\n      } else {\n        match(location, function (error, redirectLocation, nextState) {\n          if (error) {\n            listener(error);\n          } else if (redirectLocation) {\n            history.replace(redirectLocation);\n          } else if (nextState) {\n            listener(null, nextState);\n          } else {\n            process.env.NODE_ENV !== 'production' ? warning(false, 'Location \"%s\" did not match any routes', location.pathname + location.search + location.hash) : void 0;\n          }\n        });\n      }\n    }\n\n    // TODO: Only use a single history listener. Otherwise we'll end up with\n    // multiple concurrent calls to match.\n\n    // Set up the history listener first in case the initial match redirects.\n    var unsubscribe = history.listen(historyListener);\n\n    if (state.location) {\n      // Picking up on a matchContext.\n      listener(null, state);\n    } else {\n      historyListener(history.getCurrentLocation());\n    }\n\n    return unsubscribe;\n  }\n\n  return {\n    isActive: isActive,\n    match: match,\n    listenBeforeLeavingRoute: listenBeforeLeavingRoute,\n    listen: listen\n  };\n}", "import { func, object, arrayOf, oneOfType, element, shape, elementType } from 'prop-types';\n\nexport function falsy(props, propName, componentName) {\n  if (props[propName]) return new Error('<' + componentName + '> should not have a \"' + propName + '\" prop');\n}\n\nexport var history = shape({\n  listen: func.isRequired,\n  push: func.isRequired,\n  replace: func.isRequired,\n  go: func.isRequired,\n  goBack: func.isRequired,\n  goForward: func.isRequired\n});\n\nexport var component = elementType;\nexport var components = oneOfType([component, object]);\nexport var route = oneOfType([object, element]);\nexport var routes = oneOfType([route, arrayOf(route)]);", "/** @license React v16.13.0\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n", "import { getParamNames } from './PatternUtils';\n\n/**\n * Extracts an object of params the given route cares about from\n * the given params object.\n */\nfunction getRouteParams(route, params) {\n  var routeParams = {};\n\n  if (!route.path) return routeParams;\n\n  getParamNames(route.path).forEach(function (p) {\n    if (Object.prototype.hasOwnProperty.call(params, p)) {\n      routeParams[p] = params[p];\n    }\n  });\n\n  return routeParams;\n}\n\nexport default getRouteParams;", "import React from 'react';\nimport PropTypes from 'prop-types';\n\n// Works around issues with context updates failing to propagate.\n// Caveat: the context value is expected to never change its identity.\n// https://github.com/facebook/react/issues/2517\n// https://github.com/reactjs/react-router/issues/470\n\nvar contextProviderShape = PropTypes.shape({\n  subscribe: PropTypes.func.isRequired,\n  eventIndex: PropTypes.number.isRequired\n});\n\nfunction makeContextName(name) {\n  return '@@contextSubscriber/' + name;\n}\n\nvar prefixUnsafeLifecycleMethods = typeof React.forwardRef !== 'undefined';\n\nexport function ContextProvider(name) {\n  var _childContextTypes, _config;\n\n  var contextName = makeContextName(name);\n  var listenersKey = contextName + '/listeners';\n  var eventIndexKey = contextName + '/eventIndex';\n  var subscribeKey = contextName + '/subscribe';\n\n  var config = (_config = {\n    childContextTypes: (_childContextTypes = {}, _childContextTypes[contextName] = contextProviderShape.isRequired, _childContextTypes),\n\n    getChildContext: function getChildContext() {\n      var _ref;\n\n      return _ref = {}, _ref[contextName] = {\n        eventIndex: this[eventIndexKey],\n        subscribe: this[subscribeKey]\n      }, _ref;\n    },\n\n\n    // this method will be updated to UNSAFE_componentWillMount below for React versions >= 16.3\n    componentWillMount: function componentWillMount() {\n      this[listenersKey] = [];\n      this[eventIndexKey] = 0;\n    },\n\n\n    // this method will be updated to UNSAFE_componentWillReceiveProps below for React versions >= 16.3\n    componentWillReceiveProps: function componentWillReceiveProps() {\n      this[eventIndexKey]++;\n    },\n    componentDidUpdate: function componentDidUpdate() {\n      var _this = this;\n\n      this[listenersKey].forEach(function (listener) {\n        return listener(_this[eventIndexKey]);\n      });\n    }\n  }, _config[subscribeKey] = function (listener) {\n    var _this2 = this;\n\n    // No need to immediately call listener here.\n    this[listenersKey].push(listener);\n\n    return function () {\n      _this2[listenersKey] = _this2[listenersKey].filter(function (item) {\n        return item !== listener;\n      });\n    };\n  }, _config);\n\n  if (prefixUnsafeLifecycleMethods) {\n    config.UNSAFE_componentWillMount = config.componentWillMount;\n    config.UNSAFE_componentWillReceiveProps = config.componentWillReceiveProps;\n    delete config.componentWillMount;\n    delete config.componentWillReceiveProps;\n  }\n  return config;\n}\n\nexport function ContextSubscriber(name) {\n  var _contextTypes, _config2;\n\n  var contextName = makeContextName(name);\n  var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex';\n  var handleContextUpdateKey = contextName + '/handleContextUpdate';\n  var unsubscribeKey = contextName + '/unsubscribe';\n\n  var config = (_config2 = {\n    contextTypes: (_contextTypes = {}, _contextTypes[contextName] = contextProviderShape, _contextTypes),\n\n    getInitialState: function getInitialState() {\n      var _ref2;\n\n      if (!this.context[contextName]) {\n        return {};\n      }\n\n      return _ref2 = {}, _ref2[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _ref2;\n    },\n    componentDidMount: function componentDidMount() {\n      if (!this.context[contextName]) {\n        return;\n      }\n\n      this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]);\n    },\n\n\n    // this method will be updated to UNSAFE_componentWillReceiveProps below for React versions >= 16.3\n    componentWillReceiveProps: function componentWillReceiveProps() {\n      var _setState;\n\n      if (!this.context[contextName]) {\n        return;\n      }\n\n      this.setState((_setState = {}, _setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _setState));\n    },\n    componentWillUnmount: function componentWillUnmount() {\n      if (!this[unsubscribeKey]) {\n        return;\n      }\n\n      this[unsubscribeKey]();\n      this[unsubscribeKey] = null;\n    }\n  }, _config2[handleContextUpdateKey] = function (eventIndex) {\n    if (eventIndex !== this.state[lastRenderedEventIndexKey]) {\n      var _setState2;\n\n      this.setState((_setState2 = {}, _setState2[lastRenderedEventIndexKey] = eventIndex, _setState2));\n    }\n  }, _config2);\n\n  if (prefixUnsafeLifecycleMethods) {\n    config.UNSAFE_componentWillReceiveProps = config.componentWillReceiveProps;\n    delete config.componentWillReceiveProps;\n  }\n  return config;\n}", "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; };\n\nvar _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; };\n\nimport invariant from 'invariant';\nimport React from 'react';\nimport { isValidElementType } from 'react-is';\nimport createReactClass from 'create-react-class';\nimport { array, func, object } from 'prop-types';\n\nimport getRouteParams from './getRouteParams';\nimport { ContextProvider } from './ContextUtils';\nimport { isReactChildren } from './RouteUtils';\n\n/**\n * A <RouterContext> renders the component tree for a given router state\n * and sets the history object and the current location in context.\n */\nvar RouterContext = createReactClass({\n  displayName: 'RouterContext',\n\n  mixins: [ContextProvider('router')],\n\n  propTypes: {\n    router: object.isRequired,\n    location: object.isRequired,\n    routes: array.isRequired,\n    params: object.isRequired,\n    components: array.isRequired,\n    createElement: func.isRequired\n  },\n\n  getDefaultProps: function getDefaultProps() {\n    return {\n      createElement: React.createElement\n    };\n  },\n\n\n  childContextTypes: {\n    router: object.isRequired\n  },\n\n  getChildContext: function getChildContext() {\n    return {\n      router: this.props.router\n    };\n  },\n  createElement: function createElement(component, props) {\n    return component == null ? null : this.props.createElement(component, props);\n  },\n  render: function render() {\n    var _this = this;\n\n    var _props = this.props,\n        location = _props.location,\n        routes = _props.routes,\n        params = _props.params,\n        components = _props.components,\n        router = _props.router;\n\n    var element = null;\n\n    if (components) {\n      element = components.reduceRight(function (element, components, index) {\n        if (components == null) return element; // Don't create new children; use the grandchildren.\n\n        var route = routes[index];\n        var routeParams = getRouteParams(route, params);\n        var props = {\n          location: location,\n          params: params,\n          route: route,\n          router: router,\n          routeParams: routeParams,\n          routes: routes\n        };\n\n        if (isReactChildren(element)) {\n          props.children = element;\n        } else if (element) {\n          for (var prop in element) {\n            if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop];\n          }\n        }\n\n        // Handle components is object for { [name]: component } but not valid element\n        // type of react, such as React.memo, React.lazy and so on.\n        if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object' && !isValidElementType(components)) {\n          var elements = {};\n\n          for (var key in components) {\n            if (Object.prototype.hasOwnProperty.call(components, key)) {\n              // Pass through the key as a prop to createElement to allow\n              // custom createElement functions to know which named component\n              // they're rendering, for e.g. matching up to fetched data.\n              elements[key] = _this.createElement(components[key], _extends({\n                key: key }, props));\n            }\n          }\n\n          return elements;\n        }\n\n        return _this.createElement(components, props);\n      }, element);\n    }\n\n    !(element === null || element === false || React.isValidElement(element)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The root route must render a single element') : invariant(false) : void 0;\n\n    return element;\n  }\n});\n\nexport default RouterContext;", "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; };\n\nexport function createRouterObject(history, transitionManager, state) {\n  var router = _extends({}, history, {\n    setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute,\n    isActive: transitionManager.isActive\n  });\n\n  return assignRouterState(router, state);\n}\n\nexport function assignRouterState(router, _ref) {\n  var location = _ref.location,\n      params = _ref.params,\n      routes = _ref.routes;\n\n  router.location = location;\n  router.params = params;\n  router.routes = routes;\n\n  return router;\n}", "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; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport invariant from 'invariant';\nimport React from 'react';\nimport createReactClass from 'create-react-class';\nimport { func, object } from 'prop-types';\n\nimport _createTransitionManager from './createTransitionManager';\nimport { routes } from './InternalPropTypes';\nimport RouterContext from './RouterContext';\nimport { createRoutes } from './RouteUtils';\nimport { createRouterObject as _createRouterObject, assignRouterState } from './RouterUtils';\nimport warning from './routerWarning';\n\nvar propTypes = {\n  history: object,\n  children: routes,\n  routes: routes, // alias for children\n  render: func,\n  createElement: func,\n  onError: func,\n  onUpdate: func,\n\n  // PRIVATE: For client-side rehydration of server match.\n  matchContext: object\n};\n\nvar prefixUnsafeLifecycleMethods = typeof React.forwardRef !== 'undefined';\n\n/**\n * A <Router> is a high-level API for automatically setting up\n * a router that renders a <RouterContext> with all the props\n * it needs each time the URL changes.\n */\nvar Router = createReactClass({\n  displayName: 'Router',\n\n  propTypes: propTypes,\n\n  getDefaultProps: function getDefaultProps() {\n    return {\n      render: function render(props) {\n        return React.createElement(RouterContext, props);\n      }\n    };\n  },\n  getInitialState: function getInitialState() {\n    return {\n      location: null,\n      routes: null,\n      params: null,\n      components: null\n    };\n  },\n  handleError: function handleError(error) {\n    if (this.props.onError) {\n      this.props.onError.call(this, error);\n    } else {\n      // Throw errors by default so we don't silently swallow them!\n      throw error; // This error probably occurred in getChildRoutes or getComponents.\n    }\n  },\n  createRouterObject: function createRouterObject(state) {\n    var matchContext = this.props.matchContext;\n\n    if (matchContext) {\n      return matchContext.router;\n    }\n\n    var history = this.props.history;\n\n    return _createRouterObject(history, this.transitionManager, state);\n  },\n  createTransitionManager: function createTransitionManager() {\n    var matchContext = this.props.matchContext;\n\n    if (matchContext) {\n      return matchContext.transitionManager;\n    }\n\n    var history = this.props.history;\n    var _props = this.props,\n        routes = _props.routes,\n        children = _props.children;\n\n\n    !history.getCurrentLocation ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You have provided a history object created with history v4.x or v2.x ' + 'and earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please change to history v3.x.') : invariant(false) : void 0;\n\n    return _createTransitionManager(history, createRoutes(routes || children));\n  },\n\n\n  // this method will be updated to UNSAFE_componentWillMount below for React versions >= 16.3\n  componentWillMount: function componentWillMount() {\n    var _this = this;\n\n    this.transitionManager = this.createTransitionManager();\n    this.router = this.createRouterObject(this.state);\n\n    this._unlisten = this.transitionManager.listen(function (error, state) {\n      if (error) {\n        _this.handleError(error);\n      } else {\n        // Keep the identity of this.router because of a caveat in ContextUtils:\n        // they only work if the object identity is preserved.\n        assignRouterState(_this.router, state);\n        _this.setState(state, _this.props.onUpdate);\n      }\n    });\n  },\n\n\n  // this method will be updated to UNSAFE_componentWillReceiveProps below for React versions >= 16.3\n  /* istanbul ignore next: sanity check */\n  componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n    process.env.NODE_ENV !== 'production' ? warning(nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored') : void 0;\n\n    process.env.NODE_ENV !== 'production' ? warning((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change <Router routes>; it will be ignored') : void 0;\n  },\n  componentWillUnmount: function componentWillUnmount() {\n    if (this._unlisten) this._unlisten();\n  },\n  render: function render() {\n    var _state = this.state,\n        location = _state.location,\n        routes = _state.routes,\n        params = _state.params,\n        components = _state.components;\n\n    var _props2 = this.props,\n        createElement = _props2.createElement,\n        render = _props2.render,\n        props = _objectWithoutProperties(_props2, ['createElement', 'render']);\n\n    if (location == null) return null; // Async match\n\n    // Only forward non-Router-specific props to routing context, as those are\n    // the only ones that might be custom routing context props.\n    Object.keys(propTypes).forEach(function (propType) {\n      return delete props[propType];\n    });\n\n    return render(_extends({}, props, {\n      router: this.router,\n      location: location,\n      routes: routes,\n      params: params,\n      components: components,\n      createElement: createElement\n    }));\n  }\n});\n\nif (prefixUnsafeLifecycleMethods) {\n  Router.prototype.UNSAFE_componentWillReceiveProps = Router.prototype.componentWillReceiveProps;\n  Router.prototype.UNSAFE_componentWillMount = Router.prototype.componentWillMount;\n  delete Router.prototype.componentWillReceiveProps;\n  delete Router.prototype.componentWillMount;\n}\n\nexport default Router;", "import { func, object, shape, string } from 'prop-types';\n\nexport var routerShape = shape({\n  push: func.isRequired,\n  replace: func.isRequired,\n  go: func.isRequired,\n  goBack: func.isRequired,\n  goForward: func.isRequired,\n  setRouteLeaveHook: func.isRequired,\n  isActive: func.isRequired\n});\n\nexport var locationShape = shape({\n  pathname: string.isRequired,\n  search: string.isRequired,\n  state: object,\n  action: string.isRequired,\n  key: string\n});", "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; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from 'react';\nimport createReactClass from 'create-react-class';\nimport { bool, object, string, func, oneOfType, shape, elementType } from 'prop-types';\nimport invariant from 'invariant';\nimport { routerShape } from './PropTypes';\nimport { ContextSubscriber } from './ContextUtils';\n\nfunction isLeftClickEvent(event) {\n  return event.button === 0;\n}\n\nfunction isModifiedEvent(event) {\n  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\n// TODO: De-duplicate against hasAnyProperties in createTransitionManager.\nfunction isEmptyObject(object) {\n  for (var p in object) {\n    if (Object.prototype.hasOwnProperty.call(object, p)) return false;\n  }return true;\n}\n\nfunction resolveToLocation(to, router) {\n  return typeof to === 'function' ? to(router.location) : to;\n}\n\n/**\n * A <Link> is used to create an <a> element that links to a route.\n * When that route is active, the link gets the value of its\n * activeClassName prop.\n *\n * For example, assuming you have the following route:\n *\n *   <Route path=\"/posts/:postID\" component={Post} />\n *\n * You could use the following component to link to that route:\n *\n *   <Link to={`/posts/${post.id}`} />\n */\nvar Link = createReactClass({\n  displayName: 'Link',\n\n  mixins: [ContextSubscriber('router')],\n\n  contextTypes: {\n    router: routerShape\n  },\n\n  propTypes: {\n    to: oneOfType([string, object, func]),\n    activeStyle: object,\n    activeClassName: string,\n    onlyActiveOnIndex: bool.isRequired,\n    onClick: func,\n    target: string,\n    innerRef: oneOfType([string, func, shape({ current: elementType })])\n  },\n\n  getDefaultProps: function getDefaultProps() {\n    return {\n      onlyActiveOnIndex: false,\n      style: {}\n    };\n  },\n  handleClick: function handleClick(event) {\n    if (this.props.onClick) this.props.onClick(event);\n\n    if (event.defaultPrevented) return;\n\n    var router = this.context.router;\n\n    !router ? process.env.NODE_ENV !== 'production' ? invariant(false, '<Link>s rendered outside of a router context cannot navigate.') : invariant(false) : void 0;\n\n    if (isModifiedEvent(event) || !isLeftClickEvent(event)) return;\n\n    // If target prop is set (e.g. to \"_blank\"), let browser handle link.\n    /* istanbul ignore if: untestable with Karma */\n    if (this.props.target) return;\n\n    event.preventDefault();\n\n    router.push(resolveToLocation(this.props.to, router));\n  },\n  render: function render() {\n    var _props = this.props,\n        to = _props.to,\n        activeClassName = _props.activeClassName,\n        activeStyle = _props.activeStyle,\n        onlyActiveOnIndex = _props.onlyActiveOnIndex,\n        innerRef = _props.innerRef,\n        props = _objectWithoutProperties(_props, ['to', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex', 'innerRef']);\n\n    // Ignore if rendered outside the context of router to simplify unit testing.\n\n\n    var router = this.context.router;\n\n\n    if (router) {\n      // If user does not specify a `to` prop, return an empty anchor tag.\n      if (!to) {\n        return React.createElement('a', _extends({}, props, { ref: innerRef }));\n      }\n\n      var toLocation = resolveToLocation(to, router);\n      props.href = router.createHref(toLocation);\n\n      if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) {\n        if (router.isActive(toLocation, onlyActiveOnIndex)) {\n          if (activeClassName) {\n            if (props.className) {\n              props.className += ' ' + activeClassName;\n            } else {\n              props.className = activeClassName;\n            }\n          }\n\n          if (activeStyle) props.style = _extends({}, props.style, activeStyle);\n        }\n      }\n    }\n\n    return React.createElement('a', _extends({}, props, { onClick: this.handleClick, ref: innerRef }));\n  }\n});\n\nexport default Link;", "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; };\n\nimport React from 'react';\nimport createReactClass from 'create-react-class';\nimport Link from './Link';\n\n/**\n * An <IndexLink> is used to link to an <IndexRoute>.\n */\nvar IndexLink = createReactClass({\n  displayName: 'IndexLink',\n\n  render: function render() {\n    return React.createElement(Link, _extends({}, this.props, { onlyActiveOnIndex: true }));\n  }\n});\n\nexport default IndexLink;", "/** @license React v16.8.6\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?Symbol.for(\"react.memo\"):\n60115,r=b?Symbol.for(\"react.lazy\"):60116;function t(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;\nexports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||\"object\"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};\nexports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};\nexports.isSuspense=function(a){return t(a)===p};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n", "'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n  childContextTypes: true,\n  contextType: true,\n  contextTypes: true,\n  defaultProps: true,\n  displayName: true,\n  getDefaultProps: true,\n  getDerivedStateFromError: true,\n  getDerivedStateFromProps: true,\n  mixins: true,\n  propTypes: true,\n  type: true\n};\nvar KNOWN_STATICS = {\n  name: true,\n  length: true,\n  prototype: true,\n  caller: true,\n  callee: true,\n  arguments: true,\n  arity: true\n};\nvar FORWARD_REF_STATICS = {\n  '$$typeof': true,\n  render: true,\n  defaultProps: true,\n  displayName: true,\n  propTypes: true\n};\nvar MEMO_STATICS = {\n  '$$typeof': true,\n  compare: true,\n  defaultProps: true,\n  displayName: true,\n  propTypes: true,\n  type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n  // React v16.11 and below\n  if (reactIs.isMemo(component)) {\n    return MEMO_STATICS;\n  } // React v16.12 and above\n\n\n  return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n  if (typeof sourceComponent !== 'string') {\n    // don't hoist over string (html) components\n    if (objectPrototype) {\n      var inheritedComponent = getPrototypeOf(sourceComponent);\n\n      if (inheritedComponent && inheritedComponent !== objectPrototype) {\n        hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n      }\n    }\n\n    var keys = getOwnPropertyNames(sourceComponent);\n\n    if (getOwnPropertySymbols) {\n      keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n    }\n\n    var targetStatics = getStatics(targetComponent);\n    var sourceStatics = getStatics(sourceComponent);\n\n    for (var i = 0; i < keys.length; ++i) {\n      var key = keys[i];\n\n      if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n        var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n        try {\n          // Avoid failures from read-only properties\n          defineProperty(targetComponent, key, descriptor);\n        } catch (e) {}\n      }\n    }\n  }\n\n  return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n", "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; };\n\nimport invariant from 'invariant';\nimport React from 'react';\nimport createReactClass from 'create-react-class';\nimport hoistStatics from 'hoist-non-react-statics';\nimport { ContextSubscriber } from './ContextUtils';\nimport { routerShape } from './PropTypes';\n\nfunction getDisplayName(WrappedComponent) {\n  return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n}\n\nexport default function withRouter(WrappedComponent, options) {\n  var withRef = options && options.withRef;\n\n  var WithRouter = createReactClass({\n    displayName: 'WithRouter',\n\n    mixins: [ContextSubscriber('router')],\n\n    contextTypes: { router: routerShape },\n    propTypes: { router: routerShape },\n\n    getWrappedInstance: function getWrappedInstance() {\n      !withRef ? process.env.NODE_ENV !== 'production' ? invariant(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : invariant(false) : void 0;\n\n      return this.wrappedInstance;\n    },\n    render: function render() {\n      var _this = this;\n\n      var router = this.props.router || this.context.router;\n      if (!router) {\n        return React.createElement(WrappedComponent, this.props);\n      }\n\n      var params = router.params,\n          location = router.location,\n          routes = router.routes;\n\n      var props = _extends({}, this.props, { router: router, params: params, location: location, routes: routes });\n\n      if (withRef) {\n        props.ref = function (c) {\n          _this.wrappedInstance = c;\n        };\n      }\n\n      return React.createElement(WrappedComponent, props);\n    }\n  });\n\n  WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')';\n  WithRouter.WrappedComponent = WrappedComponent;\n\n  return hoistStatics(WithRouter, WrappedComponent);\n}", "import createReactClass from 'create-react-class';\nimport { string, object } from 'prop-types';\nimport invariant from 'invariant';\nimport { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';\nimport { formatPattern } from './PatternUtils';\nimport { falsy } from './InternalPropTypes';\n\n/**\n * A <Redirect> is used to declare another URL path a client should\n * be sent to when they request a given URL.\n *\n * Redirects are placed alongside routes in the route configuration\n * and are traversed in the same manner.\n */\n/* eslint-disable react/require-render-return */\nvar Redirect = createReactClass({\n  displayName: 'Redirect',\n\n  statics: {\n    createRouteFromReactElement: function createRouteFromReactElement(element) {\n      var route = _createRouteFromReactElement(element);\n\n      if (route.from) route.path = route.from;\n\n      route.onEnter = function (nextState, replace) {\n        var location = nextState.location,\n            params = nextState.params;\n\n\n        var pathname = void 0;\n        if (route.to.charAt(0) === '/') {\n          pathname = formatPattern(route.to, params);\n        } else if (!route.to) {\n          pathname = location.pathname;\n        } else {\n          var routeIndex = nextState.routes.indexOf(route);\n          var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1);\n          var pattern = parentPattern.replace(/\\/*$/, '/') + route.to;\n          pathname = formatPattern(pattern, params);\n        }\n\n        replace({\n          pathname: pathname,\n          query: route.query || location.query,\n          state: route.state || location.state\n        });\n      };\n\n      return route;\n    },\n    getRoutePattern: function getRoutePattern(routes, routeIndex) {\n      var parentPattern = '';\n\n      for (var i = routeIndex; i >= 0; i--) {\n        var route = routes[i];\n        var pattern = route.path || '';\n\n        parentPattern = pattern.replace(/\\/*$/, '/') + parentPattern;\n\n        if (pattern.indexOf('/') === 0) break;\n      }\n\n      return '/' + parentPattern;\n    }\n  },\n\n  propTypes: {\n    path: string,\n    from: string, // Alias for path\n    to: string.isRequired,\n    query: object,\n    state: object,\n    onEnter: falsy,\n    children: falsy\n  },\n\n  /* istanbul ignore next: sanity check */\n  render: function render() {\n    !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<Redirect> elements are for router configuration only and should not be rendered') : invariant(false) : void 0;\n  }\n});\n\nexport default Redirect;", "import createReactClass from 'create-react-class';\nimport { string, object } from 'prop-types';\nimport warning from './routerWarning';\nimport invariant from 'invariant';\nimport Redirect from './Redirect';\nimport { falsy } from './InternalPropTypes';\n\n/**\n * An <IndexRedirect> is used to redirect from an indexRoute.\n */\n/* eslint-disable react/require-render-return */\nvar IndexRedirect = createReactClass({\n  displayName: 'IndexRedirect',\n\n  statics: {\n    createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {\n      /* istanbul ignore else: sanity check */\n      if (parentRoute) {\n        parentRoute.indexRoute = Redirect.createRouteFromReactElement(element);\n      } else {\n        process.env.NODE_ENV !== 'production' ? warning(false, 'An <IndexRedirect> does not make sense at the root of your route config') : void 0;\n      }\n    }\n  },\n\n  propTypes: {\n    to: string.isRequired,\n    query: object,\n    state: object,\n    onEnter: falsy,\n    children: falsy\n  },\n\n  /* istanbul ignore next: sanity check */\n  render: function render() {\n    !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<IndexRedirect> elements are for router configuration only and should not be rendered') : invariant(false) : void 0;\n  }\n});\n\nexport default IndexRedirect;", "import createReactClass from 'create-react-class';\nimport { func } from 'prop-types';\nimport warning from './routerWarning';\nimport invariant from 'invariant';\nimport { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';\nimport { component, components, falsy } from './InternalPropTypes';\n\n/**\n * An <IndexRoute> is used to specify its parent's <Route indexRoute> in\n * a JSX route config.\n */\n/* eslint-disable react/require-render-return */\nvar IndexRoute = createReactClass({\n  displayName: 'IndexRoute',\n\n  statics: {\n    createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {\n      /* istanbul ignore else: sanity check */\n      if (parentRoute) {\n        parentRoute.indexRoute = _createRouteFromReactElement(element);\n      } else {\n        process.env.NODE_ENV !== 'production' ? warning(false, 'An <IndexRoute> does not make sense at the root of your route config') : void 0;\n      }\n    }\n  },\n\n  propTypes: {\n    path: falsy,\n    component: component,\n    components: components,\n    getComponent: func,\n    getComponents: func\n  },\n\n  /* istanbul ignore next: sanity check */\n  render: function render() {\n    !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<IndexRoute> elements are for router configuration only and should not be rendered') : invariant(false) : void 0;\n  }\n});\n\nexport default IndexRoute;", "import createReactClass from 'create-react-class';\nimport { string, func } from 'prop-types';\nimport invariant from 'invariant';\nimport { createRouteFromReactElement } from './RouteUtils';\nimport { component, components } from './InternalPropTypes';\n\n/**\n * A <Route> is used to declare which components are rendered to the\n * page when the URL matches a given pattern.\n *\n * Routes are arranged in a nested tree structure. When a new URL is\n * requested, the tree is searched depth-first to find a route whose\n * path matches the URL.  When one is found, all routes in the tree\n * that lead to it are considered \"active\" and their components are\n * rendered into the DOM, nested in the same order as in the tree.\n */\n/* eslint-disable react/require-render-return */\nvar Route = createReactClass({\n  displayName: 'Route',\n\n  statics: {\n    createRouteFromReactElement: createRouteFromReactElement\n  },\n\n  propTypes: {\n    path: string,\n    component: component,\n    components: components,\n    getComponent: func,\n    getComponents: func\n  },\n\n  /* istanbul ignore next: sanity check */\n  render: function render() {\n    !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<Route> elements are for router configuration only and should not be rendered') : invariant(false) : void 0;\n  }\n});\n\nexport default Route;", "import useQueries from 'history/lib/useQueries';\nimport useBasename from 'history/lib/useBasename';\nimport baseCreateMemoryHistory from 'history/lib/createMemoryHistory';\n\nexport default function createMemoryHistory(options) {\n  // signatures and type checking differ between `useQueries` and\n  // `createMemoryHistory`, have to create `memoryHistory` first because\n  // `useQueries` doesn't understand the signature\n  var memoryHistory = baseCreateMemoryHistory(options);\n  var createHistory = function createHistory() {\n    return memoryHistory;\n  };\n  var history = useQueries(useBasename(createHistory))(options);\n  return history;\n}", "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; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport { REPLACE } from 'history/lib/Actions';\nimport invariant from 'invariant';\n\nimport createMemoryHistory from './createMemoryHistory';\nimport createTransitionManager from './createTransitionManager';\nimport { createRoutes } from './RouteUtils';\nimport { createRouterObject } from './RouterUtils';\n\n/**\n * A high-level API to be used for server-side rendering.\n *\n * This function matches a location to a set of routes and calls\n * callback(error, redirectLocation, renderProps) when finished.\n *\n * Note: You probably don't want to use this in a browser unless you're using\n * server-side rendering with async routes.\n */\nfunction match(_ref, callback) {\n  var history = _ref.history,\n      routes = _ref.routes,\n      location = _ref.location,\n      options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']);\n\n  !(history || location) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'match needs a history or a location') : invariant(false) : void 0;\n\n  history = history ? history : createMemoryHistory(options);\n  var transitionManager = createTransitionManager(history, createRoutes(routes));\n\n  if (location) {\n    // Allow match({ location: '/the/path', ... })\n    location = history.createLocation(location);\n  } else {\n    location = history.getCurrentLocation();\n  }\n\n  transitionManager.match(location, function (error, redirectLocation, nextState) {\n    var renderProps = void 0;\n\n    if (nextState) {\n      var router = createRouterObject(history, transitionManager, nextState);\n      renderProps = _extends({}, nextState, {\n        router: router,\n        matchContext: { transitionManager: transitionManager, router: router }\n      });\n    }\n\n    callback(error, redirectLocation && history.createLocation(redirectLocation, REPLACE), renderProps);\n  });\n}\n\nexport default match;", "import useQueries from 'history/lib/useQueries';\nimport useBasename from 'history/lib/useBasename';\n\nexport default function useRouterHistory(createHistory) {\n  return function (options) {\n    var history = useQueries(useBasename(createHistory))(options);\n    return history;\n  };\n}", "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; };\n\nimport React, { createElement } from 'react';\nimport RouterContext from './RouterContext';\nimport warning from './routerWarning';\n\nexport default (function () {\n  for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n    middlewares[_key] = arguments[_key];\n  }\n\n  if (process.env.NODE_ENV !== 'production') {\n    middlewares.forEach(function (middleware, index) {\n      process.env.NODE_ENV !== 'production' ? warning(middleware.renderRouterContext || middleware.renderRouteComponent, 'The middleware specified at index ' + index + ' does not appear to be ' + 'a valid React Router middleware.') : void 0;\n    });\n  }\n\n  var withContext = middlewares.map(function (middleware) {\n    return middleware.renderRouterContext;\n  }).filter(Boolean);\n  var withComponent = middlewares.map(function (middleware) {\n    return middleware.renderRouteComponent;\n  }).filter(Boolean);\n\n  var makeCreateElement = function makeCreateElement() {\n    var baseCreateElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : createElement;\n    return function (Component, props) {\n      return withComponent.reduceRight(function (previous, renderRouteComponent) {\n        return renderRouteComponent(previous, props);\n      }, baseCreateElement(Component, props));\n    };\n  };\n\n  return function (renderProps) {\n    return withContext.reduceRight(function (previous, renderRouterContext) {\n      return renderRouterContext(previous, renderProps);\n    }, React.createElement(RouterContext, _extends({}, renderProps, {\n      createElement: makeCreateElement(renderProps.createElement)\n    })));\n  };\n});", "import useRouterHistory from './useRouterHistory';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport default function createRouterHistory(createHistory) {\n  var history = void 0;\n  if (canUseDOM) history = useRouterHistory(createHistory)();\n  return history;\n}", "import createBrowserHistory from 'history/lib/createBrowserHistory';\nimport createRouterHistory from './createRouterHistory';\nexport default createRouterHistory(createBrowserHistory);", "import createHashHistory from 'history/lib/createHashHistory';\nimport createRouterHistory from './createRouterHistory';\nexport default createRouterHistory(createHashHistory);", "/* components */\nimport _Router from './Router';\nexport { _Router as Router };\nimport _Link from './Link';\nexport { _Link as Link };\nimport _IndexLink from './IndexLink';\nexport { _IndexLink as IndexLink };\nimport _withRouter from './withRouter';\nexport { _withRouter as withRouter };\n\n/* components (configuration) */\n\nimport _IndexRedirect from './IndexRedirect';\nexport { _IndexRedirect as IndexRedirect };\nimport _IndexRoute from './IndexRoute';\nexport { _IndexRoute as IndexRoute };\nimport _Redirect from './Redirect';\nexport { _Redirect as Redirect };\nimport _Route from './Route';\nexport { _Route as Route };\n\n/* utils */\n\nexport { createRoutes } from './RouteUtils';\nimport _RouterContext from './RouterContext';\nexport { _RouterContext as RouterContext };\n\nexport { locationShape, routerShape } from './PropTypes';\nimport _match from './match';\nexport { _match as match };\nimport _useRouterHistory from './useRouterHistory';\nexport { _useRouterHistory as useRouterHistory };\n\nexport { formatPattern } from './PatternUtils';\nimport _applyRouterMiddleware from './applyRouterMiddleware';\nexport { _applyRouterMiddleware as applyRouterMiddleware };\n\n/* histories */\n\nimport _browserHistory from './browserHistory';\nexport { _browserHistory as browserHistory };\nimport _hashHistory from './hashHistory';\nexport { _hashHistory as hashHistory };\nimport _createMemoryHistory from './createMemoryHistory';\nexport { _createMemoryHistory as createMemoryHistory };", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { createHistory, History } from 'history';\nimport { useRouterHistory } from 'react-router';\nimport { getBaseUrl } from './system';\n\nlet history: History;\n\nfunction ensureHistory() {\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  history = useRouterHistory(createHistory)({\n    basename: getBaseUrl()\n  });\n  return history;\n}\n\nexport default function getHistory() {\n  return history ? history : ensureHistory();\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport getHistory from './getHistory';\n\nexport default function handleRequiredAuthentication() {\n  const history = getHistory();\n  const returnTo = window.location.pathname + window.location.search + window.location.hash;\n  // eslint-disable-next-line camelcase\n  history.replace({ pathname: '/sessions/new', query: { return_to: returnTo } });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isNil, omitBy } from 'lodash';\nimport { stringify } from 'querystring';\nimport { getCookie } from './cookies';\nimport { translate } from './l10n';\nimport { getBaseUrl } from './system';\n\nexport function getCSRFTokenName(): string {\n  return 'X-XSRF-TOKEN';\n}\n\nexport function getCSRFTokenValue(): string {\n  const cookieName = 'XSRF-TOKEN';\n  const cookieValue = getCookie(cookieName);\n  if (!cookieValue) {\n    return '';\n  }\n  return cookieValue;\n}\n\n/**\n * Return an object containing a special http request header used to prevent CSRF attacks.\n */\nexport function getCSRFToken(): T.Dict<string> {\n  // Fetch API in Edge doesn't work with empty header,\n  // so we ensure non-empty value\n  const value = getCSRFTokenValue();\n  return value ? { [getCSRFTokenName()]: value } : {};\n}\n\nexport type RequestData = T.Dict<any>;\n\nexport function omitNil(obj: RequestData): RequestData {\n  return omitBy(obj, isNil);\n}\n\n/**\n * Default options for any request\n */\nconst DEFAULT_OPTIONS: {\n  credentials: RequestCredentials;\n  method: string;\n} = {\n  credentials: 'same-origin',\n  method: 'GET'\n};\n\n/**\n * Default request headers\n */\nconst DEFAULT_HEADERS = {\n  Accept: 'application/json'\n};\n\n/**\n * Request\n */\nclass Request {\n  private data?: RequestData;\n  private isJSON = false;\n\n  // eslint-disable-next-line no-useless-constructor\n  constructor(private readonly url: string, private readonly options: { method?: string } = {}) {}\n\n  getSubmitData(customHeaders: any = {}): { url: string; options: RequestInit } {\n    let { url } = this;\n    const options: RequestInit = { ...DEFAULT_OPTIONS, ...this.options };\n\n    if (this.data) {\n      if (this.data instanceof FormData) {\n        options.body = this.data;\n      } else if (this.isJSON) {\n        customHeaders['Content-Type'] = 'application/json';\n        options.body = JSON.stringify(this.data);\n      } else {\n        const strData = stringify(omitNil(this.data));\n        if (options.method === 'GET') {\n          url += '?' + strData;\n        } else {\n          customHeaders['Content-Type'] = 'application/x-www-form-urlencoded';\n          options.body = strData;\n        }\n      }\n    }\n\n    options.headers = {\n      ...DEFAULT_HEADERS,\n      ...customHeaders\n    };\n    return { url, options };\n  }\n\n  submit(): Promise<Response> {\n    const { url, options } = this.getSubmitData({ ...getCSRFToken() });\n    return window.fetch(getBaseUrl() + url, options);\n  }\n\n  setMethod(method: string): Request {\n    this.options.method = method;\n    return this;\n  }\n\n  setData(data?: RequestData, isJSON = false): Request {\n    if (data) {\n      this.data = data;\n      this.isJSON = isJSON;\n    }\n    return this;\n  }\n}\n\n/**\n * Make a request\n */\nexport function request(url: string): Request {\n  return new Request(url);\n}\n\n/**\n * Make a cors request\n */\nexport function corsRequest(url: string, mode: RequestMode = 'cors'): Request {\n  const options: RequestInit = { mode };\n  const request = new Request(url, options);\n  request.submit = function() {\n    const { url, options } = this.getSubmitData();\n    return window.fetch(url, options);\n  };\n  return request;\n}\n\n/**\n * Check that response status is ok\n */\nexport function checkStatus(response: Response, bypassRedirect?: boolean): Promise<Response> {\n  return new Promise((resolve, reject) => {\n    if (response.status === HttpStatus.Unauthorized && !bypassRedirect) {\n      import('./handleRequiredAuthentication')\n        .then(i => i.default())\n        .then(reject, reject);\n    } else if (isSuccessStatus(response.status)) {\n      resolve(response);\n    } else {\n      reject(response);\n    }\n  });\n}\n\n/**\n * Parse response as JSON\n */\nexport function parseJSON(response: Response): Promise<any> {\n  return response.json();\n}\n\n/**\n * Parse response as Text\n */\nexport function parseText(response: Response): Promise<string> {\n  return response.text();\n}\n\n/**\n * Parse response of failed request\n */\nexport function parseError(response: Response): Promise<string> {\n  const DEFAULT_MESSAGE = translate('default_error_message');\n  return parseJSON(response)\n    .then(({ errors }) => errors.map((error: any) => error.msg).join('. '))\n    .catch(() => DEFAULT_MESSAGE);\n}\n\n/**\n * Shortcut to do a GET request and return a Response\n */\nexport function get(url: string, data?: RequestData, bypassRedirect?: boolean): Promise<Response> {\n  return request(url)\n    .setData(data)\n    .submit()\n    .then(response => checkStatus(response, bypassRedirect));\n}\n\n/**\n * Shortcut to do a GET request and return response json\n */\nexport function getJSON(url: string, data?: RequestData, bypassRedirect?: boolean): Promise<any> {\n  return get(url, data, bypassRedirect).then(parseJSON);\n}\n\n/**\n * Shortcut to do a GET request and return response text\n */\nexport function getText(\n  url: string,\n  data?: RequestData,\n  bypassRedirect?: boolean\n): Promise<string> {\n  return get(url, data, bypassRedirect).then(parseText);\n}\n\n/**\n * Shortcut to do a CORS GET request and return response json\n */\nexport function getCorsJSON(url: string, data?: RequestData): Promise<any> {\n  return corsRequest(url)\n    .setData(data)\n    .submit()\n    .then(response => {\n      if (isSuccessStatus(response.status)) {\n        return parseJSON(response);\n      }\n      return Promise.reject(response);\n    });\n}\n\n/**\n * Shortcut to do a POST request and return response json\n */\nexport function postJSON(url: string, data?: RequestData, bypassRedirect?: boolean): Promise<any> {\n  return request(url)\n    .setMethod('POST')\n    .setData(data)\n    .submit()\n    .then(response => checkStatus(response, bypassRedirect))\n    .then(parseJSON);\n}\n\n/**\n * Shortcut to do a POST request with a json body and return response json\n */\nexport function postJSONBody(\n  url: string,\n  data?: RequestData,\n  bypassRedirect?: boolean\n): Promise<any> {\n  return request(url)\n    .setMethod('POST')\n    .setData(data, true)\n    .submit()\n    .then(response => checkStatus(response, bypassRedirect))\n    .then(parseJSON);\n}\n\n/**\n * Shortcut to do a POST request\n */\nexport function post(url: string, data?: RequestData, bypassRedirect?: boolean): Promise<void> {\n  return new Promise((resolve, reject) => {\n    request(url)\n      .setMethod('POST')\n      .setData(data)\n      .submit()\n      .then(response => checkStatus(response, bypassRedirect))\n      .then(() => resolve(), reject);\n  });\n}\n\nfunction tryRequestAgain<T>(\n  repeatAPICall: () => Promise<T>,\n  tries: { max: number; slowThreshold: number },\n  stopRepeat: (response: T) => boolean,\n  repeatErrors: number[] = [],\n  lastError?: Response\n) {\n  tries.max--;\n  if (tries.max !== 0) {\n    return new Promise<T>(resolve => {\n      setTimeout(\n        () => resolve(requestTryAndRepeatUntil(repeatAPICall, tries, stopRepeat, repeatErrors)),\n        tries.max > tries.slowThreshold ? 500 : 3000\n      );\n    });\n  }\n  return Promise.reject(lastError);\n}\n\nexport function requestTryAndRepeatUntil<T>(\n  repeatAPICall: () => Promise<T>,\n  tries: { max: number; slowThreshold: number },\n  stopRepeat: (response: T) => boolean,\n  repeatErrors: number[] = []\n) {\n  return repeatAPICall().then(\n    r => {\n      if (stopRepeat(r)) {\n        return r;\n      }\n      return tryRequestAgain(repeatAPICall, tries, stopRepeat, repeatErrors);\n    },\n    (error: Response) => {\n      if (repeatErrors.length === 0 || repeatErrors.includes(error.status)) {\n        return tryRequestAgain(repeatAPICall, tries, stopRepeat, repeatErrors, error);\n      }\n      return Promise.reject(error);\n    }\n  );\n}\n\nexport function isSuccessStatus(status: number) {\n  return status >= 200 && status < 300;\n}\n\n// Adapted from https://nodejs.org/api/http.html#http_http_HTTP_STATUS\nexport enum HttpStatus {\n  Ok = 200,\n  Created = 201,\n  MultipleChoices = 300,\n  MovedPermanently = 301,\n  Found = 302,\n  BadRequest = 400,\n  Unauthorized = 401,\n  Forbidden = 403,\n  NotFound = 404,\n  InternalServerError = 500,\n  NotImplemented = 501,\n  BadGateway = 502,\n  ServiceUnavailable = 503,\n  GatewayTimeout = 504\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getJSON } from '../helpers/request';\nimport { L10nBundleRequestParams, L10nBundleRequestResponse } from '../types/l10n';\n\nexport function fetchL10nBundle(\n  params: L10nBundleRequestParams\n): Promise<L10nBundleRequestResponse> {\n  return getJSON('/api/l10n/index', params);\n}\n", "var MILLISECONDS_IN_MINUTE = 60000\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nmodule.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) {\n  var date = new Date(dirtyDate.getTime())\n  var baseTimezoneOffset = date.getTimezoneOffset()\n  date.setSeconds(0, 0)\n  var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE\n\n  return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset\n}\n", "/**\n * @category Common Helpers\n * @summary Is the given argument an instance of Date?\n *\n * @description\n * Is the given argument an instance of Date?\n *\n * @param {*} argument - the argument to check\n * @returns {Boolean} the given argument is an instance of Date\n *\n * @example\n * // Is 'mayonnaise' a Date?\n * var result = isDate('mayonnaise')\n * //=> false\n */\nfunction isDate (argument) {\n  return argument instanceof Date\n}\n\nmodule.exports = isDate\n", "var getTimezoneOffsetInMilliseconds = require('../_lib/getTimezoneOffsetInMilliseconds/index.js')\nvar isDate = require('../is_date/index.js')\n\nvar MILLISECONDS_IN_HOUR = 3600000\nvar MILLISECONDS_IN_MINUTE = 60000\nvar DEFAULT_ADDITIONAL_DIGITS = 2\n\nvar parseTokenDateTimeDelimeter = /[T ]/\nvar parseTokenPlainTime = /:/\n\n// year tokens\nvar parseTokenYY = /^(\\d{2})$/\nvar parseTokensYYY = [\n  /^([+-]\\d{2})$/, // 0 additional digits\n  /^([+-]\\d{3})$/, // 1 additional digit\n  /^([+-]\\d{4})$/ // 2 additional digits\n]\n\nvar parseTokenYYYY = /^(\\d{4})/\nvar parseTokensYYYYY = [\n  /^([+-]\\d{4})/, // 0 additional digits\n  /^([+-]\\d{5})/, // 1 additional digit\n  /^([+-]\\d{6})/ // 2 additional digits\n]\n\n// date tokens\nvar parseTokenMM = /^-(\\d{2})$/\nvar parseTokenDDD = /^-?(\\d{3})$/\nvar parseTokenMMDD = /^-?(\\d{2})-?(\\d{2})$/\nvar parseTokenWww = /^-?W(\\d{2})$/\nvar parseTokenWwwD = /^-?W(\\d{2})-?(\\d{1})$/\n\n// time tokens\nvar parseTokenHH = /^(\\d{2}([.,]\\d*)?)$/\nvar parseTokenHHMM = /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/\nvar parseTokenHHMMSS = /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/\n\n// timezone tokens\nvar parseTokenTimezone = /([Z+-].*)$/\nvar parseTokenTimezoneZ = /^(Z)$/\nvar parseTokenTimezoneHH = /^([+-])(\\d{2})$/\nvar parseTokenTimezoneHHMM = /^([+-])(\\d{2}):?(\\d{2})$/\n\n/**\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If all above fails, the function passes the given argument to Date constructor.\n *\n * @param {Date|String|Number} argument - the value to convert\n * @param {Object} [options] - the object with options\n * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * var result = parse('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Parse string '+02014101',\n * // if the additional number of digits in the extended year format is 1:\n * var result = parse('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nfunction parse (argument, dirtyOptions) {\n  if (isDate(argument)) {\n    // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n    return new Date(argument.getTime())\n  } else if (typeof argument !== 'string') {\n    return new Date(argument)\n  }\n\n  var options = dirtyOptions || {}\n  var additionalDigits = options.additionalDigits\n  if (additionalDigits == null) {\n    additionalDigits = DEFAULT_ADDITIONAL_DIGITS\n  } else {\n    additionalDigits = Number(additionalDigits)\n  }\n\n  var dateStrings = splitDateString(argument)\n\n  var parseYearResult = parseYear(dateStrings.date, additionalDigits)\n  var year = parseYearResult.year\n  var restDateString = parseYearResult.restDateString\n\n  var date = parseDate(restDateString, year)\n\n  if (date) {\n    var timestamp = date.getTime()\n    var time = 0\n    var offset\n\n    if (dateStrings.time) {\n      time = parseTime(dateStrings.time)\n    }\n\n    if (dateStrings.timezone) {\n      offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE\n    } else {\n      var fullTime = timestamp + time\n      var fullTimeDate = new Date(fullTime)\n\n      offset = getTimezoneOffsetInMilliseconds(fullTimeDate)\n\n      // Adjust time when it's coming from DST\n      var fullTimeDateNextDay = new Date(fullTime)\n      fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1)\n      var offsetDiff =\n        getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) -\n        getTimezoneOffsetInMilliseconds(fullTimeDate)\n      if (offsetDiff > 0) {\n        offset += offsetDiff\n      }\n    }\n\n    return new Date(timestamp + time + offset)\n  } else {\n    return new Date(argument)\n  }\n}\n\nfunction splitDateString (dateString) {\n  var dateStrings = {}\n  var array = dateString.split(parseTokenDateTimeDelimeter)\n  var timeString\n\n  if (parseTokenPlainTime.test(array[0])) {\n    dateStrings.date = null\n    timeString = array[0]\n  } else {\n    dateStrings.date = array[0]\n    timeString = array[1]\n  }\n\n  if (timeString) {\n    var token = parseTokenTimezone.exec(timeString)\n    if (token) {\n      dateStrings.time = timeString.replace(token[1], '')\n      dateStrings.timezone = token[1]\n    } else {\n      dateStrings.time = timeString\n    }\n  }\n\n  return dateStrings\n}\n\nfunction parseYear (dateString, additionalDigits) {\n  var parseTokenYYY = parseTokensYYY[additionalDigits]\n  var parseTokenYYYYY = parseTokensYYYYY[additionalDigits]\n\n  var token\n\n  // YYYY or \u00B1YYYYY\n  token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString)\n  if (token) {\n    var yearString = token[1]\n    return {\n      year: parseInt(yearString, 10),\n      restDateString: dateString.slice(yearString.length)\n    }\n  }\n\n  // YY or \u00B1YYY\n  token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString)\n  if (token) {\n    var centuryString = token[1]\n    return {\n      year: parseInt(centuryString, 10) * 100,\n      restDateString: dateString.slice(centuryString.length)\n    }\n  }\n\n  // Invalid ISO-formatted year\n  return {\n    year: null\n  }\n}\n\nfunction parseDate (dateString, year) {\n  // Invalid ISO-formatted year\n  if (year === null) {\n    return null\n  }\n\n  var token\n  var date\n  var month\n  var week\n\n  // YYYY\n  if (dateString.length === 0) {\n    date = new Date(0)\n    date.setUTCFullYear(year)\n    return date\n  }\n\n  // YYYY-MM\n  token = parseTokenMM.exec(dateString)\n  if (token) {\n    date = new Date(0)\n    month = parseInt(token[1], 10) - 1\n    date.setUTCFullYear(year, month)\n    return date\n  }\n\n  // YYYY-DDD or YYYYDDD\n  token = parseTokenDDD.exec(dateString)\n  if (token) {\n    date = new Date(0)\n    var dayOfYear = parseInt(token[1], 10)\n    date.setUTCFullYear(year, 0, dayOfYear)\n    return date\n  }\n\n  // YYYY-MM-DD or YYYYMMDD\n  token = parseTokenMMDD.exec(dateString)\n  if (token) {\n    date = new Date(0)\n    month = parseInt(token[1], 10) - 1\n    var day = parseInt(token[2], 10)\n    date.setUTCFullYear(year, month, day)\n    return date\n  }\n\n  // YYYY-Www or YYYYWww\n  token = parseTokenWww.exec(dateString)\n  if (token) {\n    week = parseInt(token[1], 10) - 1\n    return dayOfISOYear(year, week)\n  }\n\n  // YYYY-Www-D or YYYYWwwD\n  token = parseTokenWwwD.exec(dateString)\n  if (token) {\n    week = parseInt(token[1], 10) - 1\n    var dayOfWeek = parseInt(token[2], 10) - 1\n    return dayOfISOYear(year, week, dayOfWeek)\n  }\n\n  // Invalid ISO-formatted date\n  return null\n}\n\nfunction parseTime (timeString) {\n  var token\n  var hours\n  var minutes\n\n  // hh\n  token = parseTokenHH.exec(timeString)\n  if (token) {\n    hours = parseFloat(token[1].replace(',', '.'))\n    return (hours % 24) * MILLISECONDS_IN_HOUR\n  }\n\n  // hh:mm or hhmm\n  token = parseTokenHHMM.exec(timeString)\n  if (token) {\n    hours = parseInt(token[1], 10)\n    minutes = parseFloat(token[2].replace(',', '.'))\n    return (hours % 24) * MILLISECONDS_IN_HOUR +\n      minutes * MILLISECONDS_IN_MINUTE\n  }\n\n  // hh:mm:ss or hhmmss\n  token = parseTokenHHMMSS.exec(timeString)\n  if (token) {\n    hours = parseInt(token[1], 10)\n    minutes = parseInt(token[2], 10)\n    var seconds = parseFloat(token[3].replace(',', '.'))\n    return (hours % 24) * MILLISECONDS_IN_HOUR +\n      minutes * MILLISECONDS_IN_MINUTE +\n      seconds * 1000\n  }\n\n  // Invalid ISO-formatted time\n  return null\n}\n\nfunction parseTimezone (timezoneString) {\n  var token\n  var absoluteOffset\n\n  // Z\n  token = parseTokenTimezoneZ.exec(timezoneString)\n  if (token) {\n    return 0\n  }\n\n  // \u00B1hh\n  token = parseTokenTimezoneHH.exec(timezoneString)\n  if (token) {\n    absoluteOffset = parseInt(token[2], 10) * 60\n    return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n  }\n\n  // \u00B1hh:mm or \u00B1hhmm\n  token = parseTokenTimezoneHHMM.exec(timezoneString)\n  if (token) {\n    absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10)\n    return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n  }\n\n  return 0\n}\n\nfunction dayOfISOYear (isoYear, week, day) {\n  week = week || 0\n  day = day || 0\n  var date = new Date(0)\n  date.setUTCFullYear(isoYear, 0, 4)\n  var fourthOfJanuaryDay = date.getUTCDay() || 7\n  var diff = week * 7 + day + 1 - fourthOfJanuaryDay\n  date.setUTCDate(date.getUTCDate() + diff)\n  return date\n}\n\nmodule.exports = parse\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added\n * @returns {Date} the new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * var result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nfunction addDays (dirtyDate, dirtyAmount) {\n  var date = parse(dirtyDate)\n  var amount = Number(dirtyAmount)\n  date.setDate(date.getDate() + amount)\n  return date\n}\n\nmodule.exports = addDays\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added\n * @returns {Date} the new date with the milliseconds added\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * var result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nfunction addMilliseconds (dirtyDate, dirtyAmount) {\n  var timestamp = parse(dirtyDate).getTime()\n  var amount = Number(dirtyAmount)\n  return new Date(timestamp + amount)\n}\n\nmodule.exports = addMilliseconds\n", "var addMilliseconds = require('../add_milliseconds/index.js')\n\nvar MILLISECONDS_IN_HOUR = 3600000\n\n/**\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be added\n * @returns {Date} the new date with the hours added\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * var result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\nfunction addHours (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_HOUR)\n}\n\nmodule.exports = addHours\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfWeek (dirtyDate, dirtyOptions) {\n  var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n  var date = parse(dirtyDate)\n  var day = date.getDay()\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn\n\n  date.setDate(date.getDate() - diff)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = startOfWeek\n", "var startOfWeek = require('../start_of_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfISOWeek (dirtyDate) {\n  return startOfWeek(dirtyDate, {weekStartsOn: 1})\n}\n\nmodule.exports = startOfISOWeek\n", "var parse = require('../parse/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * var result = getISOYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nfunction getISOYear (dirtyDate) {\n  var date = parse(dirtyDate)\n  var year = date.getFullYear()\n\n  var fourthOfJanuaryOfNextYear = new Date(0)\n  fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4)\n  fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0)\n  var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear)\n\n  var fourthOfJanuaryOfThisYear = new Date(0)\n  fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4)\n  fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0)\n  var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear)\n\n  if (date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1\n  } else if (date.getTime() >= startOfThisYear.getTime()) {\n    return year\n  } else {\n    return year - 1\n  }\n}\n\nmodule.exports = getISOYear\n", "var getISOYear = require('../get_iso_year/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * var result = startOfISOYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nfunction startOfISOYear (dirtyDate) {\n  var year = getISOYear(dirtyDate)\n  var fourthOfJanuary = new Date(0)\n  fourthOfJanuary.setFullYear(year, 0, 4)\n  fourthOfJanuary.setHours(0, 0, 0, 0)\n  var date = startOfISOWeek(fourthOfJanuary)\n  return date\n}\n\nmodule.exports = startOfISOYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nfunction startOfDay (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = startOfDay\n", "var startOfDay = require('../start_of_day/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\nvar MILLISECONDS_IN_DAY = 86400000\n\n/**\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * var result = differenceInCalendarDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n */\nfunction differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) {\n  var startOfDayLeft = startOfDay(dirtyDateLeft)\n  var startOfDayRight = startOfDay(dirtyDateRight)\n\n  var timestampLeft = startOfDayLeft.getTime() -\n    startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n  var timestampRight = startOfDayRight.getTime() -\n    startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n\n  // Round the number of days to the nearest integer\n  // because the number of milliseconds in a day is not constant\n  // (e.g. it's different in the day of the daylight saving time clock shift)\n  return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY)\n}\n\nmodule.exports = differenceInCalendarDays\n", "var parse = require('../parse/index.js')\nvar startOfISOYear = require('../start_of_iso_year/index.js')\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Set the ISO week-numbering year to the given date.\n *\n * @description\n * Set the ISO week-numbering year to the given date,\n * saving the week number and the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} isoYear - the ISO week-numbering year of the new date\n * @returns {Date} the new date with the ISO week-numbering year setted\n *\n * @example\n * // Set ISO week-numbering year 2007 to 29 December 2008:\n * var result = setISOYear(new Date(2008, 11, 29), 2007)\n * //=> Mon Jan 01 2007 00:00:00\n */\nfunction setISOYear (dirtyDate, dirtyISOYear) {\n  var date = parse(dirtyDate)\n  var isoYear = Number(dirtyISOYear)\n  var diff = differenceInCalendarDays(date, startOfISOYear(date))\n  var fourthOfJanuary = new Date(0)\n  fourthOfJanuary.setFullYear(isoYear, 0, 4)\n  fourthOfJanuary.setHours(0, 0, 0, 0)\n  date = startOfISOYear(fourthOfJanuary)\n  date.setDate(date.getDate() + diff)\n  return date\n}\n\nmodule.exports = setISOYear\n", "var getISOYear = require('../get_iso_year/index.js')\nvar setISOYear = require('../set_iso_year/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Add the specified number of ISO week-numbering years to the given date.\n *\n * @description\n * Add the specified number of ISO week-numbering years to the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of ISO week-numbering years to be added\n * @returns {Date} the new date with the ISO week-numbering years added\n *\n * @example\n * // Add 5 ISO week-numbering years to 2 July 2010:\n * var result = addISOYears(new Date(2010, 6, 2), 5)\n * //=> Fri Jun 26 2015 00:00:00\n */\nfunction addISOYears (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return setISOYear(dirtyDate, getISOYear(dirtyDate) + amount)\n}\n\nmodule.exports = addISOYears\n", "var addMilliseconds = require('../add_milliseconds/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\n\n/**\n * @category Minute Helpers\n * @summary Add the specified number of minutes to the given date.\n *\n * @description\n * Add the specified number of minutes to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be added\n * @returns {Date} the new date with the minutes added\n *\n * @example\n * // Add 30 minutes to 10 July 2014 12:00:00:\n * var result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 12:30:00\n */\nfunction addMinutes (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_MINUTE)\n}\n\nmodule.exports = addMinutes\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * var result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nfunction getDaysInMonth (dirtyDate) {\n  var date = parse(dirtyDate)\n  var year = date.getFullYear()\n  var monthIndex = date.getMonth()\n  var lastDayOfMonth = new Date(0)\n  lastDayOfMonth.setFullYear(year, monthIndex + 1, 0)\n  lastDayOfMonth.setHours(0, 0, 0, 0)\n  return lastDayOfMonth.getDate()\n}\n\nmodule.exports = getDaysInMonth\n", "var parse = require('../parse/index.js')\nvar getDaysInMonth = require('../get_days_in_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added\n * @returns {Date} the new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * var result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\nfunction addMonths (dirtyDate, dirtyAmount) {\n  var date = parse(dirtyDate)\n  var amount = Number(dirtyAmount)\n  var desiredMonth = date.getMonth() + amount\n  var dateWithDesiredMonth = new Date(0)\n  dateWithDesiredMonth.setFullYear(date.getFullYear(), desiredMonth, 1)\n  dateWithDesiredMonth.setHours(0, 0, 0, 0)\n  var daysInMonth = getDaysInMonth(dateWithDesiredMonth)\n  // Set the last day of the new month\n  // if the original date was the last day of the longer month\n  date.setMonth(desiredMonth, Math.min(daysInMonth, date.getDate()))\n  return date\n}\n\nmodule.exports = addMonths\n", "var addMonths = require('../add_months/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be added\n * @returns {Date} the new date with the quarters added\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * var result = addQuarters(new Date(2014, 8, 1), 1)\n * //=> Mon Dec 01 2014 00:00:00\n */\nfunction addQuarters (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  var months = amount * 3\n  return addMonths(dirtyDate, months)\n}\n\nmodule.exports = addQuarters\n", "var addMilliseconds = require('../add_milliseconds/index.js')\n\n/**\n * @category Second Helpers\n * @summary Add the specified number of seconds to the given date.\n *\n * @description\n * Add the specified number of seconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of seconds to be added\n * @returns {Date} the new date with the seconds added\n *\n * @example\n * // Add 30 seconds to 10 July 2014 12:45:00:\n * var result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n * //=> Thu Jul 10 2014 12:45:30\n */\nfunction addSeconds (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addMilliseconds(dirtyDate, amount * 1000)\n}\n\nmodule.exports = addSeconds\n", "var addDays = require('../add_days/index.js')\n\n/**\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added\n * @returns {Date} the new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * var result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nfunction addWeeks (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  var days = amount * 7\n  return addDays(dirtyDate, days)\n}\n\nmodule.exports = addWeeks\n", "var addMonths = require('../add_months/index.js')\n\n/**\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added\n * @returns {Date} the new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * var result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nfunction addYears (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addMonths(dirtyDate, amount * 12)\n}\n\nmodule.exports = addYears\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Range Helpers\n * @summary Is the given date range overlapping with another date range?\n *\n * @description\n * Is the given date range overlapping with another date range?\n *\n * @param {Date|String|Number} initialRangeStartDate - the start of the initial range\n * @param {Date|String|Number} initialRangeEndDate - the end of the initial range\n * @param {Date|String|Number} comparedRangeStartDate - the start of the range to compare it with\n * @param {Date|String|Number} comparedRangeEndDate - the end of the range to compare it with\n * @returns {Boolean} whether the date ranges are overlapping\n * @throws {Error} startDate of a date range cannot be after its endDate\n *\n * @example\n * // For overlapping date ranges:\n * areRangesOverlapping(\n *   new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 17), new Date(2014, 0, 21)\n * )\n * //=> true\n *\n * @example\n * // For non-overlapping date ranges:\n * areRangesOverlapping(\n *   new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 21), new Date(2014, 0, 22)\n * )\n * //=> false\n */\nfunction areRangesOverlapping (dirtyInitialRangeStartDate, dirtyInitialRangeEndDate, dirtyComparedRangeStartDate, dirtyComparedRangeEndDate) {\n  var initialStartTime = parse(dirtyInitialRangeStartDate).getTime()\n  var initialEndTime = parse(dirtyInitialRangeEndDate).getTime()\n  var comparedStartTime = parse(dirtyComparedRangeStartDate).getTime()\n  var comparedEndTime = parse(dirtyComparedRangeEndDate).getTime()\n\n  if (initialStartTime > initialEndTime || comparedStartTime > comparedEndTime) {\n    throw new Error('The start of the range cannot be after the end of the range')\n  }\n\n  return initialStartTime < comparedEndTime && comparedStartTime < initialEndTime\n}\n\nmodule.exports = areRangesOverlapping\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return an index of the closest date from the array comparing to the given date.\n *\n * @description\n * Return an index of the closest date from the array comparing to the given date.\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date[]|String[]|Number[]} datesArray - the array to search\n * @returns {Number} an index of the date closest to the given date\n * @throws {TypeError} the second argument must be an instance of Array\n *\n * @example\n * // Which date is closer to 6 September 2015?\n * var dateToCompare = new Date(2015, 8, 6)\n * var datesArray = [\n *   new Date(2015, 0, 1),\n *   new Date(2016, 0, 1),\n *   new Date(2017, 0, 1)\n * ]\n * var result = closestIndexTo(dateToCompare, datesArray)\n * //=> 1\n */\nfunction closestIndexTo (dirtyDateToCompare, dirtyDatesArray) {\n  if (!(dirtyDatesArray instanceof Array)) {\n    throw new TypeError(toString.call(dirtyDatesArray) + ' is not an instance of Array')\n  }\n\n  var dateToCompare = parse(dirtyDateToCompare)\n  var timeToCompare = dateToCompare.getTime()\n\n  var result\n  var minDistance\n\n  dirtyDatesArray.forEach(function (dirtyDate, index) {\n    var currentDate = parse(dirtyDate)\n    var distance = Math.abs(timeToCompare - currentDate.getTime())\n    if (result === undefined || distance < minDistance) {\n      result = index\n      minDistance = distance\n    }\n  })\n\n  return result\n}\n\nmodule.exports = closestIndexTo\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return a date from the array closest to the given date.\n *\n * @description\n * Return a date from the array closest to the given date.\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date[]|String[]|Number[]} datesArray - the array to search\n * @returns {Date} the date from the array closest to the given date\n * @throws {TypeError} the second argument must be an instance of Array\n *\n * @example\n * // Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030?\n * var dateToCompare = new Date(2015, 8, 6)\n * var result = closestTo(dateToCompare, [\n *   new Date(2000, 0, 1),\n *   new Date(2030, 0, 1)\n * ])\n * //=> Tue Jan 01 2030 00:00:00\n */\nfunction closestTo (dirtyDateToCompare, dirtyDatesArray) {\n  if (!(dirtyDatesArray instanceof Array)) {\n    throw new TypeError(toString.call(dirtyDatesArray) + ' is not an instance of Array')\n  }\n\n  var dateToCompare = parse(dirtyDateToCompare)\n  var timeToCompare = dateToCompare.getTime()\n\n  var result\n  var minDistance\n\n  dirtyDatesArray.forEach(function (dirtyDate) {\n    var currentDate = parse(dirtyDate)\n    var distance = Math.abs(timeToCompare - currentDate.getTime())\n    if (result === undefined || distance < minDistance) {\n      result = currentDate\n      minDistance = distance\n    }\n  })\n\n  return result\n}\n\nmodule.exports = closestTo\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * var result = compareAsc(\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * )\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * var result = [\n *   new Date(1995, 6, 2),\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * //   Wed Feb 11 1987 00:00:00,\n * //   Mon Jul 10 1989 00:00:00,\n * //   Sun Jul 02 1995 00:00:00\n * // ]\n */\nfunction compareAsc (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var timeLeft = dateLeft.getTime()\n  var dateRight = parse(dirtyDateRight)\n  var timeRight = dateRight.getTime()\n\n  if (timeLeft < timeRight) {\n    return -1\n  } else if (timeLeft > timeRight) {\n    return 1\n  } else {\n    return 0\n  }\n}\n\nmodule.exports = compareAsc\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Compare the two dates reverse chronologically and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return -1 if the first date is after the second,\n * 1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989 reverse chronologically:\n * var result = compareDesc(\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * )\n * //=> 1\n *\n * @example\n * // Sort the array of dates in reverse chronological order:\n * var result = [\n *   new Date(1995, 6, 2),\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * ].sort(compareDesc)\n * //=> [\n * //   Sun Jul 02 1995 00:00:00,\n * //   Mon Jul 10 1989 00:00:00,\n * //   Wed Feb 11 1987 00:00:00\n * // ]\n */\nfunction compareDesc (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var timeLeft = dateLeft.getTime()\n  var dateRight = parse(dirtyDateRight)\n  var timeRight = dateRight.getTime()\n\n  if (timeLeft > timeRight) {\n    return -1\n  } else if (timeLeft < timeRight) {\n    return 1\n  } else {\n    return 0\n  }\n}\n\nmodule.exports = compareDesc\n", "var startOfISOWeek = require('../start_of_iso_week/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category ISO Week Helpers\n * @summary Get the number of calendar ISO weeks between the given dates.\n *\n * @description\n * Get the number of calendar ISO weeks between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar ISO weeks\n *\n * @example\n * // How many calendar ISO weeks are between 6 July 2014 and 21 July 2014?\n * var result = differenceInCalendarISOWeeks(\n *   new Date(2014, 6, 21),\n *   new Date(2014, 6, 6)\n * )\n * //=> 3\n */\nfunction differenceInCalendarISOWeeks (dirtyDateLeft, dirtyDateRight) {\n  var startOfISOWeekLeft = startOfISOWeek(dirtyDateLeft)\n  var startOfISOWeekRight = startOfISOWeek(dirtyDateRight)\n\n  var timestampLeft = startOfISOWeekLeft.getTime() -\n    startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n  var timestampRight = startOfISOWeekRight.getTime() -\n    startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n\n  // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n  return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK)\n}\n\nmodule.exports = differenceInCalendarISOWeeks\n", "var getISOYear = require('../get_iso_year/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of calendar ISO week-numbering years between the given dates.\n *\n * @description\n * Get the number of calendar ISO week-numbering years between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar ISO week-numbering years\n *\n * @example\n * // How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?\n * var result = differenceInCalendarISOYears(\n *   new Date(2012, 0, 1),\n *   new Date(2010, 0, 1)\n * )\n * //=> 2\n */\nfunction differenceInCalendarISOYears (dirtyDateLeft, dirtyDateRight) {\n  return getISOYear(dirtyDateLeft) - getISOYear(dirtyDateRight)\n}\n\nmodule.exports = differenceInCalendarISOYears\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n *   new Date(2014, 8, 1),\n *   new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nfunction differenceInCalendarMonths (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n\n  var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear()\n  var monthDiff = dateLeft.getMonth() - dateRight.getMonth()\n\n  return yearDiff * 12 + monthDiff\n}\n\nmodule.exports = differenceInCalendarMonths\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Get the year quarter of the given date.\n *\n * @description\n * Get the year quarter of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the quarter\n *\n * @example\n * // Which quarter is 2 July 2014?\n * var result = getQuarter(new Date(2014, 6, 2))\n * //=> 3\n */\nfunction getQuarter (dirtyDate) {\n  var date = parse(dirtyDate)\n  var quarter = Math.floor(date.getMonth() / 3) + 1\n  return quarter\n}\n\nmodule.exports = getQuarter\n", "var getQuarter = require('../get_quarter/index.js')\nvar parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Get the number of calendar quarters between the given dates.\n *\n * @description\n * Get the number of calendar quarters between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar quarters\n *\n * @example\n * // How many calendar quarters are between 31 December 2013 and 2 July 2014?\n * var result = differenceInCalendarQuarters(\n *   new Date(2014, 6, 2),\n *   new Date(2013, 11, 31)\n * )\n * //=> 3\n */\nfunction differenceInCalendarQuarters (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n\n  var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear()\n  var quarterDiff = getQuarter(dateLeft) - getQuarter(dateRight)\n\n  return yearDiff * 4 + quarterDiff\n}\n\nmodule.exports = differenceInCalendarQuarters\n", "var startOfWeek = require('../start_of_week/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category Week Helpers\n * @summary Get the number of calendar weeks between the given dates.\n *\n * @description\n * Get the number of calendar weeks between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the number of calendar weeks\n *\n * @example\n * // How many calendar weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInCalendarWeeks(\n *   new Date(2014, 6, 20),\n *   new Date(2014, 6, 5)\n * )\n * //=> 3\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInCalendarWeeks(\n *   new Date(2014, 6, 20),\n *   new Date(2014, 6, 5),\n *   {weekStartsOn: 1}\n * )\n * //=> 2\n */\nfunction differenceInCalendarWeeks (dirtyDateLeft, dirtyDateRight, dirtyOptions) {\n  var startOfWeekLeft = startOfWeek(dirtyDateLeft, dirtyOptions)\n  var startOfWeekRight = startOfWeek(dirtyDateRight, dirtyOptions)\n\n  var timestampLeft = startOfWeekLeft.getTime() -\n    startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n  var timestampRight = startOfWeekRight.getTime() -\n    startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n\n  // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n  return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK)\n}\n\nmodule.exports = differenceInCalendarWeeks\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar years\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * var result = differenceInCalendarYears(\n *   new Date(2015, 1, 11),\n *   new Date(2013, 11, 31)\n * )\n * //=> 2\n */\nfunction differenceInCalendarYears (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n\n  return dateLeft.getFullYear() - dateRight.getFullYear()\n}\n\nmodule.exports = differenceInCalendarYears\n", "var parse = require('../parse/index.js')\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js')\nvar compareAsc = require('../compare_asc/index.js')\n\n/**\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full days between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full days\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * var result = differenceInDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n */\nfunction differenceInDays (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n\n  var sign = compareAsc(dateLeft, dateRight)\n  var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight))\n  dateLeft.setDate(dateLeft.getDate() - sign * difference)\n\n  // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n  // If so, result must be decreased by 1 in absolute value\n  var isLastDayNotFull = compareAsc(dateLeft, dateRight) === -sign\n  return sign * (difference - isLastDayNotFull)\n}\n\nmodule.exports = differenceInDays\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * var result = differenceInMilliseconds(\n *   new Date(2014, 6, 2, 12, 30, 21, 700),\n *   new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nfunction differenceInMilliseconds (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n  return dateLeft.getTime() - dateRight.getTime()\n}\n\nmodule.exports = differenceInMilliseconds\n", "var differenceInMilliseconds = require('../difference_in_milliseconds/index.js')\n\nvar MILLISECONDS_IN_HOUR = 3600000\n\n/**\n * @category Hour Helpers\n * @summary Get the number of hours between the given dates.\n *\n * @description\n * Get the number of hours between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of hours\n *\n * @example\n * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\n * var result = differenceInHours(\n *   new Date(2014, 6, 2, 19, 0),\n *   new Date(2014, 6, 2, 6, 50)\n * )\n * //=> 12\n */\nfunction differenceInHours (dirtyDateLeft, dirtyDateRight) {\n  var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR\n  return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInHours\n", "var addISOYears = require('../add_iso_years/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Subtract the specified number of ISO week-numbering years from the given date.\n *\n * @description\n * Subtract the specified number of ISO week-numbering years from the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of ISO week-numbering years to be subtracted\n * @returns {Date} the new date with the ISO week-numbering years subtracted\n *\n * @example\n * // Subtract 5 ISO week-numbering years from 1 September 2014:\n * var result = subISOYears(new Date(2014, 8, 1), 5)\n * //=> Mon Aug 31 2009 00:00:00\n */\nfunction subISOYears (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addISOYears(dirtyDate, -amount)\n}\n\nmodule.exports = subISOYears\n", "var parse = require('../parse/index.js')\nvar differenceInCalendarISOYears = require('../difference_in_calendar_iso_years/index.js')\nvar compareAsc = require('../compare_asc/index.js')\nvar subISOYears = require('../sub_iso_years/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of full ISO week-numbering years between the given dates.\n *\n * @description\n * Get the number of full ISO week-numbering years between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full ISO week-numbering years\n *\n * @example\n * // How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?\n * var result = differenceInISOYears(\n *   new Date(2012, 0, 1),\n *   new Date(2010, 0, 1)\n * )\n * //=> 1\n */\nfunction differenceInISOYears (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n\n  var sign = compareAsc(dateLeft, dateRight)\n  var difference = Math.abs(differenceInCalendarISOYears(dateLeft, dateRight))\n  dateLeft = subISOYears(dateLeft, sign * difference)\n\n  // Math.abs(diff in full ISO years - diff in calendar ISO years) === 1\n  // if last calendar ISO year is not full\n  // If so, result must be decreased by 1 in absolute value\n  var isLastISOYearNotFull = compareAsc(dateLeft, dateRight) === -sign\n  return sign * (difference - isLastISOYearNotFull)\n}\n\nmodule.exports = differenceInISOYears\n", "var differenceInMilliseconds = require('../difference_in_milliseconds/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\n\n/**\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the number of minutes between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of minutes\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * var result = differenceInMinutes(\n *   new Date(2014, 6, 2, 12, 20, 0),\n *   new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n */\nfunction differenceInMinutes (dirtyDateLeft, dirtyDateRight) {\n  var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE\n  return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInMinutes\n", "var parse = require('../parse/index.js')\nvar differenceInCalendarMonths = require('../difference_in_calendar_months/index.js')\nvar compareAsc = require('../compare_asc/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInMonths(\n *   new Date(2014, 8, 1),\n *   new Date(2014, 0, 31)\n * )\n * //=> 7\n */\nfunction differenceInMonths (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n\n  var sign = compareAsc(dateLeft, dateRight)\n  var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight))\n  dateLeft.setMonth(dateLeft.getMonth() - sign * difference)\n\n  // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n  // If so, result must be decreased by 1 in absolute value\n  var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign\n  return sign * (difference - isLastMonthNotFull)\n}\n\nmodule.exports = differenceInMonths\n", "var differenceInMonths = require('../difference_in_months/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Get the number of full quarters between the given dates.\n *\n * @description\n * Get the number of full quarters between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full quarters\n *\n * @example\n * // How many full quarters are between 31 December 2013 and 2 July 2014?\n * var result = differenceInQuarters(\n *   new Date(2014, 6, 2),\n *   new Date(2013, 11, 31)\n * )\n * //=> 2\n */\nfunction differenceInQuarters (dirtyDateLeft, dirtyDateRight) {\n  var diff = differenceInMonths(dirtyDateLeft, dirtyDateRight) / 3\n  return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInQuarters\n", "var differenceInMilliseconds = require('../difference_in_milliseconds/index.js')\n\n/**\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * var result = differenceInSeconds(\n *   new Date(2014, 6, 2, 12, 30, 20, 0),\n *   new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nfunction differenceInSeconds (dirtyDateLeft, dirtyDateRight) {\n  var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000\n  return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInSeconds\n", "var differenceInDays = require('../difference_in_days/index.js')\n\n/**\n * @category Week Helpers\n * @summary Get the number of full weeks between the given dates.\n *\n * @description\n * Get the number of full weeks between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full weeks\n *\n * @example\n * // How many full weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInWeeks(\n *   new Date(2014, 6, 20),\n *   new Date(2014, 6, 5)\n * )\n * //=> 2\n */\nfunction differenceInWeeks (dirtyDateLeft, dirtyDateRight) {\n  var diff = differenceInDays(dirtyDateLeft, dirtyDateRight) / 7\n  return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInWeeks\n", "var parse = require('../parse/index.js')\nvar differenceInCalendarYears = require('../difference_in_calendar_years/index.js')\nvar compareAsc = require('../compare_asc/index.js')\n\n/**\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full years\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * var result = differenceInYears(\n *   new Date(2015, 1, 11),\n *   new Date(2013, 11, 31)\n * )\n * //=> 1\n */\nfunction differenceInYears (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n\n  var sign = compareAsc(dateLeft, dateRight)\n  var difference = Math.abs(differenceInCalendarYears(dateLeft, dateRight))\n  dateLeft.setFullYear(dateLeft.getFullYear() - sign * difference)\n\n  // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full\n  // If so, result must be decreased by 1 in absolute value\n  var isLastYearNotFull = compareAsc(dateLeft, dateRight) === -sign\n  return sign * (difference - isLastYearNotFull)\n}\n\nmodule.exports = differenceInYears\n", "function buildDistanceInWordsLocale () {\n  var distanceInWordsLocale = {\n    lessThanXSeconds: {\n      one: 'less than a second',\n      other: 'less than {{count}} seconds'\n    },\n\n    xSeconds: {\n      one: '1 second',\n      other: '{{count}} seconds'\n    },\n\n    halfAMinute: 'half a minute',\n\n    lessThanXMinutes: {\n      one: 'less than a minute',\n      other: 'less than {{count}} minutes'\n    },\n\n    xMinutes: {\n      one: '1 minute',\n      other: '{{count}} minutes'\n    },\n\n    aboutXHours: {\n      one: 'about 1 hour',\n      other: 'about {{count}} hours'\n    },\n\n    xHours: {\n      one: '1 hour',\n      other: '{{count}} hours'\n    },\n\n    xDays: {\n      one: '1 day',\n      other: '{{count}} days'\n    },\n\n    aboutXMonths: {\n      one: 'about 1 month',\n      other: 'about {{count}} months'\n    },\n\n    xMonths: {\n      one: '1 month',\n      other: '{{count}} months'\n    },\n\n    aboutXYears: {\n      one: 'about 1 year',\n      other: 'about {{count}} years'\n    },\n\n    xYears: {\n      one: '1 year',\n      other: '{{count}} years'\n    },\n\n    overXYears: {\n      one: 'over 1 year',\n      other: 'over {{count}} years'\n    },\n\n    almostXYears: {\n      one: 'almost 1 year',\n      other: 'almost {{count}} years'\n    }\n  }\n\n  function localize (token, count, options) {\n    options = options || {}\n\n    var result\n    if (typeof distanceInWordsLocale[token] === 'string') {\n      result = distanceInWordsLocale[token]\n    } else if (count === 1) {\n      result = distanceInWordsLocale[token].one\n    } else {\n      result = distanceInWordsLocale[token].other.replace('{{count}}', count)\n    }\n\n    if (options.addSuffix) {\n      if (options.comparison > 0) {\n        return 'in ' + result\n      } else {\n        return result + ' ago'\n      }\n    }\n\n    return result\n  }\n\n  return {\n    localize: localize\n  }\n}\n\nmodule.exports = buildDistanceInWordsLocale\n", "var commonFormatterKeys = [\n  'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd',\n  'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG',\n  'H', 'HH', 'h', 'hh', 'm', 'mm',\n  's', 'ss', 'S', 'SS', 'SSS',\n  'Z', 'ZZ', 'X', 'x'\n]\n\nfunction buildFormattingTokensRegExp (formatters) {\n  var formatterKeys = []\n  for (var key in formatters) {\n    if (formatters.hasOwnProperty(key)) {\n      formatterKeys.push(key)\n    }\n  }\n\n  var formattingTokens = commonFormatterKeys\n    .concat(formatterKeys)\n    .sort()\n    .reverse()\n  var formattingTokensRegExp = new RegExp(\n    '(\\\\[[^\\\\[]*\\\\])|(\\\\\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g'\n  )\n\n  return formattingTokensRegExp\n}\n\nmodule.exports = buildFormattingTokensRegExp\n", "var buildFormattingTokensRegExp = require('../../_lib/build_formatting_tokens_reg_exp/index.js')\n\nfunction buildFormatLocale () {\n  // Note: in English, the names of days of the week and months are capitalized.\n  // If you are making a new locale based on this one, check if the same is true for the language you're working on.\n  // Generally, formatted dates should look like they are in the middle of a sentence,\n  // e.g. in Spanish language the weekdays and months should be in the lowercase.\n  var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n  var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n  var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n  var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n  var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n  var meridiemUppercase = ['AM', 'PM']\n  var meridiemLowercase = ['am', 'pm']\n  var meridiemFull = ['a.m.', 'p.m.']\n\n  var formatters = {\n    // Month: Jan, Feb, ..., Dec\n    'MMM': function (date) {\n      return months3char[date.getMonth()]\n    },\n\n    // Month: January, February, ..., December\n    'MMMM': function (date) {\n      return monthsFull[date.getMonth()]\n    },\n\n    // Day of week: Su, Mo, ..., Sa\n    'dd': function (date) {\n      return weekdays2char[date.getDay()]\n    },\n\n    // Day of week: Sun, Mon, ..., Sat\n    'ddd': function (date) {\n      return weekdays3char[date.getDay()]\n    },\n\n    // Day of week: Sunday, Monday, ..., Saturday\n    'dddd': function (date) {\n      return weekdaysFull[date.getDay()]\n    },\n\n    // AM, PM\n    'A': function (date) {\n      return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0]\n    },\n\n    // am, pm\n    'a': function (date) {\n      return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0]\n    },\n\n    // a.m., p.m.\n    'aa': function (date) {\n      return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0]\n    }\n  }\n\n  // Generate ordinal version of formatters: M -> Mo, D -> Do, etc.\n  var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W']\n  ordinalFormatters.forEach(function (formatterToken) {\n    formatters[formatterToken + 'o'] = function (date, formatters) {\n      return ordinal(formatters[formatterToken](date))\n    }\n  })\n\n  return {\n    formatters: formatters,\n    formattingTokensRegExp: buildFormattingTokensRegExp(formatters)\n  }\n}\n\nfunction ordinal (number) {\n  var rem100 = number % 100\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + 'st'\n      case 2:\n        return number + 'nd'\n      case 3:\n        return number + 'rd'\n    }\n  }\n  return number + 'th'\n}\n\nmodule.exports = buildFormatLocale\n", "var buildDistanceInWordsLocale = require('./build_distance_in_words_locale/index.js')\nvar buildFormatLocale = require('./build_format_locale/index.js')\n\n/**\n * @category Locales\n * @summary English locale.\n */\nmodule.exports = {\n  distanceInWords: buildDistanceInWordsLocale(),\n  format: buildFormatLocale()\n}\n", "var compareDesc = require('../compare_desc/index.js')\nvar parse = require('../parse/index.js')\nvar differenceInSeconds = require('../difference_in_seconds/index.js')\nvar differenceInMonths = require('../difference_in_months/index.js')\nvar enLocale = require('../locale/en/index.js')\n\nvar MINUTES_IN_DAY = 1440\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520\nvar MINUTES_IN_MONTH = 43200\nvar MINUTES_IN_TWO_MONTHS = 86400\n\n/**\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates                                            | Result              |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs                                                     | less than a minute  |\n * | 30 secs ... 1 min 30 secs                                         | 1 minute            |\n * | 1 min 30 secs ... 44 mins 30 secs                                 | [2..44] minutes     |\n * | 44 mins ... 30 secs ... 89 mins 30 secs                           | about 1 hour        |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs                        | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs                 | 1 day               |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs         | [2..30] days        |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month       |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months      |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr                           | [2..12] months      |\n * | 1 yr ... 1 yr 3 months                                            | about 1 year        |\n * | 1 yr 3 months ... 1 yr 9 month s                                  | over 1 year         |\n * | 1 yr 9 months ... 2 yrs                                           | almost 2 years      |\n * | N yrs ... N yrs 3 months                                          | about N years       |\n * | N yrs 3 months ... N yrs 9 months                                 | over N years        |\n * | N yrs 9 months ... N+1 yrs                                        | almost N+1 years    |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result               |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs      | less than 5 seconds  |\n * | 5 secs ... 10 secs     | less than 10 seconds |\n * | 10 secs ... 20 secs    | less than 20 seconds |\n * | 20 secs ... 40 secs    | half a minute        |\n * | 40 secs ... 60 secs    | less than a minute   |\n * | 60 secs ... 90 secs    | 1 minute             |\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date|String|Number} date - the other date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * var result = distanceInWords(\n *   new Date(2014, 6, 2),\n *   new Date(2015, 0, 1)\n * )\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * var result = distanceInWords(\n *   new Date(2015, 0, 1, 0, 0, 15),\n *   new Date(2015, 0, 1, 0, 0, 0),\n *   {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * var result = distanceInWords(\n *   new Date(2016, 0, 1),\n *   new Date(2015, 0, 1),\n *   {addSuffix: true}\n * )\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWords(\n *   new Date(2016, 7, 1),\n *   new Date(2015, 0, 1),\n *   {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nfunction distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) {\n  var options = dirtyOptions || {}\n\n  var comparison = compareDesc(dirtyDateToCompare, dirtyDate)\n\n  var locale = options.locale\n  var localize = enLocale.distanceInWords.localize\n  if (locale && locale.distanceInWords && locale.distanceInWords.localize) {\n    localize = locale.distanceInWords.localize\n  }\n\n  var localizeOptions = {\n    addSuffix: Boolean(options.addSuffix),\n    comparison: comparison\n  }\n\n  var dateLeft, dateRight\n  if (comparison > 0) {\n    dateLeft = parse(dirtyDateToCompare)\n    dateRight = parse(dirtyDate)\n  } else {\n    dateLeft = parse(dirtyDate)\n    dateRight = parse(dirtyDateToCompare)\n  }\n\n  var seconds = differenceInSeconds(dateRight, dateLeft)\n  var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset()\n  var minutes = Math.round(seconds / 60) - offset\n  var months\n\n  // 0 up to 2 mins\n  if (minutes < 2) {\n    if (options.includeSeconds) {\n      if (seconds < 5) {\n        return localize('lessThanXSeconds', 5, localizeOptions)\n      } else if (seconds < 10) {\n        return localize('lessThanXSeconds', 10, localizeOptions)\n      } else if (seconds < 20) {\n        return localize('lessThanXSeconds', 20, localizeOptions)\n      } else if (seconds < 40) {\n        return localize('halfAMinute', null, localizeOptions)\n      } else if (seconds < 60) {\n        return localize('lessThanXMinutes', 1, localizeOptions)\n      } else {\n        return localize('xMinutes', 1, localizeOptions)\n      }\n    } else {\n      if (minutes === 0) {\n        return localize('lessThanXMinutes', 1, localizeOptions)\n      } else {\n        return localize('xMinutes', minutes, localizeOptions)\n      }\n    }\n\n  // 2 mins up to 0.75 hrs\n  } else if (minutes < 45) {\n    return localize('xMinutes', minutes, localizeOptions)\n\n  // 0.75 hrs up to 1.5 hrs\n  } else if (minutes < 90) {\n    return localize('aboutXHours', 1, localizeOptions)\n\n  // 1.5 hrs up to 24 hrs\n  } else if (minutes < MINUTES_IN_DAY) {\n    var hours = Math.round(minutes / 60)\n    return localize('aboutXHours', hours, localizeOptions)\n\n  // 1 day up to 1.75 days\n  } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n    return localize('xDays', 1, localizeOptions)\n\n  // 1.75 days up to 30 days\n  } else if (minutes < MINUTES_IN_MONTH) {\n    var days = Math.round(minutes / MINUTES_IN_DAY)\n    return localize('xDays', days, localizeOptions)\n\n  // 1 month up to 2 months\n  } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n    months = Math.round(minutes / MINUTES_IN_MONTH)\n    return localize('aboutXMonths', months, localizeOptions)\n  }\n\n  months = differenceInMonths(dateRight, dateLeft)\n\n  // 2 months up to 12 months\n  if (months < 12) {\n    var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH)\n    return localize('xMonths', nearestMonth, localizeOptions)\n\n  // 1 year up to max Date\n  } else {\n    var monthsSinceStartOfYear = months % 12\n    var years = Math.floor(months / 12)\n\n    // N years up to 1 years 3 months\n    if (monthsSinceStartOfYear < 3) {\n      return localize('aboutXYears', years, localizeOptions)\n\n    // N years 3 months up to N years 9 months\n    } else if (monthsSinceStartOfYear < 9) {\n      return localize('overXYears', years, localizeOptions)\n\n    // N years 9 months up to N year 12 months\n    } else {\n      return localize('almostXYears', years + 1, localizeOptions)\n    }\n  }\n}\n\nmodule.exports = distanceInWords\n", "var compareDesc = require('../compare_desc/index.js')\nvar parse = require('../parse/index.js')\nvar differenceInSeconds = require('../difference_in_seconds/index.js')\nvar enLocale = require('../locale/en/index.js')\n\nvar MINUTES_IN_DAY = 1440\nvar MINUTES_IN_MONTH = 43200\nvar MINUTES_IN_YEAR = 525600\n\n/**\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `distanceInWords`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result              |\n * |------------------------|---------------------|\n * | 0 ... 59 secs          | [0..59] seconds     |\n * | 1 ... 59 mins          | [1..59] minutes     |\n * | 1 ... 23 hrs           | [1..23] hours       |\n * | 1 ... 29 days          | [1..29] days        |\n * | 1 ... 11 months        | [1..11] months      |\n * | 1 ... N years          | [1..N]  years       |\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date|String|Number} date - the other date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'s'|'m'|'h'|'d'|'M'|'Y'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.partialMethod='floor'] - which way to round partial units\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * var result = distanceInWordsStrict(\n *   new Date(2014, 6, 2),\n *   new Date(2015, 0, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00?\n * var result = distanceInWordsStrict(\n *   new Date(2015, 0, 1, 0, 0, 15),\n *   new Date(2015, 0, 1, 0, 0, 0),\n * )\n * //=> '15 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * var result = distanceInWordsStrict(\n *   new Date(2016, 0, 1),\n *   new Date(2015, 0, 1),\n *   {addSuffix: true}\n * )\n * //=> '1 year ago'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, in minutes?\n * var result = distanceInWordsStrict(\n *   new Date(2016, 0, 1),\n *   new Date(2015, 0, 1),\n *   {unit: 'm'}\n * )\n * //=> '525600 minutes'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 28 January 2015, in months, rounded up?\n * var result = distanceInWordsStrict(\n *   new Date(2015, 0, 28),\n *   new Date(2015, 0, 1),\n *   {unit: 'M', partialMethod: 'ceil'}\n * )\n * //=> '1 month'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWordsStrict(\n *   new Date(2016, 7, 1),\n *   new Date(2015, 0, 1),\n *   {locale: eoLocale}\n * )\n * //=> '1 jaro'\n */\nfunction distanceInWordsStrict (dirtyDateToCompare, dirtyDate, dirtyOptions) {\n  var options = dirtyOptions || {}\n\n  var comparison = compareDesc(dirtyDateToCompare, dirtyDate)\n\n  var locale = options.locale\n  var localize = enLocale.distanceInWords.localize\n  if (locale && locale.distanceInWords && locale.distanceInWords.localize) {\n    localize = locale.distanceInWords.localize\n  }\n\n  var localizeOptions = {\n    addSuffix: Boolean(options.addSuffix),\n    comparison: comparison\n  }\n\n  var dateLeft, dateRight\n  if (comparison > 0) {\n    dateLeft = parse(dirtyDateToCompare)\n    dateRight = parse(dirtyDate)\n  } else {\n    dateLeft = parse(dirtyDate)\n    dateRight = parse(dirtyDateToCompare)\n  }\n\n  var unit\n  var mathPartial = Math[options.partialMethod ? String(options.partialMethod) : 'floor']\n  var seconds = differenceInSeconds(dateRight, dateLeft)\n  var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset()\n  var minutes = mathPartial(seconds / 60) - offset\n  var hours, days, months, years\n\n  if (options.unit) {\n    unit = String(options.unit)\n  } else {\n    if (minutes < 1) {\n      unit = 's'\n    } else if (minutes < 60) {\n      unit = 'm'\n    } else if (minutes < MINUTES_IN_DAY) {\n      unit = 'h'\n    } else if (minutes < MINUTES_IN_MONTH) {\n      unit = 'd'\n    } else if (minutes < MINUTES_IN_YEAR) {\n      unit = 'M'\n    } else {\n      unit = 'Y'\n    }\n  }\n\n  // 0 up to 60 seconds\n  if (unit === 's') {\n    return localize('xSeconds', seconds, localizeOptions)\n\n  // 1 up to 60 mins\n  } else if (unit === 'm') {\n    return localize('xMinutes', minutes, localizeOptions)\n\n  // 1 up to 24 hours\n  } else if (unit === 'h') {\n    hours = mathPartial(minutes / 60)\n    return localize('xHours', hours, localizeOptions)\n\n  // 1 up to 30 days\n  } else if (unit === 'd') {\n    days = mathPartial(minutes / MINUTES_IN_DAY)\n    return localize('xDays', days, localizeOptions)\n\n  // 1 up to 12 months\n  } else if (unit === 'M') {\n    months = mathPartial(minutes / MINUTES_IN_MONTH)\n    return localize('xMonths', months, localizeOptions)\n\n  // 1 year up to max Date\n  } else if (unit === 'Y') {\n    years = mathPartial(minutes / MINUTES_IN_YEAR)\n    return localize('xYears', years, localizeOptions)\n  }\n\n  throw new Error('Unknown unit: ' + unit)\n}\n\nmodule.exports = distanceInWordsStrict\n", "var distanceInWords = require('../distance_in_words/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now                                                   | Result              |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs                                                     | less than a minute  |\n * | 30 secs ... 1 min 30 secs                                         | 1 minute            |\n * | 1 min 30 secs ... 44 mins 30 secs                                 | [2..44] minutes     |\n * | 44 mins ... 30 secs ... 89 mins 30 secs                           | about 1 hour        |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs                        | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs                 | 1 day               |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs         | [2..30] days        |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month       |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months      |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr                           | [2..12] months      |\n * | 1 yr ... 1 yr 3 months                                            | about 1 year        |\n * | 1 yr 3 months ... 1 yr 9 month s                                  | over 1 year         |\n * | 1 yr 9 months ... 2 yrs                                           | almost 2 years      |\n * | N yrs ... N yrs 3 months                                          | about N years       |\n * | N yrs 3 months ... N yrs 9 months                                 | over N years        |\n * | N yrs 9 months ... N+1 yrs                                        | almost N+1 years    |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now     | Result               |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs   | less than 5 seconds  |\n * | 5 secs ... 10 secs  | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute        |\n * | 40 secs ... 60 secs | less than a minute   |\n * | 60 secs ... 90 secs | 1 minute             |\n *\n * @param {Date|String|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if the second date is earlier or later than the first\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = distanceInWordsToNow(\n *   new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = distanceInWordsToNow(\n *   new Date(2015, 0, 1, 0, 0, 15),\n *   {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = distanceInWordsToNow(\n *   new Date(2016, 0, 1),\n *   {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWordsToNow(\n *   new Date(2016, 7, 1),\n *   {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nfunction distanceInWordsToNow (dirtyDate, dirtyOptions) {\n  return distanceInWords(Date.now(), dirtyDate, dirtyOptions)\n}\n\nmodule.exports = distanceInWordsToNow\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the array of dates within the specified range.\n *\n * @description\n * Return the array of dates within the specified range.\n *\n * @param {Date|String|Number} startDate - the first date\n * @param {Date|String|Number} endDate - the last date\n * @param {Number} [step=1] - the step between each day\n * @returns {Date[]} the array with starts of days from the day of startDate to the day of endDate\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * var result = eachDay(\n *   new Date(2014, 9, 6),\n *   new Date(2014, 9, 10)\n * )\n * //=> [\n * //   Mon Oct 06 2014 00:00:00,\n * //   Tue Oct 07 2014 00:00:00,\n * //   Wed Oct 08 2014 00:00:00,\n * //   Thu Oct 09 2014 00:00:00,\n * //   Fri Oct 10 2014 00:00:00\n * // ]\n */\nfunction eachDay (dirtyStartDate, dirtyEndDate, dirtyStep) {\n  var startDate = parse(dirtyStartDate)\n  var endDate = parse(dirtyEndDate)\n  var step = dirtyStep !== undefined ? dirtyStep : 1\n\n  var endTime = endDate.getTime()\n\n  if (startDate.getTime() > endTime) {\n    throw new Error('The first date cannot be after the second date')\n  }\n\n  var dates = []\n\n  var currentDate = startDate\n  currentDate.setHours(0, 0, 0, 0)\n\n  while (currentDate.getTime() <= endTime) {\n    dates.push(parse(currentDate))\n    currentDate.setDate(currentDate.getDate() + step)\n  }\n\n  return dates\n}\n\nmodule.exports = eachDay\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * var result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nfunction endOfDay (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setHours(23, 59, 59, 999)\n  return date\n}\n\nmodule.exports = endOfDay\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Return the end of an hour for the given date.\n *\n * @description\n * Return the end of an hour for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an hour\n *\n * @example\n * // The end of an hour for 2 September 2014 11:55:00:\n * var result = endOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:59:59.999\n */\nfunction endOfHour (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setMinutes(59, 59, 999)\n  return date\n}\n\nmodule.exports = endOfHour\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nfunction endOfWeek (dirtyDate, dirtyOptions) {\n  var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n  var date = parse(dirtyDate)\n  var day = date.getDay()\n  var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn)\n\n  date.setDate(date.getDate() + diff)\n  date.setHours(23, 59, 59, 999)\n  return date\n}\n\nmodule.exports = endOfWeek\n", "var endOfWeek = require('../end_of_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * var result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nfunction endOfISOWeek (dirtyDate) {\n  return endOfWeek(dirtyDate, {weekStartsOn: 1})\n}\n\nmodule.exports = endOfISOWeek\n", "var getISOYear = require('../get_iso_year/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the end of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the end of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week-numbering year\n *\n * @example\n * // The end of an ISO week-numbering year for 2 July 2005:\n * var result = endOfISOYear(new Date(2005, 6, 2))\n * //=> Sun Jan 01 2006 23:59:59.999\n */\nfunction endOfISOYear (dirtyDate) {\n  var year = getISOYear(dirtyDate)\n  var fourthOfJanuaryOfNextYear = new Date(0)\n  fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4)\n  fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0)\n  var date = startOfISOWeek(fourthOfJanuaryOfNextYear)\n  date.setMilliseconds(date.getMilliseconds() - 1)\n  return date\n}\n\nmodule.exports = endOfISOYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Return the end of a minute for the given date.\n *\n * @description\n * Return the end of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a minute\n *\n * @example\n * // The end of a minute for 1 December 2014 22:15:45.400:\n * var result = endOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:59.999\n */\nfunction endOfMinute (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setSeconds(59, 999)\n  return date\n}\n\nmodule.exports = endOfMinute\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * var result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nfunction endOfMonth (dirtyDate) {\n  var date = parse(dirtyDate)\n  var month = date.getMonth()\n  date.setFullYear(date.getFullYear(), month + 1, 0)\n  date.setHours(23, 59, 59, 999)\n  return date\n}\n\nmodule.exports = endOfMonth\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Return the end of a year quarter for the given date.\n *\n * @description\n * Return the end of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a quarter\n *\n * @example\n * // The end of a quarter for 2 September 2014 11:55:00:\n * var result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nfunction endOfQuarter (dirtyDate) {\n  var date = parse(dirtyDate)\n  var currentMonth = date.getMonth()\n  var month = currentMonth - currentMonth % 3 + 3\n  date.setMonth(month, 0)\n  date.setHours(23, 59, 59, 999)\n  return date\n}\n\nmodule.exports = endOfQuarter\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Second Helpers\n * @summary Return the end of a second for the given date.\n *\n * @description\n * Return the end of a second for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a second\n *\n * @example\n * // The end of a second for 1 December 2014 22:15:45.400:\n * var result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.999\n */\nfunction endOfSecond (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setMilliseconds(999)\n  return date\n}\n\nmodule.exports = endOfSecond\n", "var endOfDay = require('../end_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the end of today.\n *\n * @description\n * Return the end of today.\n *\n * @returns {Date} the end of today\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfToday()\n * //=> Mon Oct 6 2014 23:59:59.999\n */\nfunction endOfToday () {\n  return endOfDay(new Date())\n}\n\nmodule.exports = endOfToday\n", "/**\n * @category Day Helpers\n * @summary Return the end of tomorrow.\n *\n * @description\n * Return the end of tomorrow.\n *\n * @returns {Date} the end of tomorrow\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfTomorrow()\n * //=> Tue Oct 7 2014 23:59:59.999\n */\nfunction endOfTomorrow () {\n  var now = new Date()\n  var year = now.getFullYear()\n  var month = now.getMonth()\n  var day = now.getDate()\n\n  var date = new Date(0)\n  date.setFullYear(year, month, day + 1)\n  date.setHours(23, 59, 59, 999)\n  return date\n}\n\nmodule.exports = endOfTomorrow\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * var result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nfunction endOfYear (dirtyDate) {\n  var date = parse(dirtyDate)\n  var year = date.getFullYear()\n  date.setFullYear(year + 1, 0, 0)\n  date.setHours(23, 59, 59, 999)\n  return date\n}\n\nmodule.exports = endOfYear\n", "/**\n * @category Day Helpers\n * @summary Return the end of yesterday.\n *\n * @description\n * Return the end of yesterday.\n *\n * @returns {Date} the end of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfYesterday()\n * //=> Sun Oct 5 2014 23:59:59.999\n */\nfunction endOfYesterday () {\n  var now = new Date()\n  var year = now.getFullYear()\n  var month = now.getMonth()\n  var day = now.getDate()\n\n  var date = new Date(0)\n  date.setFullYear(year, month, day - 1)\n  date.setHours(23, 59, 59, 999)\n  return date\n}\n\nmodule.exports = endOfYesterday\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nfunction startOfYear (dirtyDate) {\n  var cleanDate = parse(dirtyDate)\n  var date = new Date(0)\n  date.setFullYear(cleanDate.getFullYear(), 0, 1)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = startOfYear\n", "var parse = require('../parse/index.js')\nvar startOfYear = require('../start_of_year/index.js')\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js')\n\n/**\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * var result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nfunction getDayOfYear (dirtyDate) {\n  var date = parse(dirtyDate)\n  var diff = differenceInCalendarDays(date, startOfYear(date))\n  var dayOfYear = diff + 1\n  return dayOfYear\n}\n\nmodule.exports = getDayOfYear\n", "var parse = require('../parse/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\nvar startOfISOYear = require('../start_of_iso_year/index.js')\n\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * var result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nfunction getISOWeek (dirtyDate) {\n  var date = parse(dirtyDate)\n  var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime()\n\n  // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1\n}\n\nmodule.exports = getISOWeek\n", "var isDate = require('../is_date/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {Date} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} argument must be an instance of Date\n *\n * @example\n * // For the valid date:\n * var result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the invalid date:\n * var result = isValid(new Date(''))\n * //=> false\n */\nfunction isValid (dirtyDate) {\n  if (isDate(dirtyDate)) {\n    return !isNaN(dirtyDate)\n  } else {\n    throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date')\n  }\n}\n\nmodule.exports = isValid\n", "var getDayOfYear = require('../get_day_of_year/index.js')\nvar getISOWeek = require('../get_iso_week/index.js')\nvar getISOYear = require('../get_iso_year/index.js')\nvar parse = require('../parse/index.js')\nvar isValid = require('../is_valid/index.js')\nvar enLocale = require('../locale/en/index.js')\n\n/**\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format.\n *\n * Accepted tokens:\n * | Unit                    | Token | Result examples                  |\n * |-------------------------|-------|----------------------------------|\n * | Month                   | M     | 1, 2, ..., 12                    |\n * |                         | Mo    | 1st, 2nd, ..., 12th              |\n * |                         | MM    | 01, 02, ..., 12                  |\n * |                         | MMM   | Jan, Feb, ..., Dec               |\n * |                         | MMMM  | January, February, ..., December |\n * | Quarter                 | Q     | 1, 2, 3, 4                       |\n * |                         | Qo    | 1st, 2nd, 3rd, 4th               |\n * | Day of month            | D     | 1, 2, ..., 31                    |\n * |                         | Do    | 1st, 2nd, ..., 31st              |\n * |                         | DD    | 01, 02, ..., 31                  |\n * | Day of year             | DDD   | 1, 2, ..., 366                   |\n * |                         | DDDo  | 1st, 2nd, ..., 366th             |\n * |                         | DDDD  | 001, 002, ..., 366               |\n * | Day of week             | d     | 0, 1, ..., 6                     |\n * |                         | do    | 0th, 1st, ..., 6th               |\n * |                         | dd    | Su, Mo, ..., Sa                  |\n * |                         | ddd   | Sun, Mon, ..., Sat               |\n * |                         | dddd  | Sunday, Monday, ..., Saturday    |\n * | Day of ISO week         | E     | 1, 2, ..., 7                     |\n * | ISO week                | W     | 1, 2, ..., 53                    |\n * |                         | Wo    | 1st, 2nd, ..., 53rd              |\n * |                         | WW    | 01, 02, ..., 53                  |\n * | Year                    | YY    | 00, 01, ..., 99                  |\n * |                         | YYYY  | 1900, 1901, ..., 2099            |\n * | ISO week-numbering year | GG    | 00, 01, ..., 99                  |\n * |                         | GGGG  | 1900, 1901, ..., 2099            |\n * | AM/PM                   | A     | AM, PM                           |\n * |                         | a     | am, pm                           |\n * |                         | aa    | a.m., p.m.                       |\n * | Hour                    | H     | 0, 1, ... 23                     |\n * |                         | HH    | 00, 01, ... 23                   |\n * |                         | h     | 1, 2, ..., 12                    |\n * |                         | hh    | 01, 02, ..., 12                  |\n * | Minute                  | m     | 0, 1, ..., 59                    |\n * |                         | mm    | 00, 01, ..., 59                  |\n * | Second                  | s     | 0, 1, ..., 59                    |\n * |                         | ss    | 00, 01, ..., 59                  |\n * | 1/10 of second          | S     | 0, 1, ..., 9                     |\n * | 1/100 of second         | SS    | 00, 01, ..., 99                  |\n * | Millisecond             | SSS   | 000, 001, ..., 999               |\n * | Timezone                | Z     | -01:00, +00:00, ... +12:00       |\n * |                         | ZZ    | -0100, +0000, ..., +1200         |\n * | Seconds timestamp       | X     | 512969520                        |\n * | Milliseconds timestamp  | x     | 512969520900                     |\n *\n * The characters wrapped in square brackets are escaped.\n *\n * The result may vary by locale.\n *\n * @param {Date|String|Number} date - the original date\n * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens\n * @param {Object} [options] - the object with options\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the formatted date string\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(\n *   new Date(2014, 1, 11),\n *   'MM/DD/YYYY'\n * )\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * var eoLocale = require('date-fns/locale/eo')\n * var result = format(\n *   new Date(2014, 6, 2),\n *   'Do [de] MMMM YYYY',\n *   {locale: eoLocale}\n * )\n * //=> '2-a de julio 2014'\n */\nfunction format (dirtyDate, dirtyFormatStr, dirtyOptions) {\n  var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ'\n  var options = dirtyOptions || {}\n\n  var locale = options.locale\n  var localeFormatters = enLocale.format.formatters\n  var formattingTokensRegExp = enLocale.format.formattingTokensRegExp\n  if (locale && locale.format && locale.format.formatters) {\n    localeFormatters = locale.format.formatters\n\n    if (locale.format.formattingTokensRegExp) {\n      formattingTokensRegExp = locale.format.formattingTokensRegExp\n    }\n  }\n\n  var date = parse(dirtyDate)\n\n  if (!isValid(date)) {\n    return 'Invalid Date'\n  }\n\n  var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp)\n\n  return formatFn(date)\n}\n\nvar formatters = {\n  // Month: 1, 2, ..., 12\n  'M': function (date) {\n    return date.getMonth() + 1\n  },\n\n  // Month: 01, 02, ..., 12\n  'MM': function (date) {\n    return addLeadingZeros(date.getMonth() + 1, 2)\n  },\n\n  // Quarter: 1, 2, 3, 4\n  'Q': function (date) {\n    return Math.ceil((date.getMonth() + 1) / 3)\n  },\n\n  // Day of month: 1, 2, ..., 31\n  'D': function (date) {\n    return date.getDate()\n  },\n\n  // Day of month: 01, 02, ..., 31\n  'DD': function (date) {\n    return addLeadingZeros(date.getDate(), 2)\n  },\n\n  // Day of year: 1, 2, ..., 366\n  'DDD': function (date) {\n    return getDayOfYear(date)\n  },\n\n  // Day of year: 001, 002, ..., 366\n  'DDDD': function (date) {\n    return addLeadingZeros(getDayOfYear(date), 3)\n  },\n\n  // Day of week: 0, 1, ..., 6\n  'd': function (date) {\n    return date.getDay()\n  },\n\n  // Day of ISO week: 1, 2, ..., 7\n  'E': function (date) {\n    return date.getDay() || 7\n  },\n\n  // ISO week: 1, 2, ..., 53\n  'W': function (date) {\n    return getISOWeek(date)\n  },\n\n  // ISO week: 01, 02, ..., 53\n  'WW': function (date) {\n    return addLeadingZeros(getISOWeek(date), 2)\n  },\n\n  // Year: 00, 01, ..., 99\n  'YY': function (date) {\n    return addLeadingZeros(date.getFullYear(), 4).substr(2)\n  },\n\n  // Year: 1900, 1901, ..., 2099\n  'YYYY': function (date) {\n    return addLeadingZeros(date.getFullYear(), 4)\n  },\n\n  // ISO week-numbering year: 00, 01, ..., 99\n  'GG': function (date) {\n    return String(getISOYear(date)).substr(2)\n  },\n\n  // ISO week-numbering year: 1900, 1901, ..., 2099\n  'GGGG': function (date) {\n    return getISOYear(date)\n  },\n\n  // Hour: 0, 1, ... 23\n  'H': function (date) {\n    return date.getHours()\n  },\n\n  // Hour: 00, 01, ..., 23\n  'HH': function (date) {\n    return addLeadingZeros(date.getHours(), 2)\n  },\n\n  // Hour: 1, 2, ..., 12\n  'h': function (date) {\n    var hours = date.getHours()\n    if (hours === 0) {\n      return 12\n    } else if (hours > 12) {\n      return hours % 12\n    } else {\n      return hours\n    }\n  },\n\n  // Hour: 01, 02, ..., 12\n  'hh': function (date) {\n    return addLeadingZeros(formatters['h'](date), 2)\n  },\n\n  // Minute: 0, 1, ..., 59\n  'm': function (date) {\n    return date.getMinutes()\n  },\n\n  // Minute: 00, 01, ..., 59\n  'mm': function (date) {\n    return addLeadingZeros(date.getMinutes(), 2)\n  },\n\n  // Second: 0, 1, ..., 59\n  's': function (date) {\n    return date.getSeconds()\n  },\n\n  // Second: 00, 01, ..., 59\n  'ss': function (date) {\n    return addLeadingZeros(date.getSeconds(), 2)\n  },\n\n  // 1/10 of second: 0, 1, ..., 9\n  'S': function (date) {\n    return Math.floor(date.getMilliseconds() / 100)\n  },\n\n  // 1/100 of second: 00, 01, ..., 99\n  'SS': function (date) {\n    return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2)\n  },\n\n  // Millisecond: 000, 001, ..., 999\n  'SSS': function (date) {\n    return addLeadingZeros(date.getMilliseconds(), 3)\n  },\n\n  // Timezone: -01:00, +00:00, ... +12:00\n  'Z': function (date) {\n    return formatTimezone(date.getTimezoneOffset(), ':')\n  },\n\n  // Timezone: -0100, +0000, ... +1200\n  'ZZ': function (date) {\n    return formatTimezone(date.getTimezoneOffset())\n  },\n\n  // Seconds timestamp: 512969520\n  'X': function (date) {\n    return Math.floor(date.getTime() / 1000)\n  },\n\n  // Milliseconds timestamp: 512969520900\n  'x': function (date) {\n    return date.getTime()\n  }\n}\n\nfunction buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) {\n  var array = formatStr.match(formattingTokensRegExp)\n  var length = array.length\n\n  var i\n  var formatter\n  for (i = 0; i < length; i++) {\n    formatter = localeFormatters[array[i]] || formatters[array[i]]\n    if (formatter) {\n      array[i] = formatter\n    } else {\n      array[i] = removeFormattingTokens(array[i])\n    }\n  }\n\n  return function (date) {\n    var output = ''\n    for (var i = 0; i < length; i++) {\n      if (array[i] instanceof Function) {\n        output += array[i](date, formatters)\n      } else {\n        output += array[i]\n      }\n    }\n    return output\n  }\n}\n\nfunction removeFormattingTokens (input) {\n  if (input.match(/\\[[\\s\\S]/)) {\n    return input.replace(/^\\[|]$/g, '')\n  }\n  return input.replace(/\\\\/g, '')\n}\n\nfunction formatTimezone (offset, delimeter) {\n  delimeter = delimeter || ''\n  var sign = offset > 0 ? '-' : '+'\n  var absOffset = Math.abs(offset)\n  var hours = Math.floor(absOffset / 60)\n  var minutes = absOffset % 60\n  return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2)\n}\n\nfunction addLeadingZeros (number, targetLength) {\n  var output = Math.abs(number).toString()\n  while (output.length < targetLength) {\n    output = '0' + output\n  }\n  return output\n}\n\nmodule.exports = format\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Get the day of the month of the given date.\n *\n * @description\n * Get the day of the month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of month\n *\n * @example\n * // Which day of the month is 29 February 2012?\n * var result = getDate(new Date(2012, 1, 29))\n * //=> 29\n */\nfunction getDate (dirtyDate) {\n  var date = parse(dirtyDate)\n  var dayOfMonth = date.getDate()\n  return dayOfMonth\n}\n\nmodule.exports = getDate\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of week\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * var result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nfunction getDay (dirtyDate) {\n  var date = parse(dirtyDate)\n  var day = date.getDay()\n  return day\n}\n\nmodule.exports = getDay\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Is the given date in the leap year?\n *\n * @description\n * Is the given date in the leap year?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the leap year\n *\n * @example\n * // Is 1 September 2012 in the leap year?\n * var result = isLeapYear(new Date(2012, 8, 1))\n * //=> true\n */\nfunction isLeapYear (dirtyDate) {\n  var date = parse(dirtyDate)\n  var year = date.getFullYear()\n  return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0\n}\n\nmodule.exports = isLeapYear\n", "var isLeapYear = require('../is_leap_year/index.js')\n\n/**\n * @category Year Helpers\n * @summary Get the number of days in a year of the given date.\n *\n * @description\n * Get the number of days in a year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of days in a year\n *\n * @example\n * // How many days are in 2012?\n * var result = getDaysInYear(new Date(2012, 0, 1))\n * //=> 366\n */\nfunction getDaysInYear (dirtyDate) {\n  return isLeapYear(dirtyDate) ? 366 : 365\n}\n\nmodule.exports = getDaysInYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Get the hours of the given date.\n *\n * @description\n * Get the hours of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the hours\n *\n * @example\n * // Get the hours of 29 February 2012 11:45:00:\n * var result = getHours(new Date(2012, 1, 29, 11, 45))\n * //=> 11\n */\nfunction getHours (dirtyDate) {\n  var date = parse(dirtyDate)\n  var hours = date.getHours()\n  return hours\n}\n\nmodule.exports = getHours\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Get the day of the ISO week of the given date.\n *\n * @description\n * Get the day of the ISO week of the given date,\n * which is 7 for Sunday, 1 for Monday etc.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of ISO week\n *\n * @example\n * // Which day of the ISO week is 26 February 2012?\n * var result = getISODay(new Date(2012, 1, 26))\n * //=> 7\n */\nfunction getISODay (dirtyDate) {\n  var date = parse(dirtyDate)\n  var day = date.getDay()\n\n  if (day === 0) {\n    day = 7\n  }\n\n  return day\n}\n\nmodule.exports = getISODay\n", "var startOfISOYear = require('../start_of_iso_year/index.js')\nvar addWeeks = require('../add_weeks/index.js')\n\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of weeks in an ISO week-numbering year of the given date.\n *\n * @description\n * Get the number of weeks in an ISO week-numbering year of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of ISO weeks in a year\n *\n * @example\n * // How many weeks are in ISO week-numbering year 2015?\n * var result = getISOWeeksInYear(new Date(2015, 1, 11))\n * //=> 53\n */\nfunction getISOWeeksInYear (dirtyDate) {\n  var thisYear = startOfISOYear(dirtyDate)\n  var nextYear = startOfISOYear(addWeeks(thisYear, 60))\n  var diff = nextYear.valueOf() - thisYear.valueOf()\n  // Round the number of weeks to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n  return Math.round(diff / MILLISECONDS_IN_WEEK)\n}\n\nmodule.exports = getISOWeeksInYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Get the milliseconds of the given date.\n *\n * @description\n * Get the milliseconds of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the milliseconds\n *\n * @example\n * // Get the milliseconds of 29 February 2012 11:45:05.123:\n * var result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 123\n */\nfunction getMilliseconds (dirtyDate) {\n  var date = parse(dirtyDate)\n  var milliseconds = date.getMilliseconds()\n  return milliseconds\n}\n\nmodule.exports = getMilliseconds\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Get the minutes of the given date.\n *\n * @description\n * Get the minutes of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the minutes\n *\n * @example\n * // Get the minutes of 29 February 2012 11:45:05:\n * var result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 45\n */\nfunction getMinutes (dirtyDate) {\n  var date = parse(dirtyDate)\n  var minutes = date.getMinutes()\n  return minutes\n}\n\nmodule.exports = getMinutes\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the month\n *\n * @example\n * // Which month is 29 February 2012?\n * var result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nfunction getMonth (dirtyDate) {\n  var date = parse(dirtyDate)\n  var month = date.getMonth()\n  return month\n}\n\nmodule.exports = getMonth\n", "var parse = require('../parse/index.js')\n\nvar MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000\n\n/**\n * @category Range Helpers\n * @summary Get the number of days that overlap in two date ranges\n *\n * @description\n * Get the number of days that overlap in two date ranges\n *\n * @param {Date|String|Number} initialRangeStartDate - the start of the initial range\n * @param {Date|String|Number} initialRangeEndDate - the end of the initial range\n * @param {Date|String|Number} comparedRangeStartDate - the start of the range to compare it with\n * @param {Date|String|Number} comparedRangeEndDate - the end of the range to compare it with\n * @returns {Number} the number of days that overlap in two date ranges\n * @throws {Error} startDate of a date range cannot be after its endDate\n *\n * @example\n * // For overlapping date ranges adds 1 for each started overlapping day:\n * getOverlappingDaysInRanges(\n *   new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 17), new Date(2014, 0, 21)\n * )\n * //=> 3\n *\n * @example\n * // For non-overlapping date ranges returns 0:\n * getOverlappingDaysInRanges(\n *   new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 21), new Date(2014, 0, 22)\n * )\n * //=> 0\n */\nfunction getOverlappingDaysInRanges (dirtyInitialRangeStartDate, dirtyInitialRangeEndDate, dirtyComparedRangeStartDate, dirtyComparedRangeEndDate) {\n  var initialStartTime = parse(dirtyInitialRangeStartDate).getTime()\n  var initialEndTime = parse(dirtyInitialRangeEndDate).getTime()\n  var comparedStartTime = parse(dirtyComparedRangeStartDate).getTime()\n  var comparedEndTime = parse(dirtyComparedRangeEndDate).getTime()\n\n  if (initialStartTime > initialEndTime || comparedStartTime > comparedEndTime) {\n    throw new Error('The start of the range cannot be after the end of the range')\n  }\n\n  var isOverlapping = initialStartTime < comparedEndTime && comparedStartTime < initialEndTime\n\n  if (!isOverlapping) {\n    return 0\n  }\n\n  var overlapStartDate = comparedStartTime < initialStartTime\n    ? initialStartTime\n    : comparedStartTime\n\n  var overlapEndDate = comparedEndTime > initialEndTime\n    ? initialEndTime\n    : comparedEndTime\n\n  var differenceInMs = overlapEndDate - overlapStartDate\n\n  return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY)\n}\n\nmodule.exports = getOverlappingDaysInRanges\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the seconds\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * var result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\nfunction getSeconds (dirtyDate) {\n  var date = parse(dirtyDate)\n  var seconds = date.getSeconds()\n  return seconds\n}\n\nmodule.exports = getSeconds\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Timestamp Helpers\n * @summary Get the milliseconds timestamp of the given date.\n *\n * @description\n * Get the milliseconds timestamp of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the timestamp\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05.123:\n * var result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 1330515905123\n */\nfunction getTime (dirtyDate) {\n  var date = parse(dirtyDate)\n  var timestamp = date.getTime()\n  return timestamp\n}\n\nmodule.exports = getTime\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the year\n *\n * @example\n * // Which year is 2 July 2014?\n * var result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nfunction getYear (dirtyDate) {\n  var date = parse(dirtyDate)\n  var year = date.getFullYear()\n  return year\n}\n\nmodule.exports = getYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|String|Number} date - the date that should be after the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nfunction isAfter (dirtyDate, dirtyDateToCompare) {\n  var date = parse(dirtyDate)\n  var dateToCompare = parse(dirtyDateToCompare)\n  return date.getTime() > dateToCompare.getTime()\n}\n\nmodule.exports = isAfter\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|String|Number} date - the date that should be before the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nfunction isBefore (dirtyDate, dirtyDateToCompare) {\n  var date = parse(dirtyDate)\n  var dateToCompare = parse(dirtyDateToCompare)\n  return date.getTime() < dateToCompare.getTime()\n}\n\nmodule.exports = isBefore\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n *   new Date(2014, 6, 2, 6, 30, 45, 0)\n *   new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nfunction isEqual (dirtyLeftDate, dirtyRightDate) {\n  var dateLeft = parse(dirtyLeftDate)\n  var dateRight = parse(dirtyRightDate)\n  return dateLeft.getTime() === dateRight.getTime()\n}\n\nmodule.exports = isEqual\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Is the given date the first day of a month?\n *\n * @description\n * Is the given date the first day of a month?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is the first day of a month\n *\n * @example\n * // Is 1 September 2014 the first day of a month?\n * var result = isFirstDayOfMonth(new Date(2014, 8, 1))\n * //=> true\n */\nfunction isFirstDayOfMonth (dirtyDate) {\n  return parse(dirtyDate).getDate() === 1\n}\n\nmodule.exports = isFirstDayOfMonth\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Friday?\n *\n * @description\n * Is the given date Friday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Friday\n *\n * @example\n * // Is 26 September 2014 Friday?\n * var result = isFriday(new Date(2014, 8, 26))\n * //=> true\n */\nfunction isFriday (dirtyDate) {\n  return parse(dirtyDate).getDay() === 5\n}\n\nmodule.exports = isFriday\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the given date in the future?\n *\n * @description\n * Is the given date in the future?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the future\n *\n * @example\n * // If today is 6 October 2014, is 31 December 2014 in the future?\n * var result = isFuture(new Date(2014, 11, 31))\n * //=> true\n */\nfunction isFuture (dirtyDate) {\n  return parse(dirtyDate).getTime() > new Date().getTime()\n}\n\nmodule.exports = isFuture\n", "var parse = require('../parse/index.js')\nvar endOfDay = require('../end_of_day/index.js')\nvar endOfMonth = require('../end_of_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * var result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nfunction isLastDayOfMonth (dirtyDate) {\n  var date = parse(dirtyDate)\n  return endOfDay(date).getTime() === endOfMonth(date).getTime()\n}\n\nmodule.exports = isLastDayOfMonth\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Monday?\n *\n * @description\n * Is the given date Monday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Monday\n *\n * @example\n * // Is 22 September 2014 Monday?\n * var result = isMonday(new Date(2014, 8, 22))\n * //=> true\n */\nfunction isMonday (dirtyDate) {\n  return parse(dirtyDate).getDay() === 1\n}\n\nmodule.exports = isMonday\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the given date in the past?\n *\n * @description\n * Is the given date in the past?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the past\n *\n * @example\n * // If today is 6 October 2014, is 2 July 2014 in the past?\n * var result = isPast(new Date(2014, 6, 2))\n * //=> true\n */\nfunction isPast (dirtyDate) {\n  return parse(dirtyDate).getTime() < new Date().getTime()\n}\n\nmodule.exports = isPast\n", "var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Are the given dates in the same day?\n *\n * @description\n * Are the given dates in the same day?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(\n *   new Date(2014, 8, 4, 6, 0),\n *   new Date(2014, 8, 4, 18, 0)\n * )\n * //=> true\n */\nfunction isSameDay (dirtyDateLeft, dirtyDateRight) {\n  var dateLeftStartOfDay = startOfDay(dirtyDateLeft)\n  var dateRightStartOfDay = startOfDay(dirtyDateRight)\n\n  return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime()\n}\n\nmodule.exports = isSameDay\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Return the start of an hour for the given date.\n *\n * @description\n * Return the start of an hour for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an hour\n *\n * @example\n * // The start of an hour for 2 September 2014 11:55:00:\n * var result = startOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:00:00\n */\nfunction startOfHour (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setMinutes(0, 0, 0)\n  return date\n}\n\nmodule.exports = startOfHour\n", "var startOfHour = require('../start_of_hour/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Are the given dates in the same hour?\n *\n * @description\n * Are the given dates in the same hour?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same hour\n *\n * @example\n * // Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour?\n * var result = isSameHour(\n *   new Date(2014, 8, 4, 6, 0),\n *   new Date(2014, 8, 4, 6, 30)\n * )\n * //=> true\n */\nfunction isSameHour (dirtyDateLeft, dirtyDateRight) {\n  var dateLeftStartOfHour = startOfHour(dirtyDateLeft)\n  var dateRightStartOfHour = startOfHour(dirtyDateRight)\n\n  return dateLeftStartOfHour.getTime() === dateRightStartOfHour.getTime()\n}\n\nmodule.exports = isSameHour\n", "var startOfWeek = require('../start_of_week/index.js')\n\n/**\n * @category Week Helpers\n * @summary Are the given dates in the same week?\n *\n * @description\n * Are the given dates in the same week?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Boolean} the dates are in the same week\n *\n * @example\n * // Are 31 August 2014 and 4 September 2014 in the same week?\n * var result = isSameWeek(\n *   new Date(2014, 7, 31),\n *   new Date(2014, 8, 4)\n * )\n * //=> true\n *\n * @example\n * // If week starts with Monday,\n * // are 31 August 2014 and 4 September 2014 in the same week?\n * var result = isSameWeek(\n *   new Date(2014, 7, 31),\n *   new Date(2014, 8, 4),\n *   {weekStartsOn: 1}\n * )\n * //=> false\n */\nfunction isSameWeek (dirtyDateLeft, dirtyDateRight, dirtyOptions) {\n  var dateLeftStartOfWeek = startOfWeek(dirtyDateLeft, dirtyOptions)\n  var dateRightStartOfWeek = startOfWeek(dirtyDateRight, dirtyOptions)\n\n  return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime()\n}\n\nmodule.exports = isSameWeek\n", "var isSameWeek = require('../is_same_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Are the given dates in the same ISO week?\n *\n * @description\n * Are the given dates in the same ISO week?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same ISO week\n *\n * @example\n * // Are 1 September 2014 and 7 September 2014 in the same ISO week?\n * var result = isSameISOWeek(\n *   new Date(2014, 8, 1),\n *   new Date(2014, 8, 7)\n * )\n * //=> true\n */\nfunction isSameISOWeek (dirtyDateLeft, dirtyDateRight) {\n  return isSameWeek(dirtyDateLeft, dirtyDateRight, {weekStartsOn: 1})\n}\n\nmodule.exports = isSameISOWeek\n", "var startOfISOYear = require('../start_of_iso_year/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Are the given dates in the same ISO week-numbering year?\n *\n * @description\n * Are the given dates in the same ISO week-numbering year?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same ISO week-numbering year\n *\n * @example\n * // Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year?\n * var result = isSameISOYear(\n *   new Date(2003, 11, 29),\n *   new Date(2005, 0, 2)\n * )\n * //=> true\n */\nfunction isSameISOYear (dirtyDateLeft, dirtyDateRight) {\n  var dateLeftStartOfYear = startOfISOYear(dirtyDateLeft)\n  var dateRightStartOfYear = startOfISOYear(dirtyDateRight)\n\n  return dateLeftStartOfYear.getTime() === dateRightStartOfYear.getTime()\n}\n\nmodule.exports = isSameISOYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Return the start of a minute for the given date.\n *\n * @description\n * Return the start of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a minute\n *\n * @example\n * // The start of a minute for 1 December 2014 22:15:45.400:\n * var result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:00\n */\nfunction startOfMinute (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setSeconds(0, 0)\n  return date\n}\n\nmodule.exports = startOfMinute\n", "var startOfMinute = require('../start_of_minute/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Are the given dates in the same minute?\n *\n * @description\n * Are the given dates in the same minute?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same minute\n *\n * @example\n * // Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15\n * // in the same minute?\n * var result = isSameMinute(\n *   new Date(2014, 8, 4, 6, 30),\n *   new Date(2014, 8, 4, 6, 30, 15)\n * )\n * //=> true\n */\nfunction isSameMinute (dirtyDateLeft, dirtyDateRight) {\n  var dateLeftStartOfMinute = startOfMinute(dirtyDateLeft)\n  var dateRightStartOfMinute = startOfMinute(dirtyDateRight)\n\n  return dateLeftStartOfMinute.getTime() === dateRightStartOfMinute.getTime()\n}\n\nmodule.exports = isSameMinute\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Are the given dates in the same month?\n *\n * @description\n * Are the given dates in the same month?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(\n *   new Date(2014, 8, 2),\n *   new Date(2014, 8, 25)\n * )\n * //=> true\n */\nfunction isSameMonth (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n  return dateLeft.getFullYear() === dateRight.getFullYear() &&\n    dateLeft.getMonth() === dateRight.getMonth()\n}\n\nmodule.exports = isSameMonth\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * var result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\nfunction startOfQuarter (dirtyDate) {\n  var date = parse(dirtyDate)\n  var currentMonth = date.getMonth()\n  var month = currentMonth - currentMonth % 3\n  date.setMonth(month, 1)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = startOfQuarter\n", "var startOfQuarter = require('../start_of_quarter/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Are the given dates in the same year quarter?\n *\n * @description\n * Are the given dates in the same year quarter?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same quarter\n *\n * @example\n * // Are 1 January 2014 and 8 March 2014 in the same quarter?\n * var result = isSameQuarter(\n *   new Date(2014, 0, 1),\n *   new Date(2014, 2, 8)\n * )\n * //=> true\n */\nfunction isSameQuarter (dirtyDateLeft, dirtyDateRight) {\n  var dateLeftStartOfQuarter = startOfQuarter(dirtyDateLeft)\n  var dateRightStartOfQuarter = startOfQuarter(dirtyDateRight)\n\n  return dateLeftStartOfQuarter.getTime() === dateRightStartOfQuarter.getTime()\n}\n\nmodule.exports = isSameQuarter\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Second Helpers\n * @summary Return the start of a second for the given date.\n *\n * @description\n * Return the start of a second for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a second\n *\n * @example\n * // The start of a second for 1 December 2014 22:15:45.400:\n * var result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.000\n */\nfunction startOfSecond (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setMilliseconds(0)\n  return date\n}\n\nmodule.exports = startOfSecond\n", "var startOfSecond = require('../start_of_second/index.js')\n\n/**\n * @category Second Helpers\n * @summary Are the given dates in the same second?\n *\n * @description\n * Are the given dates in the same second?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same second\n *\n * @example\n * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500\n * // in the same second?\n * var result = isSameSecond(\n *   new Date(2014, 8, 4, 6, 30, 15),\n *   new Date(2014, 8, 4, 6, 30, 15, 500)\n * )\n * //=> true\n */\nfunction isSameSecond (dirtyDateLeft, dirtyDateRight) {\n  var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft)\n  var dateRightStartOfSecond = startOfSecond(dirtyDateRight)\n\n  return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime()\n}\n\nmodule.exports = isSameSecond\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * var result = isSameYear(\n *   new Date(2014, 8, 2),\n *   new Date(2014, 8, 25)\n * )\n * //=> true\n */\nfunction isSameYear (dirtyDateLeft, dirtyDateRight) {\n  var dateLeft = parse(dirtyDateLeft)\n  var dateRight = parse(dirtyDateRight)\n  return dateLeft.getFullYear() === dateRight.getFullYear()\n}\n\nmodule.exports = isSameYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Saturday?\n *\n * @description\n * Is the given date Saturday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Saturday\n *\n * @example\n * // Is 27 September 2014 Saturday?\n * var result = isSaturday(new Date(2014, 8, 27))\n * //=> true\n */\nfunction isSaturday (dirtyDate) {\n  return parse(dirtyDate).getDay() === 6\n}\n\nmodule.exports = isSaturday\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Sunday?\n *\n * @description\n * Is the given date Sunday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Sunday\n *\n * @example\n * // Is 21 September 2014 Sunday?\n * var result = isSunday(new Date(2014, 8, 21))\n * //=> true\n */\nfunction isSunday (dirtyDate) {\n  return parse(dirtyDate).getDay() === 0\n}\n\nmodule.exports = isSunday\n", "var isSameHour = require('../is_same_hour/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Is the given date in the same hour as the current date?\n *\n * @description\n * Is the given date in the same hour as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this hour\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:00:00 in this hour?\n * var result = isThisHour(new Date(2014, 8, 25, 18))\n * //=> true\n */\nfunction isThisHour (dirtyDate) {\n  return isSameHour(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisHour\n", "var isSameISOWeek = require('../is_same_iso_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Is the given date in the same ISO week as the current date?\n *\n * @description\n * Is the given date in the same ISO week as the current date?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this ISO week\n *\n * @example\n * // If today is 25 September 2014, is 22 September 2014 in this ISO week?\n * var result = isThisISOWeek(new Date(2014, 8, 22))\n * //=> true\n */\nfunction isThisISOWeek (dirtyDate) {\n  return isSameISOWeek(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisISOWeek\n", "var isSameISOYear = require('../is_same_iso_year/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Is the given date in the same ISO week-numbering year as the current date?\n *\n * @description\n * Is the given date in the same ISO week-numbering year as the current date?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this ISO week-numbering year\n *\n * @example\n * // If today is 25 September 2014,\n * // is 30 December 2013 in this ISO week-numbering year?\n * var result = isThisISOYear(new Date(2013, 11, 30))\n * //=> true\n */\nfunction isThisISOYear (dirtyDate) {\n  return isSameISOYear(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisISOYear\n", "var isSameMinute = require('../is_same_minute/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Is the given date in the same minute as the current date?\n *\n * @description\n * Is the given date in the same minute as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this minute\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:30:00 in this minute?\n * var result = isThisMinute(new Date(2014, 8, 25, 18, 30))\n * //=> true\n */\nfunction isThisMinute (dirtyDate) {\n  return isSameMinute(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisMinute\n", "var isSameMonth = require('../is_same_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Is the given date in the same month as the current date?\n *\n * @description\n * Is the given date in the same month as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this month\n *\n * @example\n * // If today is 25 September 2014, is 15 September 2014 in this month?\n * var result = isThisMonth(new Date(2014, 8, 15))\n * //=> true\n */\nfunction isThisMonth (dirtyDate) {\n  return isSameMonth(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisMonth\n", "var isSameQuarter = require('../is_same_quarter/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Is the given date in the same quarter as the current date?\n *\n * @description\n * Is the given date in the same quarter as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this quarter\n *\n * @example\n * // If today is 25 September 2014, is 2 July 2014 in this quarter?\n * var result = isThisQuarter(new Date(2014, 6, 2))\n * //=> true\n */\nfunction isThisQuarter (dirtyDate) {\n  return isSameQuarter(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisQuarter\n", "var isSameSecond = require('../is_same_second/index.js')\n\n/**\n * @category Second Helpers\n * @summary Is the given date in the same second as the current date?\n *\n * @description\n * Is the given date in the same second as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this second\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:30:15.000 in this second?\n * var result = isThisSecond(new Date(2014, 8, 25, 18, 30, 15))\n * //=> true\n */\nfunction isThisSecond (dirtyDate) {\n  return isSameSecond(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisSecond\n", "var isSameWeek = require('../is_same_week/index.js')\n\n/**\n * @category Week Helpers\n * @summary Is the given date in the same week as the current date?\n *\n * @description\n * Is the given date in the same week as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Boolean} the date is in this week\n *\n * @example\n * // If today is 25 September 2014, is 21 September 2014 in this week?\n * var result = isThisWeek(new Date(2014, 8, 21))\n * //=> true\n *\n * @example\n * // If today is 25 September 2014 and week starts with Monday\n * // is 21 September 2014 in this week?\n * var result = isThisWeek(new Date(2014, 8, 21), {weekStartsOn: 1})\n * //=> false\n */\nfunction isThisWeek (dirtyDate, dirtyOptions) {\n  return isSameWeek(new Date(), dirtyDate, dirtyOptions)\n}\n\nmodule.exports = isThisWeek\n", "var isSameYear = require('../is_same_year/index.js')\n\n/**\n * @category Year Helpers\n * @summary Is the given date in the same year as the current date?\n *\n * @description\n * Is the given date in the same year as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this year\n *\n * @example\n * // If today is 25 September 2014, is 2 July 2014 in this year?\n * var result = isThisYear(new Date(2014, 6, 2))\n * //=> true\n */\nfunction isThisYear (dirtyDate) {\n  return isSameYear(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Thursday?\n *\n * @description\n * Is the given date Thursday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Thursday\n *\n * @example\n * // Is 25 September 2014 Thursday?\n * var result = isThursday(new Date(2014, 8, 25))\n * //=> true\n */\nfunction isThursday (dirtyDate) {\n  return parse(dirtyDate).getDay() === 4\n}\n\nmodule.exports = isThursday\n", "var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Is the given date today?\n *\n * @description\n * Is the given date today?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is today\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * var result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\nfunction isToday (dirtyDate) {\n  return startOfDay(dirtyDate).getTime() === startOfDay(new Date()).getTime()\n}\n\nmodule.exports = isToday\n", "var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Is the given date tomorrow?\n *\n * @description\n * Is the given date tomorrow?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is tomorrow\n *\n * @example\n * // If today is 6 October 2014, is 7 October 14:00:00 tomorrow?\n * var result = isTomorrow(new Date(2014, 9, 7, 14, 0))\n * //=> true\n */\nfunction isTomorrow (dirtyDate) {\n  var tomorrow = new Date()\n  tomorrow.setDate(tomorrow.getDate() + 1)\n  return startOfDay(dirtyDate).getTime() === startOfDay(tomorrow).getTime()\n}\n\nmodule.exports = isTomorrow\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Tuesday?\n *\n * @description\n * Is the given date Tuesday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Tuesday\n *\n * @example\n * // Is 23 September 2014 Tuesday?\n * var result = isTuesday(new Date(2014, 8, 23))\n * //=> true\n */\nfunction isTuesday (dirtyDate) {\n  return parse(dirtyDate).getDay() === 2\n}\n\nmodule.exports = isTuesday\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Wednesday?\n *\n * @description\n * Is the given date Wednesday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Wednesday\n *\n * @example\n * // Is 24 September 2014 Wednesday?\n * var result = isWednesday(new Date(2014, 8, 24))\n * //=> true\n */\nfunction isWednesday (dirtyDate) {\n  return parse(dirtyDate).getDay() === 3\n}\n\nmodule.exports = isWednesday\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Does the given date fall on a weekend?\n *\n * @description\n * Does the given date fall on a weekend?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date falls on a weekend\n *\n * @example\n * // Does 5 October 2014 fall on a weekend?\n * var result = isWeekend(new Date(2014, 9, 5))\n * //=> true\n */\nfunction isWeekend (dirtyDate) {\n  var date = parse(dirtyDate)\n  var day = date.getDay()\n  return day === 0 || day === 6\n}\n\nmodule.exports = isWeekend\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Range Helpers\n * @summary Is the given date within the range?\n *\n * @description\n * Is the given date within the range?\n *\n * @param {Date|String|Number} date - the date to check\n * @param {Date|String|Number} startDate - the start of range\n * @param {Date|String|Number} endDate - the end of range\n * @returns {Boolean} the date is within the range\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // For the date within the range:\n * isWithinRange(\n *   new Date(2014, 0, 3), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> true\n *\n * @example\n * // For the date outside of the range:\n * isWithinRange(\n *   new Date(2014, 0, 10), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> false\n */\nfunction isWithinRange (dirtyDate, dirtyStartDate, dirtyEndDate) {\n  var time = parse(dirtyDate).getTime()\n  var startTime = parse(dirtyStartDate).getTime()\n  var endTime = parse(dirtyEndDate).getTime()\n\n  if (startTime > endTime) {\n    throw new Error('The start of the range cannot be after the end of the range')\n  }\n\n  return time >= startTime && time <= endTime\n}\n\nmodule.exports = isWithinRange\n", "var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Is the given date yesterday?\n *\n * @description\n * Is the given date yesterday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is yesterday\n *\n * @example\n * // If today is 6 October 2014, is 5 October 14:00:00 yesterday?\n * var result = isYesterday(new Date(2014, 9, 5, 14, 0))\n * //=> true\n */\nfunction isYesterday (dirtyDate) {\n  var yesterday = new Date()\n  yesterday.setDate(yesterday.getDate() - 1)\n  return startOfDay(dirtyDate).getTime() === startOfDay(yesterday).getTime()\n}\n\nmodule.exports = isYesterday\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the last day of a week for the given date.\n *\n * @description\n * Return the last day of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the last day of a week\n *\n * @example\n * // The last day of a week for 2 September 2014 11:55:00:\n * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the last day of the week for 2 September 2014 11:55:00:\n * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 00:00:00\n */\nfunction lastDayOfWeek (dirtyDate, dirtyOptions) {\n  var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n  var date = parse(dirtyDate)\n  var day = date.getDay()\n  var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn)\n\n  date.setHours(0, 0, 0, 0)\n  date.setDate(date.getDate() + diff)\n  return date\n}\n\nmodule.exports = lastDayOfWeek\n", "var lastDayOfWeek = require('../last_day_of_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Return the last day of an ISO week for the given date.\n *\n * @description\n * Return the last day of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of an ISO week\n *\n * @example\n * // The last day of an ISO week for 2 September 2014 11:55:00:\n * var result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 00:00:00\n */\nfunction lastDayOfISOWeek (dirtyDate) {\n  return lastDayOfWeek(dirtyDate, {weekStartsOn: 1})\n}\n\nmodule.exports = lastDayOfISOWeek\n", "var getISOYear = require('../get_iso_year/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the last day of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the last day of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week-numbering year\n *\n * @example\n * // The last day of an ISO week-numbering year for 2 July 2005:\n * var result = lastDayOfISOYear(new Date(2005, 6, 2))\n * //=> Sun Jan 01 2006 00:00:00\n */\nfunction lastDayOfISOYear (dirtyDate) {\n  var year = getISOYear(dirtyDate)\n  var fourthOfJanuary = new Date(0)\n  fourthOfJanuary.setFullYear(year + 1, 0, 4)\n  fourthOfJanuary.setHours(0, 0, 0, 0)\n  var date = startOfISOWeek(fourthOfJanuary)\n  date.setDate(date.getDate() - 1)\n  return date\n}\n\nmodule.exports = lastDayOfISOYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the last day of a month for the given date.\n *\n * @description\n * Return the last day of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a month\n *\n * @example\n * // The last day of a month for 2 September 2014 11:55:00:\n * var result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 00:00:00\n */\nfunction lastDayOfMonth (dirtyDate) {\n  var date = parse(dirtyDate)\n  var month = date.getMonth()\n  date.setFullYear(date.getFullYear(), month + 1, 0)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = lastDayOfMonth\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Return the last day of a year quarter for the given date.\n *\n * @description\n * Return the last day of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a quarter\n *\n * @example\n * // The last day of a quarter for 2 September 2014 11:55:00:\n * var result = lastDayOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 00:00:00\n */\nfunction lastDayOfQuarter (dirtyDate) {\n  var date = parse(dirtyDate)\n  var currentMonth = date.getMonth()\n  var month = currentMonth - currentMonth % 3 + 3\n  date.setMonth(month, 0)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = lastDayOfQuarter\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Return the last day of a year for the given date.\n *\n * @description\n * Return the last day of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a year\n *\n * @example\n * // The last day of a year for 2 September 2014 11:55:00:\n * var result = lastDayOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 00:00:00\n */\nfunction lastDayOfYear (dirtyDate) {\n  var date = parse(dirtyDate)\n  var year = date.getFullYear()\n  date.setFullYear(year + 1, 0, 0)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = lastDayOfYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @param {...(Date|String|Number)} dates - the dates to compare\n * @returns {Date} the latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * var result = max(\n *   new Date(1989, 6, 10),\n *   new Date(1987, 1, 11),\n *   new Date(1995, 6, 2),\n *   new Date(1990, 0, 1)\n * )\n * //=> Sun Jul 02 1995 00:00:00\n */\nfunction max () {\n  var dirtyDates = Array.prototype.slice.call(arguments)\n  var dates = dirtyDates.map(function (dirtyDate) {\n    return parse(dirtyDate)\n  })\n  var latestTimestamp = Math.max.apply(null, dates)\n  return new Date(latestTimestamp)\n}\n\nmodule.exports = max\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return the earliest of the given dates.\n *\n * @description\n * Return the earliest of the given dates.\n *\n * @param {...(Date|String|Number)} dates - the dates to compare\n * @returns {Date} the earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * var result = min(\n *   new Date(1989, 6, 10),\n *   new Date(1987, 1, 11),\n *   new Date(1995, 6, 2),\n *   new Date(1990, 0, 1)\n * )\n * //=> Wed Feb 11 1987 00:00:00\n */\nfunction min () {\n  var dirtyDates = Array.prototype.slice.call(arguments)\n  var dates = dirtyDates.map(function (dirtyDate) {\n    return parse(dirtyDate)\n  })\n  var earliestTimestamp = Math.min.apply(null, dates)\n  return new Date(earliestTimestamp)\n}\n\nmodule.exports = min\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month setted\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * var result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\nfunction setDate (dirtyDate, dirtyDayOfMonth) {\n  var date = parse(dirtyDate)\n  var dayOfMonth = Number(dirtyDayOfMonth)\n  date.setDate(dayOfMonth)\n  return date\n}\n\nmodule.exports = setDate\n", "var parse = require('../parse/index.js')\nvar addDays = require('../add_days/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} day - the day of the week of the new date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the new date with the day of the week setted\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * var result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If week starts with Monday, set Sunday to 1 September 2014:\n * var result = setDay(new Date(2014, 8, 1), 0, {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 00:00:00\n */\nfunction setDay (dirtyDate, dirtyDay, dirtyOptions) {\n  var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n  var date = parse(dirtyDate)\n  var day = Number(dirtyDay)\n  var currentDay = date.getDay()\n\n  var remainder = day % 7\n  var dayIndex = (remainder + 7) % 7\n\n  var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay\n  return addDays(date, diff)\n}\n\nmodule.exports = setDay\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Set the day of the year to the given date.\n *\n * @description\n * Set the day of the year to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} dayOfYear - the day of the year of the new date\n * @returns {Date} the new date with the day of the year setted\n *\n * @example\n * // Set the 2nd day of the year to 2 July 2014:\n * var result = setDayOfYear(new Date(2014, 6, 2), 2)\n * //=> Thu Jan 02 2014 00:00:00\n */\nfunction setDayOfYear (dirtyDate, dirtyDayOfYear) {\n  var date = parse(dirtyDate)\n  var dayOfYear = Number(dirtyDayOfYear)\n  date.setMonth(0)\n  date.setDate(dayOfYear)\n  return date\n}\n\nmodule.exports = setDayOfYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours setted\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * var result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\nfunction setHours (dirtyDate, dirtyHours) {\n  var date = parse(dirtyDate)\n  var hours = Number(dirtyHours)\n  date.setHours(hours)\n  return date\n}\n\nmodule.exports = setHours\n", "var parse = require('../parse/index.js')\nvar addDays = require('../add_days/index.js')\nvar getISODay = require('../get_iso_day/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Set the day of the ISO week to the given date.\n *\n * @description\n * Set the day of the ISO week to the given date.\n * ISO week starts with Monday.\n * 7 is the index of Sunday, 1 is the index of Monday etc.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} day - the day of the ISO week of the new date\n * @returns {Date} the new date with the day of the ISO week setted\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * var result = setISODay(new Date(2014, 8, 1), 7)\n * //=> Sun Sep 07 2014 00:00:00\n */\nfunction setISODay (dirtyDate, dirtyDay) {\n  var date = parse(dirtyDate)\n  var day = Number(dirtyDay)\n  var currentDay = getISODay(date)\n  var diff = day - currentDay\n  return addDays(date, diff)\n}\n\nmodule.exports = setISODay\n", "var parse = require('../parse/index.js')\nvar getISOWeek = require('../get_iso_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Set the ISO week to the given date.\n *\n * @description\n * Set the ISO week to the given date, saving the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} isoWeek - the ISO week of the new date\n * @returns {Date} the new date with the ISO week setted\n *\n * @example\n * // Set the 53rd ISO week to 7 August 2004:\n * var result = setISOWeek(new Date(2004, 7, 7), 53)\n * //=> Sat Jan 01 2005 00:00:00\n */\nfunction setISOWeek (dirtyDate, dirtyISOWeek) {\n  var date = parse(dirtyDate)\n  var isoWeek = Number(dirtyISOWeek)\n  var diff = getISOWeek(date) - isoWeek\n  date.setDate(date.getDate() - diff * 7)\n  return date\n}\n\nmodule.exports = setISOWeek\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Set the milliseconds to the given date.\n *\n * @description\n * Set the milliseconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} milliseconds - the milliseconds of the new date\n * @returns {Date} the new date with the milliseconds setted\n *\n * @example\n * // Set 300 milliseconds to 1 September 2014 11:30:40.500:\n * var result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300)\n * //=> Mon Sep 01 2014 11:30:40.300\n */\nfunction setMilliseconds (dirtyDate, dirtyMilliseconds) {\n  var date = parse(dirtyDate)\n  var milliseconds = Number(dirtyMilliseconds)\n  date.setMilliseconds(milliseconds)\n  return date\n}\n\nmodule.exports = setMilliseconds\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes setted\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * var result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\nfunction setMinutes (dirtyDate, dirtyMinutes) {\n  var date = parse(dirtyDate)\n  var minutes = Number(dirtyMinutes)\n  date.setMinutes(minutes)\n  return date\n}\n\nmodule.exports = setMinutes\n", "var parse = require('../parse/index.js')\nvar getDaysInMonth = require('../get_days_in_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month setted\n *\n * @example\n * // Set February to 1 September 2014:\n * var result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nfunction setMonth (dirtyDate, dirtyMonth) {\n  var date = parse(dirtyDate)\n  var month = Number(dirtyMonth)\n  var year = date.getFullYear()\n  var day = date.getDate()\n\n  var dateWithDesiredMonth = new Date(0)\n  dateWithDesiredMonth.setFullYear(year, month, 15)\n  dateWithDesiredMonth.setHours(0, 0, 0, 0)\n  var daysInMonth = getDaysInMonth(dateWithDesiredMonth)\n  // Set the last day of the new month\n  // if the original date was the last day of the longer month\n  date.setMonth(month, Math.min(day, daysInMonth))\n  return date\n}\n\nmodule.exports = setMonth\n", "var parse = require('../parse/index.js')\nvar setMonth = require('../set_month/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Set the year quarter to the given date.\n *\n * @description\n * Set the year quarter to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} quarter - the quarter of the new date\n * @returns {Date} the new date with the quarter setted\n *\n * @example\n * // Set the 2nd quarter to 2 July 2014:\n * var result = setQuarter(new Date(2014, 6, 2), 2)\n * //=> Wed Apr 02 2014 00:00:00\n */\nfunction setQuarter (dirtyDate, dirtyQuarter) {\n  var date = parse(dirtyDate)\n  var quarter = Number(dirtyQuarter)\n  var oldQuarter = Math.floor(date.getMonth() / 3) + 1\n  var diff = quarter - oldQuarter\n  return setMonth(date, date.getMonth() + diff * 3)\n}\n\nmodule.exports = setQuarter\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} seconds - the seconds of the new date\n * @returns {Date} the new date with the seconds setted\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * var result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\nfunction setSeconds (dirtyDate, dirtySeconds) {\n  var date = parse(dirtyDate)\n  var seconds = Number(dirtySeconds)\n  date.setSeconds(seconds)\n  return date\n}\n\nmodule.exports = setSeconds\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year setted\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * var result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nfunction setYear (dirtyDate, dirtyYear) {\n  var date = parse(dirtyDate)\n  var year = Number(dirtyYear)\n  date.setFullYear(year)\n  return date\n}\n\nmodule.exports = setYear\n", "var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * var result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfMonth (dirtyDate) {\n  var date = parse(dirtyDate)\n  date.setDate(1)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = startOfMonth\n", "var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the start of today.\n *\n * @description\n * Return the start of today.\n *\n * @returns {Date} the start of today\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfToday()\n * //=> Mon Oct 6 2014 00:00:00\n */\nfunction startOfToday () {\n  return startOfDay(new Date())\n}\n\nmodule.exports = startOfToday\n", "/**\n * @category Day Helpers\n * @summary Return the start of tomorrow.\n *\n * @description\n * Return the start of tomorrow.\n *\n * @returns {Date} the start of tomorrow\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfTomorrow()\n * //=> Tue Oct 7 2014 00:00:00\n */\nfunction startOfTomorrow () {\n  var now = new Date()\n  var year = now.getFullYear()\n  var month = now.getMonth()\n  var day = now.getDate()\n\n  var date = new Date(0)\n  date.setFullYear(year, month, day + 1)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = startOfTomorrow\n", "/**\n * @category Day Helpers\n * @summary Return the start of yesterday.\n *\n * @description\n * Return the start of yesterday.\n *\n * @returns {Date} the start of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfYesterday()\n * //=> Sun Oct 5 2014 00:00:00\n */\nfunction startOfYesterday () {\n  var now = new Date()\n  var year = now.getFullYear()\n  var month = now.getMonth()\n  var day = now.getDate()\n\n  var date = new Date(0)\n  date.setFullYear(year, month, day - 1)\n  date.setHours(0, 0, 0, 0)\n  return date\n}\n\nmodule.exports = startOfYesterday\n", "var addDays = require('../add_days/index.js')\n\n/**\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted\n * @returns {Date} the new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * var result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nfunction subDays (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addDays(dirtyDate, -amount)\n}\n\nmodule.exports = subDays\n", "var addHours = require('../add_hours/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Subtract the specified number of hours from the given date.\n *\n * @description\n * Subtract the specified number of hours from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be subtracted\n * @returns {Date} the new date with the hours subtracted\n *\n * @example\n * // Subtract 2 hours from 11 July 2014 01:00:00:\n * var result = subHours(new Date(2014, 6, 11, 1, 0), 2)\n * //=> Thu Jul 10 2014 23:00:00\n */\nfunction subHours (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addHours(dirtyDate, -amount)\n}\n\nmodule.exports = subHours\n", "var addMilliseconds = require('../add_milliseconds/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted\n * @returns {Date} the new date with the milliseconds subtracted\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * var result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\nfunction subMilliseconds (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addMilliseconds(dirtyDate, -amount)\n}\n\nmodule.exports = subMilliseconds\n", "var addMinutes = require('../add_minutes/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Subtract the specified number of minutes from the given date.\n *\n * @description\n * Subtract the specified number of minutes from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be subtracted\n * @returns {Date} the new date with the mintues subtracted\n *\n * @example\n * // Subtract 30 minutes from 10 July 2014 12:00:00:\n * var result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 11:30:00\n */\nfunction subMinutes (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addMinutes(dirtyDate, -amount)\n}\n\nmodule.exports = subMinutes\n", "var addMonths = require('../add_months/index.js')\n\n/**\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted\n * @returns {Date} the new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * var result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction subMonths (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addMonths(dirtyDate, -amount)\n}\n\nmodule.exports = subMonths\n", "var addQuarters = require('../add_quarters/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Subtract the specified number of year quarters from the given date.\n *\n * @description\n * Subtract the specified number of year quarters from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be subtracted\n * @returns {Date} the new date with the quarters subtracted\n *\n * @example\n * // Subtract 3 quarters from 1 September 2014:\n * var result = subQuarters(new Date(2014, 8, 1), 3)\n * //=> Sun Dec 01 2013 00:00:00\n */\nfunction subQuarters (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addQuarters(dirtyDate, -amount)\n}\n\nmodule.exports = subQuarters\n", "var addSeconds = require('../add_seconds/index.js')\n\n/**\n * @category Second Helpers\n * @summary Subtract the specified number of seconds from the given date.\n *\n * @description\n * Subtract the specified number of seconds from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of seconds to be subtracted\n * @returns {Date} the new date with the seconds subtracted\n *\n * @example\n * // Subtract 30 seconds from 10 July 2014 12:45:00:\n * var result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n * //=> Thu Jul 10 2014 12:44:30\n */\nfunction subSeconds (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addSeconds(dirtyDate, -amount)\n}\n\nmodule.exports = subSeconds\n", "var addWeeks = require('../add_weeks/index.js')\n\n/**\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be subtracted\n * @returns {Date} the new date with the weeks subtracted\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * var result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\nfunction subWeeks (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addWeeks(dirtyDate, -amount)\n}\n\nmodule.exports = subWeeks\n", "var addYears = require('../add_years/index.js')\n\n/**\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be subtracted\n * @returns {Date} the new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * var result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nfunction subYears (dirtyDate, dirtyAmount) {\n  var amount = Number(dirtyAmount)\n  return addYears(dirtyDate, -amount)\n}\n\nmodule.exports = subYears\n", "module.exports = {\n  addDays: require('./add_days/index.js'),\n  addHours: require('./add_hours/index.js'),\n  addISOYears: require('./add_iso_years/index.js'),\n  addMilliseconds: require('./add_milliseconds/index.js'),\n  addMinutes: require('./add_minutes/index.js'),\n  addMonths: require('./add_months/index.js'),\n  addQuarters: require('./add_quarters/index.js'),\n  addSeconds: require('./add_seconds/index.js'),\n  addWeeks: require('./add_weeks/index.js'),\n  addYears: require('./add_years/index.js'),\n  areRangesOverlapping: require('./are_ranges_overlapping/index.js'),\n  closestIndexTo: require('./closest_index_to/index.js'),\n  closestTo: require('./closest_to/index.js'),\n  compareAsc: require('./compare_asc/index.js'),\n  compareDesc: require('./compare_desc/index.js'),\n  differenceInCalendarDays: require('./difference_in_calendar_days/index.js'),\n  differenceInCalendarISOWeeks: require('./difference_in_calendar_iso_weeks/index.js'),\n  differenceInCalendarISOYears: require('./difference_in_calendar_iso_years/index.js'),\n  differenceInCalendarMonths: require('./difference_in_calendar_months/index.js'),\n  differenceInCalendarQuarters: require('./difference_in_calendar_quarters/index.js'),\n  differenceInCalendarWeeks: require('./difference_in_calendar_weeks/index.js'),\n  differenceInCalendarYears: require('./difference_in_calendar_years/index.js'),\n  differenceInDays: require('./difference_in_days/index.js'),\n  differenceInHours: require('./difference_in_hours/index.js'),\n  differenceInISOYears: require('./difference_in_iso_years/index.js'),\n  differenceInMilliseconds: require('./difference_in_milliseconds/index.js'),\n  differenceInMinutes: require('./difference_in_minutes/index.js'),\n  differenceInMonths: require('./difference_in_months/index.js'),\n  differenceInQuarters: require('./difference_in_quarters/index.js'),\n  differenceInSeconds: require('./difference_in_seconds/index.js'),\n  differenceInWeeks: require('./difference_in_weeks/index.js'),\n  differenceInYears: require('./difference_in_years/index.js'),\n  distanceInWords: require('./distance_in_words/index.js'),\n  distanceInWordsStrict: require('./distance_in_words_strict/index.js'),\n  distanceInWordsToNow: require('./distance_in_words_to_now/index.js'),\n  eachDay: require('./each_day/index.js'),\n  endOfDay: require('./end_of_day/index.js'),\n  endOfHour: require('./end_of_hour/index.js'),\n  endOfISOWeek: require('./end_of_iso_week/index.js'),\n  endOfISOYear: require('./end_of_iso_year/index.js'),\n  endOfMinute: require('./end_of_minute/index.js'),\n  endOfMonth: require('./end_of_month/index.js'),\n  endOfQuarter: require('./end_of_quarter/index.js'),\n  endOfSecond: require('./end_of_second/index.js'),\n  endOfToday: require('./end_of_today/index.js'),\n  endOfTomorrow: require('./end_of_tomorrow/index.js'),\n  endOfWeek: require('./end_of_week/index.js'),\n  endOfYear: require('./end_of_year/index.js'),\n  endOfYesterday: require('./end_of_yesterday/index.js'),\n  format: require('./format/index.js'),\n  getDate: require('./get_date/index.js'),\n  getDay: require('./get_day/index.js'),\n  getDayOfYear: require('./get_day_of_year/index.js'),\n  getDaysInMonth: require('./get_days_in_month/index.js'),\n  getDaysInYear: require('./get_days_in_year/index.js'),\n  getHours: require('./get_hours/index.js'),\n  getISODay: require('./get_iso_day/index.js'),\n  getISOWeek: require('./get_iso_week/index.js'),\n  getISOWeeksInYear: require('./get_iso_weeks_in_year/index.js'),\n  getISOYear: require('./get_iso_year/index.js'),\n  getMilliseconds: require('./get_milliseconds/index.js'),\n  getMinutes: require('./get_minutes/index.js'),\n  getMonth: require('./get_month/index.js'),\n  getOverlappingDaysInRanges: require('./get_overlapping_days_in_ranges/index.js'),\n  getQuarter: require('./get_quarter/index.js'),\n  getSeconds: require('./get_seconds/index.js'),\n  getTime: require('./get_time/index.js'),\n  getYear: require('./get_year/index.js'),\n  isAfter: require('./is_after/index.js'),\n  isBefore: require('./is_before/index.js'),\n  isDate: require('./is_date/index.js'),\n  isEqual: require('./is_equal/index.js'),\n  isFirstDayOfMonth: require('./is_first_day_of_month/index.js'),\n  isFriday: require('./is_friday/index.js'),\n  isFuture: require('./is_future/index.js'),\n  isLastDayOfMonth: require('./is_last_day_of_month/index.js'),\n  isLeapYear: require('./is_leap_year/index.js'),\n  isMonday: require('./is_monday/index.js'),\n  isPast: require('./is_past/index.js'),\n  isSameDay: require('./is_same_day/index.js'),\n  isSameHour: require('./is_same_hour/index.js'),\n  isSameISOWeek: require('./is_same_iso_week/index.js'),\n  isSameISOYear: require('./is_same_iso_year/index.js'),\n  isSameMinute: require('./is_same_minute/index.js'),\n  isSameMonth: require('./is_same_month/index.js'),\n  isSameQuarter: require('./is_same_quarter/index.js'),\n  isSameSecond: require('./is_same_second/index.js'),\n  isSameWeek: require('./is_same_week/index.js'),\n  isSameYear: require('./is_same_year/index.js'),\n  isSaturday: require('./is_saturday/index.js'),\n  isSunday: require('./is_sunday/index.js'),\n  isThisHour: require('./is_this_hour/index.js'),\n  isThisISOWeek: require('./is_this_iso_week/index.js'),\n  isThisISOYear: require('./is_this_iso_year/index.js'),\n  isThisMinute: require('./is_this_minute/index.js'),\n  isThisMonth: require('./is_this_month/index.js'),\n  isThisQuarter: require('./is_this_quarter/index.js'),\n  isThisSecond: require('./is_this_second/index.js'),\n  isThisWeek: require('./is_this_week/index.js'),\n  isThisYear: require('./is_this_year/index.js'),\n  isThursday: require('./is_thursday/index.js'),\n  isToday: require('./is_today/index.js'),\n  isTomorrow: require('./is_tomorrow/index.js'),\n  isTuesday: require('./is_tuesday/index.js'),\n  isValid: require('./is_valid/index.js'),\n  isWednesday: require('./is_wednesday/index.js'),\n  isWeekend: require('./is_weekend/index.js'),\n  isWithinRange: require('./is_within_range/index.js'),\n  isYesterday: require('./is_yesterday/index.js'),\n  lastDayOfISOWeek: require('./last_day_of_iso_week/index.js'),\n  lastDayOfISOYear: require('./last_day_of_iso_year/index.js'),\n  lastDayOfMonth: require('./last_day_of_month/index.js'),\n  lastDayOfQuarter: require('./last_day_of_quarter/index.js'),\n  lastDayOfWeek: require('./last_day_of_week/index.js'),\n  lastDayOfYear: require('./last_day_of_year/index.js'),\n  max: require('./max/index.js'),\n  min: require('./min/index.js'),\n  parse: require('./parse/index.js'),\n  setDate: require('./set_date/index.js'),\n  setDay: require('./set_day/index.js'),\n  setDayOfYear: require('./set_day_of_year/index.js'),\n  setHours: require('./set_hours/index.js'),\n  setISODay: require('./set_iso_day/index.js'),\n  setISOWeek: require('./set_iso_week/index.js'),\n  setISOYear: require('./set_iso_year/index.js'),\n  setMilliseconds: require('./set_milliseconds/index.js'),\n  setMinutes: require('./set_minutes/index.js'),\n  setMonth: require('./set_month/index.js'),\n  setQuarter: require('./set_quarter/index.js'),\n  setSeconds: require('./set_seconds/index.js'),\n  setYear: require('./set_year/index.js'),\n  startOfDay: require('./start_of_day/index.js'),\n  startOfHour: require('./start_of_hour/index.js'),\n  startOfISOWeek: require('./start_of_iso_week/index.js'),\n  startOfISOYear: require('./start_of_iso_year/index.js'),\n  startOfMinute: require('./start_of_minute/index.js'),\n  startOfMonth: require('./start_of_month/index.js'),\n  startOfQuarter: require('./start_of_quarter/index.js'),\n  startOfSecond: require('./start_of_second/index.js'),\n  startOfToday: require('./start_of_today/index.js'),\n  startOfTomorrow: require('./start_of_tomorrow/index.js'),\n  startOfWeek: require('./start_of_week/index.js'),\n  startOfYear: require('./start_of_year/index.js'),\n  startOfYesterday: require('./start_of_yesterday/index.js'),\n  subDays: require('./sub_days/index.js'),\n  subHours: require('./sub_hours/index.js'),\n  subISOYears: require('./sub_iso_years/index.js'),\n  subMilliseconds: require('./sub_milliseconds/index.js'),\n  subMinutes: require('./sub_minutes/index.js'),\n  subMonths: require('./sub_months/index.js'),\n  subQuarters: require('./sub_quarters/index.js'),\n  subSeconds: require('./sub_seconds/index.js'),\n  subWeeks: require('./sub_weeks/index.js'),\n  subYears: require('./sub_years/index.js')\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { parse } from 'date-fns';\nimport { ParsableDate } from '../types/dates';\n\nfunction pad(number: number) {\n  if (number < 10) {\n    return '0' + number.toString();\n  }\n  return number;\n}\n\nexport function parseDate(rawDate: ParsableDate): Date {\n  return parse(rawDate);\n}\n\nexport function toShortNotSoISOString(rawDate: ParsableDate): string {\n  const date = parseDate(rawDate);\n  return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\n}\n\nexport function toNotSoISOString(rawDate: ParsableDate): string {\n  const date = parseDate(rawDate);\n  return date.toISOString().replace(/\\..+Z$/, '+0000');\n}\n\nexport function isValidDate(date: Date): boolean {\n  return !isNaN(date.getTime());\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function save(key: string, value?: string, suffix?: string): void {\n  try {\n    const finalKey = suffix ? `${key}.${suffix}` : key;\n    if (value) {\n      window.localStorage.setItem(finalKey, value);\n    } else {\n      window.localStorage.removeItem(finalKey);\n    }\n  } catch (e) {\n    // usually that means the storage is full\n    // just do nothing in this case\n  }\n}\n\nexport function remove(key: string, suffix?: string): void {\n  try {\n    window.localStorage.removeItem(suffix ? `${key}.${suffix}` : key);\n  } catch {\n    // Fail silently\n  }\n}\n\nexport function get(key: string, suffix?: string): string | null {\n  try {\n    return window.localStorage.getItem(suffix ? `${key}.${suffix}` : key);\n  } catch {\n    return null;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { fetchL10nBundle } from '../api/l10n';\nimport { L10nBundle, L10nBundleRequestParams } from '../types/l10n';\nimport { toNotSoISOString } from './dates';\nimport { get as loadFromLocalStorage, save as saveInLocalStorage } from './storage';\n\nexport type Messages = T.Dict<string>;\n\nexport const DEFAULT_LOCALE = 'en';\nexport const DEFAULT_MESSAGES = {\n  // eslint-disable-next-line camelcase\n  default_error_message: 'The request cannot be processed. Try again later.'\n};\n\nlet allMessages: Messages = {};\nlet locale: string | undefined;\n\nexport function translate(...keys: string[]): string {\n  const messageKey = keys.join('.');\n  const l10nMessages = getMessages();\n  if (process.env.NODE_ENV === 'development' && !l10nMessages[messageKey]) {\n    // eslint-disable-next-line no-console\n    console.error(`No message for: ${messageKey}`);\n  }\n  return l10nMessages[messageKey] || messageKey;\n}\n\nexport function translateWithParameters(\n  messageKey: string,\n  ...parameters: Array<string | number>\n): string {\n  const message = getMessages()[messageKey];\n  if (message) {\n    return parameters\n      .map(parameter => String(parameter))\n      .reduce((acc, parameter, index) => acc.replace(`{${index}}`, () => parameter), message);\n  }\n  if (process.env.NODE_ENV === 'development') {\n    // eslint-disable-next-line no-console\n    console.error(`No message for: ${messageKey}`);\n  }\n  return `${messageKey}.${parameters.join('.')}`;\n}\n\nexport function hasMessage(...keys: string[]): boolean {\n  const messageKey = keys.join('.');\n  return getMessages()[messageKey] != null;\n}\n\nexport function getMessages() {\n  if (typeof allMessages === 'undefined') {\n    logWarning('L10n messages are not initialized. Use default messages.');\n    return DEFAULT_MESSAGES;\n  }\n  return allMessages;\n}\n\nexport function resetMessages(newMessages: Messages) {\n  allMessages = newMessages;\n}\n\nexport function getLocalizedMetricName(\n  metric: { key: string; name?: string },\n  short = false\n): string {\n  const bundleKey = `metric.${metric.key}.${short ? 'short_name' : 'name'}`;\n  if (hasMessage(bundleKey)) {\n    return translate(bundleKey);\n  } else if (short) {\n    return getLocalizedMetricName(metric);\n  }\n  return metric.name || metric.key;\n}\n\nexport function getLocalizedCategoryMetricName(metric: { key: string; name?: string }) {\n  const bundleKey = `metric.${metric.key}.extra_short_name`;\n  return hasMessage(bundleKey) ? translate(bundleKey) : getLocalizedMetricName(metric, true);\n}\n\nexport function getLocalizedMetricDomain(domainName: string) {\n  const bundleKey = `metric_domain.${domainName}`;\n  return hasMessage(bundleKey) ? translate(bundleKey) : domainName;\n}\n\nexport function getCurrentLocale() {\n  return locale;\n}\n\nexport function resetCurrentLocale(newLocale: string) {\n  locale = newLocale;\n}\n\nexport function getShortMonthName(index: number) {\n  const months = [\n    'Jan',\n    'Feb',\n    'Mar',\n    'Apr',\n    'May',\n    'Jun',\n    'Jul',\n    'Aug',\n    'Sep',\n    'Oct',\n    'Nov',\n    'Dec'\n  ];\n  return translate(months[index]);\n}\n\nexport function getWeekDayName(index: number) {\n  const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n  return weekdays[index] ? translate(weekdays[index]) : '';\n}\n\nexport function getShortWeekDayName(index: number) {\n  const weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n  return weekdays[index] ? translate(weekdays[index]) : '';\n}\n\nconst L10N_BUNDLE_LS_KEY = 'l10n.bundle';\n\nexport async function loadL10nBundle() {\n  const bundle = await getLatestL10nBundle().catch(() => ({\n    locale: DEFAULT_LOCALE,\n    messages: {}\n  }));\n\n  resetCurrentLocale(bundle.locale);\n  resetMessages(bundle.messages);\n\n  return bundle;\n}\n\nexport async function getLatestL10nBundle() {\n  const browserLocale = getPreferredLanguage();\n  const cachedBundle = loadL10nBundleFromLocalStorage();\n\n  const params: L10nBundleRequestParams = {};\n\n  if (browserLocale) {\n    params.locale = browserLocale;\n\n    if (\n      cachedBundle.locale &&\n      browserLocale.startsWith(cachedBundle.locale) &&\n      cachedBundle.timestamp &&\n      cachedBundle.messages\n    ) {\n      params.ts = cachedBundle.timestamp;\n    }\n  }\n\n  const { effectiveLocale, messages } = await fetchL10nBundle(params).catch(response => {\n    if (response && response.status === 304) {\n      return {\n        effectiveLocale: cachedBundle.locale || browserLocale || DEFAULT_LOCALE,\n        messages: cachedBundle.messages ?? {}\n      };\n    }\n    throw new Error(`Unexpected status code: ${response.status}`);\n  });\n\n  const bundle = {\n    timestamp: toNotSoISOString(new Date()),\n    locale: effectiveLocale,\n    messages\n  };\n\n  saveL10nBundleToLocalStorage(bundle);\n\n  return bundle;\n}\n\nexport function getCurrentL10nBundle() {\n  return loadL10nBundleFromLocalStorage();\n}\n\nfunction getPreferredLanguage() {\n  return window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;\n}\n\nfunction loadL10nBundleFromLocalStorage() {\n  let bundle: L10nBundle;\n\n  try {\n    bundle = JSON.parse(loadFromLocalStorage(L10N_BUNDLE_LS_KEY) ?? '{}');\n  } catch {\n    bundle = {};\n  }\n\n  return bundle;\n}\n\nfunction saveL10nBundleToLocalStorage(bundle: L10nBundle) {\n  saveInLocalStorage(L10N_BUNDLE_LS_KEY, JSON.stringify(bundle));\n}\n\nfunction logWarning(message: string) {\n  if (process.env.NODE_ENV !== 'production') {\n    // eslint-disable-next-line no-console\n    console.warn(message);\n  }\n}\n", "/** @license React v0.19.0\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var f,g,h,k,l;\nif(\"undefined\"===typeof window||\"function\"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,\ny=window.setTimeout,z=window.clearTimeout;if(\"undefined\"!==typeof console){var A=window.cancelAnimationFrame;\"function\"!==typeof window.requestAnimationFrame&&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 A&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\")}if(\"object\"===\ntypeof w&&\"function\"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported\"):F=0<a?Math.floor(1E3/a):5};var H=new MessageChannel,I=H.port2;H.port1.onmessage=\nfunction(){if(null!==D){var a=exports.unstable_now();G=a+F;try{D(!0,a)?I.postMessage(null):(C=!1,D=null)}catch(b){throw I.postMessage(null),b;}}else C=!1};f=function(a){D=a;C||(C=!0,I.postMessage(null))};g=function(a,b){E=y(function(){a(exports.unstable_now())},b)};h=function(){z(E);E=-1}}function J(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<K(e,b))a[d]=b,a[c]=e,c=d;else break a}}function L(a){a=a[0];return void 0===a?null:a}\nfunction M(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;\nfunction V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}\nfunction X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}\nfunction Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};\nexports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if(\"object\"===typeof c&&null!==c){var e=c.delay;e=\"number\"===typeof e&&0<e?d+e:d;c=\"number\"===typeof c.timeout?c.timeout:Y(a)}else c=Y(a),e=d;c=e+c;a={id:P++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};\nexports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<Q.expirationTime||k()};exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n  module.exports = require('./cjs/scheduler.development.js');\n}\n", "/** @license React v16.13.0\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),n=require(\"object-assign\"),r=require(\"scheduler\");function u(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}if(!aa)throw Error(u(227));\nfunction ba(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var da=!1,ea=null,fa=!1,ha=null,ia={onError:function(a){da=!0;ea=a}};function ja(a,b,c,d,e,f,g,h,k){da=!1;ea=null;ba.apply(ia,arguments)}function ka(a,b,c,d,e,f,g,h,k){ja.apply(this,arguments);if(da){if(da){var l=ea;da=!1;ea=null}else throw Error(u(198));fa||(fa=!0,ha=l)}}var la=null,ma=null,na=null;\nfunction oa(a,b,c){var d=a.type||\"unknown-event\";a.currentTarget=na(c);ka(d,b,void 0,a);a.currentTarget=null}var pa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;pa.hasOwnProperty(\"ReactCurrentDispatcher\")||(pa.ReactCurrentDispatcher={current:null});pa.hasOwnProperty(\"ReactCurrentBatchConfig\")||(pa.ReactCurrentBatchConfig={suspense:null});\nvar qa=/^(.*)[\\\\\\/]/,v=\"function\"===typeof Symbol&&Symbol.for,ra=v?Symbol.for(\"react.element\"):60103,sa=v?Symbol.for(\"react.portal\"):60106,ta=v?Symbol.for(\"react.fragment\"):60107,ua=v?Symbol.for(\"react.strict_mode\"):60108,va=v?Symbol.for(\"react.profiler\"):60114,wa=v?Symbol.for(\"react.provider\"):60109,xa=v?Symbol.for(\"react.context\"):60110,ya=v?Symbol.for(\"react.concurrent_mode\"):60111,za=v?Symbol.for(\"react.forward_ref\"):60112,Aa=v?Symbol.for(\"react.suspense\"):60113,Ba=v?Symbol.for(\"react.suspense_list\"):\n60120,Ca=v?Symbol.for(\"react.memo\"):60115,Da=v?Symbol.for(\"react.lazy\"):60116,Ea=v?Symbol.for(\"react.block\"):60121,Fa=\"function\"===typeof Symbol&&Symbol.iterator;function Ga(a){if(null===a||\"object\"!==typeof a)return null;a=Fa&&a[Fa]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function Ha(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}\nfunction Ia(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ta:return\"Fragment\";case sa:return\"Portal\";case va:return\"Profiler\";case ua:return\"StrictMode\";case Aa:return\"Suspense\";case Ba:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case xa:return\"Context.Consumer\";case wa:return\"Context.Provider\";case za:var b=a.render;b=b.displayName||b.name||\"\";return a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\n\"ForwardRef\");case Ca:return Ia(a.type);case Ea:return Ia(a.render);case Da:if(a=1===a._status?a._result:null)return Ia(a)}return null}function Ja(a){var b=\"\";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c=\"\";break a;default:var d=a._debugOwner,e=a._debugSource,f=Ia(a.type);c=null;d&&(c=Ia(d.type));d=f;f=\"\";e?f=\" (at \"+e.fileName.replace(qa,\"\")+\":\"+e.lineNumber+\")\":c&&(f=\" (created by \"+c+\")\");c=\"\\n    in \"+(d||\"Unknown\")+f}b+=c;a=a.return}while(a);return b}var Ka=null,La={};\nfunction Ma(){if(Ka)for(var a in La){var b=La[a],c=Ka.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!Na[c]){if(!b.extractEvents)throw Error(u(97,a));Na[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(Oa.hasOwnProperty(h))throw Error(u(99,h));Oa[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&Pa(k[e],g,h);e=!0}else f.registrationName?(Pa(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}\nfunction Pa(a,b,c){if(Qa[a])throw Error(u(100,a));Qa[a]=b;Ra[a]=b.eventTypes[c].dependencies}var Na=[],Oa={},Qa={},Ra={};function Sa(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!La.hasOwnProperty(c)||La[c]!==d){if(La[c])throw Error(u(102,c));La[c]=d;b=!0}}b&&Ma()}var Ta=!(\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement),Ua=null,Va=null,Wa=null;\nfunction Xa(a){if(a=ma(a)){if(\"function\"!==typeof Ua)throw Error(u(280));var b=a.stateNode;b&&(b=la(b),Ua(a.stateNode,a.type,b))}}function Ya(a){Va?Wa?Wa.push(a):Wa=[a]:Va=a}function Za(){if(Va){var a=Va,b=Wa;Wa=Va=null;Xa(a);if(b)for(a=0;a<b.length;a++)Xa(b[a])}}function $a(a,b){return a(b)}function ab(a,b,c,d,e){return a(b,c,d,e)}function bb(){}var cb=$a,db=!1,eb=!1;function fb(){if(null!==Va||null!==Wa)bb(),Za()}\nfunction gb(a,b,c){if(eb)return a(b,c);eb=!0;try{return cb(a,b,c)}finally{eb=!1,fb()}}var hb=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,ib=Object.prototype.hasOwnProperty,jb={},kb={};\nfunction lb(a){if(ib.call(kb,a))return!0;if(ib.call(jb,a))return!1;if(hb.test(a))return kb[a]=!0;jb[a]=!0;return!1}function mb(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case \"function\":case \"symbol\":return!0;case \"boolean\":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return\"data-\"!==a&&\"aria-\"!==a;default:return!1}}\nfunction nb(a,b,c,d){if(null===b||\"undefined\"===typeof b||mb(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function C(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var E={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){E[a]=new C(a,0,!1,a,null,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];E[b]=new C(b,1,!1,a[1],null,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){E[a]=new C(a,2,!1,a.toLowerCase(),null,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){E[a]=new C(a,2,!1,a,null,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){E[a]=new C(a,3,!1,a.toLowerCase(),null,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){E[a]=new C(a,3,!0,a,null,!1)});[\"capture\",\"download\"].forEach(function(a){E[a]=new C(a,4,!1,a,null,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){E[a]=new C(a,6,!1,a,null,!1)});[\"rowSpan\",\"start\"].forEach(function(a){E[a]=new C(a,5,!1,a.toLowerCase(),null,!1)});var ob=/[\\-:]([a-z])/g;function pb(a){return a[1].toUpperCase()}\n\"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(ob,\npb);E[b]=new C(b,1,!1,a,null,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ob,pb);E[b]=new C(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ob,pb);E[b]=new C(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){E[a]=new C(a,1,!1,a.toLowerCase(),null,!1)});\nE.xlinkHref=new C(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){E[a]=new C(a,1,!1,a.toLowerCase(),null,!0)});\nfunction qb(a,b,c,d){var e=E.hasOwnProperty(b)?E[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||\"o\"!==b[0]&&\"O\"!==b[0]||\"n\"!==b[1]&&\"N\"!==b[1]?!1:!0;f||(nb(b,c,e,d)&&(c=null),d||null===e?lb(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,\"\"+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:\"\":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?\"\":\"\"+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}\nfunction rb(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function sb(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction tb(a){var b=sb(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function xb(a){a._valueTracker||(a._valueTracker=tb(a))}function yb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=sb(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function zb(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}\nfunction Ab(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=rb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function Bb(a,b){b=b.checked;null!=b&&qb(a,\"checked\",b,!1)}\nfunction Cb(a,b){Bb(a,b);var c=rb(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?Db(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&Db(a,b.type,rb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction Eb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction Db(a,b,c){if(\"number\"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function Fb(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Gb(a,b){a=n({children:void 0},b);if(b=Fb(b.children))a.children=b;return a}\nfunction Hb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b[\"$\"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty(\"$\"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=\"\"+rb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}\nfunction Ib(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(u(91));return n({},b,{value:void 0,defaultValue:void 0,children:\"\"+a._wrapperState.initialValue})}function Jb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(u(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:rb(c)}}\nfunction Kb(a,b){var c=rb(b.value),d=rb(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 Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var Mb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction Nb(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 Ob(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?Nb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Pb,Qb=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!==Mb.svg||\"innerHTML\"in a)a.innerHTML=b;else{Pb=Pb||document.createElement(\"div\");Pb.innerHTML=\"<svg>\"+b.valueOf().toString()+\"</svg>\";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;return c}var Tb={animationend:Sb(\"Animation\",\"AnimationEnd\"),animationiteration:Sb(\"Animation\",\"AnimationIteration\"),animationstart:Sb(\"Animation\",\"AnimationStart\"),transitionend:Sb(\"Transition\",\"TransitionEnd\")},Ub={},Vb={};\nTa&&(Vb=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),\"TransitionEvent\"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a}\nvar Xb=Wb(\"animationend\"),Yb=Wb(\"animationiteration\"),Zb=Wb(\"animationstart\"),$b=Wb(\"transitionend\"),ac=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),bc=new (\"function\"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b}\nfunction dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));}\nfunction gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===\nc){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}\nfunction ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var kc=null;\nfunction lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)oa(a,b[d],c[d]);else b&&oa(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function mc(a){null!==a&&(kc=ic(kc,a));a=kc;kc=null;if(a){jc(a,lc);if(kc)throw Error(u(95));if(fa)throw a=ha,fa=!1,ha=null,a;}}\nfunction nc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function oc(a){if(!Ta)return!1;a=\"on\"+a;var b=a in document;b||(b=document.createElement(\"div\"),b.setAttribute(a,\"return;\"),b=\"function\"===typeof b[a]);return b}var pc=[];function qc(a){a.topLevelType=null;a.nativeEvent=null;a.targetInst=null;a.ancestors.length=0;10>pc.length&&pc.push(a)}\nfunction rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}\nfunction sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=nc(a.nativeEvent);d=a.topLevelType;var f=a.nativeEvent,g=a.eventSystemFlags;0===c&&(g|=64);for(var h=null,k=0;k<Na.length;k++){var l=Na[k];l&&(l=l.extractEvents(d,b,f,e,g))&&(h=\nic(h,l))}mc(h)}}function uc(a,b,c){if(!c.has(a)){switch(a){case \"scroll\":vc(b,\"scroll\",!0);break;case \"focus\":case \"blur\":vc(b,\"focus\",!0);vc(b,\"blur\",!0);c.set(\"blur\",null);c.set(\"focus\",null);break;case \"cancel\":case \"close\":oc(a)&&vc(b,a,!0);break;case \"invalid\":case \"submit\":case \"reset\":break;default:-1===ac.indexOf(a)&&F(a,b)}c.set(a,null)}}\nvar wc,xc,yc,zc=!1,Ac=[],Bc=null,Cc=null,Dc=null,Ec=new Map,Fc=new Map,Gc=[],Hc=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit\".split(\" \"),Ic=\"focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture\".split(\" \");\nfunction Jc(a,b){var c=cc(b);Hc.forEach(function(a){uc(a,b,c)});Ic.forEach(function(a){uc(a,b,c)})}function Kc(a,b,c,d,e){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:e,container:d}}\nfunction Lc(a,b){switch(a){case \"focus\":case \"blur\":Bc=null;break;case \"dragenter\":case \"dragleave\":Cc=null;break;case \"mouseover\":case \"mouseout\":Dc=null;break;case \"pointerover\":case \"pointerout\":Ec.delete(b.pointerId);break;case \"gotpointercapture\":case \"lostpointercapture\":Fc.delete(b.pointerId)}}function Mc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=Kc(b,c,d,e,f),null!==b&&(b=Nc(b),null!==b&&xc(b)),a;a.eventSystemFlags|=d;return a}\nfunction Oc(a,b,c,d,e){switch(b){case \"focus\":return Bc=Mc(Bc,a,b,c,d,e),!0;case \"dragenter\":return Cc=Mc(Cc,a,b,c,d,e),!0;case \"mouseover\":return Dc=Mc(Dc,a,b,c,d,e),!0;case \"pointerover\":var f=e.pointerId;Ec.set(f,Mc(Ec.get(f)||null,a,b,c,d,e));return!0;case \"gotpointercapture\":return f=e.pointerId,Fc.set(f,Mc(Fc.get(f)||null,a,b,c,d,e)),!0}return!1}\nfunction Pc(a){var b=tc(a.target);if(null!==b){var c=dc(b);if(null!==c)if(b=c.tag,13===b){if(b=ec(c),null!==b){a.blockedOn=b;r.unstable_runWithPriority(a.priority,function(){yc(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Qc(a){if(null!==a.blockedOn)return!1;var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);if(null!==b){var c=Nc(b);null!==c&&xc(c);a.blockedOn=b;return!1}return!0}\nfunction Sc(a,b,c){Qc(a)&&c.delete(b)}function Tc(){for(zc=!1;0<Ac.length;){var a=Ac[0];if(null!==a.blockedOn){a=Nc(a.blockedOn);null!==a&&wc(a);break}var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);null!==b?a.blockedOn=b:Ac.shift()}null!==Bc&&Qc(Bc)&&(Bc=null);null!==Cc&&Qc(Cc)&&(Cc=null);null!==Dc&&Qc(Dc)&&(Dc=null);Ec.forEach(Sc);Fc.forEach(Sc)}function Uc(a,b){a.blockedOn===b&&(a.blockedOn=null,zc||(zc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Tc)))}\nfunction Vc(a){function b(b){return Uc(b,a)}if(0<Ac.length){Uc(Ac[0],a);for(var c=1;c<Ac.length;c++){var d=Ac[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Bc&&Uc(Bc,a);null!==Cc&&Uc(Cc,a);null!==Dc&&Uc(Dc,a);Ec.forEach(b);Fc.forEach(b);for(c=0;c<Gc.length;c++)d=Gc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Gc.length&&(c=Gc[0],null===c.blockedOn);)Pc(c),null===c.blockedOn&&Gc.shift()}\nvar Wc={},Yc=new Map,Zc=new Map,$c=[\"abort\",\"abort\",Xb,\"animationEnd\",Yb,\"animationIteration\",Zb,\"animationStart\",\"canplay\",\"canPlay\",\"canplaythrough\",\"canPlayThrough\",\"durationchange\",\"durationChange\",\"emptied\",\"emptied\",\"encrypted\",\"encrypted\",\"ended\",\"ended\",\"error\",\"error\",\"gotpointercapture\",\"gotPointerCapture\",\"load\",\"load\",\"loadeddata\",\"loadedData\",\"loadedmetadata\",\"loadedMetadata\",\"loadstart\",\"loadStart\",\"lostpointercapture\",\"lostPointerCapture\",\"playing\",\"playing\",\"progress\",\"progress\",\"seeking\",\n\"seeking\",\"stalled\",\"stalled\",\"suspend\",\"suspend\",\"timeupdate\",\"timeUpdate\",$b,\"transitionEnd\",\"waiting\",\"waiting\"];function ad(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f=\"on\"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+\"Capture\"},dependencies:[d],eventPriority:b};Zc.set(d,b);Yc.set(d,f);Wc[e]=f}}\nad(\"blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange\".split(\" \"),0);\nad(\"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel\".split(\" \"),1);ad($c,2);for(var bd=\"change selectionchange textInput compositionstart compositionend compositionupdate\".split(\" \"),cd=0;cd<bd.length;cd++)Zc.set(bd[cd],0);\nvar dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function F(a,b){vc(b,a,!1)}function vc(a,b,c){var d=Zc.get(b);switch(void 0===d?2:d){case 0:d=gd.bind(null,b,1,a);break;case 1:d=hd.bind(null,b,1,a);break;default:d=id.bind(null,b,1,a)}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1)}function gd(a,b,c,d){db||bb();var e=id,f=db;db=!0;try{ab(e,a,b,c,d)}finally{(db=f)||fb()}}function hd(a,b,c,d){ed(dd,id.bind(null,a,b,c,d))}\nfunction id(a,b,c,d){if(fd)if(0<Ac.length&&-1<Hc.indexOf(a))a=Kc(null,a,b,c,d),Ac.push(a);else{var e=Rc(a,b,c,d);if(null===e)Lc(a,d);else if(-1<Hc.indexOf(a))a=Kc(e,a,b,c,d),Ac.push(a);else if(!Oc(e,a,b,c,d)){Lc(a,d);a=rc(a,d,null,b);try{gb(sc,a)}finally{qc(a)}}}}\nfunction Rc(a,b,c,d){c=nc(d);c=tc(c);if(null!==c){var e=dc(c);if(null===e)c=null;else{var f=e.tag;if(13===f){c=ec(e);if(null!==c)return c;c=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null}else e!==c&&(c=null)}}a=rc(a,d,c,b);try{gb(sc,a)}finally{qc(a)}return null}\nvar jd={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,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kd=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(jd).forEach(function(a){kd.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);jd[b]=jd[a]})});function ld(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||jd.hasOwnProperty(a)&&jd[a]?(\"\"+b).trim():b+\"px\"}\nfunction md(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=ld(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var nd=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});\nfunction od(a,b){if(b){if(nd[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(u(137,a,\"\"));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(u(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(u(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(u(62,\"\"));}}\nfunction pd(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}}var qd=Mb.html;function rd(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=cc(a);b=Ra[b];for(var d=0;d<b.length;d++)uc(b[d],a,c)}function sd(){}\nfunction td(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 ud(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function vd(a,b){var c=ud(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=ud(c)}}\nfunction wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=td(a.document)}return b}\nfunction yd(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 zd=\"$\",Ad=\"/$\",Bd=\"$?\",Cd=\"$!\",Dd=null,Ed=null;function Fd(a,b){switch(a){case \"button\":case \"input\":case \"select\":case \"textarea\":return!!b.autoFocus}return!1}\nfunction Gd(a,b){return\"textarea\"===a||\"option\"===a||\"noscript\"===a||\"string\"===typeof b.children||\"number\"===typeof b.children||\"object\"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd=\"function\"===typeof setTimeout?setTimeout:void 0,Id=\"function\"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}\nfunction Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--}else c===Ad&&b++}a=a.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md=\"__reactInternalInstance$\"+Ld,Nd=\"__reactEventHandlers$\"+Ld,Od=\"__reactContainere$\"+Ld;\nfunction tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a)}return b}a=c;c=a.parentNode}return null}function Nc(a){a=a[Md]||a[Od];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null}\nfunction Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}\nfunction Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==typeof c)throw Error(u(231,\nb,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a)}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0<b--;)Td(c[b],\"captured\",a);for(b=0;b<c.length;b++)Td(c[b],\"bubbled\",a)}}\nfunction Vd(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Sd(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a))}function Wd(a){a&&a.dispatchConfig.registrationName&&Vd(a._targetInst,null,a)}function Xd(a){jc(a,Ud)}var Yd=null,Zd=null,$d=null;\nfunction ae(){if($d)return $d;var a,b=Zd,c=b.length,d,e=\"value\"in Yd?Yd.value:Yd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return $d=e.slice(a,1<d?1-d:void 0)}function be(){return!0}function ce(){return!1}\nfunction G(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):\"target\"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?be:ce;this.isPropagationStopped=ce;return this}\nn(G.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():\"unknown\"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=be)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():\"unknown\"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=be)},persist:function(){this.isPersistent=be},isPersistent:ce,destructor:function(){var a=this.constructor.Interface,\nb;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=ce;this._dispatchInstances=this._dispatchListeners=null}});G.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};\nG.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;de(c);return c};de(G);function ee(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}\nfunction fe(a){if(!(a instanceof this))throw Error(u(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=Ta&&\"CompositionEvent\"in window,ke=null;Ta&&\"documentMode\"in document&&(ke=document.documentMode);\nvar le=Ta&&\"TextEvent\"in window&&!ke,me=Ta&&(!je||ke&&8<ke&&11>=ke),ne=String.fromCharCode(32),oe={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\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},pe=!1;\nfunction qe(a,b){switch(a){case \"keyup\":return-1!==ie.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function re(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var se=!1;function te(a,b){switch(a){case \"compositionend\":return re(b);case \"keypress\":if(32!==b.which)return null;pe=!0;return ne;case \"textInput\":return a=b.data,a===ne&&pe?null:a;default:return null}}\nfunction ue(a,b){if(se)return\"compositionend\"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!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&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case \"compositionend\":return me&&\"ko\"!==b.locale?null:b.data;default:return null}}\nvar ve={eventTypes:oe,extractEvents:function(a,b,c,d){var e;if(je)b:{switch(a){case \"compositionstart\":var f=oe.compositionStart;break b;case \"compositionend\":f=oe.compositionEnd;break b;case \"compositionupdate\":f=oe.compositionUpdate;break b}f=void 0}else se?qe(a,c)&&(f=oe.compositionEnd):\"keydown\"===a&&229===c.keyCode&&(f=oe.compositionStart);f?(me&&\"ko\"!==c.locale&&(se||f!==oe.compositionStart?f===oe.compositionEnd&&se&&(e=ae()):(Yd=d,Zd=\"value\"in Yd?Yd.value:Yd.textContent,se=!0)),f=ge.getPooled(f,\nb,c,d),e?f.data=e:(e=re(c),null!==e&&(f.data=e)),Xd(f),e=f):e=null;(a=le?te(a,c):ue(a,c))?(b=he.getPooled(oe.beforeInput,b,c,d),b.data=a,Xd(b)):b=null;return null===e?b:null===b?e:[e,b]}},we={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return\"input\"===b?!!we[a.type]:\"textarea\"===b?!0:!1}\nvar ye={change:{phasedRegistrationNames:{bubbled:\"onChange\",captured:\"onChangeCapture\"},dependencies:\"blur change click focus input keydown keyup selectionchange\".split(\" \")}};function ze(a,b,c){a=G.getPooled(ye.change,a,b,c);a.type=\"change\";Ya(c);Xd(a);return a}var Ae=null,Be=null;function Ce(a){mc(a)}function De(a){var b=Pd(a);if(yb(b))return a}function Ee(a,b){if(\"change\"===a)return b}var Fe=!1;Ta&&(Fe=oc(\"input\")&&(!document.documentMode||9<document.documentMode));\nfunction Ge(){Ae&&(Ae.detachEvent(\"onpropertychange\",He),Be=Ae=null)}function He(a){if(\"value\"===a.propertyName&&De(Be))if(a=ze(Be,a,nc(a)),db)mc(a);else{db=!0;try{$a(Ce,a)}finally{db=!1,fb()}}}function Ie(a,b,c){\"focus\"===a?(Ge(),Ae=b,Be=c,Ae.attachEvent(\"onpropertychange\",He)):\"blur\"===a&&Ge()}function Je(a){if(\"selectionchange\"===a||\"keyup\"===a||\"keydown\"===a)return De(Be)}function Ke(a,b){if(\"click\"===a)return De(b)}function Le(a,b){if(\"input\"===a||\"change\"===a)return De(b)}\nvar Me={eventTypes:ye,_isInputEventSupported:Fe,extractEvents:function(a,b,c,d){var e=b?Pd(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if(\"select\"===f||\"input\"===f&&\"file\"===e.type)var g=Ee;else if(xe(e))if(Fe)g=Le;else{g=Je;var h=Ie}else(f=e.nodeName)&&\"input\"===f.toLowerCase()&&(\"checkbox\"===e.type||\"radio\"===e.type)&&(g=Ke);if(g&&(g=g(a,b)))return ze(g,c,d);h&&h(a,e,b);\"blur\"===a&&(a=e._wrapperState)&&a.controlled&&\"number\"===e.type&&Db(e,\"number\",e.value)}},Ne=G.extend({view:null,detail:null}),\nOe={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pe(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Oe[a])?!!b[a]:!1}function Qe(){return Pe}\nvar Re=0,Se=0,Te=!1,Ue=!1,Ve=Ne.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Qe,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if(\"movementX\"in a)return a.movementX;var b=Re;Re=a.screenX;return Te?\"mousemove\"===a.type?a.screenX-b:0:(Te=!0,0)},movementY:function(a){if(\"movementY\"in a)return a.movementY;\nvar b=Se;Se=a.screenY;return Ue?\"mousemove\"===a.type?a.screenY-b:0:(Ue=!0,0)}}),We=Ve.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Xe={mouseEnter:{registrationName:\"onMouseEnter\",dependencies:[\"mouseout\",\"mouseover\"]},mouseLeave:{registrationName:\"onMouseLeave\",dependencies:[\"mouseout\",\"mouseover\"]},pointerEnter:{registrationName:\"onPointerEnter\",dependencies:[\"pointerout\",\"pointerover\"]},pointerLeave:{registrationName:\"onPointerLeave\",\ndependencies:[\"pointerout\",\"pointerover\"]}},Ye={eventTypes:Xe,extractEvents:function(a,b,c,d,e){var f=\"mouseover\"===a||\"pointerover\"===a,g=\"mouseout\"===a||\"pointerout\"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?tc(b):null,null!==b){var h=dc(b);if(b!==h||5!==b.tag&&6!==b.tag)b=null}}else g=null;if(g===b)return null;if(\"mouseout\"===a||\"mouseover\"===\na){var k=Ve;var l=Xe.mouseLeave;var m=Xe.mouseEnter;var p=\"mouse\"}else if(\"pointerout\"===a||\"pointerover\"===a)k=We,l=Xe.pointerLeave,m=Xe.pointerEnter,p=\"pointer\";a=null==g?f:Pd(g);f=null==b?f:Pd(b);l=k.getPooled(l,g,c,d);l.type=p+\"leave\";l.target=a;l.relatedTarget=f;c=k.getPooled(m,b,c,d);c.type=p+\"enter\";c.target=f;c.relatedTarget=a;d=g;p=b;if(d&&p)a:{k=d;m=p;g=0;for(a=k;a;a=Rd(a))g++;a=0;for(b=m;b;b=Rd(b))a++;for(;0<g-a;)k=Rd(k),g--;for(;0<a-g;)m=Rd(m),a--;for(;g--;){if(k===m||k===m.alternate)break a;\nk=Rd(k);m=Rd(m)}k=null}else k=null;m=k;for(k=[];d&&d!==m;){g=d.alternate;if(null!==g&&g===m)break;k.push(d);d=Rd(d)}for(d=[];p&&p!==m;){g=p.alternate;if(null!==g&&g===m)break;d.push(p);p=Rd(p)}for(p=0;p<k.length;p++)Vd(k[p],\"bubbled\",l);for(p=d.length;0<p--;)Vd(d[p],\"captured\",c);return 0===(e&64)?[l]:[l,c]}};function Ze(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var $e=\"function\"===typeof Object.is?Object.is:Ze,af=Object.prototype.hasOwnProperty;\nfunction bf(a,b){if($e(a,b))return!0;if(\"object\"!==typeof a||null===a||\"object\"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!af.call(b,c[d])||!$e(a[c[d]],b[c[d]]))return!1;return!0}\nvar cf=Ta&&\"documentMode\"in document&&11>=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},ef=null,ff=null,gf=null,hf=!1;\nfunction jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;\"selectionStart\"in c&&yd(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 gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type=\"select\",a.target=ef,Xd(a),a)}\nvar kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=Ra.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?Pd(b):window;switch(a){case \"focus\":if(xe(e)||\"true\"===e.contentEditable)ef=e,ff=b,gf=null;break;case \"blur\":gf=ff=ef=null;break;case \"mousedown\":hf=!0;break;case \"contextmenu\":case \"mouseup\":case \"dragend\":return hf=!1,jf(c,d);case \"selectionchange\":if(cf)break;\ncase \"keydown\":case \"keyup\":return jf(c,d)}return null}},lf=G.extend({animationName:null,elapsedTime:null,pseudoElement:null}),mf=G.extend({clipboardData:function(a){return\"clipboardData\"in a?a.clipboardData:window.clipboardData}}),nf=Ne.extend({relatedTarget:null});function of(a){var b=a.keyCode;\"charCode\"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}\nvar pf={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},qf={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",\n116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},rf=Ne.extend({key:function(a){if(a.key){var b=pf[a.key]||a.key;if(\"Unidentified\"!==b)return b}return\"keypress\"===a.type?(a=of(a),13===a?\"Enter\":String.fromCharCode(a)):\"keydown\"===a.type||\"keyup\"===a.type?qf[a.keyCode]||\"Unidentified\":\"\"},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Qe,charCode:function(a){return\"keypress\"===\na.type?of(a):0},keyCode:function(a){return\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0},which:function(a){return\"keypress\"===a.type?of(a):\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0}}),sf=Ve.extend({dataTransfer:null}),tf=Ne.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Qe}),uf=G.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),vf=Ve.extend({deltaX:function(a){return\"deltaX\"in a?a.deltaX:\"wheelDeltaX\"in\na?-a.wheelDeltaX:0},deltaY:function(a){return\"deltaY\"in a?a.deltaY:\"wheelDeltaY\"in a?-a.wheelDeltaY:\"wheelDelta\"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),wf={eventTypes:Wc,extractEvents:function(a,b,c,d){var e=Yc.get(a);if(!e)return null;switch(a){case \"keypress\":if(0===of(c))return null;case \"keydown\":case \"keyup\":a=rf;break;case \"blur\":case \"focus\":a=nf;break;case \"click\":if(2===c.button)return null;case \"auxclick\":case \"dblclick\":case \"mousedown\":case \"mousemove\":case \"mouseup\":case \"mouseout\":case \"mouseover\":case \"contextmenu\":a=\nVe;break;case \"drag\":case \"dragend\":case \"dragenter\":case \"dragexit\":case \"dragleave\":case \"dragover\":case \"dragstart\":case \"drop\":a=sf;break;case \"touchcancel\":case \"touchend\":case \"touchmove\":case \"touchstart\":a=tf;break;case Xb:case Yb:case Zb:a=lf;break;case $b:a=uf;break;case \"scroll\":a=Ne;break;case \"wheel\":a=vf;break;case \"copy\":case \"cut\":case \"paste\":a=mf;break;case \"gotpointercapture\":case \"lostpointercapture\":case \"pointercancel\":case \"pointerdown\":case \"pointermove\":case \"pointerout\":case \"pointerover\":case \"pointerup\":a=\nWe;break;default:a=G}b=a.getPooled(e,b,c,d);Xd(b);return b}};if(Ka)throw Error(u(101));Ka=Array.prototype.slice.call(\"ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin\".split(\" \"));Ma();var xf=Nc;la=Qd;ma=xf;na=Pd;Sa({SimpleEventPlugin:wf,EnterLeaveEventPlugin:Ye,ChangeEventPlugin:Me,SelectEventPlugin:kf,BeforeInputEventPlugin:ve});var yf=[],zf=-1;function H(a){0>zf||(a.current=yf[zf],yf[zf]=null,zf--)}\nfunction I(a,b){zf++;yf[zf]=a.current;a.current=b}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;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}\nfunction Df(){H(K);H(J)}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c)}function Ff(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)if(!(e in a))throw Error(u(108,Ia(b)||\"Unknown\",e));return n({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return!0}\nfunction Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}\nvar If=r.unstable_runWithPriority,Jf=r.unstable_scheduleCallback,Kf=r.unstable_cancelCallback,Lf=r.unstable_requestPaint,Mf=r.unstable_now,Nf=r.unstable_getCurrentPriorityLevel,Of=r.unstable_ImmediatePriority,Pf=r.unstable_UserBlockingPriority,Qf=r.unstable_NormalPriority,Rf=r.unstable_LowPriority,Sf=r.unstable_IdlePriority,Tf={},Uf=r.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf};\nfunction ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a)}fg()}\nfunction fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});Wf=null}catch(c){throw null!==Wf&&(Wf=Wf.slice(a+1)),Jf(Of,gg),c;}finally{Yf=!1}}}function hg(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function ig(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}var jg={current:null},kg=null,lg=null,mg=null;function ng(){mg=lg=kg=null}\nfunction og(a){var b=jg.current;H(jg);a.type._context._currentValue=b}function pg(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function qg(a,b){kg=a;mg=lg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(rg=!0),a.firstContext=null)}\nfunction sg(a,b){if(mg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null}}else lg=lg.next=b}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}\nfunction vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}\nfunction yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}\nfunction zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(g<d){var ca={expirationTime:z.expirationTime,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null};null===x?(p=x=\nca,m=k):x=x.next=ca;g>l&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if(\"function\"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g=\"function\"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:tg=!0}}null!==z.callback&&\n(a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z))}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k}}\nfunction Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=e;e=c;if(\"function\"!==typeof d)throw Error(u(191,d));d.call(e)}}}var Dg=pa.ReactCurrentBatchConfig,Eg=(new aa.Component).refs;function Fg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;0===a.expirationTime&&(a.updateQueue.baseState=c)}\nvar Jg={isMounted:function(a){return(a=a._reactInternalFiber)?dc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=Gg(),d=Dg.suspense;\nc=Hg(c,a,d);d=wg(c,d);d.tag=2;void 0!==b&&null!==b&&(d.callback=b);xg(a,d);Ig(a,c)}};function Kg(a,b,c,d,e,f,g){a=a.stateNode;return\"function\"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!bf(c,d)||!bf(e,f):!0}\nfunction Lg(a,b,c){var d=!1,e=Af;var f=b.contextType;\"object\"===typeof f&&null!==f?f=sg(f):(e=L(b)?Bf:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Cf(a,e):Af);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Jg;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}\nfunction Mg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Jg.enqueueReplaceState(b,b.state,null)}\nfunction Ng(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Eg;ug(a);var f=b.contextType;\"object\"===typeof f&&null!==f?e.context=sg(f):(f=L(b)?Bf:J.current,e.context=Cf(a,f));zg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;\"function\"===typeof f&&(Fg(a,b,f,c),e.state=a.memoizedState);\"function\"===typeof b.getDerivedStateFromProps||\"function\"===typeof e.getSnapshotBeforeUpdate||\"function\"!==typeof e.UNSAFE_componentWillMount&&\"function\"!==typeof e.componentWillMount||\n(b=e.state,\"function\"===typeof e.componentWillMount&&e.componentWillMount(),\"function\"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Jg.enqueueReplaceState(e,e.state,null),zg(a,c,e,d),e.state=a.memoizedState);\"function\"===typeof e.componentDidMount&&(a.effectTag|=4)}var Og=Array.isArray;\nfunction Pg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(u(309));var d=c.stateNode}if(!d)throw Error(u(147,a));var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Eg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if(\"string\"!==typeof a)throw Error(u(284));if(!c._owner)throw Error(u(290,a));}return a}\nfunction Qg(a,b){if(\"textarea\"!==a.type)throw Error(u(31,\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\"));}\nfunction Rg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Sg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=\n2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Tg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Pg(a,b,c),d.return=a,d;d=Ug(c.type,c.key,c.props,null,a.mode,d);d.ref=Pg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==\nc.implementation)return b=Vg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Wg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function p(a,b,c){if(\"string\"===typeof b||\"number\"===typeof b)return b=Tg(\"\"+b,a.mode,c),b.return=a,b;if(\"object\"===typeof b&&null!==b){switch(b.$$typeof){case ra:return c=Ug(b.type,b.key,b.props,null,a.mode,c),c.ref=Pg(a,null,b),c.return=a,c;case sa:return b=Vg(b,a.mode,c),b.return=a,b}if(Og(b)||\nGa(b))return b=Wg(b,a.mode,c,null),b.return=a,b;Qg(a,b)}return null}function x(a,b,c,d){var e=null!==b?b.key:null;if(\"string\"===typeof c||\"number\"===typeof c)return null!==e?null:h(a,b,\"\"+c,d);if(\"object\"===typeof c&&null!==c){switch(c.$$typeof){case ra:return c.key===e?c.type===ta?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case sa:return c.key===e?l(a,b,c,d):null}if(Og(c)||Ga(c))return null!==e?null:m(a,b,c,d,null);Qg(a,c)}return null}function z(a,b,c,d,e){if(\"string\"===typeof d||\"number\"===typeof d)return a=\na.get(c)||null,h(b,a,\"\"+d,e);if(\"object\"===typeof d&&null!==d){switch(d.$$typeof){case ra:return a=a.get(null===d.key?c:d.key)||null,d.type===ta?m(b,a,d.props.children,e,d.key):k(b,a,d,e);case sa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Og(d)||Ga(d))return a=a.get(c)||null,m(b,a,d,e,null);Qg(b,d)}return null}function ca(e,g,h,k){for(var l=null,t=null,m=g,y=g=0,A=null;null!==m&&y<h.length;y++){m.index>y?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&&\nm&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A}if(y===h.length)return c(e,m),l;if(null===m){for(;y<h.length;y++)m=p(e,h[y],k),null!==m&&(g=f(m,g,y),null===t?l=m:t.sibling=m,t=m);return l}for(m=d(e,m);y<h.length;y++)A=z(m,e,y,h[y],k),null!==A&&(a&&null!==A.alternate&&m.delete(null===A.key?y:A.key),g=f(A,g,y),null===t?l=A:t.sibling=A,t=A);a&&m.forEach(function(a){return b(e,a)});return l}function D(e,g,h,l){var k=Ga(h);if(\"function\"!==typeof k)throw Error(u(150));h=k.call(h);\nif(null==h)throw Error(u(151));for(var m=k=null,t=g,y=g=0,A=null,q=h.next();null!==t&&!q.done;y++,q=h.next()){t.index>y?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!==\nq.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ta&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case ra:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ta){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,\nk.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ta?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h)}return g(a);case sa: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||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=\nd.sibling}d=Vg(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),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(Ga(f))return D(a,d,f,h);l&&Qg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||\"Component\"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};\nfunction ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a)}H($g);I($g,b)}function eh(){H($g);H(ah);H(bh)}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c))}function gh(a){ah.current===a&&(H($g),H(ah))}var M={current:0};\nfunction hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ih(a,b){return{responder:a,props:b}}\nvar jh=pa.ReactCurrentDispatcher,kh=pa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!$e(a[c],b[c]))return!1;return!0}\nfunction oh(a,b,c,d,e,f){lh=f;N=b;b.memoizedState=null;b.updateQueue=null;b.expirationTime=0;jh.current=null===a||null===a.memoizedState?ph:qh;a=c(d,e);if(b.expirationTime===lh){f=0;do{b.expirationTime=0;if(!(25>f))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e)}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a}\nfunction th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}\nfunction vh(a,b){return\"function\"===typeof b?b(a):b}\nfunction wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(l<lh){var m={expirationTime:k.expirationTime,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=m,f=d):h=h.next=m;l>N.expirationTime&&\n(N.expirationTime=l,Bg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction yh(a){var b=th();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return[b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}\nfunction Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d)}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)}\nfunction Hh(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}\nfunction Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0)});cg(97<d?97:d,function(){var d=kh.suspense;kh.suspense=void 0===b?null:b;try{a(!1),c()}finally{kh.suspense=d}})}\nfunction zh(a,b,c){var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e={expirationTime:d,suspenseConfig:e,action:c,eagerReducer:null,eagerState:null,next:null};var f=b.pending;null===f?e.next=e:(e.next=f.next,f.next=e);b.pending=e;f=a.alternate;if(a===N||null!==f&&f===N)mh=!0,e.expirationTime=lh,N.expirationTime=lh;else{if(0===a.expirationTime&&(null===f||0===f.expirationTime)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.eagerReducer=f;e.eagerState=h;if($e(h,g))return}catch(k){}finally{}Ig(a,\nd)}}\nvar sh={readContext:sg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useResponder:Q,useDeferredValue:Q,useTransition:Q},ph={readContext:sg,useCallback:Kh,useContext:sg,useEffect:Eh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ch(4,2,Hh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Ch(4,2,a,b)},useMemo:function(a,b){var c=th();b=void 0===b?null:b;a=a();c.memoizedState=[a,\nb];return a},useReducer:function(a,b,c){var d=th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=zh.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=th();a={current:a};return b.memoizedState=a},useState:yh,useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=yh(a),d=c[0],e=c[1];Eh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=\nc}},[a,b]);return d},useTransition:function(a){var b=yh(!1),c=b[0];b=b[1];return[Kh(Nh.bind(null,b,a),[b,a]),c]}},qh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:wh,useRef:Bh,useState:function(){return wh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=wh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=\nwh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,b,a),[b,a]),c]}},rh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:xh,useRef:Bh,useState:function(){return xh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=xh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=xh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,\nb,a),[b,a]),c]}},Oh=null,Ph=null,Qh=!1;function Rh(a,b){var c=Sh(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}\nfunction Th(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;case 13:return!1;default:return!1}}\nfunction Uh(a){if(Qh){var b=Ph;if(b){var c=b;if(!Th(a,b)){b=Jd(c.nextSibling);if(!b||!Th(a,b)){a.effectTag=a.effectTag&-1025|2;Qh=!1;Oh=a;return}Rh(Oh,c)}Oh=a;Ph=Jd(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,Qh=!1,Oh=a}}function Vh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;Oh=a}\nfunction Wh(a){if(a!==Oh)return!1;if(!Qh)return Vh(a),Qh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!Gd(b,a.memoizedProps))for(b=Ph;b;)Rh(a,b),b=Jd(b.nextSibling);Vh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(u(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===Ad){if(0===b){Ph=Jd(a.nextSibling);break a}b--}else c!==zd&&c!==Cd&&c!==Bd||b++}a=a.nextSibling}Ph=null}}else Ph=Oh?Jd(a.stateNode.nextSibling):null;return!0}\nfunction Xh(){Ph=Oh=null;Qh=!1}var Yh=pa.ReactCurrentOwner,rg=!1;function R(a,b,c,d){b.child=null===a?Yg(b,null,c,d):Xg(b,a.child,c,d)}function Zh(a,b,c,d,e){c=c.render;var f=b.ref;qg(b,e);d=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,d,e);return b.child}\nfunction ai(a,b,c,d,e,f){if(null===a){var g=c.type;if(\"function\"===typeof g&&!bi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ci(a,b,g,d,e,f);a=Ug(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:bf,c(e,d)&&a.ref===b.ref))return $h(a,b,f);b.effectTag|=1;a=Sg(g,d);a.ref=b.ref;a.return=b;return b.child=a}\nfunction ci(a,b,c,d,e,f){return null!==a&&bf(a.memoizedProps,d)&&a.ref===b.ref&&(rg=!1,e<f)?(b.expirationTime=a.expirationTime,$h(a,b,f)):di(a,b,c,d,f)}function ei(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function di(a,b,c,d,e){var f=L(c)?Bf:J.current;f=Cf(b,f);qg(b,e);c=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,c,e);return b.child}\nfunction fi(a,b,c,d,e){if(L(c)){var f=!0;Gf(b)}else f=!1;qg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Lg(b,c,d),Ng(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;\"object\"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l));var m=c.getDerivedStateFromProps,p=\"function\"===typeof m||\"function\"===typeof g.getSnapshotBeforeUpdate;p||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\n\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l);tg=!1;var x=b.memoizedState;g.state=x;zg(b,d,g,e);k=b.memoizedState;h!==d||x!==k||K.current||tg?(\"function\"===typeof m&&(Fg(b,c,m,d),k=b.memoizedState),(h=tg||Kg(b,c,h,d,x,k,l))?(p||\"function\"!==typeof g.UNSAFE_componentWillMount&&\"function\"!==typeof g.componentWillMount||(\"function\"===typeof g.componentWillMount&&g.componentWillMount(),\"function\"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),\"function\"===\ntypeof g.componentDidMount&&(b.effectTag|=4)):(\"function\"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):(\"function\"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,vg(a,b),h=b.memoizedProps,g.props=b.type===b.elementType?h:ig(b.type,h),k=g.context,l=c.contextType,\"object\"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l)),m=c.getDerivedStateFromProps,(p=\"function\"===typeof m||\"function\"===\ntypeof g.getSnapshotBeforeUpdate)||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l),tg=!1,k=b.memoizedState,g.state=k,zg(b,d,g,e),x=b.memoizedState,h!==d||k!==x||K.current||tg?(\"function\"===typeof m&&(Fg(b,c,m,d),x=b.memoizedState),(m=tg||Kg(b,c,h,d,k,x,l))?(p||\"function\"!==typeof g.UNSAFE_componentWillUpdate&&\"function\"!==typeof g.componentWillUpdate||(\"function\"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,\nx,l),\"function\"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,l)),\"function\"===typeof g.componentDidUpdate&&(b.effectTag|=4),\"function\"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=l,d=m):\n(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return gi(a,b,c,d,f,e)}\nfunction gi(a,b,c,d,e,f){ei(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Hf(b,c,!1),$h(a,b,f);d=b.stateNode;Yh.current=b;var h=g&&\"function\"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=Xg(b,a.child,null,f),b.child=Xg(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&Hf(b,c,!0);return b.child}function hi(a){var b=a.stateNode;b.pendingContext?Ef(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Ef(a,b.context,!1);dh(a,b.containerInfo)}\nvar ii={dehydrated:null,retryTime:0};\nfunction ji(a,b,c){var d=b.mode,e=b.pendingProps,f=M.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);I(M,f&1);if(null===a){void 0!==e.fallback&&Uh(b);if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=\nb;e.sibling=c;b.memoizedState=ii;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Yg(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=Sg(a,a.pendingProps);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;d=Sg(d,e);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=ii;b.child=c;return d}c=Xg(b,a.child,e.children,c);b.memoizedState=null;return b.child=\nc}a=a.child;if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=ii;b.child=e;return c}b.memoizedState=null;return b.child=Xg(b,a,e.children,c)}\nfunction ki(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);pg(a.return,b)}function li(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailExpiration:0,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}\nfunction mi(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=M.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&ki(a,c);else if(19===a.tag)ki(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(M,d);if(0===(b.mode&2))b.memoizedState=\nnull;else switch(e){case \"forwards\":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===hh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);li(b,!1,e,c,f,b.lastEffect);break;case \"backwards\":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===hh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}li(b,!0,c,null,f,b.lastEffect);break;case \"together\":li(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}\nfunction $h(a,b,c){null!==a&&(b.dependencies=a.dependencies);var d=b.expirationTime;0!==d&&Bg(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(u(153));if(null!==b.child){a=b.child;c=Sg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Sg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}var ni,oi,pi,qi;\nni=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};oi=function(){};\npi=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;ch($g.current);a=null;switch(c){case \"input\":f=zb(g,f);d=zb(g,d);a=[];break;case \"option\":f=Gb(g,f);d=Gb(g,d);a=[];break;case \"select\":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case \"textarea\":f=Ib(g,f);d=Ib(g,d);a=[];break;default:\"function\"!==typeof f.onClick&&\"function\"===typeof d.onClick&&(g.onclick=sd)}od(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if(\"style\"===\nh)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]=\"\");else\"dangerouslySetInnerHTML\"!==h&&\"children\"!==h&&\"suppressContentEditableWarning\"!==h&&\"suppressHydrationWarning\"!==h&&\"autoFocus\"!==h&&(Qa.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if(\"style\"===h)if(g){for(k in g)!g.hasOwnProperty(k)||l&&l.hasOwnProperty(k)||(c||(c={}),c[k]=\"\");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),\nc[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else\"dangerouslySetInnerHTML\"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,l)):\"children\"===h?g===l||\"string\"!==typeof l&&\"number\"!==typeof l||(a=a||[]).push(h,\"\"+l):\"suppressContentEditableWarning\"!==h&&\"suppressHydrationWarning\"!==h&&(Qa.hasOwnProperty(h)?(null!=l&&rd(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=a||[]).push(\"style\",c);e=a;if(b.updateQueue=e)b.effectTag|=4}};\nqi=function(a,b,c,d){c!==d&&(b.effectTag|=4)};function ri(a,b){switch(a.tailMode){case \"hidden\":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case \"collapsed\":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}\nfunction si(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return L(b.type)&&Df(),null;case 3:return eh(),H(K),H(J),c=b.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==a&&null!==a.child||!Wh(b)||(b.effectTag|=4),oi(b),null;case 5:gh(b);c=ch(bh.current);var e=b.type;if(null!==a&&null!=b.stateNode)pi(a,b,e,d,c),a.ref!==b.ref&&(b.effectTag|=128);else{if(!d){if(null===b.stateNode)throw Error(u(166));\nreturn null}a=ch($g.current);if(Wh(b)){d=b.stateNode;e=b.type;var f=b.memoizedProps;d[Md]=b;d[Nd]=f;switch(e){case \"iframe\":case \"object\":case \"embed\":F(\"load\",d);break;case \"video\":case \"audio\":for(a=0;a<ac.length;a++)F(ac[a],d);break;case \"source\":F(\"error\",d);break;case \"img\":case \"image\":case \"link\":F(\"error\",d);F(\"load\",d);break;case \"form\":F(\"reset\",d);F(\"submit\",d);break;case \"details\":F(\"toggle\",d);break;case \"input\":Ab(d,f);F(\"invalid\",d);rd(c,\"onChange\");break;case \"select\":d._wrapperState=\n{wasMultiple:!!f.multiple};F(\"invalid\",d);rd(c,\"onChange\");break;case \"textarea\":Jb(d,f),F(\"invalid\",d),rd(c,\"onChange\")}od(e,f);a=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];\"children\"===g?\"string\"===typeof h?d.textContent!==h&&(a=[\"children\",h]):\"number\"===typeof h&&d.textContent!==\"\"+h&&(a=[\"children\",\"\"+h]):Qa.hasOwnProperty(g)&&null!=h&&rd(c,g)}switch(e){case \"input\":xb(d);Eb(d,f,!0);break;case \"textarea\":xb(d);Lb(d);break;case \"select\":case \"option\":break;default:\"function\"===typeof f.onClick&&\n(d.onclick=sd)}c=a;b.updateQueue=c;null!==c&&(b.effectTag|=4)}else{g=9===c.nodeType?c:c.ownerDocument;a===qd&&(a=Nb(e));a===qd?\"script\"===e?(a=g.createElement(\"div\"),a.innerHTML=\"<script>\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),\"select\"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case \"iframe\":case \"object\":case \"embed\":F(\"load\",\na);h=d;break;case \"video\":case \"audio\":for(h=0;h<ac.length;h++)F(ac[h],a);h=d;break;case \"source\":F(\"error\",a);h=d;break;case \"img\":case \"image\":case \"link\":F(\"error\",a);F(\"load\",a);h=d;break;case \"form\":F(\"reset\",a);F(\"submit\",a);h=d;break;case \"details\":F(\"toggle\",a);h=d;break;case \"input\":Ab(a,d);h=zb(a,d);F(\"invalid\",a);rd(c,\"onChange\");break;case \"option\":h=Gb(a,d);break;case \"select\":a._wrapperState={wasMultiple:!!d.multiple};h=n({},d,{value:void 0});F(\"invalid\",a);rd(c,\"onChange\");break;case \"textarea\":Jb(a,\nd);h=Ib(a,d);F(\"invalid\",a);rd(c,\"onChange\");break;default:h=d}od(e,h);var k=h;for(f in k)if(k.hasOwnProperty(f)){var l=k[f];\"style\"===f?md(a,l):\"dangerouslySetInnerHTML\"===f?(l=l?l.__html:void 0,null!=l&&Qb(a,l)):\"children\"===f?\"string\"===typeof l?(\"textarea\"!==e||\"\"!==l)&&Rb(a,l):\"number\"===typeof l&&Rb(a,\"\"+l):\"suppressContentEditableWarning\"!==f&&\"suppressHydrationWarning\"!==f&&\"autoFocus\"!==f&&(Qa.hasOwnProperty(f)?null!=l&&rd(c,f):null!=l&&qb(a,f,l,g))}switch(e){case \"input\":xb(a);Eb(a,d,!1);\nbreak;case \"textarea\":xb(a);Lb(a);break;case \"option\":null!=d.value&&a.setAttribute(\"value\",\"\"+rb(d.value));break;case \"select\":a.multiple=!!d.multiple;c=d.value;null!=c?Hb(a,!!d.multiple,c,!1):null!=d.defaultValue&&Hb(a,!!d.multiple,d.defaultValue,!0);break;default:\"function\"===typeof h.onClick&&(a.onclick=sd)}Fd(e,d)&&(b.effectTag|=4)}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)qi(a,b,a.memoizedProps,d);else{if(\"string\"!==typeof d&&null===b.stateNode)throw Error(u(166));\nc=ch(bh.current);ch($g.current);Wh(b)?(c=b.stateNode,d=b.memoizedProps,c[Md]=b,c.nodeValue!==d&&(b.effectTag|=4)):(c=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),c[Md]=b,b.stateNode=c)}return null;case 13:H(M);d=b.memoizedState;if(0!==(b.effectTag&64))return b.expirationTime=c,b;c=null!==d;d=!1;null===a?void 0!==b.memoizedProps.fallback&&Wh(b):(e=a.memoizedState,d=null!==e,c||null===e||(e=a.child.sibling,null!==e&&(f=b.firstEffect,null!==f?(b.firstEffect=e,e.nextEffect=f):(b.firstEffect=b.lastEffect=\ne,e.nextEffect=null),e.effectTag=8)));if(c&&!d&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(M.current&1))S===ti&&(S=ui);else{if(S===ti||S===ui)S=vi;0!==wi&&null!==T&&(xi(T,U),yi(T,wi))}if(c||d)b.effectTag|=4;return null;case 4:return eh(),oi(b),null;case 10:return og(b),null;case 17:return L(b.type)&&Df(),null;case 19:H(M);d=b.memoizedState;if(null===d)return null;e=0!==(b.effectTag&64);f=d.rendering;if(null===f)if(e)ri(d,!1);else{if(S!==ti||null!==a&&0!==(a.effectTag&\n64))for(f=b.child;null!==f;){a=hh(f);if(null!==a){b.effectTag|=64;ri(d,!1);e=a.updateQueue;null!==e&&(b.updateQueue=e,b.effectTag|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;for(d=b.child;null!==d;)e=d,f=c,e.effectTag&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null,a=e.alternate,null===a?(e.childExpirationTime=0,e.expirationTime=f,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null):(e.childExpirationTime=a.childExpirationTime,\ne.expirationTime=a.expirationTime,e.child=a.child,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,f=a.dependencies,e.dependencies=null===f?null:{expirationTime:f.expirationTime,firstContext:f.firstContext,responders:f.responders}),d=d.sibling;I(M,M.current&1|2);return b.child}f=f.sibling}}else{if(!e)if(a=hh(f),null!==a){if(b.effectTag|=64,e=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),ri(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!f.alternate)return b=\nb.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*$f()-d.renderingStartTime>d.tailExpiration&&1<c&&(b.effectTag|=64,e=!0,ri(d,!1),b.expirationTime=b.childExpirationTime=c-1);d.isBackwards?(f.sibling=b.child,b.child=f):(c=d.last,null!==c?c.sibling=f:b.child=f,d.last=f)}return null!==d.tail?(0===d.tailExpiration&&(d.tailExpiration=$f()+500),c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=$f(),c.sibling=null,b=M.current,I(M,e?b&1|2:b&1),c):null}throw Error(u(156,\nb.tag));}function zi(a){switch(a.tag){case 1:L(a.type)&&Df();var b=a.effectTag;return b&4096?(a.effectTag=b&-4097|64,a):null;case 3:eh();H(K);H(J);b=a.effectTag;if(0!==(b&64))throw Error(u(285));a.effectTag=b&-4097|64;return a;case 5:return gh(a),null;case 13:return H(M),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return H(M),null;case 4:return eh(),null;case 10:return og(a),null;default:return null}}function Ai(a,b){return{value:a,source:b,stack:Ja(b)}}\nvar Bi=\"function\"===typeof WeakSet?WeakSet:Set;function Ci(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=Ja(c));null!==c&&Ia(c.type);b=b.value;null!==a&&1===a.tag&&Ia(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Di(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Ei(a,c)}}function Fi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Ei(a,c)}else b.current=null}\nfunction Gi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ig(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(u(163));}\nfunction Hi(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.destroy;c.destroy=void 0;void 0!==d&&d()}c=c.next}while(c!==b)}}function Ii(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}\nfunction Ji(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:Ii(3,c);return;case 1:a=c.stateNode;if(c.effectTag&4)if(null===b)a.componentDidMount();else{var d=c.elementType===c.type?b.memoizedProps:ig(c.type,b.memoizedProps);a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}b=c.updateQueue;null!==b&&Cg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Cg(c,b,a)}return;\ncase 5:a=c.stateNode;null===b&&c.effectTag&4&&Fd(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Vc(c))));return;case 19:case 17:case 20:case 21:return}throw Error(u(163));}\nfunction Ki(a,b,c){\"function\"===typeof Li&&Li(b);switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;cg(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){Ei(g,h)}}a=a.next}while(a!==d)})}break;case 1:Fi(b);c=b.stateNode;\"function\"===typeof c.componentWillUnmount&&Di(b,c);break;case 5:Fi(b);break;case 4:Mi(a,b,c)}}\nfunction Ni(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;a.stateNode=null;null!==b&&Ni(b)}function Oi(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Pi(a){a:{for(var b=a.return;null!==b;){if(Oi(b)){var c=b;break a}b=b.return}throw Error(u(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(u(161));}c.effectTag&16&&(Rb(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Oi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}d?Qi(a,c,b):Ri(a,c,b)}\nfunction Qi(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=sd));else if(4!==d&&(a=a.child,null!==a))for(Qi(a,b,c),a=a.sibling;null!==a;)Qi(a,b,c),a=a.sibling}\nfunction Ri(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Ri(a,b,c),a=a.sibling;null!==a;)Ri(a,b,c),a=a.sibling}\nfunction Mi(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(u(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,l=c,m=k;;)if(Ki(h,m,l),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break a;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=m.return;m=m.sibling}g?(h=\nf,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Ki(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}\nfunction Si(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:Hi(3,b);return;case 1:return;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Nd]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&Bb(c,d);pd(a,e);b=pd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];\"style\"===g?md(c,h):\"dangerouslySetInnerHTML\"===g?Qb(c,h):\"children\"===g?Rb(c,h):qb(c,g,h,b)}switch(a){case \"input\":Cb(c,d);break;\ncase \"textarea\":Kb(c,d);break;case \"select\":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?Hb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?Hb(c,!!d.multiple,d.defaultValue,!0):Hb(c,!!d.multiple,d.multiple?[]:\"\",!1))}}}return;case 6:if(null===b.stateNode)throw Error(u(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,Vc(b.containerInfo));return;case 12:return;case 13:c=b;null===b.memoizedState?\nd=!1:(d=!0,c=b.child,Ti=$f());if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,\"function\"===typeof f.setProperty?f.setProperty(\"display\",\"none\",\"important\"):f.display=\"none\"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null,f.style.display=ld(\"display\",e));else if(6===a.tag)a.stateNode.nodeValue=d?\"\":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=\nf;continue}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===c)break;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}Ui(b);return;case 19:Ui(b);return;case 17:return}throw Error(u(163));}function Ui(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Bi);b.forEach(function(b){var d=Vi.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nvar Wi=\"function\"===typeof WeakMap?WeakMap:Map;function Xi(a,b,c){c=wg(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Yi||(Yi=!0,Zi=d);Ci(a,b)};return c}\nfunction $i(a,b,c){c=wg(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ci(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===aj?aj=new Set([this]):aj.add(this),Ci(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}\nvar bj=Math.ceil,cj=pa.ReactCurrentDispatcher,dj=pa.ReactCurrentOwner,V=0,ej=8,fj=16,gj=32,ti=0,hj=1,ij=2,ui=3,vi=4,jj=5,W=V,T=null,X=null,U=0,S=ti,kj=null,lj=1073741823,mj=1073741823,nj=null,wi=0,oj=!1,Ti=0,pj=500,Y=null,Yi=!1,Zi=null,aj=null,qj=!1,rj=null,sj=90,tj=null,uj=0,vj=null,wj=0;function Gg(){return(W&(fj|gj))!==V?1073741821-($f()/10|0):0!==wj?wj:wj=1073741821-($f()/10|0)}\nfunction Hg(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=ag();if(0===(b&4))return 99===d?1073741823:1073741822;if((W&fj)!==V)return U;if(null!==c)a=hg(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=hg(a,150,100);break;case 97:case 96:a=hg(a,5E3,250);break;case 95:a=2;break;default:throw Error(u(326));}null!==T&&a===U&&--a;return a}\nfunction Ig(a,b){if(50<uj)throw uj=0,vj=null,Error(u(185));a=xj(a,b);if(null!==a){var c=ag();1073741823===b?(W&ej)!==V&&(W&(fj|gj))===V?yj(a):(Z(a),W===V&&gg()):Z(a);(W&4)===V||98!==c&&99!==c||(null===tj?tj=new Map([[a,b]]):(c=tj.get(a),(void 0===c||c>b)&&tj.set(a,b)))}}\nfunction xj(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(T===e&&(Bg(b),S===vi&&xi(e,U)),yi(e,b));return e}\nfunction zj(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Aj(a,b))return b;var c=a.lastPingedTime;a=a.nextKnownPendingLevel;a=c>a?c:a;return 2>=a&&b!==a?0:a}\nfunction Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else{var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c)}a.callbackExpirationTime=\nb;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b}}}\nfunction Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h)}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2<c?2:c);break;case ui:xi(a,c);d=a.lastSuspendedTime;\nc===d&&(a.nextKnownPendingLevel=Ij(e));if(1073741823===lj&&(e=Ti+pj-$f(),10<e)){if(oj){var f=a.lastPingedTime;if(0===f||f>=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=\nd;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=Hd(Jj.bind(null,a),d);break}Jj(a);break;case jj:if(1073741823!==lj&&null!==nj){f=lj;var g=nj;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10<d){xi(a,c);a.timeoutHandle=\nHd(Jj.bind(null,a),d);break}}Jj(a);break;default:throw Error(u(329));}Z(a);if(a.callbackNode===b)return Bj.bind(null,a)}}return null}\nfunction yj(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&b===U||Ej(a,b);if(null!==X){var c=W;W|=fj;var d=Fj();do try{Kj();break}catch(e){Hj(a,e)}while(1);ng();W=c;cj.current=d;if(S===hj)throw c=kj,Ej(a,b),xi(a,b),Z(a),c;if(null!==X)throw Error(u(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;T=null;Jj(a);Z(a)}return null}function Lj(){if(null!==tj){var a=tj;tj=null;a.forEach(function(a,c){Cj(c,a);Z(c)});gg()}}\nfunction Mj(a,b){var c=W;W|=1;try{return a(b)}finally{W=c,W===V&&gg()}}function Nj(a,b){var c=W;W&=-2;W|=ej;try{return a(b)}finally{W=c,W===V&&gg()}}\nfunction Ej(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Id(c));if(null!==X)for(c=X.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Df();break;case 3:eh();H(K);H(J);break;case 5:gh(d);break;case 4:eh();break;case 13:H(M);break;case 19:H(M);break;case 10:og(d)}c=c.return}T=a;X=Sg(a.current,null);U=b;S=ti;kj=null;mj=lj=1073741823;nj=null;wi=0;oj=!1}\nfunction Hj(a,b){do{try{ng();jh.current=sh;if(mh)for(var c=N.memoizedState;null!==c;){var d=c.queue;null!==d&&(d.pending=null);c=c.next}lh=0;P=O=N=null;mh=!1;if(null===X||null===X.return)return S=hj,kj=b,X=null;a:{var e=a,f=X.return,g=X,h=b;b=U;g.effectTag|=2048;g.firstEffect=g.lastEffect=null;if(null!==h&&\"object\"===typeof h&&\"function\"===typeof h.then){var k=h;if(0===(g.mode&2)){var l=g.alternate;l?(g.memoizedState=l.memoizedState,g.expirationTime=l.expirationTime):g.memoizedState=null}var m=0!==\n(M.current&1),p=f;do{var x;if(x=13===p.tag){var z=p.memoizedState;if(null!==z)x=null!==z.dehydrated?!0:!1;else{var ca=p.memoizedProps;x=void 0===ca.fallback?!1:!0!==ca.unstable_avoidThisFallback?!0:m?!1:!0}}if(x){var D=p.updateQueue;if(null===D){var t=new Set;t.add(k);p.updateQueue=t}else D.add(k);if(0===(p.mode&2)){p.effectTag|=64;g.effectTag&=-2981;if(1===g.tag)if(null===g.alternate)g.tag=17;else{var y=wg(1073741823,null);y.tag=2;xg(g,y)}g.expirationTime=1073741823;break a}h=void 0;g=b;var A=e.pingCache;\nnull===A?(A=e.pingCache=new Wi,h=new Set,A.set(k,h)):(h=A.get(k),void 0===h&&(h=new Set,A.set(k,h)));if(!h.has(g)){h.add(g);var q=Oj.bind(null,e,k,g);k.then(q,q)}p.effectTag|=4096;p.expirationTime=b;break a}p=p.return}while(null!==p);h=Error((Ia(g.type)||\"A React component\")+\" suspended while rendering, but no fallback UI was specified.\\n\\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.\"+Ja(g))}S!==jj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=\nh;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&(\"function\"===typeof w.getDerivedStateFromError||null!==ub&&\"function\"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return}while(null!==p)}X=Pj(X)}catch(Xc){b=Xc;continue}break}while(1)}function Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}\nfunction Ag(a,b){a<lj&&2<a&&(lj=a);null!==b&&a<mj&&2<a&&(mj=a,nj=b)}function Bg(a){a>wi&&(wi=a)}function Kj(){for(;null!==X;)X=Qj(X)}function Gj(){for(;null!==X&&!Uf();)X=Qj(X)}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b}\nfunction Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}X.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1<X.effectTag&&(null!==\na.lastEffect?a.lastEffect.nextEffect=X:a.firstEffect=X,a.lastEffect=X))}else{b=zi(X);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=X.sibling;if(null!==b)return b;X=a}while(null!==X);S===ti&&(S=jj);return null}function Ij(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null}\nfunction Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=\nd-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=W;W|=gj;dj.current=null;Dd=fd;var g=xd();if(yd(g)){if(\"selectionStart\"in g)var h={start:g.selectionStart,end:g.selectionEnd};else a:{h=(h=g.ownerDocument)&&h.defaultView||window;var k=h.getSelection&&h.getSelection();if(k&&0!==k.rangeCount){h=k.anchorNode;var l=k.anchorOffset,\nm=k.focusNode;k=k.focusOffset;try{h.nodeType,m.nodeType}catch(wb){h=null;break a}var p=0,x=-1,z=-1,ca=0,D=0,t=g,y=null;b:for(;;){for(var A;;){t!==h||0!==l&&3!==t.nodeType||(x=p+l);t!==m||0!==k&&3!==t.nodeType||(z=p+k);3===t.nodeType&&(p+=t.nodeValue.length);if(null===(A=t.firstChild))break;y=t;t=A}for(;;){if(t===g)break b;y===h&&++ca===l&&(x=p);y===m&&++D===k&&(z=p);if(null!==(A=t.nextSibling))break;t=y;y=t.parentNode}t=A}h=-1===x||-1===z?null:{start:x,end:z}}else h=null}h=h||{start:0,end:0}}else h=\nnull;Ed={activeElementDetached:null,focusedElem:g,selectionRange:h};fd=!1;Y=e;do try{Tj()}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(g=a,h=b;null!==Y;){var q=Y.effectTag;q&16&&Rb(Y.stateNode,\"\");if(q&128){var B=Y.alternate;if(null!==B){var w=B.ref;null!==w&&(\"function\"===typeof w?w(null):w.current=null)}}switch(q&1038){case 2:Pi(Y);Y.effectTag&=-3;break;case 6:Pi(Y);Y.effectTag&=-3;Si(Y.alternate,Y);break;case 1024:Y.effectTag&=-1025;break;case 1028:Y.effectTag&=\n-1025;Si(Y.alternate,Y);break;case 4:Si(Y.alternate,Y);break;case 8:l=Y,Mi(g,l,h),Ni(l)}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);w=Ed;B=xd();q=w.focusedElem;h=w.selectionRange;if(B!==q&&q&&q.ownerDocument&&wd(q.ownerDocument.documentElement,q)){null!==h&&yd(q)&&(B=h.start,w=h.end,void 0===w&&(w=B),\"selectionStart\"in q?(q.selectionStart=B,q.selectionEnd=Math.min(w,q.value.length)):(w=(B=q.ownerDocument||document)&&B.defaultView||window,w.getSelection&&\n(w=w.getSelection(),l=q.textContent.length,g=Math.min(h.start,l),h=void 0===h.end?g:Math.min(h.end,l),!w.extend&&g>h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft,\ntop:w.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;q<B.length;q++)w=B[q],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}fd=!!Dd;Ed=Dd=null;a.current=c;Y=e;do try{for(q=a;null!==Y;){var ub=Y.effectTag;ub&36&&Ji(q,Y.alternate,Y);if(ub&128){B=void 0;var vb=Y.ref;if(null!==vb){var Xc=Y.stateNode;switch(Y.tag){case 5:B=Xc;break;default:B=Xc}\"function\"===typeof vb?vb(B):vb.current=B}}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=\nnull;Vf();W=f}else a.current=c;if(qj)qj=!1,rj=a,sj=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&(aj=null);1073741823===b?a===vj?uj++:(uj=0,vj=a):uj=0;\"function\"===typeof Uj&&Uj(c.stateNode,d);Z(a);if(Yi)throw Yi=!1,a=Zi,Zi=null,a;if((W&ej)!==V)return null;gg();return null}function Tj(){for(;null!==Y;){var a=Y.effectTag;0!==(a&256)&&Gi(Y.alternate,Y);0===(a&512)||qj||(qj=!0,dg(97,function(){Dj();return null}));Y=Y.nextEffect}}\nfunction Dj(){if(90!==sj){var a=97<sj?97:sj;sj=90;return cg(a,Vj)}}function Vj(){if(null===rj)return!1;var a=rj;rj=null;if((W&(fj|gj))!==V)throw Error(u(331));var b=W;W|=gj;for(a=a.current.firstEffect;null!==a;){try{var c=a;if(0!==(c.effectTag&512))switch(c.tag){case 0:case 11:case 15:case 22:Hi(5,c),Ii(5,c)}}catch(d){if(null===a)throw Error(u(330));Ei(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}W=b;gg();return!0}\nfunction Wj(a,b,c){b=Ai(c,b);b=Xi(a,b,1073741823);xg(a,b);a=xj(a,1073741823);null!==a&&Z(a)}function Ei(a,b){if(3===a.tag)Wj(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){Wj(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if(\"function\"===typeof c.type.getDerivedStateFromError||\"function\"===typeof d.componentDidCatch&&(null===aj||!aj.has(d))){a=Ai(b,a);a=$i(c,a,1073741823);xg(c,a);c=xj(c,1073741823);null!==c&&Z(c);break}}c=c.return}}\nfunction Oj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);T===a&&U===c?S===vi||S===ui&&1073741823===lj&&$f()-Ti<pj?Ej(a,U):oj=!0:Aj(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,Z(a)))}function Vi(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=Gg(),b=Hg(b,a,null));a=xj(a,b);null!==a&&Z(a)}var Rj;\nRj=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||K.current)rg=!0;else{if(d<c){rg=!1;switch(b.tag){case 3:hi(b);Xh();break;case 5:fh(b);if(b.mode&4&&1!==c&&e.hidden)return b.expirationTime=b.childExpirationTime=1,null;break;case 1:L(b.type)&&Gf(b);break;case 4:dh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;e=b.type._context;I(jg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;\nif(0!==d&&d>=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null,\nb,d,a,e,c);b.effectTag|=1;if(\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=\nnull,b.alternate=null,b.effectTag|=2);a=b.pendingProps;Ha(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c);\ncase 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:\nnull,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,\nb,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==\nk){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime<c&&(h.expirationTime=c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);pg(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=\ng}R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,qg(b,c),e=sg(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,R(a,b,d,c),b.child;case 14:return e=b.type,f=ig(e,b.pendingProps),f=ig(e.type,f),ai(a,b,e,f,d,c);case 15:return ci(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,L(d)?(a=!0,Gf(b)):a=!1,qg(b,c),Lg(b,d,e),Ng(b,d,e,c),gi(null,\nb,d,!0,a,c);case 19:return mi(a,b,c)}throw Error(u(156,b.tag));};var Uj=null,Li=null;function Yj(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);Uj=function(a){try{b.onCommitFiberRoot(c,a,void 0,64===(a.current.effectTag&64))}catch(e){}};Li=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}\nfunction Zj(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.dependencies=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 Sh(a,b,c,d){return new Zj(a,b,c,d)}\nfunction bi(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Xj(a){if(\"function\"===typeof a)return bi(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===za)return 11;if(a===Ca)return 14}return 2}\nfunction Sg(a,b){var c=a.alternate;null===c?(c=Sh(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;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,\nfirstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Ug(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bi(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ta:return Wg(c.children,e,f,b);case ya:g=8;e|=7;break;case ua:g=8;e|=1;break;case va:return a=Sh(12,c,b,e|8),a.elementType=va,a.type=va,a.expirationTime=f,a;case Aa:return a=Sh(13,c,b,e),a.type=Aa,a.elementType=Aa,a.expirationTime=f,a;case Ba:return a=Sh(19,c,b,e),a.elementType=Ba,a.expirationTime=f,a;default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case wa:g=\n10;break a;case xa:g=9;break a;case za:g=11;break a;case Ca:g=14;break a;case Da:g=16;d=null;break a;case Ea:g=22;break a}throw Error(u(130,null==a?a:typeof a,\"\"));}b=Sh(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Wg(a,b,c,d){a=Sh(7,a,d,b);a.expirationTime=c;return a}function Tg(a,b,c){a=Sh(6,a,null,b);a.expirationTime=c;return a}\nfunction Vg(a,b,c){b=Sh(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction ak(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}\nfunction Aj(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}\nfunction yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}\nfunction bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0===\nd?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(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 dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=b)}function ek(a,b){dk(a,b);(a=a.alternate)&&dk(a,b)}\nfunction fk(a,b,c){c=null!=c&&!0===c.hydrate;var d=new ak(a,b,c),e=Sh(3,null,null,2===b?7:1===b?3:0);d.current=e;e.stateNode=d;ug(e);a[Od]=d.current;c&&0!==b&&Jc(a,9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}fk.prototype.render=function(a){bk(a,this._internalRoot,null,null)};fk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;bk(null,a,null,function(){b[Od]=null})};\nfunction gk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||\" react-mount-point-unstable \"!==a.nodeValue))}function hk(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 fk(a,0,b?{hydrate:!0}:void 0)}\nfunction ik(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if(\"function\"===typeof e){var h=e;e=function(){var a=ck(g);h.call(a)}}bk(b,g,a,e)}else{f=c._reactRootContainer=hk(c,d);g=f._internalRoot;if(\"function\"===typeof e){var k=e;e=function(){var a=ck(g);k.call(a)}}Nj(function(){bk(b,g,a,e)})}return ck(g)}function jk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:sa,key:null==d?null:\"\"+d,children:a,containerInfo:b,implementation:c}}\nwc=function(a){if(13===a.tag){var b=hg(Gg(),150,100);Ig(a,b);ek(a,b)}};xc=function(a){13===a.tag&&(Ig(a,3),ek(a,3))};yc=function(a){if(13===a.tag){var b=Gg();b=Hg(b,a,null);Ig(a,b);ek(a,b)}};\nUa=function(a,b,c){switch(b){case \"input\":Cb(a,c);b=c.name;if(\"radio\"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+b)+'][type=\"radio\"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Qd(d);if(!e)throw Error(u(90));yb(d);Cb(d,e)}}}break;case \"textarea\":Kb(a,c);break;case \"select\":b=c.value,null!=b&&Hb(a,!!c.multiple,b,!1)}};$a=Mj;\nab=function(a,b,c,d,e){var f=W;W|=4;try{return cg(98,a.bind(null,b,c,d,e))}finally{W=f,W===V&&gg()}};bb=function(){(W&(1|fj|gj))===V&&(Lj(),Dj())};cb=function(a,b){var c=W;W|=2;try{return a(b)}finally{W=c,W===V&&gg()}};function kk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gk(b))throw Error(u(200));return jk(a,b,null,c)}var lk={Events:[Nc,Pd,Qd,Sa,Oa,Xd,function(a){jc(a,Wd)},Ya,Za,id,mc,Dj,{current:!1}]};\n(function(a){var b=a.findFiberByHostInstance;return Yj(n({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=hc(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:tc,bundleType:0,version:\"16.13.0\",\nrendererPackageName:\"react-dom\"});exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;exports.createPortal=kk;exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if(\"function\"===typeof a.render)throw Error(u(188));throw Error(u(268,Object.keys(a)));}a=hc(b);a=null===a?null:a.stateNode;return a};\nexports.flushSync=function(a,b){if((W&(fj|gj))!==V)throw Error(u(187));var c=W;W|=1;try{return cg(99,a.bind(null,b))}finally{W=c,gg()}};exports.hydrate=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!0,c)};exports.render=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!1,c)};\nexports.unmountComponentAtNode=function(a){if(!gk(a))throw Error(u(40));return a._reactRootContainer?(Nj(function(){ik(null,null,a,!1,function(){a._reactRootContainer=null;a[Od]=null})}),!0):!1};exports.unstable_batchedUpdates=Mj;exports.unstable_createPortal=function(a,b){return kk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};\nexports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!gk(c))throw Error(u(200));if(null==a||void 0===a._reactInternalFiber)throw Error(u(38));return ik(a,b,c,!1,d)};exports.version=\"16.13.0\";\n", "'use strict';\n\nfunction checkDCE() {\n  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n  if (\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n  ) {\n    return;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    // This branch is unreachable because this function is only called\n    // in production, but the condition is true only in development.\n    // Therefore if the branch is still here, dead code elimination wasn't\n    // properly applied.\n    // Don't change the message. React DevTools relies on it. Also make sure\n    // this message doesn't occur elsewhere in this function, or it will cause\n    // a false positive.\n    throw new Error('^_^');\n  }\n  try {\n    // Verify that the code above has been dead code eliminated (DCE'd).\n    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n  } catch (err) {\n    // DevTools shouldn't crash React, no matter what.\n    // We should still report in case we break this code.\n    console.error(err);\n  }\n}\n\nif (process.env.NODE_ENV === 'production') {\n  // DCE check should happen before ReactDOM bundle executes so that\n  // DevTools can report bad minification during injection.\n  checkDCE();\n  module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n  module.exports = require('./cjs/react-dom.development.js');\n}\n", "'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\nvar hasElementType = typeof Element !== 'undefined';\n\nfunction equal(a, b) {\n  // fast-deep-equal index.js 2.0.1\n  if (a === b) return true;\n\n  if (a && b && typeof a == 'object' && typeof b == 'object') {\n    var arrA = isArray(a)\n      , arrB = isArray(b)\n      , i\n      , length\n      , key;\n\n    if (arrA && arrB) {\n      length = a.length;\n      if (length != b.length) return false;\n      for (i = length; i-- !== 0;)\n        if (!equal(a[i], b[i])) return false;\n      return true;\n    }\n\n    if (arrA != arrB) return false;\n\n    var dateA = a instanceof Date\n      , dateB = b instanceof Date;\n    if (dateA != dateB) return false;\n    if (dateA && dateB) return a.getTime() == b.getTime();\n\n    var regexpA = a instanceof RegExp\n      , regexpB = b instanceof RegExp;\n    if (regexpA != regexpB) return false;\n    if (regexpA && regexpB) return a.toString() == b.toString();\n\n    var keys = keyList(a);\n    length = keys.length;\n\n    if (length !== keyList(b).length)\n      return false;\n\n    for (i = length; i-- !== 0;)\n      if (!hasProp.call(b, keys[i])) return false;\n    // end fast-deep-equal\n\n    // start react-fast-compare\n    // custom handling for DOM elements\n    if (hasElementType && a instanceof Element && b instanceof Element)\n      return a === b;\n\n    // custom handling for React\n    for (i = length; i-- !== 0;) {\n      key = keys[i];\n      if (key === '_owner' && a.$$typeof) {\n        // React-specific: avoid traversing React elements' _owner.\n        //  _owner contains circular references\n        // and is not needed when comparing the actual elements (and not their owners)\n        // .$$typeof and ._store on just reasonable markers of a react element\n        continue;\n      } else {\n        // all other properties should be traversed as usual\n        if (!equal(a[key], b[key])) return false;\n      }\n    }\n    // end react-fast-compare\n\n    // fast-deep-equal index.js 2.0.1\n    return true;\n  }\n\n  return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function exportedEqual(a, b) {\n  try {\n    return equal(a, b);\n  } catch (error) {\n    if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260)) {\n      // warn on circular references, don't crash\n      // browsers give this different errors name and messages:\n      // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n      // firefox: \"InternalError\", too much recursion\"\n      // edge: \"Error\", \"Out of stack space\"\n      console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n      return false;\n    }\n    // some other error. we should definitely know about these\n    throw error;\n  }\n};\n", "//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n  var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n  if (ret !== void 0) {\n    return !!ret;\n  }\n\n  if (objA === objB) {\n    return true;\n  }\n\n  if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n    return false;\n  }\n\n  var keysA = Object.keys(objA);\n  var keysB = Object.keys(objB);\n\n  if (keysA.length !== keysB.length) {\n    return false;\n  }\n\n  var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n  // Test for A's keys different from B.\n  for (var idx = 0; idx < keysA.length; idx++) {\n    var key = keysA[idx];\n\n    if (!bHasOwnProperty(key)) {\n      return false;\n    }\n\n    var valueA = objA[key];\n    var valueB = objB[key];\n\n    ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n    if (ret === false || (ret === void 0 && valueA !== valueB)) {\n      return false;\n    }\n  }\n\n  return true;\n};\n", "export const TAG_PROPERTIES = {\n  CHARSET: 'charset',\n  CSS_TEXT: 'cssText',\n  HREF: 'href',\n  HTTPEQUIV: 'http-equiv',\n  INNER_HTML: 'innerHTML',\n  ITEM_PROP: 'itemprop',\n  NAME: 'name',\n  PROPERTY: 'property',\n  REL: 'rel',\n  SRC: 'src',\n};\n\nexport const ATTRIBUTE_NAMES = {\n  BODY: 'bodyAttributes',\n  HTML: 'htmlAttributes',\n  TITLE: 'titleAttributes',\n};\n\nexport const TAG_NAMES = {\n  BASE: 'base',\n  BODY: 'body',\n  HEAD: 'head',\n  HTML: 'html',\n  LINK: 'link',\n  META: 'meta',\n  NOSCRIPT: 'noscript',\n  SCRIPT: 'script',\n  STYLE: 'style',\n  TITLE: 'title',\n  FRAGMENT: 'Symbol(react.fragment)',\n};\n\nexport const VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(name => TAG_NAMES[name]);\n\nexport const REACT_TAG_MAP = {\n  accesskey: 'accessKey',\n  charset: 'charSet',\n  class: 'className',\n  contenteditable: 'contentEditable',\n  contextmenu: 'contextMenu',\n  'http-equiv': 'httpEquiv',\n  itemprop: 'itemProp',\n  tabindex: 'tabIndex',\n};\n\nexport const HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce((obj, key) => {\n  // eslint-disable-next-line no-param-reassign\n  obj[REACT_TAG_MAP[key]] = key;\n  return obj;\n}, {});\n\nexport const HELMET_ATTRIBUTE = 'data-rh';\n", "import { TAG_NAMES, TAG_PROPERTIES, ATTRIBUTE_NAMES } from './constants';\n\nconst HELMET_PROPS = {\n  DEFAULT_TITLE: 'defaultTitle',\n  DEFER: 'defer',\n  ENCODE_SPECIAL_CHARACTERS: 'encodeSpecialCharacters',\n  ON_CHANGE_CLIENT_STATE: 'onChangeClientState',\n  TITLE_TEMPLATE: 'titleTemplate',\n};\n\nconst getInnermostProperty = (propsList, property) => {\n  for (let i = propsList.length - 1; i >= 0; i -= 1) {\n    const props = propsList[i];\n\n    if (Object.prototype.hasOwnProperty.call(props, property)) {\n      return props[property];\n    }\n  }\n\n  return null;\n};\n\nconst getTitleFromPropsList = propsList => {\n  let innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);\n  const innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n  if (Array.isArray(innermostTitle)) {\n    innermostTitle = innermostTitle.join('');\n  }\n  if (innermostTemplate && innermostTitle) {\n    // use function arg to avoid need to escape $ characters\n    return innermostTemplate.replace(/%s/g, () => innermostTitle);\n  }\n\n  const innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n\n  return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nconst getOnChangeClientState = propsList =>\n  getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || (() => {});\n\nconst getAttributesFromPropsList = (tagType, propsList) =>\n  propsList\n    .filter(props => typeof props[tagType] !== 'undefined')\n    .map(props => props[tagType])\n    .reduce((tagAttrs, current) => ({ ...tagAttrs, ...current }), {});\n\nconst getBaseTagFromPropsList = (primaryAttributes, propsList) =>\n  propsList\n    .filter(props => typeof props[TAG_NAMES.BASE] !== 'undefined')\n    .map(props => props[TAG_NAMES.BASE])\n    .reverse()\n    .reduce((innermostBaseTag, tag) => {\n      if (!innermostBaseTag.length) {\n        const keys = Object.keys(tag);\n\n        for (let i = 0; i < keys.length; i += 1) {\n          const attributeKey = keys[i];\n          const lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n          if (\n            primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 &&\n            tag[lowerCaseAttributeKey]\n          ) {\n            return innermostBaseTag.concat(tag);\n          }\n        }\n      }\n\n      return innermostBaseTag;\n    }, []);\n\n// eslint-disable-next-line no-console\nconst warn = msg => console && typeof console.warn === 'function' && console.warn(msg);\n\nconst getTagsFromPropsList = (tagName, primaryAttributes, propsList) => {\n  // Calculate list of tags, giving priority innermost component (end of the propslist)\n  const approvedSeenTags = {};\n\n  return propsList\n    .filter(props => {\n      if (Array.isArray(props[tagName])) {\n        return true;\n      }\n      if (typeof props[tagName] !== 'undefined') {\n        warn(\n          `Helmet: ${tagName} should be of type \"Array\". Instead found type \"${typeof props[\n            tagName\n          ]}\"`\n        );\n      }\n      return false;\n    })\n    .map(props => props[tagName])\n    .reverse()\n    .reduce((approvedTags, instanceTags) => {\n      const instanceSeenTags = {};\n\n      instanceTags\n        .filter(tag => {\n          let primaryAttributeKey;\n          const keys = Object.keys(tag);\n          for (let i = 0; i < keys.length; i += 1) {\n            const attributeKey = keys[i];\n            const lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n            // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n            if (\n              primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 &&\n              !(\n                primaryAttributeKey === TAG_PROPERTIES.REL &&\n                tag[primaryAttributeKey].toLowerCase() === 'canonical'\n              ) &&\n              !(\n                lowerCaseAttributeKey === TAG_PROPERTIES.REL &&\n                tag[lowerCaseAttributeKey].toLowerCase() === 'stylesheet'\n              )\n            ) {\n              primaryAttributeKey = lowerCaseAttributeKey;\n            }\n            // Special case for innerHTML which doesn't work lowercased\n            if (\n              primaryAttributes.indexOf(attributeKey) !== -1 &&\n              (attributeKey === TAG_PROPERTIES.INNER_HTML ||\n                attributeKey === TAG_PROPERTIES.CSS_TEXT ||\n                attributeKey === TAG_PROPERTIES.ITEM_PROP)\n            ) {\n              primaryAttributeKey = attributeKey;\n            }\n          }\n\n          if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n            return false;\n          }\n\n          const value = tag[primaryAttributeKey].toLowerCase();\n\n          if (!approvedSeenTags[primaryAttributeKey]) {\n            approvedSeenTags[primaryAttributeKey] = {};\n          }\n\n          if (!instanceSeenTags[primaryAttributeKey]) {\n            instanceSeenTags[primaryAttributeKey] = {};\n          }\n\n          if (!approvedSeenTags[primaryAttributeKey][value]) {\n            instanceSeenTags[primaryAttributeKey][value] = true;\n            return true;\n          }\n\n          return false;\n        })\n        .reverse()\n        .forEach(tag => approvedTags.push(tag));\n\n      // Update seen tags with tags from this instance\n      const keys = Object.keys(instanceSeenTags);\n      for (let i = 0; i < keys.length; i += 1) {\n        const attributeKey = keys[i];\n        const tagUnion = {\n          ...approvedSeenTags[attributeKey],\n          ...instanceSeenTags[attributeKey],\n        };\n\n        approvedSeenTags[attributeKey] = tagUnion;\n      }\n\n      return approvedTags;\n    }, [])\n    .reverse();\n};\n\nconst reducePropsToState = propsList => ({\n  baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF], propsList),\n  bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),\n  defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n  encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n  htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),\n  linkTags: getTagsFromPropsList(\n    TAG_NAMES.LINK,\n    [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF],\n    propsList\n  ),\n  metaTags: getTagsFromPropsList(\n    TAG_NAMES.META,\n    [\n      TAG_PROPERTIES.NAME,\n      TAG_PROPERTIES.CHARSET,\n      TAG_PROPERTIES.HTTPEQUIV,\n      TAG_PROPERTIES.PROPERTY,\n      TAG_PROPERTIES.ITEM_PROP,\n    ],\n    propsList\n  ),\n  noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),\n  onChangeClientState: getOnChangeClientState(propsList),\n  scriptTags: getTagsFromPropsList(\n    TAG_NAMES.SCRIPT,\n    [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML],\n    propsList\n  ),\n  styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),\n  title: getTitleFromPropsList(propsList),\n  titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList),\n});\n\nexport const flattenArray = possibleArray =>\n  Array.isArray(possibleArray) ? possibleArray.join('') : possibleArray;\n\nexport { reducePropsToState };\n", "import React from 'react';\nimport {\n  HELMET_ATTRIBUTE,\n  TAG_NAMES,\n  REACT_TAG_MAP,\n  TAG_PROPERTIES,\n  ATTRIBUTE_NAMES,\n} from './constants';\nimport { flattenArray } from './utils';\n\nconst SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\n\nconst encodeSpecialCharacters = (str, encode = true) => {\n  if (encode === false) {\n    return String(str);\n  }\n\n  return String(str)\n    .replace(/&/g, '&amp;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;')\n    .replace(/\"/g, '&quot;')\n    .replace(/'/g, '&#x27;');\n};\n\nconst generateElementAttributesAsString = attributes =>\n  Object.keys(attributes).reduce((str, key) => {\n    const attr = typeof attributes[key] !== 'undefined' ? `${key}=\"${attributes[key]}\"` : `${key}`;\n    return str ? `${str} ${attr}` : attr;\n  }, '');\n\nconst generateTitleAsString = (type, title, attributes, encode) => {\n  const attributeString = generateElementAttributesAsString(attributes);\n  const flattenedTitle = flattenArray(title);\n  return attributeString\n    ? `<${type} ${HELMET_ATTRIBUTE}=\"true\" ${attributeString}>${encodeSpecialCharacters(\n        flattenedTitle,\n        encode\n      )}</${type}>`\n    : `<${type} ${HELMET_ATTRIBUTE}=\"true\">${encodeSpecialCharacters(\n        flattenedTitle,\n        encode\n      )}</${type}>`;\n};\n\nconst generateTagsAsString = (type, tags, encode) =>\n  tags.reduce((str, tag) => {\n    const attributeHtml = Object.keys(tag)\n      .filter(\n        attribute =>\n          !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT)\n      )\n      .reduce((string, attribute) => {\n        const attr =\n          typeof tag[attribute] === 'undefined'\n            ? attribute\n            : `${attribute}=\"${encodeSpecialCharacters(tag[attribute], encode)}\"`;\n        return string ? `${string} ${attr}` : attr;\n      }, '');\n\n    const tagContent = tag.innerHTML || tag.cssText || '';\n\n    const isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n\n    return `${str}<${type} ${HELMET_ATTRIBUTE}=\"true\" ${attributeHtml}${\n      isSelfClosing ? `/>` : `>${tagContent}</${type}>`\n    }`;\n  }, '');\n\nconst convertElementAttributesToReactProps = (attributes, initProps = {}) =>\n  Object.keys(attributes).reduce((obj, key) => {\n    // eslint-disable-next-line no-param-reassign\n    obj[REACT_TAG_MAP[key] || key] = attributes[key];\n    return obj;\n  }, initProps);\n\nconst generateTitleAsReactComponent = (type, title, attributes) => {\n  // assigning into an array to define toString function on it\n  const initProps = {\n    key: title,\n    [HELMET_ATTRIBUTE]: true,\n  };\n  const props = convertElementAttributesToReactProps(attributes, initProps);\n\n  return [React.createElement(TAG_NAMES.TITLE, props, title)];\n};\n\nconst generateTagsAsReactComponent = (type, tags) =>\n  tags.map((tag, i) => {\n    const mappedTag = {\n      key: i,\n      [HELMET_ATTRIBUTE]: true,\n    };\n\n    Object.keys(tag).forEach(attribute => {\n      const mappedAttribute = REACT_TAG_MAP[attribute] || attribute;\n\n      if (\n        mappedAttribute === TAG_PROPERTIES.INNER_HTML ||\n        mappedAttribute === TAG_PROPERTIES.CSS_TEXT\n      ) {\n        const content = tag.innerHTML || tag.cssText;\n        mappedTag.dangerouslySetInnerHTML = { __html: content };\n      } else {\n        mappedTag[mappedAttribute] = tag[attribute];\n      }\n    });\n\n    return React.createElement(type, mappedTag);\n  });\n\nconst getMethodsForTag = (type, tags, encode) => {\n  switch (type) {\n    case TAG_NAMES.TITLE:\n      return {\n        toComponent: () =>\n          generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode),\n        toString: () => generateTitleAsString(type, tags.title, tags.titleAttributes, encode),\n      };\n    case ATTRIBUTE_NAMES.BODY:\n    case ATTRIBUTE_NAMES.HTML:\n      return {\n        toComponent: () => convertElementAttributesToReactProps(tags),\n        toString: () => generateElementAttributesAsString(tags),\n      };\n    default:\n      return {\n        toComponent: () => generateTagsAsReactComponent(type, tags),\n        toString: () => generateTagsAsString(type, tags, encode),\n      };\n  }\n};\n\nconst mapStateOnServer = ({\n  baseTag,\n  bodyAttributes,\n  encode,\n  htmlAttributes,\n  linkTags,\n  metaTags,\n  noscriptTags,\n  scriptTags,\n  styleTags,\n  title = '',\n  titleAttributes,\n}) => ({\n  base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),\n  bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n  htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n  link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),\n  meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),\n  noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n  script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),\n  style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),\n  title: getMethodsForTag(TAG_NAMES.TITLE, { title, titleAttributes }, encode),\n});\n\nexport default mapStateOnServer;\n", "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport mapStateOnServer from './server';\n\nconst defaultValue = {};\n\nexport const Context = React.createContext(defaultValue);\n\nexport const providerShape = PropTypes.shape({\n  setHelmet: PropTypes.func,\n  helmetInstances: PropTypes.shape({\n    get: PropTypes.func,\n    add: PropTypes.func,\n    remove: PropTypes.func,\n  }),\n});\n\nconst canUseDOM = typeof document !== 'undefined';\n\nexport default class Provider extends Component {\n  static canUseDOM = canUseDOM;\n\n  static propTypes = {\n    context: PropTypes.shape({\n      helmet: PropTypes.shape(),\n    }),\n    children: PropTypes.node.isRequired,\n  };\n\n  static defaultProps = {\n    context: {},\n  };\n\n  static displayName = 'HelmetProvider';\n\n  instances = [];\n\n  value = {\n    setHelmet: serverState => {\n      // eslint-disable-next-line react/prop-types\n      this.props.context.helmet = serverState;\n    },\n    helmetInstances: {\n      get: () => this.instances,\n      add: instance => {\n        this.instances.push(instance);\n      },\n      remove: instance => {\n        const index = this.instances.indexOf(instance);\n        this.instances.splice(index, 1);\n      },\n    },\n  };\n\n  constructor(props) {\n    super(props);\n\n    if (!Provider.canUseDOM) {\n      // eslint-disable-next-line no-param-reassign\n      props.context.helmet = mapStateOnServer({\n        baseTag: [],\n        bodyAttributes: {},\n        encodeSpecialCharacters: true,\n        htmlAttributes: {},\n        linkTags: [],\n        metaTags: [],\n        noscriptTags: [],\n        scriptTags: [],\n        styleTags: [],\n        title: '',\n        titleAttributes: {},\n      });\n    }\n  }\n\n  render() {\n    return <Context.Provider value={this.value}>{this.props.children}</Context.Provider>;\n  }\n}\n", "import { HELMET_ATTRIBUTE, TAG_NAMES, TAG_PROPERTIES } from './constants';\nimport { flattenArray } from './utils';\n\nconst updateTags = (type, tags) => {\n  const headElement = document.head || document.querySelector(TAG_NAMES.HEAD);\n  const tagNodes = headElement.querySelectorAll(`${type}[${HELMET_ATTRIBUTE}]`);\n  const oldTags = [].slice.call(tagNodes);\n  const newTags = [];\n  let indexToDelete;\n\n  if (tags && tags.length) {\n    tags.forEach(tag => {\n      const newElement = document.createElement(type);\n\n      // eslint-disable-next-line\n      for (const attribute in tag) {\n        if (Object.prototype.hasOwnProperty.call(tag, attribute)) {\n          if (attribute === TAG_PROPERTIES.INNER_HTML) {\n            newElement.innerHTML = tag.innerHTML;\n          } else if (attribute === TAG_PROPERTIES.CSS_TEXT) {\n            if (newElement.styleSheet) {\n              newElement.styleSheet.cssText = tag.cssText;\n            } else {\n              newElement.appendChild(document.createTextNode(tag.cssText));\n            }\n          } else {\n            const value = typeof tag[attribute] === 'undefined' ? '' : tag[attribute];\n            newElement.setAttribute(attribute, value);\n          }\n        }\n      }\n\n      newElement.setAttribute(HELMET_ATTRIBUTE, 'true');\n\n      // Remove a duplicate tag from domTagstoRemove, so it isn't cleared.\n      if (\n        oldTags.some((existingTag, index) => {\n          indexToDelete = index;\n          return newElement.isEqualNode(existingTag);\n        })\n      ) {\n        oldTags.splice(indexToDelete, 1);\n      } else {\n        newTags.push(newElement);\n      }\n    });\n  }\n\n  oldTags.forEach(tag => tag.parentNode.removeChild(tag));\n  newTags.forEach(tag => headElement.appendChild(tag));\n\n  return {\n    oldTags,\n    newTags,\n  };\n};\n\nconst updateAttributes = (tagName, attributes) => {\n  const elementTag = document.getElementsByTagName(tagName)[0];\n\n  if (!elementTag) {\n    return;\n  }\n\n  const helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n  const helmetAttributes = helmetAttributeString ? helmetAttributeString.split(',') : [];\n  const attributesToRemove = [].concat(helmetAttributes);\n  const attributeKeys = Object.keys(attributes);\n\n  for (let i = 0; i < attributeKeys.length; i += 1) {\n    const attribute = attributeKeys[i];\n    const value = attributes[attribute] || '';\n\n    if (elementTag.getAttribute(attribute) !== value) {\n      elementTag.setAttribute(attribute, value);\n    }\n\n    if (helmetAttributes.indexOf(attribute) === -1) {\n      helmetAttributes.push(attribute);\n    }\n\n    const indexToSave = attributesToRemove.indexOf(attribute);\n    if (indexToSave !== -1) {\n      attributesToRemove.splice(indexToSave, 1);\n    }\n  }\n\n  for (let i = attributesToRemove.length - 1; i >= 0; i -= 1) {\n    elementTag.removeAttribute(attributesToRemove[i]);\n  }\n\n  if (helmetAttributes.length === attributesToRemove.length) {\n    elementTag.removeAttribute(HELMET_ATTRIBUTE);\n  } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(',')) {\n    elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(','));\n  }\n};\n\nconst updateTitle = (title, attributes) => {\n  if (typeof title !== 'undefined' && document.title !== title) {\n    document.title = flattenArray(title);\n  }\n\n  updateAttributes(TAG_NAMES.TITLE, attributes);\n};\n\nconst commitTagChanges = (newState, cb) => {\n  const {\n    baseTag,\n    bodyAttributes,\n    htmlAttributes,\n    linkTags,\n    metaTags,\n    noscriptTags,\n    onChangeClientState,\n    scriptTags,\n    styleTags,\n    title,\n    titleAttributes,\n  } = newState;\n  updateAttributes(TAG_NAMES.BODY, bodyAttributes);\n  updateAttributes(TAG_NAMES.HTML, htmlAttributes);\n\n  updateTitle(title, titleAttributes);\n\n  const tagUpdates = {\n    baseTag: updateTags(TAG_NAMES.BASE, baseTag),\n    linkTags: updateTags(TAG_NAMES.LINK, linkTags),\n    metaTags: updateTags(TAG_NAMES.META, metaTags),\n    noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),\n    scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),\n    styleTags: updateTags(TAG_NAMES.STYLE, styleTags),\n  };\n\n  const addedTags = {};\n  const removedTags = {};\n\n  Object.keys(tagUpdates).forEach(tagType => {\n    const { newTags, oldTags } = tagUpdates[tagType];\n\n    if (newTags.length) {\n      addedTags[tagType] = newTags;\n    }\n    if (oldTags.length) {\n      removedTags[tagType] = tagUpdates[tagType].oldTags;\n    }\n  });\n\n  if (cb) {\n    cb();\n  }\n\n  onChangeClientState(newState, addedTags, removedTags);\n};\n\n// eslint-disable-next-line\nlet _helmetCallback = null;\n\nconst handleStateChangeOnClient = newState => {\n  if (_helmetCallback) {\n    cancelAnimationFrame(_helmetCallback);\n  }\n\n  if (newState.defer) {\n    _helmetCallback = requestAnimationFrame(() => {\n      commitTagChanges(newState, () => {\n        _helmetCallback = null;\n      });\n    });\n  } else {\n    commitTagChanges(newState);\n    _helmetCallback = null;\n  }\n};\n\nexport default handleStateChangeOnClient;\n", "import { Component } from 'react';\nimport shallowEqual from 'shallowequal';\nimport handleStateChangeOnClient from './client';\nimport mapStateOnServer from './server';\nimport { reducePropsToState } from './utils';\nimport Provider, { providerShape } from './Provider';\n\nexport default class Dispatcher extends Component {\n  static propTypes = {\n    context: providerShape.isRequired,\n  };\n\n  static displayName = 'HelmetDispatcher';\n\n  rendered = false;\n\n  shouldComponentUpdate(nextProps) {\n    return !shallowEqual(nextProps, this.props);\n  }\n\n  componentDidUpdate() {\n    this.emitChange();\n  }\n\n  componentWillUnmount() {\n    const { helmetInstances } = this.props.context;\n    helmetInstances.remove(this);\n    this.emitChange();\n  }\n\n  emitChange() {\n    const { helmetInstances, setHelmet } = this.props.context;\n    let serverState = null;\n    const state = reducePropsToState(\n      helmetInstances.get().map(instance => {\n        const props = { ...instance.props };\n        delete props.context;\n        return props;\n      })\n    );\n    if (Provider.canUseDOM) {\n      handleStateChangeOnClient(state);\n    } else if (mapStateOnServer) {\n      serverState = mapStateOnServer(state);\n    }\n    setHelmet(serverState);\n  }\n\n  // componentWillMount will be deprecated\n  // for SSR, initialize on first render\n  // constructor is also unsafe in StrictMode\n  init() {\n    if (this.rendered) {\n      return;\n    }\n\n    this.rendered = true;\n\n    const { helmetInstances } = this.props.context;\n    helmetInstances.add(this);\n    this.emitChange();\n  }\n\n  render() {\n    this.init();\n\n    return null;\n  }\n}\n", "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport fastCompare from 'react-fast-compare';\nimport invariant from 'invariant';\nimport { Context } from './Provider';\nimport Dispatcher from './Dispatcher';\nimport { TAG_NAMES, VALID_TAG_NAMES, HTML_TAG_MAP } from './constants';\n\nexport { default as HelmetProvider } from './Provider';\n\n/* eslint-disable class-methods-use-this */\n\nexport class Helmet extends Component {\n  /**\n   * @param {Object} base: {\"target\": \"_blank\", \"href\": \"http://mysite.com/\"}\n   * @param {Object} bodyAttributes: {\"className\": \"root\"}\n   * @param {String} defaultTitle: \"Default Title\"\n   * @param {Boolean} defer: true\n   * @param {Boolean} encodeSpecialCharacters: true\n   * @param {Object} htmlAttributes: {\"lang\": \"en\", \"amp\": undefined}\n   * @param {Array} link: [{\"rel\": \"canonical\", \"href\": \"http://mysite.com/example\"}]\n   * @param {Array} meta: [{\"name\": \"description\", \"content\": \"Test description\"}]\n   * @param {Array} noscript: [{\"innerHTML\": \"<img src='http://mysite.com/js/test.js'\"}]\n   * @param {Function} onChangeClientState: \"(newState) => console.log(newState)\"\n   * @param {Array} script: [{\"type\": \"text/javascript\", \"src\": \"http://mysite.com/js/test.js\"}]\n   * @param {Array} style: [{\"type\": \"text/css\", \"cssText\": \"div { display: block; color: blue; }\"}]\n   * @param {String} title: \"Title\"\n   * @param {Object} titleAttributes: {\"itemprop\": \"name\"}\n   * @param {String} titleTemplate: \"MySite.com - %s\"\n   */\n  /* eslint-disable react/prop-types, react/forbid-prop-types, react/require-default-props */\n  static propTypes = {\n    base: PropTypes.object,\n    bodyAttributes: PropTypes.object,\n    children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n    defaultTitle: PropTypes.string,\n    defer: PropTypes.bool,\n    encodeSpecialCharacters: PropTypes.bool,\n    htmlAttributes: PropTypes.object,\n    link: PropTypes.arrayOf(PropTypes.object),\n    meta: PropTypes.arrayOf(PropTypes.object),\n    noscript: PropTypes.arrayOf(PropTypes.object),\n    onChangeClientState: PropTypes.func,\n    script: PropTypes.arrayOf(PropTypes.object),\n    style: PropTypes.arrayOf(PropTypes.object),\n    title: PropTypes.string,\n    titleAttributes: PropTypes.object,\n    titleTemplate: PropTypes.string,\n  };\n  /* eslint-enable react/prop-types, react/forbid-prop-types, react/require-default-props */\n\n  static defaultProps = {\n    defer: true,\n    encodeSpecialCharacters: true,\n  };\n\n  static displayName = 'Helmet';\n\n  shouldComponentUpdate(nextProps) {\n    return !fastCompare(this.props, nextProps);\n  }\n\n  mapNestedChildrenToProps(child, nestedChildren) {\n    if (!nestedChildren) {\n      return null;\n    }\n\n    switch (child.type) {\n      case TAG_NAMES.SCRIPT:\n      case TAG_NAMES.NOSCRIPT:\n        return {\n          innerHTML: nestedChildren,\n        };\n\n      case TAG_NAMES.STYLE:\n        return {\n          cssText: nestedChildren,\n        };\n      default:\n        throw new Error(\n          `<${\n            child.type\n          } /> elements are self-closing and can not contain children. Refer to our API for more information.`\n        );\n    }\n  }\n\n  flattenArrayTypeChildren({ child, arrayTypeChildren, newChildProps, nestedChildren }) {\n    return {\n      ...arrayTypeChildren,\n      [child.type]: [\n        ...(arrayTypeChildren[child.type] || []),\n        {\n          ...newChildProps,\n          ...this.mapNestedChildrenToProps(child, nestedChildren),\n        },\n      ],\n    };\n  }\n\n  mapObjectTypeChildren({ child, newProps, newChildProps, nestedChildren }) {\n    switch (child.type) {\n      case TAG_NAMES.TITLE:\n        return {\n          ...newProps,\n          [child.type]: nestedChildren,\n          titleAttributes: { ...newChildProps },\n        };\n\n      case TAG_NAMES.BODY:\n        return {\n          ...newProps,\n          bodyAttributes: { ...newChildProps },\n        };\n\n      case TAG_NAMES.HTML:\n        return {\n          ...newProps,\n          htmlAttributes: { ...newChildProps },\n        };\n      default:\n        return {\n          ...newProps,\n          [child.type]: { ...newChildProps },\n        };\n    }\n  }\n\n  mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n    let newFlattenedProps = { ...newProps };\n\n    Object.keys(arrayTypeChildren).forEach(arrayChildName => {\n      newFlattenedProps = {\n        ...newFlattenedProps,\n        [arrayChildName]: arrayTypeChildren[arrayChildName],\n      };\n    });\n\n    return newFlattenedProps;\n  }\n\n  warnOnInvalidChildren(child, nestedChildren) {\n    invariant(\n      VALID_TAG_NAMES.some(name => child.type === name),\n      typeof child.type === 'function'\n        ? `You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.`\n        : `Only elements types ${VALID_TAG_NAMES.join(\n            ', '\n          )} are allowed. Helmet does not support rendering <${\n            child.type\n          }> elements. Refer to our API for more information.`\n    );\n\n    invariant(\n      !nestedChildren ||\n        typeof nestedChildren === 'string' ||\n        (Array.isArray(nestedChildren) &&\n          !nestedChildren.some(nestedChild => typeof nestedChild !== 'string')),\n      `Helmet expects a string as a child of <${\n        child.type\n      }>. Did you forget to wrap your children in braces? ( <${child.type}>{\\`\\`}</${\n        child.type\n      }> ) Refer to our API for more information.`\n    );\n\n    return true;\n  }\n\n  mapChildrenToProps(children, newProps) {\n    let arrayTypeChildren = {};\n\n    React.Children.forEach(children, child => {\n      if (!child || !child.props) {\n        return;\n      }\n\n      const { children: nestedChildren, ...childProps } = child.props;\n      // convert React props to HTML attributes\n      const newChildProps = Object.keys(childProps).reduce((obj, key) => {\n        // eslint-disable-next-line no-param-reassign\n        obj[HTML_TAG_MAP[key] || key] = childProps[key];\n        return obj;\n      }, {});\n\n      let { type } = child;\n      if (typeof type === 'symbol') {\n        type = type.toString();\n      } else {\n        this.warnOnInvalidChildren(child, nestedChildren);\n      }\n\n      switch (type) {\n        case TAG_NAMES.FRAGMENT:\n          // eslint-disable-next-line no-param-reassign\n          newProps = this.mapChildrenToProps(nestedChildren, newProps);\n          break;\n\n        case TAG_NAMES.LINK:\n        case TAG_NAMES.META:\n        case TAG_NAMES.NOSCRIPT:\n        case TAG_NAMES.SCRIPT:\n        case TAG_NAMES.STYLE:\n          arrayTypeChildren = this.flattenArrayTypeChildren({\n            child,\n            arrayTypeChildren,\n            newChildProps,\n            nestedChildren,\n          });\n          break;\n\n        default:\n          // eslint-disable-next-line no-param-reassign\n          newProps = this.mapObjectTypeChildren({\n            child,\n            newProps,\n            newChildProps,\n            nestedChildren,\n          });\n          break;\n      }\n    });\n\n    return this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n  }\n\n  render() {\n    const { children, ...props } = this.props;\n    let newProps = { ...props };\n\n    if (children) {\n      newProps = this.mapChildrenToProps(children, newProps);\n    }\n\n    return (\n      <Context.Consumer>\n        {context => <Dispatcher {...newProps} context={context} />}\n      </Context.Consumer>\n    );\n  }\n}\n", "export var TYPE;\n(function (TYPE) {\n    /**\n     * Raw text\n     */\n    TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n    /**\n     * Variable w/o any format, e.g `var` in `this is a {var}`\n     */\n    TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n    /**\n     * Variable w/ number format\n     */\n    TYPE[TYPE[\"number\"] = 2] = \"number\";\n    /**\n     * Variable w/ date format\n     */\n    TYPE[TYPE[\"date\"] = 3] = \"date\";\n    /**\n     * Variable w/ time format\n     */\n    TYPE[TYPE[\"time\"] = 4] = \"time\";\n    /**\n     * Variable w/ select format\n     */\n    TYPE[TYPE[\"select\"] = 5] = \"select\";\n    /**\n     * Variable w/ plural format\n     */\n    TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n    /**\n     * Only possible within plural argument.\n     * This is the `#` symbol that will be substituted with the count.\n     */\n    TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n})(TYPE || (TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n    return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n    return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n    return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n    return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n    return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n    return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n    return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n    return el.type === TYPE.pound;\n}\nexport function isNumberSkeleton(el) {\n    return !!(el && typeof el === 'object' && el.type === 0 /* number */);\n}\nexport function isDateTimeSkeleton(el) {\n    return !!(el && typeof el === 'object' && el.type === 1 /* dateTime */);\n}\nexport function createLiteralElement(value) {\n    return {\n        type: TYPE.literal,\n        value: value,\n    };\n}\nexport function createNumberElement(value, style) {\n    return {\n        type: TYPE.number,\n        value: value,\n        style: style,\n    };\n}\n", "// tslint:disable:only-arrow-functions\n// tslint:disable:object-literal-shorthand\n// tslint:disable:trailing-comma\n// tslint:disable:object-literal-sort-keys\n// tslint:disable:one-variable-per-declaration\n// tslint:disable:max-line-length\n// tslint:disable:no-consecutive-blank-lines\n// tslint:disable:align\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\n// Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.2.6 )\n//\n// https://pegjs.org/   https://github.com/metadevpro/ts-pegjs\nimport { TYPE, } from './types';\nvar SyntaxError = /** @class */ (function (_super) {\n    __extends(SyntaxError, _super);\n    function SyntaxError(message, expected, found, location) {\n        var _this = _super.call(this) || this;\n        _this.message = message;\n        _this.expected = expected;\n        _this.found = found;\n        _this.location = location;\n        _this.name = \"SyntaxError\";\n        if (typeof Error.captureStackTrace === \"function\") {\n            Error.captureStackTrace(_this, SyntaxError);\n        }\n        return _this;\n    }\n    SyntaxError.buildMessage = function (expected, found) {\n        function hex(ch) {\n            return ch.charCodeAt(0).toString(16).toUpperCase();\n        }\n        function literalEscape(s) {\n            return s\n                .replace(/\\\\/g, \"\\\\\\\\\")\n                .replace(/\"/g, \"\\\\\\\"\")\n                .replace(/\\0/g, \"\\\\0\")\n                .replace(/\\t/g, \"\\\\t\")\n                .replace(/\\n/g, \"\\\\n\")\n                .replace(/\\r/g, \"\\\\r\")\n                .replace(/[\\x00-\\x0F]/g, function (ch) { return \"\\\\x0\" + hex(ch); })\n                .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) { return \"\\\\x\" + hex(ch); });\n        }\n        function classEscape(s) {\n            return s\n                .replace(/\\\\/g, \"\\\\\\\\\")\n                .replace(/\\]/g, \"\\\\]\")\n                .replace(/\\^/g, \"\\\\^\")\n                .replace(/-/g, \"\\\\-\")\n                .replace(/\\0/g, \"\\\\0\")\n                .replace(/\\t/g, \"\\\\t\")\n                .replace(/\\n/g, \"\\\\n\")\n                .replace(/\\r/g, \"\\\\r\")\n                .replace(/[\\x00-\\x0F]/g, function (ch) { return \"\\\\x0\" + hex(ch); })\n                .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) { return \"\\\\x\" + hex(ch); });\n        }\n        function describeExpectation(expectation) {\n            switch (expectation.type) {\n                case \"literal\":\n                    return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n                case \"class\":\n                    var escapedParts = expectation.parts.map(function (part) {\n                        return Array.isArray(part)\n                            ? classEscape(part[0]) + \"-\" + classEscape(part[1])\n                            : classEscape(part);\n                    });\n                    return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n                case \"any\":\n                    return \"any character\";\n                case \"end\":\n                    return \"end of input\";\n                case \"other\":\n                    return expectation.description;\n            }\n        }\n        function describeExpected(expected1) {\n            var descriptions = expected1.map(describeExpectation);\n            var i;\n            var j;\n            descriptions.sort();\n            if (descriptions.length > 0) {\n                for (i = 1, j = 1; i < descriptions.length; i++) {\n                    if (descriptions[i - 1] !== descriptions[i]) {\n                        descriptions[j] = descriptions[i];\n                        j++;\n                    }\n                }\n                descriptions.length = j;\n            }\n            switch (descriptions.length) {\n                case 1:\n                    return descriptions[0];\n                case 2:\n                    return descriptions[0] + \" or \" + descriptions[1];\n                default:\n                    return descriptions.slice(0, -1).join(\", \")\n                        + \", or \"\n                        + descriptions[descriptions.length - 1];\n            }\n        }\n        function describeFound(found1) {\n            return found1 ? \"\\\"\" + literalEscape(found1) + \"\\\"\" : \"end of input\";\n        }\n        return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n    };\n    return SyntaxError;\n}(Error));\nexport { SyntaxError };\nfunction peg$parse(input, options) {\n    options = options !== undefined ? options : {};\n    var peg$FAILED = {};\n    var peg$startRuleFunctions = { start: peg$parsestart };\n    var peg$startRuleFunction = peg$parsestart;\n    var peg$c0 = function (parts) {\n        return parts.join('');\n    };\n    var peg$c1 = function (messageText) {\n        return __assign({ type: TYPE.literal, value: messageText }, insertLocation());\n    };\n    var peg$c2 = \"#\";\n    var peg$c3 = peg$literalExpectation(\"#\", false);\n    var peg$c4 = function () {\n        return __assign({ type: TYPE.pound }, insertLocation());\n    };\n    var peg$c5 = peg$otherExpectation(\"argumentElement\");\n    var peg$c6 = \"{\";\n    var peg$c7 = peg$literalExpectation(\"{\", false);\n    var peg$c8 = \"}\";\n    var peg$c9 = peg$literalExpectation(\"}\", false);\n    var peg$c10 = function (value) {\n        return __assign({ type: TYPE.argument, value: value }, insertLocation());\n    };\n    var peg$c11 = peg$otherExpectation(\"numberSkeletonId\");\n    var peg$c12 = /^['\\/{}]/;\n    var peg$c13 = peg$classExpectation([\"'\", \"/\", \"{\", \"}\"], false, false);\n    var peg$c14 = peg$anyExpectation();\n    var peg$c15 = peg$otherExpectation(\"numberSkeletonTokenOption\");\n    var peg$c16 = \"/\";\n    var peg$c17 = peg$literalExpectation(\"/\", false);\n    var peg$c18 = function (option) { return option; };\n    var peg$c19 = peg$otherExpectation(\"numberSkeletonToken\");\n    var peg$c20 = function (stem, options) {\n        return { stem: stem, options: options };\n    };\n    var peg$c21 = function (tokens) {\n        return __assign({ type: 0 /* number */, tokens: tokens }, insertLocation());\n    };\n    var peg$c22 = \"::\";\n    var peg$c23 = peg$literalExpectation(\"::\", false);\n    var peg$c24 = function (skeleton) { return skeleton; };\n    var peg$c25 = function () { messageCtx.push('numberArgStyle'); return true; };\n    var peg$c26 = function (style) {\n        messageCtx.pop();\n        return style.replace(/\\s*$/, '');\n    };\n    var peg$c27 = \",\";\n    var peg$c28 = peg$literalExpectation(\",\", false);\n    var peg$c29 = \"number\";\n    var peg$c30 = peg$literalExpectation(\"number\", false);\n    var peg$c31 = function (value, type, style) {\n        return __assign({ type: type === 'number' ? TYPE.number : type === 'date' ? TYPE.date : TYPE.time, style: style && style[2], value: value }, insertLocation());\n    };\n    var peg$c32 = \"'\";\n    var peg$c33 = peg$literalExpectation(\"'\", false);\n    var peg$c34 = /^[^']/;\n    var peg$c35 = peg$classExpectation([\"'\"], true, false);\n    var peg$c36 = /^[^a-zA-Z'{}]/;\n    var peg$c37 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"], \"'\", \"{\", \"}\"], true, false);\n    var peg$c38 = /^[a-zA-Z]/;\n    var peg$c39 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"]], false, false);\n    var peg$c40 = function (pattern) {\n        return __assign({ type: 1 /* dateTime */, pattern: pattern }, insertLocation());\n    };\n    var peg$c41 = function () { messageCtx.push('dateOrTimeArgStyle'); return true; };\n    var peg$c42 = \"date\";\n    var peg$c43 = peg$literalExpectation(\"date\", false);\n    var peg$c44 = \"time\";\n    var peg$c45 = peg$literalExpectation(\"time\", false);\n    var peg$c46 = \"plural\";\n    var peg$c47 = peg$literalExpectation(\"plural\", false);\n    var peg$c48 = \"selectordinal\";\n    var peg$c49 = peg$literalExpectation(\"selectordinal\", false);\n    var peg$c50 = \"offset:\";\n    var peg$c51 = peg$literalExpectation(\"offset:\", false);\n    var peg$c52 = function (value, pluralType, offset, options) {\n        return __assign({ type: TYPE.plural, pluralType: pluralType === 'plural' ? 'cardinal' : 'ordinal', value: value, offset: offset ? offset[2] : 0, options: options.reduce(function (all, _a) {\n                var id = _a.id, value = _a.value, optionLocation = _a.location;\n                if (id in all) {\n                    error(\"Duplicate option \\\"\" + id + \"\\\" in plural element: \\\"\" + text() + \"\\\"\", location());\n                }\n                all[id] = {\n                    value: value,\n                    location: optionLocation\n                };\n                return all;\n            }, {}) }, insertLocation());\n    };\n    var peg$c53 = \"select\";\n    var peg$c54 = peg$literalExpectation(\"select\", false);\n    var peg$c55 = function (value, options) {\n        return __assign({ type: TYPE.select, value: value, options: options.reduce(function (all, _a) {\n                var id = _a.id, value = _a.value, optionLocation = _a.location;\n                if (id in all) {\n                    error(\"Duplicate option \\\"\" + id + \"\\\" in select element: \\\"\" + text() + \"\\\"\", location());\n                }\n                all[id] = {\n                    value: value,\n                    location: optionLocation\n                };\n                return all;\n            }, {}) }, insertLocation());\n    };\n    var peg$c56 = \"=\";\n    var peg$c57 = peg$literalExpectation(\"=\", false);\n    var peg$c58 = function (id) { messageCtx.push('select'); return true; };\n    var peg$c59 = function (id, value) {\n        messageCtx.pop();\n        return __assign({ id: id,\n            value: value }, insertLocation());\n    };\n    var peg$c60 = function (id) { messageCtx.push('plural'); return true; };\n    var peg$c61 = function (id, value) {\n        messageCtx.pop();\n        return __assign({ id: id,\n            value: value }, insertLocation());\n    };\n    var peg$c62 = peg$otherExpectation(\"whitespace\");\n    var peg$c63 = /^[\\t-\\r \\x85\\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/;\n    var peg$c64 = peg$classExpectation([[\"\\t\", \"\\r\"], \" \", \"\\x85\", \"\\xA0\", \"\\u1680\", [\"\\u2000\", \"\\u200A\"], \"\\u2028\", \"\\u2029\", \"\\u202F\", \"\\u205F\", \"\\u3000\"], false, false);\n    var peg$c65 = peg$otherExpectation(\"syntax pattern\");\n    var peg$c66 = /^[!-\\/:-@[-\\^`{-~\\xA1-\\xA7\\xA9\\xAB\\xAC\\xAE\\xB0\\xB1\\xB6\\xBB\\xBF\\xD7\\xF7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]/;\n    var peg$c67 = peg$classExpectation([[\"!\", \"/\"], [\":\", \"@\"], [\"[\", \"^\"], \"`\", [\"{\", \"~\"], [\"\\xA1\", \"\\xA7\"], \"\\xA9\", \"\\xAB\", \"\\xAC\", \"\\xAE\", \"\\xB0\", \"\\xB1\", \"\\xB6\", \"\\xBB\", \"\\xBF\", \"\\xD7\", \"\\xF7\", [\"\\u2010\", \"\\u2027\"], [\"\\u2030\", \"\\u203E\"], [\"\\u2041\", \"\\u2053\"], [\"\\u2055\", \"\\u205E\"], [\"\\u2190\", \"\\u245F\"], [\"\\u2500\", \"\\u2775\"], [\"\\u2794\", \"\\u2BFF\"], [\"\\u2E00\", \"\\u2E7F\"], [\"\\u3001\", \"\\u3003\"], [\"\\u3008\", \"\\u3020\"], \"\\u3030\", \"\\uFD3E\", \"\\uFD3F\", \"\\uFE45\", \"\\uFE46\"], false, false);\n    var peg$c68 = peg$otherExpectation(\"optional whitespace\");\n    var peg$c69 = peg$otherExpectation(\"number\");\n    var peg$c70 = \"-\";\n    var peg$c71 = peg$literalExpectation(\"-\", false);\n    var peg$c72 = function (negative, num) {\n        return num\n            ? negative\n                ? -num\n                : num\n            : 0;\n    };\n    var peg$c73 = peg$otherExpectation(\"apostrophe\");\n    var peg$c74 = peg$otherExpectation(\"double apostrophes\");\n    var peg$c75 = \"''\";\n    var peg$c76 = peg$literalExpectation(\"''\", false);\n    var peg$c77 = function () { return \"'\"; };\n    var peg$c78 = function (escapedChar, quotedChars) {\n        return escapedChar + quotedChars.replace(\"''\", \"'\");\n    };\n    var peg$c79 = function (x) {\n        return (x !== '{' &&\n            !(isInPluralOption() && x === '#') &&\n            !(isNestedMessageText() && x === '}'));\n    };\n    var peg$c80 = \"\\n\";\n    var peg$c81 = peg$literalExpectation(\"\\n\", false);\n    var peg$c82 = function (x) {\n        return x === '{' || x === '}' || (isInPluralOption() && x === '#');\n    };\n    var peg$c83 = peg$otherExpectation(\"argNameOrNumber\");\n    var peg$c84 = peg$otherExpectation(\"argNumber\");\n    var peg$c85 = \"0\";\n    var peg$c86 = peg$literalExpectation(\"0\", false);\n    var peg$c87 = function () { return 0; };\n    var peg$c88 = /^[1-9]/;\n    var peg$c89 = peg$classExpectation([[\"1\", \"9\"]], false, false);\n    var peg$c90 = /^[0-9]/;\n    var peg$c91 = peg$classExpectation([[\"0\", \"9\"]], false, false);\n    var peg$c92 = function (digits) {\n        return parseInt(digits.join(''), 10);\n    };\n    var peg$c93 = peg$otherExpectation(\"argName\");\n    var peg$currPos = 0;\n    var peg$savedPos = 0;\n    var peg$posDetailsCache = [{ line: 1, column: 1 }];\n    var peg$maxFailPos = 0;\n    var peg$maxFailExpected = [];\n    var peg$silentFails = 0;\n    var peg$result;\n    if (options.startRule !== undefined) {\n        if (!(options.startRule in peg$startRuleFunctions)) {\n            throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n        }\n        peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n    }\n    function text() {\n        return input.substring(peg$savedPos, peg$currPos);\n    }\n    function location() {\n        return peg$computeLocation(peg$savedPos, peg$currPos);\n    }\n    function expected(description, location1) {\n        location1 = location1 !== undefined\n            ? location1\n            : peg$computeLocation(peg$savedPos, peg$currPos);\n        throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location1);\n    }\n    function error(message, location1) {\n        location1 = location1 !== undefined\n            ? location1\n            : peg$computeLocation(peg$savedPos, peg$currPos);\n        throw peg$buildSimpleError(message, location1);\n    }\n    function peg$literalExpectation(text1, ignoreCase) {\n        return { type: \"literal\", text: text1, ignoreCase: ignoreCase };\n    }\n    function peg$classExpectation(parts, inverted, ignoreCase) {\n        return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n    }\n    function peg$anyExpectation() {\n        return { type: \"any\" };\n    }\n    function peg$endExpectation() {\n        return { type: \"end\" };\n    }\n    function peg$otherExpectation(description) {\n        return { type: \"other\", description: description };\n    }\n    function peg$computePosDetails(pos) {\n        var details = peg$posDetailsCache[pos];\n        var p;\n        if (details) {\n            return details;\n        }\n        else {\n            p = pos - 1;\n            while (!peg$posDetailsCache[p]) {\n                p--;\n            }\n            details = peg$posDetailsCache[p];\n            details = {\n                line: details.line,\n                column: details.column\n            };\n            while (p < pos) {\n                if (input.charCodeAt(p) === 10) {\n                    details.line++;\n                    details.column = 1;\n                }\n                else {\n                    details.column++;\n                }\n                p++;\n            }\n            peg$posDetailsCache[pos] = details;\n            return details;\n        }\n    }\n    function peg$computeLocation(startPos, endPos) {\n        var startPosDetails = peg$computePosDetails(startPos);\n        var endPosDetails = peg$computePosDetails(endPos);\n        return {\n            start: {\n                offset: startPos,\n                line: startPosDetails.line,\n                column: startPosDetails.column\n            },\n            end: {\n                offset: endPos,\n                line: endPosDetails.line,\n                column: endPosDetails.column\n            }\n        };\n    }\n    function peg$fail(expected1) {\n        if (peg$currPos < peg$maxFailPos) {\n            return;\n        }\n        if (peg$currPos > peg$maxFailPos) {\n            peg$maxFailPos = peg$currPos;\n            peg$maxFailExpected = [];\n        }\n        peg$maxFailExpected.push(expected1);\n    }\n    function peg$buildSimpleError(message, location1) {\n        return new SyntaxError(message, [], \"\", location1);\n    }\n    function peg$buildStructuredError(expected1, found, location1) {\n        return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1);\n    }\n    function peg$parsestart() {\n        var s0;\n        s0 = peg$parsemessage();\n        return s0;\n    }\n    function peg$parsemessage() {\n        var s0, s1;\n        s0 = [];\n        s1 = peg$parsemessageElement();\n        while (s1 !== peg$FAILED) {\n            s0.push(s1);\n            s1 = peg$parsemessageElement();\n        }\n        return s0;\n    }\n    function peg$parsemessageElement() {\n        var s0;\n        s0 = peg$parseliteralElement();\n        if (s0 === peg$FAILED) {\n            s0 = peg$parseargumentElement();\n            if (s0 === peg$FAILED) {\n                s0 = peg$parsesimpleFormatElement();\n                if (s0 === peg$FAILED) {\n                    s0 = peg$parsepluralElement();\n                    if (s0 === peg$FAILED) {\n                        s0 = peg$parseselectElement();\n                        if (s0 === peg$FAILED) {\n                            s0 = peg$parsepoundElement();\n                        }\n                    }\n                }\n            }\n        }\n        return s0;\n    }\n    function peg$parsemessageText() {\n        var s0, s1, s2;\n        s0 = peg$currPos;\n        s1 = [];\n        s2 = peg$parsedoubleApostrophes();\n        if (s2 === peg$FAILED) {\n            s2 = peg$parsequotedString();\n            if (s2 === peg$FAILED) {\n                s2 = peg$parseunquotedString();\n            }\n        }\n        if (s2 !== peg$FAILED) {\n            while (s2 !== peg$FAILED) {\n                s1.push(s2);\n                s2 = peg$parsedoubleApostrophes();\n                if (s2 === peg$FAILED) {\n                    s2 = peg$parsequotedString();\n                    if (s2 === peg$FAILED) {\n                        s2 = peg$parseunquotedString();\n                    }\n                }\n            }\n        }\n        else {\n            s1 = peg$FAILED;\n        }\n        if (s1 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c0(s1);\n        }\n        s0 = s1;\n        return s0;\n    }\n    function peg$parseliteralElement() {\n        var s0, s1;\n        s0 = peg$currPos;\n        s1 = peg$parsemessageText();\n        if (s1 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c1(s1);\n        }\n        s0 = s1;\n        return s0;\n    }\n    function peg$parsepoundElement() {\n        var s0, s1;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 35) {\n            s1 = peg$c2;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c3);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c4();\n        }\n        s0 = s1;\n        return s0;\n    }\n    function peg$parseargumentElement() {\n        var s0, s1, s2, s3, s4, s5;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 123) {\n            s1 = peg$c6;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c7);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parse_();\n            if (s2 !== peg$FAILED) {\n                s3 = peg$parseargNameOrNumber();\n                if (s3 !== peg$FAILED) {\n                    s4 = peg$parse_();\n                    if (s4 !== peg$FAILED) {\n                        if (input.charCodeAt(peg$currPos) === 125) {\n                            s5 = peg$c8;\n                            peg$currPos++;\n                        }\n                        else {\n                            s5 = peg$FAILED;\n                            if (peg$silentFails === 0) {\n                                peg$fail(peg$c9);\n                            }\n                        }\n                        if (s5 !== peg$FAILED) {\n                            peg$savedPos = s0;\n                            s1 = peg$c10(s3);\n                            s0 = s1;\n                        }\n                        else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                        }\n                    }\n                    else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c5);\n            }\n        }\n        return s0;\n    }\n    function peg$parsenumberSkeletonId() {\n        var s0, s1, s2, s3, s4;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        s1 = [];\n        s2 = peg$currPos;\n        s3 = peg$currPos;\n        peg$silentFails++;\n        s4 = peg$parsewhiteSpace();\n        if (s4 === peg$FAILED) {\n            if (peg$c12.test(input.charAt(peg$currPos))) {\n                s4 = input.charAt(peg$currPos);\n                peg$currPos++;\n            }\n            else {\n                s4 = peg$FAILED;\n                if (peg$silentFails === 0) {\n                    peg$fail(peg$c13);\n                }\n            }\n        }\n        peg$silentFails--;\n        if (s4 === peg$FAILED) {\n            s3 = undefined;\n        }\n        else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n        }\n        if (s3 !== peg$FAILED) {\n            if (input.length > peg$currPos) {\n                s4 = input.charAt(peg$currPos);\n                peg$currPos++;\n            }\n            else {\n                s4 = peg$FAILED;\n                if (peg$silentFails === 0) {\n                    peg$fail(peg$c14);\n                }\n            }\n            if (s4 !== peg$FAILED) {\n                s3 = [s3, s4];\n                s2 = s3;\n            }\n            else {\n                peg$currPos = s2;\n                s2 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s2;\n            s2 = peg$FAILED;\n        }\n        if (s2 !== peg$FAILED) {\n            while (s2 !== peg$FAILED) {\n                s1.push(s2);\n                s2 = peg$currPos;\n                s3 = peg$currPos;\n                peg$silentFails++;\n                s4 = peg$parsewhiteSpace();\n                if (s4 === peg$FAILED) {\n                    if (peg$c12.test(input.charAt(peg$currPos))) {\n                        s4 = input.charAt(peg$currPos);\n                        peg$currPos++;\n                    }\n                    else {\n                        s4 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c13);\n                        }\n                    }\n                }\n                peg$silentFails--;\n                if (s4 === peg$FAILED) {\n                    s3 = undefined;\n                }\n                else {\n                    peg$currPos = s3;\n                    s3 = peg$FAILED;\n                }\n                if (s3 !== peg$FAILED) {\n                    if (input.length > peg$currPos) {\n                        s4 = input.charAt(peg$currPos);\n                        peg$currPos++;\n                    }\n                    else {\n                        s4 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c14);\n                        }\n                    }\n                    if (s4 !== peg$FAILED) {\n                        s3 = [s3, s4];\n                        s2 = s3;\n                    }\n                    else {\n                        peg$currPos = s2;\n                        s2 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s2;\n                    s2 = peg$FAILED;\n                }\n            }\n        }\n        else {\n            s1 = peg$FAILED;\n        }\n        if (s1 !== peg$FAILED) {\n            s0 = input.substring(s0, peg$currPos);\n        }\n        else {\n            s0 = s1;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c11);\n            }\n        }\n        return s0;\n    }\n    function peg$parsenumberSkeletonTokenOption() {\n        var s0, s1, s2;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 47) {\n            s1 = peg$c16;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c17);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parsenumberSkeletonId();\n            if (s2 !== peg$FAILED) {\n                peg$savedPos = s0;\n                s1 = peg$c18(s2);\n                s0 = s1;\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c15);\n            }\n        }\n        return s0;\n    }\n    function peg$parsenumberSkeletonToken() {\n        var s0, s1, s2, s3, s4;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        s1 = peg$parse_();\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parsenumberSkeletonId();\n            if (s2 !== peg$FAILED) {\n                s3 = [];\n                s4 = peg$parsenumberSkeletonTokenOption();\n                while (s4 !== peg$FAILED) {\n                    s3.push(s4);\n                    s4 = peg$parsenumberSkeletonTokenOption();\n                }\n                if (s3 !== peg$FAILED) {\n                    peg$savedPos = s0;\n                    s1 = peg$c20(s2, s3);\n                    s0 = s1;\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c19);\n            }\n        }\n        return s0;\n    }\n    function peg$parsenumberSkeleton() {\n        var s0, s1, s2;\n        s0 = peg$currPos;\n        s1 = [];\n        s2 = peg$parsenumberSkeletonToken();\n        if (s2 !== peg$FAILED) {\n            while (s2 !== peg$FAILED) {\n                s1.push(s2);\n                s2 = peg$parsenumberSkeletonToken();\n            }\n        }\n        else {\n            s1 = peg$FAILED;\n        }\n        if (s1 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c21(s1);\n        }\n        s0 = s1;\n        return s0;\n    }\n    function peg$parsenumberArgStyle() {\n        var s0, s1, s2;\n        s0 = peg$currPos;\n        if (input.substr(peg$currPos, 2) === peg$c22) {\n            s1 = peg$c22;\n            peg$currPos += 2;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c23);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parsenumberSkeleton();\n            if (s2 !== peg$FAILED) {\n                peg$savedPos = s0;\n                s1 = peg$c24(s2);\n                s0 = s1;\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        if (s0 === peg$FAILED) {\n            s0 = peg$currPos;\n            peg$savedPos = peg$currPos;\n            s1 = peg$c25();\n            if (s1) {\n                s1 = undefined;\n            }\n            else {\n                s1 = peg$FAILED;\n            }\n            if (s1 !== peg$FAILED) {\n                s2 = peg$parsemessageText();\n                if (s2 !== peg$FAILED) {\n                    peg$savedPos = s0;\n                    s1 = peg$c26(s2);\n                    s0 = s1;\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        return s0;\n    }\n    function peg$parsenumberFormatElement() {\n        var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 123) {\n            s1 = peg$c6;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c7);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parse_();\n            if (s2 !== peg$FAILED) {\n                s3 = peg$parseargNameOrNumber();\n                if (s3 !== peg$FAILED) {\n                    s4 = peg$parse_();\n                    if (s4 !== peg$FAILED) {\n                        if (input.charCodeAt(peg$currPos) === 44) {\n                            s5 = peg$c27;\n                            peg$currPos++;\n                        }\n                        else {\n                            s5 = peg$FAILED;\n                            if (peg$silentFails === 0) {\n                                peg$fail(peg$c28);\n                            }\n                        }\n                        if (s5 !== peg$FAILED) {\n                            s6 = peg$parse_();\n                            if (s6 !== peg$FAILED) {\n                                if (input.substr(peg$currPos, 6) === peg$c29) {\n                                    s7 = peg$c29;\n                                    peg$currPos += 6;\n                                }\n                                else {\n                                    s7 = peg$FAILED;\n                                    if (peg$silentFails === 0) {\n                                        peg$fail(peg$c30);\n                                    }\n                                }\n                                if (s7 !== peg$FAILED) {\n                                    s8 = peg$parse_();\n                                    if (s8 !== peg$FAILED) {\n                                        s9 = peg$currPos;\n                                        if (input.charCodeAt(peg$currPos) === 44) {\n                                            s10 = peg$c27;\n                                            peg$currPos++;\n                                        }\n                                        else {\n                                            s10 = peg$FAILED;\n                                            if (peg$silentFails === 0) {\n                                                peg$fail(peg$c28);\n                                            }\n                                        }\n                                        if (s10 !== peg$FAILED) {\n                                            s11 = peg$parse_();\n                                            if (s11 !== peg$FAILED) {\n                                                s12 = peg$parsenumberArgStyle();\n                                                if (s12 !== peg$FAILED) {\n                                                    s10 = [s10, s11, s12];\n                                                    s9 = s10;\n                                                }\n                                                else {\n                                                    peg$currPos = s9;\n                                                    s9 = peg$FAILED;\n                                                }\n                                            }\n                                            else {\n                                                peg$currPos = s9;\n                                                s9 = peg$FAILED;\n                                            }\n                                        }\n                                        else {\n                                            peg$currPos = s9;\n                                            s9 = peg$FAILED;\n                                        }\n                                        if (s9 === peg$FAILED) {\n                                            s9 = null;\n                                        }\n                                        if (s9 !== peg$FAILED) {\n                                            s10 = peg$parse_();\n                                            if (s10 !== peg$FAILED) {\n                                                if (input.charCodeAt(peg$currPos) === 125) {\n                                                    s11 = peg$c8;\n                                                    peg$currPos++;\n                                                }\n                                                else {\n                                                    s11 = peg$FAILED;\n                                                    if (peg$silentFails === 0) {\n                                                        peg$fail(peg$c9);\n                                                    }\n                                                }\n                                                if (s11 !== peg$FAILED) {\n                                                    peg$savedPos = s0;\n                                                    s1 = peg$c31(s3, s7, s9);\n                                                    s0 = s1;\n                                                }\n                                                else {\n                                                    peg$currPos = s0;\n                                                    s0 = peg$FAILED;\n                                                }\n                                            }\n                                            else {\n                                                peg$currPos = s0;\n                                                s0 = peg$FAILED;\n                                            }\n                                        }\n                                        else {\n                                            peg$currPos = s0;\n                                            s0 = peg$FAILED;\n                                        }\n                                    }\n                                    else {\n                                        peg$currPos = s0;\n                                        s0 = peg$FAILED;\n                                    }\n                                }\n                                else {\n                                    peg$currPos = s0;\n                                    s0 = peg$FAILED;\n                                }\n                            }\n                            else {\n                                peg$currPos = s0;\n                                s0 = peg$FAILED;\n                            }\n                        }\n                        else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                        }\n                    }\n                    else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        return s0;\n    }\n    function peg$parsedateTimeSkeletonLiteral() {\n        var s0, s1, s2, s3;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 39) {\n            s1 = peg$c32;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c33);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = [];\n            s3 = peg$parsedoubleApostrophes();\n            if (s3 === peg$FAILED) {\n                if (peg$c34.test(input.charAt(peg$currPos))) {\n                    s3 = input.charAt(peg$currPos);\n                    peg$currPos++;\n                }\n                else {\n                    s3 = peg$FAILED;\n                    if (peg$silentFails === 0) {\n                        peg$fail(peg$c35);\n                    }\n                }\n            }\n            if (s3 !== peg$FAILED) {\n                while (s3 !== peg$FAILED) {\n                    s2.push(s3);\n                    s3 = peg$parsedoubleApostrophes();\n                    if (s3 === peg$FAILED) {\n                        if (peg$c34.test(input.charAt(peg$currPos))) {\n                            s3 = input.charAt(peg$currPos);\n                            peg$currPos++;\n                        }\n                        else {\n                            s3 = peg$FAILED;\n                            if (peg$silentFails === 0) {\n                                peg$fail(peg$c35);\n                            }\n                        }\n                    }\n                }\n            }\n            else {\n                s2 = peg$FAILED;\n            }\n            if (s2 !== peg$FAILED) {\n                if (input.charCodeAt(peg$currPos) === 39) {\n                    s3 = peg$c32;\n                    peg$currPos++;\n                }\n                else {\n                    s3 = peg$FAILED;\n                    if (peg$silentFails === 0) {\n                        peg$fail(peg$c33);\n                    }\n                }\n                if (s3 !== peg$FAILED) {\n                    s1 = [s1, s2, s3];\n                    s0 = s1;\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        if (s0 === peg$FAILED) {\n            s0 = [];\n            s1 = peg$parsedoubleApostrophes();\n            if (s1 === peg$FAILED) {\n                if (peg$c36.test(input.charAt(peg$currPos))) {\n                    s1 = input.charAt(peg$currPos);\n                    peg$currPos++;\n                }\n                else {\n                    s1 = peg$FAILED;\n                    if (peg$silentFails === 0) {\n                        peg$fail(peg$c37);\n                    }\n                }\n            }\n            if (s1 !== peg$FAILED) {\n                while (s1 !== peg$FAILED) {\n                    s0.push(s1);\n                    s1 = peg$parsedoubleApostrophes();\n                    if (s1 === peg$FAILED) {\n                        if (peg$c36.test(input.charAt(peg$currPos))) {\n                            s1 = input.charAt(peg$currPos);\n                            peg$currPos++;\n                        }\n                        else {\n                            s1 = peg$FAILED;\n                            if (peg$silentFails === 0) {\n                                peg$fail(peg$c37);\n                            }\n                        }\n                    }\n                }\n            }\n            else {\n                s0 = peg$FAILED;\n            }\n        }\n        return s0;\n    }\n    function peg$parsedateTimeSkeletonPattern() {\n        var s0, s1;\n        s0 = [];\n        if (peg$c38.test(input.charAt(peg$currPos))) {\n            s1 = input.charAt(peg$currPos);\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c39);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            while (s1 !== peg$FAILED) {\n                s0.push(s1);\n                if (peg$c38.test(input.charAt(peg$currPos))) {\n                    s1 = input.charAt(peg$currPos);\n                    peg$currPos++;\n                }\n                else {\n                    s1 = peg$FAILED;\n                    if (peg$silentFails === 0) {\n                        peg$fail(peg$c39);\n                    }\n                }\n            }\n        }\n        else {\n            s0 = peg$FAILED;\n        }\n        return s0;\n    }\n    function peg$parsedateTimeSkeleton() {\n        var s0, s1, s2, s3;\n        s0 = peg$currPos;\n        s1 = peg$currPos;\n        s2 = [];\n        s3 = peg$parsedateTimeSkeletonLiteral();\n        if (s3 === peg$FAILED) {\n            s3 = peg$parsedateTimeSkeletonPattern();\n        }\n        if (s3 !== peg$FAILED) {\n            while (s3 !== peg$FAILED) {\n                s2.push(s3);\n                s3 = peg$parsedateTimeSkeletonLiteral();\n                if (s3 === peg$FAILED) {\n                    s3 = peg$parsedateTimeSkeletonPattern();\n                }\n            }\n        }\n        else {\n            s2 = peg$FAILED;\n        }\n        if (s2 !== peg$FAILED) {\n            s1 = input.substring(s1, peg$currPos);\n        }\n        else {\n            s1 = s2;\n        }\n        if (s1 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c40(s1);\n        }\n        s0 = s1;\n        return s0;\n    }\n    function peg$parsedateOrTimeArgStyle() {\n        var s0, s1, s2;\n        s0 = peg$currPos;\n        if (input.substr(peg$currPos, 2) === peg$c22) {\n            s1 = peg$c22;\n            peg$currPos += 2;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c23);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parsedateTimeSkeleton();\n            if (s2 !== peg$FAILED) {\n                peg$savedPos = s0;\n                s1 = peg$c24(s2);\n                s0 = s1;\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        if (s0 === peg$FAILED) {\n            s0 = peg$currPos;\n            peg$savedPos = peg$currPos;\n            s1 = peg$c41();\n            if (s1) {\n                s1 = undefined;\n            }\n            else {\n                s1 = peg$FAILED;\n            }\n            if (s1 !== peg$FAILED) {\n                s2 = peg$parsemessageText();\n                if (s2 !== peg$FAILED) {\n                    peg$savedPos = s0;\n                    s1 = peg$c26(s2);\n                    s0 = s1;\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        return s0;\n    }\n    function peg$parsedateOrTimeFormatElement() {\n        var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 123) {\n            s1 = peg$c6;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c7);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parse_();\n            if (s2 !== peg$FAILED) {\n                s3 = peg$parseargNameOrNumber();\n                if (s3 !== peg$FAILED) {\n                    s4 = peg$parse_();\n                    if (s4 !== peg$FAILED) {\n                        if (input.charCodeAt(peg$currPos) === 44) {\n                            s5 = peg$c27;\n                            peg$currPos++;\n                        }\n                        else {\n                            s5 = peg$FAILED;\n                            if (peg$silentFails === 0) {\n                                peg$fail(peg$c28);\n                            }\n                        }\n                        if (s5 !== peg$FAILED) {\n                            s6 = peg$parse_();\n                            if (s6 !== peg$FAILED) {\n                                if (input.substr(peg$currPos, 4) === peg$c42) {\n                                    s7 = peg$c42;\n                                    peg$currPos += 4;\n                                }\n                                else {\n                                    s7 = peg$FAILED;\n                                    if (peg$silentFails === 0) {\n                                        peg$fail(peg$c43);\n                                    }\n                                }\n                                if (s7 === peg$FAILED) {\n                                    if (input.substr(peg$currPos, 4) === peg$c44) {\n                                        s7 = peg$c44;\n                                        peg$currPos += 4;\n                                    }\n                                    else {\n                                        s7 = peg$FAILED;\n                                        if (peg$silentFails === 0) {\n                                            peg$fail(peg$c45);\n                                        }\n                                    }\n                                }\n                                if (s7 !== peg$FAILED) {\n                                    s8 = peg$parse_();\n                                    if (s8 !== peg$FAILED) {\n                                        s9 = peg$currPos;\n                                        if (input.charCodeAt(peg$currPos) === 44) {\n                                            s10 = peg$c27;\n                                            peg$currPos++;\n                                        }\n                                        else {\n                                            s10 = peg$FAILED;\n                                            if (peg$silentFails === 0) {\n                                                peg$fail(peg$c28);\n                                            }\n                                        }\n                                        if (s10 !== peg$FAILED) {\n                                            s11 = peg$parse_();\n                                            if (s11 !== peg$FAILED) {\n                                                s12 = peg$parsedateOrTimeArgStyle();\n                                                if (s12 !== peg$FAILED) {\n                                                    s10 = [s10, s11, s12];\n                                                    s9 = s10;\n                                                }\n                                                else {\n                                                    peg$currPos = s9;\n                                                    s9 = peg$FAILED;\n                                                }\n                                            }\n                                            else {\n                                                peg$currPos = s9;\n                                                s9 = peg$FAILED;\n                                            }\n                                        }\n                                        else {\n                                            peg$currPos = s9;\n                                            s9 = peg$FAILED;\n                                        }\n                                        if (s9 === peg$FAILED) {\n                                            s9 = null;\n                                        }\n                                        if (s9 !== peg$FAILED) {\n                                            s10 = peg$parse_();\n                                            if (s10 !== peg$FAILED) {\n                                                if (input.charCodeAt(peg$currPos) === 125) {\n                                                    s11 = peg$c8;\n                                                    peg$currPos++;\n                                                }\n                                                else {\n                                                    s11 = peg$FAILED;\n                                                    if (peg$silentFails === 0) {\n                                                        peg$fail(peg$c9);\n                                                    }\n                                                }\n                                                if (s11 !== peg$FAILED) {\n                                                    peg$savedPos = s0;\n                                                    s1 = peg$c31(s3, s7, s9);\n                                                    s0 = s1;\n                                                }\n                                                else {\n                                                    peg$currPos = s0;\n                                                    s0 = peg$FAILED;\n                                                }\n                                            }\n                                            else {\n                                                peg$currPos = s0;\n                                                s0 = peg$FAILED;\n                                            }\n                                        }\n                                        else {\n                                            peg$currPos = s0;\n                                            s0 = peg$FAILED;\n                                        }\n                                    }\n                                    else {\n                                        peg$currPos = s0;\n                                        s0 = peg$FAILED;\n                                    }\n                                }\n                                else {\n                                    peg$currPos = s0;\n                                    s0 = peg$FAILED;\n                                }\n                            }\n                            else {\n                                peg$currPos = s0;\n                                s0 = peg$FAILED;\n                            }\n                        }\n                        else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                        }\n                    }\n                    else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        return s0;\n    }\n    function peg$parsesimpleFormatElement() {\n        var s0;\n        s0 = peg$parsenumberFormatElement();\n        if (s0 === peg$FAILED) {\n            s0 = peg$parsedateOrTimeFormatElement();\n        }\n        return s0;\n    }\n    function peg$parsepluralElement() {\n        var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 123) {\n            s1 = peg$c6;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c7);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parse_();\n            if (s2 !== peg$FAILED) {\n                s3 = peg$parseargNameOrNumber();\n                if (s3 !== peg$FAILED) {\n                    s4 = peg$parse_();\n                    if (s4 !== peg$FAILED) {\n                        if (input.charCodeAt(peg$currPos) === 44) {\n                            s5 = peg$c27;\n                            peg$currPos++;\n                        }\n                        else {\n                            s5 = peg$FAILED;\n                            if (peg$silentFails === 0) {\n                                peg$fail(peg$c28);\n                            }\n                        }\n                        if (s5 !== peg$FAILED) {\n                            s6 = peg$parse_();\n                            if (s6 !== peg$FAILED) {\n                                if (input.substr(peg$currPos, 6) === peg$c46) {\n                                    s7 = peg$c46;\n                                    peg$currPos += 6;\n                                }\n                                else {\n                                    s7 = peg$FAILED;\n                                    if (peg$silentFails === 0) {\n                                        peg$fail(peg$c47);\n                                    }\n                                }\n                                if (s7 === peg$FAILED) {\n                                    if (input.substr(peg$currPos, 13) === peg$c48) {\n                                        s7 = peg$c48;\n                                        peg$currPos += 13;\n                                    }\n                                    else {\n                                        s7 = peg$FAILED;\n                                        if (peg$silentFails === 0) {\n                                            peg$fail(peg$c49);\n                                        }\n                                    }\n                                }\n                                if (s7 !== peg$FAILED) {\n                                    s8 = peg$parse_();\n                                    if (s8 !== peg$FAILED) {\n                                        if (input.charCodeAt(peg$currPos) === 44) {\n                                            s9 = peg$c27;\n                                            peg$currPos++;\n                                        }\n                                        else {\n                                            s9 = peg$FAILED;\n                                            if (peg$silentFails === 0) {\n                                                peg$fail(peg$c28);\n                                            }\n                                        }\n                                        if (s9 !== peg$FAILED) {\n                                            s10 = peg$parse_();\n                                            if (s10 !== peg$FAILED) {\n                                                s11 = peg$currPos;\n                                                if (input.substr(peg$currPos, 7) === peg$c50) {\n                                                    s12 = peg$c50;\n                                                    peg$currPos += 7;\n                                                }\n                                                else {\n                                                    s12 = peg$FAILED;\n                                                    if (peg$silentFails === 0) {\n                                                        peg$fail(peg$c51);\n                                                    }\n                                                }\n                                                if (s12 !== peg$FAILED) {\n                                                    s13 = peg$parse_();\n                                                    if (s13 !== peg$FAILED) {\n                                                        s14 = peg$parsenumber();\n                                                        if (s14 !== peg$FAILED) {\n                                                            s12 = [s12, s13, s14];\n                                                            s11 = s12;\n                                                        }\n                                                        else {\n                                                            peg$currPos = s11;\n                                                            s11 = peg$FAILED;\n                                                        }\n                                                    }\n                                                    else {\n                                                        peg$currPos = s11;\n                                                        s11 = peg$FAILED;\n                                                    }\n                                                }\n                                                else {\n                                                    peg$currPos = s11;\n                                                    s11 = peg$FAILED;\n                                                }\n                                                if (s11 === peg$FAILED) {\n                                                    s11 = null;\n                                                }\n                                                if (s11 !== peg$FAILED) {\n                                                    s12 = peg$parse_();\n                                                    if (s12 !== peg$FAILED) {\n                                                        s13 = [];\n                                                        s14 = peg$parsepluralOption();\n                                                        if (s14 !== peg$FAILED) {\n                                                            while (s14 !== peg$FAILED) {\n                                                                s13.push(s14);\n                                                                s14 = peg$parsepluralOption();\n                                                            }\n                                                        }\n                                                        else {\n                                                            s13 = peg$FAILED;\n                                                        }\n                                                        if (s13 !== peg$FAILED) {\n                                                            s14 = peg$parse_();\n                                                            if (s14 !== peg$FAILED) {\n                                                                if (input.charCodeAt(peg$currPos) === 125) {\n                                                                    s15 = peg$c8;\n                                                                    peg$currPos++;\n                                                                }\n                                                                else {\n                                                                    s15 = peg$FAILED;\n                                                                    if (peg$silentFails === 0) {\n                                                                        peg$fail(peg$c9);\n                                                                    }\n                                                                }\n                                                                if (s15 !== peg$FAILED) {\n                                                                    peg$savedPos = s0;\n                                                                    s1 = peg$c52(s3, s7, s11, s13);\n                                                                    s0 = s1;\n                                                                }\n                                                                else {\n                                                                    peg$currPos = s0;\n                                                                    s0 = peg$FAILED;\n                                                                }\n                                                            }\n                                                            else {\n                                                                peg$currPos = s0;\n                                                                s0 = peg$FAILED;\n                                                            }\n                                                        }\n                                                        else {\n                                                            peg$currPos = s0;\n                                                            s0 = peg$FAILED;\n                                                        }\n                                                    }\n                                                    else {\n                                                        peg$currPos = s0;\n                                                        s0 = peg$FAILED;\n                                                    }\n                                                }\n                                                else {\n                                                    peg$currPos = s0;\n                                                    s0 = peg$FAILED;\n                                                }\n                                            }\n                                            else {\n                                                peg$currPos = s0;\n                                                s0 = peg$FAILED;\n                                            }\n                                        }\n                                        else {\n                                            peg$currPos = s0;\n                                            s0 = peg$FAILED;\n                                        }\n                                    }\n                                    else {\n                                        peg$currPos = s0;\n                                        s0 = peg$FAILED;\n                                    }\n                                }\n                                else {\n                                    peg$currPos = s0;\n                                    s0 = peg$FAILED;\n                                }\n                            }\n                            else {\n                                peg$currPos = s0;\n                                s0 = peg$FAILED;\n                            }\n                        }\n                        else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                        }\n                    }\n                    else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        return s0;\n    }\n    function peg$parseselectElement() {\n        var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 123) {\n            s1 = peg$c6;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c7);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parse_();\n            if (s2 !== peg$FAILED) {\n                s3 = peg$parseargNameOrNumber();\n                if (s3 !== peg$FAILED) {\n                    s4 = peg$parse_();\n                    if (s4 !== peg$FAILED) {\n                        if (input.charCodeAt(peg$currPos) === 44) {\n                            s5 = peg$c27;\n                            peg$currPos++;\n                        }\n                        else {\n                            s5 = peg$FAILED;\n                            if (peg$silentFails === 0) {\n                                peg$fail(peg$c28);\n                            }\n                        }\n                        if (s5 !== peg$FAILED) {\n                            s6 = peg$parse_();\n                            if (s6 !== peg$FAILED) {\n                                if (input.substr(peg$currPos, 6) === peg$c53) {\n                                    s7 = peg$c53;\n                                    peg$currPos += 6;\n                                }\n                                else {\n                                    s7 = peg$FAILED;\n                                    if (peg$silentFails === 0) {\n                                        peg$fail(peg$c54);\n                                    }\n                                }\n                                if (s7 !== peg$FAILED) {\n                                    s8 = peg$parse_();\n                                    if (s8 !== peg$FAILED) {\n                                        if (input.charCodeAt(peg$currPos) === 44) {\n                                            s9 = peg$c27;\n                                            peg$currPos++;\n                                        }\n                                        else {\n                                            s9 = peg$FAILED;\n                                            if (peg$silentFails === 0) {\n                                                peg$fail(peg$c28);\n                                            }\n                                        }\n                                        if (s9 !== peg$FAILED) {\n                                            s10 = peg$parse_();\n                                            if (s10 !== peg$FAILED) {\n                                                s11 = [];\n                                                s12 = peg$parseselectOption();\n                                                if (s12 !== peg$FAILED) {\n                                                    while (s12 !== peg$FAILED) {\n                                                        s11.push(s12);\n                                                        s12 = peg$parseselectOption();\n                                                    }\n                                                }\n                                                else {\n                                                    s11 = peg$FAILED;\n                                                }\n                                                if (s11 !== peg$FAILED) {\n                                                    s12 = peg$parse_();\n                                                    if (s12 !== peg$FAILED) {\n                                                        if (input.charCodeAt(peg$currPos) === 125) {\n                                                            s13 = peg$c8;\n                                                            peg$currPos++;\n                                                        }\n                                                        else {\n                                                            s13 = peg$FAILED;\n                                                            if (peg$silentFails === 0) {\n                                                                peg$fail(peg$c9);\n                                                            }\n                                                        }\n                                                        if (s13 !== peg$FAILED) {\n                                                            peg$savedPos = s0;\n                                                            s1 = peg$c55(s3, s11);\n                                                            s0 = s1;\n                                                        }\n                                                        else {\n                                                            peg$currPos = s0;\n                                                            s0 = peg$FAILED;\n                                                        }\n                                                    }\n                                                    else {\n                                                        peg$currPos = s0;\n                                                        s0 = peg$FAILED;\n                                                    }\n                                                }\n                                                else {\n                                                    peg$currPos = s0;\n                                                    s0 = peg$FAILED;\n                                                }\n                                            }\n                                            else {\n                                                peg$currPos = s0;\n                                                s0 = peg$FAILED;\n                                            }\n                                        }\n                                        else {\n                                            peg$currPos = s0;\n                                            s0 = peg$FAILED;\n                                        }\n                                    }\n                                    else {\n                                        peg$currPos = s0;\n                                        s0 = peg$FAILED;\n                                    }\n                                }\n                                else {\n                                    peg$currPos = s0;\n                                    s0 = peg$FAILED;\n                                }\n                            }\n                            else {\n                                peg$currPos = s0;\n                                s0 = peg$FAILED;\n                            }\n                        }\n                        else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                        }\n                    }\n                    else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        return s0;\n    }\n    function peg$parsepluralRuleSelectValue() {\n        var s0, s1, s2, s3;\n        s0 = peg$currPos;\n        s1 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 61) {\n            s2 = peg$c56;\n            peg$currPos++;\n        }\n        else {\n            s2 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c57);\n            }\n        }\n        if (s2 !== peg$FAILED) {\n            s3 = peg$parsenumber();\n            if (s3 !== peg$FAILED) {\n                s2 = [s2, s3];\n                s1 = s2;\n            }\n            else {\n                peg$currPos = s1;\n                s1 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s1;\n            s1 = peg$FAILED;\n        }\n        if (s1 !== peg$FAILED) {\n            s0 = input.substring(s0, peg$currPos);\n        }\n        else {\n            s0 = s1;\n        }\n        if (s0 === peg$FAILED) {\n            s0 = peg$parseargName();\n        }\n        return s0;\n    }\n    function peg$parseselectOption() {\n        var s0, s1, s2, s3, s4, s5, s6, s7;\n        s0 = peg$currPos;\n        s1 = peg$parse_();\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parseargName();\n            if (s2 !== peg$FAILED) {\n                s3 = peg$parse_();\n                if (s3 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 123) {\n                        s4 = peg$c6;\n                        peg$currPos++;\n                    }\n                    else {\n                        s4 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c7);\n                        }\n                    }\n                    if (s4 !== peg$FAILED) {\n                        peg$savedPos = peg$currPos;\n                        s5 = peg$c58(s2);\n                        if (s5) {\n                            s5 = undefined;\n                        }\n                        else {\n                            s5 = peg$FAILED;\n                        }\n                        if (s5 !== peg$FAILED) {\n                            s6 = peg$parsemessage();\n                            if (s6 !== peg$FAILED) {\n                                if (input.charCodeAt(peg$currPos) === 125) {\n                                    s7 = peg$c8;\n                                    peg$currPos++;\n                                }\n                                else {\n                                    s7 = peg$FAILED;\n                                    if (peg$silentFails === 0) {\n                                        peg$fail(peg$c9);\n                                    }\n                                }\n                                if (s7 !== peg$FAILED) {\n                                    peg$savedPos = s0;\n                                    s1 = peg$c59(s2, s6);\n                                    s0 = s1;\n                                }\n                                else {\n                                    peg$currPos = s0;\n                                    s0 = peg$FAILED;\n                                }\n                            }\n                            else {\n                                peg$currPos = s0;\n                                s0 = peg$FAILED;\n                            }\n                        }\n                        else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                        }\n                    }\n                    else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        return s0;\n    }\n    function peg$parsepluralOption() {\n        var s0, s1, s2, s3, s4, s5, s6, s7;\n        s0 = peg$currPos;\n        s1 = peg$parse_();\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parsepluralRuleSelectValue();\n            if (s2 !== peg$FAILED) {\n                s3 = peg$parse_();\n                if (s3 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 123) {\n                        s4 = peg$c6;\n                        peg$currPos++;\n                    }\n                    else {\n                        s4 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c7);\n                        }\n                    }\n                    if (s4 !== peg$FAILED) {\n                        peg$savedPos = peg$currPos;\n                        s5 = peg$c60(s2);\n                        if (s5) {\n                            s5 = undefined;\n                        }\n                        else {\n                            s5 = peg$FAILED;\n                        }\n                        if (s5 !== peg$FAILED) {\n                            s6 = peg$parsemessage();\n                            if (s6 !== peg$FAILED) {\n                                if (input.charCodeAt(peg$currPos) === 125) {\n                                    s7 = peg$c8;\n                                    peg$currPos++;\n                                }\n                                else {\n                                    s7 = peg$FAILED;\n                                    if (peg$silentFails === 0) {\n                                        peg$fail(peg$c9);\n                                    }\n                                }\n                                if (s7 !== peg$FAILED) {\n                                    peg$savedPos = s0;\n                                    s1 = peg$c61(s2, s6);\n                                    s0 = s1;\n                                }\n                                else {\n                                    peg$currPos = s0;\n                                    s0 = peg$FAILED;\n                                }\n                            }\n                            else {\n                                peg$currPos = s0;\n                                s0 = peg$FAILED;\n                            }\n                        }\n                        else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                        }\n                    }\n                    else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        return s0;\n    }\n    function peg$parsewhiteSpace() {\n        var s0, s1;\n        peg$silentFails++;\n        if (peg$c63.test(input.charAt(peg$currPos))) {\n            s0 = input.charAt(peg$currPos);\n            peg$currPos++;\n        }\n        else {\n            s0 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c64);\n            }\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c62);\n            }\n        }\n        return s0;\n    }\n    function peg$parsepatternSyntax() {\n        var s0, s1;\n        peg$silentFails++;\n        if (peg$c66.test(input.charAt(peg$currPos))) {\n            s0 = input.charAt(peg$currPos);\n            peg$currPos++;\n        }\n        else {\n            s0 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c67);\n            }\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c65);\n            }\n        }\n        return s0;\n    }\n    function peg$parse_() {\n        var s0, s1, s2;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        s1 = [];\n        s2 = peg$parsewhiteSpace();\n        while (s2 !== peg$FAILED) {\n            s1.push(s2);\n            s2 = peg$parsewhiteSpace();\n        }\n        if (s1 !== peg$FAILED) {\n            s0 = input.substring(s0, peg$currPos);\n        }\n        else {\n            s0 = s1;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c68);\n            }\n        }\n        return s0;\n    }\n    function peg$parsenumber() {\n        var s0, s1, s2;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 45) {\n            s1 = peg$c70;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c71);\n            }\n        }\n        if (s1 === peg$FAILED) {\n            s1 = null;\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parseargNumber();\n            if (s2 !== peg$FAILED) {\n                peg$savedPos = s0;\n                s1 = peg$c72(s1, s2);\n                s0 = s1;\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c69);\n            }\n        }\n        return s0;\n    }\n    function peg$parseapostrophe() {\n        var s0, s1;\n        peg$silentFails++;\n        if (input.charCodeAt(peg$currPos) === 39) {\n            s0 = peg$c32;\n            peg$currPos++;\n        }\n        else {\n            s0 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c33);\n            }\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c73);\n            }\n        }\n        return s0;\n    }\n    function peg$parsedoubleApostrophes() {\n        var s0, s1;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        if (input.substr(peg$currPos, 2) === peg$c75) {\n            s1 = peg$c75;\n            peg$currPos += 2;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c76);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c77();\n        }\n        s0 = s1;\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c74);\n            }\n        }\n        return s0;\n    }\n    function peg$parsequotedString() {\n        var s0, s1, s2, s3, s4, s5;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 39) {\n            s1 = peg$c32;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c33);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s2 = peg$parseescapedChar();\n            if (s2 !== peg$FAILED) {\n                s3 = peg$currPos;\n                s4 = [];\n                if (input.substr(peg$currPos, 2) === peg$c75) {\n                    s5 = peg$c75;\n                    peg$currPos += 2;\n                }\n                else {\n                    s5 = peg$FAILED;\n                    if (peg$silentFails === 0) {\n                        peg$fail(peg$c76);\n                    }\n                }\n                if (s5 === peg$FAILED) {\n                    if (peg$c34.test(input.charAt(peg$currPos))) {\n                        s5 = input.charAt(peg$currPos);\n                        peg$currPos++;\n                    }\n                    else {\n                        s5 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c35);\n                        }\n                    }\n                }\n                while (s5 !== peg$FAILED) {\n                    s4.push(s5);\n                    if (input.substr(peg$currPos, 2) === peg$c75) {\n                        s5 = peg$c75;\n                        peg$currPos += 2;\n                    }\n                    else {\n                        s5 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c76);\n                        }\n                    }\n                    if (s5 === peg$FAILED) {\n                        if (peg$c34.test(input.charAt(peg$currPos))) {\n                            s5 = input.charAt(peg$currPos);\n                            peg$currPos++;\n                        }\n                        else {\n                            s5 = peg$FAILED;\n                            if (peg$silentFails === 0) {\n                                peg$fail(peg$c35);\n                            }\n                        }\n                    }\n                }\n                if (s4 !== peg$FAILED) {\n                    s3 = input.substring(s3, peg$currPos);\n                }\n                else {\n                    s3 = s4;\n                }\n                if (s3 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 39) {\n                        s4 = peg$c32;\n                        peg$currPos++;\n                    }\n                    else {\n                        s4 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c33);\n                        }\n                    }\n                    if (s4 === peg$FAILED) {\n                        s4 = null;\n                    }\n                    if (s4 !== peg$FAILED) {\n                        peg$savedPos = s0;\n                        s1 = peg$c78(s2, s3);\n                        s0 = s1;\n                    }\n                    else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n        return s0;\n    }\n    function peg$parseunquotedString() {\n        var s0, s1, s2, s3;\n        s0 = peg$currPos;\n        s1 = peg$currPos;\n        if (input.length > peg$currPos) {\n            s2 = input.charAt(peg$currPos);\n            peg$currPos++;\n        }\n        else {\n            s2 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c14);\n            }\n        }\n        if (s2 !== peg$FAILED) {\n            peg$savedPos = peg$currPos;\n            s3 = peg$c79(s2);\n            if (s3) {\n                s3 = undefined;\n            }\n            else {\n                s3 = peg$FAILED;\n            }\n            if (s3 !== peg$FAILED) {\n                s2 = [s2, s3];\n                s1 = s2;\n            }\n            else {\n                peg$currPos = s1;\n                s1 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s1;\n            s1 = peg$FAILED;\n        }\n        if (s1 === peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 10) {\n                s1 = peg$c80;\n                peg$currPos++;\n            }\n            else {\n                s1 = peg$FAILED;\n                if (peg$silentFails === 0) {\n                    peg$fail(peg$c81);\n                }\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            s0 = input.substring(s0, peg$currPos);\n        }\n        else {\n            s0 = s1;\n        }\n        return s0;\n    }\n    function peg$parseescapedChar() {\n        var s0, s1, s2, s3;\n        s0 = peg$currPos;\n        s1 = peg$currPos;\n        if (input.length > peg$currPos) {\n            s2 = input.charAt(peg$currPos);\n            peg$currPos++;\n        }\n        else {\n            s2 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c14);\n            }\n        }\n        if (s2 !== peg$FAILED) {\n            peg$savedPos = peg$currPos;\n            s3 = peg$c82(s2);\n            if (s3) {\n                s3 = undefined;\n            }\n            else {\n                s3 = peg$FAILED;\n            }\n            if (s3 !== peg$FAILED) {\n                s2 = [s2, s3];\n                s1 = s2;\n            }\n            else {\n                peg$currPos = s1;\n                s1 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s1;\n            s1 = peg$FAILED;\n        }\n        if (s1 !== peg$FAILED) {\n            s0 = input.substring(s0, peg$currPos);\n        }\n        else {\n            s0 = s1;\n        }\n        return s0;\n    }\n    function peg$parseargNameOrNumber() {\n        var s0, s1;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        s1 = peg$parseargNumber();\n        if (s1 === peg$FAILED) {\n            s1 = peg$parseargName();\n        }\n        if (s1 !== peg$FAILED) {\n            s0 = input.substring(s0, peg$currPos);\n        }\n        else {\n            s0 = s1;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c83);\n            }\n        }\n        return s0;\n    }\n    function peg$parseargNumber() {\n        var s0, s1, s2, s3, s4;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 48) {\n            s1 = peg$c85;\n            peg$currPos++;\n        }\n        else {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c86);\n            }\n        }\n        if (s1 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c87();\n        }\n        s0 = s1;\n        if (s0 === peg$FAILED) {\n            s0 = peg$currPos;\n            s1 = peg$currPos;\n            if (peg$c88.test(input.charAt(peg$currPos))) {\n                s2 = input.charAt(peg$currPos);\n                peg$currPos++;\n            }\n            else {\n                s2 = peg$FAILED;\n                if (peg$silentFails === 0) {\n                    peg$fail(peg$c89);\n                }\n            }\n            if (s2 !== peg$FAILED) {\n                s3 = [];\n                if (peg$c90.test(input.charAt(peg$currPos))) {\n                    s4 = input.charAt(peg$currPos);\n                    peg$currPos++;\n                }\n                else {\n                    s4 = peg$FAILED;\n                    if (peg$silentFails === 0) {\n                        peg$fail(peg$c91);\n                    }\n                }\n                while (s4 !== peg$FAILED) {\n                    s3.push(s4);\n                    if (peg$c90.test(input.charAt(peg$currPos))) {\n                        s4 = input.charAt(peg$currPos);\n                        peg$currPos++;\n                    }\n                    else {\n                        s4 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c91);\n                        }\n                    }\n                }\n                if (s3 !== peg$FAILED) {\n                    s2 = [s2, s3];\n                    s1 = s2;\n                }\n                else {\n                    peg$currPos = s1;\n                    s1 = peg$FAILED;\n                }\n            }\n            else {\n                peg$currPos = s1;\n                s1 = peg$FAILED;\n            }\n            if (s1 !== peg$FAILED) {\n                peg$savedPos = s0;\n                s1 = peg$c92(s1);\n            }\n            s0 = s1;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c84);\n            }\n        }\n        return s0;\n    }\n    function peg$parseargName() {\n        var s0, s1, s2, s3, s4;\n        peg$silentFails++;\n        s0 = peg$currPos;\n        s1 = [];\n        s2 = peg$currPos;\n        s3 = peg$currPos;\n        peg$silentFails++;\n        s4 = peg$parsewhiteSpace();\n        if (s4 === peg$FAILED) {\n            s4 = peg$parsepatternSyntax();\n        }\n        peg$silentFails--;\n        if (s4 === peg$FAILED) {\n            s3 = undefined;\n        }\n        else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n        }\n        if (s3 !== peg$FAILED) {\n            if (input.length > peg$currPos) {\n                s4 = input.charAt(peg$currPos);\n                peg$currPos++;\n            }\n            else {\n                s4 = peg$FAILED;\n                if (peg$silentFails === 0) {\n                    peg$fail(peg$c14);\n                }\n            }\n            if (s4 !== peg$FAILED) {\n                s3 = [s3, s4];\n                s2 = s3;\n            }\n            else {\n                peg$currPos = s2;\n                s2 = peg$FAILED;\n            }\n        }\n        else {\n            peg$currPos = s2;\n            s2 = peg$FAILED;\n        }\n        if (s2 !== peg$FAILED) {\n            while (s2 !== peg$FAILED) {\n                s1.push(s2);\n                s2 = peg$currPos;\n                s3 = peg$currPos;\n                peg$silentFails++;\n                s4 = peg$parsewhiteSpace();\n                if (s4 === peg$FAILED) {\n                    s4 = peg$parsepatternSyntax();\n                }\n                peg$silentFails--;\n                if (s4 === peg$FAILED) {\n                    s3 = undefined;\n                }\n                else {\n                    peg$currPos = s3;\n                    s3 = peg$FAILED;\n                }\n                if (s3 !== peg$FAILED) {\n                    if (input.length > peg$currPos) {\n                        s4 = input.charAt(peg$currPos);\n                        peg$currPos++;\n                    }\n                    else {\n                        s4 = peg$FAILED;\n                        if (peg$silentFails === 0) {\n                            peg$fail(peg$c14);\n                        }\n                    }\n                    if (s4 !== peg$FAILED) {\n                        s3 = [s3, s4];\n                        s2 = s3;\n                    }\n                    else {\n                        peg$currPos = s2;\n                        s2 = peg$FAILED;\n                    }\n                }\n                else {\n                    peg$currPos = s2;\n                    s2 = peg$FAILED;\n                }\n            }\n        }\n        else {\n            s1 = peg$FAILED;\n        }\n        if (s1 !== peg$FAILED) {\n            s0 = input.substring(s0, peg$currPos);\n        }\n        else {\n            s0 = s1;\n        }\n        peg$silentFails--;\n        if (s0 === peg$FAILED) {\n            s1 = peg$FAILED;\n            if (peg$silentFails === 0) {\n                peg$fail(peg$c93);\n            }\n        }\n        return s0;\n    }\n    var messageCtx = ['root'];\n    function isNestedMessageText() {\n        return messageCtx.length > 1;\n    }\n    function isInPluralOption() {\n        return messageCtx[messageCtx.length - 1] === 'plural';\n    }\n    function insertLocation() {\n        return options && options.captureLocation ? {\n            location: location()\n        } : {};\n    }\n    peg$result = peg$startRuleFunction();\n    if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n        return peg$result;\n    }\n    else {\n        if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n            peg$fail(peg$endExpectation());\n        }\n        throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length\n            ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n            : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));\n    }\n}\nexport var pegParse = peg$parse;\n", "var __spreadArrays = (this && this.__spreadArrays) || function () {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n};\nimport { isPluralElement, isLiteralElement, isSelectElement, } from './types';\nimport { pegParse } from './parser';\nvar PLURAL_HASHTAG_REGEX = /(^|[^\\\\])#/g;\n/**\n * Whether to convert `#` in plural rule options\n * to `{var, number}`\n * @param el AST Element\n * @param pluralStack current plural stack\n */\nexport function normalizeHashtagInPlural(els) {\n    els.forEach(function (el) {\n        // If we're encountering a plural el\n        if (!isPluralElement(el) && !isSelectElement(el)) {\n            return;\n        }\n        // Go down the options and search for # in any literal element\n        Object.keys(el.options).forEach(function (id) {\n            var _a;\n            var opt = el.options[id];\n            // If we got a match, we have to split this\n            // and inject a NumberElement in the middle\n            var matchingLiteralElIndex = -1;\n            var literalEl = undefined;\n            for (var i = 0; i < opt.value.length; i++) {\n                var el_1 = opt.value[i];\n                if (isLiteralElement(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) {\n                    matchingLiteralElIndex = i;\n                    literalEl = el_1;\n                    break;\n                }\n            }\n            if (literalEl) {\n                var newValue = literalEl.value.replace(PLURAL_HASHTAG_REGEX, \"$1{\" + el.value + \", number}\");\n                var newEls = pegParse(newValue);\n                (_a = opt.value).splice.apply(_a, __spreadArrays([matchingLiteralElIndex, 1], newEls));\n            }\n            normalizeHashtagInPlural(opt.value);\n        });\n    });\n}\n", "var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\n/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n    var result = {};\n    skeleton.replace(DATE_TIME_REGEX, function (match) {\n        var len = match.length;\n        switch (match[0]) {\n            // Era\n            case 'G':\n                result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n                break;\n            // Year\n            case 'y':\n                result.year = len === 2 ? '2-digit' : 'numeric';\n                break;\n            case 'Y':\n            case 'u':\n            case 'U':\n            case 'r':\n                throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n            // Quarter\n            case 'q':\n            case 'Q':\n                throw new RangeError('`q/Q` (quarter) patterns are not supported');\n            // Month\n            case 'M':\n            case 'L':\n                result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n                break;\n            // Week\n            case 'w':\n            case 'W':\n                throw new RangeError('`w/W` (week) patterns are not supported');\n            case 'd':\n                result.day = ['numeric', '2-digit'][len - 1];\n                break;\n            case 'D':\n            case 'F':\n            case 'g':\n                throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n            // Weekday\n            case 'E':\n                result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';\n                break;\n            case 'e':\n                if (len < 4) {\n                    throw new RangeError('`e..eee` (weekday) patterns are not supported');\n                }\n                result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n                break;\n            case 'c':\n                if (len < 4) {\n                    throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n                }\n                result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n                break;\n            // Period\n            case 'a': // AM, PM\n                result.hour12 = true;\n                break;\n            case 'b': // am, pm, noon, midnight\n            case 'B': // flexible day periods\n                throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n            // Hour\n            case 'h':\n                result.hourCycle = 'h12';\n                result.hour = ['numeric', '2-digit'][len - 1];\n                break;\n            case 'H':\n                result.hourCycle = 'h23';\n                result.hour = ['numeric', '2-digit'][len - 1];\n                break;\n            case 'K':\n                result.hourCycle = 'h11';\n                result.hour = ['numeric', '2-digit'][len - 1];\n                break;\n            case 'k':\n                result.hourCycle = 'h24';\n                result.hour = ['numeric', '2-digit'][len - 1];\n                break;\n            case 'j':\n            case 'J':\n            case 'C':\n                throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n            // Minute\n            case 'm':\n                result.minute = ['numeric', '2-digit'][len - 1];\n                break;\n            // Second\n            case 's':\n                result.second = ['numeric', '2-digit'][len - 1];\n                break;\n            case 'S':\n            case 'A':\n                throw new RangeError('`S/A` (second) pattenrs are not supported, use `s` instead');\n            // Zone\n            case 'z': // 1..3, 4: specific non-location format\n                result.timeZoneName = len < 4 ? 'short' : 'long';\n                break;\n            case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n            case 'O': // 1, 4: miliseconds in day short, long\n            case 'v': // 1, 4: generic non-location format\n            case 'V': // 1, 2, 3, 4: time zone ID or city\n            case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n            case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n                throw new RangeError('`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead');\n        }\n        return '';\n    });\n    return result;\n}\nfunction icuUnitToEcma(unit) {\n    return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\+|#+)?)?$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?$/g;\nfunction parseSignificantPrecision(str) {\n    var result = {};\n    str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n        // @@@ case\n        if (typeof g2 !== 'string') {\n            result.minimumSignificantDigits = g1.length;\n            result.maximumSignificantDigits = g1.length;\n        }\n        // @@@+ case\n        else if (g2 === '+') {\n            result.minimumSignificantDigits = g1.length;\n        }\n        // .### case\n        else if (g1[0] === '#') {\n            result.maximumSignificantDigits = g1.length;\n        }\n        // .@@## or .@@@ case\n        else {\n            result.minimumSignificantDigits = g1.length;\n            result.maximumSignificantDigits =\n                g1.length + (typeof g2 === 'string' ? g2.length : 0);\n        }\n        return '';\n    });\n    return result;\n}\nfunction parseSign(str) {\n    switch (str) {\n        case 'sign-auto':\n            return {\n                signDisplay: 'auto',\n            };\n        case 'sign-accounting':\n            return {\n                currencySign: 'accounting',\n            };\n        case 'sign-always':\n            return {\n                signDisplay: 'always',\n            };\n        case 'sign-accounting-always':\n            return {\n                signDisplay: 'always',\n                currencySign: 'accounting',\n            };\n        case 'sign-except-zero':\n            return {\n                signDisplay: 'exceptZero',\n            };\n        case 'sign-accounting-except-zero':\n            return {\n                signDisplay: 'exceptZero',\n                currencySign: 'accounting',\n            };\n        case 'sign-never':\n            return {\n                signDisplay: 'never',\n            };\n    }\n}\nfunction parseNotationOptions(opt) {\n    var result = {};\n    var signOpts = parseSign(opt);\n    if (signOpts) {\n        return signOpts;\n    }\n    return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function convertNumberSkeletonToNumberFormatOptions(tokens) {\n    var result = {};\n    for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n        var token = tokens_1[_i];\n        switch (token.stem) {\n            case 'percent':\n                result.style = 'percent';\n                continue;\n            case 'currency':\n                result.style = 'currency';\n                result.currency = token.options[0];\n                continue;\n            case 'group-off':\n                result.useGrouping = false;\n                continue;\n            case 'precision-integer':\n                result.maximumFractionDigits = 0;\n                continue;\n            case 'measure-unit':\n                result.style = 'unit';\n                result.unit = icuUnitToEcma(token.options[0]);\n                continue;\n            case 'compact-short':\n                result.notation = 'compact';\n                result.compactDisplay = 'short';\n                continue;\n            case 'compact-long':\n                result.notation = 'compact';\n                result.compactDisplay = 'long';\n                continue;\n            case 'scientific':\n                result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n                continue;\n            case 'engineering':\n                result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n                continue;\n            case 'notation-simple':\n                result.notation = 'standard';\n                continue;\n            // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n            case 'unit-width-narrow':\n                result.currencyDisplay = 'narrowSymbol';\n                result.unitDisplay = 'narrow';\n                continue;\n            case 'unit-width-short':\n                result.currencyDisplay = 'code';\n                result.unitDisplay = 'short';\n                continue;\n            case 'unit-width-full-name':\n                result.currencyDisplay = 'name';\n                result.unitDisplay = 'long';\n                continue;\n            case 'unit-width-iso-code':\n                result.currencyDisplay = 'symbol';\n                continue;\n        }\n        // Precision\n        // https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#fraction-precision\n        if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n            if (token.options.length > 1) {\n                throw new RangeError('Fraction-precision stems only accept a single optional option');\n            }\n            token.stem.replace(FRACTION_PRECISION_REGEX, function (match, g1, g2) {\n                // precision-integer case\n                if (match === '.') {\n                    result.maximumFractionDigits = 0;\n                }\n                // .000+ case\n                else if (g2 === '+') {\n                    result.minimumFractionDigits = g2.length;\n                }\n                // .### case\n                else if (g1[0] === '#') {\n                    result.maximumFractionDigits = g1.length;\n                }\n                // .00## or .000 case\n                else {\n                    result.minimumFractionDigits = g1.length;\n                    result.maximumFractionDigits =\n                        g1.length + (typeof g2 === 'string' ? g2.length : 0);\n                }\n                return '';\n            });\n            if (token.options.length) {\n                result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));\n            }\n            continue;\n        }\n        if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n            result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n            continue;\n        }\n        var signOpts = parseSign(token.stem);\n        if (signOpts) {\n            result = __assign(__assign({}, result), signOpts);\n        }\n    }\n    return result;\n}\n", "import { pegParse } from './parser';\nimport { normalizeHashtagInPlural } from './normalize';\nexport * from './types';\nexport * from './parser';\nexport * from './skeleton';\nexport function parse(input, opts) {\n    var els = pegParse(input, opts);\n    if (!opts || opts.normalizeHashtagInPlural !== false) {\n        normalizeHashtagInPlural(els);\n    }\n    return els;\n}\n", "/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n};\n// -- Utilities ----------------------------------------------------------------\nfunction getCacheId(inputs) {\n    return JSON.stringify(inputs.map(function (input) {\n        return input && typeof input === 'object' ? orderedProps(input) : input;\n    }));\n}\nfunction orderedProps(obj) {\n    return Object.keys(obj)\n        .sort()\n        .map(function (k) {\n        var _a;\n        return (_a = {}, _a[k] = obj[k], _a);\n    });\n}\nvar memoizeFormatConstructor = function (FormatConstructor, cache) {\n    if (cache === void 0) { cache = {}; }\n    return function () {\n        var _a;\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        var cacheId = getCacheId(args);\n        var format = cacheId && cache[cacheId];\n        if (!format) {\n            format = new ((_a = FormatConstructor).bind.apply(_a, __spreadArrays([void 0], args)))();\n            if (cacheId) {\n                cache[cacheId] = format;\n            }\n        }\n        return format;\n    };\n};\nexport default memoizeFormatConstructor;\n", "var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n};\nimport { convertNumberSkeletonToNumberFormatOptions, isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTimeElement, parseDateTimeSkeleton, } from 'intl-messageformat-parser';\nvar FormatError = /** @class */ (function (_super) {\n    __extends(FormatError, _super);\n    function FormatError(msg, variableId) {\n        var _this = _super.call(this, msg) || this;\n        _this.variableId = variableId;\n        return _this;\n    }\n    return FormatError;\n}(Error));\nfunction mergeLiteral(parts) {\n    if (parts.length < 2) {\n        return parts;\n    }\n    return parts.reduce(function (all, part) {\n        var lastPart = all[all.length - 1];\n        if (!lastPart ||\n            lastPart.type !== 0 /* literal */ ||\n            part.type !== 0 /* literal */) {\n            all.push(part);\n        }\n        else {\n            lastPart.value += part.value;\n        }\n        return all;\n    }, []);\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n    // Hot path for straight simple msg translations\n    if (els.length === 1 && isLiteralElement(els[0])) {\n        return [\n            {\n                type: 0 /* literal */,\n                value: els[0].value,\n            },\n        ];\n    }\n    var result = [];\n    for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n        var el = els_1[_i];\n        // Exit early for string parts.\n        if (isLiteralElement(el)) {\n            result.push({\n                type: 0 /* literal */,\n                value: el.value,\n            });\n            continue;\n        }\n        // TODO: should this part be literal type?\n        // Replace `#` in plural rules with the actual numeric value.\n        if (isPoundElement(el)) {\n            if (typeof currentPluralValue === 'number') {\n                result.push({\n                    type: 0 /* literal */,\n                    value: formatters.getNumberFormat(locales).format(currentPluralValue),\n                });\n            }\n            continue;\n        }\n        var varName = el.value;\n        // Enforce that all required values are provided by the caller.\n        if (!(values && varName in values)) {\n            throw new FormatError(\"The intl string context variable \\\"\" + varName + \"\\\" was not provided to the string \\\"\" + originalMessage + \"\\\"\");\n        }\n        var value = values[varName];\n        if (isArgumentElement(el)) {\n            if (!value || typeof value === 'string' || typeof value === 'number') {\n                value =\n                    typeof value === 'string' || typeof value === 'number'\n                        ? String(value)\n                        : '';\n            }\n            result.push({\n                type: 1 /* argument */,\n                value: value,\n            });\n            continue;\n        }\n        // Recursively format plural and select parts' option \u2014 which can be a\n        // nested pattern structure. The choosing of the option to use is\n        // abstracted-by and delegated-to the part helper object.\n        if (isDateElement(el)) {\n            var style = typeof el.style === 'string' ? formats.date[el.style] : undefined;\n            result.push({\n                type: 0 /* literal */,\n                value: formatters\n                    .getDateTimeFormat(locales, style)\n                    .format(value),\n            });\n            continue;\n        }\n        if (isTimeElement(el)) {\n            var style = typeof el.style === 'string'\n                ? formats.time[el.style]\n                : isDateTimeSkeleton(el.style)\n                    ? parseDateTimeSkeleton(el.style.pattern)\n                    : undefined;\n            result.push({\n                type: 0 /* literal */,\n                value: formatters\n                    .getDateTimeFormat(locales, style)\n                    .format(value),\n            });\n            continue;\n        }\n        if (isNumberElement(el)) {\n            var style = typeof el.style === 'string'\n                ? formats.number[el.style]\n                : isNumberSkeleton(el.style)\n                    ? convertNumberSkeletonToNumberFormatOptions(el.style.tokens)\n                    : undefined;\n            result.push({\n                type: 0 /* literal */,\n                value: formatters\n                    .getNumberFormat(locales, style)\n                    .format(value),\n            });\n            continue;\n        }\n        if (isSelectElement(el)) {\n            var opt = el.options[value] || el.options.other;\n            if (!opt) {\n                throw new RangeError(\"Invalid values for \\\"\" + el.value + \"\\\": \\\"\" + value + \"\\\". Options are \\\"\" + Object.keys(el.options).join('\", \"') + \"\\\"\");\n            }\n            result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n            continue;\n        }\n        if (isPluralElement(el)) {\n            var opt = el.options[\"=\" + value];\n            if (!opt) {\n                if (!Intl.PluralRules) {\n                    throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\");\n                }\n                var rule = formatters\n                    .getPluralRules(locales, { type: el.pluralType })\n                    .select(value - (el.offset || 0));\n                opt = el.options[rule] || el.options.other;\n            }\n            if (!opt) {\n                throw new RangeError(\"Invalid values for \\\"\" + el.value + \"\\\": \\\"\" + value + \"\\\". Options are \\\"\" + Object.keys(el.options).join('\", \"') + \"\\\"\");\n            }\n            result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n            continue;\n        }\n    }\n    return mergeLiteral(result);\n}\nexport function formatToString(els, locales, formatters, formats, values, \n// For debugging\noriginalMessage) {\n    var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);\n    // Hot path for straight simple msg translations\n    if (parts.length === 1) {\n        return parts[0].value;\n    }\n    return parts.reduce(function (all, part) { return (all += part.value); }, '');\n}\n// Singleton\nvar domParser;\nvar TOKEN_DELIMITER = '@@';\nvar TOKEN_REGEX = /@@(\\d+_\\d+)@@/g;\nvar counter = 0;\nfunction generateId() {\n    return Date.now() + \"_\" + ++counter;\n}\nfunction restoreRichPlaceholderMessage(text, objectParts) {\n    return text\n        .split(TOKEN_REGEX)\n        .filter(Boolean)\n        .map(function (c) { return (objectParts[c] != null ? objectParts[c] : c); })\n        .reduce(function (all, c) {\n        if (!all.length) {\n            all.push(c);\n        }\n        else if (typeof c === 'string' &&\n            typeof all[all.length - 1] === 'string') {\n            all[all.length - 1] += c;\n        }\n        else {\n            all.push(c);\n        }\n        return all;\n    }, []);\n}\n/**\n * Not exhaustive, just for sanity check\n */\nvar SIMPLE_XML_REGEX = /(<([0-9a-zA-Z-_]*?)>(.*?)<\\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\\/>)/;\nvar TEMPLATE_ID = Date.now() + '@@';\nvar VOID_ELEMENTS = [\n    'area',\n    'base',\n    'br',\n    'col',\n    'embed',\n    'hr',\n    'img',\n    'input',\n    'link',\n    'meta',\n    'param',\n    'source',\n    'track',\n    'wbr',\n];\nfunction formatHTMLElement(el, objectParts, values) {\n    var tagName = el.tagName;\n    var outerHTML = el.outerHTML, textContent = el.textContent, childNodes = el.childNodes;\n    // Regular text\n    if (!tagName) {\n        return restoreRichPlaceholderMessage(textContent || '', objectParts);\n    }\n    tagName = tagName.toLowerCase();\n    var isVoidElement = ~VOID_ELEMENTS.indexOf(tagName);\n    var formatFnOrValue = values[tagName];\n    if (formatFnOrValue && isVoidElement) {\n        throw new FormatError(tagName + \" is a self-closing tag and can not be used, please use another tag name.\");\n    }\n    if (!childNodes.length) {\n        return [outerHTML];\n    }\n    var chunks = Array.prototype.slice.call(childNodes).reduce(function (all, child) {\n        return all.concat(formatHTMLElement(child, objectParts, values));\n    }, []);\n    // Legacy HTML\n    if (!formatFnOrValue) {\n        return __spreadArrays([\"<\" + tagName + \">\"], chunks, [\"</\" + tagName + \">\"]);\n    }\n    // HTML Tag replacement\n    if (typeof formatFnOrValue === 'function') {\n        return [formatFnOrValue.apply(void 0, chunks)];\n    }\n    return [formatFnOrValue];\n}\nexport function formatHTMLMessage(els, locales, formatters, formats, values, \n// For debugging\noriginalMessage) {\n    var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);\n    var objectParts = {};\n    var formattedMessage = parts.reduce(function (all, part) {\n        if (part.type === 0 /* literal */) {\n            return (all += part.value);\n        }\n        var id = generateId();\n        objectParts[id] = part.value;\n        return (all += \"\" + TOKEN_DELIMITER + id + TOKEN_DELIMITER);\n    }, '');\n    // Not designed to filter out aggressively\n    if (!SIMPLE_XML_REGEX.test(formattedMessage)) {\n        return restoreRichPlaceholderMessage(formattedMessage, objectParts);\n    }\n    if (!values) {\n        throw new FormatError('Message has placeholders but no values was given');\n    }\n    if (typeof DOMParser === 'undefined') {\n        throw new FormatError('Cannot format XML message without DOMParser');\n    }\n    if (!domParser) {\n        domParser = new DOMParser();\n    }\n    var content = domParser\n        .parseFromString(\"<formatted-message id=\\\"\" + TEMPLATE_ID + \"\\\">\" + formattedMessage + \"</formatted-message>\", 'text/html')\n        .getElementById(TEMPLATE_ID);\n    if (!content) {\n        throw new FormatError(\"Malformed HTML message \" + formattedMessage);\n    }\n    var tagsToFormat = Object.keys(values).filter(function (varName) { return !!content.getElementsByTagName(varName).length; });\n    // No tags to format\n    if (!tagsToFormat.length) {\n        return restoreRichPlaceholderMessage(formattedMessage, objectParts);\n    }\n    var caseSensitiveTags = tagsToFormat.filter(function (tagName) { return tagName !== tagName.toLowerCase(); });\n    if (caseSensitiveTags.length) {\n        throw new FormatError(\"HTML tag must be lowercased but the following tags are not: \" + caseSensitiveTags.join(', '));\n    }\n    // We're doing this since top node is `<formatted-message/>` which does not have a formatter\n    return Array.prototype.slice\n        .call(content.childNodes)\n        .reduce(function (all, child) { return all.concat(formatHTMLElement(child, objectParts, values)); }, []);\n}\n", "/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport { parse } from 'intl-messageformat-parser';\nimport memoizeIntlConstructor from 'intl-format-cache';\nimport { formatToString, formatToParts, formatHTMLMessage, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n    if (!c2) {\n        return c1;\n    }\n    return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n        all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n        return all;\n    }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n    if (!configs) {\n        return defaultConfig;\n    }\n    return Object.keys(defaultConfig).reduce(function (all, k) {\n        all[k] = mergeConfig(defaultConfig[k], configs[k]);\n        return all;\n    }, __assign({}, defaultConfig));\n}\nexport function createDefaultFormatters(cache) {\n    if (cache === void 0) { cache = {\n        number: {},\n        dateTime: {},\n        pluralRules: {},\n    }; }\n    return {\n        getNumberFormat: memoizeIntlConstructor(Intl.NumberFormat, cache.number),\n        getDateTimeFormat: memoizeIntlConstructor(Intl.DateTimeFormat, cache.dateTime),\n        getPluralRules: memoizeIntlConstructor(Intl.PluralRules, cache.pluralRules),\n    };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n    function IntlMessageFormat(message, locales, overrideFormats, opts) {\n        var _this = this;\n        if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n        this.formatterCache = {\n            number: {},\n            dateTime: {},\n            pluralRules: {},\n        };\n        this.format = function (values) {\n            return formatToString(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);\n        };\n        this.formatToParts = function (values) {\n            return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n        };\n        this.formatHTMLMessage = function (values) {\n            return formatHTMLMessage(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);\n        };\n        this.resolvedOptions = function () { return ({\n            locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n        }); };\n        this.getAst = function () { return _this.ast; };\n        if (typeof message === 'string') {\n            this.message = message;\n            if (!IntlMessageFormat.__parse) {\n                throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n            }\n            // Parse string messages into an AST.\n            this.ast = IntlMessageFormat.__parse(message, {\n                normalizeHashtagInPlural: false,\n            });\n        }\n        else {\n            this.ast = message;\n        }\n        if (!Array.isArray(this.ast)) {\n            throw new TypeError('A message must be provided as a String or AST.');\n        }\n        // Creates a new object with the specified `formats` merged with the default\n        // formats.\n        this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n        // Defined first because it's used to build the format pattern.\n        this.locales = locales;\n        this.formatters =\n            (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n    }\n    IntlMessageFormat.defaultLocale = new Intl.NumberFormat().resolvedOptions().locale;\n    IntlMessageFormat.__parse = parse;\n    // Default format options used as the prototype of the `formats` provided to the\n    // constructor. These are used when constructing the internal Intl.NumberFormat\n    // and Intl.DateTimeFormat instances.\n    IntlMessageFormat.formats = {\n        number: {\n            currency: {\n                style: 'currency',\n            },\n            percent: {\n                style: 'percent',\n            },\n        },\n        date: {\n            short: {\n                month: 'numeric',\n                day: 'numeric',\n                year: '2-digit',\n            },\n            medium: {\n                month: 'short',\n                day: 'numeric',\n                year: 'numeric',\n            },\n            long: {\n                month: 'long',\n                day: 'numeric',\n                year: 'numeric',\n            },\n            full: {\n                weekday: 'long',\n                month: 'long',\n                day: 'numeric',\n                year: 'numeric',\n            },\n        },\n        time: {\n            short: {\n                hour: 'numeric',\n                minute: 'numeric',\n            },\n            medium: {\n                hour: 'numeric',\n                minute: 'numeric',\n                second: 'numeric',\n            },\n            long: {\n                hour: 'numeric',\n                minute: 'numeric',\n                second: 'numeric',\n                timeZoneName: 'short',\n            },\n            full: {\n                hour: 'numeric',\n                minute: 'numeric',\n                second: 'numeric',\n                timeZoneName: 'short',\n            },\n        },\n    };\n    return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\nexport default IntlMessageFormat;\n", "/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport IntlMessageFormat from './core';\nexport * from './formatters';\nexport * from './core';\nexport default IntlMessageFormat;\n", null, null, null, null, "/*\nHTML escaping is the same as React's\n(on purpose.) Therefore, it has the following Copyright and Licensing:\n\nCopyright 2013-2014, Facebook, Inc.\nAll rights reserved.\n\nThis source code is licensed under the BSD-style license found in the LICENSE\nfile in the root directory of React's source tree.\n*/\nimport * as React from 'react';\nimport IntlMessageFormat from 'intl-messageformat';\nimport memoizeIntlConstructor from 'intl-format-cache';\nimport { invariant } from '@formatjs/intl-utils';\nconst ESCAPED_CHARS = {\n    38: '&amp;',\n    62: '&gt;',\n    60: '&lt;',\n    34: '&quot;',\n    39: '&#x27;',\n};\nconst UNSAFE_CHARS_REGEX = /[&><\"']/g;\nexport function escape(str) {\n    return ('' + str).replace(UNSAFE_CHARS_REGEX, match => ESCAPED_CHARS[match.charCodeAt(0)]);\n}\nexport function filterProps(props, whitelist, defaults = {}) {\n    return whitelist.reduce((filtered, name) => {\n        if (name in props) {\n            filtered[name] = props[name];\n        }\n        else if (name in defaults) {\n            filtered[name] = defaults[name];\n        }\n        return filtered;\n    }, {});\n}\nexport function invariantIntlContext(intl) {\n    invariant(intl, '[React Intl] Could not find required `intl` object. ' +\n        '<IntlProvider> needs to exist in the component ancestry.');\n}\nexport function createError(message, exception) {\n    const eMsg = exception ? `\\n${exception.stack}` : '';\n    return `[React Intl] ${message}${eMsg}`;\n}\nexport function defaultErrorHandler(error) {\n    if (process.env.NODE_ENV !== 'production') {\n        console.error(error);\n    }\n}\nexport const DEFAULT_INTL_CONFIG = {\n    formats: {},\n    messages: {},\n    timeZone: undefined,\n    textComponent: React.Fragment,\n    defaultLocale: 'en',\n    defaultFormats: {},\n    onError: defaultErrorHandler,\n};\nexport function createIntlCache() {\n    return {\n        dateTime: {},\n        number: {},\n        message: {},\n        relativeTime: {},\n        pluralRules: {},\n        list: {},\n        displayNames: {},\n    };\n}\n/**\n * Create intl formatters and populate cache\n * @param cache explicit cache to prevent leaking memory\n */\nexport function createFormatters(cache = createIntlCache()) {\n    const RelativeTimeFormat = Intl.RelativeTimeFormat;\n    const ListFormat = Intl.ListFormat;\n    const DisplayNames = Intl.DisplayNames;\n    return {\n        getDateTimeFormat: memoizeIntlConstructor(Intl.DateTimeFormat, cache.dateTime),\n        getNumberFormat: memoizeIntlConstructor(Intl.NumberFormat, cache.number),\n        getMessageFormat: memoizeIntlConstructor(IntlMessageFormat, cache.message),\n        getRelativeTimeFormat: memoizeIntlConstructor(RelativeTimeFormat, cache.relativeTime),\n        getPluralRules: memoizeIntlConstructor(Intl.PluralRules, cache.pluralRules),\n        getListFormat: memoizeIntlConstructor(ListFormat, cache.list),\n        getDisplayNames: memoizeIntlConstructor(DisplayNames, cache.displayNames),\n    };\n}\nexport function getNamedFormat(formats, type, name, onError) {\n    const formatType = formats && formats[type];\n    let format;\n    if (formatType) {\n        format = formatType[name];\n    }\n    if (format) {\n        return format;\n    }\n    onError(createError(`No ${type} format named: ${name}`));\n}\n", "import * as React from 'react';\nimport * as hoistNonReactStatics_ from 'hoist-non-react-statics';\n// Since rollup cannot deal with namespace being a function,\n// this is to interop with TypeScript since `invariant`\n// does not export a default\n// https://github.com/rollup/rollup/issues/1267\nconst hoistNonReactStatics = hoistNonReactStatics_.default || hoistNonReactStatics_;\nimport { invariantIntlContext } from '../utils';\nfunction getDisplayName(Component) {\n    return Component.displayName || Component.name || 'Component';\n}\n// TODO: We should provide initial value here\nconst IntlContext = React.createContext(null);\nconst { Consumer: IntlConsumer, Provider: IntlProvider } = IntlContext;\nexport const Provider = IntlProvider;\nexport const Context = IntlContext;\nexport default function injectIntl(WrappedComponent, options) {\n    const { intlPropName = 'intl', forwardRef = false, enforceContext = true } = options || {};\n    const WithIntl = props => (React.createElement(IntlConsumer, null, (intl) => {\n        if (enforceContext) {\n            invariantIntlContext(intl);\n        }\n        return (React.createElement(WrappedComponent, Object.assign({}, props, {\n            [intlPropName]: intl,\n        }, { ref: forwardRef ? props.forwardedRef : null })));\n    }));\n    WithIntl.displayName = `injectIntl(${getDisplayName(WrappedComponent)})`;\n    WithIntl.WrappedComponent = WrappedComponent;\n    if (forwardRef) {\n        return hoistNonReactStatics(React.forwardRef((props, ref) => (React.createElement(WithIntl, Object.assign({}, props, { forwardedRef: ref })))), WrappedComponent);\n    }\n    return hoistNonReactStatics(WithIntl, WrappedComponent);\n}\n", "var __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\nimport * as React from 'react';\nimport { invariantIntlContext } from '../utils';\nimport { Context } from './injectIntl';\nvar DisplayName;\n(function (DisplayName) {\n    DisplayName[\"formatDate\"] = \"FormattedDate\";\n    DisplayName[\"formatTime\"] = \"FormattedTime\";\n    DisplayName[\"formatNumber\"] = \"FormattedNumber\";\n    DisplayName[\"formatList\"] = \"FormattedList\";\n    // Note that this DisplayName is the locale display name, not to be confused with\n    // the name of the enum, which is for React component display name in dev tools.\n    DisplayName[\"formatDisplayName\"] = \"FormattedDisplayName\";\n})(DisplayName || (DisplayName = {}));\nvar DisplayNameParts;\n(function (DisplayNameParts) {\n    DisplayNameParts[\"formatDate\"] = \"FormattedDateParts\";\n    DisplayNameParts[\"formatTime\"] = \"FormattedTimeParts\";\n    DisplayNameParts[\"formatNumber\"] = \"FormattedNumberParts\";\n    DisplayNameParts[\"formatList\"] = \"FormattedListParts\";\n})(DisplayNameParts || (DisplayNameParts = {}));\nexport const FormattedNumberParts = props => (React.createElement(Context.Consumer, null, (intl) => {\n    invariantIntlContext(intl);\n    const { value, children } = props, formatProps = __rest(props, [\"value\", \"children\"]);\n    return children(intl.formatNumberToParts(value, formatProps));\n}));\nFormattedNumberParts.displayName = 'FormattedNumberParts';\nexport function createFormattedDateTimePartsComponent(name) {\n    const ComponentParts = props => (React.createElement(Context.Consumer, null, (intl) => {\n        invariantIntlContext(intl);\n        const { value, children } = props, formatProps = __rest(props, [\"value\", \"children\"]);\n        const date = typeof value === 'string' ? new Date(value || 0) : value;\n        const formattedParts = name === 'formatDate'\n            ? intl.formatDateToParts(date, formatProps)\n            : intl.formatTimeToParts(date, formatProps);\n        return children(formattedParts);\n    }));\n    ComponentParts.displayName = DisplayNameParts[name];\n    return ComponentParts;\n}\nexport function createFormattedComponent(name) {\n    const Component = props => (React.createElement(Context.Consumer, null, (intl) => {\n        invariantIntlContext(intl);\n        const { value, children } = props, formatProps = __rest(props, [\"value\", \"children\"]);\n        // TODO: fix TS type definition for localeMatcher upstream\n        const formattedValue = intl[name](value, formatProps);\n        if (typeof children === 'function') {\n            return children(formattedValue);\n        }\n        const Text = intl.textComponent || React.Fragment;\n        return React.createElement(Text, null, formattedValue);\n    }));\n    Component.displayName = DisplayName[name];\n    return Component;\n}\n", "import { getNamedFormat, filterProps, createError } from '../utils';\nconst NUMBER_FORMAT_OPTIONS = [\n    'localeMatcher',\n    'style',\n    'currency',\n    'currencyDisplay',\n    'unit',\n    'unitDisplay',\n    'useGrouping',\n    'minimumIntegerDigits',\n    'minimumFractionDigits',\n    'maximumFractionDigits',\n    'minimumSignificantDigits',\n    'maximumSignificantDigits',\n    // Unified NumberFormat (Stage 3 as of 10/22/19)\n    'compactDisplay',\n    'currencyDisplay',\n    'currencySign',\n    'notation',\n    'signDisplay',\n    'unit',\n    'unitDisplay',\n];\nexport function getFormatter({ locale, formats, onError, }, getNumberFormat, options = {}) {\n    const { format } = options;\n    const defaults = ((format &&\n        getNamedFormat(formats, 'number', format, onError)) ||\n        {});\n    const filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);\n    return getNumberFormat(locale, filteredOptions);\n}\nexport function formatNumber(config, getNumberFormat, value, options = {}) {\n    try {\n        return getFormatter(config, getNumberFormat, options).format(value);\n    }\n    catch (e) {\n        config.onError(createError('Error formatting number.', e));\n    }\n    return String(value);\n}\nexport function formatNumberToParts(config, getNumberFormat, value, options = {}) {\n    try {\n        return getFormatter(config, getNumberFormat, options).formatToParts(value);\n    }\n    catch (e) {\n        config.onError(createError('Error formatting number.', e));\n    }\n    return [];\n}\n", "import { getNamedFormat, filterProps, createError } from '../utils';\nconst RELATIVE_TIME_FORMAT_OPTIONS = [\n    'numeric',\n    'style',\n];\nfunction getFormatter({ locale, formats, onError, }, getRelativeTimeFormat, options = {}) {\n    const { format } = options;\n    const defaults = (!!format && getNamedFormat(formats, 'relative', format, onError)) || {};\n    const filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);\n    return getRelativeTimeFormat(locale, filteredOptions);\n}\nexport function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options = {}) {\n    if (!unit) {\n        unit = 'second';\n    }\n    const RelativeTimeFormat = Intl.RelativeTimeFormat;\n    if (!RelativeTimeFormat) {\n        config.onError(createError(`Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-relativetimeformat\"\n`));\n    }\n    try {\n        return getFormatter(config, getRelativeTimeFormat, options).format(value, unit);\n    }\n    catch (e) {\n        config.onError(createError('Error formatting relative time.', e));\n    }\n    return String(value);\n}\n", "/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { createError, filterProps, getNamedFormat } from '../utils';\nconst DATE_TIME_FORMAT_OPTIONS = [\n    'localeMatcher',\n    'formatMatcher',\n    'timeZone',\n    'hour12',\n    'weekday',\n    'era',\n    'year',\n    'month',\n    'day',\n    'hour',\n    'minute',\n    'second',\n    'timeZoneName',\n];\nexport function getFormatter({ locale, formats, onError, timeZone, }, type, getDateTimeFormat, options = {}) {\n    const { format } = options;\n    const defaults = Object.assign(Object.assign({}, (timeZone && { timeZone })), (format && getNamedFormat(formats, type, format, onError)));\n    let filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);\n    if (type === 'time' &&\n        !filteredOptions.hour &&\n        !filteredOptions.minute &&\n        !filteredOptions.second) {\n        // Add default formatting options if hour, minute, or second isn't defined.\n        filteredOptions = Object.assign(Object.assign({}, filteredOptions), { hour: 'numeric', minute: 'numeric' });\n    }\n    return getDateTimeFormat(locale, filteredOptions);\n}\nexport function formatDate(config, getDateTimeFormat, value, options = {}) {\n    const date = typeof value === 'string' ? new Date(value || 0) : value;\n    try {\n        return getFormatter(config, 'date', getDateTimeFormat, options).format(date);\n    }\n    catch (e) {\n        config.onError(createError('Error formatting date.', e));\n    }\n    return String(date);\n}\nexport function formatTime(config, getDateTimeFormat, value, options = {}) {\n    const date = typeof value === 'string' ? new Date(value || 0) : value;\n    try {\n        return getFormatter(config, 'time', getDateTimeFormat, options).format(date);\n    }\n    catch (e) {\n        config.onError(createError('Error formatting time.', e));\n    }\n    return String(date);\n}\nexport function formatDateToParts(config, getDateTimeFormat, value, options = {}) {\n    const date = typeof value === 'string' ? new Date(value || 0) : value;\n    try {\n        return getFormatter(config, 'date', getDateTimeFormat, options).formatToParts(date);\n    }\n    catch (e) {\n        config.onError(createError('Error formatting date.', e));\n    }\n    return [];\n}\nexport function formatTimeToParts(config, getDateTimeFormat, value, options = {}) {\n    const date = typeof value === 'string' ? new Date(value || 0) : value;\n    try {\n        return getFormatter(config, 'time', getDateTimeFormat, options).formatToParts(date);\n    }\n    catch (e) {\n        config.onError(createError('Error formatting time.', e));\n    }\n    return [];\n}\n", "import { filterProps, createError } from '../utils';\nconst PLURAL_FORMAT_OPTIONS = [\n    'localeMatcher',\n    'type',\n];\nexport function formatPlural({ locale, onError }, getPluralRules, value, options = {}) {\n    if (!Intl.PluralRules) {\n        onError(createError(`Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n`));\n    }\n    const filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);\n    try {\n        return getPluralRules(locale, filteredOptions).select(value);\n    }\n    catch (e) {\n        onError(createError('Error formatting plural.', e));\n    }\n    return 'other';\n}\n", "/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport * as React from 'react';\nimport { invariant } from '@formatjs/intl-utils';\nimport { createError, escape } from '../utils';\nimport IntlMessageFormat from 'intl-messageformat';\nfunction setTimeZoneInOptions(opts, timeZone) {\n    return Object.keys(opts).reduce((all, k) => {\n        all[k] = Object.assign({ timeZone }, opts[k]);\n        return all;\n    }, {});\n}\nfunction deepMergeOptions(opts1, opts2) {\n    const keys = Object.keys(Object.assign(Object.assign({}, opts1), opts2));\n    return keys.reduce((all, k) => {\n        all[k] = Object.assign(Object.assign({}, (opts1[k] || {})), (opts2[k] || {}));\n        return all;\n    }, {});\n}\nfunction deepMergeFormatsAndSetTimeZone(f1, timeZone) {\n    if (!timeZone) {\n        return f1;\n    }\n    const mfFormats = IntlMessageFormat.formats;\n    return Object.assign(Object.assign(Object.assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });\n}\nexport const prepareIntlMessageFormatHtmlOutput = (chunks) => React.createElement(React.Fragment, null, ...chunks);\nexport function formatMessage({ locale, formats, messages, defaultLocale, defaultFormats, onError, timeZone, }, state, messageDescriptor = { id: '' }, values = {}) {\n    const { id, defaultMessage } = messageDescriptor;\n    // `id` is a required field of a Message Descriptor.\n    invariant(!!id, '[React Intl] An `id` must be provided to format a message.');\n    const message = messages && messages[String(id)];\n    formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);\n    defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);\n    let formattedMessageParts = [];\n    if (message) {\n        try {\n            const formatter = state.getMessageFormat(message, locale, formats, {\n                formatters: state,\n            });\n            formattedMessageParts = formatter.formatHTMLMessage(values);\n        }\n        catch (e) {\n            onError(createError(`Error formatting message: \"${id}\" for locale: \"${locale}\"` +\n                (defaultMessage ? ', using default message as fallback.' : ''), e));\n        }\n    }\n    else {\n        // This prevents warnings from littering the console in development\n        // when no `messages` are passed into the <IntlProvider> for the\n        // default locale, and a default message is in the source.\n        if (!defaultMessage ||\n            (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {\n            onError(createError(`Missing message: \"${id}\" for locale: \"${locale}\"` +\n                (defaultMessage ? ', using default message as fallback.' : '')));\n        }\n    }\n    if (!formattedMessageParts.length && defaultMessage) {\n        try {\n            const formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats);\n            formattedMessageParts = formatter.formatHTMLMessage(values);\n        }\n        catch (e) {\n            onError(createError(`Error formatting the default message for: \"${id}\"`, e));\n        }\n    }\n    if (!formattedMessageParts.length) {\n        onError(createError(`Cannot format message: \"${id}\", ` +\n            `using message ${message || defaultMessage ? 'source' : 'id'} as fallback.`));\n        if (typeof message === 'string') {\n            return message || defaultMessage || String(id);\n        }\n        return defaultMessage || String(id);\n    }\n    if (formattedMessageParts.length === 1 &&\n        typeof formattedMessageParts[0] === 'string') {\n        return formattedMessageParts[0] || defaultMessage || String(id);\n    }\n    return prepareIntlMessageFormatHtmlOutput(formattedMessageParts);\n}\nexport function formatHTMLMessage(config, state, messageDescriptor = { id: '' }, rawValues = {}) {\n    // Process all the values before they are used when formatting the ICU\n    // Message string. Since the formatted message might be injected via\n    // `innerHTML`, all String-based values need to be HTML-escaped.\n    const escapedValues = Object.keys(rawValues).reduce((escaped, name) => {\n        const value = rawValues[name];\n        escaped[name] = typeof value === 'string' ? escape(value) : value;\n        return escaped;\n    }, {});\n    return formatMessage(config, state, messageDescriptor, escapedValues);\n}\n", "'use strict';\n\nfunction shallowEqualObjects(objA, objB) {\n  if (objA === objB) {\n    return true;\n  }\n\n  if (!objA || !objB) {\n    return false;\n  }\n\n  var aKeys = Object.keys(objA);\n  var bKeys = Object.keys(objB);\n  var len = aKeys.length;\n\n  if (bKeys.length !== len) {\n    return false;\n  }\n\n  for (var i = 0; i < len; i++) {\n    var key = aKeys[i];\n\n    if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nmodule.exports = shallowEqualObjects;\n", "import { filterProps, createError } from '../utils';\nconst LIST_FORMAT_OPTIONS = [\n    'localeMatcher',\n    'type',\n    'style',\n];\nconst now = Date.now();\nfunction generateToken(i) {\n    return `${now}_${i}_${now}`;\n}\nexport function formatList({ locale, onError }, getListFormat, values, options = {}) {\n    const ListFormat = Intl.ListFormat;\n    if (!ListFormat) {\n        onError(createError(`Intl.ListFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-listformat\"\n`));\n    }\n    const filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);\n    try {\n        const richValues = {};\n        const serializedValues = values.map((v, i) => {\n            if (typeof v === 'object') {\n                const id = generateToken(i);\n                richValues[id] = v;\n                return id;\n            }\n            return String(v);\n        });\n        if (!Object.keys(richValues).length) {\n            return getListFormat(locale, filteredOptions).format(serializedValues);\n        }\n        const parts = getListFormat(locale, filteredOptions).formatToParts(serializedValues);\n        return parts.reduce((all, el) => {\n            const val = el.value;\n            if (richValues[val]) {\n                all.push(richValues[val]);\n            }\n            else if (typeof all[all.length - 1] === 'string') {\n                all[all.length - 1] += val;\n            }\n            else {\n                all.push(val);\n            }\n            return all;\n        }, []);\n    }\n    catch (e) {\n        onError(createError('Error formatting list.', e));\n    }\n    return values;\n}\n", "import { filterProps, createError } from '../utils';\nconst DISPLAY_NAMES_OPTONS = [\n    'localeMatcher',\n    'style',\n    'type',\n    'fallback',\n];\nexport function formatDisplayName({ locale, onError }, getDisplayNames, value, options = {}) {\n    const DisplayNames = Intl.DisplayNames;\n    if (!DisplayNames) {\n        onError(createError(`Intl.DisplayNames is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-displaynames\"\n`));\n    }\n    const filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS);\n    try {\n        return getDisplayNames(locale, filteredOptions).of(value);\n    }\n    catch (e) {\n        onError(createError('Error formatting display name.', e));\n    }\n}\n", "/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport * as React from 'react';\nimport { Provider } from './injectIntl';\nimport { createError, DEFAULT_INTL_CONFIG, createFormatters, invariantIntlContext, createIntlCache, } from '../utils';\nimport { formatNumber, formatNumberToParts } from '../formatters/number';\nimport { formatRelativeTime } from '../formatters/relativeTime';\nimport { formatDate, formatTime, formatDateToParts, formatTimeToParts, } from '../formatters/dateTime';\nimport { formatPlural } from '../formatters/plural';\nimport { formatMessage, formatHTMLMessage } from '../formatters/message';\nimport * as shallowEquals_ from 'shallow-equal/objects';\nimport { formatList } from '../formatters/list';\nimport { formatDisplayName } from '../formatters/displayName';\nconst shallowEquals = shallowEquals_.default || shallowEquals_;\nfunction processIntlConfig(config) {\n    return {\n        locale: config.locale,\n        timeZone: config.timeZone,\n        formats: config.formats,\n        textComponent: config.textComponent,\n        messages: config.messages,\n        defaultLocale: config.defaultLocale,\n        defaultFormats: config.defaultFormats,\n        onError: config.onError,\n    };\n}\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport function createIntl(config, cache) {\n    const formatters = createFormatters(cache);\n    const resolvedConfig = Object.assign(Object.assign({}, DEFAULT_INTL_CONFIG), config);\n    const { locale, defaultLocale, onError } = resolvedConfig;\n    if (!locale) {\n        if (onError) {\n            onError(createError(`\"locale\" was not configured, using \"${defaultLocale}\" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/API.md#intlshape for more details`));\n        }\n        // Since there's no registered locale data for `locale`, this will\n        // fallback to the `defaultLocale` to make sure things can render.\n        // The `messages` are overridden to the `defaultProps` empty object\n        // to maintain referential equality across re-renders. It's assumed\n        // each <FormattedMessage> contains a `defaultMessage` prop.\n        resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';\n    }\n    else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {\n        onError(createError(`Missing locale data for locale: \"${locale}\" in Intl.NumberFormat. Using default locale: \"${defaultLocale}\" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/Getting-Started.md#runtime-requirements for more details`));\n    }\n    else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&\n        onError) {\n        onError(createError(`Missing locale data for locale: \"${locale}\" in Intl.DateTimeFormat. Using default locale: \"${defaultLocale}\" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/Getting-Started.md#runtime-requirements for more details`));\n    }\n    return Object.assign(Object.assign({}, resolvedConfig), { formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatHTMLMessage: formatHTMLMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });\n}\nexport default class IntlProvider extends React.PureComponent {\n    constructor() {\n        super(...arguments);\n        this.cache = createIntlCache();\n        this.state = {\n            cache: this.cache,\n            intl: createIntl(processIntlConfig(this.props), this.cache),\n            prevConfig: processIntlConfig(this.props),\n        };\n    }\n    static getDerivedStateFromProps(props, { prevConfig, cache }) {\n        const config = processIntlConfig(props);\n        if (!shallowEquals(prevConfig, config)) {\n            return {\n                intl: createIntl(config, cache),\n                prevConfig: config,\n            };\n        }\n        return null;\n    }\n    render() {\n        invariantIntlContext(this.state.intl);\n        return React.createElement(Provider, { value: this.state.intl }, this.props.children);\n    }\n}\nIntlProvider.displayName = 'IntlProvider';\nIntlProvider.defaultProps = DEFAULT_INTL_CONFIG;\n", "/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport * as React from 'react';\nimport { Context } from './injectIntl';\nimport { invariantIntlContext } from '../utils';\nimport { invariant } from '@formatjs/intl-utils';\nconst MINUTE = 60;\nconst HOUR = 60 * 60;\nconst DAY = 60 * 60 * 24;\nfunction selectUnit(seconds) {\n    const absValue = Math.abs(seconds);\n    if (absValue < MINUTE) {\n        return 'second';\n    }\n    if (absValue < HOUR) {\n        return 'minute';\n    }\n    if (absValue < DAY) {\n        return 'hour';\n    }\n    return 'day';\n}\nfunction getDurationInSeconds(unit) {\n    switch (unit) {\n        case 'second':\n            return 1;\n        case 'minute':\n            return MINUTE;\n        case 'hour':\n            return HOUR;\n        default:\n            return DAY;\n    }\n}\nfunction valueToSeconds(value, unit) {\n    if (!value) {\n        return 0;\n    }\n    switch (unit) {\n        case 'second':\n            return value;\n        case 'minute':\n            return value * MINUTE;\n        default:\n            return value * HOUR;\n    }\n}\nconst INCREMENTABLE_UNITS = ['second', 'minute', 'hour'];\nfunction canIncrement(unit = 'second') {\n    return INCREMENTABLE_UNITS.includes(unit);\n}\nexport class FormattedRelativeTime extends React.PureComponent {\n    constructor(props) {\n        super(props);\n        // Public for testing\n        this._updateTimer = null;\n        this.state = {\n            prevUnit: this.props.unit,\n            prevValue: this.props.value,\n            currentValueInSeconds: canIncrement(this.props.unit)\n                ? valueToSeconds(this.props.value, this.props.unit)\n                : 0,\n        };\n        invariant(!props.updateIntervalInSeconds ||\n            !!(props.updateIntervalInSeconds && canIncrement(props.unit)), 'Cannot schedule update with unit longer than hour');\n    }\n    scheduleNextUpdate({ updateIntervalInSeconds, unit }, { currentValueInSeconds }) {\n        clearTimeout(this._updateTimer);\n        this._updateTimer = null;\n        // If there's no interval and we cannot increment this unit, do nothing\n        if (!updateIntervalInSeconds || !canIncrement(unit)) {\n            return;\n        }\n        // Figure out the next interesting time\n        const nextValueInSeconds = currentValueInSeconds - updateIntervalInSeconds;\n        const nextUnit = selectUnit(nextValueInSeconds);\n        // We've reached the max auto incrementable unit, don't schedule another update\n        if (nextUnit === 'day') {\n            return;\n        }\n        const unitDuration = getDurationInSeconds(nextUnit);\n        const remainder = nextValueInSeconds % unitDuration;\n        const prevInterestingValueInSeconds = nextValueInSeconds - remainder;\n        const nextInterestingValueInSeconds = prevInterestingValueInSeconds >= currentValueInSeconds\n            ? prevInterestingValueInSeconds - unitDuration\n            : prevInterestingValueInSeconds;\n        const delayInSeconds = Math.abs(nextInterestingValueInSeconds - currentValueInSeconds);\n        this._updateTimer = setTimeout(() => this.setState({\n            currentValueInSeconds: nextInterestingValueInSeconds,\n        }), delayInSeconds * 1e3);\n    }\n    componentDidMount() {\n        this.scheduleNextUpdate(this.props, this.state);\n    }\n    componentDidUpdate() {\n        this.scheduleNextUpdate(this.props, this.state);\n    }\n    componentWillUnmount() {\n        clearTimeout(this._updateTimer);\n        this._updateTimer = null;\n    }\n    static getDerivedStateFromProps(props, state) {\n        if (props.unit !== state.prevUnit || props.value !== state.prevValue) {\n            return {\n                prevValue: props.value,\n                prevUnit: props.unit,\n                currentValueInSeconds: canIncrement(props.unit)\n                    ? valueToSeconds(props.value, props.unit)\n                    : 0,\n            };\n        }\n        return null;\n    }\n    render() {\n        return (React.createElement(Context.Consumer, null, (intl) => {\n            invariantIntlContext(intl);\n            const { formatRelativeTime, textComponent: Text } = intl;\n            const { children, value, unit, updateIntervalInSeconds } = this.props;\n            const { currentValueInSeconds } = this.state;\n            let currentValue = value || 0;\n            let currentUnit = unit;\n            if (canIncrement(unit) &&\n                typeof currentValueInSeconds === 'number' &&\n                updateIntervalInSeconds) {\n                currentUnit = selectUnit(currentValueInSeconds);\n                const unitDuration = getDurationInSeconds(currentUnit);\n                currentValue = Math.round(currentValueInSeconds / unitDuration);\n            }\n            const formattedRelativeTime = formatRelativeTime(currentValue, currentUnit, Object.assign({}, this.props));\n            if (typeof children === 'function') {\n                return children(formattedRelativeTime);\n            }\n            if (Text) {\n                return React.createElement(Text, null, formattedRelativeTime);\n            }\n            return formattedRelativeTime;\n        }));\n    }\n}\nFormattedRelativeTime.displayName = 'FormattedRelativeTime';\nFormattedRelativeTime.defaultProps = {\n    value: 0,\n    unit: 'second',\n};\nexport default FormattedRelativeTime;\n", "/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nvar __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\nimport * as React from 'react';\nimport { Context } from './injectIntl';\nimport { formatMessage } from '../formatters/message';\nimport { invariantIntlContext, DEFAULT_INTL_CONFIG, createFormatters, } from '../utils';\nimport * as shallowEquals_ from 'shallow-equal/objects';\nconst shallowEquals = shallowEquals_.default || shallowEquals_;\nconst defaultFormatMessage = (descriptor, values) => {\n    if (process.env.NODE_ENV !== 'production') {\n        console.error('[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry. Using default message as fallback.');\n    }\n    return formatMessage(Object.assign(Object.assign({}, DEFAULT_INTL_CONFIG), { locale: 'en' }), createFormatters(), descriptor, values);\n};\nclass FormattedMessage extends React.Component {\n    shouldComponentUpdate(nextProps) {\n        const _a = this.props, { values } = _a, otherProps = __rest(_a, [\"values\"]);\n        const { values: nextValues } = nextProps, nextOtherProps = __rest(nextProps, [\"values\"]);\n        return (!shallowEquals(nextValues, values) ||\n            !shallowEquals(otherProps, nextOtherProps));\n    }\n    render() {\n        return (React.createElement(Context.Consumer, null, (intl) => {\n            if (!this.props.defaultMessage) {\n                invariantIntlContext(intl);\n            }\n            const { formatMessage = defaultFormatMessage, textComponent: Text = React.Fragment, } = intl || {};\n            const { id, description, defaultMessage, values, children, tagName: Component = Text, } = this.props;\n            const descriptor = { id, description, defaultMessage };\n            let nodes = formatMessage(descriptor, values);\n            if (!Array.isArray(nodes)) {\n                nodes = [nodes];\n            }\n            if (typeof children === 'function') {\n                return children(...nodes);\n            }\n            if (Component) {\n                // Needs to use `createElement()` instead of JSX, otherwise React will\n                // warn about a missing `key` prop with rich-text message formatting.\n                return React.createElement(Component, null, ...nodes);\n            }\n            return nodes;\n        }));\n    }\n}\nFormattedMessage.displayName = 'FormattedMessage';\nFormattedMessage.defaultProps = {\n    values: {},\n};\nexport default FormattedMessage;\n", "export function defineMessages(msgs) {\n    return msgs;\n}\nimport { createFormattedComponent, createFormattedDateTimePartsComponent, } from './components/createFormattedComponent';\nexport { default as injectIntl, Provider as RawIntlProvider, Context as IntlContext, } from './components/injectIntl';\nexport { default as useIntl } from './components/useIntl';\nexport { default as IntlProvider, createIntl } from './components/provider';\n// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./types').CustomFormatConfig`\nexport const FormattedDate = createFormattedComponent('formatDate');\nexport const FormattedTime = createFormattedComponent('formatTime');\nexport const FormattedNumber = createFormattedComponent('formatNumber');\nexport const FormattedList = createFormattedComponent('formatList');\nexport const FormattedDisplayName = createFormattedComponent('formatDisplayName');\nexport const FormattedDateParts = createFormattedDateTimePartsComponent('formatDate');\nexport const FormattedTimeParts = createFormattedDateTimePartsComponent('formatTime');\nexport { FormattedNumberParts } from './components/createFormattedComponent';\nexport { default as FormattedRelativeTime } from './components/relative';\nexport { default as FormattedPlural } from './components/plural';\nexport { default as FormattedMessage } from './components/message';\nexport { default as FormattedHTMLMessage } from './components/html-message';\nexport { createIntlCache } from './utils';\n", "export default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  subClass.__proto__ = superClass;\n}", "import PropTypes from 'prop-types';\nexport var subscriptionShape = PropTypes.shape({\n  trySubscribe: PropTypes.func.isRequired,\n  tryUnsubscribe: PropTypes.func.isRequired,\n  notifyNestedSubs: PropTypes.func.isRequired,\n  isSubscribed: PropTypes.func.isRequired\n});\nexport var storeShape = PropTypes.shape({\n  subscribe: PropTypes.func.isRequired,\n  dispatch: PropTypes.func.isRequired,\n  getState: PropTypes.func.isRequired\n});", "/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nexport default function warning(message) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n\n\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n    /* eslint-disable no-empty */\n  } catch (e) {}\n  /* eslint-enable no-empty */\n\n}", "import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Component, Children } from 'react';\nimport PropTypes from 'prop-types';\nimport { storeShape, subscriptionShape } from '../utils/PropTypes';\nimport warning from '../utils/warning';\nvar didWarnAboutReceivingStore = false;\n\nfunction warnAboutReceivingStore() {\n  if (didWarnAboutReceivingStore) {\n    return;\n  }\n\n  didWarnAboutReceivingStore = true;\n  warning('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');\n}\n\nexport function createProvider(storeKey) {\n  var _Provider$childContex;\n\n  if (storeKey === void 0) {\n    storeKey = 'store';\n  }\n\n  var subscriptionKey = storeKey + \"Subscription\";\n\n  var Provider =\n  /*#__PURE__*/\n  function (_Component) {\n    _inheritsLoose(Provider, _Component);\n\n    var _proto = Provider.prototype;\n\n    _proto.getChildContext = function getChildContext() {\n      var _ref;\n\n      return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;\n    };\n\n    function Provider(props, context) {\n      var _this;\n\n      _this = _Component.call(this, props, context) || this;\n      _this[storeKey] = props.store;\n      return _this;\n    }\n\n    _proto.render = function render() {\n      return Children.only(this.props.children);\n    };\n\n    return Provider;\n  }(Component);\n\n  if (process.env.NODE_ENV !== 'production') {\n    Provider.prototype.componentWillReceiveProps = function (nextProps) {\n      if (this[storeKey] !== nextProps.store) {\n        warnAboutReceivingStore();\n      }\n    };\n  }\n\n  Provider.propTypes = {\n    store: storeShape.isRequired,\n    children: PropTypes.element.isRequired\n  };\n  Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = storeShape.isRequired, _Provider$childContex[subscriptionKey] = subscriptionShape, _Provider$childContex);\n  return Provider;\n}\nexport default createProvider();", "export default function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}", "export default function _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}", "export default function _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}", "/** @license React v16.8.6\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?Symbol.for(\"react.memo\"):\n60115,r=b?Symbol.for(\"react.lazy\"):60116;function t(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;\nexports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||\"object\"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};\nexports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};\nexports.isSuspense=function(a){return t(a)===p};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n", "'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar ReactIs = require('react-is');\nvar REACT_STATICS = {\n    childContextTypes: true,\n    contextType: true,\n    contextTypes: true,\n    defaultProps: true,\n    displayName: true,\n    getDefaultProps: true,\n    getDerivedStateFromError: true,\n    getDerivedStateFromProps: true,\n    mixins: true,\n    propTypes: true,\n    type: true\n};\n\nvar KNOWN_STATICS = {\n    name: true,\n    length: true,\n    prototype: true,\n    caller: true,\n    callee: true,\n    arguments: true,\n    arity: true\n};\n\nvar FORWARD_REF_STATICS = {\n    '$$typeof': true,\n    render: true,\n    defaultProps: true,\n    displayName: true,\n    propTypes: true\n};\n\nvar MEMO_STATICS = {\n    '$$typeof': true,\n    compare: true,\n    defaultProps: true,\n    displayName: true,\n    propTypes: true,\n    type: true\n};\n\nvar TYPE_STATICS = {};\nTYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;\n\nfunction getStatics(component) {\n    if (ReactIs.isMemo(component)) {\n        return MEMO_STATICS;\n    }\n    return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n    if (typeof sourceComponent !== 'string') {\n        // don't hoist over string (html) components\n\n        if (objectPrototype) {\n            var inheritedComponent = getPrototypeOf(sourceComponent);\n            if (inheritedComponent && inheritedComponent !== objectPrototype) {\n                hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n            }\n        }\n\n        var keys = getOwnPropertyNames(sourceComponent);\n\n        if (getOwnPropertySymbols) {\n            keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n        }\n\n        var targetStatics = getStatics(targetComponent);\n        var sourceStatics = getStatics(sourceComponent);\n\n        for (var i = 0; i < keys.length; ++i) {\n            var key = keys[i];\n            if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n                var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n                try {\n                    // Avoid failures from read-only properties\n                    defineProperty(targetComponent, key, descriptor);\n                } catch (e) {}\n            }\n        }\n\n        return targetComponent;\n    }\n\n    return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n", "// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\nvar CLEARED = null;\nvar nullListeners = {\n  notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n  // the current/next pattern is copied from redux's createStore code.\n  // TODO: refactor+expose that code to be reusable here?\n  var current = [];\n  var next = [];\n  return {\n    clear: function clear() {\n      next = CLEARED;\n      current = CLEARED;\n    },\n    notify: function notify() {\n      var listeners = current = next;\n\n      for (var i = 0; i < listeners.length; i++) {\n        listeners[i]();\n      }\n    },\n    get: function get() {\n      return next;\n    },\n    subscribe: function subscribe(listener) {\n      var isSubscribed = true;\n      if (next === current) next = current.slice();\n      next.push(listener);\n      return function unsubscribe() {\n        if (!isSubscribed || current === CLEARED) return;\n        isSubscribed = false;\n        if (next === current) next = current.slice();\n        next.splice(next.indexOf(listener), 1);\n      };\n    }\n  };\n}\n\nvar Subscription =\n/*#__PURE__*/\nfunction () {\n  function Subscription(store, parentSub, onStateChange) {\n    this.store = store;\n    this.parentSub = parentSub;\n    this.onStateChange = onStateChange;\n    this.unsubscribe = null;\n    this.listeners = nullListeners;\n  }\n\n  var _proto = Subscription.prototype;\n\n  _proto.addNestedSub = function addNestedSub(listener) {\n    this.trySubscribe();\n    return this.listeners.subscribe(listener);\n  };\n\n  _proto.notifyNestedSubs = function notifyNestedSubs() {\n    this.listeners.notify();\n  };\n\n  _proto.isSubscribed = function isSubscribed() {\n    return Boolean(this.unsubscribe);\n  };\n\n  _proto.trySubscribe = function trySubscribe() {\n    if (!this.unsubscribe) {\n      this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);\n      this.listeners = createListenerCollection();\n    }\n  };\n\n  _proto.tryUnsubscribe = function tryUnsubscribe() {\n    if (this.unsubscribe) {\n      this.unsubscribe();\n      this.unsubscribe = null;\n      this.listeners.clear();\n      this.listeners = nullListeners;\n    }\n  };\n\n  return Subscription;\n}();\n\nexport { Subscription as default };", "import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport hoistStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport { Component, createElement } from 'react';\nimport { isValidElementType } from 'react-is';\nimport Subscription from '../utils/Subscription';\nimport { storeShape, subscriptionShape } from '../utils/PropTypes';\nvar hotReloadingVersion = 0;\nvar dummyState = {};\n\nfunction noop() {}\n\nfunction makeSelectorStateful(sourceSelector, store) {\n  // wrap the selector in an object that tracks its results between runs.\n  var selector = {\n    run: function runComponentSelector(props) {\n      try {\n        var nextProps = sourceSelector(store.getState(), props);\n\n        if (nextProps !== selector.props || selector.error) {\n          selector.shouldComponentUpdate = true;\n          selector.props = nextProps;\n          selector.error = null;\n        }\n      } catch (error) {\n        selector.shouldComponentUpdate = true;\n        selector.error = error;\n      }\n    }\n  };\n  return selector;\n}\n\nexport default function connectAdvanced(\n/*\n  selectorFactory is a func that is responsible for returning the selector function used to\n  compute new props from state, props, and dispatch. For example:\n     export default connectAdvanced((dispatch, options) => (state, props) => ({\n      thing: state.things[props.thingId],\n      saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n    }))(YourComponent)\n   Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n  outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n  the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n   Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n  props. Do not use connectAdvanced directly without memoizing results between calls to your\n  selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory, // options object:\n_ref) {\n  var _contextTypes, _childContextTypes;\n\n  if (_ref === void 0) {\n    _ref = {};\n  }\n\n  var _ref2 = _ref,\n      _ref2$getDisplayName = _ref2.getDisplayName,\n      getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {\n    return \"ConnectAdvanced(\" + name + \")\";\n  } : _ref2$getDisplayName,\n      _ref2$methodName = _ref2.methodName,\n      methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,\n      _ref2$renderCountProp = _ref2.renderCountProp,\n      renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,\n      _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,\n      shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,\n      _ref2$storeKey = _ref2.storeKey,\n      storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,\n      _ref2$withRef = _ref2.withRef,\n      withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,\n      connectOptions = _objectWithoutPropertiesLoose(_ref2, [\"getDisplayName\", \"methodName\", \"renderCountProp\", \"shouldHandleStateChanges\", \"storeKey\", \"withRef\"]);\n\n  var subscriptionKey = storeKey + 'Subscription';\n  var version = hotReloadingVersion++;\n  var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = storeShape, _contextTypes[subscriptionKey] = subscriptionShape, _contextTypes);\n  var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = subscriptionShape, _childContextTypes);\n  return function wrapWithConnect(WrappedComponent) {\n    invariant(isValidElementType(WrappedComponent), \"You must pass a component to the function returned by \" + (methodName + \". Instead received \" + JSON.stringify(WrappedComponent)));\n    var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n    var displayName = getDisplayName(wrappedComponentName);\n\n    var selectorFactoryOptions = _extends({}, connectOptions, {\n      getDisplayName: getDisplayName,\n      methodName: methodName,\n      renderCountProp: renderCountProp,\n      shouldHandleStateChanges: shouldHandleStateChanges,\n      storeKey: storeKey,\n      withRef: withRef,\n      displayName: displayName,\n      wrappedComponentName: wrappedComponentName,\n      WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps\n\n      /* eslint-disable react/no-deprecated */\n\n    });\n\n    var Connect =\n    /*#__PURE__*/\n    function (_Component) {\n      _inheritsLoose(Connect, _Component);\n\n      function Connect(props, context) {\n        var _this;\n\n        _this = _Component.call(this, props, context) || this;\n        _this.version = version;\n        _this.state = {};\n        _this.renderCount = 0;\n        _this.store = props[storeKey] || context[storeKey];\n        _this.propsMode = Boolean(props[storeKey]);\n        _this.setWrappedInstance = _this.setWrappedInstance.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n        invariant(_this.store, \"Could not find \\\"\" + storeKey + \"\\\" in either the context or props of \" + (\"\\\"\" + displayName + \"\\\". Either wrap the root component in a <Provider>, \") + (\"or explicitly pass \\\"\" + storeKey + \"\\\" as a prop to \\\"\" + displayName + \"\\\".\"));\n\n        _this.initSelector();\n\n        _this.initSubscription();\n\n        return _this;\n      }\n\n      var _proto = Connect.prototype;\n\n      _proto.getChildContext = function getChildContext() {\n        var _ref3;\n\n        // If this component received store from props, its subscription should be transparent\n        // to any descendants receiving store+subscription from context; it passes along\n        // subscription passed to it. Otherwise, it shadows the parent subscription, which allows\n        // Connect to control ordering of notifications to flow top-down.\n        var subscription = this.propsMode ? null : this.subscription;\n        return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3;\n      };\n\n      _proto.componentDidMount = function componentDidMount() {\n        if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and\n        // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.\n        // Otherwise, unsubscription would never take place during SSR, causing a memory leak.\n        // To handle the case where a child component may have triggered a state change by\n        // dispatching an action in its componentWillMount, we have to re-run the select and maybe\n        // re-render.\n\n        this.subscription.trySubscribe();\n        this.selector.run(this.props);\n        if (this.selector.shouldComponentUpdate) this.forceUpdate();\n      };\n\n      _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n        this.selector.run(nextProps);\n      };\n\n      _proto.shouldComponentUpdate = function shouldComponentUpdate() {\n        return this.selector.shouldComponentUpdate;\n      };\n\n      _proto.componentWillUnmount = function componentWillUnmount() {\n        if (this.subscription) this.subscription.tryUnsubscribe();\n        this.subscription = null;\n        this.notifyNestedSubs = noop;\n        this.store = null;\n        this.selector.run = noop;\n        this.selector.shouldComponentUpdate = false;\n      };\n\n      _proto.getWrappedInstance = function getWrappedInstance() {\n        invariant(withRef, \"To access the wrapped instance, you need to specify \" + (\"{ withRef: true } in the options argument of the \" + methodName + \"() call.\"));\n        return this.wrappedInstance;\n      };\n\n      _proto.setWrappedInstance = function setWrappedInstance(ref) {\n        this.wrappedInstance = ref;\n      };\n\n      _proto.initSelector = function initSelector() {\n        var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);\n        this.selector = makeSelectorStateful(sourceSelector, this.store);\n        this.selector.run(this.props);\n      };\n\n      _proto.initSubscription = function initSubscription() {\n        if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component\n        // connected to the store via props shouldn't use subscription from context, or vice versa.\n\n        var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];\n        this.subscription = new Subscription(this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n        // the middle of the notification loop, where `this.subscription` will then be null. An\n        // extra null check every change can be avoided by copying the method onto `this` and then\n        // replacing it with a no-op on unmount. This can probably be avoided if Subscription's\n        // listeners logic is changed to not call listeners that have been unsubscribed in the\n        // middle of the notification loop.\n\n        this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);\n      };\n\n      _proto.onStateChange = function onStateChange() {\n        this.selector.run(this.props);\n\n        if (!this.selector.shouldComponentUpdate) {\n          this.notifyNestedSubs();\n        } else {\n          this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;\n          this.setState(dummyState);\n        }\n      };\n\n      _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {\n        // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it\n        // needs to notify nested subs. Once called, it unimplements itself until further state\n        // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does\n        // a boolean check every time avoids an extra method call most of the time, resulting\n        // in some perf boost.\n        this.componentDidUpdate = undefined;\n        this.notifyNestedSubs();\n      };\n\n      _proto.isSubscribed = function isSubscribed() {\n        return Boolean(this.subscription) && this.subscription.isSubscribed();\n      };\n\n      _proto.addExtraProps = function addExtraProps(props) {\n        if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector.\n        // this is especially important for 'ref' since that's a reference back to the component\n        // instance. a singleton memoized selector would then be holding a reference to the\n        // instance, preventing the instance from being garbage collected, and that would be bad\n\n        var withExtras = _extends({}, props);\n\n        if (withRef) withExtras.ref = this.setWrappedInstance;\n        if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;\n        if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;\n        return withExtras;\n      };\n\n      _proto.render = function render() {\n        var selector = this.selector;\n        selector.shouldComponentUpdate = false;\n\n        if (selector.error) {\n          throw selector.error;\n        } else {\n          return createElement(WrappedComponent, this.addExtraProps(selector.props));\n        }\n      };\n\n      return Connect;\n    }(Component);\n    /* eslint-enable react/no-deprecated */\n\n\n    Connect.WrappedComponent = WrappedComponent;\n    Connect.displayName = displayName;\n    Connect.childContextTypes = childContextTypes;\n    Connect.contextTypes = contextTypes;\n    Connect.propTypes = contextTypes;\n\n    if (process.env.NODE_ENV !== 'production') {\n      Connect.prototype.componentWillUpdate = function componentWillUpdate() {\n        var _this2 = this;\n\n        // We are hot reloading!\n        if (this.version !== version) {\n          this.version = version;\n          this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their\n          // listeners will be lost when we unsubscribe. Unfortunately, by copying over all\n          // listeners, this does mean that the old versions of connected descendants will still be\n          // notified of state changes; however, their onStateChange function is a no-op so this\n          // isn't a huge deal.\n\n          var oldListeners = [];\n\n          if (this.subscription) {\n            oldListeners = this.subscription.listeners.get();\n            this.subscription.tryUnsubscribe();\n          }\n\n          this.initSubscription();\n\n          if (shouldHandleStateChanges) {\n            this.subscription.trySubscribe();\n            oldListeners.forEach(function (listener) {\n              return _this2.subscription.listeners.subscribe(listener);\n            });\n          }\n        }\n      };\n    }\n\n    return hoistStatics(Connect, WrappedComponent);\n  };\n}", "var hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n  if (x === y) {\n    return x !== 0 || y !== 0 || 1 / x === 1 / y;\n  } else {\n    return x !== x && y !== y;\n  }\n}\n\nexport default function shallowEqual(objA, objB) {\n  if (is(objA, objB)) return true;\n\n  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n    return false;\n  }\n\n  var keysA = Object.keys(objA);\n  var keysB = Object.keys(objB);\n  if (keysA.length !== keysB.length) return false;\n\n  for (var i = 0; i < keysA.length; i++) {\n    if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n      return false;\n    }\n  }\n\n  return true;\n}", "export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n", "/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n  root = self;\n} else if (typeof window !== 'undefined') {\n  root = window;\n} else if (typeof global !== 'undefined') {\n  root = global;\n} else if (typeof module !== 'undefined') {\n  root = module;\n} else {\n  root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n", "import $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n  return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n  INIT: \"@@redux/INIT\" + randomString(),\n  REPLACE: \"@@redux/REPLACE\" + randomString(),\n  PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n    return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n  }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n  if (typeof obj !== 'object' || obj === null) return false;\n  var proto = obj;\n\n  while (Object.getPrototypeOf(proto) !== null) {\n    proto = Object.getPrototypeOf(proto);\n  }\n\n  return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n  var _ref2;\n\n  if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n    throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');\n  }\n\n  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n    enhancer = preloadedState;\n    preloadedState = undefined;\n  }\n\n  if (typeof enhancer !== 'undefined') {\n    if (typeof enhancer !== 'function') {\n      throw new Error('Expected the enhancer to be a function.');\n    }\n\n    return enhancer(createStore)(reducer, preloadedState);\n  }\n\n  if (typeof reducer !== 'function') {\n    throw new Error('Expected the reducer to be a function.');\n  }\n\n  var currentReducer = reducer;\n  var currentState = preloadedState;\n  var currentListeners = [];\n  var nextListeners = currentListeners;\n  var isDispatching = false;\n  /**\n   * This makes a shallow copy of currentListeners so we can use\n   * nextListeners as a temporary list while dispatching.\n   *\n   * This prevents any bugs around consumers calling\n   * subscribe/unsubscribe in the middle of a dispatch.\n   */\n\n  function ensureCanMutateNextListeners() {\n    if (nextListeners === currentListeners) {\n      nextListeners = currentListeners.slice();\n    }\n  }\n  /**\n   * Reads the state tree managed by the store.\n   *\n   * @returns {any} The current state tree of your application.\n   */\n\n\n  function getState() {\n    if (isDispatching) {\n      throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n    }\n\n    return currentState;\n  }\n  /**\n   * Adds a change listener. It will be called any time an action is dispatched,\n   * and some part of the state tree may potentially have changed. You may then\n   * call `getState()` to read the current state tree inside the callback.\n   *\n   * You may call `dispatch()` from a change listener, with the following\n   * caveats:\n   *\n   * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n   * If you subscribe or unsubscribe while the listeners are being invoked, this\n   * will not have any effect on the `dispatch()` that is currently in progress.\n   * However, the next `dispatch()` call, whether nested or not, will use a more\n   * recent snapshot of the subscription list.\n   *\n   * 2. The listener should not expect to see all state changes, as the state\n   * might have been updated multiple times during a nested `dispatch()` before\n   * the listener is called. It is, however, guaranteed that all subscribers\n   * registered before the `dispatch()` started will be called with the latest\n   * state by the time it exits.\n   *\n   * @param {Function} listener A callback to be invoked on every dispatch.\n   * @returns {Function} A function to remove this change listener.\n   */\n\n\n  function subscribe(listener) {\n    if (typeof listener !== 'function') {\n      throw new Error('Expected the listener to be a function.');\n    }\n\n    if (isDispatching) {\n      throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');\n    }\n\n    var isSubscribed = true;\n    ensureCanMutateNextListeners();\n    nextListeners.push(listener);\n    return function unsubscribe() {\n      if (!isSubscribed) {\n        return;\n      }\n\n      if (isDispatching) {\n        throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');\n      }\n\n      isSubscribed = false;\n      ensureCanMutateNextListeners();\n      var index = nextListeners.indexOf(listener);\n      nextListeners.splice(index, 1);\n      currentListeners = null;\n    };\n  }\n  /**\n   * Dispatches an action. It is the only way to trigger a state change.\n   *\n   * The `reducer` function, used to create the store, will be called with the\n   * current state tree and the given `action`. Its return value will\n   * be considered the **next** state of the tree, and the change listeners\n   * will be notified.\n   *\n   * The base implementation only supports plain object actions. If you want to\n   * dispatch a Promise, an Observable, a thunk, or something else, you need to\n   * wrap your store creating function into the corresponding middleware. For\n   * example, see the documentation for the `redux-thunk` package. Even the\n   * middleware will eventually dispatch plain object actions using this method.\n   *\n   * @param {Object} action A plain object representing \u201Cwhat changed\u201D. It is\n   * a good idea to keep actions serializable so you can record and replay user\n   * sessions, or use the time travelling `redux-devtools`. An action must have\n   * a `type` property which may not be `undefined`. It is a good idea to use\n   * string constants for action types.\n   *\n   * @returns {Object} For convenience, the same action object you dispatched.\n   *\n   * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n   * return something else (for example, a Promise you can await).\n   */\n\n\n  function dispatch(action) {\n    if (!isPlainObject(action)) {\n      throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n    }\n\n    if (typeof action.type === 'undefined') {\n      throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n    }\n\n    if (isDispatching) {\n      throw new Error('Reducers may not dispatch actions.');\n    }\n\n    try {\n      isDispatching = true;\n      currentState = currentReducer(currentState, action);\n    } finally {\n      isDispatching = false;\n    }\n\n    var listeners = currentListeners = nextListeners;\n\n    for (var i = 0; i < listeners.length; i++) {\n      var listener = listeners[i];\n      listener();\n    }\n\n    return action;\n  }\n  /**\n   * Replaces the reducer currently used by the store to calculate the state.\n   *\n   * You might need this if your app implements code splitting and you want to\n   * load some of the reducers dynamically. You might also need this if you\n   * implement a hot reloading mechanism for Redux.\n   *\n   * @param {Function} nextReducer The reducer for the store to use instead.\n   * @returns {void}\n   */\n\n\n  function replaceReducer(nextReducer) {\n    if (typeof nextReducer !== 'function') {\n      throw new Error('Expected the nextReducer to be a function.');\n    }\n\n    currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n    // Any reducers that existed in both the new and old rootReducer\n    // will receive the previous state. This effectively populates\n    // the new state tree with any relevant data from the old one.\n\n    dispatch({\n      type: ActionTypes.REPLACE\n    });\n  }\n  /**\n   * Interoperability point for observable/reactive libraries.\n   * @returns {observable} A minimal observable of state changes.\n   * For more information, see the observable proposal:\n   * https://github.com/tc39/proposal-observable\n   */\n\n\n  function observable() {\n    var _ref;\n\n    var outerSubscribe = subscribe;\n    return _ref = {\n      /**\n       * The minimal observable subscription method.\n       * @param {Object} observer Any object that can be used as an observer.\n       * The observer object should have a `next` method.\n       * @returns {subscription} An object with an `unsubscribe` method that can\n       * be used to unsubscribe the observable from the store, and prevent further\n       * emission of values from the observable.\n       */\n      subscribe: function subscribe(observer) {\n        if (typeof observer !== 'object' || observer === null) {\n          throw new TypeError('Expected the observer to be an object.');\n        }\n\n        function observeState() {\n          if (observer.next) {\n            observer.next(getState());\n          }\n        }\n\n        observeState();\n        var unsubscribe = outerSubscribe(observeState);\n        return {\n          unsubscribe: unsubscribe\n        };\n      }\n    }, _ref[$$observable] = function () {\n      return this;\n    }, _ref;\n  } // When a store is created, an \"INIT\" action is dispatched so that every\n  // reducer returns their initial state. This effectively populates\n  // the initial state tree.\n\n\n  dispatch({\n    type: ActionTypes.INIT\n  });\n  return _ref2 = {\n    dispatch: dispatch,\n    subscribe: subscribe,\n    getState: getState,\n    replaceReducer: replaceReducer\n  }, _ref2[$$observable] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n\n\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n  } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n  var actionType = action && action.type;\n  var actionDescription = actionType && \"action \\\"\" + String(actionType) + \"\\\"\" || 'an action';\n  return \"Given \" + actionDescription + \", reducer \\\"\" + key + \"\\\" returned undefined. \" + \"To ignore an action, you must explicitly return the previous state. \" + \"If you want this reducer to hold no value, you can return null instead of undefined.\";\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n  var reducerKeys = Object.keys(reducers);\n  var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n  if (reducerKeys.length === 0) {\n    return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n  }\n\n  if (!isPlainObject(inputState)) {\n    return \"The \" + argumentName + \" has unexpected type of \\\"\" + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n  }\n\n  var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n    return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n  });\n  unexpectedKeys.forEach(function (key) {\n    unexpectedKeyCache[key] = true;\n  });\n  if (action && action.type === ActionTypes.REPLACE) return;\n\n  if (unexpectedKeys.length > 0) {\n    return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n  }\n}\n\nfunction assertReducerShape(reducers) {\n  Object.keys(reducers).forEach(function (key) {\n    var reducer = reducers[key];\n    var initialState = reducer(undefined, {\n      type: ActionTypes.INIT\n    });\n\n    if (typeof initialState === 'undefined') {\n      throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n    }\n\n    if (typeof reducer(undefined, {\n      type: ActionTypes.PROBE_UNKNOWN_ACTION()\n    }) === 'undefined') {\n      throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n    }\n  });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n  var reducerKeys = Object.keys(reducers);\n  var finalReducers = {};\n\n  for (var i = 0; i < reducerKeys.length; i++) {\n    var key = reducerKeys[i];\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (typeof reducers[key] === 'undefined') {\n        warning(\"No reducer provided for key \\\"\" + key + \"\\\"\");\n      }\n    }\n\n    if (typeof reducers[key] === 'function') {\n      finalReducers[key] = reducers[key];\n    }\n  }\n\n  var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n  // keys multiple times.\n\n  var unexpectedKeyCache;\n\n  if (process.env.NODE_ENV !== 'production') {\n    unexpectedKeyCache = {};\n  }\n\n  var shapeAssertionError;\n\n  try {\n    assertReducerShape(finalReducers);\n  } catch (e) {\n    shapeAssertionError = e;\n  }\n\n  return function combination(state, action) {\n    if (state === void 0) {\n      state = {};\n    }\n\n    if (shapeAssertionError) {\n      throw shapeAssertionError;\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n      if (warningMessage) {\n        warning(warningMessage);\n      }\n    }\n\n    var hasChanged = false;\n    var nextState = {};\n\n    for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n      var _key = finalReducerKeys[_i];\n      var reducer = finalReducers[_key];\n      var previousStateForKey = state[_key];\n      var nextStateForKey = reducer(previousStateForKey, action);\n\n      if (typeof nextStateForKey === 'undefined') {\n        var errorMessage = getUndefinedStateErrorMessage(_key, action);\n        throw new Error(errorMessage);\n      }\n\n      nextState[_key] = nextStateForKey;\n      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n    }\n\n    hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n    return hasChanged ? nextState : state;\n  };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n  return function () {\n    return dispatch(actionCreator.apply(this, arguments));\n  };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n  if (typeof actionCreators === 'function') {\n    return bindActionCreator(actionCreators, dispatch);\n  }\n\n  if (typeof actionCreators !== 'object' || actionCreators === null) {\n    throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : typeof actionCreators) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n  }\n\n  var boundActionCreators = {};\n\n  for (var key in actionCreators) {\n    var actionCreator = actionCreators[key];\n\n    if (typeof actionCreator === 'function') {\n      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n    }\n  }\n\n  return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n  }\n\n  if (enumerableOnly) keys = keys.filter(function (sym) {\n    return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n  });\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(source, true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(source).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n  for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n    funcs[_key] = arguments[_key];\n  }\n\n  if (funcs.length === 0) {\n    return function (arg) {\n      return arg;\n    };\n  }\n\n  if (funcs.length === 1) {\n    return funcs[0];\n  }\n\n  return funcs.reduce(function (a, b) {\n    return function () {\n      return a(b.apply(void 0, arguments));\n    };\n  });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n  for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n    middlewares[_key] = arguments[_key];\n  }\n\n  return function (createStore) {\n    return function () {\n      var store = createStore.apply(void 0, arguments);\n\n      var _dispatch = function dispatch() {\n        throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n      };\n\n      var middlewareAPI = {\n        getState: store.getState,\n        dispatch: function dispatch() {\n          return _dispatch.apply(void 0, arguments);\n        }\n      };\n      var chain = middlewares.map(function (middleware) {\n        return middleware(middlewareAPI);\n      });\n      _dispatch = compose.apply(void 0, chain)(store.dispatch);\n      return _objectSpread2({}, store, {\n        dispatch: _dispatch\n      });\n    };\n  };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n  warning('You are currently using minified code outside of NODE_ENV === \"production\". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore };\n", "/**\r\n * @param {any} obj The object to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n */\nexport default function isPlainObject(obj) {\n  if (typeof obj !== 'object' || obj === null) return false;\n  var proto = Object.getPrototypeOf(obj);\n  if (proto === null) return true;\n  var baseProto = proto;\n\n  while (Object.getPrototypeOf(baseProto) !== null) {\n    baseProto = Object.getPrototypeOf(baseProto);\n  }\n\n  return proto === baseProto;\n}", "import isPlainObject from './isPlainObject';\nimport warning from './warning';\nexport default function verifyPlainObject(value, displayName, methodName) {\n  if (!isPlainObject(value)) {\n    warning(methodName + \"() in \" + displayName + \" must return a plain object. Instead received \" + value + \".\");\n  }\n}", "import verifyPlainObject from '../utils/verifyPlainObject';\nexport function wrapMapToPropsConstant(getConstant) {\n  return function initConstantSelector(dispatch, options) {\n    var constant = getConstant(dispatch, options);\n\n    function constantSelector() {\n      return constant;\n    }\n\n    constantSelector.dependsOnOwnProps = false;\n    return constantSelector;\n  };\n} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n// \n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\n\nexport function getDependsOnOwnProps(mapToProps) {\n  return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n// \n//  * Detects whether the mapToProps function being called depends on props, which\n//    is used by selectorFactory to decide if it should reinvoke on props changes.\n//    \n//  * On first call, handles mapToProps if returns another function, and treats that\n//    new function as the true mapToProps for subsequent calls.\n//    \n//  * On first call, verifies the first result is a plain object, in order to warn\n//    the developer that their mapToProps function is not returning a valid result.\n//    \n\nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n  return function initProxySelector(dispatch, _ref) {\n    var displayName = _ref.displayName;\n\n    var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n      return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n    }; // allow detectFactoryAndVerify to get ownProps\n\n\n    proxy.dependsOnOwnProps = true;\n\n    proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n      proxy.mapToProps = mapToProps;\n      proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n      var props = proxy(stateOrDispatch, ownProps);\n\n      if (typeof props === 'function') {\n        proxy.mapToProps = props;\n        proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n        props = proxy(stateOrDispatch, ownProps);\n      }\n\n      if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n      return props;\n    };\n\n    return proxy;\n  };\n}", "import { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n  return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n  return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n    return {\n      dispatch: dispatch\n    };\n  }) : undefined;\n}\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n  return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n    return bindActionCreators(mapDispatchToProps, dispatch);\n  }) : undefined;\n}\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];", "import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n  return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n  return !mapStateToProps ? wrapMapToPropsConstant(function () {\n    return {};\n  }) : undefined;\n}\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];", "import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport verifyPlainObject from '../utils/verifyPlainObject';\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n  return _extends({}, ownProps, stateProps, dispatchProps);\n}\nexport function wrapMergePropsFunc(mergeProps) {\n  return function initMergePropsProxy(dispatch, _ref) {\n    var displayName = _ref.displayName,\n        pure = _ref.pure,\n        areMergedPropsEqual = _ref.areMergedPropsEqual;\n    var hasRunOnce = false;\n    var mergedProps;\n    return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n      var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n      if (hasRunOnce) {\n        if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n      } else {\n        hasRunOnce = true;\n        mergedProps = nextMergedProps;\n        if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n      }\n\n      return mergedProps;\n    };\n  };\n}\nexport function whenMergePropsIsFunction(mergeProps) {\n  return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\nexport function whenMergePropsIsOmitted(mergeProps) {\n  return !mergeProps ? function () {\n    return defaultMergeProps;\n  } : undefined;\n}\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];", "import warning from '../utils/warning';\n\nfunction verify(selector, methodName, displayName) {\n  if (!selector) {\n    throw new Error(\"Unexpected value for \" + methodName + \" in \" + displayName + \".\");\n  } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {\n    if (!selector.hasOwnProperty('dependsOnOwnProps')) {\n      warning(\"The selector for \" + methodName + \" of \" + displayName + \" did not specify a value for dependsOnOwnProps.\");\n    }\n  }\n}\n\nexport default function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {\n  verify(mapStateToProps, 'mapStateToProps', displayName);\n  verify(mapDispatchToProps, 'mapDispatchToProps', displayName);\n  verify(mergeProps, 'mergeProps', displayName);\n}", "import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport verifySubselectors from './verifySubselectors';\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n  return function impureFinalPropsSelector(state, ownProps) {\n    return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n  };\n}\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n  var areStatesEqual = _ref.areStatesEqual,\n      areOwnPropsEqual = _ref.areOwnPropsEqual,\n      areStatePropsEqual = _ref.areStatePropsEqual;\n  var hasRunAtLeastOnce = false;\n  var state;\n  var ownProps;\n  var stateProps;\n  var dispatchProps;\n  var mergedProps;\n\n  function handleFirstCall(firstState, firstOwnProps) {\n    state = firstState;\n    ownProps = firstOwnProps;\n    stateProps = mapStateToProps(state, ownProps);\n    dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    hasRunAtLeastOnce = true;\n    return mergedProps;\n  }\n\n  function handleNewPropsAndNewState() {\n    stateProps = mapStateToProps(state, ownProps);\n    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleNewProps() {\n    if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleNewState() {\n    var nextStateProps = mapStateToProps(state, ownProps);\n    var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n    stateProps = nextStateProps;\n    if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleSubsequentCalls(nextState, nextOwnProps) {\n    var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n    var stateChanged = !areStatesEqual(nextState, state);\n    state = nextState;\n    ownProps = nextOwnProps;\n    if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n    if (propsChanged) return handleNewProps();\n    if (stateChanged) return handleNewState();\n    return mergedProps;\n  }\n\n  return function pureFinalPropsSelector(nextState, nextOwnProps) {\n    return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n  };\n} // TODO: Add more comments\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n  var initMapStateToProps = _ref2.initMapStateToProps,\n      initMapDispatchToProps = _ref2.initMapDispatchToProps,\n      initMergeProps = _ref2.initMergeProps,\n      options = _objectWithoutPropertiesLoose(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n  var mapStateToProps = initMapStateToProps(dispatch, options);\n  var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n  var mergeProps = initMergeProps(dispatch, options);\n\n  if (process.env.NODE_ENV !== 'production') {\n    verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n  }\n\n  var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n  return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n/*\n  connect is a facade over connectAdvanced. It turns its args into a compatible\n  selectorFactory, which has the signature:\n\n    (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n  \n  connect passes its args to connectAdvanced as options, which will in turn pass them to\n  selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n  selectorFactory returns a final props selector from its mapStateToProps,\n  mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n  mergePropsFactories, and pure args.\n\n  The resulting final props selector is called by the Connect component instance whenever\n  it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n  for (var i = factories.length - 1; i >= 0; i--) {\n    var result = factories[i](arg);\n    if (result) return result;\n  }\n\n  return function (dispatch, options) {\n    throw new Error(\"Invalid value of type \" + typeof arg + \" for \" + name + \" argument when connecting component \" + options.wrappedComponentName + \".\");\n  };\n}\n\nfunction strictEqual(a, b) {\n  return a === b;\n} // createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\n\n\nexport function createConnect(_temp) {\n  var _ref = _temp === void 0 ? {} : _temp,\n      _ref$connectHOC = _ref.connectHOC,\n      connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n      _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n      mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n      _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n      mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n      _ref$mergePropsFactor = _ref.mergePropsFactories,\n      mergePropsFactories = _ref$mergePropsFactor === void 0 ? defaultMergePropsFactories : _ref$mergePropsFactor,\n      _ref$selectorFactory = _ref.selectorFactory,\n      selectorFactory = _ref$selectorFactory === void 0 ? defaultSelectorFactory : _ref$selectorFactory;\n\n  return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n    if (_ref2 === void 0) {\n      _ref2 = {};\n    }\n\n    var _ref3 = _ref2,\n        _ref3$pure = _ref3.pure,\n        pure = _ref3$pure === void 0 ? true : _ref3$pure,\n        _ref3$areStatesEqual = _ref3.areStatesEqual,\n        areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n        _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n        areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n        _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n        areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n        _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n        areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n        extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n    var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n    var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n    var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n    return connectHOC(selectorFactory, _extends({\n      // used in error messages\n      methodName: 'connect',\n      // used to compute Connect's displayName from the wrapped component's displayName.\n      getDisplayName: function getDisplayName(name) {\n        return \"Connect(\" + name + \")\";\n      },\n      // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n      shouldHandleStateChanges: Boolean(mapStateToProps),\n      // passed through to selectorFactory\n      initMapStateToProps: initMapStateToProps,\n      initMapDispatchToProps: initMapDispatchToProps,\n      initMergeProps: initMergeProps,\n      pure: pure,\n      areStatesEqual: areStatesEqual,\n      areOwnPropsEqual: areOwnPropsEqual,\n      areStatePropsEqual: areStatePropsEqual,\n      areMergedPropsEqual: areMergedPropsEqual\n    }, extraOptions));\n  };\n}\nexport default createConnect();", "import Provider, { createProvider } from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport connect from './connect/connect';\nexport { Provider, createProvider, connectAdvanced, connect };", "function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  subClass.__proto__ = superClass;\n}\n\nmodule.exports = _inheritsLoose;", "/*\n\nBased off glamor's StyleSheet, thanks Sunil \u2764\uFE0F\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n  if (tag.sheet) {\n    // $FlowFixMe\n    return tag.sheet;\n  } // this weirdness brought to you by firefox\n\n  /* istanbul ignore next */\n\n\n  for (var i = 0; i < document.styleSheets.length; i++) {\n    if (document.styleSheets[i].ownerNode === tag) {\n      // $FlowFixMe\n      return document.styleSheets[i];\n    }\n  }\n}\n\nfunction createStyleElement(options) {\n  var tag = document.createElement('style');\n  tag.setAttribute('data-emotion', options.key);\n\n  if (options.nonce !== undefined) {\n    tag.setAttribute('nonce', options.nonce);\n  }\n\n  tag.appendChild(document.createTextNode(''));\n  return tag;\n}\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n  function StyleSheet(options) {\n    this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n    this.tags = [];\n    this.ctr = 0;\n    this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n    this.key = options.key;\n    this.container = options.container;\n    this.before = null;\n  }\n\n  var _proto = StyleSheet.prototype;\n\n  _proto.insert = function insert(rule) {\n    // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n    // it's 1 in dev because we insert source maps that map a single rule to a location\n    // and you can only have one source map per style tag\n    if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n      var _tag = createStyleElement(this);\n\n      var before;\n\n      if (this.tags.length === 0) {\n        before = this.before;\n      } else {\n        before = this.tags[this.tags.length - 1].nextSibling;\n      }\n\n      this.container.insertBefore(_tag, before);\n      this.tags.push(_tag);\n    }\n\n    var tag = this.tags[this.tags.length - 1];\n\n    if (this.isSpeedy) {\n      var sheet = sheetForTag(tag);\n\n      try {\n        // this is a really hot path\n        // we check the second character first because having \"i\"\n        // as the second character will happen less often than\n        // having \"@\" as the first character\n        var isImportRule = rule.charCodeAt(1) === 105 && rule.charCodeAt(0) === 64; // this is the ultrafast version, works across browsers\n        // the big drawback is that the css won't be editable in devtools\n\n        sheet.insertRule(rule, // we need to insert @import rules before anything else\n        // otherwise there will be an error\n        // technically this means that the @import rules will\n        // _usually_(not always since there could be multiple style tags)\n        // be the first ones in prod and generally later in dev\n        // this shouldn't really matter in the real world though\n        // @import is generally only used for font faces from google fonts and etc.\n        // so while this could be technically correct then it would be slower and larger\n        // for a tiny bit of correctness that won't matter in the real world\n        isImportRule ? 0 : sheet.cssRules.length);\n      } catch (e) {\n        if (process.env.NODE_ENV !== 'production') {\n          console.warn(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n        }\n      }\n    } else {\n      tag.appendChild(document.createTextNode(rule));\n    }\n\n    this.ctr++;\n  };\n\n  _proto.flush = function flush() {\n    // $FlowFixMe\n    this.tags.forEach(function (tag) {\n      return tag.parentNode.removeChild(tag);\n    });\n    this.tags = [];\n    this.ctr = 0;\n  };\n\n  return StyleSheet;\n}();\n\nexport { StyleSheet };\n", "function stylis_min (W) {\n  function M(d, c, e, h, a) {\n    for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n      g = e.charCodeAt(l);\n      l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n      if (0 === b + n + v + m) {\n        if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n          switch (g) {\n            case 32:\n            case 9:\n            case 59:\n            case 13:\n            case 10:\n              break;\n\n            default:\n              f += e.charAt(l);\n          }\n\n          g = 59;\n        }\n\n        switch (g) {\n          case 123:\n            f = f.trim();\n            q = f.charCodeAt(0);\n            k = 1;\n\n            for (t = ++l; l < B;) {\n              switch (g = e.charCodeAt(l)) {\n                case 123:\n                  k++;\n                  break;\n\n                case 125:\n                  k--;\n                  break;\n\n                case 47:\n                  switch (g = e.charCodeAt(l + 1)) {\n                    case 42:\n                    case 47:\n                      a: {\n                        for (u = l + 1; u < J; ++u) {\n                          switch (e.charCodeAt(u)) {\n                            case 47:\n                              if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n                                l = u + 1;\n                                break a;\n                              }\n\n                              break;\n\n                            case 10:\n                              if (47 === g) {\n                                l = u + 1;\n                                break a;\n                              }\n\n                          }\n                        }\n\n                        l = u;\n                      }\n\n                  }\n\n                  break;\n\n                case 91:\n                  g++;\n\n                case 40:\n                  g++;\n\n                case 34:\n                case 39:\n                  for (; l++ < J && e.charCodeAt(l) !== g;) {\n                  }\n\n              }\n\n              if (0 === k) break;\n              l++;\n            }\n\n            k = e.substring(t, l);\n            0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n            switch (q) {\n              case 64:\n                0 < r && (f = f.replace(N, ''));\n                g = f.charCodeAt(1);\n\n                switch (g) {\n                  case 100:\n                  case 109:\n                  case 115:\n                  case 45:\n                    r = c;\n                    break;\n\n                  default:\n                    r = O;\n                }\n\n                k = M(c, r, k, g, a + 1);\n                t = k.length;\n                0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n                if (0 < t) switch (g) {\n                  case 115:\n                    f = f.replace(da, ea);\n\n                  case 100:\n                  case 109:\n                  case 45:\n                    k = f + '{' + k + '}';\n                    break;\n\n                  case 107:\n                    f = f.replace(fa, '$1 $2');\n                    k = f + '{' + k + '}';\n                    k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n                    break;\n\n                  default:\n                    k = f + k, 112 === h && (k = (p += k, ''));\n                } else k = '';\n                break;\n\n              default:\n                k = M(c, X(c, f, I), k, h, a + 1);\n            }\n\n            F += k;\n            k = I = r = u = q = 0;\n            f = '';\n            g = e.charCodeAt(++l);\n            break;\n\n          case 125:\n          case 59:\n            f = (0 < r ? f.replace(N, '') : f).trim();\n            if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n              case 0:\n                break;\n\n              case 64:\n                if (105 === g || 99 === g) {\n                  G += f + e.charAt(l);\n                  break;\n                }\n\n              default:\n                58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n            }\n            I = r = u = q = 0;\n            f = '';\n            g = e.charCodeAt(++l);\n        }\n      }\n\n      switch (g) {\n        case 13:\n        case 10:\n          47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n          0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n          z = 1;\n          D++;\n          break;\n\n        case 59:\n        case 125:\n          if (0 === b + n + v + m) {\n            z++;\n            break;\n          }\n\n        default:\n          z++;\n          y = e.charAt(l);\n\n          switch (g) {\n            case 9:\n            case 32:\n              if (0 === n + m + b) switch (x) {\n                case 44:\n                case 58:\n                case 9:\n                case 32:\n                  y = '';\n                  break;\n\n                default:\n                  32 !== g && (y = ' ');\n              }\n              break;\n\n            case 0:\n              y = '\\\\0';\n              break;\n\n            case 12:\n              y = '\\\\f';\n              break;\n\n            case 11:\n              y = '\\\\v';\n              break;\n\n            case 38:\n              0 === n + b + m && (r = I = 1, y = '\\f' + y);\n              break;\n\n            case 108:\n              if (0 === n + b + m + E && 0 < u) switch (l - u) {\n                case 2:\n                  112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n                case 8:\n                  111 === K && (E = K);\n              }\n              break;\n\n            case 58:\n              0 === n + b + m && (u = l);\n              break;\n\n            case 44:\n              0 === b + v + n + m && (r = 1, y += '\\r');\n              break;\n\n            case 34:\n            case 39:\n              0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n              break;\n\n            case 91:\n              0 === n + b + v && m++;\n              break;\n\n            case 93:\n              0 === n + b + v && m--;\n              break;\n\n            case 41:\n              0 === n + b + m && v--;\n              break;\n\n            case 40:\n              if (0 === n + b + m) {\n                if (0 === q) switch (2 * x + 3 * K) {\n                  case 533:\n                    break;\n\n                  default:\n                    q = 1;\n                }\n                v++;\n              }\n\n              break;\n\n            case 64:\n              0 === b + v + n + m + u + k && (k = 1);\n              break;\n\n            case 42:\n            case 47:\n              if (!(0 < n + m + v)) switch (b) {\n                case 0:\n                  switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n                    case 235:\n                      b = 47;\n                      break;\n\n                    case 220:\n                      t = l, b = 42;\n                  }\n\n                  break;\n\n                case 42:\n                  47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n              }\n          }\n\n          0 === b && (f += y);\n      }\n\n      K = x;\n      x = g;\n      l++;\n    }\n\n    t = p.length;\n\n    if (0 < t) {\n      r = c;\n      if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n      p = r.join(',') + '{' + p + '}';\n\n      if (0 !== w * E) {\n        2 !== w || L(p, 2) || (E = 0);\n\n        switch (E) {\n          case 111:\n            p = p.replace(ha, ':-moz-$1') + p;\n            break;\n\n          case 112:\n            p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n        }\n\n        E = 0;\n      }\n    }\n\n    return G + p + F;\n  }\n\n  function X(d, c, e) {\n    var h = c.trim().split(ia);\n    c = h;\n    var a = h.length,\n        m = d.length;\n\n    switch (m) {\n      case 0:\n      case 1:\n        var b = 0;\n\n        for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n          c[b] = Z(d, c[b], e).trim();\n        }\n\n        break;\n\n      default:\n        var v = b = 0;\n\n        for (c = []; b < a; ++b) {\n          for (var n = 0; n < m; ++n) {\n            c[v++] = Z(d[n] + ' ', h[b], e).trim();\n          }\n        }\n\n    }\n\n    return c;\n  }\n\n  function Z(d, c, e) {\n    var h = c.charCodeAt(0);\n    33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n    switch (h) {\n      case 38:\n        return c.replace(F, '$1' + d.trim());\n\n      case 58:\n        return d.trim() + c.replace(F, '$1' + d.trim());\n\n      default:\n        if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n    }\n\n    return d + c;\n  }\n\n  function P(d, c, e, h) {\n    var a = d + ';',\n        m = 2 * c + 3 * e + 4 * h;\n\n    if (944 === m) {\n      d = a.indexOf(':', 9) + 1;\n      var b = a.substring(d, a.length - 1).trim();\n      b = a.substring(0, d).trim() + b + ';';\n      return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n    }\n\n    if (0 === w || 2 === w && !L(a, 1)) return a;\n\n    switch (m) {\n      case 1015:\n        return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n      case 951:\n        return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n      case 963:\n        return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n      case 1009:\n        if (100 !== a.charCodeAt(4)) break;\n\n      case 969:\n      case 942:\n        return '-webkit-' + a + a;\n\n      case 978:\n        return '-webkit-' + a + '-moz-' + a + a;\n\n      case 1019:\n      case 983:\n        return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n      case 883:\n        if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n        if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n        break;\n\n      case 932:\n        if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n          case 103:\n            return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n          case 115:\n            return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n          case 98:\n            return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n        }\n        return '-webkit-' + a + '-ms-' + a + a;\n\n      case 964:\n        return '-webkit-' + a + '-ms-flex-' + a + a;\n\n      case 1023:\n        if (99 !== a.charCodeAt(8)) break;\n        b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n        return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n      case 1005:\n        return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n      case 1e3:\n        b = a.substring(13).trim();\n        c = b.indexOf('-') + 1;\n\n        switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n          case 226:\n            b = a.replace(G, 'tb');\n            break;\n\n          case 232:\n            b = a.replace(G, 'tb-rl');\n            break;\n\n          case 220:\n            b = a.replace(G, 'lr');\n            break;\n\n          default:\n            return a;\n        }\n\n        return '-webkit-' + a + '-ms-' + b + a;\n\n      case 1017:\n        if (-1 === a.indexOf('sticky', 9)) break;\n\n      case 975:\n        c = (a = d).length - 10;\n        b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n        switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n          case 203:\n            if (111 > b.charCodeAt(8)) break;\n\n          case 115:\n            a = a.replace(b, '-webkit-' + b) + ';' + a;\n            break;\n\n          case 207:\n          case 102:\n            a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n        }\n\n        return a + ';';\n\n      case 938:\n        if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n          case 105:\n            return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n          case 115:\n            return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n          default:\n            return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n        }\n        break;\n\n      case 973:\n      case 989:\n        if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n      case 931:\n      case 953:\n        if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n        break;\n\n      case 962:\n        if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n    }\n\n    return a;\n  }\n\n  function L(d, c) {\n    var e = d.indexOf(1 === c ? ':' : '{'),\n        h = d.substring(0, 3 !== c ? e : 10);\n    e = d.substring(e + 1, d.length - 1);\n    return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n  }\n\n  function ea(d, c) {\n    var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n    return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n  }\n\n  function H(d, c, e, h, a, m, b, v, n, q) {\n    for (var g = 0, x = c, w; g < A; ++g) {\n      switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n        case void 0:\n        case !1:\n        case !0:\n        case null:\n          break;\n\n        default:\n          x = w;\n      }\n    }\n\n    if (x !== c) return x;\n  }\n\n  function T(d) {\n    switch (d) {\n      case void 0:\n      case null:\n        A = S.length = 0;\n        break;\n\n      default:\n        if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n          T(d[c]);\n        } else Y = !!d | 0;\n    }\n\n    return T;\n  }\n\n  function U(d) {\n    d = d.prefix;\n    void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n    return U;\n  }\n\n  function B(d, c) {\n    var e = d;\n    33 > e.charCodeAt(0) && (e = e.trim());\n    V = e;\n    e = [V];\n\n    if (0 < A) {\n      var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n      void 0 !== h && 'string' === typeof h && (c = h);\n    }\n\n    var a = M(O, e, c, 0, 0);\n    0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n    V = '';\n    E = 0;\n    z = D = 1;\n    return a;\n  }\n\n  var ca = /^\\0+/g,\n      N = /[\\0\\r\\f]/g,\n      aa = /: */g,\n      ka = /zoo|gra/,\n      ma = /([,: ])(transform)/g,\n      ia = /,\\r+?/g,\n      F = /([\\t\\r\\n ])*\\f?&/g,\n      fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n      Q = /::(place)/g,\n      ha = /:(read-only)/g,\n      G = /[svh]\\w+-[tblr]{2}/,\n      da = /\\(\\s*(.*)\\s*\\)/g,\n      oa = /([\\s\\S]*?);/g,\n      ba = /-self|flex-/g,\n      na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n      la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n      ja = /([^-])(image-set\\()/,\n      z = 1,\n      D = 1,\n      E = 0,\n      w = 1,\n      O = [],\n      S = [],\n      A = 0,\n      R = null,\n      Y = 0,\n      V = '';\n  B.use = T;\n  B.set = U;\n  void 0 !== W && U(W);\n  return B;\n}\n\nexport default stylis_min;\n", "var weakMemoize = function weakMemoize(func) {\n  // $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps\n  var cache = new WeakMap();\n  return function (arg) {\n    if (cache.has(arg)) {\n      // $FlowFixMe\n      return cache.get(arg);\n    }\n\n    var ret = func(arg);\n    cache.set(arg, ret);\n    return ret;\n  };\n};\n\nexport default weakMemoize;\n", "import { StyleSheet } from '@emotion/sheet';\nimport Stylis from '@emotion/stylis';\nimport '@emotion/weak-memoize';\n\n// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet\n// inlined to avoid umd wrapper and peerDep warnings/installing stylis\n// since we use stylis after closure compiler\nvar delimiter = '/*|*/';\nvar needle = delimiter + '}';\n\nfunction toSheet(block) {\n  if (block) {\n    Sheet.current.insert(block + '}');\n  }\n}\n\nvar Sheet = {\n  current: null\n};\nvar ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {\n  switch (context) {\n    // property\n    case 1:\n      {\n        switch (content.charCodeAt(0)) {\n          case 64:\n            {\n              // @import\n              Sheet.current.insert(content + ';');\n              return '';\n            }\n          // charcode for l\n\n          case 108:\n            {\n              // charcode for b\n              // this ignores label\n              if (content.charCodeAt(2) === 98) {\n                return '';\n              }\n            }\n        }\n\n        break;\n      }\n    // selector\n\n    case 2:\n      {\n        if (ns === 0) return content + delimiter;\n        break;\n      }\n    // at-rule\n\n    case 3:\n      {\n        switch (ns) {\n          // @font-face, @page\n          case 102:\n          case 112:\n            {\n              Sheet.current.insert(selectors[0] + content);\n              return '';\n            }\n\n          default:\n            {\n              return content + (at === 0 ? delimiter : '');\n            }\n        }\n      }\n\n    case -2:\n      {\n        content.split(needle).forEach(toSheet);\n      }\n  }\n};\n\nvar createCache = function createCache(options) {\n  if (options === undefined) options = {};\n  var key = options.key || 'css';\n  var stylisOptions;\n\n  if (options.prefix !== undefined) {\n    stylisOptions = {\n      prefix: options.prefix\n    };\n  }\n\n  var stylis = new Stylis(stylisOptions);\n\n  if (process.env.NODE_ENV !== 'production') {\n    // $FlowFixMe\n    if (/[^a-z-]/.test(key)) {\n      throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n    }\n  }\n\n  var inserted = {}; // $FlowFixMe\n\n  var container;\n\n  {\n    container = options.container || document.head;\n    var nodes = document.querySelectorAll(\"style[data-emotion-\" + key + \"]\");\n    Array.prototype.forEach.call(nodes, function (node) {\n      var attrib = node.getAttribute(\"data-emotion-\" + key); // $FlowFixMe\n\n      attrib.split(' ').forEach(function (id) {\n        inserted[id] = true;\n      });\n\n      if (node.parentNode !== container) {\n        container.appendChild(node);\n      }\n    });\n  }\n\n  var _insert;\n\n  {\n    stylis.use(options.stylisPlugins)(ruleSheet);\n\n    _insert = function insert(selector, serialized, sheet, shouldCache) {\n      var name = serialized.name;\n      Sheet.current = sheet;\n\n      if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n        var map = serialized.map;\n        Sheet.current = {\n          insert: function insert(rule) {\n            sheet.insert(rule + map);\n          }\n        };\n      }\n\n      stylis(selector, serialized.styles);\n\n      if (shouldCache) {\n        cache.inserted[name] = true;\n      }\n    };\n  }\n\n  if (process.env.NODE_ENV !== 'production') {\n    // https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a\n    var commentStart = /\\/\\*/g;\n    var commentEnd = /\\*\\//g;\n    stylis.use(function (context, content) {\n      switch (context) {\n        case -1:\n          {\n            while (commentStart.test(content)) {\n              commentEnd.lastIndex = commentStart.lastIndex;\n\n              if (commentEnd.test(content)) {\n                commentStart.lastIndex = commentEnd.lastIndex;\n                continue;\n              }\n\n              throw new Error('Your styles have an unterminated comment (\"/*\" without corresponding \"*/\").');\n            }\n\n            commentStart.lastIndex = 0;\n            break;\n          }\n      }\n    });\n    stylis.use(function (context, content, selectors) {\n      switch (context) {\n        case -1:\n          {\n            var flag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n            var unsafePseudoClasses = content.match(/(:first|:nth|:nth-last)-child/g);\n\n            if (unsafePseudoClasses && cache.compat !== true) {\n              unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n                var ignoreRegExp = new RegExp(unsafePseudoClass + \".*\\\\/\\\\* \" + flag + \" \\\\*\\\\/\");\n                var ignore = ignoreRegExp.test(content);\n\n                if (unsafePseudoClass && !ignore) {\n                  console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n                }\n              });\n            }\n\n            break;\n          }\n      }\n    });\n  }\n\n  var cache = {\n    key: key,\n    sheet: new StyleSheet({\n      key: key,\n      container: container,\n      nonce: options.nonce,\n      speedy: options.speedy\n    }),\n    nonce: options.nonce,\n    inserted: inserted,\n    registered: {},\n    insert: _insert\n  };\n  return cache;\n};\n\nexport default createCache;\n", "var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n  var rawClassName = '';\n  classNames.split(' ').forEach(function (className) {\n    if (registered[className] !== undefined) {\n      registeredStyles.push(registered[className]);\n    } else {\n      rawClassName += className + \" \";\n    }\n  });\n  return rawClassName;\n}\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n  var className = cache.key + \"-\" + serialized.name;\n\n  if ( // we only need to add the styles to the registered cache if the\n  // class name could be used further down\n  // the tree but if it's a string tag, we know it won't\n  // so we don't have to add it to registered cache.\n  // this improves memory usage since we can avoid storing the whole style string\n  (isStringTag === false || // we need to always store it if we're in compat mode and\n  // in node since emotion-server relies on whether a style is in\n  // the registered cache to know whether a style is global or not\n  // also, note that this check will be dead code eliminated in the browser\n  isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {\n    cache.registered[className] = serialized.styles;\n  }\n\n  if (cache.inserted[serialized.name] === undefined) {\n    var current = serialized;\n\n    do {\n      var maybeStyles = cache.insert(\".\" + className, current, cache.sheet, true);\n\n      current = current.next;\n    } while (current !== undefined);\n  }\n};\n\nexport { getRegisteredStyles, insertStyles };\n", "/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n  // 'm' and 'r' are mixing constants generated offline.\n  // They're not really 'magic', they just happen to work well.\n  // const m = 0x5bd1e995;\n  // const r = 24;\n  // Initialize the hash\n  var h = 0; // Mix 4 bytes at a time into the hash\n\n  var k,\n      i = 0,\n      len = str.length;\n\n  for (; len >= 4; ++i, len -= 4) {\n    k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n    k =\n    /* Math.imul(k, m): */\n    (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n    k ^=\n    /* k >>> r: */\n    k >>> 24;\n    h =\n    /* Math.imul(k, m): */\n    (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n    /* Math.imul(h, m): */\n    (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  } // Handle the last few bytes of the input array\n\n\n  switch (len) {\n    case 3:\n      h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n    case 2:\n      h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n    case 1:\n      h ^= str.charCodeAt(i) & 0xff;\n      h =\n      /* Math.imul(h, m): */\n      (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  } // Do a few final mixes of the hash to ensure the last few\n  // bytes are well-incorporated.\n\n\n  h ^= h >>> 13;\n  h =\n  /* Math.imul(h, m): */\n  (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport default murmur2;\n", "var unitlessKeys = {\n  animationIterationCount: 1,\n  borderImageOutset: 1,\n  borderImageSlice: 1,\n  borderImageWidth: 1,\n  boxFlex: 1,\n  boxFlexGroup: 1,\n  boxOrdinalGroup: 1,\n  columnCount: 1,\n  columns: 1,\n  flex: 1,\n  flexGrow: 1,\n  flexPositive: 1,\n  flexShrink: 1,\n  flexNegative: 1,\n  flexOrder: 1,\n  gridRow: 1,\n  gridRowEnd: 1,\n  gridRowSpan: 1,\n  gridRowStart: 1,\n  gridColumn: 1,\n  gridColumnEnd: 1,\n  gridColumnSpan: 1,\n  gridColumnStart: 1,\n  msGridRow: 1,\n  msGridRowSpan: 1,\n  msGridColumn: 1,\n  msGridColumnSpan: 1,\n  fontWeight: 1,\n  lineHeight: 1,\n  opacity: 1,\n  order: 1,\n  orphans: 1,\n  tabSize: 1,\n  widows: 1,\n  zIndex: 1,\n  zoom: 1,\n  WebkitLineClamp: 1,\n  // SVG-related properties\n  fillOpacity: 1,\n  floodOpacity: 1,\n  stopOpacity: 1,\n  strokeDasharray: 1,\n  strokeDashoffset: 1,\n  strokeMiterlimit: 1,\n  strokeOpacity: 1,\n  strokeWidth: 1\n};\n\nexport default unitlessKeys;\n", "function memoize(fn) {\n  var cache = {};\n  return function (arg) {\n    if (cache[arg] === undefined) cache[arg] = fn(arg);\n    return cache[arg];\n  };\n}\n\nexport default memoize;\n", "import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n  return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n  return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = memoize(function (styleName) {\n  return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n  switch (key) {\n    case 'animation':\n    case 'animationName':\n      {\n        if (typeof value === 'string') {\n          return value.replace(animationRegex, function (match, p1, p2) {\n            cursor = {\n              name: p1,\n              styles: p2,\n              next: cursor\n            };\n            return p1;\n          });\n        }\n      }\n  }\n\n  if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n    return value + 'px';\n  }\n\n  return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n  var contentValuePattern = /(attr|calc|counters?|url)\\(/;\n  var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];\n  var oldProcessStyleValue = processStyleValue;\n  var msPattern = /^-ms-/;\n  var hyphenPattern = /-(.)/g;\n  var hyphenatedCache = {};\n\n  processStyleValue = function processStyleValue(key, value) {\n    if (key === 'content') {\n      if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n        console.error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n      }\n    }\n\n    var processed = oldProcessStyleValue(key, value);\n\n    if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n      hyphenatedCache[key] = true;\n      console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n        return _char.toUpperCase();\n      }) + \"?\");\n    }\n\n    return processed;\n  };\n}\n\nvar shouldWarnAboutInterpolatingClassNameFromCss = true;\n\nfunction handleInterpolation(mergedProps, registered, interpolation, couldBeSelectorInterpolation) {\n  if (interpolation == null) {\n    return '';\n  }\n\n  if (interpolation.__emotion_styles !== undefined) {\n    if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n      throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n    }\n\n    return interpolation;\n  }\n\n  switch (typeof interpolation) {\n    case 'boolean':\n      {\n        return '';\n      }\n\n    case 'object':\n      {\n        if (interpolation.anim === 1) {\n          cursor = {\n            name: interpolation.name,\n            styles: interpolation.styles,\n            next: cursor\n          };\n          return interpolation.name;\n        }\n\n        if (interpolation.styles !== undefined) {\n          var next = interpolation.next;\n\n          if (next !== undefined) {\n            // not the most efficient thing ever but this is a pretty rare case\n            // and there will be very few iterations of this generally\n            while (next !== undefined) {\n              cursor = {\n                name: next.name,\n                styles: next.styles,\n                next: cursor\n              };\n              next = next.next;\n            }\n          }\n\n          var styles = interpolation.styles + \";\";\n\n          if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n            styles += interpolation.map;\n          }\n\n          return styles;\n        }\n\n        return createStringFromObject(mergedProps, registered, interpolation);\n      }\n\n    case 'function':\n      {\n        if (mergedProps !== undefined) {\n          var previousCursor = cursor;\n          var result = interpolation(mergedProps);\n          cursor = previousCursor;\n          return handleInterpolation(mergedProps, registered, result, couldBeSelectorInterpolation);\n        } else if (process.env.NODE_ENV !== 'production') {\n          console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n        }\n\n        break;\n      }\n\n    case 'string':\n      if (process.env.NODE_ENV !== 'production') {\n        var matched = [];\n        var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n          var fakeVarName = \"animation\" + matched.length;\n          matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n          return \"${\" + fakeVarName + \"}\";\n        });\n\n        if (matched.length) {\n          console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n        }\n      }\n\n      break;\n  } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n  if (registered == null) {\n    return interpolation;\n  }\n\n  var cached = registered[interpolation];\n\n  if (process.env.NODE_ENV !== 'production' && couldBeSelectorInterpolation && shouldWarnAboutInterpolatingClassNameFromCss && cached !== undefined) {\n    console.error('Interpolating a className from css`` is not recommended and will cause problems with composition.\\n' + 'Interpolating a className from css`` will be completely unsupported in a future major version of Emotion');\n    shouldWarnAboutInterpolatingClassNameFromCss = false;\n  }\n\n  return cached !== undefined && !couldBeSelectorInterpolation ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n  var string = '';\n\n  if (Array.isArray(obj)) {\n    for (var i = 0; i < obj.length; i++) {\n      string += handleInterpolation(mergedProps, registered, obj[i], false);\n    }\n  } else {\n    for (var _key in obj) {\n      var value = obj[_key];\n\n      if (typeof value !== 'object') {\n        if (registered != null && registered[value] !== undefined) {\n          string += _key + \"{\" + registered[value] + \"}\";\n        } else if (isProcessableValue(value)) {\n          string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n        }\n      } else {\n        if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n          throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n        }\n\n        if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n          for (var _i = 0; _i < value.length; _i++) {\n            if (isProcessableValue(value[_i])) {\n              string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n            }\n          }\n        } else {\n          var interpolated = handleInterpolation(mergedProps, registered, value, false);\n\n          switch (_key) {\n            case 'animation':\n            case 'animationName':\n              {\n                string += processStyleName(_key) + \":\" + interpolated + \";\";\n                break;\n              }\n\n            default:\n              {\n                if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n                  console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n                }\n\n                string += _key + \"{\" + interpolated + \"}\";\n              }\n          }\n        }\n      }\n    }\n  }\n\n  return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*;/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n  sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n  if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n    return args[0];\n  }\n\n  var stringMode = true;\n  var styles = '';\n  cursor = undefined;\n  var strings = args[0];\n\n  if (strings == null || strings.raw === undefined) {\n    stringMode = false;\n    styles += handleInterpolation(mergedProps, registered, strings, false);\n  } else {\n    if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n      console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n    }\n\n    styles += strings[0];\n  } // we start at 1 since we've already handled the first arg\n\n\n  for (var i = 1; i < args.length; i++) {\n    styles += handleInterpolation(mergedProps, registered, args[i], styles.charCodeAt(styles.length - 1) === 46);\n\n    if (stringMode) {\n      if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n        console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n      }\n\n      styles += strings[i];\n    }\n  }\n\n  var sourceMap;\n\n  if (process.env.NODE_ENV !== 'production') {\n    styles = styles.replace(sourceMapPattern, function (match) {\n      sourceMap = match;\n      return '';\n    });\n  } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n  labelPattern.lastIndex = 0;\n  var identifierName = '';\n  var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n  while ((match = labelPattern.exec(styles)) !== null) {\n    identifierName += '-' + // $FlowFixMe we know it's not null\n    match[1];\n  }\n\n  var name = hashString(styles) + identifierName;\n\n  if (process.env.NODE_ENV !== 'production') {\n    // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n    return {\n      name: name,\n      styles: styles,\n      map: sourceMap,\n      next: cursor,\n      toString: function toString() {\n        return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n      }\n    };\n  }\n\n  return {\n    name: name,\n    styles: styles,\n    next: cursor\n  };\n};\n\nexport { serializeStyles };\n", "import { serializeStyles } from '@emotion/serialize';\n\nfunction css() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return serializeStyles(args);\n}\n\nexport default css;\n", "import _inheritsLoose from '@babel/runtime/helpers/inheritsLoose';\nimport { createContext, forwardRef, createElement, Component } from 'react';\nimport createCache from '@emotion/cache';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { StyleSheet } from '@emotion/sheet';\nimport css from '@emotion/css';\nexport { default as css } from '@emotion/css';\n\nvar EmotionCacheContext = createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? createCache() : null);\nvar ThemeContext = createContext({});\nvar CacheProvider = EmotionCacheContext.Provider;\n\nvar withEmotionCache = function withEmotionCache(func) {\n  var render = function render(props, ref) {\n    return createElement(EmotionCacheContext.Consumer, null, function (cache) {\n      return func(props, cache, ref);\n    });\n  }; // $FlowFixMe\n\n\n  return forwardRef(render);\n};\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n  return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar render = function render(cache, props, theme, ref) {\n  var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works\n  // not passing the registered cache to serializeStyles because it would\n  // make certain babel optimisations not possible\n\n  if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n    cssProp = cache.registered[cssProp];\n  }\n\n  var type = props[typePropName];\n  var registeredStyles = [cssProp];\n  var className = '';\n\n  if (typeof props.className === 'string') {\n    className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n  } else if (props.className != null) {\n    className = props.className + \" \";\n  }\n\n  var serialized = serializeStyles(registeredStyles);\n\n  if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n    var labelFromStack = props[labelPropName];\n\n    if (labelFromStack) {\n      serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n    }\n  }\n\n  var rules = insertStyles(cache, serialized, typeof type === 'string');\n  className += cache.key + \"-\" + serialized.name;\n  var newProps = {};\n\n  for (var key in props) {\n    if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n      newProps[key] = props[key];\n    }\n  }\n\n  newProps.ref = ref;\n  newProps.className = className;\n  var ele = createElement(type, newProps);\n\n  return ele;\n};\n\nvar Emotion =\n/* #__PURE__ */\nwithEmotionCache(function (props, cache, ref) {\n  // use Context.read for the theme when it's stable\n  if (typeof props.css === 'function') {\n    return createElement(ThemeContext.Consumer, null, function (theme) {\n      return render(cache, props, theme, ref);\n    });\n  }\n\n  return render(cache, props, null, ref);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n  Emotion.displayName = 'EmotionCssPropInternal';\n} // $FlowFixMe\n\n\nvar jsx = function jsx(type, props) {\n  var args = arguments;\n\n  if (props == null || !hasOwnProperty.call(props, 'css')) {\n    // $FlowFixMe\n    return createElement.apply(undefined, args);\n  }\n\n  if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n  props.css.indexOf(':') !== -1) {\n    throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`\" + props.css + \"`\");\n  }\n\n  var argsLength = args.length;\n  var createElementArgArray = new Array(argsLength);\n  createElementArgArray[0] = Emotion;\n  var newProps = {};\n\n  for (var key in props) {\n    if (hasOwnProperty.call(props, key)) {\n      newProps[key] = props[key];\n    }\n  }\n\n  newProps[typePropName] = type;\n\n  if (process.env.NODE_ENV !== 'production') {\n    var error = new Error();\n\n    if (error.stack) {\n      // chrome\n      var match = error.stack.match(/at (?:Object\\.|)jsx.*\\n\\s+at ([A-Z][A-Za-z$]+) /);\n\n      if (!match) {\n        // safari and firefox\n        match = error.stack.match(/.*\\n([A-Z][A-Za-z$]+)@/);\n      }\n\n      if (match) {\n        newProps[labelPropName] = sanitizeIdentifier(match[1]);\n      }\n    }\n  }\n\n  createElementArgArray[1] = newProps;\n\n  for (var i = 2; i < argsLength; i++) {\n    createElementArgArray[i] = args[i];\n  } // $FlowFixMe\n\n\n  return createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false;\nvar Global =\n/* #__PURE__ */\nwithEmotionCache(function (props, cache) {\n  if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n  // probably using the custom createElement which\n  // means it will be turned into a className prop\n  // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n  props.className || props.css)) {\n    console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n    warnedAboutCssPropForGlobal = true;\n  }\n\n  var styles = props.styles;\n\n  if (typeof styles === 'function') {\n    return createElement(ThemeContext.Consumer, null, function (theme) {\n      var serialized = serializeStyles([styles(theme)]);\n      return createElement(InnerGlobal, {\n        serialized: serialized,\n        cache: cache\n      });\n    });\n  }\n\n  var serialized = serializeStyles([styles]);\n  return createElement(InnerGlobal, {\n    serialized: serialized,\n    cache: cache\n  });\n});\n\n// maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\nvar InnerGlobal =\n/*#__PURE__*/\nfunction (_React$Component) {\n  _inheritsLoose(InnerGlobal, _React$Component);\n\n  function InnerGlobal(props, context, updater) {\n    return _React$Component.call(this, props, context, updater) || this;\n  }\n\n  var _proto = InnerGlobal.prototype;\n\n  _proto.componentDidMount = function componentDidMount() {\n    this.sheet = new StyleSheet({\n      key: this.props.cache.key + \"-global\",\n      nonce: this.props.cache.sheet.nonce,\n      container: this.props.cache.sheet.container\n    }); // $FlowFixMe\n\n    var node = document.querySelector(\"style[data-emotion-\" + this.props.cache.key + \"=\\\"\" + this.props.serialized.name + \"\\\"]\");\n\n    if (node !== null) {\n      this.sheet.tags.push(node);\n    }\n\n    if (this.props.cache.sheet.tags.length) {\n      this.sheet.before = this.props.cache.sheet.tags[0];\n    }\n\n    this.insertStyles();\n  };\n\n  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n    if (prevProps.serialized.name !== this.props.serialized.name) {\n      this.insertStyles();\n    }\n  };\n\n  _proto.insertStyles = function insertStyles$1() {\n    if (this.props.serialized.next !== undefined) {\n      // insert keyframes\n      insertStyles(this.props.cache, this.props.serialized.next, true);\n    }\n\n    if (this.sheet.tags.length) {\n      // if this doesn't exist then it will be null so the style element will be appended\n      var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;\n      this.sheet.before = element;\n      this.sheet.flush();\n    }\n\n    this.props.cache.insert(\"\", this.props.serialized, this.sheet, false);\n  };\n\n  _proto.componentWillUnmount = function componentWillUnmount() {\n    this.sheet.flush();\n  };\n\n  _proto.render = function render() {\n\n    return null;\n  };\n\n  return InnerGlobal;\n}(Component);\n\nvar keyframes = function keyframes() {\n  var insertable = css.apply(void 0, arguments);\n  var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n  return {\n    name: name,\n    styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n    anim: 1,\n    toString: function toString() {\n      return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n    }\n  };\n};\n\nvar classnames = function classnames(args) {\n  var len = args.length;\n  var i = 0;\n  var cls = '';\n\n  for (; i < len; i++) {\n    var arg = args[i];\n    if (arg == null) continue;\n    var toAdd = void 0;\n\n    switch (typeof arg) {\n      case 'boolean':\n        break;\n\n      case 'object':\n        {\n          if (Array.isArray(arg)) {\n            toAdd = classnames(arg);\n          } else {\n            toAdd = '';\n\n            for (var k in arg) {\n              if (arg[k] && k) {\n                toAdd && (toAdd += ' ');\n                toAdd += k;\n              }\n            }\n          }\n\n          break;\n        }\n\n      default:\n        {\n          toAdd = arg;\n        }\n    }\n\n    if (toAdd) {\n      cls && (cls += ' ');\n      cls += toAdd;\n    }\n  }\n\n  return cls;\n};\n\nfunction merge(registered, css, className) {\n  var registeredStyles = [];\n  var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n  if (registeredStyles.length < 2) {\n    return className;\n  }\n\n  return rawClassName + css(registeredStyles);\n}\n\nvar ClassNames = withEmotionCache(function (props, context) {\n  return createElement(ThemeContext.Consumer, null, function (theme) {\n    var hasRendered = false;\n\n    var css = function css() {\n      if (hasRendered && process.env.NODE_ENV !== 'production') {\n        throw new Error('css can only be used during render');\n      }\n\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      var serialized = serializeStyles(args, context.registered);\n\n      {\n        insertStyles(context, serialized, false);\n      }\n\n      return context.key + \"-\" + serialized.name;\n    };\n\n    var cx = function cx() {\n      if (hasRendered && process.env.NODE_ENV !== 'production') {\n        throw new Error('cx can only be used during render');\n      }\n\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      return merge(context.registered, css, classnames(args));\n    };\n\n    var content = {\n      css: css,\n      cx: cx,\n      theme: theme\n    };\n    var ele = props.children(content);\n    hasRendered = true;\n\n    return ele;\n  });\n});\n\nexport { CacheProvider, ClassNames, Global, ThemeContext, jsx, keyframes, withEmotionCache };\n", "function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nmodule.exports = _defineProperty;", "import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n  /* o */\n  && prop.charCodeAt(1) === 110\n  /* n */\n  && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n", "import _defineProperty from '@babel/runtime/helpers/defineProperty';\nimport { createElement } from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { withEmotionCache, ThemeContext } from '@emotion/core';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n  return key !== 'theme' && key !== 'innerRef';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n  return typeof tag === 'string' && // 96 is one less than the char code\n  // for \"a\" so this is checking that\n  // it's a lowercase character\n  tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\n\nvar createStyled = function createStyled(tag, options) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (tag === undefined) {\n      throw new Error('You are trying to create a styled element with an undefined component.\\nYou may have forgotten to import it.');\n    }\n  }\n\n  var identifierName;\n  var shouldForwardProp;\n  var targetClassName;\n\n  if (options !== undefined) {\n    identifierName = options.label;\n    targetClassName = options.target;\n    shouldForwardProp = tag.__emotion_forwardProp && options.shouldForwardProp ? function (propName) {\n      return tag.__emotion_forwardProp(propName) && // $FlowFixMe\n      options.shouldForwardProp(propName);\n    } : options.shouldForwardProp;\n  }\n\n  var isReal = tag.__emotion_real === tag;\n  var baseTag = isReal && tag.__emotion_base || tag;\n\n  if (typeof shouldForwardProp !== 'function' && isReal) {\n    shouldForwardProp = tag.__emotion_forwardProp;\n  }\n\n  var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n  var shouldUseAs = !defaultShouldForwardProp('as');\n  return function () {\n    var args = arguments;\n    var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n    if (identifierName !== undefined) {\n      styles.push(\"label:\" + identifierName + \";\");\n    }\n\n    if (args[0] == null || args[0].raw === undefined) {\n      styles.push.apply(styles, args);\n    } else {\n      if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {\n        console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n      }\n\n      styles.push(args[0][0]);\n      var len = args.length;\n      var i = 1;\n\n      for (; i < len; i++) {\n        if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {\n          console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n        }\n\n        styles.push(args[i], args[0][i]);\n      }\n    } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class\n\n\n    var Styled = withEmotionCache(function (props, context, ref) {\n      return createElement(ThemeContext.Consumer, null, function (theme) {\n        var finalTag = shouldUseAs && props.as || baseTag;\n        var className = '';\n        var classInterpolations = [];\n        var mergedProps = props;\n\n        if (props.theme == null) {\n          mergedProps = {};\n\n          for (var key in props) {\n            mergedProps[key] = props[key];\n          }\n\n          mergedProps.theme = theme;\n        }\n\n        if (typeof props.className === 'string') {\n          className = getRegisteredStyles(context.registered, classInterpolations, props.className);\n        } else if (props.className != null) {\n          className = props.className + \" \";\n        }\n\n        var serialized = serializeStyles(styles.concat(classInterpolations), context.registered, mergedProps);\n        var rules = insertStyles(context, serialized, typeof finalTag === 'string');\n        className += context.key + \"-\" + serialized.name;\n\n        if (targetClassName !== undefined) {\n          className += \" \" + targetClassName;\n        }\n\n        var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(finalTag) : defaultShouldForwardProp;\n        var newProps = {};\n\n        for (var _key in props) {\n          if (shouldUseAs && _key === 'as') continue;\n\n          if ( // $FlowFixMe\n          finalShouldForwardProp(_key)) {\n            newProps[_key] = props[_key];\n          }\n        }\n\n        newProps.className = className;\n        newProps.ref = ref || props.innerRef;\n\n        if (process.env.NODE_ENV !== 'production' && props.innerRef) {\n          console.error('`innerRef` is deprecated and will be removed in a future major version of Emotion, please use the `ref` prop instead' + (identifierName === undefined ? '' : \" in the usage of `\" + identifierName + \"`\"));\n        }\n\n        var ele = createElement(finalTag, newProps);\n\n        return ele;\n      });\n    });\n    Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n    Styled.defaultProps = tag.defaultProps;\n    Styled.__emotion_real = Styled;\n    Styled.__emotion_base = baseTag;\n    Styled.__emotion_styles = styles;\n    Styled.__emotion_forwardProp = shouldForwardProp;\n    Object.defineProperty(Styled, 'toString', {\n      value: function value() {\n        if (targetClassName === undefined && process.env.NODE_ENV !== 'production') {\n          return 'NO_COMPONENT_SELECTOR';\n        } // $FlowFixMe: coerce undefined to string\n\n\n        return \".\" + targetClassName;\n      }\n    });\n\n    Styled.withComponent = function (nextTag, nextOptions) {\n      return createStyled(nextTag, nextOptions !== undefined ? _objectSpread({}, options || {}, {}, nextOptions) : options).apply(void 0, styles);\n    };\n\n    return Styled;\n  };\n};\n\nexport default createStyled;\n", "import styled from '@emotion/styled-base';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nvar newStyled = styled.bind();\ntags.forEach(function (tagName) {\n  newStyled[tagName] = newStyled(tagName);\n});\n\nexport default newStyled;\n", "/*!\n  Copyright (c) 2017 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n// IMPORTANT: any change in this file requires restart of the dev server\nconst grid = 8;\nconst baseFontSizeRaw = 13;\n\nmodule.exports = {\n  colors: {\n    blue: '#4b9fd5',\n    veryLightBlue: '#f2faff',\n    lightBlue: '#cae3f2',\n    darkBlue: '#236a97',\n    veryDarkBlue: '#0E516F',\n    green: '#00aa00',\n    lightGreen: '#b0d513',\n    veryLightGreen: '#f5f9fc',\n    yellow: '#eabe06',\n    orange: '#ed7d20',\n    red: '#d4333f',\n    purple: '#9139d4',\n    white: '#ffffff',\n\n    gray94: '#efefef',\n    gray80: '#cdcdcd',\n    gray71: '#b4b4b4',\n    gray67: '#aaa',\n    gray60: '#999',\n    gray40: '#404040',\n\n    transparentWhite: 'rgba(255,255,255,0.62)',\n    transparentGray: 'rgba(200, 200, 200, 0.5)',\n    transparentBlack: 'rgba(0, 0, 0, 0.25)',\n\n    disableGrayText: '#bbb',\n    disableGrayBorder: '#ddd',\n    disableGrayBg: '#ebebeb',\n\n    barBackgroundColor: '#f3f3f3',\n    barBackgroundColorHighlight: '#f8f8f8',\n    barBorderColor: '#e6e6e6',\n\n    globalNavBarBg: '#262626',\n\n    // table\n    rowHoverHighlight: '#ecf6fe',\n\n    // fonts\n    baseFontColor: '#333',\n    secondFontColor: '#666',\n\n    // forms\n    mandatoryFieldColor: '#a4030f',\n\n    // leak\n    leakPrimaryColor: '#fbf3d5',\n    leakSecondaryColor: '#f1e8cb',\n\n    // issues\n    issueBgColor: '#f2dede',\n    hotspotBgColor: '#eeeff4',\n    issueLocationSelected: '#f4b1b0',\n    issueLocationHighlighted: '#e1e1f2',\n    conciseIssueRed: '#d18582',\n    conciseIssueRedSelected: '#a4030f',\n\n    // coverage\n    lineCoverageRed: '#a4030f',\n    lineCoverageGreen: '#b4dd78',\n\n    // alerts\n    warningIconColor: '#eabe06',\n\n    alertBorderError: '#f4b1b0',\n    alertBackgroundError: '#f2dede',\n    alertTextError: '#862422',\n    alertIconError: '#a4030f',\n\n    alertBorderWarning: '#faebcc',\n    alertBackgroundWarning: '#fcf8e3',\n    alertTextWarning: '#6f4f17',\n    alertIconWarning: '#db781a',\n\n    alertBorderSuccess: '#d6e9c6',\n    alertBackgroundSuccess: '#dff0d8',\n    alertTextSuccess: '#215821',\n    alertIconSuccess: '#6d9867',\n\n    alertBorderInfo: '#b1dff3',\n    alertBackgroundInfo: '#d9edf7',\n    alertTextInfo: '#0e516f',\n    alertIconInfo: '#0271b9',\n\n    // badge\n    badgeBlueBackground: '#2E7CB5',\n    badgeBlueColor: '#FFFFFF',\n    badgeRedBackgroundOnIssue: '#EEC8C8',\n\n    // alm\n    azure: '#0078d7',\n    bitbucket: '#0052CC',\n    github: '#e1e4e8',\n\n    // code/pre\n    codeBackground: '#e6e6e6',\n\n    //promotion\n    darkBackground: '#292929',\n    darkBackgroundSeparator: '#413b3b',\n    darkBackgroundFontColor: '#f6f8fa',\n\n    // sonarcloud\n    sonarcloudOrange500: '#fd6a00',\n    sonarcloudOrange600: '#e26003',\n    sonarcloudOrange700: '#db5700',\n\n    sonarcloudBlack100: '#ffffff',\n    sonarcloudBlack200: '#f9f9fb',\n    sonarcloudBlack250: '#e6e8ea',\n    sonarcloudBlack300: '#cfd3d7',\n    sonarcloudBlack500: '#8a8c8f',\n    sonarcloudBlack700: '#434447',\n    sonarcloudBlack800: '#2d3032',\n    sonarcloudBlack900: '#070706',\n\n    sonarcloudBlue500: '#4c9bd6',\n    sonarcloudBlue600: '#327bb3',\n    sonarcloudBlue900: '#0b3c62',\n\n    sonarcloudBorderGray: 'rgba(207, 211, 215, 0.5)'\n  },\n\n  sizes: {\n    gridSize: `${grid}px`,\n\n    baseFontSize: `${baseFontSizeRaw}px`,\n    verySmallFontSize: '10px',\n    smallFontSize: '12px',\n    mediumFontSize: '14px',\n    bigFontSize: '16px',\n    hugeFontSize: '24px',\n    giganticFontSize: '36px',\n\n    hugeControlHeight: `${5 * grid}px`,\n    largeControlHeight: `${4 * grid}px`,\n    controlHeight: `${3 * grid}px`,\n    smallControlHeight: `${2.5 * grid}px`,\n    tinyControlHeight: `${2 * grid}px`,\n\n    globalNavHeight: `${6 * grid}px`,\n\n    globalNavContentHeight: `${4 * grid}px`,\n\n    maxPageWidth: '1320px',\n    minPageWidth: '1080px',\n    pagePadding: '20px'\n  },\n\n  rawSizes: {\n    grid,\n    baseFontSizeRaw,\n    globalNavHeightRaw: 6 * grid,\n    globalNavContentHeightRaw: 4 * grid,\n    contextNavHeightRaw: 9 * grid\n  },\n\n  fonts: {\n    baseFontFamily: \"'Helvetica Neue', Helvetica, Arial, sans-serif\",\n    systemFontFamily: \"-apple-system,'BlinkMacSystemFont','Helvetica','Arial',sans-serif\",\n    sourceCodeFontFamily: \"Consolas, 'Ubuntu Mono', 'Liberation Mono', Menlo, Courier, monospace\"\n  },\n\n  // z-index\n  // =======\n  //    1 -  100  for page elements (e.g. sidebars, panels)\n  //  101 -  500  for generic page fixed elements (e.g. navigation, workspace)\n  //  501 - 3000  for page ui elements\n  // 3001 - 8000  for generic ui elements (e.g. dropdowns, tooltips)\n  zIndexes: {\n    // common\n    aboveNormalZIndex: '3',\n    normalZIndex: '2',\n    belowNormalZIndex: '1',\n\n    // ui elements\n    pageMainZIndex: '50',\n    pageSideZIndex: '51',\n    pageHeaderZIndex: '55',\n\n    globalBannerZIndex: '60',\n\n    contextbarZIndex: '420',\n\n    tooltipZIndex: '8000',\n\n    dropdownMenuZIndex: '7500',\n\n    processContainerZIndex: '7000',\n\n    modalZIndex: '6001',\n    modalOverlayZIndex: '6000',\n\n    popupZIndex: '5000'\n  },\n\n  others: {\n    defaultShadow: '0 6px 12px rgba(0, 0, 0, 0.175)'\n  }\n};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\nexport interface IconProps extends React.AriaAttributes {\n  className?: string;\n  fill?: string;\n  size?: number;\n}\n\ninterface Props extends React.AriaAttributes {\n  children: React.ReactNode;\n  className?: string;\n  size?: number;\n  style?: React.CSSProperties;\n\n  // try to avoid using these:\n  width?: number;\n  height?: number;\n  viewBox?: string;\n}\n\nexport default function Icon({\n  children,\n  className,\n  size = 16,\n  style,\n  height = size,\n  width = size,\n  viewBox = '0 0 16 16',\n  ...iconProps\n}: Props) {\n  return (\n    <svg\n      className={className}\n      height={height}\n      style={{\n        fillRule: 'evenodd',\n        clipRule: 'evenodd',\n        strokeLinejoin: 'round',\n        strokeMiterlimit: 1.41421,\n        ...style\n      }}\n      version=\"1.1\"\n      viewBox={viewBox}\n      width={width}\n      xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n      xmlSpace=\"preserve\"\n      {...iconProps}>\n      {children}\n    </svg>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nexport default function AlertErrorIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M11.402 10.018q0-0.232-0.17-0.402l-1.616-1.616 1.616-1.616q0.17-0.17 0.17-0.402 0-0.241-0.17-0.411l-0.804-0.804q-0.17-0.17-0.411-0.17-0.232 0-0.402 0.17l-1.616 1.616-1.616-1.616q-0.17-0.17-0.402-0.17-0.241 0-0.411 0.17l-0.804 0.804q-0.17 0.17-0.17 0.411 0 0.232 0.17 0.402l1.616 1.616-1.616 1.616q-0.17 0.17-0.17 0.402 0 0.241 0.17 0.411l0.804 0.804q0.17 0.17 0.411 0.17 0.232 0 0.402-0.17l1.616-1.616 1.616 1.616q0.17 0.17 0.402 0.17 0.241 0 0.411-0.17l0.804-0.804q0.17-0.17 0.17-0.411zM14.857 8q0 1.866-0.92 3.442t-2.496 2.496-3.442 0.92-3.442-0.92-2.496-2.496-0.92-3.442 0.92-3.442 2.496-2.496 3.442-0.92 3.442 0.92 2.496 2.496 0.92 3.442z\"\n        style={{ fill: fill || colors.red }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nexport default function AlertSuccessIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M12.607 6.554q0-0.25-0.161-0.411l-0.813-0.804q-0.17-0.17-0.402-0.17t-0.402 0.17l-3.643 3.634-2.018-2.018q-0.17-0.17-0.402-0.17t-0.402 0.17l-0.813 0.804q-0.161 0.161-0.161 0.411 0 0.241 0.161 0.402l3.232 3.232q0.17 0.17 0.402 0.17 0.241 0 0.411-0.17l4.848-4.848q0.161-0.161 0.161-0.402zM14.857 8q0 1.866-0.92 3.442t-2.496 2.496-3.442 0.92-3.442-0.92-2.496-2.496-0.92-3.442 0.92-3.442 2.496-2.496 3.442-0.92 3.442 0.92 2.496 2.496 0.92 3.442z\"\n        style={{ fill: fill || colors.green }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nexport default function AlertWarnIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 1.143q1.866 0 3.442.92t2.496 2.496.92 3.442-.92 3.442-2.496 2.496-3.442.92-3.442-.92-2.496-2.496-.92-3.442.92-3.442 2.496-2.496T8 1.143zm1.143 11.134v-1.696q0-.125-.08-.21t-.196-.085H7.153q-.116 0-.205.089t-.089.205v1.696q0 .116.089.205t.205.089h1.714q.116 0 .196-.085t.08-.21zm-.018-3.072l.161-5.545q0-.107-.089-.161-.089-.071-.214-.071H7.019q-.125 0-.214.071-.089.054-.089.161l.152 5.545q0 .089.089.156t.214.067h1.652q.125 0 .21-.067t.094-.156z\"\n        style={{ fill: fill || colors.orange }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function InfoIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M10.333 12.375v-1.458a.288.288 0 0 0-.291-.292h-.875V5.958a.288.288 0 0 0-.292-.291H5.958a.288.288 0 0 0-.291.291v1.459c0 .164.127.291.291.291h.875v2.917h-.875a.288.288 0 0 0-.291.292v1.458c0 .164.127.292.291.292h4.084a.288.288 0 0 0 .291-.292zM9.167 4.208V2.75a.288.288 0 0 0-.292-.292h-1.75a.288.288 0 0 0-.292.292v1.458c0 .164.128.292.292.292h1.75a.288.288 0 0 0 .292-.292zM15 8c0 3.865-3.135 7-7 7s-7-3.135-7-7 3.135-7 7-7 7 3.135 7 7z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport './DeferredSpinner.css';\n\ninterface Props {\n  children?: React.ReactNode;\n  className?: string;\n  customSpinner?: JSX.Element;\n  loading?: boolean;\n  placeholder?: boolean;\n  timeout?: number;\n}\n\ninterface State {\n  showSpinner: boolean;\n}\n\nconst DEFAULT_TIMEOUT = 100;\n\nexport default class DeferredSpinner extends React.PureComponent<Props, State> {\n  timer?: number;\n\n  state: State = { showSpinner: false };\n\n  componentDidMount() {\n    if (this.props.loading == null || this.props.loading === true) {\n      this.startTimer();\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.loading === false && this.props.loading === true) {\n      this.stopTimer();\n      this.startTimer();\n    }\n    if (prevProps.loading === true && this.props.loading === false) {\n      this.stopTimer();\n      this.setState({ showSpinner: false });\n    }\n  }\n\n  componentWillUnmount() {\n    this.stopTimer();\n  }\n\n  startTimer = () => {\n    this.timer = window.setTimeout(\n      () => this.setState({ showSpinner: true }),\n      this.props.timeout || DEFAULT_TIMEOUT\n    );\n  };\n\n  stopTimer = () => {\n    window.clearTimeout(this.timer);\n  };\n\n  render() {\n    if (this.state.showSpinner) {\n      return (\n        this.props.customSpinner || (\n          <i className={classNames('deferred-spinner', this.props.className)} />\n        )\n      );\n    }\n    return (\n      this.props.children ||\n      (this.props.placeholder ? (\n        <i className={classNames('deferred-spinner-placeholder', this.props.className)} />\n      ) : null)\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { css } from '@emotion/core';\nimport styled from '@emotion/styled';\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { colors, sizes } from '../../app/theme';\nimport { translate } from '../../helpers/l10n';\nimport AlertErrorIcon from '../icons/AlertErrorIcon';\nimport AlertSuccessIcon from '../icons/AlertSuccessIcon';\nimport AlertWarnIcon from '../icons/AlertWarnIcon';\nimport InfoIcon from '../icons/InfoIcon';\nimport DeferredSpinner from './DeferredSpinner';\n\ntype AlertDisplay = 'banner' | 'inline' | 'block';\nexport type AlertVariant = 'error' | 'warning' | 'success' | 'info' | 'loading';\n\nexport interface AlertProps {\n  display?: AlertDisplay;\n  variant: AlertVariant;\n}\n\ninterface AlertVariantInformation {\n  icon: JSX.Element;\n  color: string;\n  borderColor: string;\n  backGroundColor: string;\n}\n\nconst DOUBLE = 2;\nconst QUADRUPLE = 4;\n\nconst StyledAlertIcon = styled.div<{ isBanner: boolean; variantInfo: AlertVariantInformation }>`\n  flex: 0 0 auto;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: calc(${({ isBanner }) => (isBanner ? DOUBLE : QUADRUPLE)} * ${sizes.gridSize});\n  border-right: ${({ isBanner }) => (!isBanner ? '1px solid' : 'none')};\n  border-color: ${({ variantInfo }) => variantInfo.borderColor};\n`;\n\nconst StyledAlertContent = styled.div`\n  flex: 1 1 auto;\n  overflow: auto;\n  text-align: left;\n  padding: ${sizes.gridSize} calc(2 * ${sizes.gridSize});\n`;\n\nconst alertInnerIsBannerMixin = () => css`\n  min-width: ${sizes.minPageWidth};\n  max-width: ${sizes.maxPageWidth};\n  margin-left: auto;\n  margin-right: auto;\n  padding-left: ${sizes.pagePadding};\n  padding-right: ${sizes.pagePadding};\n  box-sizing: border-box;\n`;\n\nconst StyledAlertInner = styled.div<{ isBanner: boolean }>`\n  display: flex;\n  align-items: stretch;\n  ${({ isBanner }) => (isBanner ? alertInnerIsBannerMixin : null)}\n`;\n\nconst StyledAlert = styled.div<{ isInline: boolean; variantInfo: AlertVariantInformation }>`\n  border: 1px solid;\n  border-radius: 2px;\n  margin-bottom: ${sizes.gridSize};\n  border-color: ${({ variantInfo }) => variantInfo.borderColor};\n  background-color: ${({ variantInfo }) => variantInfo.backGroundColor};\n  color: ${({ variantInfo }) => variantInfo.color};\n  display: ${({ isInline }) => (isInline ? 'inline-block' : 'block')};\n\n  :empty {\n    display: none;\n  }\n\n  a,\n  .button-link {\n    border-color: ${colors.darkBlue};\n  }\n`;\n\nfunction getAlertVariantInfo(variant: AlertVariant): AlertVariantInformation {\n  const variantList: T.Dict<AlertVariantInformation> = {\n    error: {\n      icon: <AlertErrorIcon fill={colors.alertIconError} />,\n      color: colors.alertTextError,\n      borderColor: colors.alertBorderError,\n      backGroundColor: colors.alertBackgroundError\n    },\n    warning: {\n      icon: <AlertWarnIcon fill={colors.alertIconWarning} />,\n      color: colors.alertTextWarning,\n      borderColor: colors.alertBorderWarning,\n      backGroundColor: colors.alertBackgroundWarning\n    },\n    success: {\n      icon: <AlertSuccessIcon fill={colors.alertIconSuccess} />,\n      color: colors.alertTextSuccess,\n      borderColor: colors.alertBorderSuccess,\n      backGroundColor: colors.alertBackgroundSuccess\n    },\n    info: {\n      icon: <InfoIcon fill={colors.alertIconInfo} />,\n      color: colors.alertTextInfo,\n      borderColor: colors.alertBorderInfo,\n      backGroundColor: colors.alertBackgroundInfo\n    },\n    loading: {\n      icon: <DeferredSpinner timeout={0} />,\n      color: colors.alertTextInfo,\n      borderColor: colors.alertBorderInfo,\n      backGroundColor: colors.alertBackgroundInfo\n    }\n  };\n\n  return variantList[variant];\n}\n\nexport function Alert(props: AlertProps & React.HTMLAttributes<HTMLDivElement>) {\n  const { className, display, variant, ...domProps } = props;\n  const isInline = display === 'inline';\n  const isBanner = display === 'banner';\n  const variantInfo = getAlertVariantInfo(variant);\n\n  return (\n    <StyledAlert\n      className={classNames('alert', className)}\n      isInline={isInline}\n      role=\"alert\"\n      aria-label={translate('alert.tooltip', variant)}\n      variantInfo={variantInfo}\n      {...domProps}>\n      <StyledAlertInner isBanner={isBanner}>\n        <StyledAlertIcon isBanner={isBanner} variantInfo={variantInfo}>\n          {variantInfo.icon}\n        </StyledAlertIcon>\n        <StyledAlertContent className=\"alert-content\">{props.children}</StyledAlertContent>\n      </StyledAlertInner>\n    </StyledAlert>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Alert } from '../components/ui/Alert';\nimport { IS_SSR } from '../helpers/browser';\nimport { translate } from '../helpers/l10n';\nimport { requestTryAndRepeatUntil } from '../helpers/request';\n\nexport function lazyLoadComponent<T extends React.ComponentType<any>>(\n  factory: () => Promise<{ default: T }>,\n  displayName?: string\n) {\n  const LazyComponent = React.lazy(() =>\n    requestTryAndRepeatUntil(factory, { max: 2, slowThreshold: 2 }, () => true)\n  );\n\n  function LazyComponentWrapper(props: React.ComponentProps<T>) {\n    if (IS_SSR) {\n      return null;\n    }\n    return (\n      <LazyErrorBoundary>\n        <React.Suspense fallback={null}>\n          <LazyComponent {...props} />\n        </React.Suspense>\n      </LazyErrorBoundary>\n    );\n  }\n\n  LazyComponentWrapper.displayName = displayName;\n  return LazyComponentWrapper;\n}\n\ninterface ErrorBoundaryProps {\n  children: React.ReactNode;\n}\n\ninterface ErrorBoundaryState {\n  hasError: boolean;\n}\n\nexport class LazyErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {\n  state: ErrorBoundaryState = { hasError: false };\n\n  static getDerivedStateFromError() {\n    // Update state so the next render will show the fallback UI.\n    return { hasError: true };\n  }\n\n  render() {\n    if (this.state.hasError) {\n      return <Alert variant=\"error\">{translate('default_error_message')}</Alert>;\n    }\n    return this.props.children;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { createContext } from 'react';\n\nexport interface A11yContextShape {\n  addA11ySkipLink: (link: T.A11ySkipLink) => void;\n  removeA11ySkipLink: (link: T.A11ySkipLink) => void;\n  links: T.A11ySkipLink[];\n}\n\nexport const A11yContext = createContext<A11yContextShape>({\n  addA11ySkipLink: () => {},\n  removeA11ySkipLink: () => {},\n  links: []\n});\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { A11yContext } from './A11yContext';\n\ninterface Props {\n  anchor: string;\n  label?: string;\n  weight?: number;\n}\n\nexport default function A11ySkipTarget(props: Props) {\n  return (\n    <A11yContext.Consumer>\n      {({ addA11ySkipLink, removeA11ySkipLink }) => (\n        <A11ySkipTargetInner\n          addA11ySkipLink={addA11ySkipLink}\n          removeA11ySkipLink={removeA11ySkipLink}\n          {...props}\n        />\n      )}\n    </A11yContext.Consumer>\n  );\n}\n\ninterface InnerProps {\n  addA11ySkipLink: (link: T.A11ySkipLink) => void;\n  removeA11ySkipLink: (link: T.A11ySkipLink) => void;\n}\n\nexport class A11ySkipTargetInner extends React.PureComponent<Props & InnerProps> {\n  componentDidMount() {\n    this.props.addA11ySkipLink(this.getLink());\n  }\n\n  componentWillUnmount() {\n    this.props.removeA11ySkipLink(this.getLink());\n  }\n\n  getLink = (): T.A11ySkipLink => {\n    const { anchor: key, label = translate('skip_to_content'), weight } = this.props;\n    return { key, label, weight };\n  };\n\n  render() {\n    const { anchor } = this.props;\n    return <span id={`a11y_target__${anchor}`} />;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { createContext } from 'react';\n\ninterface SuggestionsContextShape {\n  addSuggestions: (key: string) => void;\n  removeSuggestions: (key: string) => void;\n  suggestions: T.SuggestionLink[];\n}\n\nexport const SuggestionsContext = createContext<SuggestionsContextShape>({\n  addSuggestions: () => {},\n  removeSuggestions: () => {},\n  suggestions: []\n});\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { SuggestionsContext } from './SuggestionsContext';\n\ninterface Props {\n  suggestions: string;\n}\n\nexport default function Suggestions({ suggestions }: Props) {\n  return (\n    <SuggestionsContext.Consumer>\n      {({ addSuggestions, removeSuggestions }) => (\n        <SuggestionsInner\n          addSuggestions={addSuggestions}\n          removeSuggestions={removeSuggestions}\n          suggestions={suggestions}\n        />\n      )}\n    </SuggestionsContext.Consumer>\n  );\n}\n\ninterface SuggestionsInnerProps {\n  addSuggestions: (key: string) => void;\n  removeSuggestions: (key: string) => void;\n  suggestions: string;\n}\n\nclass SuggestionsInner extends React.PureComponent<SuggestionsInnerProps> {\n  componentDidMount() {\n    this.props.addSuggestions(this.props.suggestions);\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.suggestions !== this.props.suggestions) {\n      this.props.removeSuggestions(this.props.suggestions);\n      this.props.addSuggestions(prevProps.suggestions);\n    }\n  }\n\n  componentWillUnmount() {\n    this.props.removeSuggestions(this.props.suggestions);\n  }\n\n  render() {\n    return null;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniqueId } from 'lodash';\nimport { Dispatch } from 'redux';\nimport { ActionType } from './utils/actions';\n\nenum MessageLevel {\n  Error = 'ERROR',\n  Success = 'SUCCESS'\n}\n\ninterface Message {\n  id: string;\n  message: string;\n  level: MessageLevel;\n}\n\nfunction addGlobalMessageActionCreator(id: string, message: string, level: MessageLevel) {\n  return { type: 'ADD_GLOBAL_MESSAGE', message, level, id };\n}\n\nexport function closeGlobalMessage(id: string) {\n  return { type: 'CLOSE_GLOBAL_MESSAGE', id };\n}\n\nexport function closeAllGlobalMessages() {\n  return { type: 'CLOSE_ALL_GLOBAL_MESSAGES' };\n}\n\ntype Action =\n  | ActionType<typeof addGlobalMessageActionCreator, 'ADD_GLOBAL_MESSAGE'>\n  | ActionType<typeof closeGlobalMessage, 'CLOSE_GLOBAL_MESSAGE'>\n  | ActionType<typeof closeAllGlobalMessages, 'CLOSE_ALL_GLOBAL_MESSAGES'>;\n\nfunction addGlobalMessage(message: string, level: MessageLevel) {\n  return (dispatch: Dispatch) => {\n    const id = uniqueId('global-message-');\n    dispatch(addGlobalMessageActionCreator(id, message, level));\n    setTimeout(() => dispatch(closeGlobalMessage(id)), 5000);\n  };\n}\n\nexport function addGlobalErrorMessage(message: string) {\n  return addGlobalMessage(message, MessageLevel.Error);\n}\n\nexport function addGlobalSuccessMessage(message: string) {\n  return addGlobalMessage(message, MessageLevel.Success);\n}\n\nexport type State = Message[];\n\nexport default function(state: State = [], action: Action): State {\n  switch (action.type) {\n    case 'ADD_GLOBAL_MESSAGE':\n      return [{ id: action.id, message: action.message, level: action.level }];\n\n    case 'CLOSE_GLOBAL_MESSAGE':\n      return state.filter(message => message.id !== action.id);\n\n    case 'CLOSE_ALL_GLOBAL_MESSAGES':\n      return [];\n    default:\n      return state;\n  }\n}\n\nexport function getGlobalMessages(state: State) {\n  return state;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { differenceInYears } from 'date-fns';\nimport { sortBy } from 'lodash';\nimport { Profile as BaseProfile } from '../../api/quality-profiles';\nimport { isValidDate, parseDate } from '../../helpers/dates';\nimport { Profile } from './types';\n\nexport function sortProfiles(profiles: BaseProfile[]): Profile[] {\n  const result: Profile[] = [];\n  const sorted = sortBy(profiles, 'name');\n\n  function retrieveChildren(parent: BaseProfile | null) {\n    return sorted.filter(\n      p => (parent == null && p.parentKey == null) || (parent != null && p.parentKey === parent.key)\n    );\n  }\n\n  function putProfile(profile: BaseProfile | null = null, depth: number = 1) {\n    const children = retrieveChildren(profile);\n\n    if (profile != null) {\n      result.push({ ...profile, childrenCount: children.length, depth });\n    }\n\n    children.forEach(child => putProfile(child, depth + 1));\n  }\n\n  sorted\n    .filter(\n      profile => profile.parentKey == null || sorted.find(p => p.key === profile.parentKey) == null\n    )\n    .forEach(profile => putProfile(profile));\n\n  return result;\n}\n\nexport function isStagnant(profile: Profile): boolean {\n  if (profile.rulesUpdatedAt) {\n    const updateDate = parseDate(profile.rulesUpdatedAt);\n    if (isValidDate(updateDate)) {\n      return differenceInYears(new Date(), updateDate) >= 1;\n    }\n  }\n  return false;\n}\n\nexport const PROFILE_PATH = '/profiles';\n\nexport const getProfilesForLanguagePath = (language: string) => ({\n  pathname: PROFILE_PATH,\n  query: { language }\n});\n\nexport const getProfilePath = (name: string, language: string) => ({\n  pathname: `${PROFILE_PATH}/show`,\n  query: { name, language }\n});\n\nexport const getProfileComparePath = (name: string, language: string, withKey?: string) => {\n  const query = { language, name };\n  if (withKey) {\n    Object.assign(query, { withKey });\n  }\n  return {\n    pathname: `${PROFILE_PATH}/compare`,\n    query\n  };\n};\n\nexport const getProfileChangelogPath = (\n  name: string,\n  language: string,\n  filter?: { since?: string; to?: string }\n) => {\n  const query = { language, name };\n  if (filter) {\n    if (filter.since) {\n      Object.assign(query, { since: filter.since });\n    }\n    if (filter.to) {\n      Object.assign(query, { to: filter.to });\n    }\n  }\n  return {\n    pathname: `${PROFILE_PATH}/changelog`,\n    query\n  };\n};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum Visibility {\n  Public = 'public',\n  Private = 'private'\n}\n\nexport enum ComponentQualifier {\n  Application = 'APP',\n  Directory = 'DIR',\n  Developper = 'DEV',\n  File = 'FIL',\n  Portfolio = 'VW',\n  Project = 'TRK',\n  SubPortfolio = 'SVW',\n  SubProject = 'BRC',\n  TestFile = 'UTS'\n}\n\nexport enum ProjectKeyValidationResult {\n  Valid = 'valid',\n  Empty = 'empty',\n  TooLong = 'too_long',\n  InvalidChar = 'invalid_char',\n  OnlyDigits = 'only_digits'\n}\n\nexport interface TreeComponent extends T.LightComponent {\n  id?: string;\n  name: string;\n  path?: string;\n  refId?: string;\n  refKey?: string;\n  tags?: string[];\n  visibility: T.Visibility;\n}\n\nexport interface TreeComponentWithPath extends TreeComponent {\n  path: string;\n}\n\nexport function isPortfolioLike(\n  componentQualifier?: string | ComponentQualifier\n): componentQualifier is ComponentQualifier.Portfolio | ComponentQualifier.SubPortfolio {\n  return Boolean(\n    componentQualifier &&\n      [\n        ComponentQualifier.Portfolio.toString(),\n        ComponentQualifier.SubPortfolio.toString()\n      ].includes(componentQualifier)\n  );\n}\n\nexport function isApplication(\n  componentQualifier?: string | ComponentQualifier\n): componentQualifier is ComponentQualifier.Application {\n  return componentQualifier === ComponentQualifier.Application;\n}\n\nexport function isProject(\n  componentQualifier?: string | ComponentQualifier\n): componentQualifier is ComponentQualifier.Project {\n  return componentQualifier === ComponentQualifier.Project;\n}\n\nexport function isFile(componentQualifier?: string | ComponentQualifier): boolean {\n  return [ComponentQualifier.File, ComponentQualifier.TestFile].includes(\n    componentQualifier as ComponentQualifier\n  );\n}\n\nexport function isView(componentQualifier?: string | ComponentQualifier): boolean {\n  return [\n    ComponentQualifier.Portfolio,\n    ComponentQualifier.SubPortfolio,\n    ComponentQualifier.Application\n  ].includes(componentQualifier as ComponentQualifier);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum SecurityStandard {\n  OWASP_TOP10 = 'owaspTop10',\n  SANS_TOP25 = 'sansTop25',\n  SONARSOURCE = 'sonarsourceSecurity',\n  CWE = 'cwe'\n}\n\nexport type StandardType = SecurityStandard;\n\nexport type Standards = {\n  [key in StandardType]: T.Dict<{ title: string; description?: string }>;\n};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { orderBy } from 'lodash';\nimport {\n  Branch,\n  BranchLike,\n  BranchLikeTree,\n  BranchParameters,\n  MainBranch,\n  PullRequest\n} from '../types/branch-like';\n\nexport function isBranch(branchLike?: BranchLike): branchLike is Branch {\n  return branchLike !== undefined && (branchLike as Branch).isMain !== undefined;\n}\n\nexport function isMainBranch(branchLike?: BranchLike): branchLike is MainBranch {\n  return isBranch(branchLike) && branchLike.isMain;\n}\n\nexport function sortBranches(branches: Branch[]) {\n  return orderBy(branches, [b => b.isMain, b => b.name], ['desc', 'asc']);\n}\n\nexport function isPullRequest(branchLike?: BranchLike): branchLike is PullRequest {\n  return branchLike !== undefined && (branchLike as PullRequest).key !== undefined;\n}\n\nexport function sortPullRequests(pullRequests: PullRequest[]) {\n  return orderBy(pullRequests, pr => getPullRequestDisplayName(pr));\n}\n\nexport function getPullRequestDisplayName(pullRequest: PullRequest) {\n  return `${pullRequest.key} \u2013 ${pullRequest.title}`;\n}\n\nexport function getBranchLikeDisplayName(branchLike: BranchLike) {\n  return isPullRequest(branchLike) ? getPullRequestDisplayName(branchLike) : branchLike.name;\n}\n\nexport function getBranchLikeKey(branchLike: BranchLike) {\n  return isPullRequest(branchLike) ? `pull-request-${branchLike.key}` : `branch-${branchLike.name}`;\n}\n\nexport function isSameBranchLike(a: BranchLike | undefined, b: BranchLike | undefined) {\n  // main branches are always equal\n  if (isMainBranch(a) && isMainBranch(b)) {\n    return true;\n  }\n\n  // Branches are compared by name\n  if (isBranch(a) && isBranch(b)) {\n    return a.name === b.name;\n  }\n\n  // pull requests are compared by id\n  if (isPullRequest(a) && isPullRequest(b)) {\n    return a.key === b.key;\n  }\n\n  // finally if both parameters are `undefined`, consider them equal\n  return a === b;\n}\n\nexport function getBrancheLikesAsTree(branchLikes: BranchLike[]): BranchLikeTree {\n  const mainBranch = branchLikes.find(isMainBranch);\n  const branches = orderBy(\n    branchLikes.filter(isBranch).filter(b => !isMainBranch(b)),\n    b => b.name\n  );\n  const pullRequests = orderBy(branchLikes.filter(isPullRequest), b => b.key);\n  const parentlessPullRequests = pullRequests.filter(\n    pr => !pr.isOrphan && ![mainBranch, ...branches].find(b => !!b && b.name === pr.base)\n  );\n  const orphanPullRequests = pullRequests.filter(pr => pr.isOrphan);\n\n  const tree: BranchLikeTree = {\n    branchTree: branches.map(b => ({ branch: b, pullRequests: getPullRequests(b) })),\n    parentlessPullRequests,\n    orphanPullRequests\n  };\n\n  if (mainBranch) {\n    tree.mainBranchTree = {\n      branch: mainBranch,\n      pullRequests: getPullRequests(mainBranch)\n    };\n  }\n\n  return tree;\n\n  function getPullRequests(branch: Branch) {\n    return pullRequests.filter(pr => !pr.isOrphan && pr.base === branch.name);\n  }\n}\n\nexport function getBranchLikeQuery(branchLike?: BranchLike): BranchParameters {\n  if (isBranch(branchLike) && !isMainBranch(branchLike)) {\n    return { branch: branchLike.name };\n  } else if (isPullRequest(branchLike)) {\n    return { pullRequest: branchLike.key };\n  } else {\n    return {};\n  }\n}\n\n// Create branch object from branch name or pull request key\nexport function fillBranchLike(\n  branch?: string,\n  pullRequest?: string\n): Branch | PullRequest | undefined {\n  if (branch) {\n    return {\n      isMain: false,\n      name: branch\n    } as Branch;\n  } else if (pullRequest) {\n    return { base: '', branch: '', key: pullRequest, title: '' } as PullRequest;\n  }\n  return undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isNil, omitBy, pick } from 'lodash';\nimport { getProfilePath } from '../apps/quality-profiles/utils';\nimport { BranchLike, BranchParameters } from '../types/branch-like';\nimport { ComponentQualifier, isApplication, isPortfolioLike } from '../types/component';\nimport { MeasurePageView } from '../types/measures';\nimport { GraphType } from '../types/project-activity';\nimport { SecurityStandard } from '../types/security';\nimport { getBranchLikeQuery, isBranch, isMainBranch, isPullRequest } from './branch-like';\nimport { IS_SSR } from './browser';\nimport { getBaseUrl } from './system';\n\nexport interface Location {\n  pathname: string;\n  query?: T.Dict<string | undefined | number>;\n}\n\ntype Query = Location['query'];\n\nexport function getComponentOverviewUrl(\n  componentKey: string,\n  componentQualifier: ComponentQualifier | string,\n  branchParameters?: BranchParameters\n) {\n  return isPortfolioLike(componentQualifier)\n    ? getPortfolioUrl(componentKey)\n    : getProjectQueryUrl(componentKey, branchParameters);\n}\n\nexport function getComponentAdminUrl(\n  componentKey: string,\n  componentQualifier: ComponentQualifier | string\n) {\n  if (isPortfolioLike(componentQualifier)) {\n    return getPortfolioAdminUrl(componentKey);\n  } else if (isApplication(componentQualifier)) {\n    return getApplicationAdminUrl(componentKey);\n  } else {\n    return getProjectUrl(componentKey);\n  }\n}\n\nexport function getProjectUrl(project: string, branch?: string): Location {\n  return { pathname: '/dashboard', query: { id: project, branch } };\n}\n\nexport function getProjectQueryUrl(project: string, branchParameters?: BranchParameters): Location {\n  return { pathname: '/dashboard', query: { id: project, ...branchParameters } };\n}\n\nexport function getPortfolioUrl(key: string): Location {\n  return { pathname: '/portfolio', query: { id: key } };\n}\n\nexport function getPortfolioAdminUrl(key: string) {\n  return {\n    pathname: '/project/admin/extension/governance/console',\n    query: { id: key, qualifier: ComponentQualifier.Portfolio }\n  };\n}\n\nexport function getApplicationAdminUrl(key: string) {\n  return { pathname: '/application/console', query: { id: key } };\n}\n\nexport function getComponentBackgroundTaskUrl(componentKey: string, status?: string): Location {\n  return { pathname: '/project/background_tasks', query: { id: componentKey, status } };\n}\n\nexport function getBranchLikeUrl(project: string, branchLike?: BranchLike): Location {\n  if (isPullRequest(branchLike)) {\n    return getPullRequestUrl(project, branchLike.key);\n  } else if (isBranch(branchLike) && !isMainBranch(branchLike)) {\n    return getBranchUrl(project, branchLike.name);\n  } else {\n    return getProjectUrl(project);\n  }\n}\n\nexport function getBranchUrl(project: string, branch: string): Location {\n  return { pathname: '/dashboard', query: { branch, id: project } };\n}\n\nexport function getPullRequestUrl(project: string, pullRequest: string): Location {\n  return { pathname: '/dashboard', query: { id: project, pullRequest } };\n}\n\n/**\n * Generate URL for a global issues page\n */\nexport function getIssuesUrl(query: Query): Location {\n  const pathname = '/issues';\n  return { pathname, query };\n}\n\n/**\n * Generate URL for a component's issues page\n */\nexport function getComponentIssuesUrl(componentKey: string, query?: Query): Location {\n  return { pathname: '/project/issues', query: { ...(query || {}), id: componentKey } };\n}\n\n/**\n * Generate URL for a component's security hotspot page\n */\nexport function getComponentSecurityHotspotsUrl(componentKey: string, query: Query = {}): Location {\n  const { branch, pullRequest, sinceLeakPeriod, hotspots, assignedToMe, file } = query;\n  return {\n    pathname: '/security_hotspots',\n    query: {\n      id: componentKey,\n      branch,\n      pullRequest,\n      sinceLeakPeriod,\n      hotspots,\n      assignedToMe,\n      file,\n      ...pick(query, [\n        SecurityStandard.SONARSOURCE,\n        SecurityStandard.OWASP_TOP10,\n        SecurityStandard.SANS_TOP25,\n        SecurityStandard.CWE\n      ])\n    }\n  };\n}\n\n/**\n * Generate URL for a component's drilldown page\n */\nexport function getComponentDrilldownUrl(options: {\n  componentKey: string;\n  metric: string;\n  branchLike?: BranchLike;\n  selectionKey?: string;\n  treemapView?: boolean;\n  listView?: boolean;\n}): Location {\n  const { componentKey, metric, branchLike, selectionKey, treemapView, listView } = options;\n  const query: Query = { id: componentKey, metric, ...getBranchLikeQuery(branchLike) };\n  if (treemapView) {\n    query.view = 'treemap';\n  }\n  if (listView) {\n    query.view = 'list';\n  }\n  if (selectionKey) {\n    query.selected = selectionKey;\n  }\n  return { pathname: '/component_measures', query };\n}\n\nexport function getComponentDrilldownUrlWithSelection(\n  componentKey: string,\n  selectionKey: string,\n  metric: string,\n  branchLike?: BranchLike,\n  view?: MeasurePageView\n): Location {\n  return getComponentDrilldownUrl({\n    componentKey,\n    selectionKey,\n    metric,\n    branchLike,\n    treemapView: view === 'treemap',\n    listView: view === 'list'\n  });\n}\n\nexport function getMeasureTreemapUrl(componentKey: string, metric: string) {\n  return getComponentDrilldownUrl({ componentKey, metric, treemapView: true });\n}\n\nexport function getActivityUrl(component: string, branchLike?: BranchLike, graph?: GraphType) {\n  return {\n    pathname: '/project/activity',\n    query: { id: component, graph, ...getBranchLikeQuery(branchLike) }\n  };\n}\n\n/**\n * Generate URL for a component's measure history\n */\nexport function getMeasureHistoryUrl(component: string, metric: string, branchLike?: BranchLike) {\n  return {\n    pathname: '/project/activity',\n    query: {\n      id: component,\n      graph: 'custom',\n      custom_metrics: metric,\n      ...getBranchLikeQuery(branchLike)\n    }\n  };\n}\n\n/**\n * Generate URL for a component's permissions page\n */\nexport function getComponentPermissionsUrl(componentKey: string): Location {\n  return { pathname: '/project_roles', query: { id: componentKey } };\n}\n\n/**\n * Generate URL for a quality profile\n */\nexport function getQualityProfileUrl(name: string, language: string): Location {\n  return getProfilePath(name, language);\n}\n\nexport function getQualityGateUrl(key: string): Location {\n  return {\n    pathname: '/quality_gates/show/' + encodeURIComponent(key)\n  };\n}\n\nexport function getQualityGatesUrl(): Location {\n  return {\n    pathname: '/quality_gates'\n  };\n}\n\nexport function getGlobalSettingsUrl(\n  category?: string,\n  query?: T.Dict<string | undefined | number>\n): Location {\n  return {\n    pathname: '/admin/settings',\n    query: { category, ...query }\n  };\n}\n\nexport function getProjectSettingsUrl(id: string, category?: string): Location {\n  return {\n    pathname: '/project/settings',\n    query: { id, category }\n  };\n}\n\n/**\n * Generate URL for the rules page\n */\nexport function getRulesUrl(query: Query): Location {\n  return { pathname: '/coding_rules', query };\n}\n\n/**\n * Generate URL for the rules page filtering only active deprecated rules\n */\nexport function getDeprecatedActiveRulesUrl(query: Query = {}): Location {\n  const baseQuery = { activation: 'true', statuses: 'DEPRECATED' };\n  return getRulesUrl({ ...query, ...baseQuery });\n}\n\nexport function getRuleUrl(rule: string) {\n  return getRulesUrl({ open: rule, rule_key: rule });\n}\n\nexport function getFormattingHelpUrl(): string {\n  return getBaseUrl() + '/formatting/help';\n}\n\nexport function getCodeUrl(\n  project: string,\n  branchLike?: BranchLike,\n  selected?: string,\n  line?: number\n): Location {\n  return {\n    pathname: '/code',\n    query: { id: project, ...getBranchLikeQuery(branchLike), selected, line: line?.toFixed() }\n  };\n}\n\nexport function getHomePageUrl(homepage: T.HomePage) {\n  switch (homepage.type) {\n    case 'APPLICATION':\n      return homepage.branch\n        ? getProjectUrl(homepage.component, homepage.branch)\n        : getProjectUrl(homepage.component);\n    case 'PROJECT':\n      return homepage.branch\n        ? getBranchUrl(homepage.component, homepage.branch)\n        : getProjectUrl(homepage.component);\n    case 'PORTFOLIO':\n      return getPortfolioUrl(homepage.component);\n    case 'PORTFOLIOS':\n      return '/portfolios';\n    case 'MY_PROJECTS':\n      return '/projects';\n    case 'ISSUES':\n    case 'MY_ISSUES':\n      return { pathname: '/issues', query: { resolved: 'false' } };\n  }\n\n  // should never happen, but just in case...\n  return '/projects';\n}\n\nexport function convertGithubApiUrlToLink(url: string) {\n  return url\n    .replace(/^https?:\\/\\/api\\.github\\.com/, 'https://github.com') // GH.com\n    .replace(/\\/api\\/v\\d+\\/?$/, ''); // GH Enterprise\n}\n\nexport function stripTrailingSlash(url: string) {\n  return url.replace(/\\/$/, '');\n}\n\nexport function getHostUrl(): string {\n  if (IS_SSR) {\n    throw new Error('No host url available on server side.');\n  }\n  return window.location.origin + getBaseUrl();\n}\n\nexport function getPathUrlAsString(path: Location, internal = true): string {\n  return `${internal ? getBaseUrl() : getHostUrl()}${path.pathname}?${new URLSearchParams(\n    omitBy(path.query, isNil)\n  ).toString()}`;\n}\n\nexport function getReturnUrl(location: { hash?: string; query?: { return_to?: string } }) {\n  const returnTo = location.query && location.query['return_to'];\n  if (isRelativeUrl(returnTo)) {\n    return returnTo + (location.hash ? location.hash : '');\n  }\n  return getBaseUrl() + '/';\n}\n\nexport function isRelativeUrl(url?: string): boolean {\n  const regex = new RegExp(/^\\/[^/\\\\]/);\n  return Boolean(url && regex.test(url));\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const enum AlmKeys {\n  Azure = 'azure',\n  BitbucketServer = 'bitbucket',\n  BitbucketCloud = 'bitbucketcloud',\n  GitHub = 'github',\n  GitLab = 'gitlab'\n}\n\nexport type AlmBindingDefinition =\n  | AzureBindingDefinition\n  | GithubBindingDefinition\n  | GitlabBindingDefinition\n  | BitbucketServerBindingDefinition\n  | BitbucketCloudBindingDefinition;\n\nexport interface AlmBindingDefinitionBase {\n  key: string;\n  url?: string;\n}\n\nexport interface AzureBindingDefinition extends AlmBindingDefinitionBase {\n  personalAccessToken: string;\n  url?: string;\n}\n\nexport interface BitbucketServerBindingDefinition extends AlmBindingDefinitionBase {\n  personalAccessToken: string;\n  url: string;\n}\n\nexport interface BitbucketCloudBindingDefinition extends AlmBindingDefinitionBase {\n  clientId: string;\n  clientSecret: string;\n  workspace: string;\n}\n\nexport interface GithubBindingDefinition extends AlmBindingDefinitionBase {\n  appId: string;\n  clientId: string;\n  clientSecret: string;\n  privateKey: string;\n  url: string;\n}\n\nexport interface GitlabBindingDefinition extends AlmBindingDefinitionBase {\n  personalAccessToken: string;\n  url?: string;\n}\n\nexport interface ProjectAlmBindingResponse {\n  alm: AlmKeys;\n  key: string;\n  repository?: string;\n  slug?: string;\n  summaryCommentEnabled?: boolean;\n  monorepo: boolean;\n}\n\nexport interface ProjectAzureBindingResponse extends ProjectAlmBindingResponse {\n  alm: AlmKeys.Azure;\n  repository: string;\n  slug: string;\n  url: string;\n}\n\nexport interface ProjectBitbucketBindingResponse extends ProjectAlmBindingResponse {\n  alm: AlmKeys.BitbucketServer;\n  repository: string;\n  slug: string;\n}\n\nexport interface ProjectBitbucketCloudBindingResponse extends ProjectAlmBindingResponse {\n  alm: AlmKeys.BitbucketCloud;\n  repository: string;\n}\n\nexport interface ProjectGitHubBindingResponse extends ProjectAlmBindingResponse {\n  alm: AlmKeys.GitHub;\n  repository: string;\n}\n\nexport interface ProjectGitLabBindingResponse extends ProjectAlmBindingResponse {\n  alm: AlmKeys.GitLab;\n  repository: string;\n  url: string;\n}\n\nexport interface ProjectAlmBindingParams {\n  almSetting: string;\n  project: string;\n  monorepo: boolean;\n}\n\nexport interface AzureProjectAlmBindingParams extends ProjectAlmBindingParams {\n  projectName: string;\n  repositoryName: string;\n}\n\nexport interface BitbucketProjectAlmBindingParams extends ProjectAlmBindingParams {\n  repository: string;\n  slug: string;\n}\n\nexport interface BitbucketCloudProjectAlmBindingParams extends ProjectAlmBindingParams {\n  repository: string;\n}\n\nexport interface GithubProjectAlmBindingParams extends ProjectAlmBindingParams {\n  repository: string;\n  summaryCommentEnabled: boolean;\n}\n\nexport interface GitlabProjectAlmBindingParams extends ProjectAlmBindingParams {\n  repository?: string;\n}\n\nexport interface AlmSettingsInstance {\n  alm: AlmKeys;\n  key: string;\n  url?: string;\n}\n\nexport interface AlmSettingsBindingDefinitions {\n  [AlmKeys.Azure]: AzureBindingDefinition[];\n  [AlmKeys.BitbucketServer]: BitbucketServerBindingDefinition[];\n  [AlmKeys.BitbucketCloud]: BitbucketCloudBindingDefinition[];\n  [AlmKeys.GitHub]: GithubBindingDefinition[];\n  [AlmKeys.GitLab]: GitlabBindingDefinition[];\n}\n\nexport interface AlmSettingsBindingStatus {\n  alertSuccess: boolean;\n  failureMessage: string;\n  type: AlmSettingsBindingStatusType;\n}\n\nexport enum AlmSettingsBindingStatusType {\n  Validating,\n  Success,\n  Failure,\n  Warning\n}\n\nexport enum ProjectAlmBindingConfigurationErrorScope {\n  Global = 'GLOBAL',\n  Project = 'PROJECT',\n  Unknown = 'UNKNOWN'\n}\n\nexport interface ProjectAlmBindingConfigurationErrors {\n  scope: ProjectAlmBindingConfigurationErrorScope;\n  errors: { msg: string }[];\n}\n\nexport function isProjectBitbucketBindingResponse(\n  binding: ProjectAlmBindingResponse\n): binding is ProjectBitbucketBindingResponse {\n  return binding.alm === AlmKeys.BitbucketServer;\n}\n\nexport function isProjectBitbucketCloudBindingResponse(\n  binding: ProjectAlmBindingResponse\n): binding is ProjectBitbucketBindingResponse {\n  return binding.alm === AlmKeys.BitbucketCloud;\n}\n\nexport function isProjectGitHubBindingResponse(\n  binding: ProjectAlmBindingResponse\n): binding is ProjectGitHubBindingResponse {\n  return binding.alm === AlmKeys.GitHub;\n}\n\nexport function isProjectGitLabBindingResponse(\n  binding: ProjectAlmBindingResponse\n): binding is ProjectGitLabBindingResponse {\n  return binding.alm === AlmKeys.GitLab;\n}\n\nexport function isProjectAzureBindingResponse(\n  binding: ProjectAlmBindingResponse\n): binding is ProjectAzureBindingResponse {\n  return binding.alm === AlmKeys.Azure;\n}\n\nexport function isBitbucketBindingDefinition(\n  binding?: AlmBindingDefinitionBase & { url?: string }\n): binding is BitbucketServerBindingDefinition {\n  return binding !== undefined && binding.url !== undefined;\n}\n\nexport function isBitbucketCloudBindingDefinition(\n  binding?: AlmBindingDefinitionBase & { clientId?: string; workspace?: string }\n): binding is BitbucketCloudBindingDefinition {\n  return binding !== undefined && binding.clientId !== undefined && binding.workspace !== undefined;\n}\n\nexport function isGithubBindingDefinition(\n  binding?: AlmBindingDefinitionBase & { appId?: string; url?: string }\n): binding is GithubBindingDefinition {\n  return binding !== undefined && binding.appId !== undefined && binding.url !== undefined;\n}\n\nexport function isGitLabBindingDefinition(\n  binding?: AlmBindingDefinitionBase | GithubBindingDefinition | BitbucketCloudBindingDefinition\n): binding is GitlabBindingDefinition {\n  // There's too much overlap with the others. We must not only validate that certain fields are\n  // present, we must also validate that others are NOT present. And even so, we cannot be 100%\n  // sure, as right now, Azure, Bitbucket Server, and GitLab have the same signature.\n  return (\n    binding !== undefined &&\n    (binding as GithubBindingDefinition).appId === undefined &&\n    (binding as BitbucketCloudBindingDefinition).workspace === undefined\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { LocationDescriptor } from 'history';\nimport { hasMessage, translate } from '../../helpers/l10n';\nimport { getGlobalSettingsUrl } from '../../helpers/urls';\nimport { AlmKeys } from '../../types/alm-settings';\nimport { Setting, SettingCategoryDefinition, SettingDefinition } from '../../types/settings';\n\nexport const DEFAULT_CATEGORY = 'general';\n\nexport type DefaultSpecializedInputProps = DefaultInputProps & {\n  className?: string;\n  autoComplete?: string;\n  isDefault: boolean;\n  name: string;\n  type?: string;\n};\n\nexport interface DefaultInputProps {\n  autoFocus?: boolean;\n  hasValueChanged?: boolean;\n  onCancel?: () => void;\n  onChange: (value: any) => void;\n  onSave?: () => void;\n  setting: Setting;\n  value: any;\n}\n\nexport function getPropertyName(definition: SettingDefinition) {\n  const key = `property.${definition.key}.name`;\n  return hasMessage(key) ? translate(key) : definition.name;\n}\n\nexport function getPropertyDescription(definition: SettingDefinition) {\n  const key = `property.${definition.key}.description`;\n  return hasMessage(key) ? translate(key) : definition.description;\n}\n\nexport function getCategoryName(category: string) {\n  const key = `property.category.${category}`;\n  return hasMessage(key) ? translate(key) : category;\n}\n\nexport function getSubCategoryName(category: string, subCategory: string) {\n  const key = `property.category.${category}.${subCategory}`;\n  return hasMessage(key) ? translate(key) : getCategoryName(subCategory);\n}\n\nexport function getSubCategoryDescription(category: string, subCategory: string) {\n  const key = `property.category.${category}.${subCategory}.description`;\n  return hasMessage(key) ? translate(key) : null;\n}\n\nexport function getUniqueName(definition: SettingDefinition, index?: string) {\n  const indexSuffix = index ? `[${index}]` : '';\n  return `settings[${definition.key}]${indexSuffix}`;\n}\n\nexport function getSettingValue({ definition, fieldValues, value, values }: Setting) {\n  if (isCategoryDefinition(definition) && definition.multiValues) {\n    return values;\n  } else if (definition.type === 'PROPERTY_SET') {\n    return fieldValues;\n  } else {\n    return value;\n  }\n}\n\nexport function isEmptyValue(definition: SettingDefinition, value: any) {\n  if (value == null) {\n    return true;\n  } else if (definition.type === 'BOOLEAN') {\n    return false;\n  } else {\n    return value.length === 0;\n  }\n}\n\nexport function isSecuredDefinition(item: SettingDefinition): boolean {\n  return item.key.endsWith('.secured');\n}\n\nexport function isCategoryDefinition(item: SettingDefinition): item is SettingCategoryDefinition {\n  return Boolean((item as any).fields);\n}\n\nexport function getEmptyValue(item: SettingDefinition | SettingCategoryDefinition): any {\n  if (isCategoryDefinition(item)) {\n    if (item.multiValues) {\n      return [getEmptyValue({ ...item, multiValues: false })];\n    }\n\n    if (item.type === 'PROPERTY_SET') {\n      const value: T.Dict<string> = {};\n      item.fields.forEach(field => (value[field.key] = getEmptyValue(field)));\n      return [value];\n    }\n  }\n\n  if (item.type === 'BOOLEAN' || item.type === 'SINGLE_SELECT_LIST') {\n    return null;\n  }\n  return '';\n}\n\nexport function isDefaultOrInherited(setting: Setting) {\n  return Boolean(setting.inherited);\n}\n\nexport function getDefaultValue(setting: Setting) {\n  const { definition, parentFieldValues, parentValue, parentValues } = setting;\n\n  if (definition.type === 'PASSWORD') {\n    return translate('settings.default.password');\n  }\n\n  if (definition.type === 'BOOLEAN' && parentValue) {\n    const isTrue = parentValue === 'true';\n    return isTrue ? translate('settings.boolean.true') : translate('settings.boolean.false');\n  }\n\n  if (\n    isCategoryDefinition(definition) &&\n    definition.multiValues &&\n    parentValues &&\n    parentValues.length > 0\n  ) {\n    return parentValues.join(', ');\n  }\n\n  if (definition.type === 'PROPERTY_SET' && parentFieldValues && parentFieldValues.length > 0) {\n    return translate('settings.default.complex_value');\n  }\n\n  if (parentValue == null) {\n    return isCategoryDefinition(definition) && definition.defaultValue\n      ? definition.defaultValue\n      : translate('settings.default.no_value');\n  }\n\n  return parentValue;\n}\n\nexport function isRealSettingKey(key: string) {\n  return ![\n    'sonar.new_code_period',\n    `sonar.almintegration.${AlmKeys.Azure}`,\n    `sonar.almintegration.${AlmKeys.BitbucketServer}`,\n    `sonar.almintegration.${AlmKeys.GitHub}`,\n    `sonar.almintegration.${AlmKeys.GitLab}`\n  ].includes(key);\n}\n\nexport function buildSettingLink(definition: SettingCategoryDefinition): LocationDescriptor {\n  const { category, key } = definition;\n\n  const query: T.Dict<string> = {};\n\n  if (key.startsWith('sonar.auth.gitlab')) {\n    query.alm = 'gitlab';\n  } else if (key.startsWith('sonar.auth.github')) {\n    query.alm = 'github';\n  } else if (key.startsWith('sonar.almintegration')) {\n    query.alm = key.split('.').pop() || '';\n  }\n\n  return {\n    ...getGlobalSettingsUrl(category, query),\n    hash: `#${escape(key)}`\n  };\n}\n\nexport const ADDITIONAL_SETTING_DEFINITIONS: SettingCategoryDefinition[] = [\n  {\n    name: 'Default New Code behavior',\n    description: `\n        The New Code definition is used to compare measures and track new issues.\n        This setting is the default for all projects. A specific New Code definition can be configured at project level.\n      `,\n    category: 'new_code_period',\n    key: `sonar.new_code_period`,\n    fields: [],\n    options: [],\n    subCategory: ''\n  },\n  {\n    name: 'Azure DevOps integration',\n    description: `azure devops integration configuration\n      Configuration name\n      Give your configuration a clear and succinct name. \n      This name will be used at project level to identify the correct configured Azure instance for a project.\n      Azure DevOps URL\n      For Azure DevOps Server, provide the full collection URL:\n      https://ado.your-company.com/your_collection\n\n      For Azure DevOps Services, provide the full organization URL:\n      https://dev.azure.com/your_organization\n      Personal Access Token\n      SonarQube needs a Personal Access Token to report the Quality Gate status on Pull Requests in Azure DevOps. \n      To create this token, we recommend using a dedicated Azure DevOps account with administration permissions. \n      The token itself needs Code > Read & Write permission.\n    `,\n    category: 'almintegration',\n    key: `sonar.almintegration.${AlmKeys.Azure}`,\n    fields: [],\n    options: [],\n    subCategory: ''\n  },\n  {\n    name: 'Bitbucket integration',\n    description: `bitbucket server cloud integration configuration\n      Configuration name\n      Give your configuration a clear and succinct name. \n      This name will be used at project level to identify the correct configured Bitbucket instance for a project.\n      Bitbucket Server URL\n      Example: https://bitbucket-server.your-company.com\n      Personal Access Token\n      SonarQube needs a Personal Access Token to report the Quality Gate status on Pull Requests in Bitbucket Server. \n      To create this token, we recommend using a dedicated Bitbucket Server account with administration permissions. \n      The token itself needs Read permission.\n      Workspace ID\n      The workspace ID is part of your bitbucket cloud URL https://bitbucket.org/{workspace}/{repository}\n      SonarQube needs you to create an OAuth consumer in your Bitbucket Cloud workspace settings \n      to report the Quality Gate status on Pull Requests. \n      It needs to be a private consumer with Pull Requests: Read permission. \n      An OAuth callback URL is required by Bitbucket Cloud but not used by SonarQube so any URL works.\n      OAuth Key\n      Bitbucket automatically creates an OAuth key when you create your OAuth consumer. \n      You can find it in your Bitbucket Cloud workspace settings under OAuth consumers.\n      OAuth Secret\n      Bitbucket automatically creates an OAuth secret when you create your OAuth consumer. \n      You can find it in your Bitbucket Cloud workspace settings under OAuth consumers.\n    `,\n    category: 'almintegration',\n    key: `sonar.almintegration.${AlmKeys.BitbucketServer}`,\n    fields: [],\n    options: [],\n    subCategory: ''\n  },\n  {\n    name: 'GitHub integration',\n    description: `github integration configuration\n      Configuration name\n      Give your configuration a clear and succinct name. \n      This name will be used at project level to identify the correct configured GitHub App for a project.\n      GitHub API URL\n      Example for Github Enterprise:\n      https://github.company.com/api/v3\n      If using GitHub.com:\n      https://api.github.com/\n      You need to install a GitHub App with specific settings and permissions to enable \n      Pull Request Decoration on your Organization or Repository. \n      GitHub App ID\n      The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps\n      Client ID\n      The Client ID is found on your GitHub App's page.\n      Client Secret\n      The Client secret is found on your GitHub App's page.\n      Private Key\n      Your GitHub App's private key. You can generate a .pem file from your GitHub App's page under Private keys. \n      Copy and paste the whole contents of the file here.     \n    `,\n    category: 'almintegration',\n    key: `sonar.almintegration.${AlmKeys.GitHub}`,\n    fields: [],\n    options: [],\n    subCategory: ''\n  },\n  {\n    name: 'Gitlab integration',\n    description: `gitlab integration configuration\n      Configuration name\n      Give your configuration a clear and succinct name. \n      This name will be used at project level to identify the correct configured GitLab instance for a project.\n      GitLab API URL\n      Provide the GitLab API URL. For example:\n      https://gitlab.com/api/v4\n      Personal Access Token\n      SonarQube needs a Personal Access Token to report the Quality Gate status on Merge Requests in GitLab. \n      To create this token, \n      we recommend using a dedicated GitLab account with Reporter permission to all target projects.\n      The token itself needs the api scope.\n    `,\n    category: 'almintegration',\n    key: `sonar.almintegration.${AlmKeys.GitLab}`,\n    fields: [],\n    options: [],\n    subCategory: ''\n  }\n];\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { keyBy, sortBy, uniqBy } from 'lodash';\nimport { ActionType } from '../../../store/utils/actions';\nimport { SettingCategoryDefinition } from '../../../types/settings';\nimport { DEFAULT_CATEGORY, getCategoryName } from '../utils';\n\nconst enum Actions {\n  ReceiveDefinitions = 'RECEIVE_DEFINITIONS'\n}\n\ntype Action = ActionType<typeof receiveDefinitions, Actions.ReceiveDefinitions>;\n\nexport type State = T.Dict<SettingCategoryDefinition>;\n\nexport function receiveDefinitions(definitions: SettingCategoryDefinition[]) {\n  return { type: Actions.ReceiveDefinitions, definitions };\n}\n\nexport default function components(state: State = {}, action: Action) {\n  if (action.type === Actions.ReceiveDefinitions) {\n    return keyBy(action.definitions, 'key');\n  }\n  return state;\n}\n\nexport function getDefinition(state: State, key: string) {\n  return state[key];\n}\n\nexport function getAllDefinitions(state: State) {\n  return Object.keys(state).map(key => state[key]);\n}\n\nexport function getDefinitionsForCategory(state: State, category: string) {\n  return getAllDefinitions(state).filter(\n    definition => definition.category.toLowerCase() === category.toLowerCase()\n  );\n}\n\nexport function getAllCategories(state: State) {\n  return uniqBy(\n    getAllDefinitions(state).map(definition => definition.category),\n    category => category.toLowerCase()\n  );\n}\n\nexport function getDefaultCategory(state: State) {\n  const categories = getAllCategories(state);\n  if (categories.includes(DEFAULT_CATEGORY)) {\n    return DEFAULT_CATEGORY;\n  } else {\n    const sortedCategories = sortBy(categories, category =>\n      getCategoryName(category).toLowerCase()\n    );\n    return sortedCategories[0];\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit } from 'lodash';\nimport { combineReducers } from 'redux';\nimport { ActionType } from '../../../store/utils/actions';\n\nconst enum Actions {\n  CancelChange = 'settingsPage/CANCEL_CHANGE',\n  ChangeValue = 'settingsPage/CHANGE_VALUE',\n  FailValidation = 'settingsPage/FAIL_VALIDATION',\n  PassValidation = 'settingsPage/PASS_VALIDATION',\n  StartLoading = 'settingsPage/START_LOADING',\n  StopLoading = 'settingsPage/STOP_LOADING'\n}\n\ntype Action =\n  | ActionType<typeof cancelChange, Actions.CancelChange>\n  | ActionType<typeof changeValue, Actions.ChangeValue>\n  | ActionType<typeof failValidation, Actions.FailValidation>\n  | ActionType<typeof passValidation, Actions.PassValidation>\n  | ActionType<typeof startLoading, Actions.StartLoading>\n  | ActionType<typeof stopLoading, Actions.StopLoading>;\n\nexport interface State {\n  changedValues: T.Dict<any>;\n  loading: T.Dict<boolean>;\n  validationMessages: T.Dict<string>;\n}\n\nexport function cancelChange(key: string) {\n  return { type: Actions.CancelChange, key };\n}\n\nexport function changeValue(key: string, value: any) {\n  return { type: Actions.ChangeValue, key, value };\n}\n\nfunction changedValues(state: State['changedValues'] = {}, action: Action) {\n  if (action.type === Actions.ChangeValue) {\n    return { ...state, [action.key]: action.value };\n  }\n  if (action.type === Actions.CancelChange) {\n    return omit(state, action.key);\n  }\n  return state;\n}\n\nexport function failValidation(key: string, message: string) {\n  return { type: Actions.FailValidation, key, message };\n}\n\nexport function passValidation(key: string) {\n  return { type: Actions.PassValidation, key };\n}\n\nfunction validationMessages(state: State['validationMessages'] = {}, action: Action) {\n  if (action.type === Actions.FailValidation) {\n    return { ...state, [action.key]: action.message };\n  }\n  if (action.type === Actions.PassValidation) {\n    return omit(state, action.key);\n  }\n  return state;\n}\n\nexport function startLoading(key: string) {\n  return { type: Actions.StartLoading, key };\n}\n\nexport function stopLoading(key: string) {\n  return { type: Actions.StopLoading, key };\n}\n\nfunction loading(state: State['loading'] = {}, action: Action) {\n  if (action.type === Actions.StartLoading) {\n    return { ...state, [action.key]: true };\n  }\n  if (action.type === Actions.StopLoading) {\n    return { ...state, [action.key]: false };\n  }\n  return state;\n}\n\nexport default combineReducers({ changedValues, loading, validationMessages });\n\nexport function getChangedValue(state: State, key: string) {\n  return state.changedValues[key];\n}\n\nexport function getValidationMessage(state: State, key: string): string | undefined {\n  return state.validationMessages[key];\n}\n\nexport function isLoading(state: State, key: string) {\n  return Boolean(state.loading[key]);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { ActionType } from './utils/actions';\n\nexport const enum Actions {\n  SetAppState = 'SET_APP_STATE',\n  SetAdminPages = 'SET_ADMIN_PAGES',\n  RequireAuthorization = 'REQUIRE_AUTHORIZATION'\n}\n\nexport type Action =\n  | ActionType<typeof setAppState, Actions.SetAppState>\n  | ActionType<typeof setAdminPages, Actions.SetAdminPages>\n  | ActionType<typeof requireAuthorization, Actions.RequireAuthorization>;\n\nexport function setAppState(appState: T.AppState) {\n  return { type: Actions.SetAppState, appState };\n}\n\nexport function setAdminPages(adminPages: T.Extension[]) {\n  return { type: Actions.SetAdminPages, adminPages };\n}\n\nexport function requireAuthorization() {\n  return { type: Actions.RequireAuthorization };\n}\n\nconst defaultValue: T.AppState = {\n  authenticationError: false,\n  authorizationError: false,\n  edition: undefined,\n  productionDatabase: true,\n  qualifiers: [],\n  settings: {},\n  version: ''\n};\n\nexport default function(state: T.AppState = defaultValue, action: Action): T.AppState {\n  if (action.type === Actions.SetAppState) {\n    return { ...state, ...action.appState };\n  }\n  if (action.type === Actions.SetAdminPages) {\n    return { ...state, adminPages: action.adminPages };\n  }\n  if (action.type === Actions.RequireAuthorization) {\n    return { ...state, authorizationError: true };\n  }\n  return state;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { keyBy, omit } from 'lodash';\nimport { combineReducers } from 'redux';\nimport { Action as AppStateAction, Actions as AppStateActions } from '../../../store/appState';\nimport { ActionType } from '../../../store/utils/actions';\nimport { SettingValue } from '../../../types/settings';\n\nenum Actions {\n  receiveValues = 'RECEIVE_VALUES'\n}\n\ntype Action = ActionType<typeof receiveValues, Actions.receiveValues>;\n\ntype SettingsState = T.Dict<SettingValue>;\n\nexport interface State {\n  components: T.Dict<SettingsState>;\n  global: SettingsState;\n}\n\nexport function receiveValues(\n  updateKeys: string[],\n  settings: Array<{ key: string; value?: string }>,\n  component?: string\n) {\n  return { type: Actions.receiveValues, updateKeys, settings, component };\n}\n\nfunction components(state: State['components'] = {}, action: Action) {\n  const { component: key } = action;\n  if (!key) {\n    return state;\n  }\n  if (action.type === Actions.receiveValues) {\n    const settingsByKey = keyBy(action.settings, 'key');\n    return { ...state, [key]: { ...omit(state[key] || {}, action.updateKeys), ...settingsByKey } };\n  }\n  return state;\n}\n\nfunction global(state: State['components'] = {}, action: Action | AppStateAction) {\n  if (action.type === Actions.receiveValues) {\n    if (action.component) {\n      return state;\n    }\n    const settingsByKey = keyBy(action.settings, 'key');\n    return { ...omit(state, action.updateKeys), ...settingsByKey };\n  }\n\n  if (action.type === AppStateActions.SetAppState) {\n    const settingsByKey: SettingsState = {};\n    Object.keys(action.appState.settings).forEach(\n      key => (settingsByKey[key] = { key, value: action.appState.settings[key] })\n    );\n    return { ...state, ...settingsByKey };\n  }\n  return state;\n}\n\nexport default combineReducers({ components, global });\n\nexport function getValue(state: State, key: string, component?: string): SettingValue | undefined {\n  if (component) {\n    return state.components[component] && state.components[component][key];\n  }\n  return state.global[key];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { combineReducers } from 'redux';\nimport globalMessages, * as fromGlobalMessages from '../../../store/globalMessages';\nimport definitions, * as fromDefinitions from './definitions';\nimport settingsPage, * as fromSettingsPage from './settingsPage';\nimport values, * as fromValues from './values';\n\ninterface State {\n  definitions: fromDefinitions.State;\n  globalMessages: fromGlobalMessages.State;\n  settingsPage: fromSettingsPage.State;\n  values: fromValues.State;\n}\n\nexport default combineReducers({ definitions, values, settingsPage, globalMessages });\n\nexport function getDefinition(state: State, key: string) {\n  return fromDefinitions.getDefinition(state.definitions, key);\n}\n\nexport function getAllDefinitions(state: State) {\n  return fromDefinitions.getAllDefinitions(state.definitions);\n}\n\nexport function getAllCategories(state: State) {\n  return fromDefinitions.getAllCategories(state.definitions);\n}\n\nexport function getDefaultCategory(state: State) {\n  return fromDefinitions.getDefaultCategory(state.definitions);\n}\n\nexport function getValue(state: State, key: string, component?: string) {\n  return fromValues.getValue(state.values, key, component);\n}\n\nexport function getSettingsForCategory(state: State, category: string, component?: string) {\n  return fromDefinitions.getDefinitionsForCategory(state.definitions, category).map(definition => {\n    const value = getValue(state, definition.key, component);\n    const hasValue = value !== undefined && value.inherited !== true;\n    return {\n      key: definition.key,\n      hasValue,\n      ...value,\n      definition\n    };\n  });\n}\n\nexport function getChangedValue(state: State, key: string) {\n  return fromSettingsPage.getChangedValue(state.settingsPage, key);\n}\n\nexport function isLoading(state: State, key: string) {\n  return fromSettingsPage.isLoading(state.settingsPage, key);\n}\n\nexport function getValidationMessage(state: State, key: string) {\n  return fromSettingsPage.getValidationMessage(state.settingsPage, key);\n}\n\nexport function getGlobalMessages(state: State) {\n  return fromGlobalMessages.getGlobalMessages(state.globalMessages);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getBranchLikeKey } from '../helpers/branch-like';\nimport { BranchLike } from '../types/branch-like';\nimport { QualityGateStatusCondition } from '../types/quality-gates';\nimport { ActionType } from './utils/actions';\n\nexport interface BranchStatusData {\n  conditions?: QualityGateStatusCondition[];\n  ignoredConditions?: boolean;\n  status?: T.Status;\n}\n\nexport interface State {\n  byComponent: T.Dict<T.Dict<BranchStatusData>>;\n}\n\nconst enum Actions {\n  RegisterBranchStatus = 'REGISTER_BRANCH_STATUS'\n}\n\ntype Action = ActionType<typeof registerBranchStatusAction, Actions.RegisterBranchStatus>;\n\nexport function registerBranchStatusAction(\n  branchLike: BranchLike,\n  component: string,\n  status: T.Status,\n  conditions?: QualityGateStatusCondition[],\n  ignoredConditions?: boolean\n) {\n  return {\n    type: Actions.RegisterBranchStatus,\n    branchLike,\n    component,\n    conditions,\n    ignoredConditions,\n    status\n  };\n}\n\nexport default function(state: State = { byComponent: {} }, action: Action): State {\n  if (action.type === Actions.RegisterBranchStatus) {\n    const { component, conditions, branchLike, ignoredConditions, status } = action;\n    const branchLikeKey = getBranchLikeKey(branchLike);\n    return {\n      byComponent: {\n        ...state.byComponent,\n        [component]: {\n          ...(state.byComponent[component] || {}),\n          [branchLikeKey]: {\n            conditions,\n            ignoredConditions,\n            status\n          }\n        }\n      }\n    };\n  }\n\n  return state;\n}\n\nexport function getBranchStatusByBranchLike(\n  state: State,\n  component: string,\n  branchLike: BranchLike\n): BranchStatusData {\n  const branchLikeKey = getBranchLikeKey(branchLike);\n  return state.byComponent[component] && state.byComponent[component][branchLikeKey];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { keyBy } from 'lodash';\nimport { ActionType } from './utils/actions';\n\nexport function receiveLanguages(languages: Array<{ key: string; name: string }>) {\n  return { type: 'RECEIVE_LANGUAGES', languages };\n}\n\ntype Action = ActionType<typeof receiveLanguages, 'RECEIVE_LANGUAGES'>;\n\nexport default function(state: T.Languages = {}, action: Action): T.Languages {\n  if (action.type === 'RECEIVE_LANGUAGES') {\n    return keyBy(action.languages, 'key');\n  }\n\n  return state;\n}\n\nexport function getLanguages(state: T.Languages) {\n  return state;\n}\n\nexport function getLanguageByKey(state: T.Languages, key: string) {\n  return state[key];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { keyBy } from 'lodash';\nimport { combineReducers } from 'redux';\nimport { ActionType } from './utils/actions';\n\nexport function receiveMetrics(metrics: T.Metric[]) {\n  return { type: 'RECEIVE_METRICS', metrics };\n}\n\ntype Action = ActionType<typeof receiveMetrics, 'RECEIVE_METRICS'>;\n\nexport type State = { byKey: T.Dict<T.Metric>; keys: string[] };\n\nconst byKey = (state: State['byKey'] = {}, action: Action) => {\n  if (action.type === 'RECEIVE_METRICS') {\n    return keyBy(action.metrics, 'key');\n  }\n  return state;\n};\n\nconst keys = (state: State['keys'] = [], action: Action) => {\n  if (action.type === 'RECEIVE_METRICS') {\n    return action.metrics.map(f => f.key);\n  }\n\n  return state;\n};\n\nexport default combineReducers({ byKey, keys });\n\nexport function getMetrics(state: State) {\n  return state.byKey;\n}\n\nexport function getMetricsKey(state: State) {\n  return state.keys;\n}\n\nexport function getMetricByKey(state: State, key: string) {\n  return state.byKey[key];\n}\n", "function createThunkMiddleware(extraArgument) {\n  return function (_ref) {\n    var dispatch = _ref.dispatch,\n        getState = _ref.getState;\n    return function (next) {\n      return function (action) {\n        if (typeof action === 'function') {\n          return action(dispatch, getState, extraArgument);\n        }\n\n        return next(action);\n      };\n    };\n  };\n}\n\nvar thunk = createThunkMiddleware();\nthunk.withExtraArgument = createThunkMiddleware;\n\nexport default thunk;", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { applyMiddleware, compose, createStore } from 'redux';\nimport thunk, { ThunkMiddleware } from 'redux-thunk';\n\ntype RootReducer = typeof import('../rootReducer').default;\ntype State = import('../rootReducer').Store;\n\nconst middlewares = [thunk as ThunkMiddleware<State, any>];\nconst composed = [];\n\nif (process.env.NODE_ENV === 'development') {\n  const { __REDUX_DEVTOOLS_EXTENSION__ } = window as any;\n  composed.push(__REDUX_DEVTOOLS_EXTENSION__ ? __REDUX_DEVTOOLS_EXTENSION__() : (f: Function) => f);\n}\n\nconst finalCreateStore = compose(applyMiddleware(...middlewares), ...composed)(createStore);\n\nexport default function configureStore(rootReducer: RootReducer, initialState?: State) {\n  return finalCreateStore(rootReducer, initialState);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Store } from 'redux';\nimport { setAppState } from '../../store/appState';\nimport rootReducer, { Store as State } from '../../store/rootReducer';\nimport { receiveCurrentUser } from '../../store/users';\nimport configureStore from '../../store/utils/configureStore';\n\nlet store: Store<State, any>;\n\nconst createStore = (currentUser?: T.CurrentUser, appState?: T.AppState) => {\n  store = configureStore(rootReducer);\n  if (currentUser) {\n    store.dispatch(receiveCurrentUser(currentUser));\n  }\n  if (appState) {\n    store.dispatch(setAppState(appState));\n  }\n  return store;\n};\n\nexport default (currentUser?: T.CurrentUser, appState?: T.AppState) =>\n  store ? store : createStore(currentUser, appState);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { parseError } from '../../helpers/request';\nimport { addGlobalErrorMessage } from '../../store/globalMessages';\nimport getStore from './getStore';\n\nexport default function throwGlobalError(param: Response | any): Promise<Response | any> {\n  const store = getStore();\n\n  if (param.response instanceof Response) {\n    /* eslint-disable-next-line no-console */\n    console.warn('DEPRECATED: response should not be wrapped, pass it directly.');\n    param = param.response;\n  }\n\n  if (param instanceof Response) {\n    return parseError(param)\n      .then(\n        message => {\n          store.dispatch(addGlobalErrorMessage(message));\n        },\n        () => {}\n      )\n      .then(() => Promise.reject(param));\n  }\n\n  return Promise.reject(param);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON } from '../helpers/request';\n\nexport function getCurrentUser(): Promise<T.CurrentUser> {\n  return getJSON('/api/users/current');\n}\n\nexport function changePassword(data: {\n  login: string;\n  password: string;\n  previousPassword?: string;\n}) {\n  return post('/api/users/change_password', data).catch(throwGlobalError);\n}\n\nexport interface UserGroup {\n  default: boolean;\n  description: string;\n  id: number;\n  name: string;\n  selected: boolean;\n}\n\nexport function getUserGroups(data: {\n  login: string;\n  p?: number;\n  ps?: number;\n  q?: string;\n  selected?: string;\n}): Promise<{ paging: T.Paging; groups: UserGroup[] }> {\n  return getJSON('/api/users/groups', data);\n}\n\nexport function getIdentityProviders(): Promise<{ identityProviders: T.IdentityProvider[] }> {\n  return getJSON('/api/users/identity_providers').catch(throwGlobalError);\n}\n\nexport function searchUsers(data: {\n  p?: number;\n  ps?: number;\n  q?: string;\n}): Promise<{ paging: T.Paging; users: T.User[] }> {\n  data.q = data.q || undefined;\n  return getJSON('/api/users/search', data).catch(throwGlobalError);\n}\n\nexport function createUser(data: {\n  email?: string;\n  local?: boolean;\n  login: string;\n  name: string;\n  password?: string;\n  scmAccount: string[];\n}): Promise<void | Response> {\n  return post('/api/users/create', data);\n}\n\nexport function updateUser(data: {\n  email?: string;\n  login: string;\n  name?: string;\n  scmAccount: string[];\n}): Promise<T.User> {\n  return postJSON('/api/users/update', {\n    ...data,\n    scmAccount: data.scmAccount.length > 0 ? data.scmAccount : ''\n  });\n}\n\nexport function deactivateUser(data: { login: string }): Promise<T.User> {\n  return postJSON('/api/users/deactivate', data).catch(throwGlobalError);\n}\n\nexport function setHomePage(homepage: T.HomePage): Promise<void | Response> {\n  return post('/api/users/set_homepage', homepage).catch(throwGlobalError);\n}\n\nexport function setUserSetting(setting: T.CurrentUserSetting): Promise<void | Response> {\n  return post('/api/users/set_setting', setting).catch(throwGlobalError);\n}\n\nexport function dismissSonarlintAd(): Promise<void | Response> {\n  return post('/api/users/dismiss_sonarlint_ad').catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function hasGlobalPermission(user: T.CurrentUser, permission: string): boolean {\n  if (!user.permissions) {\n    return false;\n  }\n  return user.permissions.global.includes(permission);\n}\n\nexport function isLoggedIn(user: T.CurrentUser): user is T.LoggedInUser {\n  return user.isLoggedIn;\n}\n\nexport function isUserActive(user: T.UserBase): user is T.UserActive {\n  return user.active !== false && Boolean(user.name);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniq } from 'lodash';\nimport { combineReducers, Dispatch } from 'redux';\nimport * as api from '../api/users';\nimport { isLoggedIn } from '../helpers/users';\nimport { ActionType } from './utils/actions';\n\nconst enum Actions {\n  ReceiveCurrentUser = 'RECEIVE_CURRENT_USER',\n  SetCurrentUserSetting = 'SET_CURRENT_USER_SETTING',\n  SetHomePageAction = 'SET_HOMEPAGE',\n  SetSonarlintAd = 'SET_SONARLINT_AD'\n}\n\ntype Action =\n  | ActionType<typeof receiveCurrentUser, Actions.ReceiveCurrentUser>\n  | ActionType<typeof setCurrentUserSettingAction, Actions.SetCurrentUserSetting>\n  | ActionType<typeof setHomePageAction, Actions.SetHomePageAction>\n  | ActionType<typeof setSonarlintAd, Actions.SetSonarlintAd>;\n\nexport interface State {\n  usersByLogin: T.Dict<any>;\n  userLogins: string[];\n  currentUser: T.CurrentUser;\n}\n\nexport function receiveCurrentUser(user: T.CurrentUser) {\n  return { type: Actions.ReceiveCurrentUser, user };\n}\n\nexport function setHomePageAction(homepage: T.HomePage) {\n  return { type: Actions.SetHomePageAction, homepage };\n}\n\nexport function setCurrentUserSettingAction(setting: T.CurrentUserSetting) {\n  return { type: Actions.SetCurrentUserSetting, setting };\n}\n\nexport function setSonarlintAd() {\n  return { type: Actions.SetSonarlintAd };\n}\n\nexport function setHomePage(homepage: T.HomePage) {\n  return (dispatch: Dispatch) => {\n    api.setHomePage(homepage).then(\n      () => {\n        dispatch(setHomePageAction(homepage));\n      },\n      () => {}\n    );\n  };\n}\n\nexport function setCurrentUserSetting(setting: T.CurrentUserSetting) {\n  return (dispatch: Dispatch, getState: () => { users: State }) => {\n    const oldSetting = getCurrentUserSetting(getState().users, setting.key);\n    dispatch(setCurrentUserSettingAction(setting));\n    api.setUserSetting(setting).then(\n      () => {},\n      () => {\n        dispatch(setCurrentUserSettingAction({ ...setting, value: oldSetting || '' }));\n      }\n    );\n  };\n}\n\nfunction usersByLogin(state: State['usersByLogin'] = {}, action: Action): State['usersByLogin'] {\n  if (action.type === Actions.ReceiveCurrentUser && isLoggedIn(action.user)) {\n    return { ...state, [action.user.login]: action.user };\n  } else {\n    return state;\n  }\n}\n\nfunction userLogins(state: State['userLogins'] = [], action: Action): State['userLogins'] {\n  if (action.type === Actions.ReceiveCurrentUser && isLoggedIn(action.user)) {\n    return uniq([...state, action.user.login]);\n  } else {\n    return state;\n  }\n}\n\nfunction currentUser(\n  state: State['currentUser'] = { isLoggedIn: false },\n  action: Action\n): State['currentUser'] {\n  if (action.type === Actions.ReceiveCurrentUser) {\n    return action.user;\n  }\n  if (action.type === Actions.SetHomePageAction && isLoggedIn(state)) {\n    return { ...state, homepage: action.homepage } as T.LoggedInUser;\n  }\n  if (action.type === Actions.SetCurrentUserSetting && isLoggedIn(state)) {\n    let settings: T.CurrentUserSetting[];\n    if (state.settings) {\n      settings = [...state.settings];\n      const index = settings.findIndex(setting => setting.key === action.setting.key);\n      if (index === -1) {\n        settings.push(action.setting);\n      } else {\n        settings[index] = action.setting;\n      }\n    } else {\n      settings = [action.setting];\n    }\n    return { ...state, settings } as T.LoggedInUser;\n  }\n  if (action.type === Actions.SetSonarlintAd && isLoggedIn(state)) {\n    return { ...state, sonarLintAdSeen: true } as T.LoggedInUser;\n  }\n  return state;\n}\n\nexport default combineReducers({ usersByLogin, userLogins, currentUser });\n\nexport function getCurrentUser(state: State) {\n  return state.currentUser;\n}\n\nexport function getCurrentUserSetting(state: State, key: T.CurrentUserSettingNames) {\n  let setting;\n  if (isLoggedIn(state.currentUser) && state.currentUser.settings) {\n    setting = state.currentUser.settings.find(setting => setting.key === key);\n  }\n  return setting && setting.value;\n}\n\nexport function getUserByLogin(state: State, login: string) {\n  return state.usersByLogin[login];\n}\n\nexport function getUsersByLogins(state: State, logins: string[]) {\n  return logins.map(login => getUserByLogin(state, login));\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { combineReducers } from 'redux';\nimport settingsApp, * as fromSettingsApp from '../apps/settings/store/rootReducer';\nimport { BranchLike } from '../types/branch-like';\nimport appState from './appState';\nimport branches, * as fromBranches from './branches';\nimport globalMessages, * as fromGlobalMessages from './globalMessages';\nimport languages, * as fromLanguages from './languages';\nimport metrics, * as fromMetrics from './metrics';\nimport users, * as fromUsers from './users';\n\nexport type Store = {\n  appState: T.AppState;\n  branches: fromBranches.State;\n  globalMessages: fromGlobalMessages.State;\n  languages: T.Languages;\n  metrics: fromMetrics.State;\n  users: fromUsers.State;\n\n  // apps\n  settingsApp: any;\n};\n\nexport default combineReducers<Store>({\n  appState,\n  branches,\n  globalMessages,\n  languages,\n  metrics,\n  users,\n\n  // apps\n  settingsApp\n});\n\nexport function getAppState(state: Store) {\n  return state.appState;\n}\n\nexport function getGlobalMessages(state: Store) {\n  return fromGlobalMessages.getGlobalMessages(state.globalMessages);\n}\n\nexport function getLanguages(state: Store) {\n  return fromLanguages.getLanguages(state.languages);\n}\n\nexport function getCurrentUserSetting(state: Store, key: T.CurrentUserSettingNames) {\n  return fromUsers.getCurrentUserSetting(state.users, key);\n}\n\nexport function getCurrentUser(state: Store) {\n  return fromUsers.getCurrentUser(state.users);\n}\n\nexport function getMetrics(state: Store) {\n  return fromMetrics.getMetrics(state.metrics);\n}\n\nexport function getMetricsKey(state: Store) {\n  return fromMetrics.getMetricsKey(state.metrics);\n}\n\nexport function getMetricByKey(state: Store, key: string) {\n  return fromMetrics.getMetricByKey(state.metrics, key);\n}\n\nexport function getGlobalSettingValue(state: Store, key: string) {\n  return fromSettingsApp.getValue(state.settingsApp, key);\n}\n\nexport function getSettingsAppAllDefinitions(state: Store) {\n  return fromSettingsApp.getAllDefinitions(state.settingsApp);\n}\n\nexport function getSettingsAppDefinition(state: Store, key: string) {\n  return fromSettingsApp.getDefinition(state.settingsApp, key);\n}\n\nexport function getSettingsAppAllCategories(state: Store) {\n  return fromSettingsApp.getAllCategories(state.settingsApp);\n}\n\nexport function getSettingsAppDefaultCategory(state: Store) {\n  return fromSettingsApp.getDefaultCategory(state.settingsApp);\n}\n\nexport function getSettingsAppSettingsForCategory(\n  state: Store,\n  category: string,\n  component?: string\n) {\n  return fromSettingsApp.getSettingsForCategory(state.settingsApp, category, component);\n}\n\nexport function getSettingsAppChangedValue(state: Store, key: string) {\n  return fromSettingsApp.getChangedValue(state.settingsApp, key);\n}\n\nexport function isSettingsAppLoading(state: Store, key: string) {\n  return fromSettingsApp.isLoading(state.settingsApp, key);\n}\n\nexport function getSettingsAppValidationMessage(state: Store, key: string) {\n  return fromSettingsApp.getValidationMessage(state.settingsApp, key);\n}\n\nexport function getBranchStatusByBranchLike(\n  state: Store,\n  component: string,\n  branchLike: BranchLike\n) {\n  return fromBranches.getBranchStatusByBranchLike(state.branches, component, branchLike);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function getWrappedDisplayName<P>(\n  WrappedComponent: React.ComponentType<P>,\n  hocName: string\n) {\n  const wrappedDisplayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n  return `${hocName}(${wrappedDisplayName})`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getCurrentUser, Store } from '../../store/rootReducer';\nimport { getWrappedDisplayName } from './utils';\n\nexport function withCurrentUser<P>(\n  WrappedComponent: React.ComponentType<P & { currentUser: T.CurrentUser }>\n) {\n  class Wrapper extends React.Component<P & { currentUser: T.CurrentUser }> {\n    static displayName = getWrappedDisplayName(WrappedComponent, 'withCurrentUser');\n\n    render() {\n      return <WrappedComponent {...this.props} />;\n    }\n  }\n\n  function mapStateToProps(state: Store) {\n    return { currentUser: getCurrentUser(state) };\n  }\n\n  return connect(mapStateToProps)(Wrapper);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport './NavBarTabs.css';\n\ninterface Props extends React.HTMLAttributes<HTMLUListElement> {\n  children?: React.ReactNode;\n  className?: string;\n}\n\nexport default function NavBarTabs({ children, className, ...other }: Props) {\n  return (\n    <ul {...other} className={classNames('navbar-tabs', className)}>\n      {children}\n    </ul>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { IndexLink, Link } from 'react-router';\nimport NavBarTabs from '../../../components/ui/NavBarTabs';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function Nav() {\n  return (\n    <nav className=\"account-nav\">\n      <NavBarTabs>\n        <li>\n          <IndexLink activeClassName=\"active\" to=\"/account/\">\n            {translate('my_account.profile')}\n          </IndexLink>\n        </li>\n        <li>\n          <Link activeClassName=\"active\" to=\"/account/security/\">\n            {translate('my_account.security')}\n          </Link>\n        </li>\n        <li>\n          <Link activeClassName=\"active\" to=\"/account/notifications\">\n            {translate('my_account.notifications')}\n          </Link>\n        </li>\n        <li>\n          <Link activeClassName=\"active\" to=\"/account/projects/\">\n            {translate('my_account.projects')}\n          </Link>\n        </li>\n      </NavBarTabs>\n    </nav>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n/* eslint-disable no-bitwise, no-mixed-operators */\nexport function stringToColor(str: string) {\n  let hash = 0;\n  for (let i = 0; i < str.length; i++) {\n    hash = str.charCodeAt(i) + ((hash << 5) - hash);\n  }\n  let color = '#';\n  for (let i = 0; i < 3; i++) {\n    const value = (hash >> (i * 8)) & 0xff;\n    color += ('00' + value.toString(16)).substr(-2);\n  }\n  return color;\n}\n\nexport function isDarkColor(color: string) {\n  color = color.substr(1);\n  if (color.length === 3) {\n    // shortcut notation: #f90\n    color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];\n  }\n  const rgb = parseInt(color.substr(1), 16);\n  const r = (rgb >> 16) & 0xff;\n  const g = (rgb >> 8) & 0xff;\n  const b = (rgb >> 0) & 0xff;\n  const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n  return luma < 140;\n}\n\nexport function getTextColor(background: string, dark = '#222', light = '#fff') {\n  return isDarkColor(background) ? light : dark;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { getTextColor, stringToColor } from '../../helpers/colors';\n\ninterface Props {\n  className?: string;\n  name: string;\n  round?: boolean;\n  size: number;\n}\n\nexport default function GenericAvatar({ className, name, round, size }: Props) {\n  const color = stringToColor(name);\n\n  let text = '';\n  const words = name.split(/\\s+/).filter(word => word.length > 0);\n  if (words.length >= 2) {\n    text = words[0][0] + words[1][0];\n  } else if (name.length > 0) {\n    text = name[0];\n  }\n\n  return (\n    <div\n      className={classNames(className, 'rounded')}\n      style={{\n        backgroundColor: color,\n        borderRadius: round ? '50%' : undefined,\n        color: getTextColor(color),\n        display: 'inline-block',\n        fontSize: Math.min(size / 2, 14),\n        fontWeight: 'normal',\n        height: size,\n        lineHeight: `${size}px`,\n        textAlign: 'center',\n        verticalAlign: 'top',\n        width: size\n      }}>\n      {text.toUpperCase()}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport GenericAvatar from '../../components/ui/GenericAvatar';\nimport { getGlobalSettingValue, Store } from '../../store/rootReducer';\n\ninterface Props {\n  className?: string;\n  enableGravatar: boolean;\n  gravatarServerUrl: string;\n  hash?: string;\n  name?: string;\n  size: number;\n}\n\nfunction Avatar(props: Props) {\n  if (!props.enableGravatar || !props.hash) {\n    if (!props.name) {\n      return null;\n    }\n    return <GenericAvatar className={props.className} name={props.name} size={props.size} />;\n  }\n\n  const url = props.gravatarServerUrl\n    .replace('{EMAIL_MD5}', props.hash)\n    .replace('{SIZE}', String(props.size * 2));\n\n  return (\n    <img\n      alt={props.name}\n      className={classNames(props.className, 'rounded')}\n      height={props.size}\n      src={url}\n      width={props.size}\n    />\n  );\n}\n\nconst mapStateToProps = (state: Store) => {\n  const enableGravatar = getGlobalSettingValue(state, 'sonar.lf.enableGravatar');\n  const gravatarServerUrl = getGlobalSettingValue(state, 'sonar.lf.gravatarServerUrl');\n  return {\n    enableGravatar: Boolean(enableGravatar && enableGravatar.value === 'true'),\n    gravatarServerUrl: (gravatarServerUrl && gravatarServerUrl.value) || ''\n  };\n};\n\nexport default connect(mapStateToProps)(Avatar);\n\nexport const unconnectedAvatar = Avatar;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Avatar from '../../../components/ui/Avatar';\n\ninterface Props {\n  user: T.LoggedInUser;\n}\n\nexport default function UserCard({ user }: Props) {\n  return (\n    <div className=\"account-user\">\n      <div className=\"pull-left account-user-avatar\" id=\"avatar\">\n        <Avatar hash={user.avatar} name={user.name} size={60} />\n      </div>\n      <h1 className=\"pull-left\" id=\"name\">\n        {user.name}\n      </h1>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication';\nimport { translate } from '../../../helpers/l10n';\nimport '../account.css';\nimport Nav from './Nav';\nimport UserCard from './UserCard';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n}\n\nexport class Account extends React.PureComponent<Props> {\n  componentDidMount() {\n    if (!this.props.currentUser.isLoggedIn) {\n      handleRequiredAuthentication();\n    }\n  }\n\n  render() {\n    const { currentUser, children } = this.props;\n\n    if (!currentUser.isLoggedIn) {\n      return null;\n    }\n\n    const title = translate('my_account.page');\n    return (\n      <div id=\"account-page\">\n        <Suggestions suggestions=\"account\" />\n        <Helmet defaultTitle={title} defer={false} titleTemplate={`%s - ${title}`} />\n        <A11ySkipTarget anchor=\"account_main\" />\n        <header className=\"account-header\">\n          <div className=\"account-container clearfix\">\n            <UserCard user={currentUser as T.LoggedInUser} />\n            <Nav />\n          </div>\n        </header>\n\n        {children}\n      </div>\n    );\n  }\n}\n\nexport default withCurrentUser(Account);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\ninterface Props extends IconProps {\n  fillInner?: string;\n}\n\nexport default function HelpIcon({ fill = 'currentColor', fillInner, ...iconProps }: Props) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M9.167 12.375v-1.75a.284.284 0 00-.082-.21.284.284 0 00-.21-.082h-1.75a.284.284 0 00-.21.082.284.284 0 00-.082.21v1.75c0 .085.028.155.082.21a.284.284 0 00.21.082h1.75a.284.284 0 00.21-.082.284.284 0 00.082-.21zM11.5 6.25c0-.535-.169-1.03-.506-1.486a3.452 3.452 0 00-1.262-1.057 3.462 3.462 0 00-1.55-.374c-1.476 0-2.603.647-3.381 1.942-.091.146-.067.273.073.383l1.203.911c.042.036.1.055.173.055a.269.269 0 00.228-.11c.322-.413.583-.692.784-.838.206-.146.468-.219.784-.219.291 0 .551.079.779.237.228.158.342.337.342.538 0 .23-.061.416-.183.556-.121.14-.328.276-.62.41a3.13 3.13 0 00-1.052.788c-.32.356-.479.737-.479 1.144v.328c0 .085.028.155.082.21a.284.284 0 00.21.082h1.75a.284.284 0 00.21-.082.284.284 0 00.082-.21c0-.115.065-.266.196-.45a1.54 1.54 0 01.496-.452c.195-.11.344-.196.447-.26a3.84 3.84 0 00.42-.319c.175-.149.31-.294.405-.437a2.407 2.407 0 00.369-1.29zM15 8c0 1.27-.313 2.441-.939 3.514a6.969 6.969 0 01-2.547 2.547A6.848 6.848 0 018 15a6.848 6.848 0 01-3.514-.939 6.969 6.969 0 01-2.547-2.547A6.848 6.848 0 011 8c0-1.27.313-2.441.939-3.514A6.969 6.969 0 014.486 1.94 6.848 6.848 0 018 1c1.27 0 2.441.313 3.514.939a6.969 6.969 0 012.547 2.547A6.848 6.848 0 0115 8z\"\n        fill={fill}\n      />\n      {fillInner && (\n        <path\n          d=\"M9.167 12.375v-1.75a.284.284 0 00-.082-.21.284.284 0 00-.21-.082h-1.75a.284.284 0 00-.21.082.284.284 0 00-.082.21v1.75c0 .085.028.155.082.21a.284.284 0 00.21.082h1.75a.284.284 0 00.21-.082.284.284 0 00.082-.21zM11.5 6.25c0-.535-.169-1.03-.506-1.486a3.452 3.452 0 00-1.262-1.057 3.462 3.462 0 00-1.55-.374c-1.476 0-2.603.647-3.381 1.942-.091.146-.067.273.073.383l1.203.911c.042.036.1.055.173.055a.269.269 0 00.228-.11c.322-.413.583-.692.784-.838.206-.146.468-.219.784-.219.291 0 .551.079.779.237.228.158.342.337.342.538 0 .23-.061.416-.183.556-.121.14-.328.276-.62.41a3.13 3.13 0 00-1.052.788c-.32.356-.479.737-.479 1.144v.328c0 .085.028.155.082.21a.284.284 0 00.21.082h1.75a.284.284 0 00.21-.082.284.284 0 00.082-.21c0-.115.065-.266.196-.45a1.54 1.54 0 01.496-.452c.195-.11.344-.196.447-.26a3.84 3.84 0 00.42-.319c.175-.149.31-.294.405-.437a2.407 2.407 0 00.369-1.29z\"\n          fill={fillInner}\n        />\n      )}\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport { rawSizes } from '../../app/theme';\n\ninterface Props {\n  /**\n   * First time `children` are rendered with `undefined` fixes to measure the offset.\n   * Second time it renders with the computed fixes.\n   */\n  children: (props: Fixes) => React.ReactNode;\n\n  /**\n   * Use this flag to force re-positioning.\n   * Use cases:\n   *   - when you need to measure `children` size first\n   *   - when you load content asynchronously\n   */\n  ready?: boolean;\n}\n\ninterface Fixes {\n  leftFix?: number;\n  topFix?: number;\n}\n\nconst EDGE_MARGIN = rawSizes.grid / 2;\n\nexport default class ScreenPositionFixer extends React.Component<Props, Fixes> {\n  throttledPosition: () => void;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {};\n    this.throttledPosition = throttle(this.position, 50);\n  }\n\n  componentDidMount() {\n    this.addEventListeners();\n    this.position();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (!prevProps.ready && this.props.ready) {\n      this.position();\n    } else if (prevProps.ready && !this.props.ready) {\n      this.reset();\n    }\n  }\n\n  componentWillUnmount() {\n    this.removeEventListeners();\n  }\n\n  addEventListeners = () => {\n    window.addEventListener('resize', this.throttledPosition);\n  };\n\n  removeEventListeners = () => {\n    window.removeEventListener('resize', this.throttledPosition);\n  };\n\n  reset = () => {\n    this.setState({ leftFix: undefined, topFix: undefined });\n  };\n\n  position = () => {\n    // eslint-disable-next-line react/no-find-dom-node\n    const node = findDOMNode(this);\n    if (node && node instanceof Element) {\n      const { width, height, left, top } = node.getBoundingClientRect();\n      const { clientHeight, clientWidth } = document.documentElement;\n\n      let leftFix = 0;\n      if (left < EDGE_MARGIN) {\n        leftFix = EDGE_MARGIN - left;\n      } else if (left + width > clientWidth - EDGE_MARGIN) {\n        leftFix = clientWidth - EDGE_MARGIN - left - width;\n      }\n\n      let topFix = 0;\n      if (top < EDGE_MARGIN) {\n        topFix = EDGE_MARGIN - top;\n      } else if (top + height > clientHeight - EDGE_MARGIN) {\n        topFix = clientHeight - EDGE_MARGIN - top - height;\n      }\n\n      this.setState({ leftFix, topFix });\n    }\n  };\n\n  render() {\n    return this.props.children(this.state);\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport { createPortal, findDOMNode } from 'react-dom';\nimport { rawSizes } from '../../app/theme';\nimport ScreenPositionFixer from './ScreenPositionFixer';\nimport './Tooltip.css';\n\nexport type Placement = 'bottom' | 'right' | 'left' | 'top';\n\nexport interface TooltipProps {\n  classNameSpace?: string;\n  children: React.ReactElement<{}>;\n  mouseEnterDelay?: number;\n  mouseLeaveDelay?: number;\n  onShow?: () => void;\n  onHide?: () => void;\n  overlay: React.ReactNode;\n  placement?: Placement;\n  visible?: boolean;\n}\n\ninterface Measurements {\n  height: number;\n  left: number;\n  top: number;\n  width: number;\n}\n\ninterface OwnState {\n  flipped: boolean;\n  placement?: Placement;\n  visible: boolean;\n}\n\ntype State = OwnState & Partial<Measurements>;\n\nconst FLIP_MAP: { [key in Placement]: Placement } = {\n  left: 'right',\n  right: 'left',\n  top: 'bottom',\n  bottom: 'top'\n};\n\nfunction isMeasured(state: State): state is OwnState & Measurements {\n  return state.height !== undefined;\n}\n\nexport default function Tooltip(props: TooltipProps) {\n  // overlay is a ReactNode, so it can be `undefined` or `null`\n  // this allows to easily render a tooltip conditionally\n  // more generaly we avoid rendering empty tooltips\n  return props.overlay != null && props.overlay !== '' ? (\n    <TooltipInner {...props} />\n  ) : (\n    props.children\n  );\n}\n\nexport class TooltipInner extends React.Component<TooltipProps, State> {\n  throttledPositionTooltip: () => void;\n  mouseEnterTimeout?: number;\n  mouseLeaveTimeout?: number;\n  tooltipNode?: HTMLElement | null;\n  mounted = false;\n  mouseIn = false;\n\n  static defaultProps = {\n    mouseEnterDelay: 0.1\n  };\n\n  constructor(props: TooltipProps) {\n    super(props);\n    this.state = {\n      flipped: false,\n      placement: props.placement,\n      visible: props.visible !== undefined ? props.visible : false\n    };\n    this.throttledPositionTooltip = throttle(this.positionTooltip, 10);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    if (this.props.visible === true) {\n      this.positionTooltip();\n      this.addEventListeners();\n    }\n  }\n\n  componentDidUpdate(prevProps: TooltipProps, prevState: State) {\n    if (this.props.placement !== prevProps.placement) {\n      this.setState({ placement: this.props.placement });\n      // Break. This will trigger a new componentDidUpdate() call, so the below\n      // positionTooltip() call will be correct. Otherwise, it might not use\n      // the new state.placement value.\n      return;\n    }\n\n    if (\n      // opens\n      (this.props.visible === true && !prevProps.visible) ||\n      (this.props.visible === undefined &&\n        this.state.visible === true &&\n        prevState.visible === false)\n    ) {\n      this.positionTooltip();\n      this.addEventListeners();\n    } else if (\n      // closes\n      (!this.props.visible && prevProps.visible === true) ||\n      (this.props.visible === undefined &&\n        this.state.visible === false &&\n        prevState.visible === true)\n    ) {\n      this.clearPosition();\n      this.removeEventListeners();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    this.removeEventListeners();\n    this.clearTimeouts();\n  }\n\n  addEventListeners = () => {\n    window.addEventListener('resize', this.throttledPositionTooltip);\n    window.addEventListener('scroll', this.throttledPositionTooltip);\n  };\n\n  removeEventListeners = () => {\n    window.removeEventListener('resize', this.throttledPositionTooltip);\n    window.removeEventListener('scroll', this.throttledPositionTooltip);\n  };\n\n  clearTimeouts = () => {\n    window.clearTimeout(this.mouseEnterTimeout);\n    window.clearTimeout(this.mouseLeaveTimeout);\n  };\n\n  isVisible = () => {\n    return this.props.visible !== undefined ? this.props.visible : this.state.visible;\n  };\n\n  getPlacement = (): Placement => {\n    return this.state.placement || 'bottom';\n  };\n\n  tooltipNodeRef = (node: HTMLElement | null) => {\n    this.tooltipNode = node;\n  };\n\n  adjustArrowPosition = (\n    placement: Placement,\n    { leftFix, topFix }: { leftFix: number; topFix: number }\n  ) => {\n    switch (placement) {\n      case 'left':\n      case 'right':\n        return { marginTop: -topFix };\n      default:\n        return { marginLeft: -leftFix };\n    }\n  };\n\n  positionTooltip = () => {\n    // `findDOMNode(this)` will search for the DOM node for the current component\n    // first it will find a React.Fragment (see `render`),\n    // so it will get the DOM node of the first child, i.e. DOM node of `this.props.children`\n    // docs: https://reactjs.org/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components\n\n    // eslint-disable-next-line react/no-find-dom-node\n    const toggleNode = findDOMNode(this);\n\n    if (toggleNode && toggleNode instanceof Element && this.tooltipNode) {\n      const toggleRect = toggleNode.getBoundingClientRect();\n      const tooltipRect = this.tooltipNode.getBoundingClientRect();\n      const { width, height } = tooltipRect;\n\n      let left = 0;\n      let top = 0;\n\n      switch (this.getPlacement()) {\n        case 'bottom':\n          left = toggleRect.left + toggleRect.width / 2 - width / 2;\n          top = toggleRect.top + toggleRect.height;\n          break;\n        case 'top':\n          left = toggleRect.left + toggleRect.width / 2 - width / 2;\n          top = toggleRect.top - height;\n          break;\n        case 'right':\n          left = toggleRect.left + toggleRect.width;\n          top = toggleRect.top + toggleRect.height / 2 - height / 2;\n          break;\n        case 'left':\n          left = toggleRect.left - width;\n          top = toggleRect.top + toggleRect.height / 2 - height / 2;\n          break;\n      }\n\n      // save width and height (and later set in `render`) to avoid resizing the tooltip element,\n      // when it's placed close to the window edge\n      this.setState({\n        left: window.pageXOffset + left,\n        top: window.pageYOffset + top,\n        width,\n        height\n      });\n    }\n  };\n\n  clearPosition = () => {\n    this.setState({\n      flipped: false,\n      left: undefined,\n      top: undefined,\n      width: undefined,\n      height: undefined,\n      placement: this.props.placement\n    });\n  };\n\n  handleMouseEnter = () => {\n    this.mouseEnterTimeout = window.setTimeout(() => {\n      // for some reason even after the `this.mouseEnterTimeout` is cleared, it still triggers\n      // to workaround this issue, check that its value is not `undefined`\n      // (if it's `undefined`, it means the timer has been reset)\n      if (\n        this.mounted &&\n        this.props.visible === undefined &&\n        this.mouseEnterTimeout !== undefined\n      ) {\n        this.setState({ visible: true });\n      }\n    }, (this.props.mouseEnterDelay || 0) * 1000);\n\n    if (this.props.onShow) {\n      this.props.onShow();\n    }\n  };\n\n  handleMouseLeave = () => {\n    if (this.mouseEnterTimeout !== undefined) {\n      window.clearTimeout(this.mouseEnterTimeout);\n      this.mouseEnterTimeout = undefined;\n    }\n\n    if (!this.mouseIn) {\n      this.mouseLeaveTimeout = window.setTimeout(() => {\n        if (this.mounted && this.props.visible === undefined && !this.mouseIn) {\n          this.setState({ visible: false });\n        }\n      }, (this.props.mouseLeaveDelay || 0) * 1000);\n\n      if (this.props.onHide) {\n        this.props.onHide();\n      }\n    }\n  };\n\n  handleOverlayMouseEnter = () => {\n    this.mouseIn = true;\n  };\n\n  handleOverlayMouseLeave = () => {\n    this.mouseIn = false;\n    this.handleMouseLeave();\n  };\n\n  needsFlipping = (leftFix: number, topFix: number) => {\n    // We can live with a tooltip that's slightly positioned over the toggle\n    // node. Only trigger if it really starts overlapping, as the re-positioning\n    // is quite expensive, needing 2 re-renders.\n    const threshold = rawSizes.grid;\n    switch (this.getPlacement()) {\n      case 'left':\n      case 'right':\n        return Math.abs(leftFix) > threshold;\n      case 'top':\n      case 'bottom':\n        return Math.abs(topFix) > threshold;\n    }\n    return false;\n  };\n\n  renderActual = ({ leftFix = 0, topFix = 0 }) => {\n    if (\n      !this.state.flipped &&\n      (leftFix !== 0 || topFix !== 0) &&\n      this.needsFlipping(leftFix, topFix)\n    ) {\n      // Update state in a render function... Not a good idea, but we need to\n      // render in order to know if we need to flip... To prevent React from\n      // complaining, we update the state using a setTimeout() call.\n      setTimeout(() => {\n        this.setState(\n          ({ placement = 'bottom' }) => ({\n            flipped: true,\n            // Set height to undefined to force ScreenPositionFixer to\n            // re-compute our positioning.\n            height: undefined,\n            placement: FLIP_MAP[placement]\n          }),\n          () => {\n            if (this.state.visible) {\n              // Force a re-positioning, as \"only\" updating the state doesn't\n              // recompute the position, only re-renders with the previous\n              // position (which is no longer correct).\n              this.positionTooltip();\n            }\n          }\n        );\n      }, 1);\n      return null;\n    }\n\n    const { classNameSpace = 'tooltip' } = this.props;\n    const currentPlacement = this.getPlacement();\n    const style = isMeasured(this.state)\n      ? {\n          left: this.state.left + leftFix,\n          top: this.state.top + topFix,\n          width: this.state.width,\n          height: this.state.height\n        }\n      : undefined;\n\n    return (\n      <div\n        className={`${classNameSpace} ${currentPlacement}`}\n        onMouseEnter={this.handleOverlayMouseEnter}\n        onMouseLeave={this.handleOverlayMouseLeave}\n        ref={this.tooltipNodeRef}\n        style={style}>\n        <div className={`${classNameSpace}-inner`}>{this.props.overlay}</div>\n        <div\n          className={`${classNameSpace}-arrow`}\n          style={\n            isMeasured(this.state)\n              ? this.adjustArrowPosition(currentPlacement, { leftFix, topFix })\n              : undefined\n          }\n        />\n      </div>\n    );\n  };\n\n  render() {\n    return (\n      <>\n        {React.cloneElement(this.props.children, {\n          onMouseEnter: this.handleMouseEnter,\n          onMouseLeave: this.handleMouseLeave\n        })}\n        {this.isVisible() && (\n          <TooltipPortal>\n            <ScreenPositionFixer ready={isMeasured(this.state)}>\n              {this.renderActual}\n            </ScreenPositionFixer>\n          </TooltipPortal>\n        )}\n      </>\n    );\n  }\n}\n\nclass TooltipPortal extends React.Component {\n  el: HTMLElement;\n\n  constructor(props: {}) {\n    super(props);\n    this.el = document.createElement('div');\n  }\n\n  componentDidMount() {\n    document.body.appendChild(this.el);\n  }\n\n  componentWillUnmount() {\n    document.body.removeChild(this.el);\n  }\n\n  render() {\n    return createPortal(this.props.children, this.el);\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport HelpIcon from '../icons/HelpIcon';\nimport { IconProps } from '../icons/Icon';\nimport './HelpTooltip.css';\nimport Tooltip, { Placement } from './Tooltip';\n\ninterface Props extends Pick<IconProps, 'size'> {\n  className?: string;\n  children?: React.ReactNode;\n  onShow?: () => void;\n  overlay: React.ReactNode;\n  placement?: Placement;\n}\n\nexport default function HelpTooltip({ size = 12, ...props }: Props) {\n  return (\n    <div className={classNames('help-tooltip', props.className)}>\n      <Tooltip\n        mouseLeaveDelay={0.25}\n        onShow={props.onShow}\n        overlay={props.overlay}\n        placement={props.placement}>\n        <span className=\"display-inline-flex-center\">\n          {props.children || <HelpIcon fill={colors.gray71} size={size} />}\n        </span>\n      </Tooltip>\n    </div>\n  );\n}\n\nexport function DarkHelpTooltip({ size = 12, ...props }: Omit<Props, 'children'>) {\n  return (\n    <HelpTooltip {...props}>\n      <HelpIcon fill={colors.transparentBlack} fillInner={colors.white} size={size} />\n    </HelpTooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport handleRequiredAuthentication from '../../helpers/handleRequiredAuthentication';\nimport { isLoggedIn } from '../../helpers/users';\nimport { getWrappedDisplayName } from './utils';\nimport { withCurrentUser } from './withCurrentUser';\n\nexport function whenLoggedIn<P>(WrappedComponent: React.ComponentType<P>) {\n  class Wrapper extends React.Component<P & { currentUser: T.CurrentUser }> {\n    static displayName = getWrappedDisplayName(WrappedComponent, 'whenLoggedIn');\n\n    componentDidMount() {\n      if (!isLoggedIn(this.props.currentUser)) {\n        handleRequiredAuthentication();\n      }\n    }\n\n    render() {\n      if (isLoggedIn(this.props.currentUser)) {\n        return <WrappedComponent {...this.props} />;\n      } else {\n        return null;\n      }\n    }\n  }\n\n  return withCurrentUser(Wrapper);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getIdentityProviders } from '../../../api/users';\nimport { colors } from '../../../app/theme';\nimport { getTextColor } from '../../../helpers/colors';\nimport { getBaseUrl } from '../../../helpers/system';\n\nexport interface UserExternalIdentityProps {\n  user: T.LoggedInUser;\n}\n\ninterface State {\n  identityProvider?: T.IdentityProvider;\n  loading: boolean;\n}\n\nexport default class UserExternalIdentity extends React.PureComponent<\n  UserExternalIdentityProps,\n  State\n> {\n  mounted = false;\n  state: State = {\n    loading: true\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchIdentityProviders();\n  }\n\n  componentDidUpdate(prevProps: UserExternalIdentityProps) {\n    if (prevProps.user !== this.props.user) {\n      this.fetchIdentityProviders();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchIdentityProviders() {\n    this.setState({ loading: true });\n    getIdentityProviders()\n      .then(r => r.identityProviders)\n      .then(providers => {\n        if (this.mounted) {\n          const identityProvider = providers.find(\n            provider => provider.key === this.props.user.externalProvider\n          );\n          this.setState({ loading: false, identityProvider });\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      });\n  }\n\n  render() {\n    const { user } = this.props;\n    const { loading, identityProvider } = this.state;\n\n    if (loading) {\n      return null;\n    }\n\n    if (!identityProvider) {\n      return (\n        <div>\n          {user.externalProvider}\n          {': '}\n          {user.externalIdentity}\n        </div>\n      );\n    }\n\n    return (\n      <div\n        className=\"identity-provider\"\n        style={{\n          backgroundColor: identityProvider.backgroundColor,\n          color: getTextColor(identityProvider.backgroundColor, colors.secondFontColor)\n        }}>\n        <img\n          alt={identityProvider.name}\n          className=\"little-spacer-right\"\n          height=\"14\"\n          src={getBaseUrl() + identityProvider.iconPath}\n          width=\"14\"\n        />{' '}\n        {user.externalIdentity}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { whenLoggedIn } from '../../../components/hoc/whenLoggedIn';\nimport { translate } from '../../../helpers/l10n';\nimport UserExternalIdentity from './UserExternalIdentity';\n\nexport interface ProfileProps {\n  currentUser: T.LoggedInUser;\n}\n\nexport function Profile({ currentUser }: ProfileProps) {\n  const isExternalProvider = !currentUser.local && currentUser.externalProvider !== 'sonarqube';\n\n  return (\n    <div className=\"account-body account-container account-profile\">\n      <div className=\"boxed-group\">\n        {renderLogin()}\n        {renderEmail()}\n        {renderUserGroups()}\n        {renderScmAccounts()}\n      </div>\n    </div>\n  );\n\n  function renderLogin() {\n    if (!currentUser.login && !isExternalProvider) {\n      return null;\n    }\n\n    return (\n      <div className=\"boxed-group-inner\">\n        <h2 className=\"spacer-bottom\">{translate('my_profile.login')}</h2>\n        {currentUser.login && (\n          <p className=\"spacer-bottom\" id=\"login\">\n            {currentUser.login}\n          </p>\n        )}\n        {isExternalProvider && <UserExternalIdentity user={currentUser} />}\n      </div>\n    );\n  }\n\n  function renderEmail() {\n    if (!currentUser.email) {\n      return null;\n    }\n\n    return (\n      <div className=\"boxed-group-inner\">\n        <h2 className=\"spacer-bottom\">{translate('my_profile.email')}</h2>\n        <div className=\"spacer-bottom\">\n          <p id=\"email\">{currentUser.email}</p>\n        </div>\n      </div>\n    );\n  }\n\n  function renderUserGroups() {\n    if (!currentUser.groups || currentUser.groups.length === 0) {\n      return null;\n    }\n\n    return (\n      <div className=\"boxed-group-inner\">\n        <h2 className=\"spacer-bottom\">{translate('my_profile.groups')}</h2>\n        <ul id=\"groups\">\n          {currentUser.groups.map(group => (\n            <li className=\"little-spacer-bottom\" key={group} title={group}>\n              {group}\n            </li>\n          ))}\n        </ul>\n      </div>\n    );\n  }\n\n  function renderScmAccounts() {\n    if (\n      !currentUser.login &&\n      !currentUser.email &&\n      (!currentUser.scmAccounts || currentUser.scmAccounts.length === 0)\n    ) {\n      return null;\n    }\n\n    return (\n      <div className=\"boxed-group-inner\">\n        <h2 className=\"spacer-bottom\">\n          {translate('my_profile.scm_accounts')}\n          <HelpTooltip\n            className=\"little-spacer-left\"\n            overlay={translate('my_profile.scm_accounts.tooltip')}\n          />\n        </h2>\n        <ul id=\"scm-accounts\">\n          {currentUser.login && (\n            <li className=\"little-spacer-bottom text-ellipsis\" title={currentUser.login}>\n              {currentUser.login}\n            </li>\n          )}\n\n          {currentUser.email && (\n            <li className=\"little-spacer-bottom text-ellipsis\" title={currentUser.email}>\n              {currentUser.email}\n            </li>\n          )}\n\n          {currentUser.scmAccounts &&\n            currentUser.scmAccounts.length > 0 &&\n            currentUser.scmAccounts.map(scmAccount => (\n              <li className=\"little-spacer-bottom\" key={scmAccount} title={scmAccount}>\n                {scmAccount}\n              </li>\n            ))}\n        </ul>\n      </div>\n    );\n  }\n}\n\nexport default whenLoggedIn(Profile);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ChevronRightIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M11.596 8.28l-4.604 4.602a.382.382 0 0 1-.279.118.382.382 0 0 1-.279-.118l-1.03-1.03a.382.382 0 0 1-.117-.278c0-.108.04-.201.117-.28L8.7 8 5.404 4.706a.382.382 0 0 1-.117-.28c0-.108.04-.2.117-.279l1.03-1.03A.382.382 0 0 1 6.714 3c.107 0 .2.04.278.118l4.604 4.603a.382.382 0 0 1 .117.279c0 .108-.04.201-.117.28z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport interface ClearIconProps extends IconProps {\n  thin?: boolean;\n}\n\nexport default function ClearIcon({ fill = 'currentColor', thin, ...iconProps }: ClearIconProps) {\n  return (\n    <Icon {...iconProps}>\n      {thin ? (\n        <path\n          d=\"M14 3.209l-1.209-1.209-4.791 4.791-4.791-4.791-1.209 1.209 4.791 4.791-4.791 4.791 1.209 1.209 4.791-4.791 4.791 4.791 1.209-1.209-4.791-4.791z\"\n          style={{ fill }}\n        />\n      ) : (\n        <path\n          d=\"M14 4.242L11.758 2l-3.76 3.76L4.242 2 2 4.242l3.756 3.756L2 11.758 4.242 14l3.756-3.76 3.76 3.76L14 11.758l-3.76-3.76L14 4.242z\"\n          style={{ fill }}\n        />\n      )}\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function DeleteIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M13.571429 1.8750019h-3.214285l-.251787-.5113283a.64285716.65624976 0 0 0-.5758927-.3636718H6.4678572a.63535718.64859353 0 0 0-.5732142.3636718l-.2517858.5113283H2.4285714A.42857144.43749984 0 0 0 2 2.3125018v.8749996a.42857144.43749984 0 0 0 .4285714.4374999H13.571429A.42857144.43749984 0 0 0 14 3.1875014v-.8749996a.42857144.43749984 0 0 0-.428571-.4374999zM3.4250001 13.769529a1.2857144 1.3124996 0 0 0 1.2830357 1.230468h6.5839282A1.2857144 1.3124996 0 0 0 12.575 13.769529l.567857-9.269528H2.8571428z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function EditIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M4.875 12.986l.721-.72-1.861-1.862-.721.72v.848h1.014v1.014h.847zm4.143-7.35c0-.117-.058-.175-.174-.175a.183.183 0 0 0-.135.056L4.416 9.81a.183.183 0 0 0-.056.135c0 .116.058.174.175.174a.183.183 0 0 0 .134-.056L8.962 5.77a.183.183 0 0 0 .056-.134zM8.59 4.115l3.295 3.295L5.295 14H2v-3.295l6.59-6.59zm5.41.76a.97.97 0 0 1-.293.713l-1.315 1.315-3.295-3.295L10.412 2.3c.19-.2.428-.301.713-.301.28 0 .52.1.72.301l1.862 1.853c.195.206.293.447.293.721z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport ChevronRightIcon from '../icons/ChevronRightIcon';\nimport ClearIcon, { ClearIconProps } from '../icons/ClearIcon';\nimport DeleteIcon from '../icons/DeleteIcon';\nimport EditIcon from '../icons/EditIcon';\nimport { IconProps } from '../icons/Icon';\nimport './buttons.css';\nimport Tooltip, { TooltipProps } from './Tooltip';\n\ntype AllowedButtonAttributes = Pick<\n  React.ButtonHTMLAttributes<HTMLButtonElement>,\n  'className' | 'disabled' | 'id' | 'style' | 'title'\n>;\n\ninterface ButtonProps extends AllowedButtonAttributes {\n  autoFocus?: boolean;\n  children?: React.ReactNode;\n  innerRef?: (node: HTMLElement | null) => void;\n  name?: string;\n  onClick?: () => void;\n  preventDefault?: boolean;\n  stopPropagation?: boolean;\n  type?: 'button' | 'submit' | 'reset';\n}\n\nexport class Button extends React.PureComponent<ButtonProps> {\n  handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n    const { disabled, onClick, preventDefault = true, stopPropagation = false } = this.props;\n\n    event.currentTarget.blur();\n    if (preventDefault || disabled) {\n      event.preventDefault();\n    }\n    if (stopPropagation) {\n      event.stopPropagation();\n    }\n\n    if (onClick && !disabled) {\n      onClick();\n    }\n  };\n\n  render() {\n    const {\n      className,\n      disabled,\n      innerRef,\n      onClick,\n      preventDefault,\n      stopPropagation,\n      type = 'button',\n      ...props\n    } = this.props;\n    return (\n      <button\n        {...props}\n        aria-disabled={disabled}\n        className={classNames('button', className, { disabled })}\n        id={this.props.id}\n        onClick={this.handleClick}\n        ref={this.props.innerRef}\n        // eslint-disable-next-line react/button-has-type\n        type={type}\n      />\n    );\n  }\n}\n\nexport function ButtonLink({ className, ...props }: ButtonProps) {\n  return <Button {...props} className={classNames('button-link', className)} />;\n}\n\nexport function SubmitButton(props: T.Omit<ButtonProps, 'type'>) {\n  // do not prevent default to actually submit a form\n  return <Button {...props} preventDefault={false} type=\"submit\" />;\n}\n\nexport function ResetButtonLink(props: T.Omit<ButtonProps, 'type'>) {\n  return <ButtonLink {...props} type=\"reset\" />;\n}\n\nexport interface ButtonIconProps extends ButtonProps {\n  'aria-label'?: string;\n  'aria-labelledby'?: string;\n  className?: string;\n  color?: string;\n  onClick?: () => void;\n  tooltip?: React.ReactNode;\n  tooltipProps?: Partial<TooltipProps>;\n}\n\nexport function ButtonIcon(props: ButtonIconProps) {\n  const { className, color, tooltip, tooltipProps, ...other } = props;\n  return (\n    <Tooltip mouseEnterDelay={0.4} overlay={tooltip} {...tooltipProps}>\n      <Button\n        className={classNames(className, 'button-icon')}\n        stopPropagation={true}\n        style={{ color: color || colors.darkBlue }}\n        {...other}\n      />\n    </Tooltip>\n  );\n}\n\ninterface ClearButtonProps extends ButtonIconProps {\n  className?: string;\n  iconProps?: ClearIconProps;\n  onClick?: () => void;\n}\n\nexport function ClearButton({ color, iconProps = {}, ...props }: ClearButtonProps) {\n  return (\n    <ButtonIcon color={color || colors.gray60} {...props}>\n      <ClearIcon {...iconProps} />\n    </ButtonIcon>\n  );\n}\n\ninterface ActionButtonProps extends ButtonIconProps {\n  className?: string;\n  iconProps?: IconProps;\n  onClick?: () => void;\n}\n\nexport function DeleteButton({ iconProps = {}, ...props }: ActionButtonProps) {\n  return (\n    <ButtonIcon color={colors.red} {...props}>\n      <DeleteIcon {...iconProps} />\n    </ButtonIcon>\n  );\n}\n\nexport function EditButton({ iconProps = {}, ...props }: ActionButtonProps) {\n  return (\n    <ButtonIcon {...props}>\n      <EditIcon {...iconProps} />\n    </ButtonIcon>\n  );\n}\n\nexport function ListButton({ className, children, ...props }: ButtonProps) {\n  return (\n    <Button className={classNames('button-list', className)} {...props}>\n      {children}\n      <ChevronRightIcon />\n    </Button>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\n\nexport interface MandatoryFieldMarkerProps {\n  className?: string;\n}\n\nexport default function MandatoryFieldMarker({ className }: MandatoryFieldMarkerProps) {\n  return (\n    <em\n      aria-label={translate('field_required')}\n      className={classNames('mandatory little-spacer-left', className)}>\n      *\n    </em>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../helpers/l10n';\n\nexport interface MandatoryFieldsExplanationProps {\n  className?: string;\n}\n\nexport default function MandatoryFieldsExplanation({ className }: MandatoryFieldsExplanationProps) {\n  return (\n    <div aria-hidden={true} className={classNames('text-muted', className)}>\n      <FormattedMessage\n        id=\"fields_marked_with_x_required\"\n        defaultMessage={translate('fields_marked_with_x_required')}\n        values={{ star: <em className=\"mandatory\">*</em> }}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { changePassword } from '../../api/users';\nimport { SubmitButton } from '../../components/controls/buttons';\nimport { Alert } from '../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  className?: string;\n  user: T.LoggedInUser;\n  onPasswordChange?: () => void;\n}\n\ninterface State {\n  errors?: string[];\n  success: boolean;\n}\n\nexport default class ResetPasswordForm extends React.Component<Props, State> {\n  oldPassword: HTMLInputElement | null = null;\n  password: HTMLInputElement | null = null;\n  passwordConfirmation: HTMLInputElement | null = null;\n  state: State = {\n    success: false\n  };\n\n  handleSuccessfulChange = () => {\n    if (!this.oldPassword || !this.password || !this.passwordConfirmation) {\n      return;\n    }\n    this.oldPassword.value = '';\n    this.password.value = '';\n    this.passwordConfirmation.value = '';\n    this.setState({ success: true, errors: undefined });\n    if (this.props.onPasswordChange) {\n      this.props.onPasswordChange();\n    }\n  };\n\n  setErrors = (errors: string[]) => {\n    this.setState({ success: false, errors });\n  };\n\n  handleChangePassword = (event: React.FormEvent) => {\n    event.preventDefault();\n    if (!this.oldPassword || !this.password || !this.passwordConfirmation) {\n      return;\n    }\n    const { user } = this.props;\n    const previousPassword = this.oldPassword.value;\n    const password = this.password.value;\n    const passwordConfirmation = this.passwordConfirmation.value;\n\n    if (password !== passwordConfirmation) {\n      this.password.focus();\n      this.setErrors([translate('user.password_doesnt_match_confirmation')]);\n    } else {\n      changePassword({ login: user.login, password, previousPassword }).then(\n        this.handleSuccessfulChange,\n        () => {\n          // error already reported.\n        }\n      );\n    }\n  };\n\n  render() {\n    const { className } = this.props;\n    const { success, errors } = this.state;\n\n    return (\n      <form className={className} onSubmit={this.handleChangePassword}>\n        {success && <Alert variant=\"success\">{translate('my_profile.password.changed')}</Alert>}\n\n        {errors &&\n          errors.map((e, i) => (\n            /* eslint-disable-next-line react/no-array-index-key */\n            <Alert key={i} variant=\"error\">\n              {e}\n            </Alert>\n          ))}\n\n        <MandatoryFieldsExplanation className=\"form-field\" />\n\n        <div className=\"form-field\">\n          <label htmlFor=\"old_password\">\n            {translate('my_profile.password.old')}\n            <MandatoryFieldMarker />\n          </label>\n          <input\n            autoComplete=\"off\"\n            id=\"old_password\"\n            name=\"old_password\"\n            ref={elem => (this.oldPassword = elem)}\n            required={true}\n            type=\"password\"\n          />\n        </div>\n        <div className=\"form-field\">\n          <label htmlFor=\"password\">\n            {translate('my_profile.password.new')}\n            <MandatoryFieldMarker />\n          </label>\n          <input\n            autoComplete=\"off\"\n            id=\"password\"\n            name=\"password\"\n            ref={elem => (this.password = elem)}\n            required={true}\n            type=\"password\"\n          />\n        </div>\n        <div className=\"form-field\">\n          <label htmlFor=\"password_confirmation\">\n            {translate('my_profile.password.confirm')}\n            <MandatoryFieldMarker />\n          </label>\n          <input\n            autoComplete=\"off\"\n            id=\"password_confirmation\"\n            name=\"password_confirmation\"\n            ref={elem => (this.passwordConfirmation = elem)}\n            required={true}\n            type=\"password\"\n          />\n        </div>\n        <div className=\"form-field\">\n          <SubmitButton id=\"change-password\">{translate('update_verb')}</SubmitButton>\n        </div>\n      </form>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getInstance } from '../../helpers/system';\n\ninterface Props {\n  children?: (transformedMessage: string) => React.ReactChild;\n  message: string;\n}\n\nexport default function InstanceMessage({ children, message }: Props): any {\n  const transformedMessage = message.replace(/\\{instance\\}/gim, getInstance());\n\n  if (children) {\n    return children(transformedMessage);\n  }\n\n  return transformedMessage;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON } from '../helpers/request';\n\n/** List tokens for given user login */\nexport function getTokens(login: string): Promise<T.UserToken[]> {\n  return getJSON('/api/user_tokens/search', { login }).then(r => r.userTokens, throwGlobalError);\n}\n\nexport function generateToken(data: { name: string; login?: string }): Promise<T.NewUserToken> {\n  return postJSON('/api/user_tokens/generate', data).catch(throwGlobalError);\n}\n\nexport function revokeToken(data: { name: string; login?: string }) {\n  return post('/api/user_tokens/revoke', data).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\nexport interface ClickEventBoundaryProps {\n  children: React.ReactElement;\n}\n\nexport default function ClickEventBoundary({ children }: ClickEventBoundaryProps) {\n  return React.cloneElement(children, {\n    onClick: (e: React.SyntheticEvent<MouseEvent>) => {\n      e.stopPropagation();\n      if (typeof children.props.onClick === 'function') {\n        children.props.onClick(e);\n      }\n    }\n  });\n}\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = findTabbableDescendants;\n/*!\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n\nvar tabbableNode = /input|select|textarea|button|object/;\n\nfunction hidesContents(element) {\n  var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;\n\n  // If the node is empty, this is good enough\n  if (zeroSize && !element.innerHTML) return true;\n\n  try {\n    // Otherwise we need to check some styles\n    var style = window.getComputedStyle(element);\n    return zeroSize ? style.getPropertyValue(\"overflow\") !== \"visible\" ||\n    // if 'overflow: visible' set, check if there is actually any overflow\n    element.scrollWidth <= 0 && element.scrollHeight <= 0 : style.getPropertyValue(\"display\") == \"none\";\n  } catch (exception) {\n    // eslint-disable-next-line no-console\n    console.warn(\"Failed to inspect element style\");\n    return false;\n  }\n}\n\nfunction visible(element) {\n  var parentElement = element;\n  while (parentElement) {\n    if (parentElement === document.body) break;\n    if (hidesContents(parentElement)) return false;\n    parentElement = parentElement.parentNode;\n  }\n  return true;\n}\n\nfunction focusable(element, isTabIndexNotNaN) {\n  var nodeName = element.nodeName.toLowerCase();\n  var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === \"a\" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n  return res && visible(element);\n}\n\nfunction tabbable(element) {\n  var tabIndex = element.getAttribute(\"tabindex\");\n  if (tabIndex === null) tabIndex = undefined;\n  var isTabIndexNaN = isNaN(tabIndex);\n  return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);\n}\n\nfunction findTabbableDescendants(element) {\n  return [].slice.call(element.querySelectorAll(\"*\"), 0).filter(tabbable);\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nexports.handleBlur = handleBlur;\nexports.handleFocus = handleFocus;\nexports.markForFocusLater = markForFocusLater;\nexports.returnFocus = returnFocus;\nexports.popWithoutFocus = popWithoutFocus;\nexports.setupScopedFocus = setupScopedFocus;\nexports.teardownScopedFocus = teardownScopedFocus;\n\nvar _tabbable = require(\"../helpers/tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar focusLaterElements = [];\nvar modalElement = null;\nvar needToFocus = false;\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction resetState() {\n  focusLaterElements = [];\n}\n\n/* istanbul ignore next */\nfunction log() {\n  if (process.env.NODE_ENV === \"production\") return;\n  console.log(\"focusManager ----------\");\n  focusLaterElements.forEach(function (f) {\n    var check = f || {};\n    console.log(check.nodeName, check.className, check.id);\n  });\n  console.log(\"end focusManager ----------\");\n}\n/* eslint-enable no-console */\n\nfunction handleBlur() {\n  needToFocus = true;\n}\n\nfunction handleFocus() {\n  if (needToFocus) {\n    needToFocus = false;\n    if (!modalElement) {\n      return;\n    }\n    // need to see how jQuery shims document.on('focusin') so we don't need the\n    // setTimeout, firefox doesn't support focusin, if it did, we could focus\n    // the element outside of a setTimeout. Side-effect of this implementation\n    // is that the document.body gets focus, and then we focus our element right\n    // after, seems fine.\n    setTimeout(function () {\n      if (modalElement.contains(document.activeElement)) {\n        return;\n      }\n      var el = (0, _tabbable2.default)(modalElement)[0] || modalElement;\n      el.focus();\n    }, 0);\n  }\n}\n\nfunction markForFocusLater() {\n  focusLaterElements.push(document.activeElement);\n}\n\n/* eslint-disable no-console */\nfunction returnFocus() {\n  var preventScroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n  var toFocus = null;\n  try {\n    if (focusLaterElements.length !== 0) {\n      toFocus = focusLaterElements.pop();\n      toFocus.focus({ preventScroll: preventScroll });\n    }\n    return;\n  } catch (e) {\n    console.warn([\"You tried to return focus to\", toFocus, \"but it is not in the DOM anymore\"].join(\" \"));\n  }\n}\n/* eslint-enable no-console */\n\nfunction popWithoutFocus() {\n  focusLaterElements.length > 0 && focusLaterElements.pop();\n}\n\nfunction setupScopedFocus(element) {\n  modalElement = element;\n\n  if (window.addEventListener) {\n    window.addEventListener(\"blur\", handleBlur, false);\n    document.addEventListener(\"focus\", handleFocus, true);\n  } else {\n    window.attachEvent(\"onBlur\", handleBlur);\n    document.attachEvent(\"onFocus\", handleFocus);\n  }\n}\n\nfunction teardownScopedFocus() {\n  modalElement = null;\n\n  if (window.addEventListener) {\n    window.removeEventListener(\"blur\", handleBlur);\n    document.removeEventListener(\"focus\", handleFocus);\n  } else {\n    window.detachEvent(\"onBlur\", handleBlur);\n    document.detachEvent(\"onFocus\", handleFocus);\n  }\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = scopeTab;\n\nvar _tabbable = require(\"./tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction scopeTab(node, event) {\n  var tabbable = (0, _tabbable2.default)(node);\n\n  if (!tabbable.length) {\n    // Do nothing, since there are no elements that can receive focus.\n    event.preventDefault();\n    return;\n  }\n\n  var target = void 0;\n\n  var shiftKey = event.shiftKey;\n  var head = tabbable[0];\n  var tail = tabbable[tabbable.length - 1];\n\n  // proceed with default browser behavior on tab.\n  // Focus on last element on shift + tab.\n  if (node === document.activeElement) {\n    if (!shiftKey) return;\n    target = tail;\n  }\n\n  if (tail === document.activeElement && !shiftKey) {\n    target = head;\n  }\n\n  if (head === document.activeElement && shiftKey) {\n    target = tail;\n  }\n\n  if (target) {\n    event.preventDefault();\n    target.focus();\n    return;\n  }\n\n  // Safari radio issue.\n  //\n  // Safari does not move the focus to the radio button,\n  // so we need to force it to really walk through all elements.\n  //\n  // This is very error prone, since we are trying to guess\n  // if it is a safari browser from the first occurence between\n  // chrome or safari.\n  //\n  // The chrome user agent contains the first ocurrence\n  // as the 'chrome/version' and later the 'safari/version'.\n  var checkSafari = /(\\bChrome\\b|\\bSafari\\b)\\//.exec(navigator.userAgent);\n  var isSafariDesktop = checkSafari != null && checkSafari[1] != \"Chrome\" && /\\biPod\\b|\\biPad\\b/g.exec(navigator.userAgent) == null;\n\n  // If we are not in safari desktop, let the browser control\n  // the focus\n  if (!isSafariDesktop) return;\n\n  var x = tabbable.indexOf(document.activeElement);\n\n  if (x > -1) {\n    x += shiftKey ? -1 : 1;\n  }\n\n  target = tabbable[x];\n\n  // If the tabbable element does not exist,\n  // focus head/tail based on shiftKey\n  if (typeof target === \"undefined\") {\n    event.preventDefault();\n    target = shiftKey ? tail : head;\n    target.focus();\n    return;\n  }\n\n  event.preventDefault();\n\n  target.focus();\n}\nmodule.exports = exports[\"default\"];", "/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n  var printWarning = function printWarning(format, args) {\n    var len = arguments.length;\n    args = new Array(len > 1 ? len - 1 : 0);\n    for (var key = 1; key < len; key++) {\n      args[key - 1] = arguments[key];\n    }\n    var argIndex = 0;\n    var message = 'Warning: ' +\n      format.replace(/%s/g, function() {\n        return args[argIndex++];\n      });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  }\n\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n          '`warning(condition, format, ...args)` requires a warning ' +\n          'message argument'\n      );\n    }\n    if (!condition) {\n      printWarning.apply(null, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;\n", "/*!\n  Copyright (c) 2015 Jed Watson.\n  Based on code that is Copyright 2013-2015, Facebook, Inc.\n  All rights reserved.\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar canUseDOM = !!(\n\t\ttypeof window !== 'undefined' &&\n\t\twindow.document &&\n\t\twindow.document.createElement\n\t);\n\n\tvar ExecutionEnvironment = {\n\n\t\tcanUseDOM: canUseDOM,\n\n\t\tcanUseWorkers: typeof Worker !== 'undefined',\n\n\t\tcanUseEventListeners:\n\t\t\tcanUseDOM && !!(window.addEventListener || window.attachEvent),\n\n\t\tcanUseViewport: canUseDOM && !!window.screen\n\n\t};\n\n\tif (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\tdefine(function () {\n\t\t\treturn ExecutionEnvironment;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = ExecutionEnvironment;\n\t} else {\n\t\twindow.ExecutionEnvironment = ExecutionEnvironment;\n\t}\n\n}());\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.canUseDOM = exports.SafeNodeList = exports.SafeHTMLCollection = undefined;\n\nvar _exenv = require(\"exenv\");\n\nvar _exenv2 = _interopRequireDefault(_exenv);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar EE = _exenv2.default;\n\nvar SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};\n\nvar SafeHTMLCollection = exports.SafeHTMLCollection = EE.canUseDOM ? window.HTMLCollection : {};\n\nvar SafeNodeList = exports.SafeNodeList = EE.canUseDOM ? window.NodeList : {};\n\nvar canUseDOM = exports.canUseDOM = EE.canUseDOM;\n\nexports.default = SafeHTMLElement;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nexports.assertNodeList = assertNodeList;\nexports.setElement = setElement;\nexports.validateElement = validateElement;\nexports.hide = hide;\nexports.show = show;\nexports.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting;\n\nvar _warning = require(\"warning\");\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _safeHTMLElement = require(\"./safeHTMLElement\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar globalElement = null;\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction resetState() {\n  if (globalElement) {\n    if (globalElement.removeAttribute) {\n      globalElement.removeAttribute(\"aria-hidden\");\n    } else if (globalElement.length != null) {\n      globalElement.forEach(function (element) {\n        return element.removeAttribute(\"aria-hidden\");\n      });\n    } else {\n      document.querySelectorAll(globalElement).forEach(function (element) {\n        return element.removeAttribute(\"aria-hidden\");\n      });\n    }\n  }\n  globalElement = null;\n}\n\n/* istanbul ignore next */\nfunction log() {\n  if (process.env.NODE_ENV === \"production\") return;\n  var check = globalElement || {};\n  console.log(\"ariaAppHider ----------\");\n  console.log(check.nodeName, check.className, check.id);\n  console.log(\"end ariaAppHider ----------\");\n}\n/* eslint-enable no-console */\n\nfunction assertNodeList(nodeList, selector) {\n  if (!nodeList || !nodeList.length) {\n    throw new Error(\"react-modal: No elements were found for selector \" + selector + \".\");\n  }\n}\n\nfunction setElement(element) {\n  var useElement = element;\n  if (typeof useElement === \"string\" && _safeHTMLElement.canUseDOM) {\n    var el = document.querySelectorAll(useElement);\n    assertNodeList(el, useElement);\n    useElement = el;\n  }\n  globalElement = useElement || globalElement;\n  return globalElement;\n}\n\nfunction validateElement(appElement) {\n  var el = appElement || globalElement;\n  if (el) {\n    return Array.isArray(el) || el instanceof HTMLCollection || el instanceof NodeList ? el : [el];\n  } else {\n    (0, _warning2.default)(false, [\"react-modal: App element is not defined.\", \"Please use `Modal.setAppElement(el)` or set `appElement={el}`.\", \"This is needed so screen readers don't see main content\", \"when modal is opened. It is not recommended, but you can opt-out\", \"by setting `ariaHideApp={false}`.\"].join(\" \"));\n\n    return [];\n  }\n}\n\nfunction hide(appElement) {\n  var _iteratorNormalCompletion = true;\n  var _didIteratorError = false;\n  var _iteratorError = undefined;\n\n  try {\n    for (var _iterator = validateElement(appElement)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n      var el = _step.value;\n\n      el.setAttribute(\"aria-hidden\", \"true\");\n    }\n  } catch (err) {\n    _didIteratorError = true;\n    _iteratorError = err;\n  } finally {\n    try {\n      if (!_iteratorNormalCompletion && _iterator.return) {\n        _iterator.return();\n      }\n    } finally {\n      if (_didIteratorError) {\n        throw _iteratorError;\n      }\n    }\n  }\n}\n\nfunction show(appElement) {\n  var _iteratorNormalCompletion2 = true;\n  var _didIteratorError2 = false;\n  var _iteratorError2 = undefined;\n\n  try {\n    for (var _iterator2 = validateElement(appElement)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n      var el = _step2.value;\n\n      el.removeAttribute(\"aria-hidden\");\n    }\n  } catch (err) {\n    _didIteratorError2 = true;\n    _iteratorError2 = err;\n  } finally {\n    try {\n      if (!_iteratorNormalCompletion2 && _iterator2.return) {\n        _iterator2.return();\n      }\n    } finally {\n      if (_didIteratorError2) {\n        throw _iteratorError2;\n      }\n    }\n  }\n}\n\nfunction documentNotReadyOrSSRTesting() {\n  globalElement = null;\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nvar htmlClassList = {};\nvar docBodyClassList = {};\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction removeClass(at, cls) {\n  at.classList.remove(cls);\n}\n\n/* istanbul ignore next */\nfunction resetState() {\n  var htmlElement = document.getElementsByTagName(\"html\")[0];\n  for (var cls in htmlClassList) {\n    removeClass(htmlElement, htmlClassList[cls]);\n  }\n\n  var body = document.body;\n  for (var _cls in docBodyClassList) {\n    removeClass(body, docBodyClassList[_cls]);\n  }\n\n  htmlClassList = {};\n  docBodyClassList = {};\n}\n\n/* istanbul ignore next */\nfunction log() {\n  if (process.env.NODE_ENV === \"production\") return;\n\n  var classes = document.getElementsByTagName(\"html\")[0].className;\n  var buffer = \"Show tracked classes:\\n\\n\";\n\n  buffer += \"<html /> (\" + classes + \"):\\n\";\n  for (var x in htmlClassList) {\n    buffer += \"  \" + x + \" \" + htmlClassList[x] + \"\\n\";\n  }\n\n  classes = document.body.className;\n\n  buffer += \"\\n\\ndoc.body (\" + classes + \"):\\n\";\n  for (var _x in docBodyClassList) {\n    buffer += \"  \" + _x + \" \" + docBodyClassList[_x] + \"\\n\";\n  }\n\n  buffer += \"\\n\";\n\n  console.log(buffer);\n}\n/* eslint-enable no-console */\n\n/**\n * Track the number of reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\nvar incrementReference = function incrementReference(poll, className) {\n  if (!poll[className]) {\n    poll[className] = 0;\n  }\n  poll[className] += 1;\n  return className;\n};\n\n/**\n * Drop the reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\nvar decrementReference = function decrementReference(poll, className) {\n  if (poll[className]) {\n    poll[className] -= 1;\n  }\n  return className;\n};\n\n/**\n * Track a class and add to the given class list.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll         The poll to be used.\n * @param {Array}  classes      The list of classes to be tracked.\n */\nvar trackClass = function trackClass(classListRef, poll, classes) {\n  classes.forEach(function (className) {\n    incrementReference(poll, className);\n    classListRef.add(className);\n  });\n};\n\n/**\n * Untrack a class and remove from the given class list if the reference\n * reaches 0.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll         The poll to be used.\n * @param {Array}  classes      The list of classes to be untracked.\n */\nvar untrackClass = function untrackClass(classListRef, poll, classes) {\n  classes.forEach(function (className) {\n    decrementReference(poll, className);\n    poll[className] === 0 && classListRef.remove(className);\n  });\n};\n\n/**\n * Public inferface to add classes to the document.body.\n * @param {string} bodyClass The class string to be added.\n *                           It may contain more then one class\n *                           with ' ' as separator.\n */\nvar add = exports.add = function add(element, classString) {\n  return trackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};\n\n/**\n * Public inferface to remove classes from the document.body.\n * @param {string} bodyClass The class string to be added.\n *                           It may contain more then one class\n *                           with ' ' as separator.\n */\nvar remove = exports.remove = function remove(element, classString) {\n  return untrackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.log = log;\nexports.resetState = resetState;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// Tracks portals that are open and emits events to subscribers\n\nvar PortalOpenInstances = function PortalOpenInstances() {\n  var _this = this;\n\n  _classCallCheck(this, PortalOpenInstances);\n\n  this.register = function (openInstance) {\n    if (_this.openInstances.indexOf(openInstance) !== -1) {\n      if (process.env.NODE_ENV !== \"production\") {\n        // eslint-disable-next-line no-console\n        console.warn(\"React-Modal: Cannot register modal instance that's already open\");\n      }\n      return;\n    }\n    _this.openInstances.push(openInstance);\n    _this.emit(\"register\");\n  };\n\n  this.deregister = function (openInstance) {\n    var index = _this.openInstances.indexOf(openInstance);\n    if (index === -1) {\n      if (process.env.NODE_ENV !== \"production\") {\n        // eslint-disable-next-line no-console\n        console.warn(\"React-Modal: Unable to deregister \" + openInstance + \" as \" + \"it was never registered\");\n      }\n      return;\n    }\n    _this.openInstances.splice(index, 1);\n    _this.emit(\"deregister\");\n  };\n\n  this.subscribe = function (callback) {\n    _this.subscribers.push(callback);\n  };\n\n  this.emit = function (eventType) {\n    _this.subscribers.forEach(function (subscriber) {\n      return subscriber(eventType,\n      // shallow copy to avoid accidental mutation\n      _this.openInstances.slice());\n    });\n  };\n\n  this.openInstances = [];\n  this.subscribers = [];\n};\n\nvar portalOpenInstances = new PortalOpenInstances();\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction log() {\n  console.log(\"portalOpenInstances ----------\");\n  console.log(portalOpenInstances.openInstances.length);\n  portalOpenInstances.openInstances.forEach(function (p) {\n    return console.log(p);\n  });\n  console.log(\"end portalOpenInstances ----------\");\n}\n\n/* istanbul ignore next */\nfunction resetState() {\n  portalOpenInstances = new PortalOpenInstances();\n}\n/* eslint-enable no-console */\n\nexports.default = portalOpenInstances;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.resetState = resetState;\nexports.log = log;\n\nvar _portalOpenInstances = require(\"./portalOpenInstances\");\n\nvar _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Body focus trap see Issue #742\n\nvar before = void 0,\n    after = void 0,\n    instances = [];\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction resetState() {\n  var _arr = [before, after];\n\n  for (var _i = 0; _i < _arr.length; _i++) {\n    var item = _arr[_i];\n    if (!item) continue;\n    item.parentNode && item.parentNode.removeChild(item);\n  }\n  before = after = null;\n  instances = [];\n}\n\n/* istanbul ignore next */\nfunction log() {\n  console.log(\"bodyTrap ----------\");\n  console.log(instances.length);\n  var _arr2 = [before, after];\n  for (var _i2 = 0; _i2 < _arr2.length; _i2++) {\n    var item = _arr2[_i2];\n    var check = item || {};\n    console.log(check.nodeName, check.className, check.id);\n  }\n  console.log(\"edn bodyTrap ----------\");\n}\n/* eslint-enable no-console */\n\nfunction focusContent() {\n  if (instances.length === 0) {\n    if (process.env.NODE_ENV !== \"production\") {\n      // eslint-disable-next-line no-console\n      console.warn(\"React-Modal: Open instances > 0 expected\");\n    }\n    return;\n  }\n  instances[instances.length - 1].focusContent();\n}\n\nfunction bodyTrap(eventType, openInstances) {\n  if (!before && !after) {\n    before = document.createElement(\"div\");\n    before.setAttribute(\"data-react-modal-body-trap\", \"\");\n    before.style.position = \"absolute\";\n    before.style.opacity = \"0\";\n    before.setAttribute(\"tabindex\", \"0\");\n    before.addEventListener(\"focus\", focusContent);\n    after = before.cloneNode();\n    after.addEventListener(\"focus\", focusContent);\n  }\n\n  instances = openInstances;\n\n  if (instances.length > 0) {\n    // Add focus trap\n    if (document.body.firstChild !== before) {\n      document.body.insertBefore(before, document.body.firstChild);\n    }\n    if (document.body.lastChild !== after) {\n      document.body.appendChild(after);\n    }\n  } else {\n    // Remove focus trap\n    if (before.parentElement) {\n      before.parentElement.removeChild(before);\n    }\n    if (after.parentElement) {\n      after.parentElement.removeChild(after);\n    }\n  }\n}\n\n_portalOpenInstances2.default.subscribe(bodyTrap);", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _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; };\n\nvar _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; };\n\nvar _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; }; }();\n\nvar _react = require(\"react\");\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _focusManager = require(\"../helpers/focusManager\");\n\nvar focusManager = _interopRequireWildcard(_focusManager);\n\nvar _scopeTab = require(\"../helpers/scopeTab\");\n\nvar _scopeTab2 = _interopRequireDefault(_scopeTab);\n\nvar _ariaAppHider = require(\"../helpers/ariaAppHider\");\n\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\n\nvar _classList = require(\"../helpers/classList\");\n\nvar classList = _interopRequireWildcard(_classList);\n\nvar _safeHTMLElement = require(\"../helpers/safeHTMLElement\");\n\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\n\nvar _portalOpenInstances = require(\"../helpers/portalOpenInstances\");\n\nvar _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);\n\nrequire(\"../helpers/bodyTrap\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\n// so that our CSS is statically analyzable\nvar CLASS_NAMES = {\n  overlay: \"ReactModal__Overlay\",\n  content: \"ReactModal__Content\"\n};\n\nvar TAB_KEY = 9;\nvar ESC_KEY = 27;\n\nvar ariaHiddenInstances = 0;\n\nvar ModalPortal = function (_Component) {\n  _inherits(ModalPortal, _Component);\n\n  function ModalPortal(props) {\n    _classCallCheck(this, ModalPortal);\n\n    var _this = _possibleConstructorReturn(this, (ModalPortal.__proto__ || Object.getPrototypeOf(ModalPortal)).call(this, props));\n\n    _this.setOverlayRef = function (overlay) {\n      _this.overlay = overlay;\n      _this.props.overlayRef && _this.props.overlayRef(overlay);\n    };\n\n    _this.setContentRef = function (content) {\n      _this.content = content;\n      _this.props.contentRef && _this.props.contentRef(content);\n    };\n\n    _this.afterClose = function () {\n      var _this$props = _this.props,\n          appElement = _this$props.appElement,\n          ariaHideApp = _this$props.ariaHideApp,\n          htmlOpenClassName = _this$props.htmlOpenClassName,\n          bodyOpenClassName = _this$props.bodyOpenClassName;\n\n      // Remove classes.\n\n      bodyOpenClassName && classList.remove(document.body, bodyOpenClassName);\n\n      htmlOpenClassName && classList.remove(document.getElementsByTagName(\"html\")[0], htmlOpenClassName);\n\n      // Reset aria-hidden attribute if all modals have been removed\n      if (ariaHideApp && ariaHiddenInstances > 0) {\n        ariaHiddenInstances -= 1;\n\n        if (ariaHiddenInstances === 0) {\n          ariaAppHider.show(appElement);\n        }\n      }\n\n      if (_this.props.shouldFocusAfterRender) {\n        if (_this.props.shouldReturnFocusAfterClose) {\n          focusManager.returnFocus(_this.props.preventScroll);\n          focusManager.teardownScopedFocus();\n        } else {\n          focusManager.popWithoutFocus();\n        }\n      }\n\n      if (_this.props.onAfterClose) {\n        _this.props.onAfterClose();\n      }\n\n      _portalOpenInstances2.default.deregister(_this);\n    };\n\n    _this.open = function () {\n      _this.beforeOpen();\n      if (_this.state.afterOpen && _this.state.beforeClose) {\n        clearTimeout(_this.closeTimer);\n        _this.setState({ beforeClose: false });\n      } else {\n        if (_this.props.shouldFocusAfterRender) {\n          focusManager.setupScopedFocus(_this.node);\n          focusManager.markForFocusLater();\n        }\n\n        _this.setState({ isOpen: true }, function () {\n          _this.openAnimationFrame = requestAnimationFrame(function () {\n            _this.setState({ afterOpen: true });\n\n            if (_this.props.isOpen && _this.props.onAfterOpen) {\n              _this.props.onAfterOpen({\n                overlayEl: _this.overlay,\n                contentEl: _this.content\n              });\n            }\n          });\n        });\n      }\n    };\n\n    _this.close = function () {\n      if (_this.props.closeTimeoutMS > 0) {\n        _this.closeWithTimeout();\n      } else {\n        _this.closeWithoutTimeout();\n      }\n    };\n\n    _this.focusContent = function () {\n      return _this.content && !_this.contentHasFocus() && _this.content.focus({ preventScroll: true });\n    };\n\n    _this.closeWithTimeout = function () {\n      var closesAt = Date.now() + _this.props.closeTimeoutMS;\n      _this.setState({ beforeClose: true, closesAt: closesAt }, function () {\n        _this.closeTimer = setTimeout(_this.closeWithoutTimeout, _this.state.closesAt - Date.now());\n      });\n    };\n\n    _this.closeWithoutTimeout = function () {\n      _this.setState({\n        beforeClose: false,\n        isOpen: false,\n        afterOpen: false,\n        closesAt: null\n      }, _this.afterClose);\n    };\n\n    _this.handleKeyDown = function (event) {\n      if (event.keyCode === TAB_KEY) {\n        (0, _scopeTab2.default)(_this.content, event);\n      }\n\n      if (_this.props.shouldCloseOnEsc && event.keyCode === ESC_KEY) {\n        event.stopPropagation();\n        _this.requestClose(event);\n      }\n    };\n\n    _this.handleOverlayOnClick = function (event) {\n      if (_this.shouldClose === null) {\n        _this.shouldClose = true;\n      }\n\n      if (_this.shouldClose && _this.props.shouldCloseOnOverlayClick) {\n        if (_this.ownerHandlesClose()) {\n          _this.requestClose(event);\n        } else {\n          _this.focusContent();\n        }\n      }\n      _this.shouldClose = null;\n    };\n\n    _this.handleContentOnMouseUp = function () {\n      _this.shouldClose = false;\n    };\n\n    _this.handleOverlayOnMouseDown = function (event) {\n      if (!_this.props.shouldCloseOnOverlayClick && event.target == _this.overlay) {\n        event.preventDefault();\n      }\n    };\n\n    _this.handleContentOnClick = function () {\n      _this.shouldClose = false;\n    };\n\n    _this.handleContentOnMouseDown = function () {\n      _this.shouldClose = false;\n    };\n\n    _this.requestClose = function (event) {\n      return _this.ownerHandlesClose() && _this.props.onRequestClose(event);\n    };\n\n    _this.ownerHandlesClose = function () {\n      return _this.props.onRequestClose;\n    };\n\n    _this.shouldBeClosed = function () {\n      return !_this.state.isOpen && !_this.state.beforeClose;\n    };\n\n    _this.contentHasFocus = function () {\n      return document.activeElement === _this.content || _this.content.contains(document.activeElement);\n    };\n\n    _this.buildClassName = function (which, additional) {\n      var classNames = (typeof additional === \"undefined\" ? \"undefined\" : _typeof(additional)) === \"object\" ? additional : {\n        base: CLASS_NAMES[which],\n        afterOpen: CLASS_NAMES[which] + \"--after-open\",\n        beforeClose: CLASS_NAMES[which] + \"--before-close\"\n      };\n      var className = classNames.base;\n      if (_this.state.afterOpen) {\n        className = className + \" \" + classNames.afterOpen;\n      }\n      if (_this.state.beforeClose) {\n        className = className + \" \" + classNames.beforeClose;\n      }\n      return typeof additional === \"string\" && additional ? className + \" \" + additional : className;\n    };\n\n    _this.attributesFromObject = function (prefix, items) {\n      return Object.keys(items).reduce(function (acc, name) {\n        acc[prefix + \"-\" + name] = items[name];\n        return acc;\n      }, {});\n    };\n\n    _this.state = {\n      afterOpen: false,\n      beforeClose: false\n    };\n\n    _this.shouldClose = null;\n    _this.moveFromContentToOverlay = null;\n    return _this;\n  }\n\n  _createClass(ModalPortal, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      if (this.props.isOpen) {\n        this.open();\n      }\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps, prevState) {\n      if (process.env.NODE_ENV !== \"production\") {\n        if (prevProps.bodyOpenClassName !== this.props.bodyOpenClassName) {\n          // eslint-disable-next-line no-console\n          console.warn('React-Modal: \"bodyOpenClassName\" prop has been modified. ' + \"This may cause unexpected behavior when multiple modals are open.\");\n        }\n        if (prevProps.htmlOpenClassName !== this.props.htmlOpenClassName) {\n          // eslint-disable-next-line no-console\n          console.warn('React-Modal: \"htmlOpenClassName\" prop has been modified. ' + \"This may cause unexpected behavior when multiple modals are open.\");\n        }\n      }\n\n      if (this.props.isOpen && !prevProps.isOpen) {\n        this.open();\n      } else if (!this.props.isOpen && prevProps.isOpen) {\n        this.close();\n      }\n\n      // Focus only needs to be set once when the modal is being opened\n      if (this.props.shouldFocusAfterRender && this.state.isOpen && !prevState.isOpen) {\n        this.focusContent();\n      }\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      if (this.state.isOpen) {\n        this.afterClose();\n      }\n      clearTimeout(this.closeTimer);\n      cancelAnimationFrame(this.openAnimationFrame);\n    }\n  }, {\n    key: \"beforeOpen\",\n    value: function beforeOpen() {\n      var _props = this.props,\n          appElement = _props.appElement,\n          ariaHideApp = _props.ariaHideApp,\n          htmlOpenClassName = _props.htmlOpenClassName,\n          bodyOpenClassName = _props.bodyOpenClassName;\n\n      // Add classes.\n\n      bodyOpenClassName && classList.add(document.body, bodyOpenClassName);\n\n      htmlOpenClassName && classList.add(document.getElementsByTagName(\"html\")[0], htmlOpenClassName);\n\n      if (ariaHideApp) {\n        ariaHiddenInstances += 1;\n        ariaAppHider.hide(appElement);\n      }\n\n      _portalOpenInstances2.default.register(this);\n    }\n\n    // Don't steal focus from inner elements\n\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _props2 = this.props,\n          id = _props2.id,\n          className = _props2.className,\n          overlayClassName = _props2.overlayClassName,\n          defaultStyles = _props2.defaultStyles,\n          children = _props2.children;\n\n      var contentStyles = className ? {} : defaultStyles.content;\n      var overlayStyles = overlayClassName ? {} : defaultStyles.overlay;\n\n      if (this.shouldBeClosed()) {\n        return null;\n      }\n\n      var overlayProps = {\n        ref: this.setOverlayRef,\n        className: this.buildClassName(\"overlay\", overlayClassName),\n        style: _extends({}, overlayStyles, this.props.style.overlay),\n        onClick: this.handleOverlayOnClick,\n        onMouseDown: this.handleOverlayOnMouseDown\n      };\n\n      var contentProps = _extends({\n        id: id,\n        ref: this.setContentRef,\n        style: _extends({}, contentStyles, this.props.style.content),\n        className: this.buildClassName(\"content\", className),\n        tabIndex: \"-1\",\n        onKeyDown: this.handleKeyDown,\n        onMouseDown: this.handleContentOnMouseDown,\n        onMouseUp: this.handleContentOnMouseUp,\n        onClick: this.handleContentOnClick,\n        role: this.props.role,\n        \"aria-label\": this.props.contentLabel\n      }, this.attributesFromObject(\"aria\", _extends({ modal: true }, this.props.aria)), this.attributesFromObject(\"data\", this.props.data || {}), {\n        \"data-testid\": this.props.testId\n      });\n\n      var contentElement = this.props.contentElement(contentProps, children);\n      return this.props.overlayElement(overlayProps, contentElement);\n    }\n  }]);\n\n  return ModalPortal;\n}(_react.Component);\n\nModalPortal.defaultProps = {\n  style: {\n    overlay: {},\n    content: {}\n  },\n  defaultStyles: {}\n};\nModalPortal.propTypes = {\n  isOpen: _propTypes2.default.bool.isRequired,\n  defaultStyles: _propTypes2.default.shape({\n    content: _propTypes2.default.object,\n    overlay: _propTypes2.default.object\n  }),\n  style: _propTypes2.default.shape({\n    content: _propTypes2.default.object,\n    overlay: _propTypes2.default.object\n  }),\n  className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),\n  overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),\n  bodyOpenClassName: _propTypes2.default.string,\n  htmlOpenClassName: _propTypes2.default.string,\n  ariaHideApp: _propTypes2.default.bool,\n  appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),\n  onAfterOpen: _propTypes2.default.func,\n  onAfterClose: _propTypes2.default.func,\n  onRequestClose: _propTypes2.default.func,\n  closeTimeoutMS: _propTypes2.default.number,\n  shouldFocusAfterRender: _propTypes2.default.bool,\n  shouldCloseOnOverlayClick: _propTypes2.default.bool,\n  shouldReturnFocusAfterClose: _propTypes2.default.bool,\n  preventScroll: _propTypes2.default.bool,\n  role: _propTypes2.default.string,\n  contentLabel: _propTypes2.default.string,\n  aria: _propTypes2.default.object,\n  data: _propTypes2.default.object,\n  children: _propTypes2.default.node,\n  shouldCloseOnEsc: _propTypes2.default.bool,\n  overlayRef: _propTypes2.default.func,\n  contentRef: _propTypes2.default.func,\n  id: _propTypes2.default.string,\n  overlayElement: _propTypes2.default.func,\n  contentElement: _propTypes2.default.func,\n  testId: _propTypes2.default.string\n};\nexports.default = ModalPortal;\nmodule.exports = exports[\"default\"];", "'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n  // Call this.constructor.gDSFP to support sub-classes.\n  var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n  if (state !== null && state !== undefined) {\n    this.setState(state);\n  }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n  // Call this.constructor.gDSFP to support sub-classes.\n  // Use the setState() updater to ensure state isn't stale in certain edge cases.\n  function updater(prevState) {\n    var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n    return state !== null && state !== undefined ? state : null;\n  }\n  // Binding \"this\" is important for shallow renderer support.\n  this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n  try {\n    var prevProps = this.props;\n    var prevState = this.state;\n    this.props = nextProps;\n    this.state = nextState;\n    this.__reactInternalSnapshotFlag = true;\n    this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n      prevProps,\n      prevState\n    );\n  } finally {\n    this.props = prevProps;\n    this.state = prevState;\n  }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n  var prototype = Component.prototype;\n\n  if (!prototype || !prototype.isReactComponent) {\n    throw new Error('Can only polyfill class components');\n  }\n\n  if (\n    typeof Component.getDerivedStateFromProps !== 'function' &&\n    typeof prototype.getSnapshotBeforeUpdate !== 'function'\n  ) {\n    return Component;\n  }\n\n  // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n  // Error if any of these lifecycles are present,\n  // Because they would work differently between older and newer (16.3+) versions of React.\n  var foundWillMountName = null;\n  var foundWillReceivePropsName = null;\n  var foundWillUpdateName = null;\n  if (typeof prototype.componentWillMount === 'function') {\n    foundWillMountName = 'componentWillMount';\n  } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n    foundWillMountName = 'UNSAFE_componentWillMount';\n  }\n  if (typeof prototype.componentWillReceiveProps === 'function') {\n    foundWillReceivePropsName = 'componentWillReceiveProps';\n  } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n    foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n  }\n  if (typeof prototype.componentWillUpdate === 'function') {\n    foundWillUpdateName = 'componentWillUpdate';\n  } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n    foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n  }\n  if (\n    foundWillMountName !== null ||\n    foundWillReceivePropsName !== null ||\n    foundWillUpdateName !== null\n  ) {\n    var componentName = Component.displayName || Component.name;\n    var newApiName =\n      typeof Component.getDerivedStateFromProps === 'function'\n        ? 'getDerivedStateFromProps()'\n        : 'getSnapshotBeforeUpdate()';\n\n    throw Error(\n      'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n        componentName +\n        ' uses ' +\n        newApiName +\n        ' but also contains the following legacy lifecycles:' +\n        (foundWillMountName !== null ? '\\n  ' + foundWillMountName : '') +\n        (foundWillReceivePropsName !== null\n          ? '\\n  ' + foundWillReceivePropsName\n          : '') +\n        (foundWillUpdateName !== null ? '\\n  ' + foundWillUpdateName : '') +\n        '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n        'https://fb.me/react-async-component-lifecycle-hooks'\n    );\n  }\n\n  // React <= 16.2 does not support static getDerivedStateFromProps.\n  // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n  // Newer versions of React will ignore these lifecycles if gDSFP exists.\n  if (typeof Component.getDerivedStateFromProps === 'function') {\n    prototype.componentWillMount = componentWillMount;\n    prototype.componentWillReceiveProps = componentWillReceiveProps;\n  }\n\n  // React <= 16.2 does not support getSnapshotBeforeUpdate.\n  // As a workaround, use cWU to invoke the new lifecycle.\n  // Newer versions of React will ignore that lifecycle if gSBU exists.\n  if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n    if (typeof prototype.componentDidUpdate !== 'function') {\n      throw new Error(\n        'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n      );\n    }\n\n    prototype.componentWillUpdate = componentWillUpdate;\n\n    var componentDidUpdate = prototype.componentDidUpdate;\n\n    prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n      prevProps,\n      prevState,\n      maybeSnapshot\n    ) {\n      // 16.3+ will not execute our will-update method;\n      // It will pass a snapshot value to did-update though.\n      // Older versions will require our polyfilled will-update value.\n      // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n      // Because for <= 15.x versions this might be a \"prevContext\" object.\n      // We also can't just check \"__reactInternalSnapshot\",\n      // Because get-snapshot might return a falsy value.\n      // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n      var snapshot = this.__reactInternalSnapshotFlag\n        ? this.__reactInternalSnapshot\n        : maybeSnapshot;\n\n      componentDidUpdate.call(this, prevProps, prevState, snapshot);\n    };\n  }\n\n  return Component;\n}\n\nexports.polyfill = polyfill;\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.bodyOpenClassName = exports.portalClassName = undefined;\n\nvar _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; };\n\nvar _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; }; }();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require(\"react-dom\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ModalPortal = require(\"./ModalPortal\");\n\nvar _ModalPortal2 = _interopRequireDefault(_ModalPortal);\n\nvar _ariaAppHider = require(\"../helpers/ariaAppHider\");\n\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\n\nvar _safeHTMLElement = require(\"../helpers/safeHTMLElement\");\n\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\nvar portalClassName = exports.portalClassName = \"ReactModalPortal\";\nvar bodyOpenClassName = exports.bodyOpenClassName = \"ReactModal__Body--open\";\n\nvar isReact16 = _safeHTMLElement.canUseDOM && _reactDom2.default.createPortal !== undefined;\n\nvar createHTMLElement = function createHTMLElement(name) {\n  return document.createElement(name);\n};\n\nvar getCreatePortal = function getCreatePortal() {\n  return isReact16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer;\n};\n\nfunction getParentElement(parentSelector) {\n  return parentSelector();\n}\n\nvar Modal = function (_Component) {\n  _inherits(Modal, _Component);\n\n  function Modal() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Modal);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function () {\n      !isReact16 && _reactDom2.default.unmountComponentAtNode(_this.node);\n      var parent = getParentElement(_this.props.parentSelector);\n      if (parent && parent.contains(_this.node)) {\n        parent.removeChild(_this.node);\n      } else {\n        // eslint-disable-next-line no-console\n        console.warn('React-Modal: \"parentSelector\" prop did not returned any DOM ' + \"element. Make sure that the parent element is unmounted to \" + \"avoid any memory leaks.\");\n      }\n    }, _this.portalRef = function (ref) {\n      _this.portal = ref;\n    }, _this.renderPortal = function (props) {\n      var createPortal = getCreatePortal();\n      var portal = createPortal(_this, _react2.default.createElement(_ModalPortal2.default, _extends({ defaultStyles: Modal.defaultStyles }, props)), _this.node);\n      _this.portalRef(portal);\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(Modal, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      if (!_safeHTMLElement.canUseDOM) return;\n\n      if (!isReact16) {\n        this.node = createHTMLElement(\"div\");\n      }\n      this.node.className = this.props.portalClassName;\n\n      var parent = getParentElement(this.props.parentSelector);\n      parent.appendChild(this.node);\n\n      !isReact16 && this.renderPortal(this.props);\n    }\n  }, {\n    key: \"getSnapshotBeforeUpdate\",\n    value: function getSnapshotBeforeUpdate(prevProps) {\n      var prevParent = getParentElement(prevProps.parentSelector);\n      var nextParent = getParentElement(this.props.parentSelector);\n      return { prevParent: prevParent, nextParent: nextParent };\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps, _, snapshot) {\n      if (!_safeHTMLElement.canUseDOM) return;\n      var _props = this.props,\n          isOpen = _props.isOpen,\n          portalClassName = _props.portalClassName;\n\n\n      if (prevProps.portalClassName !== portalClassName) {\n        this.node.className = portalClassName;\n      }\n\n      var prevParent = snapshot.prevParent,\n          nextParent = snapshot.nextParent;\n\n      if (nextParent !== prevParent) {\n        prevParent.removeChild(this.node);\n        nextParent.appendChild(this.node);\n      }\n\n      // Stop unnecessary renders if modal is remaining closed\n      if (!prevProps.isOpen && !isOpen) return;\n\n      !isReact16 && this.renderPortal(this.props);\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      if (!_safeHTMLElement.canUseDOM || !this.node || !this.portal) return;\n\n      var state = this.portal.state;\n      var now = Date.now();\n      var closesAt = state.isOpen && this.props.closeTimeoutMS && (state.closesAt || now + this.props.closeTimeoutMS);\n\n      if (closesAt) {\n        if (!state.beforeClose) {\n          this.portal.closeWithTimeout();\n        }\n\n        setTimeout(this.removePortal, closesAt - now);\n      } else {\n        this.removePortal();\n      }\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      if (!_safeHTMLElement.canUseDOM || !isReact16) {\n        return null;\n      }\n\n      if (!this.node && isReact16) {\n        this.node = createHTMLElement(\"div\");\n      }\n\n      var createPortal = getCreatePortal();\n      return createPortal(_react2.default.createElement(_ModalPortal2.default, _extends({\n        ref: this.portalRef,\n        defaultStyles: Modal.defaultStyles\n      }, this.props)), this.node);\n    }\n  }], [{\n    key: \"setAppElement\",\n    value: function setAppElement(element) {\n      ariaAppHider.setElement(element);\n    }\n\n    /* eslint-disable react/no-unused-prop-types */\n\n    /* eslint-enable react/no-unused-prop-types */\n\n  }]);\n\n  return Modal;\n}(_react.Component);\n\nModal.propTypes = {\n  isOpen: _propTypes2.default.bool.isRequired,\n  style: _propTypes2.default.shape({\n    content: _propTypes2.default.object,\n    overlay: _propTypes2.default.object\n  }),\n  portalClassName: _propTypes2.default.string,\n  bodyOpenClassName: _propTypes2.default.string,\n  htmlOpenClassName: _propTypes2.default.string,\n  className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n    base: _propTypes2.default.string.isRequired,\n    afterOpen: _propTypes2.default.string.isRequired,\n    beforeClose: _propTypes2.default.string.isRequired\n  })]),\n  overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n    base: _propTypes2.default.string.isRequired,\n    afterOpen: _propTypes2.default.string.isRequired,\n    beforeClose: _propTypes2.default.string.isRequired\n  })]),\n  appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),\n  onAfterOpen: _propTypes2.default.func,\n  onRequestClose: _propTypes2.default.func,\n  closeTimeoutMS: _propTypes2.default.number,\n  ariaHideApp: _propTypes2.default.bool,\n  shouldFocusAfterRender: _propTypes2.default.bool,\n  shouldCloseOnOverlayClick: _propTypes2.default.bool,\n  shouldReturnFocusAfterClose: _propTypes2.default.bool,\n  preventScroll: _propTypes2.default.bool,\n  parentSelector: _propTypes2.default.func,\n  aria: _propTypes2.default.object,\n  data: _propTypes2.default.object,\n  role: _propTypes2.default.string,\n  contentLabel: _propTypes2.default.string,\n  shouldCloseOnEsc: _propTypes2.default.bool,\n  overlayRef: _propTypes2.default.func,\n  contentRef: _propTypes2.default.func,\n  id: _propTypes2.default.string,\n  overlayElement: _propTypes2.default.func,\n  contentElement: _propTypes2.default.func\n};\nModal.defaultProps = {\n  isOpen: false,\n  portalClassName: portalClassName,\n  bodyOpenClassName: bodyOpenClassName,\n  role: \"dialog\",\n  ariaHideApp: true,\n  closeTimeoutMS: 0,\n  shouldFocusAfterRender: true,\n  shouldCloseOnEsc: true,\n  shouldCloseOnOverlayClick: true,\n  shouldReturnFocusAfterClose: true,\n  preventScroll: false,\n  parentSelector: function parentSelector() {\n    return document.body;\n  },\n  overlayElement: function overlayElement(props, contentEl) {\n    return _react2.default.createElement(\n      \"div\",\n      props,\n      contentEl\n    );\n  },\n  contentElement: function contentElement(props, children) {\n    return _react2.default.createElement(\n      \"div\",\n      props,\n      children\n    );\n  }\n};\nModal.defaultStyles = {\n  overlay: {\n    position: \"fixed\",\n    top: 0,\n    left: 0,\n    right: 0,\n    bottom: 0,\n    backgroundColor: \"rgba(255, 255, 255, 0.75)\"\n  },\n  content: {\n    position: \"absolute\",\n    top: \"40px\",\n    left: \"40px\",\n    right: \"40px\",\n    bottom: \"40px\",\n    border: \"1px solid #ccc\",\n    background: \"#fff\",\n    overflow: \"auto\",\n    WebkitOverflowScrolling: \"touch\",\n    borderRadius: \"4px\",\n    outline: \"none\",\n    padding: \"20px\"\n  }\n};\n\n\n(0, _reactLifecyclesCompat.polyfill)(Modal);\n\nif (process.env.NODE_ENV !== \"production\") {\n  Modal.setCreateHTMLElement = function (fn) {\n    return createHTMLElement = fn;\n  };\n}\n\nexports.default = Modal;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _Modal = require(\"./components/Modal\");\n\nvar _Modal2 = _interopRequireDefault(_Modal);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Modal2.default;\nmodule.exports = exports[\"default\"];", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport ReactModal from 'react-modal';\nimport { getReactDomContainerSelector } from '../../helpers/system';\nimport './Modal.css';\n\nReactModal.setAppElement(getReactDomContainerSelector());\n\nexport interface ModalProps {\n  children: React.ReactNode;\n  size?: 'small' | 'medium' | 'large';\n  noBackdrop?: boolean;\n}\n\ninterface Props extends ModalProps {\n  /* String or object className to be applied to the modal content. */\n  className?: string;\n\n  /* String or object className to be applied to the overlay. */\n  overlayClassName?: string;\n\n  /* Function that will be run after the modal has opened. */\n  onAfterOpen?(): void;\n\n  /* Function that will be run after the modal has closed. */\n  onAfterClose?(): void;\n\n  /* Function that will be run when the modal is requested to be closed, prior to actually closing. */\n  onRequestClose?(event: React.MouseEvent | React.KeyboardEvent): void;\n\n  /* Boolean indicating if the modal should be focused after render */\n  shouldFocusAfterRender?: boolean;\n\n  /* Boolean indicating if the overlay should close the modal. Defaults to true. */\n  shouldCloseOnOverlayClick?: boolean;\n\n  /* Boolean indicating if pressing the esc key should close the modal */\n  shouldCloseOnEsc?: boolean;\n\n  /* String indicating how the content container should be announced to screenreaders. */\n  contentLabel: string;\n}\n\nexport default function Modal(props: Props) {\n  return (\n    <ReactModal\n      className={classNames('modal', {\n        'modal-small': props.size === 'small',\n        'modal-medium': props.size === 'medium',\n        'modal-large': props.size === 'large'\n      })}\n      isOpen={true}\n      overlayClassName={classNames('modal-overlay', { 'modal-no-backdrop': props.noBackdrop })}\n      {...props}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Modal, { ModalProps } from './Modal';\n\nexport interface ChildrenProps {\n  onCloseClick: (event?: React.SyntheticEvent<HTMLElement>) => void;\n  onFormSubmit: (event: React.SyntheticEvent<HTMLFormElement>) => void;\n  onSubmitClick: (event?: React.SyntheticEvent<HTMLElement>) => void;\n  submitting: boolean;\n}\n\ninterface Props extends ModalProps {\n  children: (props: ChildrenProps) => React.ReactNode;\n  header: string;\n  onClose: () => void;\n  onSubmit: () => void | Promise<void | Response>;\n}\n\ninterface State {\n  submitting: boolean;\n}\n\nexport default class SimpleModal extends React.Component<Props, State> {\n  mounted = false;\n  state: State = { submitting: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopSubmitting = () => {\n    if (this.mounted) {\n      this.setState({ submitting: false });\n    }\n  };\n\n  handleCloseClick = (event?: React.SyntheticEvent<HTMLElement>) => {\n    if (event) {\n      event.preventDefault();\n      event.currentTarget.blur();\n    }\n    this.props.onClose();\n  };\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.submit();\n  };\n\n  handleSubmitClick = (event?: React.SyntheticEvent<HTMLElement>) => {\n    if (event) {\n      event.preventDefault();\n      event.currentTarget.blur();\n    }\n    this.submit();\n  };\n\n  submit = () => {\n    const result = this.props.onSubmit();\n    if (result) {\n      this.setState({ submitting: true });\n      result.then(this.stopSubmitting, this.stopSubmitting);\n    }\n  };\n\n  render() {\n    const { children, header, onClose, onSubmit, ...modalProps } = this.props;\n    return (\n      <Modal contentLabel={header} onRequestClose={onClose} {...modalProps}>\n        {children({\n          onCloseClick: this.handleCloseClick,\n          onFormSubmit: this.handleFormSubmit,\n          onSubmitClick: this.handleSubmitClick,\n          submitting: this.state.submitting\n        })}\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport DeferredSpinner from '../ui/DeferredSpinner';\nimport { ResetButtonLink, SubmitButton } from './buttons';\nimport ClickEventBoundary from './ClickEventBoundary';\nimport { ModalProps } from './Modal';\nimport SimpleModal, { ChildrenProps } from './SimpleModal';\n\nexport interface ConfirmModalProps<T> extends ModalProps {\n  cancelButtonText?: string;\n  confirmButtonText: string;\n  confirmData?: T;\n  confirmDisable?: boolean;\n  isDestructive?: boolean;\n  onConfirm: (data?: T) => void | Promise<void | Response>;\n}\n\ninterface Props<T> extends ConfirmModalProps<T> {\n  header: string;\n  headerDescription?: React.ReactNode;\n  onClose: () => void;\n}\n\nexport default class ConfirmModal<T = string> extends React.PureComponent<Props<T>> {\n  mounted = false;\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSubmit = () => {\n    const result = this.props.onConfirm(this.props.confirmData);\n    if (result) {\n      return result.then(this.props.onClose, () => {\n        /* noop */\n      });\n    }\n    this.props.onClose();\n    return undefined;\n  };\n\n  renderModalContent = ({ onCloseClick, onFormSubmit, submitting }: ChildrenProps) => {\n    const {\n      children,\n      confirmButtonText,\n      confirmDisable,\n      header,\n      headerDescription,\n      isDestructive,\n      cancelButtonText = translate('cancel')\n    } = this.props;\n    return (\n      <ClickEventBoundary>\n        <form onSubmit={onFormSubmit}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n            {headerDescription}\n          </header>\n          <div className=\"modal-body\">{children}</div>\n          <footer className=\"modal-foot\">\n            <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n            <SubmitButton\n              autoFocus={true}\n              className={isDestructive ? 'button-red' : undefined}\n              disabled={submitting || confirmDisable}>\n              {confirmButtonText}\n            </SubmitButton>\n            <ResetButtonLink disabled={submitting} onClick={onCloseClick}>\n              {cancelButtonText}\n            </ResetButtonLink>\n          </footer>\n        </form>\n      </ClickEventBoundary>\n    );\n  };\n\n  render() {\n    const { header, onClose, noBackdrop, size } = this.props;\n    const modalProps = { header, onClose, noBackdrop, size };\n    return (\n      <SimpleModal onSubmit={this.handleSubmit} {...modalProps}>\n        {this.renderModalContent}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\nexport interface ChildrenProps {\n  onClick: () => void;\n  onFormSubmit: (event: React.FormEvent<HTMLFormElement>) => void;\n}\n\nexport interface ModalProps {\n  onClose: () => void;\n}\n\nexport interface Props {\n  children: (props: ChildrenProps) => React.ReactNode;\n  modal: (props: ModalProps) => React.ReactNode;\n}\n\ninterface State {\n  modal: boolean;\n}\n\nexport default class ModalButton extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { modal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleButtonClick = () => {\n    this.setState({ modal: true });\n  };\n\n  handleFormSubmit = (event?: React.FormEvent<HTMLFormElement>) => {\n    if (event) {\n      event.preventDefault();\n    }\n    this.setState({ modal: true });\n  };\n\n  handleCloseModal = () => {\n    if (this.mounted) {\n      this.setState({ modal: false });\n    }\n  };\n\n  render() {\n    return (\n      <>\n        {this.props.children({\n          onClick: this.handleButtonClick,\n          onFormSubmit: this.handleFormSubmit\n        })}\n        {this.state.modal && this.props.modal({ onClose: this.handleCloseModal })}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ConfirmModal, { ConfirmModalProps } from './ConfirmModal';\nimport ModalButton, { ChildrenProps, ModalProps } from './ModalButton';\n\ninterface Props<T> extends ConfirmModalProps<T> {\n  children: (props: ChildrenProps) => React.ReactNode;\n  modalBody: React.ReactNode;\n  modalHeader: string;\n  modalHeaderDescription?: React.ReactNode;\n}\n\ninterface State {\n  modal: boolean;\n}\n\nexport default class ConfirmButton<T> extends React.PureComponent<Props<T>, State> {\n  renderConfirmModal = ({ onClose }: ModalProps) => {\n    const {\n      children,\n      modalBody,\n      modalHeader,\n      modalHeaderDescription,\n      ...confirmModalProps\n    } = this.props;\n    return (\n      <ConfirmModal\n        header={modalHeader}\n        headerDescription={modalHeaderDescription}\n        onClose={onClose}\n        {...confirmModalProps}>\n        {modalBody}\n      </ConfirmModal>\n    );\n  };\n\n  render() {\n    return <ModalButton modal={this.renderConfirmModal}>{this.props.children}</ModalButton>;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormatDateOptions, FormattedDate } from 'react-intl';\nimport { parseDate } from '../../helpers/dates';\nimport { ParsableDate } from '../../types/dates';\n\nexport interface DateFormatterProps {\n  children?: (formattedDate: string) => React.ReactNode;\n  date: ParsableDate;\n  long?: boolean;\n}\n\nexport const formatterOption: FormatDateOptions = {\n  year: 'numeric',\n  month: 'short',\n  day: '2-digit'\n};\n\nexport const longFormatterOption: FormatDateOptions = {\n  year: 'numeric',\n  month: 'long',\n  day: 'numeric'\n};\n\nexport default function DateFormatter({ children, date, long }: DateFormatterProps) {\n  return (\n    <FormattedDate value={parseDate(date)} {...(long ? longFormatterOption : formatterOption)}>\n      {children}\n    </FormattedDate>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormatDateOptions, FormattedDate } from 'react-intl';\nimport { parseDate } from '../../helpers/dates';\nimport { ParsableDate } from '../../types/dates';\n\ninterface Props {\n  children?: (formattedDate: string) => React.ReactNode;\n  date: ParsableDate;\n}\n\nexport const formatterOption: FormatDateOptions = {\n  year: 'numeric',\n  month: 'long',\n  day: 'numeric',\n  hour: 'numeric',\n  minute: 'numeric'\n};\n\nexport default function DateTimeFormatter({ children, date }: Props) {\n  return (\n    <FormattedDate value={parseDate(date)} {...formatterOption}>\n      {children}\n    </FormattedDate>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport {\n  differenceInDays,\n  differenceInMonths,\n  differenceInSeconds,\n  differenceInYears\n} from 'date-fns';\nimport { FormattedRelativeTime } from 'react-intl';\nimport { ParsableDate } from '../../types/dates';\n\nconst UPDATE_INTERVAL_IN_SECONDS = 10;\n\nexport function getRelativeTimeProps(\n  date: ParsableDate\n): Pick<FormattedRelativeTime['props'], 'unit' | 'value' | 'updateIntervalInSeconds'> {\n  const y = differenceInYears(date, Date.now());\n\n  if (Math.abs(y) > 0) {\n    return { value: y, unit: 'year' };\n  }\n\n  const m = differenceInMonths(date, Date.now());\n  if (Math.abs(m) > 0) {\n    return { value: m, unit: 'month' };\n  }\n\n  const d = differenceInDays(date, Date.now());\n  if (Math.abs(d) > 0) {\n    return { value: d, unit: 'day' };\n  }\n\n  return {\n    value: differenceInSeconds(date, Date.now()),\n    unit: 'second',\n    updateIntervalInSeconds: UPDATE_INTERVAL_IN_SECONDS\n  };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { differenceInHours } from 'date-fns';\nimport * as React from 'react';\nimport { FormattedRelativeTime } from 'react-intl';\nimport { parseDate } from '../../helpers/dates';\nimport { translate } from '../../helpers/l10n';\nimport { ParsableDate } from '../../types/dates';\nimport DateTimeFormatter from './DateTimeFormatter';\nimport { getRelativeTimeProps } from './dateUtils';\n\nexport interface DateFromNowProps {\n  children?: (formattedDate: string) => React.ReactNode;\n  date?: ParsableDate;\n  hourPrecision?: boolean;\n}\n\nexport default function DateFromNow(props: DateFromNowProps) {\n  const { children: originalChildren = (f: string) => f, date, hourPrecision } = props;\n  let children = originalChildren;\n\n  if (!date) {\n    /*\n     * We return a JSX.Element to bypass typescript issue with functional components return type\n     * (https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20544)\n     */\n    // eslint-disable-next-line react/jsx-no-useless-fragment\n    return <>{originalChildren(translate('never'))}</>;\n  }\n\n  if (hourPrecision && differenceInHours(Date.now(), date) < 1) {\n    children = () => originalChildren(translate('less_than_1_hour_ago'));\n  }\n\n  const parsedDate = parseDate(date);\n\n  const relativeTimeProps = getRelativeTimeProps(date);\n\n  return (\n    <DateTimeFormatter date={parsedDate}>\n      {formattedDate => (\n        <span title={formattedDate}>\n          <FormattedRelativeTime {...relativeTimeProps}>\n            {children as FormattedRelativeTime['props']['children']}\n          </FormattedRelativeTime>\n        </span>\n      )}\n    </DateTimeFormatter>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function collapsePath(path: string, limit = 30): string {\n  if (typeof path !== 'string') {\n    return '';\n  }\n\n  const tokens = path.split('/');\n\n  if (tokens.length <= 2) {\n    return path;\n  }\n\n  const head = tokens[0];\n  const tail = tokens[tokens.length - 1];\n  const middle = tokens.slice(1, -1);\n  let cut = false;\n\n  while (middle.join().length > limit && middle.length > 0) {\n    middle.shift();\n    cut = true;\n  }\n\n  const body = [head, ...(cut ? ['...'] : []), ...middle, tail];\n  return body.join('/');\n}\n\n/**\n * Return a collapsed path without a file name\n * @example\n * // returns 'src/.../js/components/navigator/app/models/'\n * collapsedDirFromPath('src/main/js/components/navigator/app/models/state.js')\n */\nexport function collapsedDirFromPath(path: string | null): string | null {\n  const limit = 30;\n  if (typeof path === 'string') {\n    const tokens = path.split('/').slice(0, -1);\n    if (tokens.length > 2) {\n      const head = tokens[0];\n      const tail = tokens[tokens.length - 1];\n      const middle = tokens.slice(1, -1);\n\n      let cut = false;\n      while (middle.join().length > limit && middle.length > 0) {\n        middle.shift();\n        cut = true;\n      }\n      const body = [head, ...(cut ? ['...'] : []), ...middle, tail];\n      return body.join('/') + '/';\n    }\n    return tokens.join('/') + '/';\n  }\n  return null;\n}\n\n/**\n * Return a file name for a given file path\n * * @example\n * // returns 'state.js'\n * collapsedDirFromPath('src/main/js/components/navigator/app/models/state.js')\n */\nexport function fileFromPath(path: string | null): string | null {\n  if (typeof path === 'string') {\n    const tokens = path.split('/');\n    return tokens[tokens.length - 1];\n  }\n  return null;\n}\n\nexport function splitPath(path: string) {\n  const tokens = path.split('/');\n  return {\n    head: tokens.slice(0, -1).join('/'),\n    tail: tokens[tokens.length - 1]\n  };\n}\n\nexport function cutLongWords(str: string, limit = 30) {\n  return str\n    .split(' ')\n    .map(word => (word.length > limit ? word.substr(0, limit) + '...' : word))\n    .join(' ');\n}\n\nexport function limitComponentName(str: string, limit = 30): string {\n  if (typeof str === 'string') {\n    return str.length > limit ? str.substr(0, limit) + '...' : str;\n  }\n  return '';\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { revokeToken } from '../../../api/user-tokens';\nimport { Button } from '../../../components/controls/buttons';\nimport ConfirmButton from '../../../components/controls/ConfirmButton';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport DateFormatter from '../../../components/intl/DateFormatter';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { limitComponentName } from '../../../helpers/path';\n\nexport type TokenDeleteConfirmation = 'inline' | 'modal';\n\ninterface Props {\n  deleteConfirmation: TokenDeleteConfirmation;\n  login: string;\n  onRevokeToken: (token: T.UserToken) => void;\n  token: T.UserToken;\n}\n\ninterface State {\n  loading: boolean;\n  showConfirmation: boolean;\n}\n\nconst MAX_TOKEN_NAME_FIELD = 20;\n\nexport default class TokensFormItem extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false, showConfirmation: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleClick = () => {\n    if (this.state.showConfirmation) {\n      this.handleRevoke().then(() => {\n        if (this.mounted) {\n          this.setState({ showConfirmation: false });\n        }\n      });\n    } else {\n      this.setState({ showConfirmation: true });\n    }\n  };\n\n  handleRevoke = () => {\n    this.setState({ loading: true });\n    return revokeToken({ login: this.props.login, name: this.props.token.name }).then(\n      () => this.props.onRevokeToken(this.props.token),\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  render() {\n    const { deleteConfirmation, token } = this.props;\n    const { loading, showConfirmation } = this.state;\n    return (\n      <tr>\n        <td>\n          <Tooltip overlay={token.name}>\n            <span>{limitComponentName(token.name, MAX_TOKEN_NAME_FIELD)}</span>\n          </Tooltip>\n        </td>\n        <td className=\"nowrap\">\n          <DateFromNow date={token.lastConnectionDate} hourPrecision={true} />\n        </td>\n        <td className=\"thin nowrap text-right\">\n          <DateFormatter date={token.createdAt} long={true} />\n        </td>\n        <td className=\"thin nowrap text-right\">\n          <DeferredSpinner loading={loading}>\n            <i className=\"deferred-spinner-placeholder\" />\n          </DeferredSpinner>\n          {deleteConfirmation === 'modal' ? (\n            <ConfirmButton\n              confirmButtonText={translate('users.tokens.revoke_token')}\n              isDestructive={true}\n              modalBody={\n                <FormattedMessage\n                  defaultMessage={translate('users.tokens.sure_X')}\n                  id=\"users.tokens.sure_X\"\n                  values={{ token: <strong>{token.name}</strong> }}\n                />\n              }\n              modalHeader={translate('users.tokens.revoke_token')}\n              onConfirm={this.handleRevoke}>\n              {({ onClick }) => (\n                <Button\n                  className=\"spacer-left button-red input-small\"\n                  disabled={loading}\n                  onClick={onClick}\n                  title={translate('users.tokens.revoke_token')}>\n                  {translate('users.tokens.revoke')}\n                </Button>\n              )}\n            </ConfirmButton>\n          ) : (\n            <Button\n              className=\"button-red input-small spacer-left\"\n              disabled={loading}\n              onClick={this.handleClick}>\n              {showConfirmation ? translate('users.tokens.sure') : translate('users.tokens.revoke')}\n            </Button>\n          )}\n        </td>\n      </tr>\n    );\n  }\n}\n", "/*!\n * clipboard.js v2.0.6\n * https://clipboardjs.com/\n * \n * Licensed MIT \u00A9 Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nfunction select(element) {\n    var selectedText;\n\n    if (element.nodeName === 'SELECT') {\n        element.focus();\n\n        selectedText = element.value;\n    }\n    else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n        var isReadOnly = element.hasAttribute('readonly');\n\n        if (!isReadOnly) {\n            element.setAttribute('readonly', '');\n        }\n\n        element.select();\n        element.setSelectionRange(0, element.value.length);\n\n        if (!isReadOnly) {\n            element.removeAttribute('readonly');\n        }\n\n        selectedText = element.value;\n    }\n    else {\n        if (element.hasAttribute('contenteditable')) {\n            element.focus();\n        }\n\n        var selection = window.getSelection();\n        var range = document.createRange();\n\n        range.selectNodeContents(element);\n        selection.removeAllRanges();\n        selection.addRange(range);\n\n        selectedText = selection.toString();\n    }\n\n    return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nfunction E () {\n  // Keep this empty so it's easier to inherit from\n  // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n  on: function (name, callback, ctx) {\n    var e = this.e || (this.e = {});\n\n    (e[name] || (e[name] = [])).push({\n      fn: callback,\n      ctx: ctx\n    });\n\n    return this;\n  },\n\n  once: function (name, callback, ctx) {\n    var self = this;\n    function listener () {\n      self.off(name, listener);\n      callback.apply(ctx, arguments);\n    };\n\n    listener._ = callback\n    return this.on(name, listener, ctx);\n  },\n\n  emit: function (name) {\n    var data = [].slice.call(arguments, 1);\n    var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n    var i = 0;\n    var len = evtArr.length;\n\n    for (i; i < len; i++) {\n      evtArr[i].fn.apply(evtArr[i].ctx, data);\n    }\n\n    return this;\n  },\n\n  off: function (name, callback) {\n    var e = this.e || (this.e = {});\n    var evts = e[name];\n    var liveEvents = [];\n\n    if (evts && callback) {\n      for (var i = 0, len = evts.length; i < len; i++) {\n        if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n          liveEvents.push(evts[i]);\n      }\n    }\n\n    // Remove event from queue to prevent memory leak\n    // Suggested by https://github.com/lazd\n    // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n    (liveEvents.length)\n      ? e[name] = liveEvents\n      : delete e[name];\n\n    return this;\n  }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar is = __webpack_require__(3);\nvar delegate = __webpack_require__(4);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n    if (!target && !type && !callback) {\n        throw new Error('Missing required arguments');\n    }\n\n    if (!is.string(type)) {\n        throw new TypeError('Second argument must be a String');\n    }\n\n    if (!is.fn(callback)) {\n        throw new TypeError('Third argument must be a Function');\n    }\n\n    if (is.node(target)) {\n        return listenNode(target, type, callback);\n    }\n    else if (is.nodeList(target)) {\n        return listenNodeList(target, type, callback);\n    }\n    else if (is.string(target)) {\n        return listenSelector(target, type, callback);\n    }\n    else {\n        throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n    }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n    node.addEventListener(type, callback);\n\n    return {\n        destroy: function() {\n            node.removeEventListener(type, callback);\n        }\n    }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n    Array.prototype.forEach.call(nodeList, function(node) {\n        node.addEventListener(type, callback);\n    });\n\n    return {\n        destroy: function() {\n            Array.prototype.forEach.call(nodeList, function(node) {\n                node.removeEventListener(type, callback);\n            });\n        }\n    }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n    return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n    return value !== undefined\n        && value instanceof HTMLElement\n        && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n    var type = Object.prototype.toString.call(value);\n\n    return value !== undefined\n        && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n        && ('length' in value)\n        && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n    return typeof value === 'string'\n        || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n    var type = Object.prototype.toString.call(value);\n\n    return type === '[object Function]';\n};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar closest = __webpack_require__(5);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n    var listenerFn = listener.apply(this, arguments);\n\n    element.addEventListener(type, listenerFn, useCapture);\n\n    return {\n        destroy: function() {\n            element.removeEventListener(type, listenerFn, useCapture);\n        }\n    }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n    // Handle the regular Element usage\n    if (typeof elements.addEventListener === 'function') {\n        return _delegate.apply(null, arguments);\n    }\n\n    // Handle Element-less usage, it defaults to global delegation\n    if (typeof type === 'function') {\n        // Use `document` as the first parameter, then apply arguments\n        // This is a short way to .unshift `arguments` without running into deoptimizations\n        return _delegate.bind(null, document).apply(null, arguments);\n    }\n\n    // Handle Selector-based usage\n    if (typeof elements === 'string') {\n        elements = document.querySelectorAll(elements);\n    }\n\n    // Handle Array-like based usage\n    return Array.prototype.map.call(elements, function (element) {\n        return _delegate(element, selector, type, callback, useCapture);\n    });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n    return function(e) {\n        e.delegateTarget = closest(e.target, selector);\n\n        if (e.delegateTarget) {\n            callback.call(element, e);\n        }\n    }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n    var proto = Element.prototype;\n\n    proto.matches = proto.matchesSelector ||\n                    proto.mozMatchesSelector ||\n                    proto.msMatchesSelector ||\n                    proto.oMatchesSelector ||\n                    proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n    while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n        if (typeof element.matches === 'function' &&\n            element.matches(selector)) {\n          return element;\n        }\n        element = element.parentNode;\n    }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(0);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n\n// CONCATENATED MODULE: ./src/clipboard-action.js\nvar _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; };\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\n/**\n * Inner class which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n */\n\nvar clipboard_action_ClipboardAction = function () {\n    /**\n     * @param {Object} options\n     */\n    function ClipboardAction(options) {\n        _classCallCheck(this, ClipboardAction);\n\n        this.resolveOptions(options);\n        this.initSelection();\n    }\n\n    /**\n     * Defines base properties passed from constructor.\n     * @param {Object} options\n     */\n\n\n    _createClass(ClipboardAction, [{\n        key: 'resolveOptions',\n        value: function resolveOptions() {\n            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n            this.action = options.action;\n            this.container = options.container;\n            this.emitter = options.emitter;\n            this.target = options.target;\n            this.text = options.text;\n            this.trigger = options.trigger;\n\n            this.selectedText = '';\n        }\n\n        /**\n         * Decides which selection strategy is going to be applied based\n         * on the existence of `text` and `target` properties.\n         */\n\n    }, {\n        key: 'initSelection',\n        value: function initSelection() {\n            if (this.text) {\n                this.selectFake();\n            } else if (this.target) {\n                this.selectTarget();\n            }\n        }\n\n        /**\n         * Creates a fake textarea element, sets its value from `text` property,\n         * and makes a selection on it.\n         */\n\n    }, {\n        key: 'selectFake',\n        value: function selectFake() {\n            var _this = this;\n\n            var isRTL = document.documentElement.getAttribute('dir') == 'rtl';\n\n            this.removeFake();\n\n            this.fakeHandlerCallback = function () {\n                return _this.removeFake();\n            };\n            this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;\n\n            this.fakeElem = document.createElement('textarea');\n            // Prevent zooming on iOS\n            this.fakeElem.style.fontSize = '12pt';\n            // Reset box model\n            this.fakeElem.style.border = '0';\n            this.fakeElem.style.padding = '0';\n            this.fakeElem.style.margin = '0';\n            // Move element out of screen horizontally\n            this.fakeElem.style.position = 'absolute';\n            this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';\n            // Move element to the same position vertically\n            var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n            this.fakeElem.style.top = yPosition + 'px';\n\n            this.fakeElem.setAttribute('readonly', '');\n            this.fakeElem.value = this.text;\n\n            this.container.appendChild(this.fakeElem);\n\n            this.selectedText = select_default()(this.fakeElem);\n            this.copyText();\n        }\n\n        /**\n         * Only removes the fake element after another click event, that way\n         * a user can hit `Ctrl+C` to copy because selection still exists.\n         */\n\n    }, {\n        key: 'removeFake',\n        value: function removeFake() {\n            if (this.fakeHandler) {\n                this.container.removeEventListener('click', this.fakeHandlerCallback);\n                this.fakeHandler = null;\n                this.fakeHandlerCallback = null;\n            }\n\n            if (this.fakeElem) {\n                this.container.removeChild(this.fakeElem);\n                this.fakeElem = null;\n            }\n        }\n\n        /**\n         * Selects the content from element passed on `target` property.\n         */\n\n    }, {\n        key: 'selectTarget',\n        value: function selectTarget() {\n            this.selectedText = select_default()(this.target);\n            this.copyText();\n        }\n\n        /**\n         * Executes the copy operation based on the current selection.\n         */\n\n    }, {\n        key: 'copyText',\n        value: function copyText() {\n            var succeeded = void 0;\n\n            try {\n                succeeded = document.execCommand(this.action);\n            } catch (err) {\n                succeeded = false;\n            }\n\n            this.handleResult(succeeded);\n        }\n\n        /**\n         * Fires an event based on the copy operation result.\n         * @param {Boolean} succeeded\n         */\n\n    }, {\n        key: 'handleResult',\n        value: function handleResult(succeeded) {\n            this.emitter.emit(succeeded ? 'success' : 'error', {\n                action: this.action,\n                text: this.selectedText,\n                trigger: this.trigger,\n                clearSelection: this.clearSelection.bind(this)\n            });\n        }\n\n        /**\n         * Moves focus away from `target` and back to the trigger, removes current selection.\n         */\n\n    }, {\n        key: 'clearSelection',\n        value: function clearSelection() {\n            if (this.trigger) {\n                this.trigger.focus();\n            }\n            document.activeElement.blur();\n            window.getSelection().removeAllRanges();\n        }\n\n        /**\n         * Sets the `action` to be performed which can be either 'copy' or 'cut'.\n         * @param {String} action\n         */\n\n    }, {\n        key: 'destroy',\n\n\n        /**\n         * Destroy lifecycle.\n         */\n        value: function destroy() {\n            this.removeFake();\n        }\n    }, {\n        key: 'action',\n        set: function set() {\n            var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';\n\n            this._action = action;\n\n            if (this._action !== 'copy' && this._action !== 'cut') {\n                throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n            }\n        }\n\n        /**\n         * Gets the `action` property.\n         * @return {String}\n         */\n        ,\n        get: function get() {\n            return this._action;\n        }\n\n        /**\n         * Sets the `target` property using an element\n         * that will be have its content copied.\n         * @param {Element} target\n         */\n\n    }, {\n        key: 'target',\n        set: function set(target) {\n            if (target !== undefined) {\n                if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {\n                    if (this.action === 'copy' && target.hasAttribute('disabled')) {\n                        throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n                    }\n\n                    if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n                        throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n                    }\n\n                    this._target = target;\n                } else {\n                    throw new Error('Invalid \"target\" value, use a valid Element');\n                }\n            }\n        }\n\n        /**\n         * Gets the `target` property.\n         * @return {String|HTMLElement}\n         */\n        ,\n        get: function get() {\n            return this._target;\n        }\n    }]);\n\n    return ClipboardAction;\n}();\n\n/* harmony default export */ var clipboard_action = (clipboard_action_ClipboardAction);\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(1);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(2);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n\n// CONCATENATED MODULE: ./src/clipboard.js\nvar clipboard_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; };\n\nvar clipboard_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; }; }();\n\nfunction clipboard_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\n\n\n\n\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\nvar clipboard_Clipboard = function (_Emitter) {\n    _inherits(Clipboard, _Emitter);\n\n    /**\n     * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n     * @param {Object} options\n     */\n    function Clipboard(trigger, options) {\n        clipboard_classCallCheck(this, Clipboard);\n\n        var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this));\n\n        _this.resolveOptions(options);\n        _this.listenClick(trigger);\n        return _this;\n    }\n\n    /**\n     * Defines if attributes would be resolved using internal setter functions\n     * or custom functions that were passed in the constructor.\n     * @param {Object} options\n     */\n\n\n    clipboard_createClass(Clipboard, [{\n        key: 'resolveOptions',\n        value: function resolveOptions() {\n            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n            this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n            this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n            this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n            this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n        }\n\n        /**\n         * Adds a click event listener to the passed trigger.\n         * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n         */\n\n    }, {\n        key: 'listenClick',\n        value: function listenClick(trigger) {\n            var _this2 = this;\n\n            this.listener = listen_default()(trigger, 'click', function (e) {\n                return _this2.onClick(e);\n            });\n        }\n\n        /**\n         * Defines a new `ClipboardAction` on each click event.\n         * @param {Event} e\n         */\n\n    }, {\n        key: 'onClick',\n        value: function onClick(e) {\n            var trigger = e.delegateTarget || e.currentTarget;\n\n            if (this.clipboardAction) {\n                this.clipboardAction = null;\n            }\n\n            this.clipboardAction = new clipboard_action({\n                action: this.action(trigger),\n                target: this.target(trigger),\n                text: this.text(trigger),\n                container: this.container,\n                trigger: trigger,\n                emitter: this\n            });\n        }\n\n        /**\n         * Default `action` lookup function.\n         * @param {Element} trigger\n         */\n\n    }, {\n        key: 'defaultAction',\n        value: function defaultAction(trigger) {\n            return getAttributeValue('action', trigger);\n        }\n\n        /**\n         * Default `target` lookup function.\n         * @param {Element} trigger\n         */\n\n    }, {\n        key: 'defaultTarget',\n        value: function defaultTarget(trigger) {\n            var selector = getAttributeValue('target', trigger);\n\n            if (selector) {\n                return document.querySelector(selector);\n            }\n        }\n\n        /**\n         * Returns the support of the given action, or all actions if no action is\n         * given.\n         * @param {String} [action]\n         */\n\n    }, {\n        key: 'defaultText',\n\n\n        /**\n         * Default `text` lookup function.\n         * @param {Element} trigger\n         */\n        value: function defaultText(trigger) {\n            return getAttributeValue('text', trigger);\n        }\n\n        /**\n         * Destroy lifecycle.\n         */\n\n    }, {\n        key: 'destroy',\n        value: function destroy() {\n            this.listener.destroy();\n\n            if (this.clipboardAction) {\n                this.clipboardAction.destroy();\n                this.clipboardAction = null;\n            }\n        }\n    }], [{\n        key: 'isSupported',\n        value: function isSupported() {\n            var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n\n            var actions = typeof action === 'string' ? [action] : action;\n            var support = !!document.queryCommandSupported;\n\n            actions.forEach(function (action) {\n                support = support && !!document.queryCommandSupported(action);\n            });\n\n            return support;\n        }\n    }]);\n\n    return Clipboard;\n}(tiny_emitter_default.a);\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\n\nfunction getAttributeValue(suffix, element) {\n    var attribute = 'data-clipboard-' + suffix;\n\n    if (!element.hasAttribute(attribute)) {\n        return;\n    }\n\n    return element.getAttribute(attribute);\n}\n\n/* harmony default export */ var clipboard = __webpack_exports__[\"default\"] = (clipboard_Clipboard);\n\n/***/ })\n/******/ ])[\"default\"];\n});", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function CopyIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <g fill={fill} fillRule=\"nonzero\">\n        <path d=\"M2.931 15.005V3H2v13h9v-.995z\" />\n        <path d=\"M10 4.015h3V14H4V1h6v3.015zM9 8V6H8v2H6v1h2v2h1V9h2V8H9z\" />\n        <path d=\"M11 1v2h2a2.151 2.151 0 0 0-2-2z\" />\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport Clipboard from 'clipboard';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport CopyIcon from '../icons/CopyIcon';\nimport { Button, ButtonIcon } from './buttons';\nimport Tooltip from './Tooltip';\n\nexport interface State {\n  copySuccess: boolean;\n}\n\ninterface RenderProps {\n  setCopyButton: (node: HTMLElement | null) => void;\n  copySuccess: boolean;\n}\n\ninterface BaseProps {\n  children: (props: RenderProps) => React.ReactNode;\n}\n\nexport class ClipboardBase extends React.PureComponent<BaseProps, State> {\n  private clipboard?: Clipboard;\n  private copyButton?: HTMLElement | null;\n  mounted = false;\n  state: State = { copySuccess: false };\n\n  componentDidMount() {\n    this.mounted = true;\n    if (this.copyButton) {\n      this.clipboard = new Clipboard(this.copyButton);\n      this.clipboard.on('success', this.handleSuccessCopy);\n    }\n  }\n\n  componentDidUpdate() {\n    if (this.clipboard) {\n      this.clipboard.destroy();\n    }\n    if (this.copyButton) {\n      this.clipboard = new Clipboard(this.copyButton);\n      this.clipboard.on('success', this.handleSuccessCopy);\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    if (this.clipboard) {\n      this.clipboard.destroy();\n    }\n  }\n\n  setCopyButton = (node: HTMLElement | null) => {\n    this.copyButton = node;\n  };\n\n  handleSuccessCopy = () => {\n    if (this.mounted) {\n      this.setState({ copySuccess: true });\n      setTimeout(() => {\n        if (this.mounted) {\n          this.setState({ copySuccess: false });\n        }\n      }, 1000);\n    }\n  };\n\n  render() {\n    return this.props.children({\n      setCopyButton: this.setCopyButton,\n      copySuccess: this.state.copySuccess\n    });\n  }\n}\n\ninterface ButtonProps {\n  className?: string;\n  copyValue: string;\n  children?: React.ReactNode;\n}\n\nexport function ClipboardButton({ className, children, copyValue }: ButtonProps) {\n  return (\n    <ClipboardBase>\n      {({ setCopyButton, copySuccess }) => (\n        <Tooltip overlay={translate('copied_action')} visible={copySuccess}>\n          <Button\n            className={classNames('no-select', className)}\n            data-clipboard-text={copyValue}\n            innerRef={setCopyButton}>\n            {children || (\n              <>\n                <CopyIcon className=\"little-spacer-right\" />\n                {translate('copy')}\n              </>\n            )}\n          </Button>\n        </Tooltip>\n      )}\n    </ClipboardBase>\n  );\n}\n\ninterface IconButtonProps {\n  'aria-label'?: string;\n  className?: string;\n  copyValue: string;\n}\n\nexport function ClipboardIconButton(props: IconButtonProps) {\n  const { className, copyValue } = props;\n  return (\n    <ClipboardBase>\n      {({ setCopyButton, copySuccess }) => {\n        return (\n          <ButtonIcon\n            aria-label={props['aria-label'] ?? translate('copy_to_clipboard')}\n            className={classNames('no-select', className)}\n            data-clipboard-text={copyValue}\n            innerRef={setCopyButton}\n            tooltip={translate(copySuccess ? 'copied_action' : 'copy_to_clipboard')}\n            tooltipProps={copySuccess ? { visible: copySuccess } : undefined}>\n            <CopyIcon />\n          </ButtonIcon>\n        );\n      }}\n    </ClipboardBase>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ClipboardButton } from '../../../components/controls/clipboard';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translateWithParameters } from '../../../helpers/l10n';\n\ninterface Props {\n  token: { name: string; token: string };\n}\n\nexport default function TokensFormNewToken({ token }: Props) {\n  return (\n    <div className=\"panel panel-white big-spacer-top\">\n      <Alert variant=\"warning\">\n        {translateWithParameters('users.tokens.new_token_created', token.name)}\n      </Alert>\n      <ClipboardButton copyValue={token.token} />\n      <code className=\"big-spacer-left text-success\">{token.token}</code>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { generateToken, getTokens } from '../../../api/user-tokens';\nimport { SubmitButton } from '../../../components/controls/buttons';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport TokensFormItem, { TokenDeleteConfirmation } from './TokensFormItem';\nimport TokensFormNewToken from './TokensFormNewToken';\n\ninterface Props {\n  deleteConfirmation: TokenDeleteConfirmation;\n  login: string;\n  updateTokensCount?: (login: string, tokensCount: number) => void;\n}\n\ninterface State {\n  generating: boolean;\n  loading: boolean;\n  newToken?: { name: string; token: string };\n  newTokenName: string;\n  tokens: T.UserToken[];\n}\n\nexport default class TokensForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    generating: false,\n    loading: true,\n    newTokenName: '',\n    tokens: []\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchTokens();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchTokens = () => {\n    this.setState({ loading: true });\n    getTokens(this.props.login).then(\n      tokens => {\n        if (this.mounted) {\n          this.setState({ loading: false, tokens });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  updateTokensCount = () => {\n    if (this.props.updateTokensCount) {\n      this.props.updateTokensCount(this.props.login, this.state.tokens.length);\n    }\n  };\n\n  handleGenerateToken = (evt: React.SyntheticEvent<HTMLFormElement>) => {\n    evt.preventDefault();\n    if (this.state.newTokenName.length > 0) {\n      this.setState({ generating: true });\n      generateToken({ name: this.state.newTokenName, login: this.props.login }).then(\n        newToken => {\n          if (this.mounted) {\n            this.setState(state => {\n              const tokens = [\n                ...state.tokens,\n                { name: newToken.name, createdAt: newToken.createdAt }\n              ];\n              return { generating: false, newToken, newTokenName: '', tokens };\n            }, this.updateTokensCount);\n          }\n        },\n        () => {\n          if (this.mounted) {\n            this.setState({ generating: false });\n          }\n        }\n      );\n    }\n  };\n\n  handleRevokeToken = (revokedToken: T.UserToken) => {\n    this.setState(\n      state => ({\n        tokens: state.tokens.filter(token => token.name !== revokedToken.name)\n      }),\n      this.updateTokensCount\n    );\n  };\n\n  handleNewTokenChange = (evt: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ newTokenName: evt.currentTarget.value });\n\n  renderItems() {\n    const { tokens } = this.state;\n    if (tokens.length <= 0) {\n      return (\n        <tr>\n          <td className=\"note\" colSpan={3}>\n            {translate('users.no_tokens')}\n          </td>\n        </tr>\n      );\n    }\n    return tokens.map(token => (\n      <TokensFormItem\n        deleteConfirmation={this.props.deleteConfirmation}\n        key={token.name}\n        login={this.props.login}\n        onRevokeToken={this.handleRevokeToken}\n        token={token}\n      />\n    ));\n  }\n\n  render() {\n    const { generating, loading, newToken, newTokenName, tokens } = this.state;\n    const customSpinner = (\n      <tr>\n        <td>\n          <i className=\"spinner\" />\n        </td>\n      </tr>\n    );\n    return (\n      <>\n        <h3 className=\"spacer-bottom\">{translate('users.generate_tokens')}</h3>\n        <form\n          autoComplete=\"off\"\n          className=\"display-flex-center\"\n          id=\"generate-token-form\"\n          onSubmit={this.handleGenerateToken}>\n          <input\n            className=\"input-large spacer-right\"\n            maxLength={100}\n            onChange={this.handleNewTokenChange}\n            placeholder={translate('users.enter_token_name')}\n            required={true}\n            type=\"text\"\n            value={newTokenName}\n          />\n          <SubmitButton\n            className=\"js-generate-token\"\n            disabled={generating || newTokenName.length <= 0}>\n            {translate('users.generate')}\n          </SubmitButton>\n        </form>\n\n        {newToken && <TokensFormNewToken token={newToken} />}\n\n        <table className=\"data zebra big-spacer-top\">\n          <thead>\n            <tr>\n              <th>{translate('name')}</th>\n              <th>{translate('my_account.tokens_last_usage')}</th>\n              <th className=\"text-right\">{translate('created')}</th>\n              <th />\n            </tr>\n          </thead>\n          <tbody>\n            <DeferredSpinner customSpinner={customSpinner} loading={loading && tokens.length <= 0}>\n              {this.renderItems()}\n            </DeferredSpinner>\n          </tbody>\n        </table>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport InstanceMessage from '../../../components/common/InstanceMessage';\nimport { translate } from '../../../helpers/l10n';\nimport TokensForm from '../../users/components/TokensForm';\n\ninterface Props {\n  login: string;\n}\n\nexport default function Tokens({ login }: Props) {\n  return (\n    <div className=\"boxed-group\">\n      <h2>{translate('users.tokens')}</h2>\n      <div className=\"boxed-group-inner\">\n        <div className=\"big-spacer-bottom big-spacer-right markdown\">\n          <InstanceMessage message={translate('my_account.tokens_description')} />\n        </div>\n\n        <TokensForm deleteConfirmation=\"modal\" login={login} />\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport ResetPasswordForm from '../../../components/common/ResetPasswordForm';\nimport { translate } from '../../../helpers/l10n';\nimport { getCurrentUser, Store } from '../../../store/rootReducer';\nimport Tokens from './Tokens';\n\nexport interface SecurityProps {\n  user: T.LoggedInUser;\n}\n\nexport function Security({ user }: SecurityProps) {\n  return (\n    <div className=\"account-body account-container\">\n      <Helmet defer={false} title={translate('my_account.security')} />\n      <Tokens login={user.login} />\n      {user.local && (\n        <section className=\"boxed-group\">\n          <h2 className=\"spacer-bottom\">{translate('my_profile.password.title')}</h2>\n          <ResetPasswordForm className=\"boxed-group-inner\" user={user} />\n        </section>\n      )}\n    </div>\n  );\n}\n\nconst mapStateToProps = (state: Store) => ({\n  user: getCurrentUser(state) as T.LoggedInUser\n});\n\nexport default connect(mapStateToProps)(Security);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON, RequestData } from '../helpers/request';\nimport { BranchParameters } from '../types/branch-like';\nimport { ComponentQualifier, TreeComponent, TreeComponentWithPath } from '../types/component';\n\nexport interface BaseSearchProjectsParameters {\n  analyzedBefore?: string;\n  onProvisionedOnly?: boolean;\n  projects?: string;\n  q?: string;\n  qualifiers?: string;\n  visibility?: T.Visibility;\n}\n\nexport interface ProjectBase {\n  key: string;\n  name: string;\n  qualifier: string;\n  visibility: T.Visibility;\n}\n\nexport interface Project extends ProjectBase {\n  id: string;\n  lastAnalysisDate?: string;\n}\n\nexport interface SearchProjectsParameters extends BaseSearchProjectsParameters {\n  p?: number;\n  ps?: number;\n}\n\nexport function getComponents(\n  parameters: SearchProjectsParameters\n): Promise<{\n  components: Project[];\n  paging: T.Paging;\n}> {\n  return getJSON('/api/projects/search', parameters);\n}\n\nexport function bulkDeleteProjects(\n  parameters: BaseSearchProjectsParameters\n): Promise<void | Response> {\n  return post('/api/projects/bulk_delete', parameters).catch(throwGlobalError);\n}\n\nexport function deleteProject(project: string): Promise<void | Response> {\n  return post('/api/projects/delete', { project }).catch(throwGlobalError);\n}\n\nexport function deletePortfolio(portfolio: string): Promise<void | Response> {\n  return post('/api/views/delete', { key: portfolio }).catch(throwGlobalError);\n}\n\nexport function createProject(data: {\n  name: string;\n  project: string;\n  visibility?: T.Visibility;\n}): Promise<{ project: ProjectBase }> {\n  return postJSON('/api/projects/create', data).catch(throwGlobalError);\n}\n\nexport function searchProjectTags(data?: { ps?: number; q?: string }): Promise<any> {\n  return getJSON('/api/project_tags/search', data).catch(throwGlobalError);\n}\n\nexport function setApplicationTags(data: { application: string; tags: string }): Promise<void> {\n  return post('/api/applications/set_tags', data);\n}\n\nexport function setProjectTags(data: { project: string; tags: string }): Promise<void> {\n  return post('/api/project_tags/set', data);\n}\n\nexport function getComponentTree(\n  strategy: string,\n  component: string,\n  metrics: string[] = [],\n  additional: RequestData = {}\n): Promise<{\n  baseComponent: T.ComponentMeasure;\n  components: T.ComponentMeasure[];\n  metrics: T.Metric[];\n  paging: T.Paging;\n}> {\n  const url = '/api/measures/component_tree';\n  const data = { ...additional, component, metricKeys: metrics.join(','), strategy };\n  return getJSON(url, data).catch(throwGlobalError);\n}\n\nexport function getChildren(\n  component: string,\n  metrics: string[] = [],\n  additional: RequestData = {}\n) {\n  return getComponentTree('children', component, metrics, additional);\n}\n\nexport function getComponentLeaves(\n  component: string,\n  metrics: string[] = [],\n  additional: RequestData = {}\n) {\n  return getComponentTree('leaves', component, metrics, additional);\n}\n\nexport function getComponent(\n  data: { component: string; metricKeys: string } & BranchParameters\n): Promise<{ component: T.ComponentMeasure }> {\n  return getJSON('/api/measures/component', data);\n}\n\ntype GetTreeParams = {\n  asc?: boolean;\n  component: string;\n  p?: number;\n  ps?: number;\n  q?: string;\n  s?: string;\n  strategy?: 'all' | 'leaves' | 'children';\n} & BranchParameters;\n\nexport function getTree<T = TreeComponent>(\n  data: GetTreeParams & { qualifiers?: string }\n): Promise<{ baseComponent: TreeComponent; components: T[]; paging: T.Paging }> {\n  return getJSON('/api/components/tree', data).catch(throwGlobalError);\n}\n\nexport function getFiles(data: GetTreeParams) {\n  return getTree<TreeComponentWithPath>({ ...data, qualifiers: 'FIL' });\n}\n\nexport function getDirectories(data: GetTreeParams) {\n  return getTree<TreeComponentWithPath>({ ...data, qualifiers: 'DIR' });\n}\n\nexport function getComponentData(data: { component: string } & BranchParameters): Promise<any> {\n  return getJSON('/api/components/show', data);\n}\n\nexport function doesComponentExists(\n  data: { component: string } & BranchParameters\n): Promise<boolean> {\n  return getComponentData(data).then(\n    ({ component }) => component !== undefined,\n    () => false\n  );\n}\n\nexport function getComponentShow(data: { component: string } & BranchParameters): Promise<any> {\n  return getComponentData(data).catch(throwGlobalError);\n}\n\nexport function getParents(component: string): Promise<any> {\n  return getComponentShow({ component }).then(r => r.ancestors);\n}\n\nexport function getBreadcrumbs(data: { component: string } & BranchParameters): Promise<any> {\n  return getComponentShow(data).then(r => {\n    const reversedAncestors = [...r.ancestors].reverse();\n    return [...reversedAncestors, r.component];\n  });\n}\n\nexport function getMyProjects(data: {\n  p?: number;\n  ps?: number;\n}): Promise<{ paging: T.Paging; projects: T.MyProject[] }> {\n  return getJSON('/api/projects/search_my_projects', data);\n}\n\nexport interface Component {\n  id: string;\n  key: string;\n  name: string;\n  isFavorite?: boolean;\n  analysisDate?: string;\n  qualifier: ComponentQualifier;\n  tags: string[];\n  visibility: T.Visibility;\n  leakPeriodDate?: string;\n  needIssueSync?: boolean;\n}\n\nexport interface Facet {\n  property: string;\n  values: Array<{ val: string; count: number }>;\n}\n\nexport function searchProjects(\n  data: RequestData\n): Promise<{\n  components: Component[];\n  facets: Facet[];\n  paging: T.Paging;\n}> {\n  const url = '/api/components/search_projects';\n  return getJSON(url, data);\n}\n\nexport function searchComponents(data?: {\n  q?: string;\n  qualifiers?: string;\n  ps?: number;\n}): Promise<any> {\n  return getJSON('/api/components/search', data);\n}\n\nexport function changeKey(data: { from: string; to: string }) {\n  return post('/api/projects/update_key', data).catch(throwGlobalError);\n}\n\nexport interface SuggestionsResponse {\n  projects: Array<{ key: string; name: string }>;\n  results: Array<{\n    items: Array<{\n      isFavorite: boolean;\n      isRecentlyBrowsed: boolean;\n      key: string;\n      match: string;\n      name: string;\n      project: string;\n    }>;\n    more: number;\n    q: string;\n  }>;\n  warning?: string;\n}\n\nexport function getSuggestions(\n  query?: string,\n  recentlyBrowsed?: string[],\n  more?: string\n): Promise<SuggestionsResponse> {\n  const data: RequestData = {};\n  if (query) {\n    data.s = query;\n  }\n  if (recentlyBrowsed) {\n    data.recentlyBrowsed = recentlyBrowsed.join();\n  }\n  if (more) {\n    data.more = more;\n  }\n  return getJSON('/api/components/suggestions', data).catch(throwGlobalError);\n}\n\nexport function getComponentForSourceViewer(\n  data: { component: string } & BranchParameters\n): Promise<T.SourceViewerFile> {\n  return getJSON('/api/components/app', data);\n}\n\nexport function getSources(\n  data: { key: string; from?: number; to?: number } & BranchParameters\n): Promise<T.SourceLine[]> {\n  return getJSON('/api/sources/lines', data).then(r => r.sources);\n}\n\nexport function getDuplications(\n  data: { key: string } & BranchParameters\n): Promise<{ duplications: T.Duplication[]; files: T.Dict<T.DuplicatedFile> }> {\n  return getJSON('/api/duplications/show', data).catch(throwGlobalError);\n}\n\nexport function getTests(\n  data: { sourceFileKey: string; sourceFileLineNumber: number | string } & BranchParameters\n): Promise<any> {\n  return getJSON('/api/tests/list', data).then(r => r.tests);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function isDefined<T>(x: T | undefined | null): x is T {\n  return x !== undefined && x !== null;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { MetricKey } from '../types/metrics';\nimport {\n  QualityGateStatusCondition,\n  QualityGateStatusConditionEnhanced\n} from '../types/quality-gates';\nimport { getCurrentLocale, translate, translateWithParameters } from './l10n';\nimport { isDefined } from './types';\n\nexport function enhanceMeasuresWithMetrics(\n  measures: T.Measure[],\n  metrics: T.Metric[]\n): T.MeasureEnhanced[] {\n  return measures\n    .map(measure => {\n      const metric = metrics.find(metric => metric.key === measure.metric);\n      return metric && { ...measure, metric };\n    })\n    .filter(isDefined);\n}\n\nexport function enhanceConditionWithMeasure(\n  condition: QualityGateStatusCondition,\n  measures: T.MeasureEnhanced[]\n): QualityGateStatusConditionEnhanced | undefined {\n  const measure = measures.find(m => m.metric.key === condition.metric);\n\n  // Make sure we have a period index. This is necessary when dealing with\n  // applications.\n  let { period } = condition;\n  if (measure && measure.period && !period) {\n    period = measure.period.index;\n  }\n\n  return measure && { ...condition, period, measure };\n}\n\nexport function isPeriodBestValue(measure: T.Measure | T.MeasureEnhanced): boolean {\n  return measure.period?.bestValue || false;\n}\n\n/** Check if metric is differential */\nexport function isDiffMetric(metricKey: MetricKey | string): boolean {\n  return metricKey.indexOf('new_') === 0;\n}\n\nfunction getRatingGrid(): string {\n  // workaround cyclic dependencies\n  const getStore = require('../app/utils/getStore').default;\n  const { getGlobalSettingValue } = require('../store/rootReducer');\n\n  const store = getStore();\n  const settingValue = getGlobalSettingValue(store.getState(), 'sonar.technicalDebt.ratingGrid');\n  return settingValue ? settingValue.value : '';\n}\n\nlet maintainabilityRatingGrid: number[];\n\nfunction getMaintainabilityRatingGrid(): number[] {\n  if (maintainabilityRatingGrid) {\n    return maintainabilityRatingGrid;\n  }\n\n  const str = getRatingGrid();\n  const numbers = str\n    .split(',')\n    .map(s => parseFloat(s))\n    .filter(n => !isNaN(n));\n\n  if (numbers.length === 4) {\n    maintainabilityRatingGrid = numbers;\n  } else {\n    maintainabilityRatingGrid = [0, 0, 0, 0];\n  }\n\n  return maintainabilityRatingGrid;\n}\n\nfunction getMaintainabilityRatingTooltip(rating: number): string {\n  const maintainabilityGrid = getMaintainabilityRatingGrid();\n  const maintainabilityRatingThreshold = maintainabilityGrid[Math.floor(rating) - 2];\n\n  if (rating < 2) {\n    return translateWithParameters(\n      'metric.sqale_rating.tooltip.A',\n      formatMeasure(maintainabilityGrid[0] * 100, 'PERCENT')\n    );\n  }\n\n  const ratingLetter = formatMeasure(rating, 'RATING');\n\n  return translateWithParameters(\n    'metric.sqale_rating.tooltip',\n    ratingLetter,\n    formatMeasure(maintainabilityRatingThreshold * 100, 'PERCENT')\n  );\n}\n\nexport function getRatingTooltip(metricKey: MetricKey | string, value: number | string): string {\n  const ratingLetter = formatMeasure(value, 'RATING');\n\n  const finalMetricKey = isDiffMetric(metricKey) ? metricKey.substr(4) : metricKey;\n\n  return finalMetricKey === 'sqale_rating' || finalMetricKey === 'maintainability_rating'\n    ? getMaintainabilityRatingTooltip(Number(value))\n    : translate('metric', finalMetricKey, 'tooltip', ratingLetter);\n}\n\nexport function getDisplayMetrics(metrics: T.Metric[]) {\n  return metrics.filter(metric => !metric.hidden && !['DATA', 'DISTRIB'].includes(metric.type));\n}\n\nexport function findMeasure(measures: T.MeasureEnhanced[], metric: MetricKey | string) {\n  return measures.find(measure => measure.metric.key === metric);\n}\n\nconst HOURS_IN_DAY = 8;\n\ninterface Formatter {\n  (value: string | number, options?: any): string;\n}\n\n/** Format a measure value for a given type */\nexport function formatMeasure(\n  value: string | number | undefined,\n  type: string,\n  options?: any\n): string {\n  const formatter = getFormatter(type);\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  return useFormatter(value, formatter, options);\n}\n\n/** Return a localized metric name */\nexport function localizeMetric(metricKey: string): string {\n  return translate('metric', metricKey, 'name');\n}\n\n/** Return corresponding \"short\" for better display in UI */\nexport function getShortType(type: string): string {\n  if (type === 'INT') {\n    return 'SHORT_INT';\n  } else if (type === 'WORK_DUR') {\n    return 'SHORT_WORK_DUR';\n  }\n  return type;\n}\n\n/*\n * Conditional decimal count for QualityGate-impacting measures\n * (e.g. Coverage %)\n * Increase the number of decimals if the value is close to the threshold\n * We count the precision (number of 0's, i.e. log10 and round down) needed to show the difference\n * E.g. threshold 85, value 84.9993 -> delta = 0.0007, we need 4 decimals to see the difference\n * otherwise rounding will make it look like they are equal.\n */\nconst DEFAULT_DECIMALS = 1;\nexport function getMinDecimalsCountToBeDistinctFromThreshold(\n  value: number,\n  threshold: number | undefined\n): number {\n  if (!threshold) {\n    return DEFAULT_DECIMALS;\n  }\n  const delta = Math.abs(threshold - value);\n  if (delta < 0.1 && delta > 0) {\n    return -Math.floor(Math.log10(delta));\n  }\n  return DEFAULT_DECIMALS;\n}\n\nfunction useFormatter(\n  value: string | number | undefined,\n  formatter: Formatter,\n  options?: any\n): string {\n  return value !== undefined && value !== '' ? formatter(value, options) : '';\n}\n\nfunction getFormatter(type: string): Formatter {\n  const FORMATTERS: T.Dict<Formatter> = {\n    INT: intFormatter,\n    SHORT_INT: shortIntFormatter,\n    FLOAT: floatFormatter,\n    PERCENT: percentFormatter,\n    WORK_DUR: durationFormatter,\n    SHORT_WORK_DUR: shortDurationFormatter,\n    RATING: ratingFormatter,\n    LEVEL: levelFormatter,\n    MILLISEC: millisecondsFormatter\n  };\n  return FORMATTERS[type] || noFormatter;\n}\n\nfunction numberFormatter(\n  value: string | number,\n  minimumFractionDigits = 0,\n  maximumFractionDigits = minimumFractionDigits\n) {\n  const { format } = new Intl.NumberFormat(getCurrentLocale(), {\n    minimumFractionDigits,\n    maximumFractionDigits\n  });\n  if (typeof value === 'string') {\n    return format(parseFloat(value));\n  }\n  return format(value);\n}\n\nfunction noFormatter(value: string | number): string | number {\n  return value;\n}\n\nfunction intFormatter(value: string | number): string {\n  return numberFormatter(value);\n}\n\nconst shortIntFormats = [\n  { unit: 1e10, formatUnit: 1e9, fraction: 0, suffix: 'short_number_suffix.g' },\n  { unit: 1e9, formatUnit: 1e9, fraction: 1, suffix: 'short_number_suffix.g' },\n  { unit: 1e7, formatUnit: 1e6, fraction: 0, suffix: 'short_number_suffix.m' },\n  { unit: 1e6, formatUnit: 1e6, fraction: 1, suffix: 'short_number_suffix.m' },\n  { unit: 1e4, formatUnit: 1e3, fraction: 0, suffix: 'short_number_suffix.k' },\n  { unit: 1e3, formatUnit: 1e3, fraction: 1, suffix: 'short_number_suffix.k' }\n];\n\nfunction shortIntFormatter(\n  value: string | number,\n  option?: { roundingFunc?: (x: number) => number }\n): string {\n  const roundingFunc = (option && option.roundingFunc) || undefined;\n  if (typeof value === 'string') {\n    value = parseFloat(value);\n  }\n  for (let i = 0; i < shortIntFormats.length; i++) {\n    const { unit, formatUnit, fraction, suffix } = shortIntFormats[i];\n    const nextFraction = unit / (shortIntFormats[i + 1] ? shortIntFormats[i + 1].unit / 10 : 1);\n    const roundedValue = numberRound(value / unit, nextFraction, roundingFunc);\n    if (roundedValue >= 1) {\n      return (\n        numberFormatter(\n          numberRound(value / formatUnit, Math.pow(10, fraction), roundingFunc),\n          0,\n          fraction\n        ) + translate(suffix)\n      );\n    }\n  }\n\n  return numberFormatter(value);\n}\n\nfunction numberRound(\n  value: number,\n  fraction: number = 1000,\n  roundingFunc: (x: number) => number = Math.round\n) {\n  return roundingFunc(value * fraction) / fraction;\n}\n\nfunction floatFormatter(value: string | number): string {\n  return numberFormatter(value, 1, 5);\n}\n\nfunction percentFormatter(\n  value: string | number,\n  { decimals, omitExtraDecimalZeros }: { decimals?: number; omitExtraDecimalZeros?: boolean } = {}\n): string {\n  if (typeof value === 'string') {\n    value = parseFloat(value);\n  }\n  if (value === 100) {\n    return '100%';\n  } else if (omitExtraDecimalZeros && decimals) {\n    // If omitExtraDecimalZeros is true, all trailing decimal 0s will be removed,\n    // except for the first decimal.\n    // E.g. for decimals=3:\n    // - omitExtraDecimalZeros: false, value: 45.450 => 45.450\n    // - omitExtraDecimalZeros: true, value: 45.450 => 45.45\n    // - omitExtraDecimalZeros: false, value: 85 => 85.000\n    // - omitExtraDecimalZeros: true, value: 85 => 85.0\n    return `${numberFormatter(value, 1, decimals)}%`;\n  }\n  return `${numberFormatter(value, decimals || 1)}%`;\n}\n\nfunction ratingFormatter(value: string | number): string {\n  if (typeof value === 'string') {\n    value = parseInt(value, 10);\n  }\n  return String.fromCharCode(97 + value - 1).toUpperCase();\n}\n\nfunction levelFormatter(value: string | number): string {\n  if (typeof value === 'number') {\n    value = value.toString();\n  }\n  const l10nKey = `metric.level.${value}`;\n  const result = translate(l10nKey);\n\n  // if couldn't translate, return the initial value\n  return l10nKey !== result ? result : value;\n}\n\nfunction millisecondsFormatter(value: string | number): string {\n  if (typeof value === 'string') {\n    value = parseInt(value, 10);\n  }\n  const ONE_SECOND = 1000;\n  const ONE_MINUTE = 60 * ONE_SECOND;\n  if (value >= ONE_MINUTE) {\n    const minutes = Math.round(value / ONE_MINUTE);\n    return `${minutes}min`;\n  } else if (value >= ONE_SECOND) {\n    const seconds = Math.round(value / ONE_SECOND);\n    return `${seconds}s`;\n  }\n  return `${value}ms`;\n}\n\n/*\n * Debt Formatters\n */\n\nfunction shouldDisplayDays(days: number): boolean {\n  return days > 0;\n}\n\nfunction shouldDisplayDaysInShortFormat(days: number): boolean {\n  return days > 0.9;\n}\n\nfunction shouldDisplayHours(days: number, hours: number): boolean {\n  return hours > 0 && days < 10;\n}\n\nfunction shouldDisplayHoursInShortFormat(hours: number): boolean {\n  return hours > 0.9;\n}\n\nfunction shouldDisplayMinutes(days: number, hours: number, minutes: number): boolean {\n  return minutes > 0 && hours < 10 && days === 0;\n}\n\nfunction addSpaceIfNeeded(value: string): string {\n  return value.length > 0 ? `${value} ` : value;\n}\n\nfunction formatDuration(isNegative: boolean, days: number, hours: number, minutes: number): string {\n  let formatted = '';\n  if (shouldDisplayDays(days)) {\n    formatted += translateWithParameters('work_duration.x_days', isNegative ? -1 * days : days);\n  }\n  if (shouldDisplayHours(days, hours)) {\n    formatted = addSpaceIfNeeded(formatted);\n    formatted += translateWithParameters(\n      'work_duration.x_hours',\n      isNegative && formatted.length === 0 ? -1 * hours : hours\n    );\n  }\n  if (shouldDisplayMinutes(days, hours, minutes)) {\n    formatted = addSpaceIfNeeded(formatted);\n    formatted += translateWithParameters(\n      'work_duration.x_minutes',\n      isNegative && formatted.length === 0 ? -1 * minutes : minutes\n    );\n  }\n  return formatted;\n}\n\nfunction formatDurationShort(\n  isNegative: boolean,\n  days: number,\n  hours: number,\n  minutes: number\n): string {\n  if (shouldDisplayDaysInShortFormat(days)) {\n    const roundedDays = Math.round(days);\n    const formattedDays = formatMeasure(isNegative ? -1 * roundedDays : roundedDays, 'SHORT_INT');\n    return translateWithParameters('work_duration.x_days', formattedDays);\n  }\n\n  if (shouldDisplayHoursInShortFormat(hours)) {\n    const roundedHours = Math.round(hours);\n    const formattedHours = formatMeasure(\n      isNegative ? -1 * roundedHours : roundedHours,\n      'SHORT_INT'\n    );\n    return translateWithParameters('work_duration.x_hours', formattedHours);\n  }\n\n  const formattedMinutes = formatMeasure(isNegative ? -1 * minutes : minutes, 'SHORT_INT');\n  return translateWithParameters('work_duration.x_minutes', formattedMinutes);\n}\n\nfunction durationFormatter(value: string | number): string {\n  if (typeof value === 'string') {\n    value = parseInt(value, 10);\n  }\n  if (value === 0) {\n    return '0';\n  }\n  const hoursInDay = HOURS_IN_DAY;\n  const isNegative = value < 0;\n  const absValue = Math.abs(value);\n  const days = Math.floor(absValue / hoursInDay / 60);\n  let remainingValue = absValue - days * hoursInDay * 60;\n  const hours = Math.floor(remainingValue / 60);\n  remainingValue -= hours * 60;\n  return formatDuration(isNegative, days, hours, remainingValue);\n}\n\nfunction shortDurationFormatter(value: string | number): string {\n  if (typeof value === 'string') {\n    value = parseInt(value, 10);\n  }\n  if (value === 0) {\n    return '0';\n  }\n  const hoursInDay = HOURS_IN_DAY;\n  const isNegative = value < 0;\n  const absValue = Math.abs(value);\n  const days = absValue / hoursInDay / 60;\n  let remainingValue = absValue - Math.floor(days) * hoursInDay * 60;\n  const hours = remainingValue / 60;\n  remainingValue -= Math.floor(hours) * 60;\n  return formatDurationShort(isNegative, days, hours, remainingValue);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport DeferredSpinner from '../ui/DeferredSpinner';\nimport { Button } from './buttons';\n\nexport interface ListFooterProps {\n  count: number;\n  className?: string;\n  loading?: boolean;\n  loadMore?: () => void;\n  needReload?: boolean;\n  pageSize?: number;\n  reload?: () => void;\n  ready?: boolean;\n  total?: number;\n}\n\nexport default function ListFooter(props: ListFooterProps) {\n  const { className, count, loading, needReload, total, pageSize, ready = true } = props;\n\n  let hasMore = false;\n  if (total !== undefined) {\n    hasMore = total > count;\n  } else if (pageSize !== undefined) {\n    hasMore = count % pageSize === 0;\n  }\n\n  let button;\n  if (needReload && props.reload) {\n    button = (\n      <Button className=\"spacer-left\" data-test=\"reload\" disabled={loading} onClick={props.reload}>\n        {translate('reload')}\n      </Button>\n    );\n  } else if (hasMore && props.loadMore) {\n    button = (\n      <Button\n        className=\"spacer-left\"\n        disabled={loading}\n        data-test=\"show-more\"\n        onClick={props.loadMore}>\n        {translate('show_more')}\n      </Button>\n    );\n  }\n\n  return (\n    <footer\n      className={classNames('spacer-top note text-center', { 'new-loading': !ready }, className)}>\n      {total !== undefined\n        ? translateWithParameters(\n            'x_of_y_shown',\n            formatMeasure(count, 'INT', null),\n            formatMeasure(total, 'INT', null)\n          )\n        : translateWithParameters('x_show', formatMeasure(count, 'INT', null))}\n      {button}\n      {loading && <DeferredSpinner className=\"text-bottom spacer-left position-absolute\" />}\n    </footer>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function BugTrackerIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M13.5 9.5c1.003.033 1.466 1.952 0 2h-2.618L9.685 9.107 8 14.162 6.096 8.45l-.832 3.05-2.829-.002c-.984-.097-1.369-1.951.065-1.998h1.236l2.168-7.95L8 7.838l1.315-3.945L12.118 9.5H13.5z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ContinuousIntegrationIcon({\n  fill = 'currentColor',\n  ...iconProps\n}: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M13.805 9.25c0 .016 0 .04-.008.055C13.133 12.07 10.852 14 7.969 14c-1.524 0-3-.602-4.11-1.656l-1.007 1.008a.497.497 0 0 1-.352.148.504.504 0 0 1-.5-.5V9.5c0-.273.227-.5.5-.5H6c.273 0 .5.227.5.5a.497.497 0 0 1-.148.352l-1.07 1.07a3.988 3.988 0 0 0 6.125-.828c.187-.305.28-.602.413-.914.04-.11.117-.18.235-.18h1.5c.14 0 .25.117.25.25zM14 3v3.5c0 .273-.227.5-.5.5H10a.504.504 0 0 1-.5-.5c0-.133.055-.258.148-.352l1.079-1.078A4.019 4.019 0 0 0 8 4c-1.39 0-2.68.719-3.406 1.906-.188.305-.282.602-.414.914-.04.11-.117.18-.235.18H2.391a.252.252 0 0 1-.25-.25v-.055C2.812 3.922 5.117 2 8 2c1.531 0 3.023.61 4.133 1.656l1.015-1.008A.497.497 0 0 1 13.5 2.5c.273 0 .5.227.5.5z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function DetachIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M12 9.25v2.5A2.25 2.25 0 0 1 9.75 14h-6.5A2.25 2.25 0 0 1 1 11.75v-6.5A2.25 2.25 0 0 1 3.25 3h5.5c.14 0 .25.11.25.25v.5c0 .14-.11.25-.25.25h-5.5C2.562 4 2 4.563 2 5.25v6.5c0 .688.563 1.25 1.25 1.25h6.5c.688 0 1.25-.563 1.25-1.25v-2.5c0-.14.11-.25.25-.25h.5c.14 0 .25.11.25.25zm3-6.75v4c0 .273-.227.5-.5.5a.497.497 0 0 1-.352-.148l-1.375-1.375L7.68 10.57a.27.27 0 0 1-.18.078.27.27 0 0 1-.18-.078l-.89-.89a.27.27 0 0 1-.078-.18.27.27 0 0 1 .078-.18l5.093-5.093-1.375-1.375A.497.497 0 0 1 10 2.5c0-.273.227-.5.5-.5h4c.273 0 .5.227.5.5z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function HouseIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M13.002 8.848v4.168a.56.56 0 0 1-.556.555H9.11v-3.334H6.89v3.334H3.554a.56.56 0 0 1-.556-.555V8.848c0-.018.01-.035.01-.052L8 4.68l4.993 4.116c.009.017.009.034.009.052zm1.936-.6l-.538.643a.289.289 0 0 1-.183.096h-.026a.273.273 0 0 1-.182-.061L8 3.916l-6.009 5.01a.297.297 0 0 1-.208.06.289.289 0 0 1-.183-.095l-.538-.642a.285.285 0 0 1 .035-.391L7.34 2.656a1.07 1.07 0 0 1 1.32 0l2.119 1.772V2.735c0-.157.121-.278.278-.278h1.667c.156 0 .278.121.278.278v3.542l1.901 1.58c.113.096.13.279.035.392z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function SCMIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M12.557 4.545c.241.247.443.743.443 1.098v7.714c0 .355-.28.643-.625.643h-8.75A.634.634 0 0 1 3 13.357V2.643C3 2.288 3.28 2 3.625 2h5.833c.345 0 .827.208 1.068.455l2.031 2.09zM9.667 2.91v2.518h2.448a.86.86 0 0 0-.144-.275L9.934 3.058a.823.823 0 0 0-.267-.147zm2.5 10.232V6.286H9.458a.634.634 0 0 1-.625-.643V2.857h-5v10.286h8.334z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BugTrackerIcon from './BugTrackerIcon';\nimport ContinuousIntegrationIcon from './ContinuousIntegrationIcon';\nimport DetachIcon from './DetachIcon';\nimport HouseIcon from './HouseIcon';\nimport { IconProps } from './Icon';\nimport SCMIcon from './SCMIcon';\n\ninterface ProjectLinkIconProps {\n  type: string;\n}\n\nexport default function ProjectLinkIcon({ type, ...iconProps }: IconProps & ProjectLinkIconProps) {\n  switch (type) {\n    case 'issue':\n      return <BugTrackerIcon {...iconProps} />;\n    case 'homepage':\n      return <HouseIcon {...iconProps} />;\n    case 'ci':\n      return <ContinuousIntegrationIcon {...iconProps} />;\n    case 'scm':\n      return <SCMIcon {...iconProps} />;\n    default:\n      return <DetachIcon {...iconProps} />;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { partition, sortBy } from 'lodash';\nimport { translate } from '../helpers/l10n';\n\nconst PROVIDED_TYPES = ['homepage', 'ci', 'issue', 'scm', 'scm_dev'];\ntype NameAndType = Pick<T.ProjectLink, 'name' | 'type'>;\n\nexport function isProvided(link: Pick<T.ProjectLink, 'type'>) {\n  return PROVIDED_TYPES.includes(link.type);\n}\n\nexport function orderLinks<T extends NameAndType>(links: T[]) {\n  const [provided, unknown] = partition<T>(links, isProvided);\n  return [\n    ...sortBy(provided, link => PROVIDED_TYPES.indexOf(link.type)),\n    ...sortBy(unknown, link => link.name && link.name.toLowerCase())\n  ];\n}\n\nexport function getLinkName(link: NameAndType) {\n  return isProvided(link) ? translate('project_links', link.type) : link.name;\n}\n", "(function(module) {\n    'use strict';\n\n    module.exports.is_uri = is_iri;\n    module.exports.is_http_uri = is_http_iri;\n    module.exports.is_https_uri = is_https_iri;\n    module.exports.is_web_uri = is_web_iri;\n    // Create aliases\n    module.exports.isUri = is_iri;\n    module.exports.isHttpUri = is_http_iri;\n    module.exports.isHttpsUri = is_https_iri;\n    module.exports.isWebUri = is_web_iri;\n\n\n    // private function\n    // internal URI spitter method - direct from RFC 3986\n    var splitUri = function(uri) {\n        var splitted = uri.match(/(?:([^:\\/?#]+):)?(?:\\/\\/([^\\/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?/);\n        return splitted;\n    };\n\n    function is_iri(value) {\n        if (!value) {\n            return;\n        }\n\n        // check for illegal characters\n        if (/[^a-z0-9\\:\\/\\?\\#\\[\\]\\@\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=\\.\\-\\_\\~\\%]/i.test(value)) return;\n\n        // check for hex escapes that aren't complete\n        if (/%[^0-9a-f]/i.test(value)) return;\n        if (/%[0-9a-f](:?[^0-9a-f]|$)/i.test(value)) return;\n\n        var splitted = [];\n        var scheme = '';\n        var authority = '';\n        var path = '';\n        var query = '';\n        var fragment = '';\n        var out = '';\n\n        // from RFC 3986\n        splitted = splitUri(value);\n        scheme = splitted[1]; \n        authority = splitted[2];\n        path = splitted[3];\n        query = splitted[4];\n        fragment = splitted[5];\n\n        // scheme and path are required, though the path can be empty\n        if (!(scheme && scheme.length && path.length >= 0)) return;\n\n        // if authority is present, the path must be empty or begin with a /\n        if (authority && authority.length) {\n            if (!(path.length === 0 || /^\\//.test(path))) return;\n        } else {\n            // if authority is not present, the path must not start with //\n            if (/^\\/\\//.test(path)) return;\n        }\n\n        // scheme must begin with a letter, then consist of letters, digits, +, ., or -\n        if (!/^[a-z][a-z0-9\\+\\-\\.]*$/.test(scheme.toLowerCase()))  return;\n\n        // re-assemble the URL per section 5.3 in RFC 3986\n        out += scheme + ':';\n        if (authority && authority.length) {\n            out += '//' + authority;\n        }\n\n        out += path;\n\n        if (query && query.length) {\n            out += '?' + query;\n        }\n\n        if (fragment && fragment.length) {\n            out += '#' + fragment;\n        }\n\n        return out;\n    }\n\n    function is_http_iri(value, allowHttps) {\n        if (!is_iri(value)) {\n            return;\n        }\n\n        var splitted = [];\n        var scheme = '';\n        var authority = '';\n        var path = '';\n        var port = '';\n        var query = '';\n        var fragment = '';\n        var out = '';\n\n        // from RFC 3986\n        splitted = splitUri(value);\n        scheme = splitted[1]; \n        authority = splitted[2];\n        path = splitted[3];\n        query = splitted[4];\n        fragment = splitted[5];\n\n        if (!scheme)  return;\n\n        if(allowHttps) {\n            if (scheme.toLowerCase() != 'https') return;\n        } else {\n            if (scheme.toLowerCase() != 'http') return;\n        }\n\n        // fully-qualified URIs must have an authority section that is\n        // a valid host\n        if (!authority) {\n            return;\n        }\n\n        // enable port component\n        if (/:(\\d+)$/.test(authority)) {\n            port = authority.match(/:(\\d+)$/)[0];\n            authority = authority.replace(/:\\d+$/, '');\n        }\n\n        out += scheme + ':';\n        out += '//' + authority;\n        \n        if (port) {\n            out += port;\n        }\n        \n        out += path;\n        \n        if(query && query.length){\n            out += '?' + query;\n        }\n\n        if(fragment && fragment.length){\n            out += '#' + fragment;\n        }\n        \n        return out;\n    }\n\n    function is_https_iri(value) {\n        return is_http_iri(value, true);\n    }\n\n    function is_web_iri(value) {\n        return (is_http_iri(value) || is_https_iri(value));\n    }\n\n})(module);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isWebUri } from 'valid-url';\n\nexport default function(url: string): boolean {\n  return /^(\\/|scm:)/.test(url) || !!isWebUri(url);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ClearButton } from '../../../../../../components/controls/buttons';\nimport ProjectLinkIcon from '../../../../../../components/icons/ProjectLinkIcon';\nimport { getLinkName } from '../../../../../../helpers/projectLinks';\nimport isValidUri from '../../../../../utils/isValidUri';\n\ninterface Props {\n  iconOnly?: boolean;\n  link: T.ProjectLink;\n}\n\ninterface State {\n  expanded: boolean;\n}\n\nexport default class MetaLink extends React.PureComponent<Props, State> {\n  state = { expanded: false };\n\n  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.setState(({ expanded }) => ({ expanded: !expanded }));\n  };\n\n  handleCollapse = () => {\n    this.setState({ expanded: false });\n  };\n\n  handleSelect = (event: React.MouseEvent<HTMLInputElement>) => {\n    event.currentTarget.select();\n  };\n\n  render() {\n    const { iconOnly, link } = this.props;\n    const linkTitle = getLinkName(link);\n    const isValid = isValidUri(link.url);\n    return (\n      <li>\n        <a\n          className=\"link-with-icon\"\n          href={isValid ? link.url : undefined}\n          onClick={isValid ? undefined : this.handleClick}\n          rel=\"nofollow noreferrer noopener\"\n          target=\"_blank\"\n          title={linkTitle}>\n          <ProjectLinkIcon className=\"little-spacer-right\" type={link.type} />\n          {!iconOnly && linkTitle}\n        </a>\n        {this.state.expanded && (\n          <div className=\"little-spacer-top display-flex-center\">\n            <input\n              className=\"overview-key width-80\"\n              onClick={this.handleSelect}\n              readOnly={true}\n              type=\"text\"\n              value={link.url}\n            />\n            <ClearButton className=\"little-spacer-left\" onClick={this.handleCollapse} />\n          </div>\n        )}\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { formatMeasure } from '../../helpers/measures';\nimport './Level.css';\n\nexport interface LevelProps {\n  'aria-label'?: string;\n  'aria-labelledby'?: string;\n  className?: string;\n  level: string;\n  small?: boolean;\n  muted?: boolean;\n}\n\nexport default function Level(props: LevelProps) {\n  const formatted = formatMeasure(props.level, 'LEVEL');\n  const className = classNames(props.className, 'level', 'level-' + props.level, {\n    'level-small': props.small,\n    'level-muted': props.muted\n  });\n\n  return (\n    <span\n      aria-label={props['aria-label']}\n      aria-labelledby={props['aria-labelledby']}\n      className={className}>\n      {formatted}\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport MetaLink from '../../../app/components/nav/component/projectInformation/meta/MetaLink';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport Level from '../../../components/ui/Level';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { orderLinks } from '../../../helpers/projectLinks';\nimport { getProjectUrl } from '../../../helpers/urls';\n\ninterface Props {\n  project: T.MyProject;\n}\n\nexport default function ProjectCard({ project }: Props) {\n  const { links } = project;\n\n  const orderedLinks: T.ProjectLink[] = orderLinks(\n    links.map((link, i) => {\n      const { href, name, type } = link;\n      return {\n        id: `link-${i}`,\n        name,\n        type,\n        url: href\n      };\n    })\n  );\n\n  const { lastAnalysisDate } = project;\n\n  return (\n    <div className=\"account-project-card clearfix\">\n      <aside className=\"account-project-side\">\n        {lastAnalysisDate !== undefined ? (\n          <div className=\"account-project-analysis\">\n            <DateFromNow date={lastAnalysisDate}>\n              {fromNow => translateWithParameters('my_account.projects.analyzed_x', fromNow)}\n            </DateFromNow>\n          </div>\n        ) : (\n          <div className=\"account-project-analysis\">\n            {translate('my_account.projects.never_analyzed')}\n          </div>\n        )}\n\n        {project.qualityGate !== undefined && (\n          <div className=\"account-project-quality-gate\">\n            {project.qualityGate === 'WARN' && (\n              <HelpTooltip\n                className=\"little-spacer-right\"\n                overlay={translate('quality_gates.conditions.warning.tooltip')}\n              />\n            )}\n            <Level aria-label={translate('quality_gates.status')} level={project.qualityGate} />\n          </div>\n        )}\n      </aside>\n\n      <h3 className=\"account-project-name\">\n        <Link to={getProjectUrl(project.key)}>{project.name}</Link>\n      </h3>\n\n      {orderedLinks.length > 0 && (\n        <div className=\"account-project-links\">\n          <ul className=\"list-inline\">\n            {orderedLinks.map(link => (\n              <MetaLink iconOnly={true} key={link.id} link={link} />\n            ))}\n          </ul>\n        </div>\n      )}\n\n      <div className=\"account-project-key\">{project.key}</div>\n\n      {!!project.description && (\n        <div className=\"account-project-description\">{project.description}</div>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport { translate } from '../../../helpers/l10n';\nimport ProjectCard from './ProjectCard';\n\ninterface Props {\n  loading: boolean;\n  loadMore: () => void;\n  projects: T.MyProject[];\n  total?: number;\n}\n\nexport default function Projects(props: Props) {\n  const { projects } = props;\n\n  return (\n    <div id=\"account-projects\">\n      {projects.length === 0 ? (\n        <div className=\"js-no-results\">{translate('my_account.projects.no_results')}</div>\n      ) : (\n        <p>{translate('my_account.projects.description')}</p>\n      )}\n\n      {projects.length > 0 && (\n        <ul className=\"account-projects-list\">\n          {projects.map(project => (\n            <li key={project.key}>\n              <ProjectCard project={project} />\n            </li>\n          ))}\n        </ul>\n      )}\n\n      {projects.length > 0 && (\n        <ListFooter\n          count={projects.length}\n          loadMore={props.loadMore}\n          ready={!props.loading}\n          total={props.total || 0}\n        />\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { getMyProjects } from '../../../api/components';\nimport { translate } from '../../../helpers/l10n';\nimport Projects from './Projects';\n\ninterface State {\n  loading: boolean;\n  page: number;\n  projects?: T.MyProject[];\n  total?: number;\n}\n\nexport default class ProjectsContainer extends React.PureComponent<{}, State> {\n  mounted = false;\n  state: State = { loading: true, page: 1 };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadProjects();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadProjects(page = this.state.page) {\n    this.setState({ loading: true });\n    const data = { p: page, ps: 100 };\n    return getMyProjects(data).then(({ paging, projects }) => {\n      this.setState(state => ({\n        projects: page > 1 ? [...(state.projects || []), ...projects] : projects,\n        loading: false,\n        page: paging.pageIndex,\n        total: paging.total\n      }));\n    });\n  }\n\n  loadMore = () => {\n    this.loadProjects(this.state.page + 1);\n  };\n\n  render() {\n    const helmet = <Helmet title={translate('my_account.projects')} />;\n\n    if (this.state.projects == null) {\n      return (\n        <div className=\"text-center\">\n          {helmet}\n          <i className=\"spinner spacer\" />\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"account-body account-container\">\n        {helmet}\n        <Projects\n          loadMore={this.loadMore}\n          loading={this.state.loading}\n          projects={this.state.projects}\n          total={this.state.total}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post } from '../helpers/request';\n\nexport function getNotifications(): Promise<{\n  channels: string[];\n  globalTypes: string[];\n  notifications: T.Notification[];\n  perProjectTypes: string[];\n}> {\n  return getJSON('/api/notifications/list').catch(throwGlobalError);\n}\n\nexport function addNotification(data: { channel: string; type: string; project?: string }) {\n  return post('/api/notifications/add', data).catch(throwGlobalError);\n}\n\nexport function removeNotification(data: { channel: string; type: string; project?: string }) {\n  return post('/api/notifications/remove', data).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniqWith } from 'lodash';\nimport * as React from 'react';\nimport { addNotification, getNotifications, removeNotification } from '../../api/notifications';\nimport { getWrappedDisplayName } from './utils';\n\ninterface State {\n  channels: string[];\n  globalTypes: string[];\n  loading: boolean;\n  notifications: T.Notification[];\n  perProjectTypes: string[];\n}\n\nexport interface WithNotificationsProps {\n  addNotification: (added: T.Notification) => void;\n  channels: string[];\n  globalTypes: string[];\n  loading: boolean;\n  notifications: T.Notification[];\n  perProjectTypes: string[];\n  removeNotification: (removed: T.Notification) => void;\n}\n\nexport function withNotifications<P>(\n  WrappedComponent: React.ComponentType<P & WithNotificationsProps>\n) {\n  class Wrapper extends React.Component<P, State> {\n    mounted = false;\n    static displayName = getWrappedDisplayName(WrappedComponent, 'withNotifications');\n\n    state: State = {\n      channels: [],\n      globalTypes: [],\n      loading: true,\n      notifications: [],\n      perProjectTypes: []\n    };\n\n    componentDidMount() {\n      this.mounted = true;\n      this.fetchNotifications();\n    }\n\n    componentWillUnmount() {\n      this.mounted = false;\n    }\n\n    fetchNotifications = () => {\n      getNotifications().then(\n        response => {\n          if (this.mounted) {\n            this.setState({\n              channels: response.channels,\n              globalTypes: response.globalTypes,\n              loading: false,\n              notifications: response.notifications,\n              perProjectTypes: response.perProjectTypes\n            });\n          }\n        },\n        () => {\n          if (this.mounted) {\n            this.setState({ loading: false });\n          }\n        }\n      );\n    };\n\n    addNotificationToState = (added: T.Notification) => {\n      this.setState(state => {\n        const notifications = uniqWith([...state.notifications, added], this.areNotificationsEqual);\n        return { notifications };\n      });\n    };\n\n    removeNotificationFromState = (removed: T.Notification) => {\n      this.setState(state => {\n        const notifications = state.notifications.filter(\n          notification => !this.areNotificationsEqual(notification, removed)\n        );\n        return { notifications };\n      });\n    };\n\n    addNotification = (added: T.Notification) => {\n      // optimistic update\n      this.addNotificationToState(added);\n\n      // recreate `data` to omit `projectName` and `organization` from `Notification`\n      const data = { channel: added.channel, project: added.project, type: added.type };\n      addNotification(data).catch(() => {\n        this.removeNotificationFromState(added);\n      });\n    };\n\n    removeNotification = (removed: T.Notification) => {\n      // optimistic update\n      this.removeNotificationFromState(removed);\n\n      // recreate `data` to omit `projectName` and `organization` from `Notification`\n      const data = { channel: removed.channel, project: removed.project, type: removed.type };\n      removeNotification(data).catch(() => {\n        this.addNotificationToState(removed);\n      });\n    };\n\n    areNotificationsEqual = (a: T.Notification, b: T.Notification) => {\n      return a.channel === b.channel && a.type === b.type && a.project === b.project;\n    };\n\n    render() {\n      const { channels, globalTypes, loading, notifications, perProjectTypes } = this.state;\n      return (\n        <WrappedComponent\n          {...this.props}\n          addNotification={this.addNotification}\n          channels={channels}\n          globalTypes={globalTypes}\n          loading={loading}\n          notifications={notifications}\n          perProjectTypes={perProjectTypes}\n          removeNotification={this.removeNotification}\n        />\n      );\n    }\n  }\n\n  return Wrapper;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\n/* eslint-disable jsx-a11y/anchor-has-content */\n/* eslint-disable jsx-a11y/control-has-associated-label */\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport DeferredSpinner from '../ui/DeferredSpinner';\nimport './Checkbox.css';\n\ninterface Props {\n  checked: boolean;\n  disabled?: boolean;\n  children?: React.ReactNode;\n  className?: string;\n  id?: string;\n  loading?: boolean;\n  onCheck: (checked: boolean, id?: string) => void;\n  right?: boolean;\n  thirdState?: boolean;\n  title?: string;\n}\n\nexport default class Checkbox extends React.PureComponent<Props> {\n  static defaultProps = {\n    thirdState: false\n  };\n\n  handleClick = (event: React.SyntheticEvent<HTMLElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    if (!this.props.disabled) {\n      this.props.onCheck(!this.props.checked, this.props.id);\n    }\n  };\n\n  render() {\n    const { checked, children, disabled, id, loading, right, thirdState, title } = this.props;\n    const className = classNames('icon-checkbox', {\n      'icon-checkbox-checked': checked,\n      'icon-checkbox-single': thirdState,\n      'icon-checkbox-disabled': disabled\n    });\n\n    if (children) {\n      return (\n        <a\n          aria-checked={checked}\n          className={classNames('link-checkbox', this.props.className, {\n            note: disabled,\n            disabled\n          })}\n          href=\"#\"\n          id={id}\n          onClick={this.handleClick}\n          role=\"checkbox\"\n          title={title}>\n          {right && children}\n          <DeferredSpinner loading={Boolean(loading)}>\n            <i className={className} />\n          </DeferredSpinner>\n          {!right && children}\n        </a>\n      );\n    }\n\n    if (loading) {\n      return <DeferredSpinner />;\n    }\n\n    return (\n      <a\n        aria-checked={checked}\n        className={classNames(className, this.props.className)}\n        href=\"#\"\n        id={id}\n        onClick={this.handleClick}\n        role=\"checkbox\"\n        title={title}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport { hasMessage, translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onAdd: (n: T.Notification) => void;\n  onRemove: (n: T.Notification) => void;\n  channels: string[];\n  checkboxId: (type: string, channel: string) => string;\n  project?: boolean;\n  types: string[];\n  notifications: T.Notification[];\n}\n\nexport default class NotificationsList extends React.PureComponent<Props> {\n  isEnabled(type: string, channel: string) {\n    return !!this.props.notifications.find(\n      notification => notification.type === type && notification.channel === channel\n    );\n  }\n\n  handleCheck(type: string, channel: string, checked: boolean) {\n    if (checked) {\n      this.props.onAdd({ type, channel });\n    } else {\n      this.props.onRemove({ type, channel });\n    }\n  }\n\n  getDispatcherLabel(dispatcher: string) {\n    const globalMessageKey = ['notification.dispatcher', dispatcher];\n    const projectMessageKey = [...globalMessageKey, 'project'];\n    const shouldUseProjectMessage = this.props.project && hasMessage(...projectMessageKey);\n    return shouldUseProjectMessage\n      ? translate(...projectMessageKey)\n      : translate(...globalMessageKey);\n  }\n\n  render() {\n    const { channels, checkboxId, types } = this.props;\n\n    return (\n      <tbody>\n        {types.map(type => (\n          <tr key={type}>\n            <td>{this.getDispatcherLabel(type)}</td>\n            {channels.map(channel => (\n              <td className=\"text-center\" key={channel}>\n                <Checkbox\n                  checked={this.isEnabled(type, channel)}\n                  id={checkboxId(type, channel)}\n                  onCheck={checked => this.handleCheck(type, channel, checked)}\n                />\n              </td>\n            ))}\n          </tr>\n        ))}\n      </tbody>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport { translate } from '../../../helpers/l10n';\nimport { getCurrentUserSetting, Store } from '../../../store/rootReducer';\nimport { setCurrentUserSetting } from '../../../store/users';\n\ninterface Props {\n  notificationsOptOut?: boolean;\n  setCurrentUserSetting: (setting: T.CurrentUserSetting) => void;\n}\n\nexport class SonarCloudNotifications extends React.PureComponent<Props> {\n  handleCheckOptOut = (checked: boolean) => {\n    this.props.setCurrentUserSetting({\n      key: 'notifications.optOut',\n      value: checked ? 'false' : 'true'\n    });\n  };\n\n  render() {\n    return (\n      <section className=\"boxed-group\">\n        <h2>{translate('my_profile.sonarcloud_feature_notifications.title')}</h2>\n        <div className=\"boxed-group-inner\">\n          <table className=\"data zebra\">\n            <thead>\n              <tr>\n                <th />\n                <th className=\"text-center\">\n                  <h4>{translate('activate')}</h4>\n                </th>\n              </tr>\n            </thead>\n            <tbody>\n              <tr>\n                <td>{translate('my_profile.sonarcloud_feature_notifications.description')}</td>\n                <td className=\"text-center\">\n                  <Checkbox\n                    checked={!this.props.notificationsOptOut}\n                    onCheck={this.handleCheckOptOut}\n                  />\n                </td>\n              </tr>\n            </tbody>\n          </table>\n        </div>\n      </section>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => {\n  const notificationsOptOut = getCurrentUserSetting(state, 'notifications.optOut') === 'true';\n\n  return {\n    notificationsOptOut\n  };\n};\n\nconst mapDispatchToProps = {\n  setCurrentUserSetting\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SonarCloudNotifications);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { isSonarCloud } from '../../../helpers/system';\nimport NotificationsList from './NotificationsList';\nimport SonarCloudNotifications from './SonarCloudNotifications';\n\ninterface Props {\n  addNotification: (n: T.Notification) => void;\n  channels: string[];\n  notifications: T.Notification[];\n  removeNotification: (n: T.Notification) => void;\n  types: string[];\n}\n\nexport default function GlobalNotifications(props: Props) {\n  return (\n    <>\n      <section className=\"boxed-group\">\n        <h2>{translate('my_profile.overall_notifications.title')}</h2>\n\n        <div className=\"boxed-group-inner\">\n          <table className=\"data zebra\">\n            <thead>\n              <tr>\n                <th />\n                {props.channels.map(channel => (\n                  <th className=\"text-center\" key={channel}>\n                    <h4>{translate('notification.channel', channel)}</h4>\n                  </th>\n                ))}\n              </tr>\n            </thead>\n\n            <NotificationsList\n              channels={props.channels}\n              checkboxId={getCheckboxId}\n              notifications={props.notifications}\n              onAdd={props.addNotification}\n              onRemove={props.removeNotification}\n              types={props.types}\n            />\n          </table>\n        </div>\n      </section>\n      {isSonarCloud() && <SonarCloudNotifications />}\n    </>\n  );\n}\n\nfunction getCheckboxId(type: string, channel: string) {\n  return `global-notification-${type}-${channel}`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function SearchIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M10.308 7.077c0-.89-.316-1.65-.949-2.283a3.111 3.111 0 0 0-2.282-.948c-.89 0-1.65.316-2.283.948a3.111 3.111 0 0 0-.948 2.283c0 .89.316 1.65.948 2.282a3.111 3.111 0 0 0 2.283.949c.89 0 1.65-.316 2.282-.949a3.111 3.111 0 0 0 .949-2.282zm3.692 6c0 .25-.091.466-.274.649a.887.887 0 0 1-.65.274.857.857 0 0 1-.648-.274L9.954 11.26c-.86.596-1.82.894-2.877.894a4.989 4.989 0 0 1-1.972-.4 5.076 5.076 0 0 1-1.623-1.082A5.076 5.076 0 0 1 2.4 9.049 4.989 4.989 0 0 1 2 7.077c0-.688.133-1.345.4-1.972a5.076 5.076 0 0 1 1.082-1.623A5.076 5.076 0 0 1 5.105 2.4 4.989 4.989 0 0 1 7.077 2c.687 0 1.345.133 1.972.4a5.076 5.076 0 0 1 1.623 1.082c.454.454.815.995 1.082 1.623.266.627.4 1.284.4 1.972a4.938 4.938 0 0 1-.894 2.877l2.473 2.474a.883.883 0 0 1 .267.649z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { Cancelable, debounce } from 'lodash';\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport SearchIcon from '../icons/SearchIcon';\nimport DeferredSpinner from '../ui/DeferredSpinner';\nimport { ClearButton } from './buttons';\nimport './SearchBox.css';\n\ninterface Props {\n  autoFocus?: boolean;\n  className?: string;\n  id?: string;\n  innerRef?: (node: HTMLInputElement | null) => void;\n  loading?: boolean;\n  maxLength?: number;\n  minLength?: number;\n  onChange: (value: string) => void;\n  onClick?: React.MouseEventHandler<HTMLInputElement>;\n  onFocus?: React.FocusEventHandler<HTMLInputElement>;\n  onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;\n  placeholder: string;\n  value?: string;\n}\n\ninterface State {\n  value: string;\n}\n\nconst DEFAULT_MAX_LENGTH = 100;\n\nexport default class SearchBox extends React.PureComponent<Props, State> {\n  debouncedOnChange: ((query: string) => void) & Cancelable;\n  input?: HTMLInputElement | null;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = { value: props.value || '' };\n    this.debouncedOnChange = debounce(this.props.onChange, 250);\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      // input is controlled\n      this.props.value !== undefined &&\n      // parent is aware of last change\n      // can happen when previous value was less than min length\n      this.state.value === prevProps.value &&\n      this.state.value !== this.props.value\n    ) {\n      this.setState({ value: this.props.value });\n    }\n  }\n\n  changeValue = (value: string, debounced = true) => {\n    const { minLength } = this.props;\n    if (value.length === 0) {\n      // immediately notify when value is empty\n      this.props.onChange('');\n      // and cancel scheduled callback\n      this.debouncedOnChange.cancel();\n    } else if (!minLength || minLength <= value.length) {\n      if (debounced) {\n        this.debouncedOnChange(value);\n      } else {\n        this.props.onChange(value);\n      }\n    }\n  };\n\n  handleInputChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n    const { value } = event.currentTarget;\n    this.setState({ value });\n    this.changeValue(value);\n  };\n\n  handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n    if (event.keyCode === 27) {\n      // escape\n      event.preventDefault();\n      this.handleResetClick();\n    }\n    if (this.props.onKeyDown) {\n      this.props.onKeyDown(event);\n    }\n  };\n\n  handleResetClick = () => {\n    this.changeValue('', false);\n    if (this.props.value === undefined || this.props.value === '') {\n      this.setState({ value: '' });\n    }\n    if (this.input) {\n      this.input.focus();\n    }\n  };\n\n  ref = (node: HTMLInputElement | null) => {\n    this.input = node;\n    if (this.props.innerRef) {\n      this.props.innerRef(node);\n    }\n  };\n\n  render() {\n    const { loading, minLength, maxLength = DEFAULT_MAX_LENGTH } = this.props;\n    const { value } = this.state;\n\n    const inputClassName = classNames('search-box-input', {\n      touched: value.length > 0 && (!minLength || minLength > value.length)\n    });\n\n    const tooShort = minLength !== undefined && value.length > 0 && value.length < minLength;\n\n    return (\n      <div\n        className={classNames('search-box', this.props.className)}\n        id={this.props.id}\n        title={\n          tooShort && minLength !== undefined\n            ? translateWithParameters('select2.tooShort', minLength)\n            : ''\n        }>\n        <input\n          aria-label={translate('search_verb')}\n          autoComplete=\"off\"\n          autoFocus={this.props.autoFocus}\n          className={inputClassName}\n          maxLength={maxLength}\n          onChange={this.handleInputChange}\n          onClick={this.props.onClick}\n          onFocus={this.props.onFocus}\n          onKeyDown={this.handleInputKeyDown}\n          placeholder={this.props.placeholder}\n          ref={this.ref}\n          type=\"search\"\n          value={value}\n        />\n\n        <DeferredSpinner loading={loading !== undefined ? loading : false}>\n          <SearchIcon className=\"search-box-magnifier\" />\n        </DeferredSpinner>\n\n        {value && (\n          <ClearButton\n            aria-label={translate('clear')}\n            className=\"button-tiny search-box-clear\"\n            iconProps={{ size: 12 }}\n            onClick={this.handleResetClick}\n          />\n        )}\n\n        {tooShort && minLength !== undefined && (\n          <span className=\"search-box-note\">\n            {translateWithParameters('select2.tooShort', minLength)}\n          </span>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\n/* eslint-disable prefer-destructuring */\n\nimport classNames from 'classnames';\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport { createPortal, findDOMNode } from 'react-dom';\nimport ClickEventBoundary from '../controls/ClickEventBoundary';\nimport ScreenPositionFixer from '../controls/ScreenPositionFixer';\nimport './popups.css';\n\n/**\n * Positioning rules:\n * - Bottom = below the block, horizontally centered\n * - BottomLeft = below the block, horizontally left-aligned\n * - BottomRight = below the block, horizontally right-aligned\n * - LeftTop = on the left-side of the block, vertically top-aligned\n * - RightTop = on the right-side of the block, vertically top-aligned\n * - RightBottom = on the right-side of the block, vetically bottom-aligned\n * - TopLeft = above the block, horizontally left-aligned\n */\nexport enum PopupPlacement {\n  Bottom = 'bottom',\n  BottomLeft = 'bottom-left',\n  BottomRight = 'bottom-right',\n  LeftTop = 'left-top',\n  RightTop = 'right-top',\n  RightBottom = 'right-bottom',\n  TopLeft = 'top-left'\n}\n\ninterface PopupProps {\n  arrowStyle?: React.CSSProperties;\n  children?: React.ReactNode;\n  className?: string;\n  noPadding?: boolean;\n  placement?: PopupPlacement;\n  style?: React.CSSProperties;\n}\n\nfunction PopupBase(props: PopupProps, ref: React.Ref<HTMLDivElement>) {\n  const { placement = PopupPlacement.Bottom } = props;\n  return (\n    <ClickEventBoundary>\n      <div\n        className={classNames(\n          'popup',\n          `is-${placement}`,\n          { 'no-padding': props.noPadding },\n          props.className\n        )}\n        ref={ref || React.createRef()}\n        style={props.style}>\n        {props.children}\n        <PopupArrow style={props.arrowStyle} />\n      </div>\n    </ClickEventBoundary>\n  );\n}\n\nconst PopupWithRef = React.forwardRef(PopupBase);\nPopupWithRef.displayName = 'Popup';\n\nexport const Popup = PopupWithRef;\n\ninterface PopupArrowProps {\n  style?: React.CSSProperties;\n}\n\nexport function PopupArrow(props: PopupArrowProps) {\n  return <div className=\"popup-arrow\" style={props.style} />;\n}\n\ninterface PortalPopupProps extends Omit<PopupProps, 'arrowStyle' | 'style'> {\n  arrowOffset?: number;\n  children: React.ReactNode;\n  overlay: React.ReactNode;\n}\n\ninterface Measurements {\n  height: number;\n  left: number;\n  top: number;\n  width: number;\n}\n\ntype State = Partial<Measurements>;\n\nfunction isMeasured(state: State): state is Measurements {\n  return state.height !== undefined;\n}\n\nexport class PortalPopup extends React.Component<PortalPopupProps, State> {\n  mounted = false;\n  popupNode = React.createRef<HTMLDivElement>();\n  throttledPositionTooltip: () => void;\n\n  constructor(props: PortalPopupProps) {\n    super(props);\n    this.state = {};\n    this.throttledPositionTooltip = throttle(this.positionPopup, 10);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.positionPopup();\n    this.addEventListeners();\n  }\n\n  componentDidUpdate(prevProps: PortalPopupProps) {\n    if (this.props.placement !== prevProps.placement || this.props.overlay !== prevProps.overlay) {\n      this.positionPopup();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    this.removeEventListeners();\n  }\n\n  addEventListeners = () => {\n    window.addEventListener('resize', this.throttledPositionTooltip);\n    window.addEventListener('scroll', this.throttledPositionTooltip);\n  };\n\n  removeEventListeners = () => {\n    window.removeEventListener('resize', this.throttledPositionTooltip);\n    window.removeEventListener('scroll', this.throttledPositionTooltip);\n  };\n\n  getPlacement = (): PopupPlacement => {\n    return this.props.placement || PopupPlacement.Bottom;\n  };\n\n  adjustArrowPosition = (\n    placement: PopupPlacement,\n    { leftFix, topFix }: { leftFix: number; topFix: number }\n  ) => {\n    const { arrowOffset = 0 } = this.props;\n    switch (placement) {\n      case PopupPlacement.Bottom:\n      case PopupPlacement.BottomLeft:\n      case PopupPlacement.BottomRight:\n      case PopupPlacement.TopLeft:\n        return { marginLeft: -leftFix + arrowOffset };\n      default:\n        return { marginTop: -topFix + arrowOffset };\n    }\n  };\n\n  positionPopup = () => {\n    // `findDOMNode(this)` will search for the DOM node for the current component\n    // first it will find a React.Fragment (see `render`),\n    // so it will get the DOM node of the first child, i.e. DOM node of `this.props.children`\n    // docs: https://reactjs.org/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components\n\n    // eslint-disable-next-line react/no-find-dom-node\n    const toggleNode = findDOMNode(this);\n\n    if (toggleNode && toggleNode instanceof Element && this.popupNode.current) {\n      const toggleRect = toggleNode.getBoundingClientRect();\n      const { width, height } = this.popupNode.current.getBoundingClientRect();\n      let left = 0;\n      let top = 0;\n\n      switch (this.getPlacement()) {\n        case PopupPlacement.Bottom:\n          left = toggleRect.left + toggleRect.width / 2 - width / 2;\n          top = toggleRect.top + toggleRect.height;\n          break;\n        case PopupPlacement.BottomLeft:\n          left = toggleRect.left;\n          top = toggleRect.top + toggleRect.height;\n          break;\n        case PopupPlacement.BottomRight:\n          left = toggleRect.left + toggleRect.width - width;\n          top = toggleRect.top + toggleRect.height;\n          break;\n        case PopupPlacement.LeftTop:\n          left = toggleRect.left - width;\n          top = toggleRect.top;\n          break;\n        case PopupPlacement.RightTop:\n          left = toggleRect.left + toggleRect.width;\n          top = toggleRect.top;\n          break;\n        case PopupPlacement.RightBottom:\n          left = toggleRect.left + toggleRect.width;\n          top = toggleRect.top + toggleRect.height - height;\n          break;\n        case PopupPlacement.TopLeft:\n          left = toggleRect.left;\n          top = toggleRect.top - height;\n          break;\n      }\n\n      // save width and height (and later set in `render`) to avoid resizing the popup element,\n      // when it's placed close to the window edge\n      this.setState({\n        left: window.pageXOffset + left,\n        top: window.pageYOffset + top,\n        width,\n        height\n      });\n    }\n  };\n\n  renderActual = ({ leftFix = 0, topFix = 0 }) => {\n    const { className, overlay, noPadding } = this.props;\n    const placement = this.getPlacement();\n    let arrowStyle;\n    let style;\n    if (isMeasured(this.state)) {\n      style = {\n        left: this.state.left + leftFix,\n        top: this.state.top + topFix,\n        width: this.state.width,\n        height: this.state.height\n      };\n      arrowStyle = this.adjustArrowPosition(placement, { leftFix, topFix });\n    }\n\n    return (\n      <Popup\n        arrowStyle={arrowStyle}\n        className={className}\n        noPadding={noPadding}\n        placement={placement}\n        ref={this.popupNode}\n        style={style}>\n        {overlay}\n      </Popup>\n    );\n  };\n\n  render() {\n    return (\n      <>\n        {this.props.children}\n        {this.props.overlay && (\n          <PortalWrapper>\n            <ScreenPositionFixer ready={isMeasured(this.state)}>\n              {this.renderActual}\n            </ScreenPositionFixer>\n          </PortalWrapper>\n        )}\n      </>\n    );\n  }\n}\n\nclass PortalWrapper extends React.Component {\n  el: HTMLElement;\n\n  constructor(props: {}) {\n    super(props);\n    this.el = document.createElement('div');\n    this.el.classList.add('popup-portal');\n  }\n\n  componentDidMount() {\n    document.body.appendChild(this.el);\n  }\n\n  componentWillUnmount() {\n    document.body.removeChild(this.el);\n  }\n\n  render() {\n    return createPortal(this.props.children, this.el);\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\ninterface Props {\n  children: React.ReactNode;\n  onClick: () => void;\n}\n\nexport default class DocumentClickHandler extends React.Component<Props> {\n  componentDidMount() {\n    setTimeout(() => {\n      this.addClickHandler();\n    }, 0);\n  }\n\n  componentWillUnmount() {\n    this.removeClickHandler();\n  }\n\n  addClickHandler = () => {\n    document.addEventListener('click', this.handleDocumentClick);\n  };\n\n  removeClickHandler = () => {\n    document.removeEventListener('click', this.handleDocumentClick);\n  };\n\n  handleDocumentClick = () => {\n    this.props.onClick();\n  };\n\n  render() {\n    return this.props.children;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum KeyCodes {\n  LeftArrow = 37,\n  UpArrow = 38,\n  RightArrow = 39,\n  DownArrow = 40,\n\n  Alt = 18,\n  Backspace = 8,\n  CapsLock = 20,\n  Command = 93,\n  Ctrl = 17,\n  Delete = 46,\n  End = 35,\n  Enter = 13,\n  Escape = 27,\n  Home = 36,\n  PageDown = 34,\n  PageUp = 33,\n  Shift = 16,\n  Space = 32,\n  Tab = 9,\n\n  A = 65,\n  B = 66,\n  C = 67,\n  D = 68,\n  E = 69,\n  F = 70,\n  G = 71,\n  H = 72,\n  I = 73,\n  J = 74,\n  K = 75,\n  L = 76,\n  M = 77,\n  N = 78,\n  O = 79,\n  P = 80,\n  Q = 81,\n  R = 82,\n  S = 83,\n  T = 84,\n  U = 85,\n  V = 86,\n  W = 87,\n  X = 88,\n  Y = 89,\n  Z = 90\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { KeyCodes } from '../../helpers/keycodes';\n\ninterface Props {\n  children: React.ReactNode;\n  onKeydown: () => void;\n}\n\nexport default class EscKeydownHandler extends React.Component<Props> {\n  componentDidMount() {\n    setTimeout(() => {\n      document.addEventListener('keydown', this.handleKeyDown, false);\n    }, 0);\n  }\n\n  componentWillUnmount() {\n    document.removeEventListener('keydown', this.handleKeyDown, false);\n  }\n\n  handleKeyDown = (event: KeyboardEvent) => {\n    if (event.keyCode === KeyCodes.Escape) {\n      this.props.onKeydown();\n    }\n  };\n\n  render() {\n    return this.props.children;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\n\ninterface Props {\n  children: React.ReactNode;\n  onClickOutside: () => void;\n}\n\nexport default class OutsideClickHandler extends React.Component<Props> {\n  mounted = false;\n\n  componentDidMount() {\n    this.mounted = true;\n    setTimeout(() => {\n      this.addClickHandler();\n    }, 0);\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    this.removeClickHandler();\n  }\n\n  addClickHandler = () => {\n    window.addEventListener('click', this.handleWindowClick);\n  };\n\n  removeClickHandler = () => {\n    window.removeEventListener('click', this.handleWindowClick);\n  };\n\n  handleWindowClick = (event: MouseEvent) => {\n    if (this.mounted) {\n      // eslint-disable-next-line react/no-find-dom-node\n      const node = findDOMNode(this);\n      if (!node || !node.contains(event.target as Node)) {\n        this.props.onClickOutside();\n      }\n    }\n  };\n\n  render() {\n    return this.props.children;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DocumentClickHandler from './DocumentClickHandler';\nimport EscKeydownHandler from './EscKeydownHandler';\nimport OutsideClickHandler from './OutsideClickHandler';\n\ninterface Props {\n  children?: React.ReactNode;\n  closeOnClick?: boolean;\n  closeOnClickOutside?: boolean;\n  closeOnEscape?: boolean;\n  onRequestClose: () => void;\n  open: boolean;\n  overlay: React.ReactNode;\n}\n\nexport default class Toggler extends React.Component<Props> {\n  renderOverlay() {\n    const {\n      closeOnClick = false,\n      closeOnClickOutside = true,\n      closeOnEscape = true,\n      onRequestClose,\n      overlay\n    } = this.props;\n\n    let renderedOverlay;\n    if (closeOnEscape) {\n      renderedOverlay = <EscKeydownHandler onKeydown={onRequestClose}>{overlay}</EscKeydownHandler>;\n    } else {\n      renderedOverlay = overlay;\n    }\n\n    if (closeOnClick) {\n      return (\n        <DocumentClickHandler onClick={onRequestClose}>{renderedOverlay}</DocumentClickHandler>\n      );\n    } else if (closeOnClickOutside) {\n      return (\n        <OutsideClickHandler onClickOutside={onRequestClose}>{renderedOverlay}</OutsideClickHandler>\n      );\n    }\n    return renderedOverlay;\n  }\n\n  render() {\n    return (\n      <>\n        {this.props.children}\n        {this.props.open && this.renderOverlay()}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Popup, PopupPlacement } from '../ui/popups';\nimport './Dropdown.css';\nimport ScreenPositionFixer from './ScreenPositionFixer';\nimport Toggler from './Toggler';\n\ninterface OnClickCallback {\n  (event?: React.SyntheticEvent<HTMLElement>): void;\n}\n\ninterface RenderProps {\n  closeDropdown: () => void;\n  onToggleClick: OnClickCallback;\n  open: boolean;\n}\n\ninterface Props {\n  children:\n    | ((renderProps: RenderProps) => JSX.Element)\n    | React.ReactElement<{ onClick: OnClickCallback }>;\n  className?: string;\n  closeOnClick?: boolean;\n  closeOnClickOutside?: boolean;\n  onOpen?: () => void;\n  overlay: React.ReactNode;\n  overlayPlacement?: PopupPlacement;\n  noOverlayPadding?: boolean;\n  tagName?: string;\n}\n\ninterface State {\n  open: boolean;\n}\n\nexport default class Dropdown extends React.PureComponent<Props, State> {\n  state: State = { open: false };\n\n  componentDidUpdate(_: Props, prevState: State) {\n    if (!prevState.open && this.state.open && this.props.onOpen) {\n      this.props.onOpen();\n    }\n  }\n\n  closeDropdown = () => this.setState({ open: false });\n\n  handleToggleClick = (event?: React.SyntheticEvent<HTMLElement>) => {\n    if (event) {\n      event.preventDefault();\n      event.currentTarget.blur();\n    }\n    this.setState(state => ({ open: !state.open }));\n  };\n\n  render() {\n    const a11yAttrs = {\n      'aria-expanded': String(this.state.open),\n      'aria-haspopup': 'true'\n    };\n\n    const child = React.isValidElement(this.props.children)\n      ? React.cloneElement(this.props.children, { onClick: this.handleToggleClick, ...a11yAttrs })\n      : this.props.children({\n          closeDropdown: this.closeDropdown,\n          onToggleClick: this.handleToggleClick,\n          open: this.state.open\n        });\n\n    const { closeOnClick = true, closeOnClickOutside = false } = this.props;\n\n    const toggler = (\n      <Toggler\n        closeOnClick={closeOnClick}\n        closeOnClickOutside={closeOnClickOutside}\n        onRequestClose={this.closeDropdown}\n        open={this.state.open}\n        overlay={\n          <DropdownOverlay\n            noPadding={this.props.noOverlayPadding}\n            placement={this.props.overlayPlacement}>\n            {this.props.overlay}\n          </DropdownOverlay>\n        }>\n        {child}\n      </Toggler>\n    );\n\n    return React.createElement(\n      this.props.tagName || 'div',\n      { className: classNames('dropdown', this.props.className) },\n      toggler\n    );\n  }\n}\n\ninterface OverlayProps {\n  className?: string;\n  children: React.ReactNode;\n  noPadding?: boolean;\n  placement?: PopupPlacement;\n}\n\nexport class DropdownOverlay extends React.Component<OverlayProps> {\n  get placement() {\n    return this.props.placement || PopupPlacement.Bottom;\n  }\n\n  renderPopup = (leftFix?: number, topFix?: number) => (\n    <Popup\n      arrowStyle={\n        leftFix !== undefined && topFix !== undefined\n          ? { transform: `translate(${-leftFix}px, ${-topFix}px)` }\n          : undefined\n      }\n      className={this.props.className}\n      noPadding={this.props.noPadding}\n      placement={this.placement}\n      style={\n        leftFix !== undefined && topFix !== undefined\n          ? { marginLeft: `calc(50% + ${leftFix}px)` }\n          : undefined\n      }>\n      {this.props.children}\n    </Popup>\n  );\n\n  render() {\n    if (this.placement === PopupPlacement.Bottom) {\n      return (\n        <ScreenPositionFixer>\n          {({ leftFix, topFix }) => this.renderPopup(leftFix, topFix)}\n        </ScreenPositionFixer>\n      );\n    }\n    return this.renderPopup();\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { getSuggestions } from '../../../api/components';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  addedProjects: T.NotificationProject[];\n  closeModal: VoidFunction;\n  onSubmit: (project: T.NotificationProject) => void;\n}\n\ninterface State {\n  highlighted?: T.NotificationProject;\n  loading?: boolean;\n  query?: string;\n  open?: boolean;\n  selectedProject?: T.NotificationProject;\n  suggestions?: T.NotificationProject[];\n}\n\nexport default class ProjectModal extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {};\n    this.handleSearch = debounce(this.handleSearch, 250);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleKeyDown = (event: React.KeyboardEvent) => {\n    switch (event.keyCode) {\n      case 13:\n        event.preventDefault();\n        this.handleSelectHighlighted();\n        break;\n      case 38:\n        event.preventDefault();\n        this.handleHighlightPrevious();\n        break;\n      case 40:\n        event.preventDefault();\n        this.handleHighlightNext();\n        break;\n    }\n  };\n\n  getCurrentIndex = () => {\n    const { highlighted, suggestions } = this.state;\n    return highlighted && suggestions\n      ? suggestions.findIndex(suggestion => suggestion.project === highlighted.project)\n      : -1;\n  };\n\n  highlightIndex = (index: number) => {\n    const { suggestions } = this.state;\n    if (suggestions && suggestions.length > 0) {\n      if (index < 0) {\n        index = suggestions.length - 1;\n      } else if (index >= suggestions.length) {\n        index = 0;\n      }\n      this.setState({\n        highlighted: suggestions[index]\n      });\n    }\n  };\n\n  handleHighlightPrevious = () => {\n    this.highlightIndex(this.getCurrentIndex() - 1);\n  };\n\n  handleHighlightNext = () => {\n    this.highlightIndex(this.getCurrentIndex() + 1);\n  };\n\n  handleSelectHighlighted = () => {\n    const { highlighted, selectedProject } = this.state;\n    if (highlighted !== undefined) {\n      if (selectedProject !== undefined && highlighted.project === selectedProject.project) {\n        this.handleSubmit();\n      } else {\n        this.handleSelect(highlighted);\n      }\n    }\n  };\n\n  handleSearch = (query: string) => {\n    const { addedProjects } = this.props;\n\n    if (query.length < 2) {\n      this.setState({ open: false, query });\n      return Promise.resolve([]);\n    }\n\n    this.setState({ loading: true, query });\n    return getSuggestions(query).then(\n      r => {\n        if (this.mounted) {\n          let suggestions = undefined;\n          const projects = r.results.find(domain => domain.q === 'TRK');\n          if (projects && projects.items.length > 0) {\n            suggestions = projects.items\n              .filter(item => !addedProjects.find(p => p.project === item.key))\n              .map(item => ({\n                project: item.key,\n                projectName: item.name\n              }));\n          }\n          this.setState({ loading: false, open: true, suggestions });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false, open: false });\n        }\n      }\n    );\n  };\n\n  handleSelect = (selectedProject: T.NotificationProject) => {\n    this.setState({\n      open: false,\n      query: selectedProject.projectName,\n      selectedProject\n    });\n  };\n\n  handleSubmit = () => {\n    const { selectedProject } = this.state;\n    if (selectedProject) {\n      this.props.onSubmit(selectedProject);\n    }\n  };\n\n  render() {\n    const { closeModal } = this.props;\n    const { highlighted, loading, query, open, selectedProject, suggestions } = this.state;\n    const header = translate('my_account.set_notifications_for.title');\n    return (\n      <SimpleModal header={header} onClose={closeModal} onSubmit={this.handleSubmit}>\n        {({ onCloseClick, onFormSubmit }) => (\n          <form onSubmit={onFormSubmit}>\n            <header className=\"modal-head\">\n              <h2>{header}</h2>\n            </header>\n            <div className=\"modal-body\">\n              <div className=\"modal-field abs-width-400\">\n                <label>{translate('my_account.set_notifications_for')}</label>\n                <SearchBox\n                  autoFocus={true}\n                  onChange={this.handleSearch}\n                  onKeyDown={this.handleKeyDown}\n                  placeholder={translate('search.placeholder')}\n                  value={query}\n                />\n\n                {loading && <i className=\"spinner spacer-left\" />}\n\n                {!loading && open && (\n                  <div className=\"position-relative\">\n                    <DropdownOverlay className=\"abs-width-400\" noPadding={true}>\n                      {suggestions && suggestions.length > 0 ? (\n                        <ul className=\"notifications-add-project-search-results\">\n                          {suggestions.map(suggestion => (\n                            <li\n                              className={classNames({\n                                active: highlighted && highlighted.project === suggestion.project\n                              })}\n                              key={suggestion.project}\n                              onClick={() => this.handleSelect(suggestion)}>\n                              {suggestion.projectName}\n                            </li>\n                          ))}\n                        </ul>\n                      ) : (\n                        <div className=\"notifications-add-project-no-search-results\">\n                          {translate('no_results')}\n                        </div>\n                      )}\n                    </DropdownOverlay>\n                  </div>\n                )}\n              </div>\n            </div>\n            <footer className=\"modal-foot\">\n              <div>\n                <SubmitButton disabled={selectedProject === undefined}>\n                  {translate('add_verb')}\n                </SubmitButton>\n                <ResetButtonLink onClick={onCloseClick}>{translate('cancel')}</ResetButtonLink>\n              </div>\n            </footer>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ChevronDownIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M7.72 11.596L3.119 6.992A.382.382 0 0 1 3 6.713c0-.108.04-.2.118-.279l1.03-1.03a.382.382 0 0 1 .278-.117c.108 0 .201.04.28.117L8 8.7l3.294-3.295a.382.382 0 0 1 .28-.117c.108 0 .2.04.279.117l1.03 1.03a.382.382 0 0 1 .117.28c0 .107-.04.2-.118.278L8.28 11.596a.382.382 0 0 1-.279.117.382.382 0 0 1-.28-.117z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ChevronDownIcon from './ChevronDownIcon';\nimport ChevronRightIcon from './ChevronRightIcon';\nimport { IconProps } from './Icon';\n\ninterface Props extends IconProps {\n  open: boolean;\n}\n\nexport default function OpenCloseIcon({ open, ...iconProps }: Props) {\n  return open ? <ChevronDownIcon {...iconProps} /> : <ChevronRightIcon {...iconProps} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport OpenCloseIcon from '../icons/OpenCloseIcon';\n\ninterface Props {\n  children: React.ReactNode;\n  className?: string;\n  data?: string;\n  onClick: (data?: string) => void;\n  open: boolean;\n  renderHeader?: () => React.ReactNode;\n  title: React.ReactNode;\n}\n\ninterface State {\n  hoveringInner: boolean;\n}\n\nexport default class BoxedGroupAccordion extends React.PureComponent<Props, State> {\n  state: State = { hoveringInner: false };\n\n  handleClick = () => {\n    this.props.onClick(this.props.data);\n  };\n\n  onDetailEnter = () => {\n    this.setState({ hoveringInner: true });\n  };\n\n  onDetailLeave = () => {\n    this.setState({ hoveringInner: false });\n  };\n\n  render() {\n    const { className, open, renderHeader, title } = this.props;\n    return (\n      <div\n        className={classNames('boxed-group boxed-group-accordion', className, {\n          'no-hover': this.state.hoveringInner\n        })}>\n        <div className=\"boxed-group-header\" onClick={this.handleClick} role=\"listitem\">\n          <span className=\"boxed-group-accordion-title\">\n            <OpenCloseIcon className=\"little-spacer-right\" open={open} />\n            {title}\n          </span>\n          {renderHeader && renderHeader()}\n        </div>\n        {open && (\n          <div\n            className=\"boxed-group-inner\"\n            onMouseEnter={this.onDetailEnter}\n            onMouseLeave={this.onDetailLeave}>\n            {this.props.children}\n          </div>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion';\nimport { translate } from '../../../helpers/l10n';\nimport NotificationsList from './NotificationsList';\n\ninterface Props {\n  addNotification: (n: T.Notification) => void;\n  channels: string[];\n  collapsed: boolean;\n  notifications: T.Notification[];\n  project: T.NotificationProject;\n  removeNotification: (n: T.Notification) => void;\n  types: string[];\n}\n\nexport default function ProjectNotifications(props: Props) {\n  const { collapsed, project, channels } = props;\n  const [isCollapsed, setCollapsed] = React.useState<boolean>(collapsed);\n\n  const getCheckboxId = (type: string, channel: string) => {\n    return `project-notification-${props.project.project}-${type}-${channel}`;\n  };\n\n  const handleAddNotification = ({ channel, type }: { channel: string; type: string }) => {\n    props.addNotification({ ...props.project, channel, type });\n  };\n\n  const handleRemoveNotification = ({ channel, type }: { channel: string; type: string }) => {\n    props.removeNotification({\n      ...props.project,\n      channel,\n      type\n    });\n  };\n\n  const toggleExpanded = () => setCollapsed(!isCollapsed);\n\n  return (\n    <BoxedGroupAccordion\n      onClick={toggleExpanded}\n      open={!isCollapsed}\n      title={<h4 className=\"display-inline-block\">{project.projectName}</h4>}>\n      <table className=\"data zebra notifications-table\" key={project.project}>\n        <thead>\n          <tr>\n            <th aria-label={translate('project')} />\n            {channels.map(channel => (\n              <th className=\"text-center\" key={channel}>\n                <h4>{translate('notification.channel', channel)}</h4>\n              </th>\n            ))}\n          </tr>\n        </thead>\n\n        <NotificationsList\n          channels={props.channels}\n          checkboxId={getCheckboxId}\n          notifications={props.notifications}\n          onAdd={handleAddNotification}\n          onRemove={handleRemoveNotification}\n          project={true}\n          types={props.types}\n        />\n      </table>\n    </BoxedGroupAccordion>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy, sortBy, uniqBy } from 'lodash';\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { translate } from '../../../helpers/l10n';\nimport ProjectModal from './ProjectModal';\nimport ProjectNotifications from './ProjectNotifications';\n\nexport interface Props {\n  addNotification: (n: T.Notification) => void;\n  channels: string[];\n  notifications: T.Notification[];\n  removeNotification: (n: T.Notification) => void;\n  types: string[];\n}\n\nconst THRESHOLD_COLLAPSED = 3;\n\ninterface State {\n  addedProjects: T.NotificationProject[];\n  search: string;\n  showModal: boolean;\n}\n\nfunction isNotificationProject(project: {\n  project?: string;\n  projectName?: string;\n}): project is T.NotificationProject {\n  return project.project !== undefined && project.projectName !== undefined;\n}\n\nexport default class Projects extends React.PureComponent<Props, State> {\n  state: State = {\n    addedProjects: [],\n    search: '',\n    showModal: false\n  };\n\n  filterSearch = (project: T.NotificationProject, search: string) => {\n    return project.projectName && project.projectName.toLowerCase().includes(search);\n  };\n\n  handleAddProject = (project: T.NotificationProject) => {\n    this.setState(state => {\n      return {\n        addedProjects: [...state.addedProjects, project]\n      };\n    });\n  };\n\n  handleSearch = (search = '') => {\n    this.setState({ search: search.toLowerCase() });\n  };\n\n  handleSubmit = (selectedProject: T.NotificationProject) => {\n    if (selectedProject) {\n      this.handleAddProject(selectedProject);\n    }\n\n    this.closeModal();\n  };\n\n  closeModal = () => {\n    this.setState({ showModal: false });\n  };\n\n  openModal = () => {\n    this.setState({ showModal: true });\n  };\n\n  removeNotification = (removed: T.Notification, allProjects: T.NotificationProject[]) => {\n    const projectToRemove = allProjects.find(p => p.project === removed.project);\n    if (projectToRemove) {\n      this.handleAddProject(projectToRemove);\n    }\n\n    this.props.removeNotification(removed);\n  };\n\n  render() {\n    const { notifications } = this.props;\n    const { addedProjects, search } = this.state;\n\n    const projects = uniqBy(notifications, project => project.project).filter(\n      isNotificationProject\n    ) as T.NotificationProject[];\n    const notificationsByProject = groupBy(notifications, n => n.project);\n    const allProjects = uniqBy([...addedProjects, ...projects], project => project.project);\n    const filteredProjects = sortBy(allProjects, 'projectName').filter(p =>\n      this.filterSearch(p, search)\n    );\n    const shouldBeCollapsed = Object.keys(notificationsByProject).length > THRESHOLD_COLLAPSED;\n\n    return (\n      <section className=\"boxed-group\" data-test=\"account__project-notifications\">\n        <div className=\"boxed-group-inner\">\n          <div className=\"page-actions\">\n            <Button onClick={this.openModal}>\n              <span data-test=\"account__add-project-notification\">\n                {translate('my_profile.per_project_notifications.add')}\n              </span>\n            </Button>\n          </div>\n\n          <h2>{translate('my_profile.per_project_notifications.title')}</h2>\n        </div>\n\n        {this.state.showModal && (\n          <ProjectModal\n            addedProjects={allProjects}\n            closeModal={this.closeModal}\n            onSubmit={this.handleSubmit}\n          />\n        )}\n\n        <div className=\"boxed-group-inner\">\n          {allProjects.length === 0 && (\n            <div className=\"note\">{translate('my_account.no_project_notifications')}</div>\n          )}\n\n          {allProjects.length > 0 && (\n            <div className=\"big-spacer-bottom\">\n              <SearchBox\n                onChange={this.handleSearch}\n                placeholder={translate('search.search_for_projects')}\n              />\n            </div>\n          )}\n\n          {filteredProjects.map(project => {\n            const collapsed = addedProjects.find(p => p.project === project.project)\n              ? false\n              : shouldBeCollapsed;\n            return (\n              <ProjectNotifications\n                addNotification={this.props.addNotification}\n                channels={this.props.channels}\n                collapsed={collapsed}\n                key={project.project}\n                notifications={notificationsByProject[project.project] || []}\n                project={project}\n                removeNotification={n => this.removeNotification(n, allProjects)}\n                types={this.props.types}\n              />\n            );\n          })}\n        </div>\n      </section>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { partition } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport {\n  withNotifications,\n  WithNotificationsProps\n} from '../../../components/hoc/withNotifications';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport GlobalNotifications from './GlobalNotifications';\nimport Projects from './Projects';\n\nexport function Notifications(props: WithNotificationsProps) {\n  const {\n    addNotification,\n    channels,\n    globalTypes,\n    loading,\n    notifications,\n    perProjectTypes,\n    removeNotification\n  } = props;\n\n  const [globalNotifications, projectNotifications] = partition(notifications, n => !n.project);\n\n  return (\n    <div className=\"account-body account-container\">\n      <Helmet defer={false} title={translate('my_account.notifications')} />\n      <Alert variant=\"info\">{translate('notification.dispatcher.information')}</Alert>\n      <DeferredSpinner loading={loading}>\n        {notifications && (\n          <>\n            <GlobalNotifications\n              addNotification={addNotification}\n              channels={channels}\n              notifications={globalNotifications}\n              removeNotification={removeNotification}\n              types={globalTypes}\n            />\n            <Projects\n              addNotification={addNotification}\n              channels={channels}\n              notifications={projectNotifications}\n              removeNotification={removeNotification}\n              types={perProjectTypes}\n            />\n          </>\n        )}\n      </DeferredSpinner>\n    </div>\n  );\n}\n\nexport default withNotifications(Notifications);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    component: lazyLoadComponent(() => import('./components/Account')),\n    childRoutes: [\n      {\n        indexRoute: { component: lazyLoadComponent(() => import('./profile/Profile')) }\n      },\n      {\n        path: 'security',\n        component: lazyLoadComponent(() => import('./components/Security'))\n      },\n      {\n        path: 'projects',\n        component: lazyLoadComponent(() => import('./projects/ProjectsContainer'))\n      },\n      {\n        path: 'notifications',\n        component: lazyLoadComponent(() => import('./notifications/Notifications'))\n      }\n    ]\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON } from '../helpers/request';\nimport { Application, ApplicationPeriod, ApplicationProject } from '../types/application';\nimport { Visibility } from '../types/component';\n\nexport function getApplicationLeak(\n  application: string,\n  branch?: string\n): Promise<ApplicationPeriod[]> {\n  return getJSON('/api/applications/show_leak', { application, branch }).then(\n    r => r.leaks,\n    throwGlobalError\n  );\n}\n\nexport function getApplicationDetails(application: string, branch?: string): Promise<Application> {\n  return getJSON('/api/applications/show', { application, branch }).then(\n    r => r.application,\n    throwGlobalError\n  );\n}\n\nexport function addApplicationBranch(data: {\n  application: string;\n  branch: string;\n  project: string[];\n  projectBranch: string[];\n}) {\n  return post('/api/applications/create_branch', data).catch(throwGlobalError);\n}\n\nexport function updateApplicationBranch(data: {\n  application: string;\n  branch: string;\n  name: string;\n  project: string[];\n  projectBranch: string[];\n}) {\n  return post('/api/applications/update_branch', data).catch(throwGlobalError);\n}\n\nexport function deleteApplicationBranch(application: string, branch: string) {\n  return post('/api/applications/delete_branch', { application, branch }).catch(throwGlobalError);\n}\n\nexport function getApplicationProjects(data: {\n  application: string;\n  p?: number;\n  ps?: number;\n  q?: string;\n  selected: string;\n}): Promise<{ paging: T.Paging; projects: ApplicationProject[] }> {\n  return getJSON('/api/applications/search_projects', data).catch(throwGlobalError);\n}\n\nexport function addProjectToApplication(application: string, project: string) {\n  return post('/api/applications/add_project', { application, project }).catch(throwGlobalError);\n}\n\nexport function removeProjectFromApplication(application: string, project: string) {\n  return post('/api/applications/remove_project', { application, project }).catch(throwGlobalError);\n}\n\nexport function refreshApplication(key: string) {\n  return post('/api/applications/refresh', { key }).catch(throwGlobalError);\n}\n\nexport function createApplication(\n  name: string,\n  description: string,\n  key: string | undefined,\n  visibility: string\n): Promise<{\n  application: {\n    description?: string;\n    key: string;\n    name: string;\n    visibility: Visibility;\n  };\n}> {\n  return postJSON('/api/applications/create', { description, key, name, visibility }).catch(\n    throwGlobalError\n  );\n}\n\nexport function deleteApplication(application: string) {\n  return post('/api/applications/delete', { application }).catch(throwGlobalError);\n}\n\nexport function editApplication(application: string, name: string, description: string) {\n  return post('/api/applications/update', { name, description, application }).catch(\n    throwGlobalError\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as globalMessages from '../../store/globalMessages';\nimport getStore from './getStore';\n\nexport default function addGlobalSuccessMessage(message: string): void {\n  const store = getStore();\n  store.dispatch(globalMessages.addGlobalSuccessMessage(message));\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nexport default function BranchIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M12.5 6.5c0-1.1-.9-2-2-2s-2 .9-2 2c0 .8.5 1.5 1.2 1.8-.3.6-.7 1.1-1.2 1.4-.9.5-1.9.5-2.5.4V4c.9-.2 1.5-1 1.5-1.9 0-1.1-.9-2-2-2s-2 .9-2 2C3.5 3 4.1 3.8 5 4v8c-.9.2-1.5 1-1.5 1.9 0 1.1.9 2 2 2s2-.9 2-2c0-.9-.6-1.7-1.5-1.9v-1c.2 0 .5.1.7.1.7 0 1.5-.1 2.2-.6.8-.5 1.4-1.2 1.7-2.1 1.1 0 1.9-.9 1.9-1.9zm-8-4.4c0-.6.4-1 1-1s1 .4 1 1-.4 1-1 1-1-.5-1-1zm2 11.9c0 .6-.4 1-1 1s-1-.4-1-1 .4-1 1-1 1 .4 1 1zm4-6.5c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\ninterface DropdownIconProps {\n  turned?: boolean;\n}\n\nexport default function DropdownIcon({\n  fill = 'currentColor',\n  size = 16,\n  turned = false,\n  ...iconProps\n}: IconProps & DropdownIconProps) {\n  return (\n    <Icon\n      height={size}\n      style={turned ? { transform: 'rotate(180deg)' } : undefined}\n      viewBox=\"0 0 7 16\"\n      width={(size / 16) * 7}\n      {...iconProps}>\n      <path\n        d=\"M7 6.469a.42.42 0 0 1-.13.307L3.808 9.84a.42.42 0 0 1-.308.13.42.42 0 0 1-.308-.13L.13 6.776A.42.42 0 0 1 0 6.47a.42.42 0 0 1 .13-.308.42.42 0 0 1 .307-.13h6.126a.42.42 0 0 1 .307.13.42.42 0 0 1 .13.308z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function SettingsIcon({\n  fill = 'currentColor',\n  size = 14,\n  ...iconProps\n}: IconProps) {\n  return (\n    <Icon size={size} viewBox=\"0 0 14 14\" {...iconProps}>\n      <g transform=\"matrix(0.0364583,0,0,0.0364583,0,-1.16667)\">\n        <path\n          d=\"M256,224C256,206.333 249.75,191.25 237.25,178.75C224.75,166.25 209.667,160 192,160C174.333,160 159.25,166.25 146.75,178.75C134.25,191.25 128,206.333 128,224C128,241.667 134.25,256.75 146.75,269.25C159.25,281.75 174.333,288 192,288C209.667,288 224.75,281.75 237.25,269.25C249.75,256.75 256,241.667 256,224ZM384,196.75L384,252.25C384,254.25 383.333,256.167 382,258C380.667,259.833 379,260.917 377,261.25L330.75,268.25C327.583,277.25 324.333,284.833 321,291C326.833,299.333 335.75,310.833 347.75,325.5C349.417,327.5 350.25,329.583 350.25,331.75C350.25,333.917 349.5,335.833 348,337.5C343.5,343.667 335.25,352.667 323.25,364.5C311.25,376.333 303.417,382.25 299.75,382.25C297.75,382.25 295.583,381.5 293.25,380L258.75,353C251.417,356.833 243.833,360 236,362.5C233.333,385.167 230.917,400.667 228.75,409C227.583,413.667 224.583,416 219.75,416L164.25,416C161.917,416 159.875,415.292 158.125,413.875C156.375,412.458 155.417,410.667 155.25,408.5L148.25,362.5C140.083,359.833 132.583,356.75 125.75,353.25L90.5,380C88.833,381.5 86.75,382.25 84.25,382.25C81.917,382.25 79.833,381.333 78,379.5C57,360.5 43.25,346.5 36.75,337.5C35.583,335.833 35,333.917 35,331.75C35,329.75 35.667,327.833 37,326C39.5,322.5 43.75,316.958 49.75,309.375C55.75,301.792 60.25,295.917 63.25,291.75C58.75,283.417 55.333,275.167 53,267L7.25,260.25C5.083,259.917 3.333,258.875 2,257.125C0.667,255.375 0,253.417 0,251.25L0,195.75C0,193.75 0.667,191.833 2,190C3.333,188.167 4.917,187.083 6.75,186.75L53.25,179.75C55.583,172.083 58.833,164.417 63,156.75C56.333,147.25 47.417,135.75 36.25,122.25C34.583,120.25 33.75,118.25 33.75,116.25C33.75,114.583 34.5,112.667 36,110.5C40.333,104.5 48.542,95.542 60.625,83.625C72.708,71.708 80.583,65.75 84.25,65.75C86.417,65.75 88.583,66.583 90.75,68.25L125.25,95C132.583,91.167 140.167,88 148,85.5C150.667,62.833 153.083,47.333 155.25,39C156.417,34.333 159.417,32 164.25,32L219.75,32C222.083,32 224.125,32.708 225.875,34.125C227.625,35.542 228.583,37.333 228.75,39.5L235.75,85.5C243.917,88.167 251.417,91.25 258.25,94.75L293.75,68C295.25,66.5 297.25,65.75 299.75,65.75C301.917,65.75 304,66.583 306,68.25C327.5,88.083 341.25,102.25 347.25,110.75C348.417,112.083 349,113.917 349,116.25C349,118.25 348.333,120.167 347,122C344.5,125.5 340.25,131.042 334.25,138.625C328.25,146.208 323.75,152.083 320.75,156.25C325.083,164.583 328.5,172.75 331,180.75L376.75,187.75C378.917,188.083 380.667,189.125 382,190.875C383.333,192.625 384,194.583 384,196.75Z\"\n          style={{ fill }}\n        />\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { LocationDescriptor } from 'history';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../helpers/l10n';\nimport DropdownIcon from '../icons/DropdownIcon';\nimport SettingsIcon from '../icons/SettingsIcon';\nimport { PopupPlacement } from '../ui/popups';\nimport { Button } from './buttons';\nimport { ClipboardBase } from './clipboard';\nimport Dropdown from './Dropdown';\nimport Tooltip from './Tooltip';\n\nexport interface ActionsDropdownProps {\n  className?: string;\n  children: React.ReactNode;\n  onOpen?: () => void;\n  overlayPlacement?: PopupPlacement;\n  small?: boolean;\n  toggleClassName?: string;\n}\n\nexport default function ActionsDropdown(props: ActionsDropdownProps) {\n  const { children, className, overlayPlacement, small, toggleClassName } = props;\n  return (\n    <Dropdown\n      className={className}\n      onOpen={props.onOpen}\n      overlay={<ul className=\"menu\">{children}</ul>}\n      overlayPlacement={overlayPlacement}>\n      <Button\n        className={classNames('dropdown-toggle', toggleClassName, {\n          'button-small': small\n        })}>\n        <SettingsIcon size={small ? 12 : 14} />\n        <DropdownIcon className=\"little-spacer-left\" />\n      </Button>\n    </Dropdown>\n  );\n}\n\ninterface ItemProps {\n  className?: string;\n  children: React.ReactNode;\n  /** used to pass a string to copy to clipboard */\n  copyValue?: string;\n  destructive?: boolean;\n  /** used to pass a name of downloaded file */\n  download?: string;\n  id?: string;\n  onClick?: () => void;\n  to?: LocationDescriptor;\n}\n\nexport class ActionsDropdownItem extends React.PureComponent<ItemProps> {\n  handleClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    if (this.props.onClick) {\n      this.props.onClick();\n    }\n  };\n\n  render() {\n    const className = classNames(this.props.className, { 'text-danger': this.props.destructive });\n\n    if (this.props.download && typeof this.props.to === 'string') {\n      return (\n        <li>\n          <a\n            className={className}\n            download={this.props.download}\n            href={this.props.to}\n            id={this.props.id}>\n            {this.props.children}\n          </a>\n        </li>\n      );\n    }\n\n    if (this.props.to) {\n      return (\n        <li>\n          <Link className={className} id={this.props.id} to={this.props.to}>\n            {this.props.children}\n          </Link>\n        </li>\n      );\n    }\n\n    if (this.props.copyValue) {\n      return (\n        <ClipboardBase>\n          {({ setCopyButton, copySuccess }) => (\n            <Tooltip overlay={translate('copied_action')} visible={copySuccess}>\n              <li data-clipboard-text={this.props.copyValue} ref={setCopyButton}>\n                <a className={className} href=\"#\" id={this.props.id} onClick={this.handleClick}>\n                  {this.props.children}\n                </a>\n              </li>\n            </Tooltip>\n          )}\n        </ClipboardBase>\n      );\n    }\n\n    return (\n      <li>\n        <a className={className} href=\"#\" id={this.props.id} onClick={this.handleClick}>\n          {this.props.children}\n        </a>\n      </li>\n    );\n  }\n}\n\nexport function ActionsDropdownDivider() {\n  return <li className=\"divider\" />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post } from '../helpers/request';\nimport { Branch, PullRequest } from '../types/branch-like';\n\nexport function getBranches(project: string): Promise<Branch[]> {\n  return getJSON('/api/project_branches/list', { project }).then(r => r.branches, throwGlobalError);\n}\n\nexport function getPullRequests(project: string): Promise<PullRequest[]> {\n  return getJSON('/api/project_pull_requests/list', { project }).then(\n    r => r.pullRequests,\n    throwGlobalError\n  );\n}\n\nexport function deleteBranch(data: { branch: string; project: string }) {\n  return post('/api/project_branches/delete', data).catch(throwGlobalError);\n}\n\nexport function deletePullRequest(data: { project: string; pullRequest: string }) {\n  return post('/api/project_pull_requests/delete', data).catch(throwGlobalError);\n}\n\nexport function renameBranch(project: string, name: string) {\n  return post('/api/project_branches/rename', { project, name }).catch(throwGlobalError);\n}\n\nexport function excludeBranchFromPurge(projectKey: string, branchName: string, excluded: boolean) {\n  return post('/api/project_branches/set_automatic_deletion_protection', {\n    project: projectKey,\n    branch: branchName,\n    value: excluded\n  }).catch(throwGlobalError);\n}\n", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _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; };\n\nvar _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; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\nvar sizerStyle = {\n\tposition: 'absolute',\n\ttop: 0,\n\tleft: 0,\n\tvisibility: 'hidden',\n\theight: 0,\n\toverflow: 'scroll',\n\twhiteSpace: 'pre'\n};\n\nvar INPUT_PROPS_BLACKLIST = ['extraWidth', 'injectStyles', 'inputClassName', 'inputRef', 'inputStyle', 'minWidth', 'onAutosize', 'placeholderIsMinWidth'];\n\nvar cleanInputProps = function cleanInputProps(inputProps) {\n\tINPUT_PROPS_BLACKLIST.forEach(function (field) {\n\t\treturn delete inputProps[field];\n\t});\n\treturn inputProps;\n};\n\nvar copyStyles = function copyStyles(styles, node) {\n\tnode.style.fontSize = styles.fontSize;\n\tnode.style.fontFamily = styles.fontFamily;\n\tnode.style.fontWeight = styles.fontWeight;\n\tnode.style.fontStyle = styles.fontStyle;\n\tnode.style.letterSpacing = styles.letterSpacing;\n\tnode.style.textTransform = styles.textTransform;\n};\n\nvar isIE = typeof window !== 'undefined' && window.navigator ? /MSIE |Trident\\/|Edge\\//.test(window.navigator.userAgent) : false;\n\nvar generateId = function generateId() {\n\t// we only need an auto-generated ID for stylesheet injection, which is only\n\t// used for IE. so if the browser is not IE, this should return undefined.\n\treturn isIE ? '_' + Math.random().toString(36).substr(2, 12) : undefined;\n};\n\nvar AutosizeInput = function (_Component) {\n\t_inherits(AutosizeInput, _Component);\n\n\tfunction AutosizeInput(props) {\n\t\t_classCallCheck(this, AutosizeInput);\n\n\t\tvar _this = _possibleConstructorReturn(this, (AutosizeInput.__proto__ || Object.getPrototypeOf(AutosizeInput)).call(this, props));\n\n\t\t_this.inputRef = function (el) {\n\t\t\t_this.input = el;\n\t\t\tif (typeof _this.props.inputRef === 'function') {\n\t\t\t\t_this.props.inputRef(el);\n\t\t\t}\n\t\t};\n\n\t\t_this.placeHolderSizerRef = function (el) {\n\t\t\t_this.placeHolderSizer = el;\n\t\t};\n\n\t\t_this.sizerRef = function (el) {\n\t\t\t_this.sizer = el;\n\t\t};\n\n\t\t_this.state = {\n\t\t\tinputWidth: props.minWidth,\n\t\t\tinputId: props.id || generateId()\n\t\t};\n\t\treturn _this;\n\t}\n\n\t_createClass(AutosizeInput, [{\n\t\tkey: 'componentDidMount',\n\t\tvalue: function componentDidMount() {\n\t\t\tthis.mounted = true;\n\t\t\tthis.copyInputStyles();\n\t\t\tthis.updateInputWidth();\n\t\t}\n\t}, {\n\t\tkey: 'UNSAFE_componentWillReceiveProps',\n\t\tvalue: function UNSAFE_componentWillReceiveProps(nextProps) {\n\t\t\tvar id = nextProps.id;\n\n\t\t\tif (id !== this.props.id) {\n\t\t\t\tthis.setState({ inputId: id || generateId() });\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentDidUpdate',\n\t\tvalue: function componentDidUpdate(prevProps, prevState) {\n\t\t\tif (prevState.inputWidth !== this.state.inputWidth) {\n\t\t\t\tif (typeof this.props.onAutosize === 'function') {\n\t\t\t\t\tthis.props.onAutosize(this.state.inputWidth);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.updateInputWidth();\n\t\t}\n\t}, {\n\t\tkey: 'componentWillUnmount',\n\t\tvalue: function componentWillUnmount() {\n\t\t\tthis.mounted = false;\n\t\t}\n\t}, {\n\t\tkey: 'copyInputStyles',\n\t\tvalue: function copyInputStyles() {\n\t\t\tif (!this.mounted || !window.getComputedStyle) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar inputStyles = this.input && window.getComputedStyle(this.input);\n\t\t\tif (!inputStyles) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcopyStyles(inputStyles, this.sizer);\n\t\t\tif (this.placeHolderSizer) {\n\t\t\t\tcopyStyles(inputStyles, this.placeHolderSizer);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'updateInputWidth',\n\t\tvalue: function updateInputWidth() {\n\t\t\tif (!this.mounted || !this.sizer || typeof this.sizer.scrollWidth === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar newInputWidth = void 0;\n\t\t\tif (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) {\n\t\t\t\tnewInputWidth = Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2;\n\t\t\t} else {\n\t\t\t\tnewInputWidth = this.sizer.scrollWidth + 2;\n\t\t\t}\n\t\t\t// add extraWidth to the detected width. for number types, this defaults to 16 to allow for the stepper UI\n\t\t\tvar extraWidth = this.props.type === 'number' && this.props.extraWidth === undefined ? 16 : parseInt(this.props.extraWidth) || 0;\n\t\t\tnewInputWidth += extraWidth;\n\t\t\tif (newInputWidth < this.props.minWidth) {\n\t\t\t\tnewInputWidth = this.props.minWidth;\n\t\t\t}\n\t\t\tif (newInputWidth !== this.state.inputWidth) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tinputWidth: newInputWidth\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getInput',\n\t\tvalue: function getInput() {\n\t\t\treturn this.input;\n\t\t}\n\t}, {\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tthis.input.focus();\n\t\t}\n\t}, {\n\t\tkey: 'blur',\n\t\tvalue: function blur() {\n\t\t\tthis.input.blur();\n\t\t}\n\t}, {\n\t\tkey: 'select',\n\t\tvalue: function select() {\n\t\t\tthis.input.select();\n\t\t}\n\t}, {\n\t\tkey: 'renderStyles',\n\t\tvalue: function renderStyles() {\n\t\t\t// this method injects styles to hide IE's clear indicator, which messes\n\t\t\t// with input size detection. the stylesheet is only injected when the\n\t\t\t// browser is IE, and can also be disabled by the `injectStyles` prop.\n\t\t\tvar injectStyles = this.props.injectStyles;\n\n\t\t\treturn isIE && injectStyles ? _react2.default.createElement('style', { dangerouslySetInnerHTML: {\n\t\t\t\t\t__html: 'input#' + this.state.inputId + '::-ms-clear {display: none;}'\n\t\t\t\t} }) : null;\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar sizerValue = [this.props.defaultValue, this.props.value, ''].reduce(function (previousValue, currentValue) {\n\t\t\t\tif (previousValue !== null && previousValue !== undefined) {\n\t\t\t\t\treturn previousValue;\n\t\t\t\t}\n\t\t\t\treturn currentValue;\n\t\t\t});\n\n\t\t\tvar wrapperStyle = _extends({}, this.props.style);\n\t\t\tif (!wrapperStyle.display) wrapperStyle.display = 'inline-block';\n\n\t\t\tvar inputStyle = _extends({\n\t\t\t\tboxSizing: 'content-box',\n\t\t\t\twidth: this.state.inputWidth + 'px'\n\t\t\t}, this.props.inputStyle);\n\n\t\t\tvar inputProps = _objectWithoutProperties(this.props, []);\n\n\t\t\tcleanInputProps(inputProps);\n\t\t\tinputProps.className = this.props.inputClassName;\n\t\t\tinputProps.id = this.state.inputId;\n\t\t\tinputProps.style = inputStyle;\n\n\t\t\treturn _react2.default.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: this.props.className, style: wrapperStyle },\n\t\t\t\tthis.renderStyles(),\n\t\t\t\t_react2.default.createElement('input', _extends({}, inputProps, { ref: this.inputRef })),\n\t\t\t\t_react2.default.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: this.sizerRef, style: sizerStyle },\n\t\t\t\t\tsizerValue\n\t\t\t\t),\n\t\t\t\tthis.props.placeholder ? _react2.default.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: this.placeHolderSizerRef, style: sizerStyle },\n\t\t\t\t\tthis.props.placeholder\n\t\t\t\t) : null\n\t\t\t);\n\t\t}\n\t}]);\n\n\treturn AutosizeInput;\n}(_react.Component);\n\nAutosizeInput.propTypes = {\n\tclassName: _propTypes2.default.string, // className for the outer element\n\tdefaultValue: _propTypes2.default.any, // default field value\n\textraWidth: _propTypes2.default.oneOfType([// additional width for input element\n\t_propTypes2.default.number, _propTypes2.default.string]),\n\tid: _propTypes2.default.string, // id to use for the input, can be set for consistent snapshots\n\tinjectStyles: _propTypes2.default.bool, // inject the custom stylesheet to hide clear UI, defaults to true\n\tinputClassName: _propTypes2.default.string, // className for the input element\n\tinputRef: _propTypes2.default.func, // ref callback for the input element\n\tinputStyle: _propTypes2.default.object, // css styles for the input element\n\tminWidth: _propTypes2.default.oneOfType([// minimum width for input element\n\t_propTypes2.default.number, _propTypes2.default.string]),\n\tonAutosize: _propTypes2.default.func, // onAutosize handler: function(newWidth) {}\n\tonChange: _propTypes2.default.func, // onChange handler: function(event) {}\n\tplaceholder: _propTypes2.default.string, // placeholder text\n\tplaceholderIsMinWidth: _propTypes2.default.bool, // don't collapse size to less than the placeholder\n\tstyle: _propTypes2.default.object, // css styles for the outer element\n\tvalue: _propTypes2.default.any // field value\n};\nAutosizeInput.defaultProps = {\n\tminWidth: 1,\n\tinjectStyles: true\n};\n\nexports.default = AutosizeInput;", "/*!\n  Copyright (c) 2018 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "import AutosizeInput from 'react-input-autosize';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nvar arrowRenderer = function arrowRenderer(_ref) {\n\tvar onMouseDown = _ref.onMouseDown;\n\n\treturn React.createElement('span', {\n\t\tclassName: 'Select-arrow',\n\t\tonMouseDown: onMouseDown\n\t});\n};\n\narrowRenderer.propTypes = {\n\tonMouseDown: PropTypes.func\n};\n\nvar clearRenderer = function clearRenderer() {\n\treturn React.createElement('span', {\n\t\tclassName: 'Select-clear',\n\t\tdangerouslySetInnerHTML: { __html: '&times;' }\n\t});\n};\n\nvar map = [{ 'base': 'A', 'letters': /[\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F]/g }, { 'base': 'AA', 'letters': /[\\uA732]/g }, { 'base': 'AE', 'letters': /[\\u00C6\\u01FC\\u01E2]/g }, { 'base': 'AO', 'letters': /[\\uA734]/g }, { 'base': 'AU', 'letters': /[\\uA736]/g }, { 'base': 'AV', 'letters': /[\\uA738\\uA73A]/g }, { 'base': 'AY', 'letters': /[\\uA73C]/g }, { 'base': 'B', 'letters': /[\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181]/g }, { 'base': 'C', 'letters': /[\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E]/g }, { 'base': 'D', 'letters': /[\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779]/g }, { 'base': 'DZ', 'letters': /[\\u01F1\\u01C4]/g }, { 'base': 'Dz', 'letters': /[\\u01F2\\u01C5]/g }, { 'base': 'E', 'letters': /[\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E]/g }, { 'base': 'F', 'letters': /[\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B]/g }, { 'base': 'G', 'letters': /[\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E]/g }, { 'base': 'H', 'letters': /[\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D]/g }, { 'base': 'I', 'letters': /[\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197]/g }, { 'base': 'J', 'letters': /[\\u004A\\u24BF\\uFF2A\\u0134\\u0248]/g }, { 'base': 'K', 'letters': /[\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2]/g }, { 'base': 'L', 'letters': /[\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780]/g }, { 'base': 'LJ', 'letters': /[\\u01C7]/g }, { 'base': 'Lj', 'letters': /[\\u01C8]/g }, { 'base': 'M', 'letters': /[\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C]/g }, { 'base': 'N', 'letters': /[\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4]/g }, { 'base': 'NJ', 'letters': /[\\u01CA]/g }, { 'base': 'Nj', 'letters': /[\\u01CB]/g }, { 'base': 'O', 'letters': /[\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C]/g }, { 'base': 'OI', 'letters': /[\\u01A2]/g }, { 'base': 'OO', 'letters': /[\\uA74E]/g }, { 'base': 'OU', 'letters': /[\\u0222]/g }, { 'base': 'P', 'letters': /[\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754]/g }, { 'base': 'Q', 'letters': /[\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A]/g }, { 'base': 'R', 'letters': /[\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782]/g }, { 'base': 'S', 'letters': /[\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784]/g }, { 'base': 'T', 'letters': /[\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786]/g }, { 'base': 'TZ', 'letters': /[\\uA728]/g }, { 'base': 'U', 'letters': /[\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244]/g }, { 'base': 'V', 'letters': /[\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245]/g }, { 'base': 'VY', 'letters': /[\\uA760]/g }, { 'base': 'W', 'letters': /[\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72]/g }, { 'base': 'X', 'letters': /[\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C]/g }, { 'base': 'Y', 'letters': /[\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE]/g }, { 'base': 'Z', 'letters': /[\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762]/g }, { 'base': 'a', 'letters': /[\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250]/g }, { 'base': 'aa', 'letters': /[\\uA733]/g }, { 'base': 'ae', 'letters': /[\\u00E6\\u01FD\\u01E3]/g }, { 'base': 'ao', 'letters': /[\\uA735]/g }, { 'base': 'au', 'letters': /[\\uA737]/g }, { 'base': 'av', 'letters': /[\\uA739\\uA73B]/g }, { 'base': 'ay', 'letters': /[\\uA73D]/g }, { 'base': 'b', 'letters': /[\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253]/g }, { 'base': 'c', 'letters': /[\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184]/g }, { 'base': 'd', 'letters': /[\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A]/g }, { 'base': 'dz', 'letters': /[\\u01F3\\u01C6]/g }, { 'base': 'e', 'letters': /[\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD]/g }, { 'base': 'f', 'letters': /[\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C]/g }, { 'base': 'g', 'letters': /[\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F]/g }, { 'base': 'h', 'letters': /[\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265]/g }, { 'base': 'hv', 'letters': /[\\u0195]/g }, { 'base': 'i', 'letters': /[\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131]/g }, { 'base': 'j', 'letters': /[\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249]/g }, { 'base': 'k', 'letters': /[\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3]/g }, { 'base': 'l', 'letters': /[\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747]/g }, { 'base': 'lj', 'letters': /[\\u01C9]/g }, { 'base': 'm', 'letters': /[\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F]/g }, { 'base': 'n', 'letters': /[\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5]/g }, { 'base': 'nj', 'letters': /[\\u01CC]/g }, { 'base': 'o', 'letters': /[\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275]/g }, { 'base': 'oi', 'letters': /[\\u01A3]/g }, { 'base': 'ou', 'letters': /[\\u0223]/g }, { 'base': 'oo', 'letters': /[\\uA74F]/g }, { 'base': 'p', 'letters': /[\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755]/g }, { 'base': 'q', 'letters': /[\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759]/g }, { 'base': 'r', 'letters': /[\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783]/g }, { 'base': 's', 'letters': /[\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B]/g }, { 'base': 't', 'letters': /[\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787]/g }, { 'base': 'tz', 'letters': /[\\uA729]/g }, { 'base': 'u', 'letters': /[\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289]/g }, { 'base': 'v', 'letters': /[\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C]/g }, { 'base': 'vy', 'letters': /[\\uA761]/g }, { 'base': 'w', 'letters': /[\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73]/g }, { 'base': 'x', 'letters': /[\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D]/g }, { 'base': 'y', 'letters': /[\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF]/g }, { 'base': 'z', 'letters': /[\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763]/g }];\n\nvar stripDiacritics = function stripDiacritics(str) {\n\tfor (var i = 0; i < map.length; i++) {\n\t\tstr = str.replace(map[i].letters, map[i].base);\n\t}\n\treturn str;\n};\n\nvar trim = function trim(str) {\n  return str.replace(/^\\s+|\\s+$/g, '');\n};\n\nvar isValid = function isValid(value) {\n\treturn typeof value !== 'undefined' && value !== null && value !== '';\n};\n\nvar filterOptions = function filterOptions(options, filterValue, excludeOptions, props) {\n\tif (props.ignoreAccents) {\n\t\tfilterValue = stripDiacritics(filterValue);\n\t}\n\n\tif (props.ignoreCase) {\n\t\tfilterValue = filterValue.toLowerCase();\n\t}\n\n\tif (props.trimFilter) {\n\t\tfilterValue = trim(filterValue);\n\t}\n\n\tif (excludeOptions) excludeOptions = excludeOptions.map(function (i) {\n\t\treturn i[props.valueKey];\n\t});\n\n\treturn options.filter(function (option) {\n\t\tif (excludeOptions && excludeOptions.indexOf(option[props.valueKey]) > -1) return false;\n\t\tif (props.filterOption) return props.filterOption.call(undefined, option, filterValue);\n\t\tif (!filterValue) return true;\n\n\t\tvar value = option[props.valueKey];\n\t\tvar label = option[props.labelKey];\n\t\tvar hasValue = isValid(value);\n\t\tvar hasLabel = isValid(label);\n\n\t\tif (!hasValue && !hasLabel) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar valueTest = hasValue ? String(value) : null;\n\t\tvar labelTest = hasLabel ? String(label) : null;\n\n\t\tif (props.ignoreAccents) {\n\t\t\tif (valueTest && props.matchProp !== 'label') valueTest = stripDiacritics(valueTest);\n\t\t\tif (labelTest && props.matchProp !== 'value') labelTest = stripDiacritics(labelTest);\n\t\t}\n\n\t\tif (props.ignoreCase) {\n\t\t\tif (valueTest && props.matchProp !== 'label') valueTest = valueTest.toLowerCase();\n\t\t\tif (labelTest && props.matchProp !== 'value') labelTest = labelTest.toLowerCase();\n\t\t}\n\n\t\treturn props.matchPos === 'start' ? valueTest && props.matchProp !== 'label' && valueTest.substr(0, filterValue.length) === filterValue || labelTest && props.matchProp !== 'value' && labelTest.substr(0, filterValue.length) === filterValue : valueTest && props.matchProp !== 'label' && valueTest.indexOf(filterValue) >= 0 || labelTest && props.matchProp !== 'value' && labelTest.indexOf(filterValue) >= 0;\n\t});\n};\n\nvar menuRenderer = function menuRenderer(_ref) {\n\tvar focusedOption = _ref.focusedOption,\n\t    focusOption = _ref.focusOption,\n\t    inputValue = _ref.inputValue,\n\t    instancePrefix = _ref.instancePrefix,\n\t    onFocus = _ref.onFocus,\n\t    onOptionRef = _ref.onOptionRef,\n\t    onSelect = _ref.onSelect,\n\t    optionClassName = _ref.optionClassName,\n\t    optionComponent = _ref.optionComponent,\n\t    optionRenderer = _ref.optionRenderer,\n\t    options = _ref.options,\n\t    removeValue = _ref.removeValue,\n\t    selectValue = _ref.selectValue,\n\t    valueArray = _ref.valueArray,\n\t    valueKey = _ref.valueKey;\n\n\tvar Option = optionComponent;\n\n\treturn options.map(function (option, i) {\n\t\tvar isSelected = valueArray && valueArray.some(function (x) {\n\t\t\treturn x[valueKey] === option[valueKey];\n\t\t});\n\t\tvar isFocused = option === focusedOption;\n\t\tvar optionClass = classNames(optionClassName, {\n\t\t\t'Select-option': true,\n\t\t\t'is-selected': isSelected,\n\t\t\t'is-focused': isFocused,\n\t\t\t'is-disabled': option.disabled\n\t\t});\n\n\t\treturn React.createElement(\n\t\t\tOption,\n\t\t\t{\n\t\t\t\tclassName: optionClass,\n\t\t\t\tfocusOption: focusOption,\n\t\t\t\tinputValue: inputValue,\n\t\t\t\tinstancePrefix: instancePrefix,\n\t\t\t\tisDisabled: option.disabled,\n\t\t\t\tisFocused: isFocused,\n\t\t\t\tisSelected: isSelected,\n\t\t\t\tkey: 'option-' + i + '-' + option[valueKey],\n\t\t\t\tonFocus: onFocus,\n\t\t\t\tonSelect: onSelect,\n\t\t\t\toption: option,\n\t\t\t\toptionIndex: i,\n\t\t\t\tref: function ref(_ref2) {\n\t\t\t\t\tonOptionRef(_ref2, isFocused);\n\t\t\t\t},\n\t\t\t\tremoveValue: removeValue,\n\t\t\t\tselectValue: selectValue\n\t\t\t},\n\t\t\toptionRenderer(option, i, inputValue)\n\t\t);\n\t});\n};\n\nmenuRenderer.propTypes = {\n\tfocusOption: PropTypes.func,\n\tfocusedOption: PropTypes.object,\n\tinputValue: PropTypes.string,\n\tinstancePrefix: PropTypes.string,\n\tonFocus: PropTypes.func,\n\tonOptionRef: PropTypes.func,\n\tonSelect: PropTypes.func,\n\toptionClassName: PropTypes.string,\n\toptionComponent: PropTypes.func,\n\toptionRenderer: PropTypes.func,\n\toptions: PropTypes.array,\n\tremoveValue: PropTypes.func,\n\tselectValue: PropTypes.func,\n\tvalueArray: PropTypes.array,\n\tvalueKey: PropTypes.string\n};\n\nvar blockEvent = (function (event) {\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\tif (event.target.tagName !== 'A' || !('href' in event.target)) {\n\t\treturn;\n\t}\n\tif (event.target.target) {\n\t\twindow.open(event.target.href, event.target.target);\n\t} else {\n\t\twindow.location.href = event.target.href;\n\t}\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n  return typeof obj;\n} : function (obj) {\n  return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\n\n\n\n\nvar asyncGenerator = function () {\n  function AwaitValue(value) {\n    this.value = value;\n  }\n\n  function AsyncGenerator(gen) {\n    var front, back;\n\n    function send(key, arg) {\n      return new Promise(function (resolve, reject) {\n        var request = {\n          key: key,\n          arg: arg,\n          resolve: resolve,\n          reject: reject,\n          next: null\n        };\n\n        if (back) {\n          back = back.next = request;\n        } else {\n          front = back = request;\n          resume(key, arg);\n        }\n      });\n    }\n\n    function resume(key, arg) {\n      try {\n        var result = gen[key](arg);\n        var value = result.value;\n\n        if (value instanceof AwaitValue) {\n          Promise.resolve(value.value).then(function (arg) {\n            resume(\"next\", arg);\n          }, function (arg) {\n            resume(\"throw\", arg);\n          });\n        } else {\n          settle(result.done ? \"return\" : \"normal\", result.value);\n        }\n      } catch (err) {\n        settle(\"throw\", err);\n      }\n    }\n\n    function settle(type, value) {\n      switch (type) {\n        case \"return\":\n          front.resolve({\n            value: value,\n            done: true\n          });\n          break;\n\n        case \"throw\":\n          front.reject(value);\n          break;\n\n        default:\n          front.resolve({\n            value: value,\n            done: false\n          });\n          break;\n      }\n\n      front = front.next;\n\n      if (front) {\n        resume(front.key, front.arg);\n      } else {\n        back = null;\n      }\n    }\n\n    this._invoke = send;\n\n    if (typeof gen.return !== \"function\") {\n      this.return = undefined;\n    }\n  }\n\n  if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n    AsyncGenerator.prototype[Symbol.asyncIterator] = function () {\n      return this;\n    };\n  }\n\n  AsyncGenerator.prototype.next = function (arg) {\n    return this._invoke(\"next\", arg);\n  };\n\n  AsyncGenerator.prototype.throw = function (arg) {\n    return this._invoke(\"throw\", arg);\n  };\n\n  AsyncGenerator.prototype.return = function (arg) {\n    return this._invoke(\"return\", arg);\n  };\n\n  return {\n    wrap: function (fn) {\n      return function () {\n        return new AsyncGenerator(fn.apply(this, arguments));\n      };\n    },\n    await: function (value) {\n      return new AwaitValue(value);\n    }\n  };\n}();\n\n\n\n\n\nvar classCallCheck = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};\n\nvar createClass = function () {\n  function defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      Object.defineProperty(target, descriptor.key, descriptor);\n    }\n  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\n\n\nvar inherits = function (subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\nvar objectWithoutProperties = function (obj, keys) {\n  var target = {};\n\n  for (var i in obj) {\n    if (keys.indexOf(i) >= 0) continue;\n    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n    target[i] = obj[i];\n  }\n\n  return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar Option = function (_React$Component) {\n\tinherits(Option, _React$Component);\n\n\tfunction Option(props) {\n\t\tclassCallCheck(this, Option);\n\n\t\tvar _this = possibleConstructorReturn(this, (Option.__proto__ || Object.getPrototypeOf(Option)).call(this, props));\n\n\t\t_this.handleMouseDown = _this.handleMouseDown.bind(_this);\n\t\t_this.handleMouseEnter = _this.handleMouseEnter.bind(_this);\n\t\t_this.handleMouseMove = _this.handleMouseMove.bind(_this);\n\t\t_this.handleTouchStart = _this.handleTouchStart.bind(_this);\n\t\t_this.handleTouchEnd = _this.handleTouchEnd.bind(_this);\n\t\t_this.handleTouchMove = _this.handleTouchMove.bind(_this);\n\t\t_this.onFocus = _this.onFocus.bind(_this);\n\t\treturn _this;\n\t}\n\n\tcreateClass(Option, [{\n\t\tkey: 'handleMouseDown',\n\t\tvalue: function handleMouseDown(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tthis.props.onSelect(this.props.option, event);\n\t\t}\n\t}, {\n\t\tkey: 'handleMouseEnter',\n\t\tvalue: function handleMouseEnter(event) {\n\t\t\tthis.onFocus(event);\n\t\t}\n\t}, {\n\t\tkey: 'handleMouseMove',\n\t\tvalue: function handleMouseMove(event) {\n\t\t\tthis.onFocus(event);\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchEnd',\n\t\tvalue: function handleTouchEnd(event) {\n\t\t\t// Check if the view is being dragged, In this case\n\t\t\t// we don't want to fire the click event (because the user only wants to scroll)\n\t\t\tif (this.dragging) return;\n\n\t\t\tthis.handleMouseDown(event);\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchMove',\n\t\tvalue: function handleTouchMove() {\n\t\t\t// Set a flag that the view is being dragged\n\t\t\tthis.dragging = true;\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchStart',\n\t\tvalue: function handleTouchStart() {\n\t\t\t// Set a flag that the view is not being dragged\n\t\t\tthis.dragging = false;\n\t\t}\n\t}, {\n\t\tkey: 'onFocus',\n\t\tvalue: function onFocus(event) {\n\t\t\tif (!this.props.isFocused) {\n\t\t\t\tthis.props.onFocus(this.props.option, event);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar _props = this.props,\n\t\t\t    option = _props.option,\n\t\t\t    instancePrefix = _props.instancePrefix,\n\t\t\t    optionIndex = _props.optionIndex;\n\n\t\t\tvar className = classNames(this.props.className, option.className);\n\n\t\t\treturn option.disabled ? React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: className,\n\t\t\t\t\tonMouseDown: blockEvent,\n\t\t\t\t\tonClick: blockEvent },\n\t\t\t\tthis.props.children\n\t\t\t) : React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: className,\n\t\t\t\t\tstyle: option.style,\n\t\t\t\t\trole: 'option',\n\t\t\t\t\t'aria-label': option.label,\n\t\t\t\t\tonMouseDown: this.handleMouseDown,\n\t\t\t\t\tonMouseEnter: this.handleMouseEnter,\n\t\t\t\t\tonMouseMove: this.handleMouseMove,\n\t\t\t\t\tonTouchStart: this.handleTouchStart,\n\t\t\t\t\tonTouchMove: this.handleTouchMove,\n\t\t\t\t\tonTouchEnd: this.handleTouchEnd,\n\t\t\t\t\tid: instancePrefix + '-option-' + optionIndex,\n\t\t\t\t\ttitle: option.title },\n\t\t\t\tthis.props.children\n\t\t\t);\n\t\t}\n\t}]);\n\treturn Option;\n}(React.Component);\n\nOption.propTypes = {\n\tchildren: PropTypes.node,\n\tclassName: PropTypes.string, // className (based on mouse position)\n\tinstancePrefix: PropTypes.string.isRequired, // unique prefix for the ids (used for aria)\n\tisDisabled: PropTypes.bool, // the option is disabled\n\tisFocused: PropTypes.bool, // the option is focused\n\tisSelected: PropTypes.bool, // the option is selected\n\tonFocus: PropTypes.func, // method to handle mouseEnter on option element\n\tonSelect: PropTypes.func, // method to handle click on option element\n\tonUnfocus: PropTypes.func, // method to handle mouseLeave on option element\n\toption: PropTypes.object.isRequired, // object that is base for that option\n\toptionIndex: PropTypes.number // index of the option, used to generate unique ids for aria\n};\n\nvar Value = function (_React$Component) {\n\tinherits(Value, _React$Component);\n\n\tfunction Value(props) {\n\t\tclassCallCheck(this, Value);\n\n\t\tvar _this = possibleConstructorReturn(this, (Value.__proto__ || Object.getPrototypeOf(Value)).call(this, props));\n\n\t\t_this.handleMouseDown = _this.handleMouseDown.bind(_this);\n\t\t_this.onRemove = _this.onRemove.bind(_this);\n\t\t_this.handleTouchEndRemove = _this.handleTouchEndRemove.bind(_this);\n\t\t_this.handleTouchMove = _this.handleTouchMove.bind(_this);\n\t\t_this.handleTouchStart = _this.handleTouchStart.bind(_this);\n\t\treturn _this;\n\t}\n\n\tcreateClass(Value, [{\n\t\tkey: 'handleMouseDown',\n\t\tvalue: function handleMouseDown(event) {\n\t\t\tif (event.type === 'mousedown' && event.button !== 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.props.onClick) {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis.props.onClick(this.props.value, event);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.props.value.href) {\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'onRemove',\n\t\tvalue: function onRemove(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tthis.props.onRemove(this.props.value);\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchEndRemove',\n\t\tvalue: function handleTouchEndRemove(event) {\n\t\t\t// Check if the view is being dragged, In this case\n\t\t\t// we don't want to fire the click event (because the user only wants to scroll)\n\t\t\tif (this.dragging) return;\n\n\t\t\t// Fire the mouse events\n\t\t\tthis.onRemove(event);\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchMove',\n\t\tvalue: function handleTouchMove() {\n\t\t\t// Set a flag that the view is being dragged\n\t\t\tthis.dragging = true;\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchStart',\n\t\tvalue: function handleTouchStart() {\n\t\t\t// Set a flag that the view is not being dragged\n\t\t\tthis.dragging = false;\n\t\t}\n\t}, {\n\t\tkey: 'renderRemoveIcon',\n\t\tvalue: function renderRemoveIcon() {\n\t\t\tif (this.props.disabled || !this.props.onRemove) return;\n\t\t\treturn React.createElement(\n\t\t\t\t'span',\n\t\t\t\t{ className: 'Select-value-icon',\n\t\t\t\t\t'aria-hidden': 'true',\n\t\t\t\t\tonMouseDown: this.onRemove,\n\t\t\t\t\tonTouchEnd: this.handleTouchEndRemove,\n\t\t\t\t\tonTouchStart: this.handleTouchStart,\n\t\t\t\t\tonTouchMove: this.handleTouchMove },\n\t\t\t\t'\\xD7'\n\t\t\t);\n\t\t}\n\t}, {\n\t\tkey: 'renderLabel',\n\t\tvalue: function renderLabel() {\n\t\t\tvar className = 'Select-value-label';\n\t\t\treturn this.props.onClick || this.props.value.href ? React.createElement(\n\t\t\t\t'a',\n\t\t\t\t{ className: className, href: this.props.value.href, target: this.props.value.target, onMouseDown: this.handleMouseDown, onTouchEnd: this.handleMouseDown },\n\t\t\t\tthis.props.children\n\t\t\t) : React.createElement(\n\t\t\t\t'span',\n\t\t\t\t{ className: className, role: 'option', 'aria-selected': 'true', id: this.props.id },\n\t\t\t\tthis.props.children\n\t\t\t);\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: classNames('Select-value', this.props.value.className),\n\t\t\t\t\tstyle: this.props.value.style,\n\t\t\t\t\ttitle: this.props.value.title\n\t\t\t\t},\n\t\t\t\tthis.renderRemoveIcon(),\n\t\t\t\tthis.renderLabel()\n\t\t\t);\n\t\t}\n\t}]);\n\treturn Value;\n}(React.Component);\n\nValue.propTypes = {\n\tchildren: PropTypes.node,\n\tdisabled: PropTypes.bool, // disabled prop passed to ReactSelect\n\tid: PropTypes.string, // Unique id for the value - used for aria\n\tonClick: PropTypes.func, // method to handle click on value label\n\tonRemove: PropTypes.func, // method to handle removal of the value\n\tvalue: PropTypes.object.isRequired // the option object for this value\n};\n\n/*!\n  Copyright (c) 2018 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/react-select\n*/\nvar stringifyValue = function stringifyValue(value) {\n\treturn typeof value === 'string' ? value : value !== null && JSON.stringify(value) || '';\n};\n\nvar stringOrNode = PropTypes.oneOfType([PropTypes.string, PropTypes.node]);\nvar stringOrNumber = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);\n\nvar instanceId = 1;\n\nvar shouldShowValue = function shouldShowValue(state, props) {\n\tvar inputValue = state.inputValue,\n\t    isPseudoFocused = state.isPseudoFocused,\n\t    isFocused = state.isFocused;\n\tvar onSelectResetsInput = props.onSelectResetsInput;\n\n\n\tif (!inputValue) return true;\n\n\tif (!onSelectResetsInput) {\n\t\treturn !(!isFocused && isPseudoFocused || isFocused && !isPseudoFocused);\n\t}\n\n\treturn false;\n};\n\nvar shouldShowPlaceholder = function shouldShowPlaceholder(state, props, isOpen) {\n\tvar inputValue = state.inputValue,\n\t    isPseudoFocused = state.isPseudoFocused,\n\t    isFocused = state.isFocused;\n\tvar onSelectResetsInput = props.onSelectResetsInput;\n\n\n\treturn !inputValue || !onSelectResetsInput && !isOpen && !isPseudoFocused && !isFocused;\n};\n\n/**\n * Retrieve a value from the given options and valueKey\n * @param {String|Number|Array} value\t- the selected value(s)\n * @param {Object}\t\t props\t- the Select component's props (or nextProps)\n */\nvar expandValue = function expandValue(value, props) {\n\tvar valueType = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\tif (valueType !== 'string' && valueType !== 'number' && valueType !== 'boolean') return value;\n\tvar options = props.options,\n\t    valueKey = props.valueKey;\n\n\tif (!options) return;\n\tfor (var i = 0; i < options.length; i++) {\n\t\tif (String(options[i][valueKey]) === String(value)) return options[i];\n\t}\n};\n\nvar handleRequired = function handleRequired(value, multi) {\n\tif (!value) return true;\n\treturn multi ? value.length === 0 : Object.keys(value).length === 0;\n};\n\nvar Select$1 = function (_React$Component) {\n\tinherits(Select, _React$Component);\n\n\tfunction Select(props) {\n\t\tclassCallCheck(this, Select);\n\n\t\tvar _this = possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props));\n\n\t\t['clearValue', 'focusOption', 'getOptionLabel', 'handleInputBlur', 'handleInputChange', 'handleInputFocus', 'handleInputValueChange', 'handleKeyDown', 'handleMenuScroll', 'handleMouseDown', 'handleMouseDownOnArrow', 'handleMouseDownOnMenu', 'handleTouchEnd', 'handleTouchEndClearValue', 'handleTouchMove', 'handleTouchOutside', 'handleTouchStart', 'handleValueClick', 'onOptionRef', 'removeValue', 'selectValue'].forEach(function (fn) {\n\t\t\treturn _this[fn] = _this[fn].bind(_this);\n\t\t});\n\n\t\t_this.state = {\n\t\t\tinputValue: '',\n\t\t\tisFocused: false,\n\t\t\tisOpen: false,\n\t\t\tisPseudoFocused: false,\n\t\t\trequired: false\n\t\t};\n\t\treturn _this;\n\t}\n\n\tcreateClass(Select, [{\n\t\tkey: 'componentWillMount',\n\t\tvalue: function componentWillMount() {\n\t\t\tthis._instancePrefix = 'react-select-' + (this.props.instanceId || ++instanceId) + '-';\n\t\t\tvar valueArray = this.getValueArray(this.props.value);\n\n\t\t\tif (this.props.required) {\n\t\t\t\tthis.setState({\n\t\t\t\t\trequired: handleRequired(valueArray[0], this.props.multi)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentDidMount',\n\t\tvalue: function componentDidMount() {\n\t\t\tif (typeof this.props.autofocus !== 'undefined' && typeof console !== 'undefined') {\n\t\t\t\tconsole.warn('Warning: The autofocus prop has changed to autoFocus, support will be removed after react-select@1.0');\n\t\t\t}\n\t\t\tif (this.props.autoFocus || this.props.autofocus) {\n\t\t\t\tthis.focus();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentWillReceiveProps',\n\t\tvalue: function componentWillReceiveProps(nextProps) {\n\t\t\tvar valueArray = this.getValueArray(nextProps.value, nextProps);\n\n\t\t\tif (nextProps.required) {\n\t\t\t\tthis.setState({\n\t\t\t\t\trequired: handleRequired(valueArray[0], nextProps.multi)\n\t\t\t\t});\n\t\t\t} else if (this.props.required) {\n\t\t\t\t// Used to be required but it's not any more\n\t\t\t\tthis.setState({ required: false });\n\t\t\t}\n\n\t\t\tif (this.state.inputValue && this.props.value !== nextProps.value && nextProps.onSelectResetsInput) {\n\t\t\t\tthis.setState({ inputValue: this.handleInputValueChange('') });\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentDidUpdate',\n\t\tvalue: function componentDidUpdate(prevProps, prevState) {\n\t\t\t// focus to the selected option\n\t\t\tif (this.menu && this.focused && this.state.isOpen && !this.hasScrolledToOption) {\n\t\t\t\tvar focusedOptionNode = findDOMNode(this.focused);\n\t\t\t\tvar menuNode = findDOMNode(this.menu);\n\n\t\t\t\tvar scrollTop = menuNode.scrollTop;\n\t\t\t\tvar scrollBottom = scrollTop + menuNode.offsetHeight;\n\t\t\t\tvar optionTop = focusedOptionNode.offsetTop;\n\t\t\t\tvar optionBottom = optionTop + focusedOptionNode.offsetHeight;\n\n\t\t\t\tif (scrollTop > optionTop || scrollBottom < optionBottom) {\n\t\t\t\t\tmenuNode.scrollTop = focusedOptionNode.offsetTop;\n\t\t\t\t}\n\n\t\t\t\t// We still set hasScrolledToOption to true even if we didn't\n\t\t\t\t// actually need to scroll, as we've still confirmed that the\n\t\t\t\t// option is in view.\n\t\t\t\tthis.hasScrolledToOption = true;\n\t\t\t} else if (!this.state.isOpen) {\n\t\t\t\tthis.hasScrolledToOption = false;\n\t\t\t}\n\n\t\t\tif (this._scrollToFocusedOptionOnUpdate && this.focused && this.menu) {\n\t\t\t\tthis._scrollToFocusedOptionOnUpdate = false;\n\t\t\t\tvar focusedDOM = findDOMNode(this.focused);\n\t\t\t\tvar menuDOM = findDOMNode(this.menu);\n\t\t\t\tvar focusedRect = focusedDOM.getBoundingClientRect();\n\t\t\t\tvar menuRect = menuDOM.getBoundingClientRect();\n\t\t\t\tif (focusedRect.bottom > menuRect.bottom) {\n\t\t\t\t\tmenuDOM.scrollTop = focusedDOM.offsetTop + focusedDOM.clientHeight - menuDOM.offsetHeight;\n\t\t\t\t} else if (focusedRect.top < menuRect.top) {\n\t\t\t\t\tmenuDOM.scrollTop = focusedDOM.offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.props.scrollMenuIntoView && this.menuContainer) {\n\t\t\t\tvar menuContainerRect = this.menuContainer.getBoundingClientRect();\n\t\t\t\tif (window.innerHeight < menuContainerRect.bottom + this.props.menuBuffer) {\n\t\t\t\t\twindow.scrollBy(0, menuContainerRect.bottom + this.props.menuBuffer - window.innerHeight);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (prevProps.disabled !== this.props.disabled) {\n\t\t\t\tthis.setState({ isFocused: false }); // eslint-disable-line react/no-did-update-set-state\n\t\t\t\tthis.closeMenu();\n\t\t\t}\n\t\t\tif (prevState.isOpen !== this.state.isOpen) {\n\t\t\t\tthis.toggleTouchOutsideEvent(this.state.isOpen);\n\t\t\t\tvar handler = this.state.isOpen ? this.props.onOpen : this.props.onClose;\n\t\t\t\thandler && handler();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentWillUnmount',\n\t\tvalue: function componentWillUnmount() {\n\t\t\tthis.toggleTouchOutsideEvent(false);\n\t\t}\n\t}, {\n\t\tkey: 'toggleTouchOutsideEvent',\n\t\tvalue: function toggleTouchOutsideEvent(enabled) {\n\t\t\tif (enabled) {\n\t\t\t\tif (!document.addEventListener && document.attachEvent) {\n\t\t\t\t\tdocument.attachEvent('ontouchstart', this.handleTouchOutside);\n\t\t\t\t} else {\n\t\t\t\t\tdocument.addEventListener('touchstart', this.handleTouchOutside);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!document.removeEventListener && document.detachEvent) {\n\t\t\t\t\tdocument.detachEvent('ontouchstart', this.handleTouchOutside);\n\t\t\t\t} else {\n\t\t\t\t\tdocument.removeEventListener('touchstart', this.handleTouchOutside);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchOutside',\n\t\tvalue: function handleTouchOutside(event) {\n\t\t\t// handle touch outside on ios to dismiss menu\n\t\t\tif (this.wrapper && !this.wrapper.contains(event.target)) {\n\t\t\t\tthis.closeMenu();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tif (!this.input) return;\n\t\t\tthis.input.focus();\n\t\t}\n\t}, {\n\t\tkey: 'blurInput',\n\t\tvalue: function blurInput() {\n\t\t\tif (!this.input) return;\n\t\t\tthis.input.blur();\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchMove',\n\t\tvalue: function handleTouchMove() {\n\t\t\t// Set a flag that the view is being dragged\n\t\t\tthis.dragging = true;\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchStart',\n\t\tvalue: function handleTouchStart() {\n\t\t\t// Set a flag that the view is not being dragged\n\t\t\tthis.dragging = false;\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchEnd',\n\t\tvalue: function handleTouchEnd(event) {\n\t\t\t// Check if the view is being dragged, In this case\n\t\t\t// we don't want to fire the click event (because the user only wants to scroll)\n\t\t\tif (this.dragging) return;\n\n\t\t\t// Fire the mouse events\n\t\t\tthis.handleMouseDown(event);\n\t\t}\n\t}, {\n\t\tkey: 'handleTouchEndClearValue',\n\t\tvalue: function handleTouchEndClearValue(event) {\n\t\t\t// Check if the view is being dragged, In this case\n\t\t\t// we don't want to fire the click event (because the user only wants to scroll)\n\t\t\tif (this.dragging) return;\n\n\t\t\t// Clear the value\n\t\t\tthis.clearValue(event);\n\t\t}\n\t}, {\n\t\tkey: 'handleMouseDown',\n\t\tvalue: function handleMouseDown(event) {\n\t\t\t// if the event was triggered by a mousedown and not the primary\n\t\t\t// button, or if the component is disabled, ignore it.\n\t\t\tif (this.props.disabled || event.type === 'mousedown' && event.button !== 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (event.target.tagName === 'INPUT') {\n\t\t\t\tif (!this.state.isFocused) {\n\t\t\t\t\tthis._openAfterFocus = this.props.openOnClick;\n\t\t\t\t\tthis.focus();\n\t\t\t\t} else if (!this.state.isOpen) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisOpen: true,\n\t\t\t\t\t\tisPseudoFocused: false\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// prevent default event handlers\n\t\t\tevent.preventDefault();\n\n\t\t\t// for the non-searchable select, toggle the menu\n\t\t\tif (!this.props.searchable) {\n\t\t\t\t// This code means that if a select is searchable, onClick the options menu will not appear, only on subsequent click will it open.\n\t\t\t\tthis.focus();\n\t\t\t\treturn this.setState({\n\t\t\t\t\tisOpen: !this.state.isOpen\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.state.isFocused) {\n\t\t\t\t// On iOS, we can get into a state where we think the input is focused but it isn't really,\n\t\t\t\t// since iOS ignores programmatic calls to input.focus() that weren't triggered by a click event.\n\t\t\t\t// Call focus() again here to be safe.\n\t\t\t\tthis.focus();\n\n\t\t\t\tvar input = this.input;\n\t\t\t\tvar toOpen = true;\n\n\t\t\t\tif (typeof input.getInput === 'function') {\n\t\t\t\t\t// Get the actual DOM input if the ref is an <AutosizeInput /> component\n\t\t\t\t\tinput = input.getInput();\n\t\t\t\t}\n\n\t\t\t\t// clears the value so that the cursor will be at the end of input when the component re-renders\n\t\t\t\tinput.value = '';\n\n\t\t\t\tif (this._focusAfterClear) {\n\t\t\t\t\ttoOpen = false;\n\t\t\t\t\tthis._focusAfterClear = false;\n\t\t\t\t}\n\n\t\t\t\t// if the input is focused, ensure the menu is open\n\t\t\t\tthis.setState({\n\t\t\t\t\tisOpen: toOpen,\n\t\t\t\t\tisPseudoFocused: false,\n\t\t\t\t\tfocusedOption: null\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// otherwise, focus the input and open the menu\n\t\t\t\tthis._openAfterFocus = this.props.openOnClick;\n\t\t\t\tthis.focus();\n\t\t\t\tthis.setState({ focusedOption: null });\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'handleMouseDownOnArrow',\n\t\tvalue: function handleMouseDownOnArrow(event) {\n\t\t\t// if the event was triggered by a mousedown and not the primary\n\t\t\t// button, or if the component is disabled, ignore it.\n\t\t\tif (this.props.disabled || event.type === 'mousedown' && event.button !== 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.state.isOpen) {\n\t\t\t\t// prevent default event handlers\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// close the menu\n\t\t\t\tthis.closeMenu();\n\t\t\t} else {\n\t\t\t\t// If the menu isn't open, let the event bubble to the main handleMouseDown\n\t\t\t\tthis.setState({\n\t\t\t\t\tisOpen: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'handleMouseDownOnMenu',\n\t\tvalue: function handleMouseDownOnMenu(event) {\n\t\t\t// if the event was triggered by a mousedown and not the primary\n\t\t\t// button, or if the component is disabled, ignore it.\n\t\t\tif (this.props.disabled || event.type === 'mousedown' && event.button !== 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\n\t\t\tthis._openAfterFocus = true;\n\t\t\tthis.focus();\n\t\t}\n\t}, {\n\t\tkey: 'closeMenu',\n\t\tvalue: function closeMenu() {\n\t\t\tif (this.props.onCloseResetsInput) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tinputValue: this.handleInputValueChange(''),\n\t\t\t\t\tisOpen: false,\n\t\t\t\t\tisPseudoFocused: this.state.isFocused && !this.props.multi\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisOpen: false,\n\t\t\t\t\tisPseudoFocused: this.state.isFocused && !this.props.multi\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.hasScrolledToOption = false;\n\t\t}\n\t}, {\n\t\tkey: 'handleInputFocus',\n\t\tvalue: function handleInputFocus(event) {\n\t\t\tif (this.props.disabled) return;\n\n\t\t\tvar toOpen = this.state.isOpen || this._openAfterFocus || this.props.openOnFocus;\n\t\t\ttoOpen = this._focusAfterClear ? false : toOpen; //if focus happens after clear values, don't open dropdown yet.\n\n\t\t\tif (this.props.onFocus) {\n\t\t\t\tthis.props.onFocus(event);\n\t\t\t}\n\n\t\t\tthis.setState({\n\t\t\t\tisFocused: true,\n\t\t\t\tisOpen: !!toOpen\n\t\t\t});\n\n\t\t\tthis._focusAfterClear = false;\n\t\t\tthis._openAfterFocus = false;\n\t\t}\n\t}, {\n\t\tkey: 'handleInputBlur',\n\t\tvalue: function handleInputBlur(event) {\n\t\t\t// The check for menu.contains(activeElement) is necessary to prevent IE11's scrollbar from closing the menu in certain contexts.\n\t\t\tif (this.menu && (this.menu === document.activeElement || this.menu.contains(document.activeElement))) {\n\t\t\t\tthis.focus();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.props.onBlur) {\n\t\t\t\tthis.props.onBlur(event);\n\t\t\t}\n\t\t\tvar onBlurredState = {\n\t\t\t\tisFocused: false,\n\t\t\t\tisOpen: false,\n\t\t\t\tisPseudoFocused: false\n\t\t\t};\n\t\t\tif (this.props.onBlurResetsInput) {\n\t\t\t\tonBlurredState.inputValue = this.handleInputValueChange('');\n\t\t\t}\n\t\t\tthis.setState(onBlurredState);\n\t\t}\n\t}, {\n\t\tkey: 'handleInputChange',\n\t\tvalue: function handleInputChange(event) {\n\t\t\tvar newInputValue = event.target.value;\n\n\t\t\tif (this.state.inputValue !== event.target.value) {\n\t\t\t\tnewInputValue = this.handleInputValueChange(newInputValue);\n\t\t\t}\n\n\t\t\tthis.setState({\n\t\t\t\tinputValue: newInputValue,\n\t\t\t\tisOpen: true,\n\t\t\t\tisPseudoFocused: false\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'setInputValue',\n\t\tvalue: function setInputValue(newValue) {\n\t\t\tif (this.props.onInputChange) {\n\t\t\t\tvar nextState = this.props.onInputChange(newValue);\n\t\t\t\tif (nextState != null && (typeof nextState === 'undefined' ? 'undefined' : _typeof(nextState)) !== 'object') {\n\t\t\t\t\tnewValue = '' + nextState;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setState({\n\t\t\t\tinputValue: newValue\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'handleInputValueChange',\n\t\tvalue: function handleInputValueChange(newValue) {\n\t\t\tif (this.props.onInputChange) {\n\t\t\t\tvar nextState = this.props.onInputChange(newValue);\n\t\t\t\t// Note: != used deliberately here to catch undefined and null\n\t\t\t\tif (nextState != null && (typeof nextState === 'undefined' ? 'undefined' : _typeof(nextState)) !== 'object') {\n\t\t\t\t\tnewValue = '' + nextState;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newValue;\n\t\t}\n\t}, {\n\t\tkey: 'handleKeyDown',\n\t\tvalue: function handleKeyDown(event) {\n\t\t\tif (this.props.disabled) return;\n\n\t\t\tif (typeof this.props.onInputKeyDown === 'function') {\n\t\t\t\tthis.props.onInputKeyDown(event);\n\t\t\t\tif (event.defaultPrevented) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch (event.keyCode) {\n\t\t\t\tcase 8:\n\t\t\t\t\t// backspace\n\t\t\t\t\tif (!this.state.inputValue && this.props.backspaceRemoves) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.popValue();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\t// tab\n\t\t\t\t\tif (event.shiftKey || !this.state.isOpen || !this.props.tabSelectsValue) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.selectFocusedOption();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 13:\n\t\t\t\t\t// enter\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tif (this.state.isOpen) {\n\t\t\t\t\t\tthis.selectFocusedOption();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.focusNextOption();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 27:\n\t\t\t\t\t// escape\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (this.state.isOpen) {\n\t\t\t\t\t\tthis.closeMenu();\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t} else if (this.props.clearable && this.props.escapeClearsValue) {\n\t\t\t\t\t\tthis.clearValue(event);\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 32:\n\t\t\t\t\t// space\n\t\t\t\t\tif (this.props.searchable) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (!this.state.isOpen) {\n\t\t\t\t\t\tthis.focusNextOption();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tthis.selectFocusedOption();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 38:\n\t\t\t\t\t// up\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.focusPreviousOption();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 40:\n\t\t\t\t\t// down\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.focusNextOption();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 33:\n\t\t\t\t\t// page up\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.focusPageUpOption();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 34:\n\t\t\t\t\t// page down\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.focusPageDownOption();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 35:\n\t\t\t\t\t// end key\n\t\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.focusEndOption();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 36:\n\t\t\t\t\t// home key\n\t\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.focusStartOption();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 46:\n\t\t\t\t\t// delete\n\t\t\t\t\tif (!this.state.inputValue && this.props.deleteRemoves) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.popValue();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'handleValueClick',\n\t\tvalue: function handleValueClick(option, event) {\n\t\t\tif (!this.props.onValueClick) return;\n\t\t\tthis.props.onValueClick(option, event);\n\t\t}\n\t}, {\n\t\tkey: 'handleMenuScroll',\n\t\tvalue: function handleMenuScroll(event) {\n\t\t\tif (!this.props.onMenuScrollToBottom) return;\n\t\t\tvar target = event.target;\n\n\t\t\tif (target.scrollHeight > target.offsetHeight && target.scrollHeight - target.offsetHeight - target.scrollTop <= 0) {\n\t\t\t\tthis.props.onMenuScrollToBottom();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getOptionLabel',\n\t\tvalue: function getOptionLabel(op) {\n\t\t\treturn op[this.props.labelKey];\n\t\t}\n\n\t\t/**\n   * Turns a value into an array from the given options\n   * @param {String|Number|Array} value\t\t- the value of the select input\n   * @param {Object}\t\tnextProps\t- optionally specify the nextProps so the returned array uses the latest configuration\n   * @returns\t{Array}\tthe value of the select represented in an array\n   */\n\n\t}, {\n\t\tkey: 'getValueArray',\n\t\tvalue: function getValueArray(value) {\n\t\t\tvar nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\t\t/** support optionally passing in the `nextProps` so `componentWillReceiveProps` updates will function as expected */\n\t\t\tvar props = (typeof nextProps === 'undefined' ? 'undefined' : _typeof(nextProps)) === 'object' ? nextProps : this.props;\n\t\t\tif (props.multi) {\n\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\tvalue = value.split(props.delimiter);\n\t\t\t\t}\n\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\tif (value === null || value === undefined) return [];\n\t\t\t\t\tvalue = [value];\n\t\t\t\t}\n\t\t\t\treturn value.map(function (value) {\n\t\t\t\t\treturn expandValue(value, props);\n\t\t\t\t}).filter(function (i) {\n\t\t\t\t\treturn i;\n\t\t\t\t});\n\t\t\t}\n\t\t\tvar expandedValue = expandValue(value, props);\n\t\t\treturn expandedValue ? [expandedValue] : [];\n\t\t}\n\t}, {\n\t\tkey: 'setValue',\n\t\tvalue: function setValue(value) {\n\t\t\tvar _this2 = this;\n\n\t\t\tif (this.props.autoBlur) {\n\t\t\t\tthis.blurInput();\n\t\t\t}\n\t\t\tif (this.props.required) {\n\t\t\t\tvar required = handleRequired(value, this.props.multi);\n\t\t\t\tthis.setState({ required: required });\n\t\t\t}\n\t\t\tif (this.props.simpleValue && value) {\n\t\t\t\tvalue = this.props.multi ? value.map(function (i) {\n\t\t\t\t\treturn i[_this2.props.valueKey];\n\t\t\t\t}).join(this.props.delimiter) : value[this.props.valueKey];\n\t\t\t}\n\t\t\tif (this.props.onChange) {\n\t\t\t\tthis.props.onChange(value);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'selectValue',\n\t\tvalue: function selectValue(value) {\n\t\t\tvar _this3 = this;\n\n\t\t\t// NOTE: we actually add/set the value in a callback to make sure the\n\t\t\t// input value is empty to avoid styling issues in Chrome\n\t\t\tif (this.props.closeOnSelect) {\n\t\t\t\tthis.hasScrolledToOption = false;\n\t\t\t}\n\t\t\tvar updatedValue = this.props.onSelectResetsInput ? '' : this.state.inputValue;\n\t\t\tif (this.props.multi) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tfocusedIndex: null,\n\t\t\t\t\tinputValue: this.handleInputValueChange(updatedValue),\n\t\t\t\t\tisOpen: !this.props.closeOnSelect\n\t\t\t\t}, function () {\n\t\t\t\t\tvar valueArray = _this3.getValueArray(_this3.props.value);\n\t\t\t\t\tif (valueArray.some(function (i) {\n\t\t\t\t\t\treturn i[_this3.props.valueKey] === value[_this3.props.valueKey];\n\t\t\t\t\t})) {\n\t\t\t\t\t\t_this3.removeValue(value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_this3.addValue(value);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\tinputValue: this.handleInputValueChange(updatedValue),\n\t\t\t\t\tisOpen: !this.props.closeOnSelect,\n\t\t\t\t\tisPseudoFocused: this.state.isFocused\n\t\t\t\t}, function () {\n\t\t\t\t\t_this3.setValue(value);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'addValue',\n\t\tvalue: function addValue(value) {\n\t\t\tvar valueArray = this.getValueArray(this.props.value);\n\t\t\tvar visibleOptions = this._visibleOptions.filter(function (val) {\n\t\t\t\treturn !val.disabled;\n\t\t\t});\n\t\t\tvar lastValueIndex = visibleOptions.indexOf(value);\n\t\t\tthis.setValue(valueArray.concat(value));\n\t\t\tif (visibleOptions.length - 1 === lastValueIndex) {\n\t\t\t\t// the last option was selected; focus the second-last one\n\t\t\t\tthis.focusOption(visibleOptions[lastValueIndex - 1]);\n\t\t\t} else if (visibleOptions.length > lastValueIndex) {\n\t\t\t\t// focus the option below the selected one\n\t\t\t\tthis.focusOption(visibleOptions[lastValueIndex + 1]);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'popValue',\n\t\tvalue: function popValue() {\n\t\t\tvar valueArray = this.getValueArray(this.props.value);\n\t\t\tif (!valueArray.length) return;\n\t\t\tif (valueArray[valueArray.length - 1].clearableValue === false) return;\n\t\t\tthis.setValue(this.props.multi ? valueArray.slice(0, valueArray.length - 1) : null);\n\t\t}\n\t}, {\n\t\tkey: 'removeValue',\n\t\tvalue: function removeValue(value) {\n\t\t\tvar _this4 = this;\n\n\t\t\tvar valueArray = this.getValueArray(this.props.value);\n\t\t\tthis.setValue(valueArray.filter(function (i) {\n\t\t\t\treturn i[_this4.props.valueKey] !== value[_this4.props.valueKey];\n\t\t\t}));\n\t\t\tthis.focus();\n\t\t}\n\t}, {\n\t\tkey: 'clearValue',\n\t\tvalue: function clearValue(event) {\n\t\t\t// if the event was triggered by a mousedown and not the primary\n\t\t\t// button, ignore it.\n\t\t\tif (event && event.type === 'mousedown' && event.button !== 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevent.preventDefault();\n\n\t\t\tthis.setValue(this.getResetValue());\n\t\t\tthis.setState({\n\t\t\t\tinputValue: this.handleInputValueChange(''),\n\t\t\t\tisOpen: false\n\t\t\t}, this.focus);\n\n\t\t\tthis._focusAfterClear = true;\n\t\t}\n\t}, {\n\t\tkey: 'getResetValue',\n\t\tvalue: function getResetValue() {\n\t\t\tif (this.props.resetValue !== undefined) {\n\t\t\t\treturn this.props.resetValue;\n\t\t\t} else if (this.props.multi) {\n\t\t\t\treturn [];\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'focusOption',\n\t\tvalue: function focusOption(option) {\n\t\t\tthis.setState({\n\t\t\t\tfocusedOption: option\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'focusNextOption',\n\t\tvalue: function focusNextOption() {\n\t\t\tthis.focusAdjacentOption('next');\n\t\t}\n\t}, {\n\t\tkey: 'focusPreviousOption',\n\t\tvalue: function focusPreviousOption() {\n\t\t\tthis.focusAdjacentOption('previous');\n\t\t}\n\t}, {\n\t\tkey: 'focusPageUpOption',\n\t\tvalue: function focusPageUpOption() {\n\t\t\tthis.focusAdjacentOption('page_up');\n\t\t}\n\t}, {\n\t\tkey: 'focusPageDownOption',\n\t\tvalue: function focusPageDownOption() {\n\t\t\tthis.focusAdjacentOption('page_down');\n\t\t}\n\t}, {\n\t\tkey: 'focusStartOption',\n\t\tvalue: function focusStartOption() {\n\t\t\tthis.focusAdjacentOption('start');\n\t\t}\n\t}, {\n\t\tkey: 'focusEndOption',\n\t\tvalue: function focusEndOption() {\n\t\t\tthis.focusAdjacentOption('end');\n\t\t}\n\t}, {\n\t\tkey: 'focusAdjacentOption',\n\t\tvalue: function focusAdjacentOption(dir) {\n\t\t\tvar options = this._visibleOptions.map(function (option, index) {\n\t\t\t\treturn { option: option, index: index };\n\t\t\t}).filter(function (option) {\n\t\t\t\treturn !option.option.disabled;\n\t\t\t});\n\t\t\tthis._scrollToFocusedOptionOnUpdate = true;\n\t\t\tif (!this.state.isOpen) {\n\t\t\t\tvar newState = {\n\t\t\t\t\tfocusedOption: this._focusedOption || (options.length ? options[dir === 'next' ? 0 : options.length - 1].option : null),\n\t\t\t\t\tisOpen: true\n\t\t\t\t};\n\t\t\t\tif (this.props.onSelectResetsInput) {\n\t\t\t\t\tnewState.inputValue = '';\n\t\t\t\t}\n\t\t\t\tthis.setState(newState);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!options.length) return;\n\t\t\tvar focusedIndex = -1;\n\t\t\tfor (var i = 0; i < options.length; i++) {\n\t\t\t\tif (this._focusedOption === options[i].option) {\n\t\t\t\t\tfocusedIndex = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dir === 'next' && focusedIndex !== -1) {\n\t\t\t\tfocusedIndex = (focusedIndex + 1) % options.length;\n\t\t\t} else if (dir === 'previous') {\n\t\t\t\tif (focusedIndex > 0) {\n\t\t\t\t\tfocusedIndex = focusedIndex - 1;\n\t\t\t\t} else {\n\t\t\t\t\tfocusedIndex = options.length - 1;\n\t\t\t\t}\n\t\t\t} else if (dir === 'start') {\n\t\t\t\tfocusedIndex = 0;\n\t\t\t} else if (dir === 'end') {\n\t\t\t\tfocusedIndex = options.length - 1;\n\t\t\t} else if (dir === 'page_up') {\n\t\t\t\tvar potentialIndex = focusedIndex - this.props.pageSize;\n\t\t\t\tif (potentialIndex < 0) {\n\t\t\t\t\tfocusedIndex = 0;\n\t\t\t\t} else {\n\t\t\t\t\tfocusedIndex = potentialIndex;\n\t\t\t\t}\n\t\t\t} else if (dir === 'page_down') {\n\t\t\t\tvar _potentialIndex = focusedIndex + this.props.pageSize;\n\t\t\t\tif (_potentialIndex > options.length - 1) {\n\t\t\t\t\tfocusedIndex = options.length - 1;\n\t\t\t\t} else {\n\t\t\t\t\tfocusedIndex = _potentialIndex;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (focusedIndex === -1) {\n\t\t\t\tfocusedIndex = 0;\n\t\t\t}\n\n\t\t\tthis.setState({\n\t\t\t\tfocusedIndex: options[focusedIndex].index,\n\t\t\t\tfocusedOption: options[focusedIndex].option\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'getFocusedOption',\n\t\tvalue: function getFocusedOption() {\n\t\t\treturn this._focusedOption;\n\t\t}\n\t}, {\n\t\tkey: 'selectFocusedOption',\n\t\tvalue: function selectFocusedOption() {\n\t\t\tif (this._focusedOption) {\n\t\t\t\treturn this.selectValue(this._focusedOption);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'renderLoading',\n\t\tvalue: function renderLoading() {\n\t\t\tif (!this.props.isLoading) return;\n\t\t\treturn React.createElement(\n\t\t\t\t'span',\n\t\t\t\t{ className: 'Select-loading-zone', 'aria-hidden': 'true' },\n\t\t\t\tReact.createElement('span', { className: 'Select-loading' })\n\t\t\t);\n\t\t}\n\t}, {\n\t\tkey: 'renderValue',\n\t\tvalue: function renderValue(valueArray, isOpen) {\n\t\t\tvar _this5 = this;\n\n\t\t\tvar renderLabel = this.props.valueRenderer || this.getOptionLabel;\n\t\t\tvar ValueComponent = this.props.valueComponent;\n\t\t\tif (!valueArray.length) {\n\t\t\t\tvar showPlaceholder = shouldShowPlaceholder(this.state, this.props, isOpen);\n\t\t\t\treturn showPlaceholder ? React.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ className: 'Select-placeholder' },\n\t\t\t\t\tthis.props.placeholder\n\t\t\t\t) : null;\n\t\t\t}\n\t\t\tvar onClick = this.props.onValueClick ? this.handleValueClick : null;\n\t\t\tif (this.props.multi) {\n\t\t\t\treturn valueArray.map(function (value, i) {\n\t\t\t\t\treturn React.createElement(\n\t\t\t\t\t\tValueComponent,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisabled: _this5.props.disabled || value.clearableValue === false,\n\t\t\t\t\t\t\tid: _this5._instancePrefix + '-value-' + i,\n\t\t\t\t\t\t\tinstancePrefix: _this5._instancePrefix,\n\t\t\t\t\t\t\tkey: 'value-' + i + '-' + value[_this5.props.valueKey],\n\t\t\t\t\t\t\tonClick: onClick,\n\t\t\t\t\t\t\tonRemove: _this5.removeValue,\n\t\t\t\t\t\t\tplaceholder: _this5.props.placeholder,\n\t\t\t\t\t\t\tvalue: value\n\t\t\t\t\t\t},\n\t\t\t\t\t\trenderLabel(value, i),\n\t\t\t\t\t\tReact.createElement(\n\t\t\t\t\t\t\t'span',\n\t\t\t\t\t\t\t{ className: 'Select-aria-only' },\n\t\t\t\t\t\t\t'\\xA0'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t} else if (shouldShowValue(this.state, this.props)) {\n\t\t\t\tif (isOpen) onClick = null;\n\t\t\t\treturn React.createElement(\n\t\t\t\t\tValueComponent,\n\t\t\t\t\t{\n\t\t\t\t\t\tdisabled: this.props.disabled,\n\t\t\t\t\t\tid: this._instancePrefix + '-value-item',\n\t\t\t\t\t\tinstancePrefix: this._instancePrefix,\n\t\t\t\t\t\tonClick: onClick,\n\t\t\t\t\t\tplaceholder: this.props.placeholder,\n\t\t\t\t\t\tvalue: valueArray[0]\n\t\t\t\t\t},\n\t\t\t\t\trenderLabel(valueArray[0])\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'renderInput',\n\t\tvalue: function renderInput(valueArray, focusedOptionIndex) {\n\t\t\tvar _classNames,\n\t\t\t    _this6 = this;\n\n\t\t\tvar className = classNames('Select-input', this.props.inputProps.className);\n\t\t\tvar isOpen = this.state.isOpen;\n\n\t\t\tvar ariaOwns = classNames((_classNames = {}, defineProperty(_classNames, this._instancePrefix + '-list', isOpen), defineProperty(_classNames, this._instancePrefix + '-backspace-remove-message', this.props.multi && !this.props.disabled && this.state.isFocused && !this.state.inputValue), _classNames));\n\n\t\t\tvar value = this.state.inputValue;\n\t\t\tif (value && !this.props.onSelectResetsInput && !this.state.isFocused) {\n\t\t\t\t// it hides input value when it is not focused and was not reset on select\n\t\t\t\tvalue = '';\n\t\t\t}\n\n\t\t\tvar inputProps = _extends({}, this.props.inputProps, {\n\t\t\t\t'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',\n\t\t\t\t'aria-describedby': this.props['aria-describedby'],\n\t\t\t\t'aria-expanded': '' + isOpen,\n\t\t\t\t'aria-haspopup': '' + isOpen,\n\t\t\t\t'aria-label': this.props['aria-label'],\n\t\t\t\t'aria-labelledby': this.props['aria-labelledby'],\n\t\t\t\t'aria-owns': ariaOwns,\n\t\t\t\tclassName: className,\n\t\t\t\tonBlur: this.handleInputBlur,\n\t\t\t\tonChange: this.handleInputChange,\n\t\t\t\tonFocus: this.handleInputFocus,\n\t\t\t\tref: function ref(_ref) {\n\t\t\t\t\treturn _this6.input = _ref;\n\t\t\t\t},\n\t\t\t\trole: 'combobox',\n\t\t\t\trequired: this.state.required,\n\t\t\t\ttabIndex: this.props.tabIndex,\n\t\t\t\tvalue: value\n\t\t\t});\n\n\t\t\tif (this.props.inputRenderer) {\n\t\t\t\treturn this.props.inputRenderer(inputProps);\n\t\t\t}\n\n\t\t\tif (this.props.disabled || !this.props.searchable) {\n\t\t\t\tvar divProps = objectWithoutProperties(this.props.inputProps, []);\n\n\n\t\t\t\tvar _ariaOwns = classNames(defineProperty({}, this._instancePrefix + '-list', isOpen));\n\t\t\t\treturn React.createElement('div', _extends({}, divProps, {\n\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t\t'aria-owns': _ariaOwns,\n\t\t\t\t\t'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',\n\t\t\t\t\t'aria-disabled': '' + this.props.disabled,\n\t\t\t\t\t'aria-label': this.props['aria-label'],\n\t\t\t\t\t'aria-labelledby': this.props['aria-labelledby'],\n\t\t\t\t\tclassName: className,\n\t\t\t\t\tonBlur: this.handleInputBlur,\n\t\t\t\t\tonFocus: this.handleInputFocus,\n\t\t\t\t\tref: function ref(_ref2) {\n\t\t\t\t\t\treturn _this6.input = _ref2;\n\t\t\t\t\t},\n\t\t\t\t\trole: 'combobox',\n\t\t\t\t\tstyle: { border: 0, width: 1, display: 'inline-block' },\n\t\t\t\t\ttabIndex: this.props.tabIndex || 0\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\tif (this.props.autosize) {\n\t\t\t\treturn React.createElement(AutosizeInput, _extends({ id: this.props.id }, inputProps, { minWidth: '5' }));\n\t\t\t}\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: className, key: 'input-wrap', style: { display: 'inline-block' } },\n\t\t\t\tReact.createElement('input', _extends({ id: this.props.id }, inputProps))\n\t\t\t);\n\t\t}\n\t}, {\n\t\tkey: 'renderClear',\n\t\tvalue: function renderClear() {\n\t\t\tvar valueArray = this.getValueArray(this.props.value);\n\t\t\tif (!this.props.clearable || !valueArray.length || this.props.disabled || this.props.isLoading) return;\n\t\t\tvar ariaLabel = this.props.multi ? this.props.clearAllText : this.props.clearValueText;\n\t\t\tvar clear = this.props.clearRenderer();\n\n\t\t\treturn React.createElement(\n\t\t\t\t'span',\n\t\t\t\t{\n\t\t\t\t\t'aria-label': ariaLabel,\n\t\t\t\t\tclassName: 'Select-clear-zone',\n\t\t\t\t\tonMouseDown: this.clearValue,\n\t\t\t\t\tonTouchEnd: this.handleTouchEndClearValue,\n\t\t\t\t\tonTouchMove: this.handleTouchMove,\n\t\t\t\t\tonTouchStart: this.handleTouchStart,\n\t\t\t\t\ttitle: ariaLabel\n\t\t\t\t},\n\t\t\t\tclear\n\t\t\t);\n\t\t}\n\t}, {\n\t\tkey: 'renderArrow',\n\t\tvalue: function renderArrow() {\n\t\t\tif (!this.props.arrowRenderer) return;\n\n\t\t\tvar onMouseDown = this.handleMouseDownOnArrow;\n\t\t\tvar isOpen = this.state.isOpen;\n\t\t\tvar arrow = this.props.arrowRenderer({ onMouseDown: onMouseDown, isOpen: isOpen });\n\n\t\t\tif (!arrow) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn React.createElement(\n\t\t\t\t'span',\n\t\t\t\t{\n\t\t\t\t\tclassName: 'Select-arrow-zone',\n\t\t\t\t\tonMouseDown: onMouseDown\n\t\t\t\t},\n\t\t\t\tarrow\n\t\t\t);\n\t\t}\n\t}, {\n\t\tkey: 'filterOptions',\n\t\tvalue: function filterOptions$$1(excludeOptions) {\n\t\t\tvar filterValue = this.state.inputValue;\n\t\t\tvar options = this.props.options || [];\n\t\t\tif (this.props.filterOptions) {\n\t\t\t\t// Maintain backwards compatibility with boolean attribute\n\t\t\t\tvar filterOptions$$1 = typeof this.props.filterOptions === 'function' ? this.props.filterOptions : filterOptions;\n\n\t\t\t\treturn filterOptions$$1(options, filterValue, excludeOptions, {\n\t\t\t\t\tfilterOption: this.props.filterOption,\n\t\t\t\t\tignoreAccents: this.props.ignoreAccents,\n\t\t\t\t\tignoreCase: this.props.ignoreCase,\n\t\t\t\t\tlabelKey: this.props.labelKey,\n\t\t\t\t\tmatchPos: this.props.matchPos,\n\t\t\t\t\tmatchProp: this.props.matchProp,\n\t\t\t\t\ttrimFilter: this.props.trimFilter,\n\t\t\t\t\tvalueKey: this.props.valueKey\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn options;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'onOptionRef',\n\t\tvalue: function onOptionRef(ref, isFocused) {\n\t\t\tif (isFocused) {\n\t\t\t\tthis.focused = ref;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'renderMenu',\n\t\tvalue: function renderMenu(options, valueArray, focusedOption) {\n\t\t\tif (options && options.length) {\n\t\t\t\treturn this.props.menuRenderer({\n\t\t\t\t\tfocusedOption: focusedOption,\n\t\t\t\t\tfocusOption: this.focusOption,\n\t\t\t\t\tinputValue: this.state.inputValue,\n\t\t\t\t\tinstancePrefix: this._instancePrefix,\n\t\t\t\t\tlabelKey: this.props.labelKey,\n\t\t\t\t\tonFocus: this.focusOption,\n\t\t\t\t\tonOptionRef: this.onOptionRef,\n\t\t\t\t\tonSelect: this.selectValue,\n\t\t\t\t\toptionClassName: this.props.optionClassName,\n\t\t\t\t\toptionComponent: this.props.optionComponent,\n\t\t\t\t\toptionRenderer: this.props.optionRenderer || this.getOptionLabel,\n\t\t\t\t\toptions: options,\n\t\t\t\t\tremoveValue: this.removeValue,\n\t\t\t\t\tselectValue: this.selectValue,\n\t\t\t\t\tvalueArray: valueArray,\n\t\t\t\t\tvalueKey: this.props.valueKey\n\t\t\t\t});\n\t\t\t} else if (this.props.noResultsText) {\n\t\t\t\treturn React.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ className: 'Select-noresults' },\n\t\t\t\t\tthis.props.noResultsText\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'renderHiddenField',\n\t\tvalue: function renderHiddenField(valueArray) {\n\t\t\tvar _this7 = this;\n\n\t\t\tif (!this.props.name) return;\n\t\t\tif (this.props.joinValues) {\n\t\t\t\tvar value = valueArray.map(function (i) {\n\t\t\t\t\treturn stringifyValue(i[_this7.props.valueKey]);\n\t\t\t\t}).join(this.props.delimiter);\n\t\t\t\treturn React.createElement('input', {\n\t\t\t\t\tdisabled: this.props.disabled,\n\t\t\t\t\tname: this.props.name,\n\t\t\t\t\tref: function ref(_ref3) {\n\t\t\t\t\t\treturn _this7.value = _ref3;\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\tvalue: value\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn valueArray.map(function (item, index) {\n\t\t\t\treturn React.createElement('input', {\n\t\t\t\t\tdisabled: _this7.props.disabled,\n\t\t\t\t\tkey: 'hidden.' + index,\n\t\t\t\t\tname: _this7.props.name,\n\t\t\t\t\tref: 'value' + index,\n\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\tvalue: stringifyValue(item[_this7.props.valueKey])\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'getFocusableOptionIndex',\n\t\tvalue: function getFocusableOptionIndex(selectedOption) {\n\t\t\tvar options = this._visibleOptions;\n\t\t\tif (!options.length) return null;\n\n\t\t\tvar valueKey = this.props.valueKey;\n\t\t\tvar focusedOption = this.state.focusedOption || selectedOption;\n\t\t\tif (focusedOption && !focusedOption.disabled) {\n\t\t\t\tvar focusedOptionIndex = -1;\n\t\t\t\toptions.some(function (option, index) {\n\t\t\t\t\tvar isOptionEqual = option[valueKey] === focusedOption[valueKey];\n\t\t\t\t\tif (isOptionEqual) {\n\t\t\t\t\t\tfocusedOptionIndex = index;\n\t\t\t\t\t}\n\t\t\t\t\treturn isOptionEqual;\n\t\t\t\t});\n\t\t\t\tif (focusedOptionIndex !== -1) {\n\t\t\t\t\treturn focusedOptionIndex;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < options.length; i++) {\n\t\t\t\tif (!options[i].disabled) return i;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}, {\n\t\tkey: 'renderOuter',\n\t\tvalue: function renderOuter(options, valueArray, focusedOption) {\n\t\t\tvar _this8 = this;\n\n\t\t\tvar menu = this.renderMenu(options, valueArray, focusedOption);\n\t\t\tif (!menu) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ ref: function ref(_ref5) {\n\t\t\t\t\t\treturn _this8.menuContainer = _ref5;\n\t\t\t\t\t}, className: 'Select-menu-outer', style: this.props.menuContainerStyle },\n\t\t\t\tReact.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: 'Select-menu',\n\t\t\t\t\t\tid: this._instancePrefix + '-list',\n\t\t\t\t\t\tonMouseDown: this.handleMouseDownOnMenu,\n\t\t\t\t\t\tonScroll: this.handleMenuScroll,\n\t\t\t\t\t\tref: function ref(_ref4) {\n\t\t\t\t\t\t\treturn _this8.menu = _ref4;\n\t\t\t\t\t\t},\n\t\t\t\t\t\trole: 'listbox',\n\t\t\t\t\t\tstyle: this.props.menuStyle,\n\t\t\t\t\t\ttabIndex: -1\n\t\t\t\t\t},\n\t\t\t\t\tmenu\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar _this9 = this;\n\n\t\t\tvar valueArray = this.getValueArray(this.props.value);\n\t\t\tvar options = this._visibleOptions = this.filterOptions(this.props.multi && this.props.removeSelected ? valueArray : null);\n\t\t\tvar isOpen = this.state.isOpen;\n\t\t\tif (this.props.multi && !options.length && valueArray.length && !this.state.inputValue) isOpen = false;\n\t\t\tvar focusedOptionIndex = this.getFocusableOptionIndex(valueArray[0]);\n\n\t\t\tvar focusedOption = null;\n\t\t\tif (focusedOptionIndex !== null) {\n\t\t\t\tfocusedOption = this._focusedOption = options[focusedOptionIndex];\n\t\t\t} else {\n\t\t\t\tfocusedOption = this._focusedOption = null;\n\t\t\t}\n\t\t\tvar className = classNames('Select', this.props.className, {\n\t\t\t\t'has-value': valueArray.length,\n\t\t\t\t'is-clearable': this.props.clearable,\n\t\t\t\t'is-disabled': this.props.disabled,\n\t\t\t\t'is-focused': this.state.isFocused,\n\t\t\t\t'is-loading': this.props.isLoading,\n\t\t\t\t'is-open': isOpen,\n\t\t\t\t'is-pseudo-focused': this.state.isPseudoFocused,\n\t\t\t\t'is-searchable': this.props.searchable,\n\t\t\t\t'Select--multi': this.props.multi,\n\t\t\t\t'Select--rtl': this.props.rtl,\n\t\t\t\t'Select--single': !this.props.multi\n\t\t\t});\n\n\t\t\tvar removeMessage = null;\n\t\t\tif (this.props.multi && !this.props.disabled && valueArray.length && !this.state.inputValue && this.state.isFocused && this.props.backspaceRemoves) {\n\t\t\t\tremoveMessage = React.createElement(\n\t\t\t\t\t'span',\n\t\t\t\t\t{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only', 'aria-live': 'assertive' },\n\t\t\t\t\tthis.props.backspaceToRemoveMessage.replace('{label}', valueArray[valueArray.length - 1][this.props.labelKey])\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn React.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ ref: function ref(_ref7) {\n\t\t\t\t\t\treturn _this9.wrapper = _ref7;\n\t\t\t\t\t},\n\t\t\t\t\tclassName: className,\n\t\t\t\t\tstyle: this.props.wrapperStyle },\n\t\t\t\tthis.renderHiddenField(valueArray),\n\t\t\t\tReact.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: function ref(_ref6) {\n\t\t\t\t\t\t\treturn _this9.control = _ref6;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName: 'Select-control',\n\t\t\t\t\t\tonKeyDown: this.handleKeyDown,\n\t\t\t\t\t\tonMouseDown: this.handleMouseDown,\n\t\t\t\t\t\tonTouchEnd: this.handleTouchEnd,\n\t\t\t\t\t\tonTouchMove: this.handleTouchMove,\n\t\t\t\t\t\tonTouchStart: this.handleTouchStart,\n\t\t\t\t\t\tstyle: this.props.style\n\t\t\t\t\t},\n\t\t\t\t\tReact.createElement(\n\t\t\t\t\t\t'span',\n\t\t\t\t\t\t{ className: 'Select-multi-value-wrapper', id: this._instancePrefix + '-value' },\n\t\t\t\t\t\tthis.renderValue(valueArray, isOpen),\n\t\t\t\t\t\tthis.renderInput(valueArray, focusedOptionIndex)\n\t\t\t\t\t),\n\t\t\t\t\tremoveMessage,\n\t\t\t\t\tthis.renderLoading(),\n\t\t\t\t\tthis.renderClear(),\n\t\t\t\t\tthis.renderArrow()\n\t\t\t\t),\n\t\t\t\tisOpen ? this.renderOuter(options, valueArray, focusedOption) : null\n\t\t\t);\n\t\t}\n\t}]);\n\treturn Select;\n}(React.Component);\n\nSelect$1.propTypes = {\n\t'aria-describedby': PropTypes.string, // html id(s) of element(s) that should be used to describe this input (for assistive tech)\n\t'aria-label': PropTypes.string, // aria label (for assistive tech)\n\t'aria-labelledby': PropTypes.string, // html id of an element that should be used as the label (for assistive tech)\n\tarrowRenderer: PropTypes.func, // create the drop-down caret element\n\tautoBlur: PropTypes.bool, // automatically blur the component when an option is selected\n\tautoFocus: PropTypes.bool, // autofocus the component on mount\n\tautofocus: PropTypes.bool, // deprecated; use autoFocus instead\n\tautosize: PropTypes.bool, // whether to enable autosizing or not\n\tbackspaceRemoves: PropTypes.bool, // whether backspace removes an item if there is no text input\n\tbackspaceToRemoveMessage: PropTypes.string, // message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label\n\tclassName: PropTypes.string, // className for the outer element\n\tclearAllText: stringOrNode, // title for the \"clear\" control when multi: true\n\tclearRenderer: PropTypes.func, // create clearable x element\n\tclearValueText: stringOrNode, // title for the \"clear\" control\n\tclearable: PropTypes.bool, // should it be possible to reset value\n\tcloseOnSelect: PropTypes.bool, // whether to close the menu when a value is selected\n\tdeleteRemoves: PropTypes.bool, // whether delete removes an item if there is no text input\n\tdelimiter: PropTypes.string, // delimiter to use to join multiple values for the hidden field value\n\tdisabled: PropTypes.bool, // whether the Select is disabled or not\n\tescapeClearsValue: PropTypes.bool, // whether escape clears the value when the menu is closed\n\tfilterOption: PropTypes.func, // method to filter a single option (option, filterString)\n\tfilterOptions: PropTypes.any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])\n\tid: PropTypes.string, // html id to set on the input element for accessibility or tests\n\tignoreAccents: PropTypes.bool, // whether to strip diacritics when filtering\n\tignoreCase: PropTypes.bool, // whether to perform case-insensitive filtering\n\tinputProps: PropTypes.object, // custom attributes for the Input\n\tinputRenderer: PropTypes.func, // returns a custom input component\n\tinstanceId: PropTypes.string, // set the components instanceId\n\tisLoading: PropTypes.bool, // whether the Select is loading externally or not (such as options being loaded)\n\tjoinValues: PropTypes.bool, // joins multiple values into a single form field with the delimiter (legacy mode)\n\tlabelKey: PropTypes.string, // path of the label value in option objects\n\tmatchPos: PropTypes.string, // (any|start) match the start or entire string when filtering\n\tmatchProp: PropTypes.string, // (any|label|value) which option property to filter on\n\tmenuBuffer: PropTypes.number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu\n\tmenuContainerStyle: PropTypes.object, // optional style to apply to the menu container\n\tmenuRenderer: PropTypes.func, // renders a custom menu with options\n\tmenuStyle: PropTypes.object, // optional style to apply to the menu\n\tmulti: PropTypes.bool, // multi-value input\n\tname: PropTypes.string, // generates a hidden <input /> tag with this field name for html forms\n\tnoResultsText: stringOrNode, // placeholder displayed when there are no matching search results\n\tonBlur: PropTypes.func, // onBlur handler: function (event) {}\n\tonBlurResetsInput: PropTypes.bool, // whether input is cleared on blur\n\tonChange: PropTypes.func, // onChange handler: function (newValue) {}\n\tonClose: PropTypes.func, // fires when the menu is closed\n\tonCloseResetsInput: PropTypes.bool, // whether input is cleared when menu is closed through the arrow\n\tonFocus: PropTypes.func, // onFocus handler: function (event) {}\n\tonInputChange: PropTypes.func, // onInputChange handler: function (inputValue) {}\n\tonInputKeyDown: PropTypes.func, // input keyDown handler: function (event) {}\n\tonMenuScrollToBottom: PropTypes.func, // fires when the menu is scrolled to the bottom; can be used to paginate options\n\tonOpen: PropTypes.func, // fires when the menu is opened\n\tonSelectResetsInput: PropTypes.bool, // whether input is cleared on select (works only for multiselect)\n\tonValueClick: PropTypes.func, // onClick handler for value labels: function (value, event) {}\n\topenOnClick: PropTypes.bool, // boolean to control opening the menu when the control is clicked\n\topenOnFocus: PropTypes.bool, // always open options menu on focus\n\toptionClassName: PropTypes.string, // additional class(es) to apply to the <Option /> elements\n\toptionComponent: PropTypes.func, // option component to render in dropdown\n\toptionRenderer: PropTypes.func, // optionRenderer: function (option) {}\n\toptions: PropTypes.array, // array of options\n\tpageSize: PropTypes.number, // number of entries to page when using page up/down keys\n\tplaceholder: stringOrNode, // field placeholder, displayed when there's no value\n\tremoveSelected: PropTypes.bool, // whether the selected option is removed from the dropdown on multi selects\n\trequired: PropTypes.bool, // applies HTML5 required attribute when needed\n\tresetValue: PropTypes.any, // value to use when you clear the control\n\trtl: PropTypes.bool, // set to true in order to use react-select in right-to-left direction\n\tscrollMenuIntoView: PropTypes.bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged\n\tsearchable: PropTypes.bool, // whether to enable searching feature or not\n\tsimpleValue: PropTypes.bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false\n\tstyle: PropTypes.object, // optional style to apply to the control\n\ttabIndex: stringOrNumber, // optional tab index of the control\n\ttabSelectsValue: PropTypes.bool, // whether to treat tabbing out while focused to be value selection\n\ttrimFilter: PropTypes.bool, // whether to trim whitespace around filter value\n\tvalue: PropTypes.any, // initial field value\n\tvalueComponent: PropTypes.func, // value component to render\n\tvalueKey: PropTypes.string, // path of the label value in option objects\n\tvalueRenderer: PropTypes.func, // valueRenderer: function (option) {}\n\twrapperStyle: PropTypes.object // optional style to apply to the component wrapper\n};\n\nSelect$1.defaultProps = {\n\tarrowRenderer: arrowRenderer,\n\tautosize: true,\n\tbackspaceRemoves: true,\n\tbackspaceToRemoveMessage: 'Press backspace to remove {label}',\n\tclearable: true,\n\tclearAllText: 'Clear all',\n\tclearRenderer: clearRenderer,\n\tclearValueText: 'Clear value',\n\tcloseOnSelect: true,\n\tdeleteRemoves: true,\n\tdelimiter: ',',\n\tdisabled: false,\n\tescapeClearsValue: true,\n\tfilterOptions: filterOptions,\n\tignoreAccents: true,\n\tignoreCase: true,\n\tinputProps: {},\n\tisLoading: false,\n\tjoinValues: false,\n\tlabelKey: 'label',\n\tmatchPos: 'any',\n\tmatchProp: 'any',\n\tmenuBuffer: 0,\n\tmenuRenderer: menuRenderer,\n\tmulti: false,\n\tnoResultsText: 'No results found',\n\tonBlurResetsInput: true,\n\tonCloseResetsInput: true,\n\tonSelectResetsInput: true,\n\topenOnClick: true,\n\toptionComponent: Option,\n\tpageSize: 5,\n\tplaceholder: 'Select...',\n\tremoveSelected: true,\n\trequired: false,\n\trtl: false,\n\tscrollMenuIntoView: true,\n\tsearchable: true,\n\tsimpleValue: false,\n\ttabSelectsValue: true,\n\ttrimFilter: true,\n\tvalueComponent: Value,\n\tvalueKey: 'value'\n};\n\nvar propTypes = {\n\tautoload: PropTypes.bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true\n\tcache: PropTypes.any, // object to use to cache results; set to null/false to disable caching\n\tchildren: PropTypes.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element\n\tignoreAccents: PropTypes.bool, // strip diacritics when filtering; defaults to true\n\tignoreCase: PropTypes.bool, // perform case-insensitive filtering; defaults to true\n\tloadOptions: PropTypes.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise\n\tloadingPlaceholder: PropTypes.oneOfType([// replaces the placeholder while options are loading\n\tPropTypes.string, PropTypes.node]),\n\tmulti: PropTypes.bool, // multi-value input\n\tnoResultsText: PropTypes.oneOfType([// field noResultsText, displayed when no options come back from the server\n\tPropTypes.string, PropTypes.node]),\n\tonChange: PropTypes.func, // onChange handler: function (newValue) {}\n\tonInputChange: PropTypes.func, // optional for keeping track of what is being typed\n\toptions: PropTypes.array.isRequired, // array of options\n\tplaceholder: PropTypes.oneOfType([// field placeholder, displayed when there's no value (shared with Select)\n\tPropTypes.string, PropTypes.node]),\n\tsearchPromptText: PropTypes.oneOfType([// label to prompt for search input\n\tPropTypes.string, PropTypes.node]),\n\tvalue: PropTypes.any // initial field value\n};\n\nvar defaultCache = {};\n\nvar defaultChildren = function defaultChildren(props) {\n\treturn React.createElement(Select$1, props);\n};\n\nvar defaultProps = {\n\tautoload: true,\n\tcache: defaultCache,\n\tchildren: defaultChildren,\n\tignoreAccents: true,\n\tignoreCase: true,\n\tloadingPlaceholder: 'Loading...',\n\toptions: [],\n\tsearchPromptText: 'Type to search'\n};\n\nvar Async = function (_Component) {\n\tinherits(Async, _Component);\n\n\tfunction Async(props, context) {\n\t\tclassCallCheck(this, Async);\n\n\t\tvar _this = possibleConstructorReturn(this, (Async.__proto__ || Object.getPrototypeOf(Async)).call(this, props, context));\n\n\t\t_this._cache = props.cache === defaultCache ? {} : props.cache;\n\n\t\t_this.state = {\n\t\t\tinputValue: '',\n\t\t\tisLoading: false,\n\t\t\toptions: props.options\n\t\t};\n\n\t\t_this.onInputChange = _this.onInputChange.bind(_this);\n\t\treturn _this;\n\t}\n\n\tcreateClass(Async, [{\n\t\tkey: 'componentDidMount',\n\t\tvalue: function componentDidMount() {\n\t\t\tvar autoload = this.props.autoload;\n\n\n\t\t\tif (autoload) {\n\t\t\t\tthis.loadOptions('');\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentWillReceiveProps',\n\t\tvalue: function componentWillReceiveProps(nextProps) {\n\t\t\tif (nextProps.options !== this.props.options) {\n\t\t\t\tthis.setState({\n\t\t\t\t\toptions: nextProps.options\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentWillUnmount',\n\t\tvalue: function componentWillUnmount() {\n\t\t\tthis._callback = null;\n\t\t}\n\t}, {\n\t\tkey: 'loadOptions',\n\t\tvalue: function loadOptions(inputValue) {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar loadOptions = this.props.loadOptions;\n\n\t\t\tvar cache = this._cache;\n\n\t\t\tif (cache && Object.prototype.hasOwnProperty.call(cache, inputValue)) {\n\t\t\t\tthis._callback = null;\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tisLoading: false,\n\t\t\t\t\toptions: cache[inputValue]\n\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar callback = function callback(error, data) {\n\t\t\t\tvar options = data && data.options || [];\n\n\t\t\t\tif (cache) {\n\t\t\t\t\tcache[inputValue] = options;\n\t\t\t\t}\n\n\t\t\t\tif (callback === _this2._callback) {\n\t\t\t\t\t_this2._callback = null;\n\n\t\t\t\t\t_this2.setState({\n\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\toptions: options\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Ignore all but the most recent request\n\t\t\tthis._callback = callback;\n\n\t\t\tvar promise = loadOptions(inputValue, callback);\n\t\t\tif (promise) {\n\t\t\t\tpromise.then(function (data) {\n\t\t\t\t\treturn callback(null, data);\n\t\t\t\t}, function (error) {\n\t\t\t\t\treturn callback(error);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this._callback && !this.state.isLoading) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisLoading: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'onInputChange',\n\t\tvalue: function onInputChange(inputValue) {\n\t\t\tvar _props = this.props,\n\t\t\t    ignoreAccents = _props.ignoreAccents,\n\t\t\t    ignoreCase = _props.ignoreCase,\n\t\t\t    onInputChange = _props.onInputChange;\n\n\t\t\tvar newInputValue = inputValue;\n\n\t\t\tif (onInputChange) {\n\t\t\t\tvar value = onInputChange(newInputValue);\n\t\t\t\t// Note: != used deliberately here to catch undefined and null\n\t\t\t\tif (value != null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object') {\n\t\t\t\t\tnewInputValue = '' + value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar transformedInputValue = newInputValue;\n\n\t\t\tif (ignoreAccents) {\n\t\t\t\ttransformedInputValue = stripDiacritics(transformedInputValue);\n\t\t\t}\n\n\t\t\tif (ignoreCase) {\n\t\t\t\ttransformedInputValue = transformedInputValue.toLowerCase();\n\t\t\t}\n\n\t\t\tthis.setState({ inputValue: newInputValue });\n\t\t\tthis.loadOptions(transformedInputValue);\n\n\t\t\t// Return new input value, but without applying toLowerCase() to avoid modifying the user's view case of the input while typing.\n\t\t\treturn newInputValue;\n\t\t}\n\t}, {\n\t\tkey: 'noResultsText',\n\t\tvalue: function noResultsText() {\n\t\t\tvar _props2 = this.props,\n\t\t\t    loadingPlaceholder = _props2.loadingPlaceholder,\n\t\t\t    noResultsText = _props2.noResultsText,\n\t\t\t    searchPromptText = _props2.searchPromptText;\n\t\t\tvar _state = this.state,\n\t\t\t    inputValue = _state.inputValue,\n\t\t\t    isLoading = _state.isLoading;\n\n\n\t\t\tif (isLoading) {\n\t\t\t\treturn loadingPlaceholder;\n\t\t\t}\n\t\t\tif (inputValue && noResultsText) {\n\t\t\t\treturn noResultsText;\n\t\t\t}\n\t\t\treturn searchPromptText;\n\t\t}\n\t}, {\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tthis.select.focus();\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar _this3 = this;\n\n\t\t\tvar _props3 = this.props,\n\t\t\t    children = _props3.children,\n\t\t\t    loadingPlaceholder = _props3.loadingPlaceholder,\n\t\t\t    placeholder = _props3.placeholder;\n\t\t\tvar _state2 = this.state,\n\t\t\t    isLoading = _state2.isLoading,\n\t\t\t    options = _state2.options;\n\n\n\t\t\tvar props = {\n\t\t\t\tnoResultsText: this.noResultsText(),\n\t\t\t\tplaceholder: isLoading ? loadingPlaceholder : placeholder,\n\t\t\t\toptions: isLoading && loadingPlaceholder ? [] : options,\n\t\t\t\tref: function ref(_ref) {\n\t\t\t\t\treturn _this3.select = _ref;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treturn children(_extends({}, this.props, props, {\n\t\t\t\tisLoading: isLoading,\n\t\t\t\tonInputChange: this.onInputChange\n\t\t\t}));\n\t\t}\n\t}]);\n\treturn Async;\n}(Component);\n\nAsync.propTypes = propTypes;\nAsync.defaultProps = defaultProps;\n\nvar CreatableSelect = function (_React$Component) {\n\tinherits(CreatableSelect, _React$Component);\n\n\tfunction CreatableSelect(props, context) {\n\t\tclassCallCheck(this, CreatableSelect);\n\n\t\tvar _this = possibleConstructorReturn(this, (CreatableSelect.__proto__ || Object.getPrototypeOf(CreatableSelect)).call(this, props, context));\n\n\t\t_this.filterOptions = _this.filterOptions.bind(_this);\n\t\t_this.menuRenderer = _this.menuRenderer.bind(_this);\n\t\t_this.onInputKeyDown = _this.onInputKeyDown.bind(_this);\n\t\t_this.onInputChange = _this.onInputChange.bind(_this);\n\t\t_this.onOptionSelect = _this.onOptionSelect.bind(_this);\n\t\treturn _this;\n\t}\n\n\tcreateClass(CreatableSelect, [{\n\t\tkey: 'createNewOption',\n\t\tvalue: function createNewOption() {\n\t\t\tvar _props = this.props,\n\t\t\t    isValidNewOption = _props.isValidNewOption,\n\t\t\t    newOptionCreator = _props.newOptionCreator,\n\t\t\t    onNewOptionClick = _props.onNewOptionClick,\n\t\t\t    _props$options = _props.options,\n\t\t\t    options = _props$options === undefined ? [] : _props$options;\n\n\n\t\t\tif (isValidNewOption({ label: this.inputValue })) {\n\t\t\t\tvar option = newOptionCreator({ label: this.inputValue, labelKey: this.labelKey, valueKey: this.valueKey });\n\t\t\t\tvar _isOptionUnique = this.isOptionUnique({ option: option, options: options });\n\n\t\t\t\t// Don't add the same option twice.\n\t\t\t\tif (_isOptionUnique) {\n\t\t\t\t\tif (onNewOptionClick) {\n\t\t\t\t\t\tonNewOptionClick(option);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptions.unshift(option);\n\n\t\t\t\t\t\tthis.select.selectValue(option);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'filterOptions',\n\t\tvalue: function filterOptions$$1() {\n\t\t\tvar _props2 = this.props,\n\t\t\t    filterOptions$$1 = _props2.filterOptions,\n\t\t\t    isValidNewOption = _props2.isValidNewOption,\n\t\t\t    promptTextCreator = _props2.promptTextCreator;\n\n\t\t\t// TRICKY Check currently selected options as well.\n\t\t\t// Don't display a create-prompt for a value that's selected.\n\t\t\t// This covers async edge-cases where a newly-created Option isn't yet in the async-loaded array.\n\n\t\t\tvar excludeOptions = (arguments.length <= 2 ? undefined : arguments[2]) || [];\n\n\t\t\tvar filteredOptions = filterOptions$$1.apply(undefined, arguments) || [];\n\n\t\t\tif (isValidNewOption({ label: this.inputValue })) {\n\t\t\t\tvar _newOptionCreator = this.props.newOptionCreator;\n\n\n\t\t\t\tvar option = _newOptionCreator({\n\t\t\t\t\tlabel: this.inputValue,\n\t\t\t\t\tlabelKey: this.labelKey,\n\t\t\t\t\tvalueKey: this.valueKey\n\t\t\t\t});\n\n\t\t\t\t// TRICKY Compare to all options (not just filtered options) in case option has already been selected).\n\t\t\t\t// For multi-selects, this would remove it from the filtered list.\n\t\t\t\tvar _isOptionUnique2 = this.isOptionUnique({\n\t\t\t\t\toption: option,\n\t\t\t\t\toptions: excludeOptions.concat(filteredOptions)\n\t\t\t\t});\n\n\t\t\t\tif (_isOptionUnique2) {\n\t\t\t\t\tvar prompt = promptTextCreator(this.inputValue);\n\n\t\t\t\t\tthis._createPlaceholderOption = _newOptionCreator({\n\t\t\t\t\t\tlabel: prompt,\n\t\t\t\t\t\tlabelKey: this.labelKey,\n\t\t\t\t\t\tvalueKey: this.valueKey\n\t\t\t\t\t});\n\n\t\t\t\t\tfilteredOptions.unshift(this._createPlaceholderOption);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn filteredOptions;\n\t\t}\n\t}, {\n\t\tkey: 'isOptionUnique',\n\t\tvalue: function isOptionUnique(_ref) {\n\t\t\tvar option = _ref.option,\n\t\t\t    options = _ref.options;\n\t\t\tvar isOptionUnique = this.props.isOptionUnique;\n\n\n\t\t\toptions = options || this.props.options;\n\n\t\t\treturn isOptionUnique({\n\t\t\t\tlabelKey: this.labelKey,\n\t\t\t\toption: option,\n\t\t\t\toptions: options,\n\t\t\t\tvalueKey: this.valueKey\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'menuRenderer',\n\t\tvalue: function menuRenderer$$1(params) {\n\t\t\tvar menuRenderer$$1 = this.props.menuRenderer;\n\n\n\t\t\treturn menuRenderer$$1(_extends({}, params, {\n\t\t\t\tonSelect: this.onOptionSelect,\n\t\t\t\tselectValue: this.onOptionSelect\n\t\t\t}));\n\t\t}\n\t}, {\n\t\tkey: 'onInputChange',\n\t\tvalue: function onInputChange(input) {\n\t\t\tvar onInputChange = this.props.onInputChange;\n\n\t\t\t// This value may be needed in between Select mounts (when this.select is null)\n\n\t\t\tthis.inputValue = input;\n\n\t\t\tif (onInputChange) {\n\t\t\t\tthis.inputValue = onInputChange(input);\n\t\t\t}\n\n\t\t\treturn this.inputValue;\n\t\t}\n\t}, {\n\t\tkey: 'onInputKeyDown',\n\t\tvalue: function onInputKeyDown(event) {\n\t\t\tvar _props3 = this.props,\n\t\t\t    shouldKeyDownEventCreateNewOption = _props3.shouldKeyDownEventCreateNewOption,\n\t\t\t    onInputKeyDown = _props3.onInputKeyDown;\n\n\t\t\tvar focusedOption = this.select.getFocusedOption();\n\n\t\t\tif (focusedOption && focusedOption === this._createPlaceholderOption && shouldKeyDownEventCreateNewOption({ keyCode: event.keyCode })) {\n\t\t\t\tthis.createNewOption();\n\n\t\t\t\t// Prevent decorated Select from doing anything additional with this keyDown event\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if (onInputKeyDown) {\n\t\t\t\tonInputKeyDown(event);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'onOptionSelect',\n\t\tvalue: function onOptionSelect(option) {\n\t\t\tif (option === this._createPlaceholderOption) {\n\t\t\t\tthis.createNewOption();\n\t\t\t} else {\n\t\t\t\tthis.select.selectValue(option);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tthis.select.focus();\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar _props4 = this.props,\n\t\t\t    refProp = _props4.ref,\n\t\t\t    restProps = objectWithoutProperties(_props4, ['ref']);\n\t\t\tvar children = this.props.children;\n\n\t\t\t// We can't use destructuring default values to set the children,\n\t\t\t// because it won't apply work if `children` is null. A falsy check is\n\t\t\t// more reliable in real world use-cases.\n\n\t\t\tif (!children) {\n\t\t\t\tchildren = defaultChildren$2;\n\t\t\t}\n\n\t\t\tvar props = _extends({}, restProps, {\n\t\t\t\tallowCreate: true,\n\t\t\t\tfilterOptions: this.filterOptions,\n\t\t\t\tmenuRenderer: this.menuRenderer,\n\t\t\t\tonInputChange: this.onInputChange,\n\t\t\t\tonInputKeyDown: this.onInputKeyDown,\n\t\t\t\tref: function ref(_ref2) {\n\t\t\t\t\t_this2.select = _ref2;\n\n\t\t\t\t\t// These values may be needed in between Select mounts (when this.select is null)\n\t\t\t\t\tif (_ref2) {\n\t\t\t\t\t\t_this2.labelKey = _ref2.props.labelKey;\n\t\t\t\t\t\t_this2.valueKey = _ref2.props.valueKey;\n\t\t\t\t\t}\n\t\t\t\t\tif (refProp) {\n\t\t\t\t\t\trefProp(_ref2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn children(props);\n\t\t}\n\t}]);\n\treturn CreatableSelect;\n}(React.Component);\n\nvar defaultChildren$2 = function defaultChildren(props) {\n\treturn React.createElement(Select$1, props);\n};\n\nvar isOptionUnique = function isOptionUnique(_ref3) {\n\tvar option = _ref3.option,\n\t    options = _ref3.options,\n\t    labelKey = _ref3.labelKey,\n\t    valueKey = _ref3.valueKey;\n\n\tif (!options || !options.length) {\n\t\treturn true;\n\t}\n\n\treturn options.filter(function (existingOption) {\n\t\treturn existingOption[labelKey] === option[labelKey] || existingOption[valueKey] === option[valueKey];\n\t}).length === 0;\n};\n\nvar isValidNewOption = function isValidNewOption(_ref4) {\n\tvar label = _ref4.label;\n\treturn !!label;\n};\n\nvar newOptionCreator = function newOptionCreator(_ref5) {\n\tvar label = _ref5.label,\n\t    labelKey = _ref5.labelKey,\n\t    valueKey = _ref5.valueKey;\n\n\tvar option = {};\n\toption[valueKey] = label;\n\toption[labelKey] = label;\n\toption.className = 'Select-create-option-placeholder';\n\n\treturn option;\n};\n\nvar promptTextCreator = function promptTextCreator(label) {\n\treturn 'Create option \"' + label + '\"';\n};\n\nvar shouldKeyDownEventCreateNewOption = function shouldKeyDownEventCreateNewOption(_ref6) {\n\tvar keyCode = _ref6.keyCode;\n\n\tswitch (keyCode) {\n\t\tcase 9: // TAB\n\t\tcase 13: // ENTER\n\t\tcase 188:\n\t\t\t// COMMA\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn false;\n\t}\n};\n\n// Default prop methods\nCreatableSelect.isOptionUnique = isOptionUnique;\nCreatableSelect.isValidNewOption = isValidNewOption;\nCreatableSelect.newOptionCreator = newOptionCreator;\nCreatableSelect.promptTextCreator = promptTextCreator;\nCreatableSelect.shouldKeyDownEventCreateNewOption = shouldKeyDownEventCreateNewOption;\n\nCreatableSelect.defaultProps = {\n\tfilterOptions: filterOptions,\n\tisOptionUnique: isOptionUnique,\n\tisValidNewOption: isValidNewOption,\n\tmenuRenderer: menuRenderer,\n\tnewOptionCreator: newOptionCreator,\n\tpromptTextCreator: promptTextCreator,\n\tshouldKeyDownEventCreateNewOption: shouldKeyDownEventCreateNewOption\n};\n\nCreatableSelect.propTypes = {\n\t// Child function responsible for creating the inner Select component\n\t// This component can be used to compose HOCs (eg Creatable and Async)\n\t// (props: Object): PropTypes.element\n\tchildren: PropTypes.func,\n\n\t// See Select.propTypes.filterOptions\n\tfilterOptions: PropTypes.any,\n\n\t// Searches for any matching option within the set of options.\n\t// This function prevents duplicate options from being created.\n\t// ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean\n\tisOptionUnique: PropTypes.func,\n\n\t// Determines if the current input text represents a valid option.\n\t// ({ label: string }): boolean\n\tisValidNewOption: PropTypes.func,\n\n\t// See Select.propTypes.menuRenderer\n\tmenuRenderer: PropTypes.any,\n\n\t// Factory to create new option.\n\t// ({ label: string, labelKey: string, valueKey: string }): Object\n\tnewOptionCreator: PropTypes.func,\n\n\t// input change handler: function (inputValue) {}\n\tonInputChange: PropTypes.func,\n\n\t// input keyDown handler: function (event) {}\n\tonInputKeyDown: PropTypes.func,\n\n\t// new option click handler: function (option) {}\n\tonNewOptionClick: PropTypes.func,\n\n\t// See Select.propTypes.options\n\toptions: PropTypes.array,\n\n\t// Creates prompt/placeholder option text.\n\t// (filterText: string): string\n\tpromptTextCreator: PropTypes.func,\n\n\tref: PropTypes.func,\n\n\t// Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option.\n\tshouldKeyDownEventCreateNewOption: PropTypes.func\n};\n\nvar AsyncCreatableSelect = function (_React$Component) {\n\tinherits(AsyncCreatableSelect, _React$Component);\n\n\tfunction AsyncCreatableSelect() {\n\t\tclassCallCheck(this, AsyncCreatableSelect);\n\t\treturn possibleConstructorReturn(this, (AsyncCreatableSelect.__proto__ || Object.getPrototypeOf(AsyncCreatableSelect)).apply(this, arguments));\n\t}\n\n\tcreateClass(AsyncCreatableSelect, [{\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tthis.select.focus();\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar _this2 = this;\n\n\t\t\treturn React.createElement(\n\t\t\t\tAsync,\n\t\t\t\tthis.props,\n\t\t\t\tfunction (_ref) {\n\t\t\t\t\tvar ref = _ref.ref,\n\t\t\t\t\t    asyncProps = objectWithoutProperties(_ref, ['ref']);\n\n\t\t\t\t\tvar asyncRef = ref;\n\t\t\t\t\treturn React.createElement(\n\t\t\t\t\t\tCreatableSelect,\n\t\t\t\t\t\tasyncProps,\n\t\t\t\t\t\tfunction (_ref2) {\n\t\t\t\t\t\t\tvar ref = _ref2.ref,\n\t\t\t\t\t\t\t    creatableProps = objectWithoutProperties(_ref2, ['ref']);\n\n\t\t\t\t\t\t\tvar creatableRef = ref;\n\t\t\t\t\t\t\treturn _this2.props.children(_extends({}, creatableProps, {\n\t\t\t\t\t\t\t\tref: function ref(select) {\n\t\t\t\t\t\t\t\t\tcreatableRef(select);\n\t\t\t\t\t\t\t\t\tasyncRef(select);\n\t\t\t\t\t\t\t\t\t_this2.select = select;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}]);\n\treturn AsyncCreatableSelect;\n}(React.Component);\n\nvar defaultChildren$1 = function defaultChildren(props) {\n\treturn React.createElement(Select$1, props);\n};\n\nAsyncCreatableSelect.propTypes = {\n\tchildren: PropTypes.func.isRequired // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element\n};\n\nAsyncCreatableSelect.defaultProps = {\n\tchildren: defaultChildren$1\n};\n\nSelect$1.Async = Async;\nSelect$1.AsyncCreatable = AsyncCreatableSelect;\nSelect$1.Creatable = CreatableSelect;\nSelect$1.Value = Value;\nSelect$1.Option = Option;\n\nexport { Async, AsyncCreatableSelect as AsyncCreatable, CreatableSelect as Creatable, Value, Option, menuRenderer as defaultMenuRenderer, arrowRenderer as defaultArrowRenderer, clearRenderer as defaultClearRenderer, filterOptions as defaultFilterOptions };\nexport default Select$1;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ReactSelectClass, {\n  ReactAsyncSelectProps,\n  ReactCreatableSelectProps,\n  ReactSelectProps\n} from 'react-select';\nimport { lazyLoadComponent } from '../lazyLoadComponent';\nimport { ClearButton } from './buttons';\nimport './Select.css';\n\nconst ReactSelectLib = import('react-select');\nconst ReactSelect = lazyLoadComponent(() => ReactSelectLib);\nconst ReactCreatable = lazyLoadComponent(() =>\n  ReactSelectLib.then(lib => ({ default: lib.Creatable }))\n);\nconst ReactAsync = lazyLoadComponent(() => ReactSelectLib.then(lib => ({ default: lib.Async })));\n\nfunction renderInput() {\n  return <ClearButton className=\"button-tiny spacer-left text-middle\" iconProps={{ size: 12 }} />;\n}\n\nexport interface WithInnerRef {\n  innerRef?: React.Ref<ReactSelectClass<unknown>>;\n}\n\nexport default function Select({ innerRef, ...props }: WithInnerRef & ReactSelectProps) {\n  // hide the \"x\" icon when select is empty\n  const clearable = props.clearable ? Boolean(props.value) : false;\n  return (\n    <ReactSelect {...props} clearable={clearable} clearRenderer={renderInput} ref={innerRef} />\n  );\n}\n\nexport function Creatable(props: ReactCreatableSelectProps) {\n  return <ReactCreatable {...props} clearRenderer={renderInput} />;\n}\n\nexport function AsyncSelect(props: ReactAsyncSelectProps & WithInnerRef) {\n  return <ReactAsync {...props} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nconst qualifierIcons: T.Dict<(props: IconProps) => React.ReactElement> = {\n  app: ApplicationIcon,\n  brc: SubProjectIcon,\n  dev: DeveloperIcon,\n  dir: DirectoryIcon,\n  fil: FileIcon,\n  svw: SubPortfolioIcon,\n  trk: ProjectIcon,\n  uts: UnitTestIcon,\n  vw: PortfolioIcon,\n\n  // deprecated:\n  cla: UnitTestIcon,\n  dev_prj: ProjectIcon,\n  lib: LibraryIcon,\n  pac: DirectoryIcon\n};\n\ninterface QualifierIconProps {\n  className?: string;\n  fill?: string;\n  qualifier: string | null | undefined;\n}\n\nexport default function QualifierIcon(props: QualifierIconProps) {\n  if (!props.qualifier) {\n    return null;\n  }\n\n  const qualifier = props.qualifier.toLowerCase();\n  const FoundIcon = qualifierIcons[qualifier];\n  return FoundIcon ? <FoundIcon className={props.className} fill={props.fill} /> : null;\n}\n\nfunction ApplicationIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M3.014 10.986a2 2 0 1 1-.001 4.001 2 2 0 0 1 .001-4.001zm9.984 0a2 2 0 1 1-.001 4.001 2 2 0 0 1 .001-4.001zm-5.004-.021c1.103 0 2 .896 2 2s-.897 2-2 2a2 2 0 0 1 0-4zm-4.98 1.021a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm9.984 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm-5.004-.021a1 1 0 1 1 0 2 1 1 0 0 1 0-2zM2.984 6a2 2 0 1 1-.001 4.001A2 2 0 0 1 2.984 6zm9.984 0a2 2 0 1 1-.001 4.001A2 2 0 0 1 12.968 6zm-5.004-.021c1.103 0 2 .897 2 2a2 2 0 1 1-2-2zM2.984 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm9.984 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm-5.004-.021a1.001 1.001 0 0 1 0 2 1 1 0 0 1 0-2zM3 1.025a2 2 0 1 1-.001 4.001A2 2 0 0 1 3 1.025zm9.984 0a2 2 0 1 1-.001 4.001 2 2 0 0 1 .001-4.001zM7.98 1.004c1.103 0 2 .896 2 2s-.897 2-2 2a2 2 0 0 1 0-4zM3 2.025a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm9.984 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2zM7.98 2.004a1.001 1.001 0 0 1 0 2 1 1 0 0 1 0-2z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction DeveloperIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M7.974 8.02a3.5 3.5 0 0 1-2.482-1.017 3.428 3.428 0 0 1-1.028-2.455c0-.927.365-1.8 1.028-2.455a3.505 3.505 0 0 1 2.482-1.017 3.5 3.5 0 0 1 2.482 1.017 3.434 3.434 0 0 1 1.027 2.455c0 .928-.365 1.8-1.027 2.455A3.504 3.504 0 0 1 7.974 8.02zm0-5.778c-1.286 0-2.332 1.034-2.332 2.306s1.046 2.307 2.332 2.307c1.285 0 2.332-1.035 2.332-2.307S9.258 2.242 7.974 2.242zm3.534 6.418c.127.016.243.045.348.086.17.066.302.146.406.246.132.124.253.282.36.47.126.218.226.442.3.668.08.253.15.535.206.838.056.313.095.604.113.867.02.28.03.57.03.862 0 .532-.174.758-.306.882-.142.132-.397.31-.973.31H3.948c-.233 0-.437-.03-.606-.09-.14-.05-.26-.123-.366-.222-.13-.123-.306-.35-.306-.88 0-.294.01-.584.03-.863.018-.263.056-.554.112-.867a6.5 6.5 0 0 1 .207-.838c.073-.226.173-.45.298-.667.108-.19.23-.347.36-.47.106-.1.238-.18.407-.247.105-.04.22-.07.348-.086.202.13.432.277.683.435.342.217.756.4 1.265.564.523.166 1.06.25 1.59.25a5.25 5.25 0 0 0 1.592-.25c.51-.164.923-.348 1.266-.565.25-.158.48-.304.682-.435l-.002.002zm-.244-1.18c-.055 0-.184.066-.387.196-.202.13-.43.276-.685.437-.255.16-.586.307-.994.437-.408.13-.818.196-1.23.196-.41 0-.82-.065-1.228-.196a4.303 4.303 0 0 1-.993-.437c-.255-.16-.484-.306-.686-.437-.202-.13-.33-.196-.386-.196-.374 0-.716.06-1.026.183-.31.12-.572.283-.787.487a3.28 3.28 0 0 0-.57.737 4.662 4.662 0 0 0-.395.888c-.098.303-.18.633-.244.988a9.652 9.652 0 0 0-.128.992c-.02.306-.032.62-.032.942 0 .73.224 1.304.672 1.726.448.42 1.043.632 1.785.632h8.044c.743 0 1.34-.21 1.787-.633.447-.42.67-.996.67-1.725 0-.32-.01-.635-.03-.942a9.159 9.159 0 0 0-.374-1.98c-.098-.304-.23-.6-.395-.888a3.23 3.23 0 0 0-.57-.737 2.404 2.404 0 0 0-.788-.487 2.779 2.779 0 0 0-1.026-.183h-.004z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction DirectoryIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14 12.286V5.703a.673.673 0 0 0-.195-.5.644.644 0 0 0-.49-.203H6.704a.686.686 0 0 1-.5-.214.707.707 0 0 1-.203-.51v-.57c0-.2-.07-.363-.207-.502A.679.679 0 0 0 5.29 3H2.707a.672.672 0 0 0-.5.204.683.683 0 0 0-.206.5v8.582c0 .2.07.367.206.506.137.14.304.208.5.208h10.61a.66.66 0 0 0 .49-.208.685.685 0 0 0 .194-.506H14zm1-6.598v6.65c0 .458-.152.83-.475 1.16-.324.326-.7.502-1.15.502H2.647c-.452 0-.84-.175-1.162-.503a1.572 1.572 0 0 1-.486-1.158V3.654a1.6 1.6 0 0 1 .486-1.17A1.578 1.578 0 0 1 2.648 2h2.7c.45 0 .84.157 1.164.485.324.328.488.714.488 1.17V4h6.373c.452 0 .83.174 1.152.5.323.33.475.73.475 1.187v.001z\"\n        style={{ fill: fill || colors.orange }}\n      />\n    </Icon>\n  );\n}\n\nfunction FileIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14 15H2V1l7.997.02c1 .034 1.759.758 2.428 1.42.667.663 1.561 1.605 1.574 2.555H14V15zM9 2H3v12h10V6H9V2zm3 10H4v-1h8v1zm0-2H4V9h8v1zm-1.988-5h3.008c-.012-.674-.714-1.443-1.204-1.937-.488-.495-1.039-1.058-1.816-1.055v2.96l.012.032z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction LibraryIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M1 13h4V3H1v10zm3-1H2v-2h2v2zM2 4h2v4H2V4zm4 9h4V3H6v10zm3-1H7v-2h2v2zM7 4h2v4H7V4zm4 9h4V3h-4v10zm3-1h-2v-2h2v2zm-2-8h2v4h-2V4z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction PortfolioIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14.97 14.97H1.016V1.015H14.97V14.97zm-1-12.955H2.015V13.97H13.97V2.015zm-.973 10.982H9V9h3.997v3.997zM7 12.996H3.004V9H7v3.996zM11.997 10H10v1.997h1.997V10zM6 10H4.004v1.996H6V10zm1-3H3.006V3.006H7V7zm5.985 0H9V3.015h3.985V7zM6 4.006H4.006V6H6V4.006zm5.985.009H10V6h1.985V4.015z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction ProjectIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14.985 13.988L1 14.005 1.02 5h13.966v8.988h-.001zM1.998 5.995l.006 7.02L14.022 13 14 6.004l-12.002-.01v.001zM3 4.5V4h9.996l.004.5h1l-.005-1.497-11.98.003L2 4.5h1zm1-2v-.504h8.002L12 2.5h1l-.004-1.495H3.003L3 2.5h1z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction SubPortfolioIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14 7h2v9H7v-2H0V0h14v7zM8 8v7h7V8H8zm3 6H9v-2h2v2zm3 0h-2v-2h2v2zm-1-7V1H1v12h6V7h6zm-7 5H2V8h4v4zm5-1H9V9h2v2zm3 0h-2V9h2v2zM5 9H3v2h2V9zm1-3H2V2h4v4zm6 0H8V2h4v4zM5 3H3v2h2V3zm6 0H9v2h2V3z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction SubProjectIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 9V8h6v1h1v1h1v6H6v-6h1V9h1zm7 2H7v4h8v-4zm-1-7v3h-1V5H1v7h4v1H0V4h14zm-1-2v1.5h-1V3H2v.5H1V2h12zm-1-2v1.5h-1V1H3v.5H2V0h10z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction UnitTestIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14 15H2V1l7.997.02c1.013-.03 1.57.893 2.239 1.555.667.663 1.75 1.47 1.763 2.42H14V15zM9 2H3v12h10V6H9V2zM7 8l-3 2.5L7 13V8zm1 5l3-2.5L8 8v5zm2.012-8h3.008c-.012-.674-.78-1.258-1.27-1.752-.488-.495-.973-1.243-1.75-1.24v2.96l.012.032z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../components/controls/Tooltip';\nimport BranchIcon from '../../components/icons/BranchIcon';\n\nexport interface Option {\n  label: string;\n  type: string;\n  value: string;\n}\n\ninterface Props {\n  option: Option;\n  children?: React.ReactNode;\n  className?: string;\n  isFocused?: boolean;\n  onFocus: (option: Option, event: React.SyntheticEvent<HTMLElement>) => void;\n  onSelect: (option: Option, event: React.SyntheticEvent<HTMLElement>) => void;\n}\n\nexport default class BranchSelectItem extends React.PureComponent<Props> {\n  handleMouseDown = (event: React.MouseEvent<HTMLElement>) => {\n    event.preventDefault();\n    event.stopPropagation();\n    this.props.onSelect(this.props.option, event);\n  };\n\n  handleMouseEnter = (event: React.MouseEvent<HTMLElement>) => {\n    this.props.onFocus(this.props.option, event);\n  };\n\n  handleMouseMove = (event: React.MouseEvent<HTMLElement>) => {\n    if (this.props.isFocused) {\n      return;\n    }\n    this.props.onFocus(this.props.option, event);\n  };\n\n  render() {\n    const { option } = this.props;\n    return (\n      <Tooltip overlay={option.label} placement=\"left\">\n        <div\n          className={this.props.className}\n          onMouseDown={this.handleMouseDown}\n          onMouseEnter={this.handleMouseEnter}\n          onMouseMove={this.handleMouseMove}\n          role=\"listitem\">\n          <div>\n            <BranchIcon className=\"little-spacer-right\" />\n            {option.label}\n          </div>\n        </div>\n      </Tooltip>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { orderBy } from 'lodash';\nimport * as React from 'react';\nimport { getBranches } from '../../api/branches';\nimport Checkbox from '../../components/controls/Checkbox';\nimport Select from '../../components/controls/Select';\nimport Tooltip from '../../components/controls/Tooltip';\nimport QualifierIcon from '../../components/icons/QualifierIcon';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { ApplicationProject } from '../../types/application';\nimport BranchSelectItem from './BranchSelectItem';\nimport { ApplicationBranch, SelectBranchOption } from './utils';\n\ninterface Props {\n  checked: boolean;\n  onChange: (projectKey: string, branch: SelectBranchOption) => void;\n  onCheck: (checked: boolean, id?: string) => void;\n  onClose: () => void;\n  onOpen: (selectNode: HTMLElement, elementCount: number) => void;\n  project: ApplicationProject;\n}\n\ninterface State {\n  branches?: SelectBranchOption[];\n  loading: boolean;\n  selectedBranch?: SelectBranchOption;\n}\n\nexport default class ProjectBranchRow extends React.PureComponent<Props, State> {\n  node?: HTMLElement | null = null;\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  parseBranches = (branches: Array<ApplicationBranch>) => {\n    return orderBy(branches, [b => b.isMain, b => b.name]).map(branch => {\n      return { value: branch.name, label: branch.name, isMain: branch.isMain };\n    });\n  };\n\n  setCurrentTarget = (event: React.FocusEvent<HTMLInputElement>) => {\n    this.node = event.target;\n  };\n\n  handleChange = (value: SelectBranchOption) => {\n    this.props.onChange(this.props.project.key, value);\n    this.setState({ selectedBranch: value });\n  };\n\n  handleOpen = () => {\n    if (this.state.branches && this.node) {\n      this.props.onOpen(this.node, this.state.branches.length);\n      return;\n    }\n\n    const { project } = this.props;\n    this.setState({ loading: true });\n    getBranches(project.key).then(\n      branchesResult => {\n        const branches = this.parseBranches(branchesResult);\n        if (this.node) {\n          this.props.onOpen(this.node, branches.length);\n        }\n        if (this.mounted) {\n          this.setState({ branches, loading: false });\n        }\n      },\n      () => {\n        /* Fail silently*/\n      }\n    );\n  };\n\n  render() {\n    const { checked, onCheck, onClose, project } = this.props;\n    const options = this.state.branches || [\n      { value: project.branch, label: project.branch, isMain: project.isMain }\n    ];\n    const value = project.enabled\n      ? this.state.selectedBranch || project.branch\n      : this.state.selectedBranch;\n    return (\n      <tr key={project.key}>\n        <td className=\"text-center\">\n          <Checkbox checked={checked} id={project.key} onCheck={onCheck} />\n        </td>\n        <td className=\"nowrap hide-overflow branch-name-row\">\n          <Tooltip overlay={project.name}>\n            <span>\n              <QualifierIcon qualifier=\"TRK\" /> {project.name}\n            </span>\n          </Tooltip>\n        </td>\n        <td>\n          <Select\n            className=\"width100\"\n            clearable={false}\n            disabled={!checked}\n            onChange={this.handleChange}\n            onClose={onClose}\n            onFocus={this.setCurrentTarget}\n            onOpen={this.handleOpen}\n            optionComponent={BranchSelectItem}\n            options={options}\n            searchable={false}\n            value={value}\n          />\n          <DeferredSpinner className=\"project-branch-row-spinner\" loading={this.state.loading} />\n        </td>\n      </tr>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { some, without } from 'lodash';\nimport * as React from 'react';\nimport {\n  addApplicationBranch,\n  getApplicationDetails,\n  updateApplicationBranch\n} from '../../api/application';\nimport { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';\nimport SimpleModal from '../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../helpers/l10n';\nimport { Application, ApplicationProject } from '../../types/application';\nimport ProjectBranchRow from './ProjectBranchRow';\nimport { ApplicationBranch, SelectBranchOption } from './utils';\n\ninterface Props {\n  application: Application;\n  branch?: ApplicationBranch;\n  enabledProjectsKey: string[];\n  onClose: () => void;\n  onCreate?: (branch: ApplicationBranch) => void;\n  onUpdate?: (name: string) => void;\n}\n\ninterface BranchesList {\n  [name: string]: SelectBranchOption | null;\n}\n\ninterface State {\n  loading: boolean;\n  name: string;\n  projects: ApplicationProject[];\n  selected: string[];\n  selectedBranches: BranchesList;\n}\n\nconst MAX_PROJECTS_HEIGHT = 220;\nconst PROJECT_HEIGHT = 22;\nexport default class CreateBranchForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  node?: HTMLElement | null = null;\n  currentSelect?: HTMLElement | null = null;\n\n  state: State = {\n    loading: false,\n    name: '',\n    projects: [],\n    selected: [],\n    selectedBranches: {}\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    const { application } = this.props;\n    const branch = this.props.branch ? this.props.branch.name : undefined;\n    this.setState({ loading: true });\n    getApplicationDetails(application.key, branch).then(\n      ({ projects }) => {\n        if (this.mounted) {\n          const enabledProjects = projects.filter(p =>\n            this.props.enabledProjectsKey.includes(p.key)\n          );\n          const selected = enabledProjects.filter(p => p.selected).map(p => p.key);\n          const selectedBranches: BranchesList = {};\n          enabledProjects.forEach(p => {\n            if (!p.enabled) {\n              selectedBranches[p.key] = null;\n            } else {\n              selectedBranches[p.key] = {\n                value: p.branch || '',\n                label: p.branch || '',\n                isMain: p.isMain || false\n              };\n            }\n          });\n          this.setState({\n            name: branch || '',\n            selected,\n            loading: false,\n            projects: enabledProjects,\n            selectedBranches\n          });\n        }\n      },\n      () => {\n        this.props.onClose();\n      }\n    );\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  canSubmit = () => {\n    const hasUnselectedBranches = some(this.state.selectedBranches, (branch, projectKey) => {\n      return !branch && this.state.selected.includes(projectKey);\n    });\n    return (\n      !this.state.loading &&\n      this.state.name.length > 0 &&\n      !hasUnselectedBranches &&\n      this.state.selected.length > 0\n    );\n  };\n\n  handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleFormSubmit = async () => {\n    const projectKeys = this.state.selected;\n\n    const projectBranches = projectKeys.map(p => {\n      const branch = this.state.selectedBranches[p];\n      return !branch || branch.isMain ? '' : branch.value;\n    });\n\n    if (this.props.branch) {\n      await updateApplicationBranch({\n        application: this.props.application.key,\n        branch: this.props.branch.name,\n        name: this.state.name,\n        project: projectKeys,\n        projectBranch: projectBranches\n      });\n      if (this.props.onUpdate) {\n        this.props.onUpdate(this.state.name);\n      }\n    } else {\n      await addApplicationBranch({\n        application: this.props.application.key,\n        branch: this.state.name,\n        project: projectKeys,\n        projectBranch: projectBranches\n      });\n      if (this.props.onCreate) {\n        this.props.onCreate({ name: this.state.name, isMain: false });\n      }\n    }\n    this.props.onClose();\n  };\n\n  handleProjectCheck = (checked: boolean, key: string) => {\n    this.setState(state => ({\n      selected: checked ? [...state.selected, key] : without(state.selected, key)\n    }));\n  };\n\n  handleBranchChange = (projectKey: string, branch: SelectBranchOption) => {\n    this.setState(state => ({\n      selectedBranches: { ...state.selectedBranches, [projectKey]: branch }\n    }));\n  };\n\n  handleSelectorClose = () => {\n    if (this.node) {\n      this.node.classList.add('selector-hidden');\n    }\n  };\n\n  handleSelectorDirection = (selectNode: HTMLElement, elementCount: number) => {\n    if (this.node) {\n      const modalTop = this.node.getBoundingClientRect().top;\n      const modalHeight = this.node.offsetHeight;\n      const maxSelectHeight = Math.min(MAX_PROJECTS_HEIGHT, (elementCount + 1) * PROJECT_HEIGHT);\n      const selectBottom = selectNode.getBoundingClientRect().top + maxSelectHeight;\n      if (selectBottom > modalTop + modalHeight) {\n        this.node.classList.add('inverted-direction');\n      } else {\n        this.node.classList.remove('inverted-direction');\n      }\n      this.node.classList.remove('selector-hidden');\n    }\n  };\n\n  renderProjectsList = () => {\n    return (\n      <>\n        <strong className=\"spacer-left spacer-top\">\n          {translate('application_console.branches.configuration')}\n        </strong>\n        <p className=\"spacer-top big-spacer-bottom spacer-left spacer-right\">\n          {translate('application_console.branches.create.help')}\n        </p>\n        <table className=\"data zebra\">\n          <thead>\n            <tr>\n              <th className=\"thin\" />\n              <th className=\"thin\">{translate('project')}</th>\n              <th>{translate('branch')}</th>\n            </tr>\n          </thead>\n          <tbody>\n            {this.state.projects.map(project => (\n              <ProjectBranchRow\n                checked={this.state.selected.includes(project.key)}\n                key={project.key}\n                onChange={this.handleBranchChange}\n                onCheck={this.handleProjectCheck}\n                onClose={this.handleSelectorClose}\n                onOpen={this.handleSelectorDirection}\n                project={project}\n              />\n            ))}\n          </tbody>\n        </table>\n      </>\n    );\n  };\n\n  render() {\n    const isUpdating = this.props.branch !== undefined;\n    const header = translate('application_console.branches', isUpdating ? 'update' : 'create');\n    return (\n      <SimpleModal\n        header={header}\n        onClose={this.props.onClose}\n        onSubmit={this.handleFormSubmit}\n        size=\"medium\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form className=\"views-form\" onSubmit={onFormSubmit}>\n            <div className=\"modal-head\">\n              <h2>{header}</h2>\n            </div>\n\n            <div\n              className=\"modal-body modal-container selector-hidden\"\n              ref={node => (this.node = node)}>\n              {this.state.loading ? (\n                <div className=\"text-center big-spacer-top big-spacer-bottom\">\n                  <i className=\"spinner spacer-right\" />\n                </div>\n              ) : (\n                <>\n                  <MandatoryFieldsExplanation className=\"modal-field\" />\n                  <div className=\"modal-field\">\n                    <label htmlFor=\"view-edit-name\">\n                      {translate('name')}\n                      <MandatoryFieldMarker />\n                    </label>\n                    <input\n                      autoFocus={true}\n                      className=\"input-super-large\"\n                      maxLength={250}\n                      name=\"name\"\n                      onChange={this.handleInputChange}\n                      size={50}\n                      type=\"text\"\n                      value={this.state.name}\n                    />\n                  </div>\n                  {this.renderProjectsList()}\n                </>\n              )}\n            </div>\n\n            <div className=\"modal-foot\">\n              <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n              <SubmitButton disabled={submitting || !this.canSubmit()}>\n                {translate(\n                  'application_console.branches',\n                  isUpdating ? 'update' : 'create',\n                  'verb'\n                )}\n              </SubmitButton>\n              <ResetButtonLink onClick={onCloseClick}>\n                {translate('application_console.branches.cancel')}\n              </ResetButtonLink>\n            </div>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { without } from 'lodash';\nimport * as React from 'react';\nimport { deleteApplicationBranch } from '../../api/application';\nimport ActionsDropdown, { ActionsDropdownItem } from '../../components/controls/ActionsDropdown';\nimport ConfirmButton from '../../components/controls/ConfirmButton';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { Application } from '../../types/application';\nimport CreateBranchForm from './CreateBranchForm';\nimport { ApplicationBranch } from './utils';\n\ninterface Props {\n  application: Application;\n  branch: ApplicationBranch;\n  onUpdateBranches: (branches: Array<ApplicationBranch>) => void;\n}\n\ninterface State {\n  isUpdating: boolean;\n}\n\nexport default class BranchRowActions extends React.PureComponent<Props, State> {\n  state: State = { isUpdating: false };\n\n  handleDelete = () => {\n    const { application, branch } = this.props;\n    return deleteApplicationBranch(application.key, branch.name).then(() => {\n      this.props.onUpdateBranches(without(application.branches, branch));\n    });\n  };\n\n  handleUpdate = (newBranchName: string) => {\n    this.props.onUpdateBranches(\n      this.props.application.branches.map(branch => {\n        if (branch.name === this.props.branch.name) {\n          branch.name = newBranchName;\n        }\n        return branch;\n      })\n    );\n  };\n\n  handleCloseForm = () => {\n    this.setState({ isUpdating: false });\n  };\n\n  handleUpdateClick = () => {\n    this.setState({ isUpdating: true });\n  };\n\n  render() {\n    return (\n      <>\n        <ConfirmButton\n          confirmButtonText={translate('delete')}\n          isDestructive={true}\n          modalBody={translateWithParameters(\n            'application_console.branches.delete.warning_x',\n            this.props.branch.name\n          )}\n          modalHeader={translate('application_console.branches.delete')}\n          onConfirm={this.handleDelete}>\n          {({ onClick }) => (\n            <ActionsDropdown>\n              <ActionsDropdownItem onClick={this.handleUpdateClick}>\n                {translate('edit')}\n              </ActionsDropdownItem>\n              <ActionsDropdownItem destructive={true} onClick={onClick}>\n                {translate('delete')}\n              </ActionsDropdownItem>\n            </ActionsDropdown>\n          )}\n        </ConfirmButton>\n\n        {this.state.isUpdating && (\n          <CreateBranchForm\n            application={this.props.application}\n            branch={this.props.branch}\n            enabledProjectsKey={this.props.application.projects\n              .filter(p => p.enabled)\n              .map(p => p.key)}\n            onClose={this.handleCloseForm}\n            onUpdate={this.handleUpdate}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BranchIcon from '../../components/icons/BranchIcon';\nimport { translate } from '../../helpers/l10n';\nimport { Application } from '../../types/application';\nimport BranchRowActions from './BranchRowActions';\nimport { ApplicationBranch } from './utils';\n\nexport interface ApplicationProjectBranchProps {\n  application: Application;\n  branch: ApplicationBranch;\n  onUpdateBranches: (branches: Array<ApplicationBranch>) => void;\n}\n\nexport default function ApplicationProjectBranch(props: ApplicationProjectBranchProps) {\n  const { application, branch } = props;\n  return (\n    <tr>\n      <td>\n        <BranchIcon className=\"little-spacer-right\" />\n        {branch.name}\n        {branch.isMain && (\n          <span className=\"badge spacer-left\">\n            {translate('application_console.branches.main_branch')}\n          </span>\n        )}\n      </td>\n      <td className=\"thin nowrap\">\n        {!branch.isMain && (\n          <BranchRowActions\n            application={application}\n            branch={branch}\n            onUpdateBranches={props.onUpdateBranches}\n          />\n        )}\n      </td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport { translate } from '../../helpers/l10n';\nimport { Application } from '../../types/application';\nimport ApplicationProjectBranch from './ApplicationProjectBranch';\nimport CreateBranchForm from './CreateBranchForm';\nimport { ApplicationBranch } from './utils';\n\ninterface Props {\n  application: Application;\n  onUpdateBranches: (branches: ApplicationBranch[]) => void;\n}\n\ninterface State {\n  creating: boolean;\n}\n\nexport default class ApplicationBranches extends React.PureComponent<Props, State> {\n  state: State = { creating: false };\n\n  handleCreate = (branch: ApplicationBranch) => {\n    this.props.onUpdateBranches([...this.props.application.branches, branch]);\n  };\n\n  handleCreateFormClose = () => {\n    this.setState({ creating: false });\n  };\n\n  handleCreateClick = () => {\n    this.setState({ creating: true });\n  };\n\n  canCreateBranches = () => {\n    return (\n      this.props.application.projects &&\n      this.props.application.projects.some(p => Boolean(p.enabled))\n    );\n  };\n\n  renderBranches(createEnable: boolean) {\n    const { application } = this.props;\n    if (!createEnable) {\n      return (\n        <div className=\"app-branches-list\">\n          <p className=\"text-center big-spacer-top\">\n            {translate('application_console.branches.no_branches')}\n          </p>\n        </div>\n      );\n    }\n    return (\n      <div className=\"app-branches-list\">\n        <table className=\"data zebra\">\n          <tbody>\n            {application.branches.map(branch => (\n              <ApplicationProjectBranch\n                application={application}\n                branch={branch}\n                key={branch.name}\n                onUpdateBranches={this.props.onUpdateBranches}\n              />\n            ))}\n          </tbody>\n        </table>\n      </div>\n    );\n  }\n\n  render() {\n    const { application } = this.props;\n    const createEnable = this.canCreateBranches();\n    return (\n      <div className=\"app-branches-console\">\n        <div className=\"boxed-group-actions\">\n          <Button disabled={!createEnable} onClick={this.handleCreateClick}>\n            {translate('application_console.branches.create')}\n          </Button>\n        </div>\n        <h2\n          className=\"text-limited big-spacer-top\"\n          title={translate('application_console.branches')}>\n          {translate('application_console.branches')}\n        </h2>\n        <p>{translate('application_console.branches.help')}</p>\n\n        {this.renderBranches(createEnable)}\n\n        {this.state.creating && (\n          <CreateBranchForm\n            application={application}\n            enabledProjectsKey={application.projects.map(p => p.key)}\n            onClose={this.handleCreateFormClose}\n            onCreate={this.handleCreate}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport './RadioToggle.css';\nimport Tooltip from './Tooltip';\n\ntype ToggleValueType = string | number | boolean;\ninterface Option {\n  disabled?: boolean;\n  label: string;\n  tooltip?: string;\n  value: ToggleValueType;\n}\n\ninterface Props {\n  className?: string;\n  name: string;\n  onCheck: (value: ToggleValueType) => void;\n  options: Option[];\n  value?: ToggleValueType;\n}\n\nexport default class RadioToggle extends React.PureComponent<Props> {\n  static defaultProps = {\n    disabled: false,\n    value: null\n  };\n\n  renderOption = (option: Option) => {\n    const checked = option.value === this.props.value;\n    const htmlId = `${this.props.name}__${option.value}`;\n    return (\n      <li key={option.value.toString()}>\n        <input\n          checked={checked}\n          disabled={option.disabled}\n          id={htmlId}\n          name={this.props.name}\n          onChange={() => this.props.onCheck(option.value)}\n          type=\"radio\"\n        />\n        <Tooltip overlay={option.tooltip || undefined}>\n          <label htmlFor={htmlId}>{option.label}</label>\n        </Tooltip>\n      </li>\n    );\n  };\n\n  render() {\n    return (\n      <ul className={classNames('radio-toggle', this.props.className)}>\n        {this.props.options.map(this.renderOption)}\n      </ul>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Checkbox from './Checkbox';\n\ninterface Props {\n  active?: boolean;\n  disabled?: boolean;\n  element: string;\n  onSelect: (element: string) => Promise<void>;\n  onUnselect: (element: string) => Promise<void>;\n  renderElement: (element: string) => React.ReactNode;\n  selected: boolean;\n}\n\ninterface State {\n  loading: boolean;\n}\n\nexport default class SelectListListElement extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  handleCheck = (checked: boolean) => {\n    this.setState({ loading: true });\n    const request = checked ? this.props.onSelect : this.props.onUnselect;\n    request(this.props.element).then(this.stopLoading, this.stopLoading);\n  };\n\n  render() {\n    return (\n      <li\n        className={classNames({\n          'select-list-list-disabled': this.props.disabled\n        })}>\n        <Checkbox\n          checked={this.props.selected}\n          className={classNames('select-list-list-checkbox display-flex-center', {\n            active: this.props.active\n          })}\n          disabled={this.props.disabled}\n          loading={this.state.loading}\n          onCheck={this.handleCheck}>\n          <span className=\"little-spacer-left flex-1\">\n            {this.props.renderElement(this.props.element)}\n          </span>\n        </Checkbox>\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { uniqueId } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport DeferredSpinner from '../ui/DeferredSpinner';\nimport Checkbox from './Checkbox';\nimport { SelectListFilter } from './SelectList';\nimport SelectListListElement from './SelectListListElement';\n\ninterface Props {\n  allowBulkSelection?: boolean;\n  elements: string[];\n  disabledElements: string[];\n  filter: SelectListFilter;\n  onSelect: (element: string) => Promise<void>;\n  onUnselect: (element: string) => Promise<void>;\n  readOnly?: boolean;\n  renderElement: (element: string) => React.ReactNode;\n  selectedElements: string[];\n}\n\ninterface State {\n  loading: boolean;\n}\n\nexport default class SelectListListContainer extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  isDisabled = (element: string): boolean => {\n    return this.props.readOnly || this.props.disabledElements.includes(element);\n  };\n\n  isSelected = (element: string): boolean => {\n    return this.props.selectedElements.includes(element);\n  };\n\n  handleBulkChange = (checked: boolean) => {\n    this.setState({ loading: true });\n    if (checked) {\n      Promise.all(this.props.elements.map(element => this.props.onSelect(element)))\n        .then(this.stopLoading)\n        .catch(this.stopLoading);\n    } else {\n      Promise.all(this.props.selectedElements.map(element => this.props.onUnselect(element)))\n        .then(this.stopLoading)\n        .catch(this.stopLoading);\n    }\n  };\n\n  renderBulkSelector() {\n    const { elements, readOnly, selectedElements } = this.props;\n    return (\n      <>\n        <li>\n          <Checkbox\n            checked={selectedElements.length > 0}\n            disabled={this.state.loading || readOnly}\n            onCheck={this.handleBulkChange}\n            thirdState={selectedElements.length > 0 && elements.length !== selectedElements.length}>\n            <span className=\"big-spacer-left\">\n              {translate('bulk_change')}\n              <DeferredSpinner className=\"spacer-left\" loading={this.state.loading} timeout={10} />\n            </span>\n          </Checkbox>\n        </li>\n        <li className=\"divider\" />\n      </>\n    );\n  }\n\n  render() {\n    const { allowBulkSelection, elements, filter } = this.props;\n\n    return (\n      <div className={classNames('select-list-list-container spacer-top')}>\n        <ul className=\"menu\">\n          {allowBulkSelection &&\n            elements.length > 0 &&\n            filter === SelectListFilter.All &&\n            this.renderBulkSelector()}\n          {elements.map(element => (\n            <SelectListListElement\n              disabled={this.isDisabled(element)}\n              element={element}\n              key={uniqueId()}\n              onSelect={this.props.onSelect}\n              onUnselect={this.props.onUnselect}\n              renderElement={this.props.renderElement}\n              selected={this.isSelected(element)}\n            />\n          ))}\n        </ul>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport ListFooter from './ListFooter';\nimport RadioToggle from './RadioToggle';\nimport SearchBox from './SearchBox';\nimport './SelectList.css';\nimport SelectListListContainer from './SelectListListContainer';\n\nexport enum SelectListFilter {\n  All = 'all',\n  Selected = 'selected',\n  Unselected = 'deselected'\n}\n\ninterface Props {\n  allowBulkSelection?: boolean;\n  elements: string[];\n  elementsTotalCount?: number;\n  disabledElements?: string[];\n  labelSelected?: string;\n  labelUnselected?: string;\n  labelAll?: string;\n  needToReload?: boolean;\n  onSearch: (searchParams: SelectListSearchParams) => Promise<void>;\n  onSelect: (element: string) => Promise<void>;\n  onUnselect: (element: string) => Promise<void>;\n  pageSize?: number;\n  readOnly?: boolean;\n  renderElement: (element: string) => React.ReactNode;\n  selectedElements: string[];\n  withPaging?: boolean;\n}\n\nexport interface SelectListSearchParams {\n  filter: SelectListFilter;\n  page?: number;\n  pageSize?: number;\n  query: string;\n}\n\ninterface State {\n  lastSearchParams: SelectListSearchParams;\n  loading: boolean;\n}\n\nconst DEFAULT_PAGE_SIZE = 100;\n\nexport default class SelectList extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      lastSearchParams: {\n        filter: SelectListFilter.Selected,\n        page: 1,\n        pageSize: props.pageSize ? props.pageSize : DEFAULT_PAGE_SIZE,\n        query: ''\n      },\n      loading: false\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.search({});\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  getFilter = () =>\n    this.state.lastSearchParams.query === ''\n      ? this.state.lastSearchParams.filter\n      : SelectListFilter.All;\n\n  search = (searchParams: Partial<SelectListSearchParams>) =>\n    this.setState(\n      prevState => ({\n        loading: true,\n        lastSearchParams: { ...prevState.lastSearchParams, ...searchParams }\n      }),\n      () =>\n        this.props\n          .onSearch({\n            filter: this.getFilter(),\n            page: this.props.withPaging ? this.state.lastSearchParams.page : undefined,\n            pageSize: this.props.withPaging ? this.state.lastSearchParams.pageSize : undefined,\n            query: this.state.lastSearchParams.query\n          })\n          .then(this.stopLoading)\n          .catch(this.stopLoading)\n    );\n\n  changeFilter = (filter: SelectListFilter) => this.search({ filter, page: 1 });\n\n  handleQueryChange = (query: string) => this.search({ page: 1, query });\n\n  onLoadMore = () =>\n    this.search({\n      page:\n        this.state.lastSearchParams.page != null ? this.state.lastSearchParams.page + 1 : undefined\n    });\n\n  onReload = () => this.search({ page: 1 });\n\n  render() {\n    const {\n      labelSelected = translate('selected'),\n      labelUnselected = translate('unselected'),\n      labelAll = translate('all')\n    } = this.props;\n    const { filter } = this.state.lastSearchParams;\n\n    const disabled = this.state.lastSearchParams.query !== '';\n\n    return (\n      <div className=\"select-list\">\n        <div className=\"display-flex-center\">\n          <RadioToggle\n            className=\"select-list-filter spacer-right\"\n            name=\"filter\"\n            onCheck={this.changeFilter}\n            options={[\n              { disabled, label: labelSelected, value: SelectListFilter.Selected },\n              { disabled, label: labelUnselected, value: SelectListFilter.Unselected },\n              { disabled, label: labelAll, value: SelectListFilter.All }\n            ]}\n            value={filter}\n          />\n          <SearchBox\n            autoFocus={true}\n            loading={this.state.loading}\n            onChange={this.handleQueryChange}\n            placeholder={translate('search_verb')}\n            value={this.state.lastSearchParams.query}\n          />\n        </div>\n        <SelectListListContainer\n          allowBulkSelection={this.props.allowBulkSelection}\n          disabledElements={this.props.disabledElements || []}\n          elements={this.props.elements}\n          filter={this.getFilter()}\n          onSelect={this.props.onSelect}\n          onUnselect={this.props.onUnselect}\n          readOnly={this.props.readOnly}\n          renderElement={this.props.renderElement}\n          selectedElements={this.props.selectedElements}\n        />\n        {!!this.props.elementsTotalCount && (\n          <ListFooter\n            count={this.props.elements.length}\n            loadMore={this.onLoadMore}\n            needReload={this.props.needToReload}\n            reload={this.onReload}\n            total={this.props.elementsTotalCount}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { find, without } from 'lodash';\nimport * as React from 'react';\nimport {\n  addProjectToApplication,\n  getApplicationProjects,\n  removeProjectFromApplication\n} from '../../api/application';\nimport SelectList, {\n  SelectListFilter,\n  SelectListSearchParams\n} from '../../components/controls/SelectList';\nimport QualifierIcon from '../../components/icons/QualifierIcon';\nimport { Application, ApplicationProject } from '../../types/application';\n\ninterface Props {\n  onAddProject?: (project: ApplicationProject) => void;\n  onRemoveProject?: (projectKey: string) => void;\n  application: Application;\n}\n\ninterface State {\n  disabledProjects: string[];\n  lastSearchParams: SelectListSearchParams & { applicationKey: string };\n  needToReload: boolean;\n  projects: Array<ApplicationProject>;\n  projectsTotalCount?: number;\n  selectedProjects: string[];\n}\n\nexport default class ApplicationProjects extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      disabledProjects: [],\n      lastSearchParams: {\n        applicationKey: props.application.key,\n        query: '',\n        filter: SelectListFilter.Selected\n      },\n      needToReload: false,\n      projects: [],\n      selectedProjects: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.application.key !== this.props.application.key) {\n      this.setState(\n        prevState => {\n          return {\n            lastSearchParams: {\n              ...prevState.lastSearchParams,\n              applicationKey: this.props.application.key\n            }\n          };\n        },\n        () => this.fetchProjects(this.state.lastSearchParams)\n      );\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadApplicationProjects = (searchParams: SelectListSearchParams) =>\n    getApplicationProjects({\n      application: this.state.lastSearchParams.applicationKey,\n      p: searchParams.page,\n      ps: searchParams.pageSize,\n      q: searchParams.query !== '' ? searchParams.query : undefined,\n      selected: searchParams.filter\n    });\n\n  fetchProjects = (searchParams: SelectListSearchParams) =>\n    this.loadApplicationProjects(searchParams).then(data => {\n      if (this.mounted) {\n        this.setState(prevState => {\n          const more = searchParams.page != null && searchParams.page > 1;\n\n          const { projects, selectedProjects, disabledProjects } = this.dealWithProjects(\n            data,\n            more,\n            prevState\n          );\n\n          return {\n            disabledProjects,\n            lastSearchParams: { ...prevState.lastSearchParams, ...searchParams },\n            needToReload: false,\n            projects,\n            projectsTotalCount: data.paging.total,\n            selectedProjects\n          };\n        });\n      }\n    });\n\n  dealWithProjects = (\n    data: { projects: Array<ApplicationProject>; paging: T.Paging },\n    more: boolean,\n    prevState: Readonly<State>\n  ) => {\n    const projects = more ? [...prevState.projects, ...data.projects] : data.projects;\n\n    const newSelectedProjects = data.projects\n      .filter(project => project.selected)\n      .map(project => project.key);\n    const selectedProjects = more\n      ? [...prevState.selectedProjects, ...newSelectedProjects]\n      : newSelectedProjects;\n\n    const disabledProjects = more ? [...prevState.disabledProjects] : [];\n\n    return {\n      disabledProjects,\n      projects,\n      selectedProjects\n    };\n  };\n\n  handleSelect = (projectKey: string) => {\n    return addProjectToApplication(this.props.application.key, projectKey).then(() => {\n      if (this.mounted) {\n        this.setState(state => {\n          const project = state.projects.find(p => p.key === projectKey);\n          if (project && this.props.onAddProject) {\n            this.props.onAddProject(project);\n          }\n          return {\n            needToReload: true,\n            selectedProjects: [...state.selectedProjects, projectKey]\n          };\n        });\n      }\n    });\n  };\n\n  handleUnselect = (projectKey: string) => {\n    return removeProjectFromApplication(this.props.application.key, projectKey).then(() => {\n      if (this.mounted) {\n        this.setState(state => {\n          if (this.props.onRemoveProject) {\n            this.props.onRemoveProject(projectKey);\n          }\n          return {\n            needToReload: true,\n            selectedProjects: without(state.selectedProjects, projectKey)\n          };\n        });\n      }\n    });\n  };\n\n  renderElement = (projectKey: string) => {\n    const project = find(this.state.projects, { key: projectKey });\n    if (project === undefined) {\n      return '';\n    }\n\n    return (\n      <div className=\"views-project-item display-flex-center\">\n        <QualifierIcon className=\"spacer-right\" qualifier=\"TRK\" />\n        <div>\n          <div title={project.name}>{project.name}</div>\n          <div className=\"note\">{project.key}</div>\n        </div>\n      </div>\n    );\n  };\n\n  render() {\n    const { projects, selectedProjects } = this.state;\n\n    return (\n      <SelectList\n        disabledElements={this.state.disabledProjects}\n        elements={projects.map(project => project.key)}\n        elementsTotalCount={this.state.projectsTotalCount}\n        needToReload={\n          this.state.needToReload &&\n          this.state.lastSearchParams &&\n          this.state.lastSearchParams.filter !== SelectListFilter.All\n        }\n        onSearch={this.fetchProjects}\n        onSelect={this.handleSelect}\n        onUnselect={this.handleUnselect}\n        renderElement={this.renderElement}\n        selectedElements={selectedProjects}\n        withPaging={true}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';\nimport SimpleModal from '../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate } from '../../helpers/l10n';\nimport { Application } from '../../types/application';\n\ninterface Props {\n  header: string;\n  onClose: () => void;\n  onEdit: (name: string, description: string) => Promise<void>;\n  application: Application;\n}\n\ninterface State {\n  description: string;\n  name: string;\n}\n\nexport default class EditForm extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      description: props.application.description || '',\n      name: props.application.name\n    };\n  }\n\n  handleNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleDescriptionChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.setState({ description: event.currentTarget.value });\n  };\n\n  handleFormSubmit = async () => {\n    await this.props.onEdit(this.state.name, this.state.description);\n    this.props.onClose();\n  };\n\n  render() {\n    return (\n      <SimpleModal\n        header={this.props.header}\n        onClose={this.props.onClose}\n        onSubmit={this.handleFormSubmit}\n        size=\"small\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form onSubmit={onFormSubmit}>\n            <div className=\"modal-head\">\n              <h2>{this.props.header}</h2>\n            </div>\n\n            <div className=\"modal-body\">\n              <div className=\"modal-field\">\n                <label htmlFor=\"view-edit-name\">{translate('name')}</label>\n                <input\n                  autoFocus={true}\n                  id=\"view-edit-name\"\n                  maxLength={100}\n                  name=\"name\"\n                  onChange={this.handleNameChange}\n                  size={50}\n                  type=\"text\"\n                  value={this.state.name}\n                />\n              </div>\n              <div className=\"modal-field\">\n                <label htmlFor=\"view-edit-description\">{translate('description')}</label>\n                <textarea\n                  id=\"view-edit-description\"\n                  name=\"description\"\n                  onChange={this.handleDescriptionChange}\n                  value={this.state.description}\n                />\n              </div>\n            </div>\n\n            <div className=\"modal-foot\">\n              <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n              <SubmitButton disabled={submitting || !this.state.name.length}>\n                {translate('save')}\n              </SubmitButton>\n              <ResetButtonLink onClick={onCloseClick}>{translate('cancel')}</ResetButtonLink>\n            </div>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport { translate } from '../../helpers/l10n';\nimport { Application, ApplicationProject } from '../../types/application';\nimport { Branch } from '../../types/branch-like';\nimport ApplicationBranches from './ApplicationBranches';\nimport ApplicationProjects from './ApplicationProjects';\nimport EditForm from './EditForm';\n\nexport interface ApplicationConsoleAppRendererProps {\n  loading: boolean;\n  application: Application;\n  onAddProject: (project: ApplicationProject) => void;\n  onRefresh: () => void;\n  onEdit: (name: string, description: string) => Promise<void>;\n  onRemoveProject: (projectKey: string) => void;\n  onUpdateBranches: (branches: Branch[]) => void;\n}\n\nexport default function ApplicationConsoleAppRenderer(props: ApplicationConsoleAppRendererProps) {\n  const [editing, setEditing] = React.useState(false);\n\n  const { application, loading } = props;\n\n  if (loading) {\n    return <i className=\"spinner spacer\" />;\n  }\n\n  return (\n    <div className=\"page page-limited\">\n      <div className=\"boxed-group\" id=\"view-details\">\n        <div className=\"boxed-group-actions\">\n          <Button\n            className=\"little-spacer-right\"\n            id=\"view-details-edit\"\n            onClick={() => setEditing(true)}>\n            {translate('edit')}\n          </Button>\n          <Button className=\"little-spacer-right\" onClick={props.onRefresh}>\n            {translate('application_console.recompute')}\n          </Button>\n        </div>\n\n        <header className=\"boxed-group-header\" id=\"view-details-header\">\n          <h2 className=\"text-limited\" title={application.name}>\n            {application.name}\n          </h2>\n        </header>\n\n        <div className=\"boxed-group-inner\" id=\"view-details-content\">\n          <div className=\"big-spacer-bottom\">\n            {application.description && (\n              <div className=\"little-spacer-bottom\">{application.description}</div>\n            )}\n            <div className=\"subtitle\">\n              {translate('key')}: {application.key}\n            </div>\n          </div>\n\n          <ApplicationProjects\n            onAddProject={props.onAddProject}\n            onRemoveProject={props.onRemoveProject}\n            application={application}\n          />\n\n          <ApplicationBranches\n            application={application}\n            onUpdateBranches={props.onUpdateBranches}\n          />\n        </div>\n\n        {editing && (\n          <EditForm\n            header={translate('portfolios.edit_application')}\n            onClose={() => setEditing(false)}\n            onEdit={props.onEdit}\n            application={application}\n          />\n        )}\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport * as React from 'react';\nimport { InjectedRouter } from 'react-router';\nimport { editApplication, getApplicationDetails, refreshApplication } from '../../api/application';\nimport addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage';\nimport { translate } from '../../helpers/l10n';\nimport { Application, ApplicationProject } from '../../types/application';\nimport ApplicationConsoleAppRenderer from './ApplicationConsoleAppRenderer';\nimport { ApplicationBranch } from './utils';\n\ninterface Props {\n  component: { key: string };\n  location: Location;\n  router: Pick<InjectedRouter, 'replace'>;\n}\n\ninterface State {\n  application?: Application;\n  loading: boolean;\n}\n\nexport default class ApplicationConsoleApp extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state: State = {\n    loading: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchDetails();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.component.key !== this.props.component.key) {\n      this.fetchDetails();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  updateApplicationState = (buildNewFields: (prevApp: Application) => Partial<Application>) => {\n    this.setState(state => {\n      if (state.application) {\n        return { application: { ...state.application, ...buildNewFields(state.application) } };\n      } else {\n        return null;\n      }\n    });\n  };\n\n  fetchDetails = async () => {\n    try {\n      const application = await getApplicationDetails(this.props.component.key);\n      if (this.mounted) {\n        this.setState({ application, loading: false });\n      }\n    } catch {\n      if (this.mounted) {\n        this.setState({ loading: false });\n      }\n    }\n  };\n\n  handleRefreshClick = async () => {\n    if (this.state.application) {\n      await refreshApplication(this.state.application.key);\n      addGlobalSuccessMessage(translate('application_console.refresh_started'));\n    }\n  };\n\n  handleEdit = async (name: string, description: string) => {\n    if (this.state.application) {\n      await editApplication(this.state.application.key, name, description);\n    }\n    if (this.mounted) {\n      this.updateApplicationState(() => ({ name, description }));\n    }\n  };\n\n  handleAddProject = (project: ApplicationProject) => {\n    this.updateApplicationState(prevApp => ({ projects: [...prevApp.projects, project] }));\n  };\n\n  handleRemoveProject = (projectKey: string) => {\n    this.updateApplicationState(prevApp => ({\n      projects: prevApp.projects.filter(p => p.key !== projectKey)\n    }));\n  };\n\n  handleUpdateBranches = (branches: ApplicationBranch[]) => {\n    this.updateApplicationState(() => ({ branches }));\n  };\n\n  render() {\n    const { application, loading } = this.state;\n    if (!application) {\n      // when application is not found\n      return null;\n    }\n\n    return (\n      <ApplicationConsoleAppRenderer\n        loading={loading}\n        application={application}\n        onAddProject={this.handleAddProject}\n        onEdit={this.handleEdit}\n        onRefresh={this.handleRefreshClick}\n        onRemoveProject={this.handleRemoveProject}\n        onUpdateBranches={this.handleUpdateBranches}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./ApplicationConsoleApp')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omitBy } from 'lodash';\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { isCategoryDefinition } from '../apps/settings/utils';\nimport { getJSON, post, postJSON, RequestData } from '../helpers/request';\nimport { BranchParameters } from '../types/branch-like';\nimport {\n  SettingCategoryDefinition,\n  SettingDefinition,\n  SettingValue,\n  SettingValueResponse\n} from '../types/settings';\n\nexport function getDefinitions(component?: string): Promise<SettingCategoryDefinition[]> {\n  return getJSON('/api/settings/list_definitions', { component }).then(\n    r => r.definitions,\n    throwGlobalError\n  );\n}\n\nexport function getValues(\n  data: { keys: string; component?: string } & BranchParameters\n): Promise<SettingValue[]> {\n  return getJSON('/api/settings/values', data).then((r: SettingValueResponse) => [\n    ...r.settings,\n    ...r.setSecuredSettings.map(key => ({ key }))\n  ]);\n}\n\nexport function setSettingValue(\n  definition: SettingDefinition,\n  value: any,\n  component?: string\n): Promise<void> {\n  const { key } = definition;\n  const data: RequestData = { key, component };\n\n  if (isCategoryDefinition(definition) && definition.multiValues) {\n    data.values = value;\n  } else if (definition.type === 'PROPERTY_SET') {\n    data.fieldValues = value\n      .map((fields: any) => omitBy(fields, value => value == null))\n      .map(JSON.stringify);\n  } else {\n    data.value = value;\n  }\n\n  return post('/api/settings/set', data);\n}\n\nexport function setSimpleSettingValue(\n  data: { component?: string; value: string; key: string } & BranchParameters\n): Promise<void | Response> {\n  return post('/api/settings/set', data).catch(throwGlobalError);\n}\n\nexport function resetSettingValue(\n  data: { keys: string; component?: string } & BranchParameters\n): Promise<void> {\n  return post('/api/settings/reset', data);\n}\n\nexport function sendTestEmail(to: string, subject: string, message: string): Promise<void> {\n  return post('/api/emails/send', { to, subject, message });\n}\n\nexport function checkSecretKey(): Promise<{ secretKeyAvailable: boolean }> {\n  return getJSON('/api/settings/check_secret_key').catch(throwGlobalError);\n}\n\nexport function generateSecretKey(): Promise<{ secretKey: string }> {\n  return postJSON('/api/settings/generate_secret_key').catch(throwGlobalError);\n}\n\nexport function encryptValue(value: string): Promise<{ encryptedValue: string }> {\n  return postJSON('/api/settings/encrypt', { value }).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const enum SettingsKey {\n  DaysBeforeDeletingInactiveBranchesAndPRs = 'sonar.dbcleaner.daysBeforeDeletingInactiveBranchesAndPRs',\n  DefaultProjectVisibility = 'projects.default.visibility',\n  ServerBaseUrl = 'sonar.core.serverBaseURL',\n  PluginRiskConsent = 'sonar.plugins.risk.consent',\n  ProjectReportFrequency = 'sonar.governance.report.project.branch.frequency'\n}\n\nexport type Setting = SettingValue & { definition: SettingDefinition; hasValue: boolean };\nexport type SettingWithCategory = Setting & { definition: SettingCategoryDefinition };\n\nexport enum SettingType {\n  STRING = 'STRING',\n  TEXT = 'TEXT',\n  JSON = 'JSON',\n  PASSWORD = 'PASSWORD',\n  BOOLEAN = 'BOOLEAN',\n  FLOAT = 'FLOAT',\n  INTEGER = 'INTEGER',\n  LICENSE = 'LICENSE',\n  LONG = 'LONG',\n  SINGLE_SELECT_LIST = 'SINGLE_SELECT_LIST',\n  PROPERTY_SET = 'PROPERTY_SET'\n}\nexport interface SettingDefinition {\n  description?: string;\n  key: string;\n  multiValues?: boolean;\n  name?: string;\n  options: string[];\n  type?: SettingType;\n}\n\nexport interface SettingFieldDefinition extends SettingDefinition {\n  description: string;\n  name: string;\n}\n\nexport interface SettingCategoryDefinition extends SettingDefinition {\n  category: string;\n  defaultValue?: string;\n  deprecatedKey?: string;\n  fields: SettingFieldDefinition[];\n  multiValues?: boolean;\n  subCategory: string;\n}\n\nexport interface SettingValueResponse {\n  settings: SettingValue[];\n  setSecuredSettings: string[];\n}\n\nexport interface SettingValue {\n  fieldValues?: Array<T.Dict<string>>;\n  inherited?: boolean;\n  key: string;\n  parentFieldValues?: Array<T.Dict<string>>;\n  parentValue?: string;\n  parentValues?: string[];\n  value?: string;\n  values?: string[];\n}\n", "const {\n  hasOwnProperty,\n  setPrototypeOf,\n  isFrozen,\n  getPrototypeOf,\n  getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!apply) {\n  apply = function (fun, thisValue, args) {\n    return fun.apply(thisValue, args);\n  };\n}\n\nif (!freeze) {\n  freeze = function (x) {\n    return x;\n  };\n}\n\nif (!seal) {\n  seal = function (x) {\n    return x;\n  };\n}\n\nif (!construct) {\n  construct = function (Func, args) {\n    return new Func(...args);\n  };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\nexport function unapply(func) {\n  return (thisArg, ...args) => apply(func, thisArg, args);\n}\n\nexport function unconstruct(func) {\n  return (...args) => construct(func, args);\n}\n\n/* Add properties to a lookup table */\nexport function addToSet(set, array) {\n  if (setPrototypeOf) {\n    // Make 'in' and truthy checks like Boolean(set.constructor)\n    // independent of any properties defined on Object.prototype.\n    // Prevent prototype setters from intercepting set as a this value.\n    setPrototypeOf(set, null);\n  }\n\n  let l = array.length;\n  while (l--) {\n    let element = array[l];\n    if (typeof element === 'string') {\n      const lcElement = stringToLowerCase(element);\n      if (lcElement !== element) {\n        // Config presets (e.g. tags.js, attrs.js) are immutable.\n        if (!isFrozen(array)) {\n          array[l] = lcElement;\n        }\n\n        element = lcElement;\n      }\n    }\n\n    set[element] = true;\n  }\n\n  return set;\n}\n\n/* Shallow clone an object */\nexport function clone(object) {\n  const newObject = create(null);\n\n  let property;\n  for (property in object) {\n    if (apply(hasOwnProperty, object, [property])) {\n      newObject[property] = object[property];\n    }\n  }\n\n  return newObject;\n}\n\n/* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\nfunction lookupGetter(object, prop) {\n  while (object !== null) {\n    const desc = getOwnPropertyDescriptor(object, prop);\n    if (desc) {\n      if (desc.get) {\n        return unapply(desc.get);\n      }\n\n      if (typeof desc.value === 'function') {\n        return unapply(desc.value);\n      }\n    }\n\n    object = getPrototypeOf(object);\n  }\n\n  function fallbackValue(element) {\n    console.warn('fallback value for', element);\n    return null;\n  }\n\n  return fallbackValue;\n}\n\nexport {\n  // Array\n  arrayForEach,\n  arrayIndexOf,\n  arrayPop,\n  arrayPush,\n  arraySlice,\n  // Object\n  freeze,\n  getPrototypeOf,\n  getOwnPropertyDescriptor,\n  hasOwnProperty,\n  isFrozen,\n  setPrototypeOf,\n  seal,\n  // RegExp\n  regExpTest,\n  // String\n  stringIndexOf,\n  stringMatch,\n  stringReplace,\n  stringToLowerCase,\n  stringTrim,\n  // Errors\n  typeErrorCreate,\n  // Other\n  lookupGetter,\n};\n", "import { freeze } from './utils';\n\nexport const html = freeze([\n  'a',\n  'abbr',\n  'acronym',\n  'address',\n  'area',\n  'article',\n  'aside',\n  'audio',\n  'b',\n  'bdi',\n  'bdo',\n  'big',\n  'blink',\n  'blockquote',\n  'body',\n  'br',\n  'button',\n  'canvas',\n  'caption',\n  'center',\n  'cite',\n  'code',\n  'col',\n  'colgroup',\n  'content',\n  'data',\n  'datalist',\n  'dd',\n  'decorator',\n  'del',\n  'details',\n  'dfn',\n  'dialog',\n  'dir',\n  'div',\n  'dl',\n  'dt',\n  'element',\n  'em',\n  'fieldset',\n  'figcaption',\n  'figure',\n  'font',\n  'footer',\n  'form',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n  'head',\n  'header',\n  'hgroup',\n  'hr',\n  'html',\n  'i',\n  'img',\n  'input',\n  'ins',\n  'kbd',\n  'label',\n  'legend',\n  'li',\n  'main',\n  'map',\n  'mark',\n  'marquee',\n  'menu',\n  'menuitem',\n  'meter',\n  'nav',\n  'nobr',\n  'ol',\n  'optgroup',\n  'option',\n  'output',\n  'p',\n  'picture',\n  'pre',\n  'progress',\n  'q',\n  'rp',\n  'rt',\n  'ruby',\n  's',\n  'samp',\n  'section',\n  'select',\n  'shadow',\n  'small',\n  'source',\n  'spacer',\n  'span',\n  'strike',\n  'strong',\n  'style',\n  'sub',\n  'summary',\n  'sup',\n  'table',\n  'tbody',\n  'td',\n  'template',\n  'textarea',\n  'tfoot',\n  'th',\n  'thead',\n  'time',\n  'tr',\n  'track',\n  'tt',\n  'u',\n  'ul',\n  'var',\n  'video',\n  'wbr',\n]);\n\n// SVG\nexport const svg = freeze([\n  'svg',\n  'a',\n  'altglyph',\n  'altglyphdef',\n  'altglyphitem',\n  'animatecolor',\n  'animatemotion',\n  'animatetransform',\n  'circle',\n  'clippath',\n  'defs',\n  'desc',\n  'ellipse',\n  'filter',\n  'font',\n  'g',\n  'glyph',\n  'glyphref',\n  'hkern',\n  'image',\n  'line',\n  'lineargradient',\n  'marker',\n  'mask',\n  'metadata',\n  'mpath',\n  'path',\n  'pattern',\n  'polygon',\n  'polyline',\n  'radialgradient',\n  'rect',\n  'stop',\n  'style',\n  'switch',\n  'symbol',\n  'text',\n  'textpath',\n  'title',\n  'tref',\n  'tspan',\n  'view',\n  'vkern',\n]);\n\nexport const svgFilters = freeze([\n  'feBlend',\n  'feColorMatrix',\n  'feComponentTransfer',\n  'feComposite',\n  'feConvolveMatrix',\n  'feDiffuseLighting',\n  'feDisplacementMap',\n  'feDistantLight',\n  'feFlood',\n  'feFuncA',\n  'feFuncB',\n  'feFuncG',\n  'feFuncR',\n  'feGaussianBlur',\n  'feMerge',\n  'feMergeNode',\n  'feMorphology',\n  'feOffset',\n  'fePointLight',\n  'feSpecularLighting',\n  'feSpotLight',\n  'feTile',\n  'feTurbulence',\n]);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n  'animate',\n  'color-profile',\n  'cursor',\n  'discard',\n  'fedropshadow',\n  'feimage',\n  'font-face',\n  'font-face-format',\n  'font-face-name',\n  'font-face-src',\n  'font-face-uri',\n  'foreignobject',\n  'hatch',\n  'hatchpath',\n  'mesh',\n  'meshgradient',\n  'meshpatch',\n  'meshrow',\n  'missing-glyph',\n  'script',\n  'set',\n  'solidcolor',\n  'unknown',\n  'use',\n]);\n\nexport const mathMl = freeze([\n  'math',\n  'menclose',\n  'merror',\n  'mfenced',\n  'mfrac',\n  'mglyph',\n  'mi',\n  'mlabeledtr',\n  'mmultiscripts',\n  'mn',\n  'mo',\n  'mover',\n  'mpadded',\n  'mphantom',\n  'mroot',\n  'mrow',\n  'ms',\n  'mspace',\n  'msqrt',\n  'mstyle',\n  'msub',\n  'msup',\n  'msubsup',\n  'mtable',\n  'mtd',\n  'mtext',\n  'mtr',\n  'munder',\n  'munderover',\n]);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n  'maction',\n  'maligngroup',\n  'malignmark',\n  'mlongdiv',\n  'mscarries',\n  'mscarry',\n  'msgroup',\n  'mstack',\n  'msline',\n  'msrow',\n  'semantics',\n  'annotation',\n  'annotation-xml',\n  'mprescripts',\n  'none',\n]);\n\nexport const text = freeze(['#text']);\n", "import { freeze } from './utils';\n\nexport const html = freeze([\n  'accept',\n  'action',\n  'align',\n  'alt',\n  'autocapitalize',\n  'autocomplete',\n  'autopictureinpicture',\n  'autoplay',\n  'background',\n  'bgcolor',\n  'border',\n  'capture',\n  'cellpadding',\n  'cellspacing',\n  'checked',\n  'cite',\n  'class',\n  'clear',\n  'color',\n  'cols',\n  'colspan',\n  'controls',\n  'controlslist',\n  'coords',\n  'crossorigin',\n  'datetime',\n  'decoding',\n  'default',\n  'dir',\n  'disabled',\n  'disablepictureinpicture',\n  'disableremoteplayback',\n  'download',\n  'draggable',\n  'enctype',\n  'enterkeyhint',\n  'face',\n  'for',\n  'headers',\n  'height',\n  'hidden',\n  'high',\n  'href',\n  'hreflang',\n  'id',\n  'inputmode',\n  'integrity',\n  'ismap',\n  'kind',\n  'label',\n  'lang',\n  'list',\n  'loading',\n  'loop',\n  'low',\n  'max',\n  'maxlength',\n  'media',\n  'method',\n  'min',\n  'minlength',\n  'multiple',\n  'muted',\n  'name',\n  'noshade',\n  'novalidate',\n  'nowrap',\n  'open',\n  'optimum',\n  'pattern',\n  'placeholder',\n  'playsinline',\n  'poster',\n  'preload',\n  'pubdate',\n  'radiogroup',\n  'readonly',\n  'rel',\n  'required',\n  'rev',\n  'reversed',\n  'role',\n  'rows',\n  'rowspan',\n  'spellcheck',\n  'scope',\n  'selected',\n  'shape',\n  'size',\n  'sizes',\n  'span',\n  'srclang',\n  'start',\n  'src',\n  'srcset',\n  'step',\n  'style',\n  'summary',\n  'tabindex',\n  'title',\n  'translate',\n  'type',\n  'usemap',\n  'valign',\n  'value',\n  'width',\n  'xmlns',\n]);\n\nexport const svg = freeze([\n  'accent-height',\n  'accumulate',\n  'additive',\n  'alignment-baseline',\n  'ascent',\n  'attributename',\n  'attributetype',\n  'azimuth',\n  'basefrequency',\n  'baseline-shift',\n  'begin',\n  'bias',\n  'by',\n  'class',\n  'clip',\n  'clippathunits',\n  'clip-path',\n  'clip-rule',\n  'color',\n  'color-interpolation',\n  'color-interpolation-filters',\n  'color-profile',\n  'color-rendering',\n  'cx',\n  'cy',\n  'd',\n  'dx',\n  'dy',\n  'diffuseconstant',\n  'direction',\n  'display',\n  'divisor',\n  'dur',\n  'edgemode',\n  'elevation',\n  'end',\n  'fill',\n  'fill-opacity',\n  'fill-rule',\n  'filter',\n  'filterunits',\n  'flood-color',\n  'flood-opacity',\n  'font-family',\n  'font-size',\n  'font-size-adjust',\n  'font-stretch',\n  'font-style',\n  'font-variant',\n  'font-weight',\n  'fx',\n  'fy',\n  'g1',\n  'g2',\n  'glyph-name',\n  'glyphref',\n  'gradientunits',\n  'gradienttransform',\n  'height',\n  'href',\n  'id',\n  'image-rendering',\n  'in',\n  'in2',\n  'k',\n  'k1',\n  'k2',\n  'k3',\n  'k4',\n  'kerning',\n  'keypoints',\n  'keysplines',\n  'keytimes',\n  'lang',\n  'lengthadjust',\n  'letter-spacing',\n  'kernelmatrix',\n  'kernelunitlength',\n  'lighting-color',\n  'local',\n  'marker-end',\n  'marker-mid',\n  'marker-start',\n  'markerheight',\n  'markerunits',\n  'markerwidth',\n  'maskcontentunits',\n  'maskunits',\n  'max',\n  'mask',\n  'media',\n  'method',\n  'mode',\n  'min',\n  'name',\n  'numoctaves',\n  'offset',\n  'operator',\n  'opacity',\n  'order',\n  'orient',\n  'orientation',\n  'origin',\n  'overflow',\n  'paint-order',\n  'path',\n  'pathlength',\n  'patterncontentunits',\n  'patterntransform',\n  'patternunits',\n  'points',\n  'preservealpha',\n  'preserveaspectratio',\n  'primitiveunits',\n  'r',\n  'rx',\n  'ry',\n  'radius',\n  'refx',\n  'refy',\n  'repeatcount',\n  'repeatdur',\n  'restart',\n  'result',\n  'rotate',\n  'scale',\n  'seed',\n  'shape-rendering',\n  'specularconstant',\n  'specularexponent',\n  'spreadmethod',\n  'startoffset',\n  'stddeviation',\n  'stitchtiles',\n  'stop-color',\n  'stop-opacity',\n  'stroke-dasharray',\n  'stroke-dashoffset',\n  'stroke-linecap',\n  'stroke-linejoin',\n  'stroke-miterlimit',\n  'stroke-opacity',\n  'stroke',\n  'stroke-width',\n  'style',\n  'surfacescale',\n  'systemlanguage',\n  'tabindex',\n  'targetx',\n  'targety',\n  'transform',\n  'text-anchor',\n  'text-decoration',\n  'text-rendering',\n  'textlength',\n  'type',\n  'u1',\n  'u2',\n  'unicode',\n  'values',\n  'viewbox',\n  'visibility',\n  'version',\n  'vert-adv-y',\n  'vert-origin-x',\n  'vert-origin-y',\n  'width',\n  'word-spacing',\n  'wrap',\n  'writing-mode',\n  'xchannelselector',\n  'ychannelselector',\n  'x',\n  'x1',\n  'x2',\n  'xmlns',\n  'y',\n  'y1',\n  'y2',\n  'z',\n  'zoomandpan',\n]);\n\nexport const mathMl = freeze([\n  'accent',\n  'accentunder',\n  'align',\n  'bevelled',\n  'close',\n  'columnsalign',\n  'columnlines',\n  'columnspan',\n  'denomalign',\n  'depth',\n  'dir',\n  'display',\n  'displaystyle',\n  'encoding',\n  'fence',\n  'frame',\n  'height',\n  'href',\n  'id',\n  'largeop',\n  'length',\n  'linethickness',\n  'lspace',\n  'lquote',\n  'mathbackground',\n  'mathcolor',\n  'mathsize',\n  'mathvariant',\n  'maxsize',\n  'minsize',\n  'movablelimits',\n  'notation',\n  'numalign',\n  'open',\n  'rowalign',\n  'rowlines',\n  'rowspacing',\n  'rowspan',\n  'rspace',\n  'rquote',\n  'scriptlevel',\n  'scriptminsize',\n  'scriptsizemultiplier',\n  'selection',\n  'separator',\n  'separators',\n  'stretchy',\n  'subscriptshift',\n  'supscriptshift',\n  'symmetric',\n  'voffset',\n  'width',\n  'xmlns',\n]);\n\nexport const xml = freeze([\n  'xlink:href',\n  'xml:id',\n  'xlink:title',\n  'xml:space',\n  'xmlns:xlink',\n]);\n", "import { seal } from './utils';\n\n// eslint-disable-next-line unicorn/better-regex\nexport const MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nexport const ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n  /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\n", "import * as TAGS from './tags';\nimport * as ATTRS from './attrs';\nimport * as EXPRESSIONS from './regexp';\nimport {\n  addToSet,\n  clone,\n  freeze,\n  arrayForEach,\n  arrayPop,\n  arrayPush,\n  stringMatch,\n  stringReplace,\n  stringToLowerCase,\n  stringIndexOf,\n  stringTrim,\n  regExpTest,\n  typeErrorCreate,\n  lookupGetter,\n} from './utils';\n\nconst getGlobal = () => (typeof window === 'undefined' ? null : window);\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\nconst _createTrustedTypesPolicy = function (trustedTypes, document) {\n  if (\n    typeof trustedTypes !== 'object' ||\n    typeof trustedTypes.createPolicy !== 'function'\n  ) {\n    return null;\n  }\n\n  // Allow the callers to control the unique policy name\n  // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n  // Policy creation with duplicate names throws in Trusted Types.\n  let suffix = null;\n  const ATTR_NAME = 'data-tt-policy-suffix';\n  if (\n    document.currentScript &&\n    document.currentScript.hasAttribute(ATTR_NAME)\n  ) {\n    suffix = document.currentScript.getAttribute(ATTR_NAME);\n  }\n\n  const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n  try {\n    return trustedTypes.createPolicy(policyName, {\n      createHTML(html) {\n        return html;\n      },\n    });\n  } catch (_) {\n    // Policy creation failed (most likely another DOMPurify script has\n    // already run). Skip creating the policy, as this will only cause errors\n    // if TT are enforced.\n    console.warn(\n      'TrustedTypes policy ' + policyName + ' could not be created.'\n    );\n    return null;\n  }\n};\n\nfunction createDOMPurify(window = getGlobal()) {\n  const DOMPurify = (root) => createDOMPurify(root);\n\n  /**\n   * Version label, exposed for easier checks\n   * if DOMPurify is up to date or not\n   */\n  DOMPurify.version = VERSION;\n\n  /**\n   * Array of elements that DOMPurify removed during sanitation.\n   * Empty if nothing was removed.\n   */\n  DOMPurify.removed = [];\n\n  if (!window || !window.document || window.document.nodeType !== 9) {\n    // Not running in a browser, provide a factory function\n    // so that you can pass your own Window\n    DOMPurify.isSupported = false;\n\n    return DOMPurify;\n  }\n\n  const originalDocument = window.document;\n\n  let { document } = window;\n  const {\n    DocumentFragment,\n    HTMLTemplateElement,\n    Node,\n    Element,\n    NodeFilter,\n    NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n    Text,\n    Comment,\n    DOMParser,\n    trustedTypes,\n  } = window;\n\n  const ElementPrototype = Element.prototype;\n\n  const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n  const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n  const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n  const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n  // As per issue #47, the web-components registry is inherited by a\n  // new document created via createHTMLDocument. As per the spec\n  // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n  // a new empty registry is used when creating a template contents owner\n  // document, so we use that as our parent document to ensure nothing\n  // is inherited.\n  if (typeof HTMLTemplateElement === 'function') {\n    const template = document.createElement('template');\n    if (template.content && template.content.ownerDocument) {\n      document = template.content.ownerDocument;\n    }\n  }\n\n  const trustedTypesPolicy = _createTrustedTypesPolicy(\n    trustedTypes,\n    originalDocument\n  );\n  const emptyHTML =\n    trustedTypesPolicy && RETURN_TRUSTED_TYPE\n      ? trustedTypesPolicy.createHTML('')\n      : '';\n\n  const {\n    implementation,\n    createNodeIterator,\n    getElementsByTagName,\n    createDocumentFragment,\n  } = document;\n  const { importNode } = originalDocument;\n\n  let documentMode = {};\n  try {\n    documentMode = clone(document).documentMode ? document.documentMode : {};\n  } catch (_) {}\n\n  let hooks = {};\n\n  /**\n   * Expose whether this browser supports running the full DOMPurify.\n   */\n  DOMPurify.isSupported =\n    typeof getParentNode === 'function' &&\n    implementation &&\n    typeof implementation.createHTMLDocument !== 'undefined' &&\n    documentMode !== 9;\n\n  const {\n    MUSTACHE_EXPR,\n    ERB_EXPR,\n    DATA_ATTR,\n    ARIA_ATTR,\n    IS_SCRIPT_OR_DATA,\n    ATTR_WHITESPACE,\n  } = EXPRESSIONS;\n\n  let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n  /**\n   * We consider the elements and attributes below to be safe. Ideally\n   * don't add any new ones but feel free to remove unwanted ones.\n   */\n\n  /* allowed element names */\n  let ALLOWED_TAGS = null;\n  const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n    ...TAGS.html,\n    ...TAGS.svg,\n    ...TAGS.svgFilters,\n    ...TAGS.mathMl,\n    ...TAGS.text,\n  ]);\n\n  /* Allowed attribute names */\n  let ALLOWED_ATTR = null;\n  const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n    ...ATTRS.html,\n    ...ATTRS.svg,\n    ...ATTRS.mathMl,\n    ...ATTRS.xml,\n  ]);\n\n  /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n  let FORBID_TAGS = null;\n\n  /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n  let FORBID_ATTR = null;\n\n  /* Decide if ARIA attributes are okay */\n  let ALLOW_ARIA_ATTR = true;\n\n  /* Decide if custom data attributes are okay */\n  let ALLOW_DATA_ATTR = true;\n\n  /* Decide if unknown protocols are okay */\n  let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n  /* Output should be safe for common template engines.\n   * This means, DOMPurify removes data attributes, mustaches and ERB\n   */\n  let SAFE_FOR_TEMPLATES = false;\n\n  /* Decide if document with <html>... should be returned */\n  let WHOLE_DOCUMENT = false;\n\n  /* Track whether config is already set on this instance of DOMPurify. */\n  let SET_CONFIG = false;\n\n  /* Decide if all elements (e.g. style, script) must be children of\n   * document.body. By default, browsers might move them to document.head */\n  let FORCE_BODY = false;\n\n  /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n   * string (or a TrustedHTML object if Trusted Types are supported).\n   * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n   */\n  let RETURN_DOM = false;\n\n  /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n   * string  (or a TrustedHTML object if Trusted Types are supported) */\n  let RETURN_DOM_FRAGMENT = false;\n\n  /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n   * `Node` is imported into the current `Document`. If this flag is not enabled the\n   * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n   * DOMPurify.\n   *\n   * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`\n   * might cause XSS from attacks hidden in closed shadowroots in case the browser\n   * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/\n   */\n  let RETURN_DOM_IMPORT = true;\n\n  /* Try to return a Trusted Type object instead of a string, return a string in\n   * case Trusted Types are not supported  */\n  let RETURN_TRUSTED_TYPE = false;\n\n  /* Output should be free from DOM clobbering attacks? */\n  let SANITIZE_DOM = true;\n\n  /* Keep element content when removing element? */\n  let KEEP_CONTENT = true;\n\n  /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n   * of importing it into a new Document and returning a sanitized copy */\n  let IN_PLACE = false;\n\n  /* Allow usage of profiles like html, svg and mathMl */\n  let USE_PROFILES = {};\n\n  /* Tags to ignore content of when KEEP_CONTENT is true */\n  const FORBID_CONTENTS = addToSet({}, [\n    'annotation-xml',\n    'audio',\n    'colgroup',\n    'desc',\n    'foreignobject',\n    'head',\n    'iframe',\n    'math',\n    'mi',\n    'mn',\n    'mo',\n    'ms',\n    'mtext',\n    'noembed',\n    'noframes',\n    'noscript',\n    'plaintext',\n    'script',\n    'style',\n    'svg',\n    'template',\n    'thead',\n    'title',\n    'video',\n    'xmp',\n  ]);\n\n  /* Tags that are safe for data: URIs */\n  let DATA_URI_TAGS = null;\n  const DEFAULT_DATA_URI_TAGS = addToSet({}, [\n    'audio',\n    'video',\n    'img',\n    'source',\n    'image',\n    'track',\n  ]);\n\n  /* Attributes safe for values like \"javascript:\" */\n  let URI_SAFE_ATTRIBUTES = null;\n  const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n    'alt',\n    'class',\n    'for',\n    'id',\n    'label',\n    'name',\n    'pattern',\n    'placeholder',\n    'summary',\n    'title',\n    'value',\n    'style',\n    'xmlns',\n  ]);\n\n  /* Keep a reference to config to pass to hooks */\n  let CONFIG = null;\n\n  /* Ideally, do not touch anything below this line */\n  /* ______________________________________________ */\n\n  const formElement = document.createElement('form');\n\n  /**\n   * _parseConfig\n   *\n   * @param  {Object} cfg optional config literal\n   */\n  // eslint-disable-next-line complexity\n  const _parseConfig = function (cfg) {\n    if (CONFIG && CONFIG === cfg) {\n      return;\n    }\n\n    /* Shield configuration object from tampering */\n    if (!cfg || typeof cfg !== 'object') {\n      cfg = {};\n    }\n\n    /* Shield configuration object from prototype pollution */\n    cfg = clone(cfg);\n\n    /* Set configuration parameters */\n    ALLOWED_TAGS =\n      'ALLOWED_TAGS' in cfg\n        ? addToSet({}, cfg.ALLOWED_TAGS)\n        : DEFAULT_ALLOWED_TAGS;\n    ALLOWED_ATTR =\n      'ALLOWED_ATTR' in cfg\n        ? addToSet({}, cfg.ALLOWED_ATTR)\n        : DEFAULT_ALLOWED_ATTR;\n    URI_SAFE_ATTRIBUTES =\n      'ADD_URI_SAFE_ATTR' in cfg\n        ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR)\n        : DEFAULT_URI_SAFE_ATTRIBUTES;\n    DATA_URI_TAGS =\n      'ADD_DATA_URI_TAGS' in cfg\n        ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS)\n        : DEFAULT_DATA_URI_TAGS;\n    FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n    FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n    USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n    ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n    ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n    ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n    SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n    WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n    RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n    RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n    RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true\n    RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n    FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n    SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n    KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n    IN_PLACE = cfg.IN_PLACE || false; // Default false\n    IS_ALLOWED_URI = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n    if (SAFE_FOR_TEMPLATES) {\n      ALLOW_DATA_ATTR = false;\n    }\n\n    if (RETURN_DOM_FRAGMENT) {\n      RETURN_DOM = true;\n    }\n\n    /* Parse profile info */\n    if (USE_PROFILES) {\n      ALLOWED_TAGS = addToSet({}, [...TAGS.text]);\n      ALLOWED_ATTR = [];\n      if (USE_PROFILES.html === true) {\n        addToSet(ALLOWED_TAGS, TAGS.html);\n        addToSet(ALLOWED_ATTR, ATTRS.html);\n      }\n\n      if (USE_PROFILES.svg === true) {\n        addToSet(ALLOWED_TAGS, TAGS.svg);\n        addToSet(ALLOWED_ATTR, ATTRS.svg);\n        addToSet(ALLOWED_ATTR, ATTRS.xml);\n      }\n\n      if (USE_PROFILES.svgFilters === true) {\n        addToSet(ALLOWED_TAGS, TAGS.svgFilters);\n        addToSet(ALLOWED_ATTR, ATTRS.svg);\n        addToSet(ALLOWED_ATTR, ATTRS.xml);\n      }\n\n      if (USE_PROFILES.mathMl === true) {\n        addToSet(ALLOWED_TAGS, TAGS.mathMl);\n        addToSet(ALLOWED_ATTR, ATTRS.mathMl);\n        addToSet(ALLOWED_ATTR, ATTRS.xml);\n      }\n    }\n\n    /* Merge configuration parameters */\n    if (cfg.ADD_TAGS) {\n      if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n        ALLOWED_TAGS = clone(ALLOWED_TAGS);\n      }\n\n      addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n    }\n\n    if (cfg.ADD_ATTR) {\n      if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n        ALLOWED_ATTR = clone(ALLOWED_ATTR);\n      }\n\n      addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n    }\n\n    if (cfg.ADD_URI_SAFE_ATTR) {\n      addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n    }\n\n    /* Add #text in case KEEP_CONTENT is set to true */\n    if (KEEP_CONTENT) {\n      ALLOWED_TAGS['#text'] = true;\n    }\n\n    /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n    if (WHOLE_DOCUMENT) {\n      addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n    }\n\n    /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n    if (ALLOWED_TAGS.table) {\n      addToSet(ALLOWED_TAGS, ['tbody']);\n      delete FORBID_TAGS.tbody;\n    }\n\n    // Prevent further manipulation of configuration.\n    // Not available in IE8, Safari 5, etc.\n    if (freeze) {\n      freeze(cfg);\n    }\n\n    CONFIG = cfg;\n  };\n\n  const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [\n    'mi',\n    'mo',\n    'mn',\n    'ms',\n    'mtext',\n  ]);\n\n  const HTML_INTEGRATION_POINTS = addToSet({}, [\n    'foreignobject',\n    'desc',\n    'title',\n    'annotation-xml',\n  ]);\n\n  /* Keep track of all possible SVG and MathML tags\n   * so that we can perform the namespace checks\n   * correctly. */\n  const ALL_SVG_TAGS = addToSet({}, TAGS.svg);\n  addToSet(ALL_SVG_TAGS, TAGS.svgFilters);\n  addToSet(ALL_SVG_TAGS, TAGS.svgDisallowed);\n\n  const ALL_MATHML_TAGS = addToSet({}, TAGS.mathMl);\n  addToSet(ALL_MATHML_TAGS, TAGS.mathMlDisallowed);\n\n  const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n  const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n  const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n\n  /**\n   *\n   *\n   * @param  {Element} element a DOM element whose namespace is being checked\n   * @returns {boolean} Return false if the element has a\n   *  namespace that a spec-compliant parser would never\n   *  return. Return true otherwise.\n   */\n  const _checkValidNamespace = function (element) {\n    let parent = getParentNode(element);\n\n    // In JSDOM, if we're inside shadow DOM, then parentNode\n    // can be null. We just simulate parent in this case.\n    if (!parent || !parent.tagName) {\n      parent = {\n        namespaceURI: HTML_NAMESPACE,\n        tagName: 'template',\n      };\n    }\n\n    const tagName = stringToLowerCase(element.tagName);\n    const parentTagName = stringToLowerCase(parent.tagName);\n\n    if (element.namespaceURI === SVG_NAMESPACE) {\n      // The only way to switch from HTML namespace to SVG\n      // is via <svg>. If it happens via any other tag, then\n      // it should be killed.\n      if (parent.namespaceURI === HTML_NAMESPACE) {\n        return tagName === 'svg';\n      }\n\n      // The only way to switch from MathML to SVG is via\n      // svg if parent is either <annotation-xml> or MathML\n      // text integration points.\n      if (parent.namespaceURI === MATHML_NAMESPACE) {\n        return (\n          tagName === 'svg' &&\n          (parentTagName === 'annotation-xml' ||\n            MATHML_TEXT_INTEGRATION_POINTS[parentTagName])\n        );\n      }\n\n      // We only allow elements that are defined in SVG\n      // spec. All others are disallowed in SVG namespace.\n      return Boolean(ALL_SVG_TAGS[tagName]);\n    }\n\n    if (element.namespaceURI === MATHML_NAMESPACE) {\n      // The only way to switch from HTML namespace to MathML\n      // is via <math>. If it happens via any other tag, then\n      // it should be killed.\n      if (parent.namespaceURI === HTML_NAMESPACE) {\n        return tagName === 'math';\n      }\n\n      // The only way to switch from SVG to MathML is via\n      // <math> and HTML integration points\n      if (parent.namespaceURI === SVG_NAMESPACE) {\n        return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n      }\n\n      // We only allow elements that are defined in MathML\n      // spec. All others are disallowed in MathML namespace.\n      return Boolean(ALL_MATHML_TAGS[tagName]);\n    }\n\n    if (element.namespaceURI === HTML_NAMESPACE) {\n      // The only way to switch from SVG to HTML is via\n      // HTML integration points, and from MathML to HTML\n      // is via MathML text integration points\n      if (\n        parent.namespaceURI === SVG_NAMESPACE &&\n        !HTML_INTEGRATION_POINTS[parentTagName]\n      ) {\n        return false;\n      }\n\n      if (\n        parent.namespaceURI === MATHML_NAMESPACE &&\n        !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]\n      ) {\n        return false;\n      }\n\n      // Certain elements are allowed in both SVG and HTML\n      // namespace. We need to specify them explicitly\n      // so that they don't get erronously deleted from\n      // HTML namespace.\n      const commonSvgAndHTMLElements = addToSet({}, [\n        'title',\n        'style',\n        'font',\n        'a',\n        'script',\n      ]);\n\n      // We disallow tags that are specific for MathML\n      // or SVG and should never appear in HTML namespace\n      return (\n        !ALL_MATHML_TAGS[tagName] &&\n        (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName])\n      );\n    }\n\n    // The code should never reach this place (this means\n    // that the element somehow got namespace that is not\n    // HTML, SVG or MathML). Return false just in case.\n    return false;\n  };\n\n  /**\n   * _forceRemove\n   *\n   * @param  {Node} node a DOM node\n   */\n  const _forceRemove = function (node) {\n    arrayPush(DOMPurify.removed, { element: node });\n    try {\n      node.parentNode.removeChild(node);\n    } catch (_) {\n      try {\n        node.outerHTML = emptyHTML;\n      } catch (_) {\n        node.remove();\n      }\n    }\n  };\n\n  /**\n   * _removeAttribute\n   *\n   * @param  {String} name an Attribute name\n   * @param  {Node} node a DOM node\n   */\n  const _removeAttribute = function (name, node) {\n    try {\n      arrayPush(DOMPurify.removed, {\n        attribute: node.getAttributeNode(name),\n        from: node,\n      });\n    } catch (_) {\n      arrayPush(DOMPurify.removed, {\n        attribute: null,\n        from: node,\n      });\n    }\n\n    node.removeAttribute(name);\n\n    // We void attribute values for unremovable \"is\"\" attributes\n    if (name === 'is' && !ALLOWED_ATTR[name]) {\n      if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n        try {\n          _forceRemove(node);\n        } catch (_) {}\n      } else {\n        try {\n          node.setAttribute(name, '');\n        } catch (_) {}\n      }\n    }\n  };\n\n  /**\n   * _initDocument\n   *\n   * @param  {String} dirty a string of dirty markup\n   * @return {Document} a DOM, filled with the dirty markup\n   */\n  const _initDocument = function (dirty) {\n    /* Create a HTML document */\n    let doc;\n    let leadingWhitespace;\n\n    if (FORCE_BODY) {\n      dirty = '<remove></remove>' + dirty;\n    } else {\n      /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n      const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n      leadingWhitespace = matches && matches[0];\n    }\n\n    const dirtyPayload = trustedTypesPolicy\n      ? trustedTypesPolicy.createHTML(dirty)\n      : dirty;\n    /* Use the DOMParser API by default, fallback later if needs be */\n    try {\n      doc = new DOMParser().parseFromString(dirtyPayload, 'text/html');\n    } catch (_) {}\n\n    /* Use createHTMLDocument in case DOMParser is not available */\n    if (!doc || !doc.documentElement) {\n      doc = implementation.createHTMLDocument('');\n      const { body } = doc;\n      body.parentNode.removeChild(body.parentNode.firstElementChild);\n      body.outerHTML = dirtyPayload;\n    }\n\n    if (dirty && leadingWhitespace) {\n      doc.body.insertBefore(\n        document.createTextNode(leadingWhitespace),\n        doc.body.childNodes[0] || null\n      );\n    }\n\n    /* Work on whole document or just its body */\n    return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n  };\n\n  /**\n   * _createIterator\n   *\n   * @param  {Document} root document/fragment to create iterator for\n   * @return {Iterator} iterator instance\n   */\n  const _createIterator = function (root) {\n    return createNodeIterator.call(\n      root.ownerDocument || root,\n      root,\n      NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT,\n      () => {\n        return NodeFilter.FILTER_ACCEPT;\n      },\n      false\n    );\n  };\n\n  /**\n   * _isClobbered\n   *\n   * @param  {Node} elm element to check for clobbering attacks\n   * @return {Boolean} true if clobbered, false if safe\n   */\n  const _isClobbered = function (elm) {\n    if (elm instanceof Text || elm instanceof Comment) {\n      return false;\n    }\n\n    if (\n      typeof elm.nodeName !== 'string' ||\n      typeof elm.textContent !== 'string' ||\n      typeof elm.removeChild !== 'function' ||\n      !(elm.attributes instanceof NamedNodeMap) ||\n      typeof elm.removeAttribute !== 'function' ||\n      typeof elm.setAttribute !== 'function' ||\n      typeof elm.namespaceURI !== 'string' ||\n      typeof elm.insertBefore !== 'function'\n    ) {\n      return true;\n    }\n\n    return false;\n  };\n\n  /**\n   * _isNode\n   *\n   * @param  {Node} obj object to check whether it's a DOM node\n   * @return {Boolean} true is object is a DOM node\n   */\n  const _isNode = function (object) {\n    return typeof Node === 'object'\n      ? object instanceof Node\n      : object &&\n          typeof object === 'object' &&\n          typeof object.nodeType === 'number' &&\n          typeof object.nodeName === 'string';\n  };\n\n  /**\n   * _executeHook\n   * Execute user configurable hooks\n   *\n   * @param  {String} entryPoint  Name of the hook's entry point\n   * @param  {Node} currentNode node to work on with the hook\n   * @param  {Object} data additional hook parameters\n   */\n  const _executeHook = function (entryPoint, currentNode, data) {\n    if (!hooks[entryPoint]) {\n      return;\n    }\n\n    arrayForEach(hooks[entryPoint], (hook) => {\n      hook.call(DOMPurify, currentNode, data, CONFIG);\n    });\n  };\n\n  /**\n   * _sanitizeElements\n   *\n   * @protect nodeName\n   * @protect textContent\n   * @protect removeChild\n   *\n   * @param   {Node} currentNode to check for permission to exist\n   * @return  {Boolean} true if node was killed, false if left alive\n   */\n  const _sanitizeElements = function (currentNode) {\n    let content;\n\n    /* Execute a hook if present */\n    _executeHook('beforeSanitizeElements', currentNode, null);\n\n    /* Check if element is clobbered or can clobber */\n    if (_isClobbered(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Check if tagname contains Unicode */\n    if (stringMatch(currentNode.nodeName, /[\\u0080-\\uFFFF]/)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Now let's check the element's type and name */\n    const tagName = stringToLowerCase(currentNode.nodeName);\n\n    /* Execute a hook if present */\n    _executeHook('uponSanitizeElement', currentNode, {\n      tagName,\n      allowedTags: ALLOWED_TAGS,\n    });\n\n    /* Detect mXSS attempts abusing namespace confusion */\n    if (\n      !_isNode(currentNode.firstElementChild) &&\n      (!_isNode(currentNode.content) ||\n        !_isNode(currentNode.content.firstElementChild)) &&\n      regExpTest(/<[/\\w]/g, currentNode.innerHTML) &&\n      regExpTest(/<[/\\w]/g, currentNode.textContent)\n    ) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Remove element if anything forbids its presence */\n    if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n      /* Keep content except for bad-listed elements */\n      if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n        const parentNode = getParentNode(currentNode);\n        const childNodes = getChildNodes(currentNode);\n\n        if (childNodes && parentNode) {\n          const childCount = childNodes.length;\n\n          for (let i = childCount - 1; i >= 0; --i) {\n            parentNode.insertBefore(\n              cloneNode(childNodes[i], true),\n              getNextSibling(currentNode)\n            );\n          }\n        }\n      }\n\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Check whether element has a valid namespace */\n    if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    if (\n      (tagName === 'noscript' || tagName === 'noembed') &&\n      regExpTest(/<\\/no(script|embed)/i, currentNode.innerHTML)\n    ) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Sanitize element content to be template-safe */\n    if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n      /* Get the element's text content */\n      content = currentNode.textContent;\n      content = stringReplace(content, MUSTACHE_EXPR, ' ');\n      content = stringReplace(content, ERB_EXPR, ' ');\n      if (currentNode.textContent !== content) {\n        arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n        currentNode.textContent = content;\n      }\n    }\n\n    /* Execute a hook if present */\n    _executeHook('afterSanitizeElements', currentNode, null);\n\n    return false;\n  };\n\n  /**\n   * _isValidAttribute\n   *\n   * @param  {string} lcTag Lowercase tag name of containing element.\n   * @param  {string} lcName Lowercase attribute name.\n   * @param  {string} value Attribute value.\n   * @return {Boolean} Returns true if `value` is valid, otherwise false.\n   */\n  // eslint-disable-next-line complexity\n  const _isValidAttribute = function (lcTag, lcName, value) {\n    /* Make sure attribute cannot clobber */\n    if (\n      SANITIZE_DOM &&\n      (lcName === 'id' || lcName === 'name') &&\n      (value in document || value in formElement)\n    ) {\n      return false;\n    }\n\n    /* Allow valid data-* attributes: At least one character after \"-\"\n        (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n        XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n        We don't need to check the value; it's always URI safe. */\n    if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR, lcName)) {\n      // This attribute is safe\n    } else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) {\n      // This attribute is safe\n      /* Otherwise, check the name is permitted */\n    } else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n      return false;\n\n      /* Check value is safe. First, is attr inert? If so, is safe */\n    } else if (URI_SAFE_ATTRIBUTES[lcName]) {\n      // This attribute is safe\n      /* Check no script, data or unknown possibly unsafe URI\n        unless we know URI values are safe for that attribute */\n    } else if (\n      regExpTest(IS_ALLOWED_URI, stringReplace(value, ATTR_WHITESPACE, ''))\n    ) {\n      // This attribute is safe\n      /* Keep image data URIs alive if src/xlink:href is allowed */\n      /* Further prevent gadget XSS for dynamically built script tags */\n    } else if (\n      (lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') &&\n      lcTag !== 'script' &&\n      stringIndexOf(value, 'data:') === 0 &&\n      DATA_URI_TAGS[lcTag]\n    ) {\n      // This attribute is safe\n      /* Allow unknown protocols: This provides support for links that\n        are handled by protocol handlers which may be unknown ahead of\n        time, e.g. fb:, spotify: */\n    } else if (\n      ALLOW_UNKNOWN_PROTOCOLS &&\n      !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))\n    ) {\n      // This attribute is safe\n      /* Check for binary attributes */\n      // eslint-disable-next-line no-negated-condition\n    } else if (!value) {\n      // Binary attributes are safe at this point\n      /* Anything else, presume unsafe, do not add it back */\n    } else {\n      return false;\n    }\n\n    return true;\n  };\n\n  /**\n   * _sanitizeAttributes\n   *\n   * @protect attributes\n   * @protect nodeName\n   * @protect removeAttribute\n   * @protect setAttribute\n   *\n   * @param  {Node} currentNode to sanitize\n   */\n  const _sanitizeAttributes = function (currentNode) {\n    let attr;\n    let value;\n    let lcName;\n    let l;\n    /* Execute a hook if present */\n    _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n    const { attributes } = currentNode;\n\n    /* Check if we have attributes; if not we might have a text node */\n    if (!attributes) {\n      return;\n    }\n\n    const hookEvent = {\n      attrName: '',\n      attrValue: '',\n      keepAttr: true,\n      allowedAttributes: ALLOWED_ATTR,\n    };\n    l = attributes.length;\n\n    /* Go backwards over all attributes; safely remove bad ones */\n    while (l--) {\n      attr = attributes[l];\n      const { name, namespaceURI } = attr;\n      value = stringTrim(attr.value);\n      lcName = stringToLowerCase(name);\n\n      /* Execute a hook if present */\n      hookEvent.attrName = lcName;\n      hookEvent.attrValue = value;\n      hookEvent.keepAttr = true;\n      hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n      _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n      value = hookEvent.attrValue;\n      /* Did the hooks approve of the attribute? */\n      if (hookEvent.forceKeepAttr) {\n        continue;\n      }\n\n      /* Remove attribute */\n      _removeAttribute(name, currentNode);\n\n      /* Did the hooks approve of the attribute? */\n      if (!hookEvent.keepAttr) {\n        continue;\n      }\n\n      /* Work around a security issue in jQuery 3.0 */\n      if (regExpTest(/\\/>/i, value)) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n\n      /* Sanitize attribute content to be template-safe */\n      if (SAFE_FOR_TEMPLATES) {\n        value = stringReplace(value, MUSTACHE_EXPR, ' ');\n        value = stringReplace(value, ERB_EXPR, ' ');\n      }\n\n      /* Is `value` valid for this attribute? */\n      const lcTag = currentNode.nodeName.toLowerCase();\n      if (!_isValidAttribute(lcTag, lcName, value)) {\n        continue;\n      }\n\n      /* Handle invalid data-* attribute set by try-catching it */\n      try {\n        if (namespaceURI) {\n          currentNode.setAttributeNS(namespaceURI, name, value);\n        } else {\n          /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n          currentNode.setAttribute(name, value);\n        }\n\n        arrayPop(DOMPurify.removed);\n      } catch (_) {}\n    }\n\n    /* Execute a hook if present */\n    _executeHook('afterSanitizeAttributes', currentNode, null);\n  };\n\n  /**\n   * _sanitizeShadowDOM\n   *\n   * @param  {DocumentFragment} fragment to iterate over recursively\n   */\n  const _sanitizeShadowDOM = function (fragment) {\n    let shadowNode;\n    const shadowIterator = _createIterator(fragment);\n\n    /* Execute a hook if present */\n    _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n    while ((shadowNode = shadowIterator.nextNode())) {\n      /* Execute a hook if present */\n      _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n      /* Sanitize tags and elements */\n      if (_sanitizeElements(shadowNode)) {\n        continue;\n      }\n\n      /* Deep shadow DOM detected */\n      if (shadowNode.content instanceof DocumentFragment) {\n        _sanitizeShadowDOM(shadowNode.content);\n      }\n\n      /* Check attributes, sanitize if necessary */\n      _sanitizeAttributes(shadowNode);\n    }\n\n    /* Execute a hook if present */\n    _executeHook('afterSanitizeShadowDOM', fragment, null);\n  };\n\n  /**\n   * Sanitize\n   * Public method providing core sanitation functionality\n   *\n   * @param {String|Node} dirty string or DOM node\n   * @param {Object} configuration object\n   */\n  // eslint-disable-next-line complexity\n  DOMPurify.sanitize = function (dirty, cfg) {\n    let body;\n    let importedNode;\n    let currentNode;\n    let oldNode;\n    let returnNode;\n    /* Make sure we have a string to sanitize.\n      DO NOT return early, as this will return the wrong type if\n      the user has requested a DOM object rather than a string */\n    if (!dirty) {\n      dirty = '<!-->';\n    }\n\n    /* Stringify, in case dirty is an object */\n    if (typeof dirty !== 'string' && !_isNode(dirty)) {\n      // eslint-disable-next-line no-negated-condition\n      if (typeof dirty.toString !== 'function') {\n        throw typeErrorCreate('toString is not a function');\n      } else {\n        dirty = dirty.toString();\n        if (typeof dirty !== 'string') {\n          throw typeErrorCreate('dirty is not a string, aborting');\n        }\n      }\n    }\n\n    /* Check we can run. Otherwise fall back or ignore */\n    if (!DOMPurify.isSupported) {\n      if (\n        typeof window.toStaticHTML === 'object' ||\n        typeof window.toStaticHTML === 'function'\n      ) {\n        if (typeof dirty === 'string') {\n          return window.toStaticHTML(dirty);\n        }\n\n        if (_isNode(dirty)) {\n          return window.toStaticHTML(dirty.outerHTML);\n        }\n      }\n\n      return dirty;\n    }\n\n    /* Assign config vars */\n    if (!SET_CONFIG) {\n      _parseConfig(cfg);\n    }\n\n    /* Clean up removed elements */\n    DOMPurify.removed = [];\n\n    /* Check if dirty is correctly typed for IN_PLACE */\n    if (typeof dirty === 'string') {\n      IN_PLACE = false;\n    }\n\n    if (IN_PLACE) {\n      /* No special handling necessary for in-place sanitization */\n    } else if (dirty instanceof Node) {\n      /* If dirty is a DOM element, append to an empty document to avoid\n         elements being stripped by the parser */\n      body = _initDocument('<!---->');\n      importedNode = body.ownerDocument.importNode(dirty, true);\n      if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n        /* Node is already a body, use as is */\n        body = importedNode;\n      } else if (importedNode.nodeName === 'HTML') {\n        body = importedNode;\n      } else {\n        // eslint-disable-next-line unicorn/prefer-node-append\n        body.appendChild(importedNode);\n      }\n    } else {\n      /* Exit directly if we have nothing to do */\n      if (\n        !RETURN_DOM &&\n        !SAFE_FOR_TEMPLATES &&\n        !WHOLE_DOCUMENT &&\n        // eslint-disable-next-line unicorn/prefer-includes\n        dirty.indexOf('<') === -1\n      ) {\n        return trustedTypesPolicy && RETURN_TRUSTED_TYPE\n          ? trustedTypesPolicy.createHTML(dirty)\n          : dirty;\n      }\n\n      /* Initialize the document to work on */\n      body = _initDocument(dirty);\n\n      /* Check we have a DOM node from the data */\n      if (!body) {\n        return RETURN_DOM ? null : emptyHTML;\n      }\n    }\n\n    /* Remove first element node (ours) if FORCE_BODY is set */\n    if (body && FORCE_BODY) {\n      _forceRemove(body.firstChild);\n    }\n\n    /* Get node iterator */\n    const nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n\n    /* Now start iterating over the created document */\n    while ((currentNode = nodeIterator.nextNode())) {\n      /* Fix IE's strange behavior with manipulated textNodes #89 */\n      if (currentNode.nodeType === 3 && currentNode === oldNode) {\n        continue;\n      }\n\n      /* Sanitize tags and elements */\n      if (_sanitizeElements(currentNode)) {\n        continue;\n      }\n\n      /* Shadow DOM detected, sanitize it */\n      if (currentNode.content instanceof DocumentFragment) {\n        _sanitizeShadowDOM(currentNode.content);\n      }\n\n      /* Check attributes, sanitize if necessary */\n      _sanitizeAttributes(currentNode);\n\n      oldNode = currentNode;\n    }\n\n    oldNode = null;\n\n    /* If we sanitized `dirty` in-place, return it. */\n    if (IN_PLACE) {\n      return dirty;\n    }\n\n    /* Return sanitized string or DOM */\n    if (RETURN_DOM) {\n      if (RETURN_DOM_FRAGMENT) {\n        returnNode = createDocumentFragment.call(body.ownerDocument);\n\n        while (body.firstChild) {\n          // eslint-disable-next-line unicorn/prefer-node-append\n          returnNode.appendChild(body.firstChild);\n        }\n      } else {\n        returnNode = body;\n      }\n\n      if (RETURN_DOM_IMPORT) {\n        /*\n          AdoptNode() is not used because internal state is not reset\n          (e.g. the past names map of a HTMLFormElement), this is safe\n          in theory but we would rather not risk another attack vector.\n          The state that is cloned by importNode() is explicitly defined\n          by the specs.\n        */\n        returnNode = importNode.call(originalDocument, returnNode, true);\n      }\n\n      return returnNode;\n    }\n\n    let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n    /* Sanitize final string template-safe */\n    if (SAFE_FOR_TEMPLATES) {\n      serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR, ' ');\n      serializedHTML = stringReplace(serializedHTML, ERB_EXPR, ' ');\n    }\n\n    return trustedTypesPolicy && RETURN_TRUSTED_TYPE\n      ? trustedTypesPolicy.createHTML(serializedHTML)\n      : serializedHTML;\n  };\n\n  /**\n   * Public method to set the configuration once\n   * setConfig\n   *\n   * @param {Object} cfg configuration object\n   */\n  DOMPurify.setConfig = function (cfg) {\n    _parseConfig(cfg);\n    SET_CONFIG = true;\n  };\n\n  /**\n   * Public method to remove the configuration\n   * clearConfig\n   *\n   */\n  DOMPurify.clearConfig = function () {\n    CONFIG = null;\n    SET_CONFIG = false;\n  };\n\n  /**\n   * Public method to check if an attribute value is valid.\n   * Uses last set config, if any. Otherwise, uses config defaults.\n   * isValidAttribute\n   *\n   * @param  {string} tag Tag name of containing element.\n   * @param  {string} attr Attribute name.\n   * @param  {string} value Attribute value.\n   * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n   */\n  DOMPurify.isValidAttribute = function (tag, attr, value) {\n    /* Initialize shared config vars if necessary. */\n    if (!CONFIG) {\n      _parseConfig({});\n    }\n\n    const lcTag = stringToLowerCase(tag);\n    const lcName = stringToLowerCase(attr);\n    return _isValidAttribute(lcTag, lcName, value);\n  };\n\n  /**\n   * AddHook\n   * Public method to add DOMPurify hooks\n   *\n   * @param {String} entryPoint entry point for the hook to add\n   * @param {Function} hookFunction function to execute\n   */\n  DOMPurify.addHook = function (entryPoint, hookFunction) {\n    if (typeof hookFunction !== 'function') {\n      return;\n    }\n\n    hooks[entryPoint] = hooks[entryPoint] || [];\n    arrayPush(hooks[entryPoint], hookFunction);\n  };\n\n  /**\n   * RemoveHook\n   * Public method to remove a DOMPurify hook at a given entryPoint\n   * (pops it from the stack of hooks if more are present)\n   *\n   * @param {String} entryPoint entry point for the hook to remove\n   */\n  DOMPurify.removeHook = function (entryPoint) {\n    if (hooks[entryPoint]) {\n      arrayPop(hooks[entryPoint]);\n    }\n  };\n\n  /**\n   * RemoveHooks\n   * Public method to remove all DOMPurify hooks at a given entryPoint\n   *\n   * @param  {String} entryPoint entry point for the hooks to remove\n   */\n  DOMPurify.removeHooks = function (entryPoint) {\n    if (hooks[entryPoint]) {\n      hooks[entryPoint] = [];\n    }\n  };\n\n  /**\n   * RemoveAllHooks\n   * Public method to remove all DOMPurify hooks\n   *\n   */\n  DOMPurify.removeAllHooks = function () {\n    hooks = {};\n  };\n\n  return DOMPurify;\n}\n\nexport default createDOMPurify();\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport { sanitize } from 'dompurify';\n\nexport function sanitizeStringRestricted(html: string) {\n  return sanitize(html, {\n    ALLOWED_TAGS: ['b', 'br', 'code', 'i', 'li', 'p', 'strong', 'ul', 'a'],\n    ALLOWED_ATTR: ['target', 'href']\n  });\n}\n\nexport function sanitizeString(html: string) {\n  return sanitize(html, { USE_PROFILES: { html: true } });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button, ResetButtonLink } from '../../components/controls/buttons';\nimport Select from '../../components/controls/Select';\nimport { translate } from '../../helpers/l10n';\nimport { sanitizeStringRestricted } from '../../helpers/sanitize';\nimport { SettingCategoryDefinition } from '../../types/settings';\n\nexport interface ReportFrequencyFormProps {\n  definition: SettingCategoryDefinition;\n  frequency: string;\n  onSave: (value: string) => Promise<void>;\n}\n\nexport default function ReportFrequencyForm(props: ReportFrequencyFormProps) {\n  const { definition, frequency } = props;\n  const { defaultValue } = definition;\n\n  const [currentSelection, setCurrentSelection] = React.useState(frequency);\n\n  const options = props.definition.options.map(option => ({\n    label: option,\n    value: option\n  }));\n\n  const handleReset = () => {\n    if (defaultValue) {\n      setCurrentSelection(defaultValue);\n      props.onSave(defaultValue);\n    }\n  };\n\n  return (\n    <div>\n      <h2>{translate('application_settings.report.frequency')}</h2>\n      {definition.description && (\n        <div\n          className=\"markdown\"\n          // eslint-disable-next-line react/no-danger\n          dangerouslySetInnerHTML={{\n            __html: sanitizeStringRestricted(definition.description)\n          }}\n        />\n      )}\n\n      <Select\n        className=\"input-medium\"\n        clearable={false}\n        name={definition.name}\n        onChange={({ value }: { value: string }) => setCurrentSelection(value)}\n        options={options}\n        value={currentSelection}\n      />\n\n      <div className=\"display-flex-center big-spacer-top\">\n        {frequency !== currentSelection && (\n          <Button\n            className=\"spacer-right button-success\"\n            onClick={() => props.onSave(currentSelection)}>\n            {translate('save')}\n          </Button>\n        )}\n\n        {defaultValue !== undefined && frequency !== defaultValue && (\n          <Button className=\"spacer-right\" onClick={handleReset}>\n            {translate('reset_verb')}\n          </Button>\n        )}\n\n        {frequency !== currentSelection && (\n          <ResetButtonLink className=\"spacer-right\" onClick={() => setCurrentSelection(frequency)}>\n            {translate('cancel')}\n          </ResetButtonLink>\n        )}\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getDefinitions, getValues, setSimpleSettingValue } from '../../api/settings';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate } from '../../helpers/l10n';\nimport { SettingCategoryDefinition, SettingsKey } from '../../types/settings';\nimport ReportFrequencyForm from './ReportFrequencyForm';\n\ninterface Props {\n  component: T.Component;\n}\n\ninterface State {\n  definition?: SettingCategoryDefinition;\n  frequency?: string;\n  loading: boolean;\n}\n\nexport default class ApplicationSettingsApp extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state: State = {\n    loading: true\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchInitialData();\n  }\n\n  async componentDidUpdate(prevProps: Props) {\n    if (prevProps.component.key !== this.props.component.key) {\n      this.setState({ loading: true });\n      await this.fetchSetting();\n      this.setState({ loading: false });\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchInitialData = async () => {\n    this.setState({ loading: true });\n    await Promise.all([this.fetchDefinition(), this.fetchSetting()]);\n    this.setState({ loading: false });\n  };\n\n  fetchDefinition = async () => {\n    const { component } = this.props;\n    try {\n      const definitions = await getDefinitions(component.key);\n      const definition = definitions.find(d => d.key === SettingsKey.ProjectReportFrequency);\n\n      if (this.mounted) {\n        this.setState({ definition });\n      }\n    } catch (_) {\n      /* do nothing */\n    }\n  };\n\n  fetchSetting = async () => {\n    const { component } = this.props;\n    try {\n      const setting = (\n        await getValues({ component: component.key, keys: SettingsKey.ProjectReportFrequency })\n      ).pop();\n\n      if (this.mounted) {\n        this.setState({\n          frequency: setting ? setting.value : undefined\n        });\n      }\n    } catch (_) {\n      /* do nothing */\n    }\n  };\n\n  handleSubmit = async (frequency: string) => {\n    const { component } = this.props;\n\n    try {\n      await setSimpleSettingValue({\n        component: component.key,\n        key: SettingsKey.ProjectReportFrequency,\n        value: frequency\n      });\n\n      this.setState({ frequency });\n    } catch (_) {\n      /* Do nothing */\n    }\n  };\n\n  render() {\n    const { definition, frequency, loading } = this.state;\n\n    return (\n      <div className=\"page page-limited application-settings\">\n        <h1>{translate('application_settings.page')}</h1>\n        <div className=\"boxed-group big-padded big-spacer-top\">\n          <DeferredSpinner loading={loading}>\n            <div>\n              {definition && frequency && (\n                <ReportFrequencyForm\n                  definition={definition}\n                  frequency={frequency}\n                  onSave={this.handleSubmit}\n                />\n              )}\n            </div>\n          </DeferredSpinner>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./ApplicationSettingsApp')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { IntlShape } from 'react-intl';\nimport { Store as ReduxStore } from 'redux';\nimport { Location, Router } from '../components/hoc/withRouter';\nimport { Store } from '../store/rootReducer';\nimport { L10nBundle } from './l10n';\n\nexport enum AdminPageExtension {\n  GovernanceConsole = 'governance/views_console'\n}\n\nexport interface ExtensionStartMethod {\n  (params: ExtensionStartMethodParameter | string): ExtensionStartMethodReturnType;\n}\n\nexport interface ExtensionStartMethodParameter {\n  store: ReduxStore<Store, any>;\n  el: HTMLElement | undefined | null;\n  currentUser: T.CurrentUser;\n  intl: IntlShape;\n  location: Location;\n  router: Router;\n  theme: {\n    colors: T.Dict<string>;\n    sizes: T.Dict<string>;\n    rawSizes: T.Dict<number>;\n    fonts: T.Dict<string>;\n    zIndexes: T.Dict<string>;\n    others: T.Dict<string>;\n  };\n  baseUrl: string;\n  l10nBundle: L10nBundle;\n}\n\nexport type ExtensionStartMethodReturnType = React.ReactNode | Function | void | undefined | null;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Dispatch } from 'redux';\nimport {\n  getDefinitions,\n  getValues,\n  resetSettingValue,\n  setSettingValue\n} from '../../../api/settings';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { parseError } from '../../../helpers/request';\nimport { closeAllGlobalMessages } from '../../../store/globalMessages';\nimport {\n  getSettingsAppChangedValue,\n  getSettingsAppDefinition,\n  Store\n} from '../../../store/rootReducer';\nimport { SettingDefinition } from '../../../types/settings';\nimport { isEmptyValue } from '../utils';\nimport { receiveDefinitions } from './definitions';\nimport {\n  cancelChange,\n  failValidation,\n  passValidation,\n  startLoading,\n  stopLoading\n} from './settingsPage';\nimport { receiveValues } from './values';\n\nfunction isURLKind(definition: SettingDefinition) {\n  return [\n    'sonar.core.serverBaseURL',\n    'sonar.auth.github.apiUrl',\n    'sonar.auth.github.webUrl',\n    'sonar.auth.gitlab.url',\n    'sonar.lf.gravatarServerUrl',\n    'sonar.lf.logoUrl',\n    'sonar.auth.saml.loginUrl'\n  ].includes(definition.key);\n}\n\nexport function fetchSettings(component?: string) {\n  return (dispatch: Dispatch) => {\n    return getDefinitions(component).then(definitions => {\n      const filtered = definitions.filter(definition => definition.type !== 'LICENSE');\n      dispatch(receiveDefinitions(filtered));\n    });\n  };\n}\n\nexport function fetchValues(keys: string[], component?: string) {\n  return (dispatch: Dispatch) =>\n    getValues({ keys: keys.join(), component }).then(settings => {\n      dispatch(receiveValues(keys, settings, component));\n      dispatch(closeAllGlobalMessages());\n    });\n}\n\nexport function checkValue(key: string) {\n  return (dispatch: Dispatch, getState: () => Store) => {\n    const state = getState();\n    const definition = getSettingsAppDefinition(state, key);\n    const value = getSettingsAppChangedValue(state, key);\n\n    if (isEmptyValue(definition, value)) {\n      if (definition.defaultValue === undefined) {\n        dispatch(failValidation(key, translate('settings.state.value_cant_be_empty_no_default')));\n      } else {\n        dispatch(failValidation(key, translate('settings.state.value_cant_be_empty')));\n      }\n      return false;\n    }\n\n    if (isURLKind(definition)) {\n      try {\n        // eslint-disable-next-line no-new\n        new URL(value);\n      } catch (e) {\n        dispatch(\n          failValidation(key, translateWithParameters('settings.state.url_not_valid', value))\n        );\n        return false;\n      }\n    }\n\n    if (definition.type === 'JSON') {\n      try {\n        JSON.parse(value);\n      } catch (e) {\n        dispatch(failValidation(key, e.message));\n\n        return false;\n      }\n    }\n\n    dispatch(passValidation(key));\n    return true;\n  };\n}\n\nexport function saveValue(key: string, component?: string) {\n  return (dispatch: Dispatch, getState: () => Store) => {\n    dispatch(startLoading(key));\n    const state = getState();\n    const definition = getSettingsAppDefinition(state, key);\n    const value = getSettingsAppChangedValue(state, key);\n\n    if (isEmptyValue(definition, value)) {\n      dispatch(failValidation(key, translate('settings.state.value_cant_be_empty')));\n      dispatch(stopLoading(key));\n      return Promise.reject();\n    }\n\n    return setSettingValue(definition, value, component)\n      .then(() => getValues({ keys: key, component }))\n      .then(values => {\n        dispatch(receiveValues([key], values, component));\n        dispatch(cancelChange(key));\n        dispatch(passValidation(key));\n        dispatch(stopLoading(key));\n      })\n      .catch(handleError(key, dispatch));\n  };\n}\n\nexport function resetValue(key: string, component?: string) {\n  return (dispatch: Dispatch) => {\n    dispatch(startLoading(key));\n\n    return resetSettingValue({ keys: key, component })\n      .then(() => getValues({ keys: key, component }))\n      .then(values => {\n        if (values.length > 0) {\n          dispatch(receiveValues([key], values, component));\n        } else {\n          dispatch(receiveValues([key], [], component));\n        }\n        dispatch(passValidation(key));\n        dispatch(stopLoading(key));\n      })\n      .catch(handleError(key, dispatch));\n  };\n}\n\nfunction handleError(key: string, dispatch: Dispatch) {\n  return (response: Response) => {\n    dispatch(stopLoading(key));\n    return parseError(response).then(message => {\n      dispatch(failValidation(key, message));\n      return Promise.reject();\n    });\n  };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum HousekeepingPolicy {\n  Weekly = 'Weekly',\n  Monthly = 'Monthly',\n  Trimestrial = 'Trimestrial',\n  Yearly = 'Yearly'\n}\n\nexport enum RangeOption {\n  Today = 'today',\n  Week = '7days',\n  Month = '30days',\n  Trimester = '90days',\n  Custom = 'custom'\n}\n\nexport function now() {\n  return new Date();\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function CalendarIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M2 14h2.25v-2.25H2V14zm2.75 0h2.5v-2.25h-2.5V14zM2 11.25h2.25v-2.5H2v2.5zm2.75 0h2.5v-2.5h-2.5v2.5zM2 8.25h2.25V6H2v2.25zM7.75 14h2.5v-2.25h-2.5V14zm-3-5.75h2.5V6h-2.5v2.25zm6 5.75H13v-2.25h-2.25V14zm-3-2.75h2.5v-2.5h-2.5v2.5zM5 4.5V2.25a.24.24 0 0 0-.074-.176A.24.24 0 0 0 4.75 2h-.5a.24.24 0 0 0-.176.074A.24.24 0 0 0 4 2.25V4.5a.24.24 0 0 0 .074.176.24.24 0 0 0 .176.074h.5a.24.24 0 0 0 .176-.074A.24.24 0 0 0 5 4.5zm5.75 6.75H13v-2.5h-2.25v2.5zm-3-3h2.5V6h-2.5v2.25zm3 0H13V6h-2.25v2.25zM11 4.5V2.25a.24.24 0 0 0-.074-.176A.24.24 0 0 0 10.75 2h-.5a.24.24 0 0 0-.176.074.24.24 0 0 0-.074.176V4.5a.24.24 0 0 0 .074.176.24.24 0 0 0 .176.074h.5a.24.24 0 0 0 .176-.074A.24.24 0 0 0 11 4.5zm3-.5v10c0 .27-.099.505-.297.703A.961.961 0 0 1 13 15H2a.961.961 0 0 1-.703-.297A.961.961 0 0 1 1 14V4c0-.27.099-.505.297-.703A.961.961 0 0 1 2 3h1v-.75c0-.344.122-.638.367-.883S3.907 1 4.25 1h.5c.344 0 .638.122.883.367S6 1.907 6 2.25V3h3v-.75c0-.344.122-.638.367-.883S9.907 1 10.25 1h.5c.344 0 .638.122.883.367s.367.54.367.883V3h1c.27 0 .505.099.703.297A.961.961 0 0 1 14 4z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ChevronLeftIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M4.404 8.28l4.604 4.602a.382.382 0 0 0 .279.118c.108 0 .2-.04.279-.118l1.03-1.03a.382.382 0 0 0 .117-.278.382.382 0 0 0-.117-.28L7.3 8l3.295-3.294a.382.382 0 0 0 .117-.28.382.382 0 0 0-.117-.279l-1.03-1.03A.382.382 0 0 0 9.286 3a.382.382 0 0 0-.278.118L4.404 7.72A.382.382 0 0 0 4.287 8c0 .108.04.201.117.28z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "const WEEKDAYS_LONG = [\n  'Sunday',\n  'Monday',\n  'Tuesday',\n  'Wednesday',\n  'Thursday',\n  'Friday',\n  'Saturday',\n];\n\nconst WEEKDAYS_SHORT = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\n\nconst MONTHS = [\n  'January',\n  'February',\n  'March',\n  'April',\n  'May',\n  'June',\n  'July',\n  'August',\n  'September',\n  'October',\n  'November',\n  'December',\n];\n\nexport function formatDay(day) {\n  return day.toDateString();\n}\n\nexport function formatMonthTitle(d) {\n  return `${MONTHS[d.getMonth()]} ${d.getFullYear()}`;\n}\n\nexport function formatWeekdayShort(i) {\n  return WEEKDAYS_SHORT[i];\n}\n\nexport function formatWeekdayLong(i) {\n  return WEEKDAYS_LONG[i];\n}\n\nexport function getFirstDayOfWeek() {\n  return 0;\n}\n\nexport function getMonths() {\n  return MONTHS;\n}\n\nexport default {\n  formatDay,\n  formatMonthTitle,\n  formatWeekdayShort,\n  formatWeekdayLong,\n  getFirstDayOfWeek,\n  getMonths,\n};\n", "export const LEFT = 37;\nexport const UP = 38;\nexport const RIGHT = 39;\nexport const DOWN = 40;\nexport const ENTER = 13;\nexport const SPACE = 32;\nexport const ESC = 27;\nexport const TAB = 9;\n", "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport LocaleUtils from './LocaleUtils';\n\nimport { ENTER } from './keys';\n\nexport default class Caption extends Component {\n  static propTypes = {\n    date: PropTypes.instanceOf(Date),\n    months: PropTypes.arrayOf(PropTypes.string),\n    locale: PropTypes.string,\n    localeUtils: PropTypes.object,\n    onClick: PropTypes.func,\n    classNames: PropTypes.shape({\n      caption: PropTypes.string.isRequired,\n    }).isRequired,\n  };\n\n  static defaultProps = {\n    localeUtils: LocaleUtils,\n  };\n\n  constructor(props) {\n    super(props);\n    this.handleKeyUp = this.handleKeyUp.bind(this);\n  }\n\n  shouldComponentUpdate(nextProps) {\n    return (\n      nextProps.locale !== this.props.locale ||\n      nextProps.classNames !== this.props.classNames ||\n      nextProps.date.getMonth() !== this.props.date.getMonth() ||\n      nextProps.date.getFullYear() !== this.props.date.getFullYear()\n    );\n  }\n\n  handleKeyUp(e) {\n    if (e.keyCode === ENTER) {\n      this.props.onClick(e);\n    }\n  }\n\n  render() {\n    const {\n      classNames,\n      date,\n      months,\n      locale,\n      localeUtils,\n      onClick,\n    } = this.props;\n    return (\n      <div className={classNames.caption} role=\"heading\">\n        <div onClick={onClick} onKeyUp={this.handleKeyUp}>\n          {months\n            ? `${months[date.getMonth()]} ${date.getFullYear()}`\n            : localeUtils.formatMonthTitle(date, locale)}\n        </div>\n      </div>\n    );\n  }\n}\n", "// Proxy object to map classnames when css modules are not used\n\nexport default {\n  container: 'DayPicker',\n  wrapper: 'DayPicker-wrapper',\n  interactionDisabled: 'DayPicker--interactionDisabled',\n  months: 'DayPicker-Months',\n  month: 'DayPicker-Month',\n\n  navBar: 'DayPicker-NavBar',\n  navButtonPrev: 'DayPicker-NavButton DayPicker-NavButton--prev',\n  navButtonNext: 'DayPicker-NavButton DayPicker-NavButton--next',\n  navButtonInteractionDisabled: 'DayPicker-NavButton--interactionDisabled',\n\n  caption: 'DayPicker-Caption',\n  weekdays: 'DayPicker-Weekdays',\n  weekdaysRow: 'DayPicker-WeekdaysRow',\n  weekday: 'DayPicker-Weekday',\n  body: 'DayPicker-Body',\n  week: 'DayPicker-Week',\n  weekNumber: 'DayPicker-WeekNumber',\n  day: 'DayPicker-Day',\n  footer: 'DayPicker-Footer',\n  todayButton: 'DayPicker-TodayButton',\n\n  // default modifiers\n  today: 'today',\n  selected: 'selected',\n  disabled: 'disabled',\n  outside: 'outside',\n};\n", "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport defaultClassNames from './classNames';\nimport { SPACE, ENTER } from './keys';\n\nexport default class Navbar extends Component {\n  static propTypes = {\n    classNames: PropTypes.shape({\n      navBar: PropTypes.string.isRequired,\n      navButtonPrev: PropTypes.string.isRequired,\n      navButtonNext: PropTypes.string.isRequired,\n    }),\n    className: PropTypes.string,\n    showPreviousButton: PropTypes.bool,\n    showNextButton: PropTypes.bool,\n    onPreviousClick: PropTypes.func,\n    onNextClick: PropTypes.func,\n    dir: PropTypes.string,\n    labels: PropTypes.shape({\n      previousMonth: PropTypes.string.isRequired,\n      nextMonth: PropTypes.string.isRequired,\n    }),\n  };\n\n  static defaultProps = {\n    classNames: defaultClassNames,\n    dir: 'ltr',\n    labels: {\n      previousMonth: 'Previous Month',\n      nextMonth: 'Next Month',\n    },\n    showPreviousButton: true,\n    showNextButton: true,\n  };\n\n  shouldComponentUpdate(nextProps) {\n    return (\n      nextProps.labels !== this.props.labels ||\n      nextProps.dir !== this.props.dir ||\n      this.props.showPreviousButton !== nextProps.showPreviousButton ||\n      this.props.showNextButton !== nextProps.showNextButton\n    );\n  }\n\n  handleNextClick = () => {\n    if (this.props.onNextClick) {\n      this.props.onNextClick();\n    }\n  };\n\n  handlePreviousClick = () => {\n    if (this.props.onPreviousClick) {\n      this.props.onPreviousClick();\n    }\n  };\n\n  handleNextKeyDown = e => {\n    if (e.keyCode !== ENTER && e.keyCode !== SPACE) {\n      return;\n    }\n    e.preventDefault();\n    this.handleNextClick();\n  };\n\n  handlePreviousKeyDown = e => {\n    if (e.keyCode !== ENTER && e.keyCode !== SPACE) {\n      return;\n    }\n    e.preventDefault();\n    this.handlePreviousClick();\n  };\n\n  render() {\n    const {\n      classNames,\n      className,\n      showPreviousButton,\n      showNextButton,\n      labels,\n      dir,\n    } = this.props;\n\n    let previousClickHandler;\n    let nextClickHandler;\n    let previousKeyDownHandler;\n    let nextKeyDownHandler;\n    let shouldShowPrevious;\n    let shouldShowNext;\n\n    if (dir === 'rtl') {\n      previousClickHandler = this.handleNextClick;\n      nextClickHandler = this.handlePreviousClick;\n      previousKeyDownHandler = this.handleNextKeyDown;\n      nextKeyDownHandler = this.handlePreviousKeyDown;\n      shouldShowNext = showPreviousButton;\n      shouldShowPrevious = showNextButton;\n    } else {\n      previousClickHandler = this.handlePreviousClick;\n      nextClickHandler = this.handleNextClick;\n      previousKeyDownHandler = this.handlePreviousKeyDown;\n      nextKeyDownHandler = this.handleNextKeyDown;\n      shouldShowNext = showNextButton;\n      shouldShowPrevious = showPreviousButton;\n    }\n\n    const previousClassName = shouldShowPrevious\n      ? classNames.navButtonPrev\n      : `${classNames.navButtonPrev} ${\n          classNames.navButtonInteractionDisabled\n        }`;\n\n    const nextClassName = shouldShowNext\n      ? classNames.navButtonNext\n      : `${classNames.navButtonNext} ${\n          classNames.navButtonInteractionDisabled\n        }`;\n\n    const previousButton = (\n      <span\n        tabIndex=\"0\"\n        role=\"button\"\n        aria-label={labels.previousMonth}\n        key=\"previous\"\n        className={previousClassName}\n        onKeyDown={shouldShowPrevious ? previousKeyDownHandler : undefined}\n        onClick={shouldShowPrevious ? previousClickHandler : undefined}\n      />\n    );\n\n    const nextButton = (\n      <span\n        tabIndex=\"0\"\n        role=\"button\"\n        aria-label={labels.nextMonth}\n        key=\"right\"\n        className={nextClassName}\n        onKeyDown={shouldShowNext ? nextKeyDownHandler : undefined}\n        onClick={shouldShowNext ? nextClickHandler : undefined}\n      />\n    );\n\n    return (\n      <div className={className || classNames.navBar}>\n        {dir === 'rtl'\n          ? [nextButton, previousButton]\n          : [previousButton, nextButton]}\n      </div>\n    );\n  }\n}\n", "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class Weekdays extends Component {\n  static propTypes = {\n    classNames: PropTypes.shape({\n      weekday: PropTypes.string.isRequired,\n      weekdays: PropTypes.string.isRequired,\n      weekdaysRow: PropTypes.string.isRequired,\n    }).isRequired,\n\n    firstDayOfWeek: PropTypes.number.isRequired,\n    weekdaysLong: PropTypes.arrayOf(PropTypes.string),\n    weekdaysShort: PropTypes.arrayOf(PropTypes.string),\n    showWeekNumbers: PropTypes.bool,\n    locale: PropTypes.string.isRequired,\n    localeUtils: PropTypes.object.isRequired,\n    weekdayElement: PropTypes.oneOfType([\n      PropTypes.element,\n      PropTypes.func,\n      PropTypes.instanceOf(React.Component),\n    ]),\n  };\n\n  shouldComponentUpdate(nextProps) {\n    return this.props !== nextProps;\n  }\n\n  render() {\n    const {\n      classNames,\n      firstDayOfWeek,\n      showWeekNumbers,\n      weekdaysLong,\n      weekdaysShort,\n      locale,\n      localeUtils,\n      weekdayElement,\n    } = this.props;\n    const days = [];\n    for (let i = 0; i < 7; i += 1) {\n      const weekday = (i + firstDayOfWeek) % 7;\n      const elementProps = {\n        key: i,\n        className: classNames.weekday,\n        weekday,\n        weekdaysLong,\n        weekdaysShort,\n        localeUtils,\n        locale,\n      };\n      const element = React.isValidElement(weekdayElement)\n        ? React.cloneElement(weekdayElement, elementProps)\n        : React.createElement(weekdayElement, elementProps);\n      days.push(element);\n    }\n\n    return (\n      <div className={classNames.weekdays} role=\"rowgroup\">\n        <div className={classNames.weekdaysRow} role=\"row\">\n          {showWeekNumbers && <div className={classNames.weekday} />}\n          {days}\n        </div>\n      </div>\n    );\n  }\n}\n", "/**\n * Clone a date object.\n *\n * @export\n * @param  {Date} d The date to clone\n * @return {Date} The cloned date\n */\nexport function clone(d) {\n  return new Date(d.getTime());\n}\n\n/**\n * Return `true` if the passed value is a valid JavaScript Date object.\n *\n * @export\n * @param {any} value\n * @returns {Boolean}\n */\nexport function isDate(value) {\n  return value instanceof Date && !isNaN(value.valueOf());\n}\n\n/**\n * Return `d` as a new date with `n` months added.\n *\n * @export\n * @param {[type]} d\n * @param {[type]} n\n */\nexport function addMonths(d, n) {\n  const newDate = clone(d);\n  newDate.setMonth(d.getMonth() + n);\n  return newDate;\n}\n\n/**\n * Return `true` if two dates are the same day, ignoring the time.\n *\n * @export\n * @param  {Date}  d1\n * @param  {Date}  d2\n * @return {Boolean}\n */\nexport function isSameDay(d1, d2) {\n  if (!d1 || !d2) {\n    return false;\n  }\n  return (\n    d1.getDate() === d2.getDate() &&\n    d1.getMonth() === d2.getMonth() &&\n    d1.getFullYear() === d2.getFullYear()\n  );\n}\n\n/**\n * Return `true` if two dates fall in the same month.\n *\n * @export\n * @param  {Date}  d1\n * @param  {Date}  d2\n * @return {Boolean}\n */\nexport function isSameMonth(d1, d2) {\n  if (!d1 || !d2) {\n    return false;\n  }\n  return (\n    d1.getMonth() === d2.getMonth() && d1.getFullYear() === d2.getFullYear()\n  );\n}\n\n/**\n * Returns `true` if the first day is before the second day.\n *\n * @export\n * @param {Date} d1\n * @param {Date} d2\n * @returns {Boolean}\n */\nexport function isDayBefore(d1, d2) {\n  const day1 = clone(d1).setHours(0, 0, 0, 0);\n  const day2 = clone(d2).setHours(0, 0, 0, 0);\n  return day1 < day2;\n}\n\n/**\n * Returns `true` if the first day is after the second day.\n *\n * @export\n * @param {Date} d1\n * @param {Date} d2\n * @returns {Boolean}\n */\nexport function isDayAfter(d1, d2) {\n  const day1 = clone(d1).setHours(0, 0, 0, 0);\n  const day2 = clone(d2).setHours(0, 0, 0, 0);\n  return day1 > day2;\n}\n\n/**\n * Return `true` if a day is in the past, e.g. yesterday or any day\n * before yesterday.\n *\n * @export\n * @param  {Date}  d\n * @return {Boolean}\n */\nexport function isPastDay(d) {\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  return isDayBefore(d, today);\n}\n\n/**\n * Return `true` if a day is in the future, e.g. tomorrow or any day\n * after tomorrow.\n *\n * @export\n * @param  {Date}  d\n * @return {Boolean}\n */\nexport function isFutureDay(d) {\n  const tomorrow = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\n  tomorrow.setHours(0, 0, 0, 0);\n  return d >= tomorrow;\n}\n\n/**\n * Return `true` if day `d` is between days `d1` and `d2`,\n * without including them.\n *\n * @export\n * @param  {Date}  d\n * @param  {Date}  d1\n * @param  {Date}  d2\n * @return {Boolean}\n */\nexport function isDayBetween(d, d1, d2) {\n  const date = clone(d);\n  date.setHours(0, 0, 0, 0);\n  return (\n    (isDayAfter(date, d1) && isDayBefore(date, d2)) ||\n    (isDayAfter(date, d2) && isDayBefore(date, d1))\n  );\n}\n\n/**\n * Add a day to a range and return a new range. A range is an object with\n * `from` and `to` days.\n *\n * @export\n * @param {Date} day\n * @param {Object} range\n * @return {Object} Returns a new range object\n */\nexport function addDayToRange(day, range = { from: null, to: null }) {\n  let { from, to } = range;\n  if (!from) {\n    from = day;\n  } else if (from && to && isSameDay(from, to) && isSameDay(day, from)) {\n    from = null;\n    to = null;\n  } else if (to && isDayBefore(day, from)) {\n    from = day;\n  } else if (to && isSameDay(day, to)) {\n    from = day;\n    to = day;\n  } else {\n    to = day;\n    if (isDayBefore(to, from)) {\n      to = from;\n      from = day;\n    }\n  }\n\n  return { from, to };\n}\n\n/**\n * Return `true` if a day is included in a range of days.\n *\n * @export\n * @param  {Date}  day\n * @param  {Object}  range\n * @return {Boolean}\n */\nexport function isDayInRange(day, range) {\n  const { from, to } = range;\n  return (\n    (from && isSameDay(day, from)) ||\n    (to && isSameDay(day, to)) ||\n    (from && to && isDayBetween(day, from, to))\n  );\n}\n\n/**\n * Return the year's week number (as per ISO, i.e. with the week starting from monday)\n * for the given day.\n *\n * @export\n * @param {Date} day\n * @returns {Number}\n */\nexport function getWeekNumber(day) {\n  const date = clone(day);\n  date.setHours(0, 0, 0);\n  date.setDate(date.getDate() + 4 - (date.getDay() || 7));\n  return Math.ceil(\n    ((date - new Date(date.getFullYear(), 0, 1)) / 8.64e7 + 1) / 7\n  );\n}\n\nexport default {\n  addDayToRange,\n  addMonths,\n  clone,\n  getWeekNumber,\n  isDate,\n  isDayAfter,\n  isDayBefore,\n  isDayBetween,\n  isDayInRange,\n  isFutureDay,\n  isPastDay,\n  isSameDay,\n  isSameMonth,\n};\n", "import { clone } from './DateUtils';\nimport { getFirstDayOfWeek } from './LocaleUtils';\nimport defaultClassNames from './classNames';\n\nexport function cancelEvent(e) {\n  e.preventDefault();\n  e.stopPropagation();\n}\n\nexport function getFirstDayOfMonth(d) {\n  return new Date(d.getFullYear(), d.getMonth(), 1, 12);\n}\n\nexport function getDaysInMonth(d) {\n  const resultDate = getFirstDayOfMonth(d);\n\n  resultDate.setMonth(resultDate.getMonth() + 1);\n  resultDate.setDate(resultDate.getDate() - 1);\n\n  return resultDate.getDate();\n}\n\nexport function getModifiersFromProps(props) {\n  const modifiers = { ...props.modifiers };\n  if (props.selectedDays) {\n    modifiers[props.classNames.selected] = props.selectedDays;\n  }\n  if (props.disabledDays) {\n    modifiers[props.classNames.disabled] = props.disabledDays;\n  }\n  return modifiers;\n}\n\nexport function getFirstDayOfWeekFromProps(props) {\n  const { firstDayOfWeek, locale = 'en', localeUtils = {} } = props;\n  if (!isNaN(firstDayOfWeek)) {\n    return firstDayOfWeek;\n  }\n  if (localeUtils.getFirstDayOfWeek) {\n    return localeUtils.getFirstDayOfWeek(locale);\n  }\n  return 0;\n}\n\nexport function isRangeOfDates(value) {\n  return !!(value && value.from && value.to);\n}\n\nexport function getMonthsDiff(d1, d2) {\n  return (\n    d2.getMonth() - d1.getMonth() + 12 * (d2.getFullYear() - d1.getFullYear())\n  );\n}\n\nexport function getWeekArray(\n  d,\n  firstDayOfWeek = getFirstDayOfWeek(),\n  fixedWeeks\n) {\n  const daysInMonth = getDaysInMonth(d);\n  const dayArray = [];\n\n  let week = [];\n  const weekArray = [];\n\n  for (let i = 1; i <= daysInMonth; i += 1) {\n    dayArray.push(new Date(d.getFullYear(), d.getMonth(), i, 12));\n  }\n\n  dayArray.forEach(day => {\n    if (week.length > 0 && day.getDay() === firstDayOfWeek) {\n      weekArray.push(week);\n      week = [];\n    }\n    week.push(day);\n    if (dayArray.indexOf(day) === dayArray.length - 1) {\n      weekArray.push(week);\n    }\n  });\n\n  // unshift days to start the first week\n  const firstWeek = weekArray[0];\n  for (let i = 7 - firstWeek.length; i > 0; i -= 1) {\n    const outsideDate = clone(firstWeek[0]);\n    outsideDate.setDate(firstWeek[0].getDate() - 1);\n    firstWeek.unshift(outsideDate);\n  }\n\n  // push days until the end of the last week\n  const lastWeek = weekArray[weekArray.length - 1];\n  for (let i = lastWeek.length; i < 7; i += 1) {\n    const outsideDate = clone(lastWeek[lastWeek.length - 1]);\n    outsideDate.setDate(lastWeek[lastWeek.length - 1].getDate() + 1);\n    lastWeek.push(outsideDate);\n  }\n\n  // add extra weeks to reach 6 weeks\n  if (fixedWeeks && weekArray.length < 6) {\n    let lastExtraWeek;\n\n    for (let i = weekArray.length; i < 6; i += 1) {\n      lastExtraWeek = weekArray[weekArray.length - 1];\n      const lastDay = lastExtraWeek[lastExtraWeek.length - 1];\n      const extraWeek = [];\n\n      for (let j = 0; j < 7; j += 1) {\n        const outsideDate = clone(lastDay);\n        outsideDate.setDate(lastDay.getDate() + j + 1);\n        extraWeek.push(outsideDate);\n      }\n\n      weekArray.push(extraWeek);\n    }\n  }\n\n  return weekArray;\n}\n\nexport function startOfMonth(d) {\n  const newDate = clone(d);\n  newDate.setDate(1);\n  newDate.setHours(12, 0, 0, 0); // always set noon to avoid time zone issues\n  return newDate;\n}\n\nexport function getDayNodes(node, classNames) {\n  let outsideClassName;\n  if (classNames === defaultClassNames) {\n    // When using CSS modules prefix the modifier as required by the BEM syntax\n    outsideClassName = `${classNames.day}--${classNames.outside}`;\n  } else {\n    outsideClassName = `${classNames.outside}`;\n  }\n  const dayQuery = classNames.day.replace(/ /g, '.');\n  const outsideDayQuery = outsideClassName.replace(/ /g, '.');\n  const selector = `.${dayQuery}:not(.${outsideDayQuery})`;\n  return node.querySelectorAll(selector);\n}\n\nexport function nodeListToArray(nodeList) {\n  return Array.prototype.slice.call(nodeList, 0);\n}\n\nexport function hasOwnProp(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n", "/* eslint-disable jsx-a11y/no-static-element-interactions, react/forbid-prop-types */\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { isSameDay } from './DateUtils';\nimport { hasOwnProp } from './Helpers';\n\nimport defaultClassNames from './classNames';\n\nfunction handleEvent(handler, day, modifiers) {\n  if (!handler) {\n    return undefined;\n  }\n  return e => {\n    e.persist();\n    handler(day, modifiers, e);\n  };\n}\n\nexport default class Day extends Component {\n  static propTypes = {\n    classNames: PropTypes.shape({\n      day: PropTypes.string.isRequired,\n    }).isRequired,\n\n    day: PropTypes.instanceOf(Date).isRequired,\n    children: PropTypes.node.isRequired,\n\n    ariaDisabled: PropTypes.bool,\n    ariaLabel: PropTypes.string,\n    ariaSelected: PropTypes.bool,\n    empty: PropTypes.bool,\n    modifiers: PropTypes.object,\n    modifiersStyles: PropTypes.object,\n    onClick: PropTypes.func,\n    onKeyDown: PropTypes.func,\n    onMouseEnter: PropTypes.func,\n    onMouseLeave: PropTypes.func,\n    onMouseDown: PropTypes.func,\n    onMouseUp: PropTypes.func,\n    onTouchEnd: PropTypes.func,\n    onTouchStart: PropTypes.func,\n    onFocus: PropTypes.func,\n    tabIndex: PropTypes.number,\n  };\n\n  static defaultProps = {\n    tabIndex: -1,\n  };\n\n  static defaultProps = {\n    modifiers: {},\n    modifiersStyles: {},\n    empty: false,\n  };\n\n  shouldComponentUpdate(nextProps) {\n    const propNames = Object.keys(this.props);\n    const nextPropNames = Object.keys(nextProps);\n    if (propNames.length !== nextPropNames.length) {\n      return true;\n    }\n    return propNames.some(name => {\n      if (\n        name === 'modifiers' ||\n        name === 'modifiersStyles' ||\n        name === 'classNames'\n      ) {\n        const prop = this.props[name];\n        const nextProp = nextProps[name];\n        const modifiers = Object.keys(prop);\n        const nextModifiers = Object.keys(nextProp);\n        if (modifiers.length !== nextModifiers.length) {\n          return true;\n        }\n        return modifiers.some(\n          mod => !hasOwnProp(nextProp, mod) || prop[mod] !== nextProp[mod]\n        );\n      }\n      if (name === 'day') {\n        return !isSameDay(this.props[name], nextProps[name]);\n      }\n      return (\n        !hasOwnProp(nextProps, name) || this.props[name] !== nextProps[name]\n      );\n    });\n  }\n\n  render() {\n    const {\n      classNames,\n      modifiersStyles,\n      day,\n      tabIndex,\n      empty,\n      modifiers,\n      onMouseEnter,\n      onMouseLeave,\n      onMouseUp,\n      onMouseDown,\n      onClick,\n      onKeyDown,\n      onTouchStart,\n      onTouchEnd,\n      onFocus,\n      ariaLabel,\n      ariaDisabled,\n      ariaSelected,\n      children,\n    } = this.props;\n\n    let className = classNames.day;\n    if (classNames !== defaultClassNames) {\n      // When using CSS modules prefix the modifier as required by the BEM syntax\n      className += ` ${Object.keys(modifiers).join(' ')}`;\n    } else {\n      className += Object.keys(modifiers)\n        .map(modifier => ` ${className}--${modifier}`)\n        .join('');\n    }\n\n    let style;\n    if (modifiersStyles) {\n      Object.keys(modifiers)\n        .filter(modifier => !!modifiersStyles[modifier])\n        .forEach(modifier => {\n          style = { ...style, ...modifiersStyles[modifier] };\n        });\n    }\n\n    if (empty) {\n      return <div aria-disabled className={className} style={style} />;\n    }\n    return (\n      <div\n        className={className}\n        tabIndex={tabIndex}\n        style={style}\n        role=\"gridcell\"\n        aria-label={ariaLabel}\n        aria-disabled={ariaDisabled}\n        aria-selected={ariaSelected}\n        onClick={handleEvent(onClick, day, modifiers)}\n        onKeyDown={handleEvent(onKeyDown, day, modifiers)}\n        onMouseEnter={handleEvent(onMouseEnter, day, modifiers)}\n        onMouseLeave={handleEvent(onMouseLeave, day, modifiers)}\n        onMouseUp={handleEvent(onMouseUp, day, modifiers)}\n        onMouseDown={handleEvent(onMouseDown, day, modifiers)}\n        onTouchEnd={handleEvent(onTouchEnd, day, modifiers)}\n        onTouchStart={handleEvent(onTouchStart, day, modifiers)}\n        onFocus={handleEvent(onFocus, day, modifiers)}\n      >\n        {children}\n      </div>\n    );\n  }\n}\n", "import { isDayAfter, isDayBefore, isDayInRange, isSameDay } from './DateUtils';\nimport { isRangeOfDates } from './Helpers';\n\n/**\n * Return `true` if a date matches the specified modifier.\n *\n * @export\n * @param {Date} day\n * @param {Any} modifier\n * @return {Boolean}\n */\nexport function dayMatchesModifier(day, modifier) {\n  if (!modifier) {\n    return false;\n  }\n  const arr = Array.isArray(modifier) ? modifier : [modifier];\n  return arr.some(mod => {\n    if (!mod) {\n      return false;\n    }\n    if (mod instanceof Date) {\n      return isSameDay(day, mod);\n    }\n    if (isRangeOfDates(mod)) {\n      return isDayInRange(day, mod);\n    }\n    if (mod.after && mod.before && isDayAfter(mod.before, mod.after)) {\n      return isDayAfter(day, mod.after) && isDayBefore(day, mod.before);\n    }\n    if (\n      mod.after &&\n      mod.before &&\n      (isDayAfter(mod.after, mod.before) || isSameDay(mod.after, mod.before))\n    ) {\n      return isDayAfter(day, mod.after) || isDayBefore(day, mod.before);\n    }\n    if (mod.after) {\n      return isDayAfter(day, mod.after);\n    }\n    if (mod.before) {\n      return isDayBefore(day, mod.before);\n    }\n    if (mod.daysOfWeek) {\n      return mod.daysOfWeek.some(dayOfWeek => day.getDay() === dayOfWeek);\n    }\n    if (typeof mod === 'function') {\n      return mod(day);\n    }\n    return false;\n  });\n}\n\n/**\n * Return the modifiers matching the given day for the given\n * object of modifiers.\n *\n * @export\n * @param {Date} day\n * @param {Object} [modifiersObj={}]\n * @return {Array}\n */\nexport function getModifiersForDay(day, modifiersObj = {}) {\n  return Object.keys(modifiersObj).reduce((modifiers, modifierName) => {\n    const value = modifiersObj[modifierName];\n    if (dayMatchesModifier(day, value)) {\n      modifiers.push(modifierName);\n    }\n    return modifiers;\n  }, []);\n}\n\nexport default { dayMatchesModifier, getModifiersForDay };\n", "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Weekdays from './Weekdays';\nimport Day from './Day';\nimport { ENTER } from './keys';\n\nimport * as ModifiersUtils from './ModifiersUtils';\nimport * as Helpers from './Helpers';\nimport * as DateUtils from './DateUtils';\n\nexport default class Month extends Component {\n  static propTypes = {\n    classNames: PropTypes.shape({\n      body: PropTypes.string.isRequired,\n      month: PropTypes.string.isRequired,\n      outside: PropTypes.string.isRequired,\n      today: PropTypes.string.isRequired,\n      week: PropTypes.string.isRequired,\n    }).isRequired,\n    tabIndex: PropTypes.number,\n\n    month: PropTypes.instanceOf(Date).isRequired,\n    months: PropTypes.arrayOf(PropTypes.string),\n\n    modifiersStyles: PropTypes.object,\n\n    showWeekDays: PropTypes.bool,\n    showOutsideDays: PropTypes.bool,\n\n    renderDay: PropTypes.func.isRequired,\n    renderWeek: PropTypes.func.isRequired,\n\n    captionElement: PropTypes.oneOfType([\n      PropTypes.element,\n      PropTypes.func,\n      PropTypes.instanceOf(React.Component),\n    ]).isRequired,\n    weekdayElement: PropTypes.oneOfType([\n      PropTypes.element,\n      PropTypes.func,\n      PropTypes.instanceOf(React.Component),\n    ]),\n\n    fixedWeeks: PropTypes.bool,\n    showWeekNumbers: PropTypes.bool,\n\n    locale: PropTypes.string.isRequired,\n    localeUtils: PropTypes.object.isRequired,\n    weekdaysLong: PropTypes.arrayOf(PropTypes.string),\n    weekdaysShort: PropTypes.arrayOf(PropTypes.string),\n    firstDayOfWeek: PropTypes.number.isRequired,\n\n    onCaptionClick: PropTypes.func,\n    onDayClick: PropTypes.func,\n    onDayFocus: PropTypes.func,\n    onDayKeyDown: PropTypes.func,\n    onDayMouseEnter: PropTypes.func,\n    onDayMouseLeave: PropTypes.func,\n    onDayMouseDown: PropTypes.func,\n    onDayMouseUp: PropTypes.func,\n    onDayTouchEnd: PropTypes.func,\n    onDayTouchStart: PropTypes.func,\n    onWeekClick: PropTypes.func,\n  };\n\n  renderDay = day => {\n    const monthNumber = this.props.month.getMonth();\n    const propModifiers = Helpers.getModifiersFromProps(this.props);\n    const dayModifiers = ModifiersUtils.getModifiersForDay(day, propModifiers);\n    if (\n      DateUtils.isSameDay(day, new Date()) &&\n      !Object.prototype.hasOwnProperty.call(\n        propModifiers,\n        this.props.classNames.today\n      )\n    ) {\n      dayModifiers.push(this.props.classNames.today);\n    }\n    if (day.getMonth() !== monthNumber) {\n      dayModifiers.push(this.props.classNames.outside);\n    }\n\n    const isOutside = day.getMonth() !== monthNumber;\n    let tabIndex = -1;\n    // Focus on the first day of the month\n    if (this.props.onDayClick && !isOutside && day.getDate() === 1) {\n      tabIndex = this.props.tabIndex; // eslint-disable-line prefer-destructuring\n    }\n    const key = `${day.getFullYear()}${day.getMonth()}${day.getDate()}`;\n    const modifiers = {};\n    dayModifiers.forEach(modifier => {\n      modifiers[modifier] = true;\n    });\n\n    return (\n      <Day\n        key={`${isOutside ? 'outside-' : ''}${key}`}\n        classNames={this.props.classNames}\n        day={day}\n        modifiers={modifiers}\n        modifiersStyles={this.props.modifiersStyles}\n        empty={\n          isOutside && !this.props.showOutsideDays && !this.props.fixedWeeks\n        }\n        tabIndex={tabIndex}\n        ariaLabel={this.props.localeUtils.formatDay(day, this.props.locale)}\n        ariaDisabled={isOutside || dayModifiers.indexOf('disabled') > -1}\n        ariaSelected={dayModifiers.indexOf('selected') > -1}\n        onClick={this.props.onDayClick}\n        onFocus={this.props.onDayFocus}\n        onKeyDown={this.props.onDayKeyDown}\n        onMouseEnter={this.props.onDayMouseEnter}\n        onMouseLeave={this.props.onDayMouseLeave}\n        onMouseDown={this.props.onDayMouseDown}\n        onMouseUp={this.props.onDayMouseUp}\n        onTouchEnd={this.props.onDayTouchEnd}\n        onTouchStart={this.props.onDayTouchStart}\n      >\n        {this.props.renderDay(day, modifiers)}\n      </Day>\n    );\n  };\n\n  render() {\n    const {\n      classNames,\n\n      month,\n      months,\n\n      fixedWeeks,\n      captionElement,\n      weekdayElement,\n\n      locale,\n      localeUtils,\n      weekdaysLong,\n      weekdaysShort,\n      firstDayOfWeek,\n\n      onCaptionClick,\n\n      showWeekNumbers,\n      showWeekDays,\n      onWeekClick,\n    } = this.props;\n\n    const captionProps = {\n      date: month,\n      classNames,\n      months,\n      localeUtils,\n      locale,\n      onClick: onCaptionClick ? e => onCaptionClick(month, e) : undefined,\n    };\n    const caption = React.isValidElement(captionElement)\n      ? React.cloneElement(captionElement, captionProps)\n      : React.createElement(captionElement, captionProps);\n\n    const weeks = Helpers.getWeekArray(month, firstDayOfWeek, fixedWeeks);\n    return (\n      <div className={classNames.month} role=\"grid\">\n        {caption}\n        {showWeekDays && (\n          <Weekdays\n            classNames={classNames}\n            weekdaysShort={weekdaysShort}\n            weekdaysLong={weekdaysLong}\n            firstDayOfWeek={firstDayOfWeek}\n            showWeekNumbers={showWeekNumbers}\n            locale={locale}\n            localeUtils={localeUtils}\n            weekdayElement={weekdayElement}\n          />\n        )}\n        <div className={classNames.body} role=\"rowgroup\">\n          {weeks.map(week => {\n            let weekNumber;\n            if (showWeekNumbers) {\n              weekNumber = DateUtils.getWeekNumber(week[6]);\n            }\n            return (\n              <div\n                key={week[0].getTime()}\n                className={classNames.week}\n                role=\"row\"\n              >\n                {showWeekNumbers && (\n                  <div\n                    className={classNames.weekNumber}\n                    tabIndex={onWeekClick ? 0 : -1}\n                    role=\"gridcell\"\n                    onClick={\n                      onWeekClick\n                        ? e => onWeekClick(weekNumber, week, e)\n                        : undefined\n                    }\n                    onKeyUp={\n                      onWeekClick\n                        ? e =>\n                            e.keyCode === ENTER &&\n                            onWeekClick(weekNumber, week, e)\n                        : undefined\n                    }\n                  >\n                    {this.props.renderWeek(weekNumber, week, month)}\n                  </div>\n                )}\n                {week.map(this.renderDay)}\n              </div>\n            );\n          })}\n        </div>\n      </div>\n    );\n  }\n}\n", "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class Weekday extends Component {\n  static propTypes = {\n    weekday: PropTypes.number,\n    className: PropTypes.string,\n    locale: PropTypes.string,\n    localeUtils: PropTypes.object,\n\n    weekdaysLong: PropTypes.arrayOf(PropTypes.string),\n    weekdaysShort: PropTypes.arrayOf(PropTypes.string),\n  };\n\n  shouldComponentUpdate(nextProps) {\n    return this.props !== nextProps;\n  }\n\n  render() {\n    const {\n      weekday,\n      className,\n      weekdaysLong,\n      weekdaysShort,\n      localeUtils,\n      locale,\n    } = this.props;\n    let title;\n    if (weekdaysLong) {\n      title = weekdaysLong[weekday];\n    } else {\n      title = localeUtils.formatWeekdayLong(weekday, locale);\n    }\n    let content;\n    if (weekdaysShort) {\n      content = weekdaysShort[weekday];\n    } else {\n      content = localeUtils.formatWeekdayShort(weekday, locale);\n    }\n\n    return (\n      <div className={className} role=\"columnheader\">\n        <abbr title={title}>{content}</abbr>\n      </div>\n    );\n  }\n}\n", "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Caption from './Caption';\nimport Navbar from './Navbar';\nimport Month from './Month';\nimport Weekday from './Weekday';\n\nimport * as Helpers from './Helpers';\nimport * as DateUtils from './DateUtils';\nimport * as LocaleUtils from './LocaleUtils';\nimport * as ModifiersUtils from './ModifiersUtils';\nimport classNames from './classNames';\n\nimport { ENTER, SPACE, LEFT, UP, DOWN, RIGHT } from './keys';\n\nexport class DayPicker extends Component {\n  static VERSION = '7.3.0';\n\n  static propTypes = {\n    // Rendering months\n    initialMonth: PropTypes.instanceOf(Date),\n    month: PropTypes.instanceOf(Date),\n    numberOfMonths: PropTypes.number,\n    fromMonth: PropTypes.instanceOf(Date),\n    toMonth: PropTypes.instanceOf(Date),\n    canChangeMonth: PropTypes.bool,\n    reverseMonths: PropTypes.bool,\n    pagedNavigation: PropTypes.bool,\n    todayButton: PropTypes.string,\n    showWeekNumbers: PropTypes.bool,\n    showWeekDays: PropTypes.bool,\n\n    // Modifiers\n    selectedDays: PropTypes.oneOfType([\n      PropTypes.object,\n      PropTypes.func,\n      PropTypes.array,\n    ]),\n    disabledDays: PropTypes.oneOfType([\n      PropTypes.object,\n      PropTypes.func,\n      PropTypes.array,\n    ]),\n\n    modifiers: PropTypes.object,\n    modifiersStyles: PropTypes.object,\n\n    // Localization\n    dir: PropTypes.string,\n    firstDayOfWeek: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),\n    labels: PropTypes.shape({\n      nextMonth: PropTypes.string.isRequired,\n      previousMonth: PropTypes.string.isRequired,\n    }),\n    locale: PropTypes.string,\n    localeUtils: PropTypes.shape({\n      formatMonthTitle: PropTypes.func,\n      formatWeekdayShort: PropTypes.func,\n      formatWeekdayLong: PropTypes.func,\n      getFirstDayOfWeek: PropTypes.func,\n    }),\n    months: PropTypes.arrayOf(PropTypes.string),\n    weekdaysLong: PropTypes.arrayOf(PropTypes.string),\n    weekdaysShort: PropTypes.arrayOf(PropTypes.string),\n\n    // Customization\n    showOutsideDays: PropTypes.bool,\n    enableOutsideDaysClick: PropTypes.bool,\n    fixedWeeks: PropTypes.bool,\n\n    // CSS and HTML\n    classNames: PropTypes.shape({\n      body: PropTypes.string,\n      container: PropTypes.string,\n      day: PropTypes.string.isRequired,\n      disabled: PropTypes.string.isRequired,\n      footer: PropTypes.string,\n      interactionDisabled: PropTypes.string,\n      months: PropTypes.string,\n      month: PropTypes.string,\n      navBar: PropTypes.string,\n      outside: PropTypes.string.isRequired,\n      selected: PropTypes.string.isRequired,\n      today: PropTypes.string.isRequired,\n      todayButton: PropTypes.string,\n      week: PropTypes.string,\n      wrapper: PropTypes.string,\n    }),\n    className: PropTypes.string,\n    containerProps: PropTypes.object,\n    tabIndex: PropTypes.number,\n\n    // Custom elements\n    renderDay: PropTypes.func,\n    renderWeek: PropTypes.func,\n    weekdayElement: PropTypes.oneOfType([\n      PropTypes.element,\n      PropTypes.func,\n      PropTypes.instanceOf(Component),\n    ]),\n    navbarElement: PropTypes.oneOfType([\n      PropTypes.element,\n      PropTypes.func,\n      PropTypes.instanceOf(Component),\n    ]),\n    captionElement: PropTypes.oneOfType([\n      PropTypes.element,\n      PropTypes.func,\n      PropTypes.instanceOf(Component),\n    ]),\n\n    // Events\n    onBlur: PropTypes.func,\n    onFocus: PropTypes.func,\n    onKeyDown: PropTypes.func,\n    onDayClick: PropTypes.func,\n    onDayKeyDown: PropTypes.func,\n    onDayMouseEnter: PropTypes.func,\n    onDayMouseLeave: PropTypes.func,\n    onDayMouseDown: PropTypes.func,\n    onDayMouseUp: PropTypes.func,\n    onDayTouchStart: PropTypes.func,\n    onDayTouchEnd: PropTypes.func,\n    onDayFocus: PropTypes.func,\n    onMonthChange: PropTypes.func,\n    onCaptionClick: PropTypes.func,\n    onWeekClick: PropTypes.func,\n    onTodayButtonClick: PropTypes.func,\n  };\n\n  static defaultProps = {\n    classNames,\n    tabIndex: 0,\n    initialMonth: new Date(),\n    numberOfMonths: 1,\n    labels: {\n      previousMonth: 'Previous Month',\n      nextMonth: 'Next Month',\n    },\n    locale: 'en',\n    localeUtils: LocaleUtils,\n    showOutsideDays: false,\n    enableOutsideDaysClick: true,\n    fixedWeeks: false,\n    canChangeMonth: true,\n    reverseMonths: false,\n    pagedNavigation: false,\n    showWeekNumbers: false,\n    showWeekDays: true,\n    renderDay: day => day.getDate(),\n    renderWeek: weekNumber => weekNumber,\n    weekdayElement: <Weekday />,\n    navbarElement: <Navbar classNames={classNames} />,\n    captionElement: <Caption classNames={classNames} />,\n  };\n\n  dayPicker = null;\n\n  constructor(props) {\n    super(props);\n\n    const currentMonth = this.getCurrentMonthFromProps(props);\n    this.state = { currentMonth };\n  }\n\n  componentDidUpdate(prevProps) {\n    // Changing the `month` props means changing the current displayed month\n    if (\n      prevProps.month !== this.props.month &&\n      !DateUtils.isSameMonth(prevProps.month, this.props.month)\n    ) {\n      const currentMonth = this.getCurrentMonthFromProps(this.props);\n      // eslint-disable-next-line react/no-did-update-set-state\n      this.setState({ currentMonth });\n    }\n  }\n\n  /**\n   * Return the month to be shown in the calendar based on the component props.\n   *\n   * @param {Object} props\n   * @returns Date\n   * @memberof DayPicker\n   * @private\n   */\n  getCurrentMonthFromProps(props) {\n    const initialMonth = Helpers.startOfMonth(\n      props.month || props.initialMonth\n    );\n    let currentMonth = initialMonth;\n\n    if (props.pagedNavigation && props.numberOfMonths > 1 && props.fromMonth) {\n      const fromMonth = Helpers.startOfMonth(props.fromMonth);\n      const diffInMonths = Helpers.getMonthsDiff(fromMonth, currentMonth);\n      currentMonth = DateUtils.addMonths(\n        fromMonth,\n        Math.floor(diffInMonths / props.numberOfMonths) * props.numberOfMonths\n      );\n    } else if (\n      props.toMonth &&\n      props.numberOfMonths > 1 &&\n      Helpers.getMonthsDiff(currentMonth, props.toMonth) <= 0\n    ) {\n      currentMonth = DateUtils.addMonths(\n        Helpers.startOfMonth(props.toMonth),\n        1 - this.props.numberOfMonths\n      );\n    }\n    return currentMonth;\n  }\n\n  getNextNavigableMonth() {\n    return DateUtils.addMonths(\n      this.state.currentMonth,\n      this.props.numberOfMonths\n    );\n  }\n\n  getPreviousNavigableMonth() {\n    return DateUtils.addMonths(this.state.currentMonth, -1);\n  }\n\n  allowPreviousMonth() {\n    const previousMonth = DateUtils.addMonths(this.state.currentMonth, -1);\n    return this.allowMonth(previousMonth);\n  }\n\n  allowNextMonth() {\n    const nextMonth = DateUtils.addMonths(\n      this.state.currentMonth,\n      this.props.numberOfMonths\n    );\n    return this.allowMonth(nextMonth);\n  }\n\n  allowMonth(d) {\n    const { fromMonth, toMonth, canChangeMonth } = this.props;\n    if (\n      !canChangeMonth ||\n      (fromMonth && Helpers.getMonthsDiff(fromMonth, d) < 0) ||\n      (toMonth && Helpers.getMonthsDiff(toMonth, d) > 0)\n    ) {\n      return false;\n    }\n    return true;\n  }\n\n  allowYearChange() {\n    return this.props.canChangeMonth;\n  }\n\n  showMonth(d, callback) {\n    if (!this.allowMonth(d)) {\n      return;\n    }\n    this.setState({ currentMonth: Helpers.startOfMonth(d) }, () => {\n      if (callback) {\n        callback();\n      }\n      if (this.props.onMonthChange) {\n        this.props.onMonthChange(this.state.currentMonth);\n      }\n    });\n  }\n\n  showNextMonth = callback => {\n    if (!this.allowNextMonth()) {\n      return;\n    }\n    const deltaMonths = this.props.pagedNavigation\n      ? this.props.numberOfMonths\n      : 1;\n    const nextMonth = DateUtils.addMonths(this.state.currentMonth, deltaMonths);\n    this.showMonth(nextMonth, callback);\n  };\n\n  showPreviousMonth = callback => {\n    if (!this.allowPreviousMonth()) {\n      return;\n    }\n    const deltaMonths = this.props.pagedNavigation\n      ? this.props.numberOfMonths\n      : 1;\n    const previousMonth = DateUtils.addMonths(\n      this.state.currentMonth,\n      -deltaMonths\n    );\n    this.showMonth(previousMonth, callback);\n  };\n\n  showNextYear() {\n    if (!this.allowYearChange()) {\n      return;\n    }\n    const nextMonth = DateUtils.addMonths(this.state.currentMonth, 12);\n    this.showMonth(nextMonth);\n  }\n\n  showPreviousYear() {\n    if (!this.allowYearChange()) {\n      return;\n    }\n    const nextMonth = DateUtils.addMonths(this.state.currentMonth, -12);\n    this.showMonth(nextMonth);\n  }\n\n  focusFirstDayOfMonth() {\n    Helpers.getDayNodes(this.dayPicker, this.props.classNames)[0].focus();\n  }\n\n  focusLastDayOfMonth() {\n    const dayNodes = Helpers.getDayNodes(this.dayPicker, this.props.classNames);\n    dayNodes[dayNodes.length - 1].focus();\n  }\n\n  focusPreviousDay(dayNode) {\n    const dayNodes = Helpers.getDayNodes(this.dayPicker, this.props.classNames);\n    const dayNodeIndex = Helpers.nodeListToArray(dayNodes).indexOf(dayNode);\n    if (dayNodeIndex === -1) return;\n    if (dayNodeIndex === 0) {\n      this.showPreviousMonth(() => this.focusLastDayOfMonth());\n    } else {\n      dayNodes[dayNodeIndex - 1].focus();\n    }\n  }\n\n  focusNextDay(dayNode) {\n    const dayNodes = Helpers.getDayNodes(this.dayPicker, this.props.classNames);\n    const dayNodeIndex = Helpers.nodeListToArray(dayNodes).indexOf(dayNode);\n    if (dayNodeIndex === -1) return;\n    if (dayNodeIndex === dayNodes.length - 1) {\n      this.showNextMonth(() => this.focusFirstDayOfMonth());\n    } else {\n      dayNodes[dayNodeIndex + 1].focus();\n    }\n  }\n\n  focusNextWeek(dayNode) {\n    const dayNodes = Helpers.getDayNodes(this.dayPicker, this.props.classNames);\n    const dayNodeIndex = Helpers.nodeListToArray(dayNodes).indexOf(dayNode);\n    const isInLastWeekOfMonth = dayNodeIndex > dayNodes.length - 8;\n\n    if (isInLastWeekOfMonth) {\n      this.showNextMonth(() => {\n        const daysAfterIndex = dayNodes.length - dayNodeIndex;\n        const nextMonthDayNodeIndex = 7 - daysAfterIndex;\n        Helpers.getDayNodes(this.dayPicker, this.props.classNames)[\n          nextMonthDayNodeIndex\n        ].focus();\n      });\n    } else {\n      dayNodes[dayNodeIndex + 7].focus();\n    }\n  }\n\n  focusPreviousWeek(dayNode) {\n    const dayNodes = Helpers.getDayNodes(this.dayPicker, this.props.classNames);\n    const dayNodeIndex = Helpers.nodeListToArray(dayNodes).indexOf(dayNode);\n    const isInFirstWeekOfMonth = dayNodeIndex <= 6;\n\n    if (isInFirstWeekOfMonth) {\n      this.showPreviousMonth(() => {\n        const previousMonthDayNodes = Helpers.getDayNodes(\n          this.dayPicker,\n          this.props.classNames\n        );\n        const startOfLastWeekOfMonth = previousMonthDayNodes.length - 7;\n        const previousMonthDayNodeIndex = startOfLastWeekOfMonth + dayNodeIndex;\n        previousMonthDayNodes[previousMonthDayNodeIndex].focus();\n      });\n    } else {\n      dayNodes[dayNodeIndex - 7].focus();\n    }\n  }\n\n  // Event handlers\n\n  handleKeyDown = e => {\n    e.persist();\n\n    switch (e.keyCode) {\n      case LEFT:\n        if (this.props.dir === 'rtl') {\n          this.showNextMonth();\n        } else {\n          this.showPreviousMonth();\n        }\n        Helpers.cancelEvent(e);\n        break;\n      case RIGHT:\n        if (this.props.dir === 'rtl') {\n          this.showPreviousMonth();\n        } else {\n          this.showNextMonth();\n        }\n        Helpers.cancelEvent(e);\n        break;\n      case UP:\n        this.showPreviousYear();\n        Helpers.cancelEvent(e);\n        break;\n      case DOWN:\n        this.showNextYear();\n        Helpers.cancelEvent(e);\n        break;\n      default:\n        break;\n    }\n\n    if (this.props.onKeyDown) {\n      this.props.onKeyDown(e);\n    }\n  };\n\n  handleDayKeyDown = (day, modifiers, e) => {\n    e.persist();\n\n    switch (e.keyCode) {\n      case LEFT:\n        Helpers.cancelEvent(e);\n        if (this.props.dir === 'rtl') {\n          this.focusNextDay(e.target);\n        } else {\n          this.focusPreviousDay(e.target);\n        }\n        break;\n      case RIGHT:\n        Helpers.cancelEvent(e);\n        if (this.props.dir === 'rtl') {\n          this.focusPreviousDay(e.target);\n        } else {\n          this.focusNextDay(e.target);\n        }\n        break;\n      case UP:\n        Helpers.cancelEvent(e);\n        this.focusPreviousWeek(e.target);\n        break;\n      case DOWN:\n        Helpers.cancelEvent(e);\n        this.focusNextWeek(e.target);\n        break;\n      case ENTER:\n      case SPACE:\n        Helpers.cancelEvent(e);\n        if (this.props.onDayClick) {\n          this.handleDayClick(day, modifiers, e);\n        }\n        break;\n      default:\n        break;\n    }\n    if (this.props.onDayKeyDown) {\n      this.props.onDayKeyDown(day, modifiers, e);\n    }\n  };\n\n  handleDayClick = (day, modifiers, e) => {\n    e.persist();\n\n    if (\n      modifiers[this.props.classNames.outside] &&\n      this.props.enableOutsideDaysClick\n    ) {\n      this.handleOutsideDayClick(day);\n    }\n    if (this.props.onDayClick) {\n      this.props.onDayClick(day, modifiers, e);\n    }\n  };\n\n  handleOutsideDayClick(day) {\n    const { currentMonth } = this.state;\n    const { numberOfMonths } = this.props;\n    const diffInMonths = Helpers.getMonthsDiff(currentMonth, day);\n    if (diffInMonths > 0 && diffInMonths >= numberOfMonths) {\n      this.showNextMonth();\n    } else if (diffInMonths < 0) {\n      this.showPreviousMonth();\n    }\n  }\n\n  handleTodayButtonClick = e => {\n    const today = new Date();\n    const month = new Date(today.getFullYear(), today.getMonth());\n    this.showMonth(month);\n    e.target.blur();\n    if (this.props.onTodayButtonClick) {\n      e.persist();\n      this.props.onTodayButtonClick(\n        new Date(today.getFullYear(), today.getMonth(), today.getDate()),\n        ModifiersUtils.getModifiersForDay(today, this.props.modifiers),\n        e\n      );\n    }\n  };\n\n  renderNavbar() {\n    const {\n      labels,\n      locale,\n      localeUtils,\n      canChangeMonth,\n      navbarElement,\n      ...attributes\n    } = this.props;\n\n    if (!canChangeMonth) return null;\n\n    const props = {\n      month: this.state.currentMonth,\n      classNames: this.props.classNames,\n      className: this.props.classNames.navBar,\n      nextMonth: this.getNextNavigableMonth(),\n      previousMonth: this.getPreviousNavigableMonth(),\n      showPreviousButton: this.allowPreviousMonth(),\n      showNextButton: this.allowNextMonth(),\n      onNextClick: this.showNextMonth,\n      onPreviousClick: this.showPreviousMonth,\n      dir: attributes.dir,\n      labels,\n      locale,\n      localeUtils,\n    };\n    return React.isValidElement(navbarElement)\n      ? React.cloneElement(navbarElement, props)\n      : React.createElement(navbarElement, props);\n  }\n\n  renderMonths() {\n    const months = [];\n    const firstDayOfWeek = Helpers.getFirstDayOfWeekFromProps(this.props);\n    for (let i = 0; i < this.props.numberOfMonths; i += 1) {\n      const month = DateUtils.addMonths(this.state.currentMonth, i);\n      months.push(\n        <Month\n          key={i}\n          {...this.props}\n          month={month}\n          firstDayOfWeek={firstDayOfWeek}\n          onDayKeyDown={this.handleDayKeyDown}\n          onDayClick={this.handleDayClick}\n        />\n      );\n    }\n\n    if (this.props.reverseMonths) {\n      months.reverse();\n    }\n    return months;\n  }\n\n  renderFooter() {\n    if (this.props.todayButton) {\n      return (\n        <div className={this.props.classNames.footer}>\n          {this.renderTodayButton()}\n        </div>\n      );\n    }\n    return null;\n  }\n\n  renderTodayButton() {\n    return (\n      <button\n        type=\"button\"\n        tabIndex={0}\n        className={this.props.classNames.todayButton}\n        aria-label={this.props.todayButton}\n        onClick={this.handleTodayButtonClick}\n      >\n        {this.props.todayButton}\n      </button>\n    );\n  }\n\n  render() {\n    let className = this.props.classNames.container;\n\n    if (!this.props.onDayClick) {\n      className = `${className} ${this.props.classNames.interactionDisabled}`;\n    }\n    if (this.props.className) {\n      className = `${className} ${this.props.className}`;\n    }\n    return (\n      <div\n        {...this.props.containerProps}\n        className={className}\n        ref={el => (this.dayPicker = el)}\n        lang={this.props.locale}\n      >\n        <div\n          className={this.props.classNames.wrapper}\n          tabIndex={\n            this.props.canChangeMonth &&\n            typeof this.props.tabIndex !== 'undefined'\n              ? this.props.tabIndex\n              : -1\n          }\n          onKeyDown={this.handleKeyDown}\n          onFocus={this.props.onFocus}\n          onBlur={this.props.onBlur}\n        >\n          {this.renderNavbar()}\n          <div className={this.props.classNames.months}>\n            {this.renderMonths()}\n          </div>\n          {this.renderFooter()}\n        </div>\n      </div>\n    );\n  }\n}\n\nDayPicker.DateUtils = DateUtils;\nDayPicker.LocaleUtils = LocaleUtils;\nDayPicker.ModifiersUtils = ModifiersUtils;\n\nexport { DateUtils, LocaleUtils, ModifiersUtils };\n\nexport default DayPicker;\n", "import PropTypes from 'prop-types';\n\nconst PrimitiveTypes = {\n  localeUtils: PropTypes.shape({\n    formatMonthTitle: PropTypes.func,\n    formatWeekdayShort: PropTypes.func,\n    formatWeekdayLong: PropTypes.func,\n    getFirstDayOfWeek: PropTypes.func,\n  }),\n  range: PropTypes.shape({\n    from: PropTypes.instanceOf(Date),\n    to: PropTypes.instanceOf(Date),\n  }),\n  after: PropTypes.shape({\n    after: PropTypes.instanceOf(Date),\n  }),\n  before: PropTypes.shape({\n    before: PropTypes.instanceOf(Date),\n  }),\n};\n\nexport const ModifierPropType = PropTypes.oneOfType([\n  PrimitiveTypes.after,\n  PrimitiveTypes.before,\n  PrimitiveTypes.range,\n  PropTypes.func,\n  PropTypes.array,\n]);\n\nexport default PrimitiveTypes;\n", "/*\n  Used as main file in package.json\n*/\n\n/* eslint-disable no-var */\n/* eslint-env node */\n\nvar DayPicker = require('./lib/src/DayPicker');\nvar DateUtils = require('./lib/src/DateUtils');\nvar LocaleUtils = require('./lib/src/LocaleUtils');\nvar ModifiersUtils = require('./lib/src/ModifiersUtils');\nvar Weekday = require('./lib/src/Weekday');\nvar Navbar = require('./lib/src/Navbar');\nvar PropTypes = require('./lib/src/PropTypes');\n\nmodule.exports = DayPicker;\nmodule.exports.DateUtils = DateUtils;\nmodule.exports.LocaleUtils = LocaleUtils;\nmodule.exports.ModifiersUtils = ModifiersUtils;\nmodule.exports.WeekdayPropTypes = Weekday.propTypes;\nmodule.exports.NavbarPropTypes = Navbar.propTypes;\nmodule.exports.PropTypes = PropTypes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { addMonths, setMonth, setYear, subMonths } from 'date-fns';\nimport { range } from 'lodash';\nimport * as React from 'react';\nimport { DayModifiers, Modifier, Modifiers } from 'react-day-picker';\nimport { injectIntl, WrappedComponentProps } from 'react-intl';\nimport { ButtonIcon, ClearButton } from '../../components/controls/buttons';\nimport OutsideClickHandler from '../../components/controls/OutsideClickHandler';\nimport Select from '../../components/controls/Select';\nimport CalendarIcon from '../../components/icons/CalendarIcon';\nimport ChevronLeftIcon from '../../components/icons/ChevronLeftIcon';\nimport ChevronRightIcon from '../../components/icons/ChevronRightIcon';\nimport { getShortMonthName, getShortWeekDayName, getWeekDayName } from '../../helpers/l10n';\nimport { lazyLoadComponent } from '../lazyLoadComponent';\nimport './DayPicker.css';\nimport './styles.css';\n\nconst DayPicker = lazyLoadComponent(() => import('react-day-picker'), 'DayPicker');\n\ninterface Props {\n  className?: string;\n  currentMonth?: Date;\n  highlightFrom?: Date;\n  highlightTo?: Date;\n  inputClassName?: string;\n  maxDate?: Date;\n  minDate?: Date;\n  name?: string;\n  onChange: (date: Date | undefined) => void;\n  placeholder: string;\n  value?: Date;\n}\n\ninterface State {\n  currentMonth: Date;\n  open: boolean;\n  lastHovered?: Date;\n}\n\ntype Week = [string, string, string, string, string, string, string];\n\nexport default class DateInput extends React.PureComponent<Props, State> {\n  input?: HTMLInputElement | null;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = { currentMonth: props.value || props.currentMonth || new Date(), open: false };\n  }\n\n  focus = () => {\n    if (this.input) {\n      this.input.focus();\n    }\n    this.openCalendar();\n  };\n\n  handleResetClick = () => {\n    this.closeCalendar();\n    this.props.onChange(undefined);\n  };\n\n  openCalendar = () => {\n    this.setState({\n      currentMonth: this.props.value || this.props.currentMonth || new Date(),\n      lastHovered: undefined,\n      open: true\n    });\n  };\n\n  closeCalendar = () => {\n    this.setState({ open: false });\n  };\n\n  handleDayClick = (day: Date, modifiers: DayModifiers) => {\n    if (!modifiers.disabled) {\n      this.closeCalendar();\n      this.props.onChange(day);\n    }\n  };\n\n  handleDayMouseEnter = (day: Date, modifiers: DayModifiers) => {\n    this.setState({ lastHovered: modifiers.disabled ? undefined : day });\n  };\n\n  handleCurrentMonthChange = ({ value }: { value: number }) => {\n    this.setState((state: State) => ({ currentMonth: setMonth(state.currentMonth, value) }));\n  };\n\n  handleCurrentYearChange = ({ value }: { value: number }) => {\n    this.setState(state => ({ currentMonth: setYear(state.currentMonth, value) }));\n  };\n\n  handlePreviousMonthClick = () => {\n    this.setState(state => ({ currentMonth: subMonths(state.currentMonth, 1) }));\n  };\n\n  handleNextMonthClick = () => {\n    this.setState(state => ({ currentMonth: addMonths(state.currentMonth, 1) }));\n  };\n\n  render() {\n    const { highlightFrom, highlightTo, minDate, value } = this.props;\n    const { lastHovered } = this.state;\n\n    const after = this.props.maxDate || new Date();\n\n    const months = range(12);\n    const years = range(new Date().getFullYear() - 10, new Date().getFullYear() + 1);\n\n    const selectedDays: Modifier[] = value ? [value] : [];\n    let modifiers: Partial<Modifiers> | undefined;\n    const lastHoveredOrValue = lastHovered || value;\n\n    if (highlightFrom && lastHoveredOrValue) {\n      modifiers = { highlighted: { from: highlightFrom, to: lastHoveredOrValue } };\n      selectedDays.push(highlightFrom);\n    }\n    if (highlightTo && lastHoveredOrValue) {\n      modifiers = { highlighted: { from: lastHoveredOrValue, to: highlightTo } };\n      selectedDays.push(highlightTo);\n    }\n\n    const weekdaysLong = range(7).map(getWeekDayName) as Week;\n    const weekdaysShort = range(7).map(getShortWeekDayName) as Week;\n\n    return (\n      <OutsideClickHandler onClickOutside={this.closeCalendar}>\n        <span className={classNames('date-input-control', this.props.className)}>\n          <InputWrapper\n            className={classNames('date-input-control-input', this.props.inputClassName, {\n              'is-filled': this.props.value !== undefined\n            })}\n            innerRef={(node: HTMLInputElement | null) => (this.input = node)}\n            name={this.props.name}\n            onFocus={this.openCalendar}\n            placeholder={this.props.placeholder}\n            readOnly={true}\n            type=\"text\"\n            value={value}\n          />\n          <CalendarIcon className=\"date-input-control-icon\" fill=\"\" />\n          {this.props.value !== undefined && (\n            <ClearButton\n              className=\"button-tiny date-input-control-reset\"\n              iconProps={{ size: 12 }}\n              onClick={this.handleResetClick}\n            />\n          )}\n          {this.state.open && (\n            <div className=\"date-input-calendar\">\n              <nav className=\"date-input-calendar-nav\">\n                <ButtonIcon className=\"button-small\" onClick={this.handlePreviousMonthClick}>\n                  <ChevronLeftIcon />\n                </ButtonIcon>\n                <div className=\"date-input-calender-month\">\n                  <Select\n                    className=\"date-input-calender-month-select\"\n                    onChange={this.handleCurrentMonthChange}\n                    options={months.map(month => ({\n                      label: getShortMonthName(month),\n                      value: month\n                    }))}\n                    value={this.state.currentMonth.getMonth()}\n                  />\n                  <Select\n                    className=\"date-input-calender-month-select spacer-left\"\n                    onChange={this.handleCurrentYearChange}\n                    options={years.map(year => ({ label: String(year), value: year }))}\n                    value={this.state.currentMonth.getFullYear()}\n                  />\n                </div>\n                <ButtonIcon className=\"button-small\" onClick={this.handleNextMonthClick}>\n                  <ChevronRightIcon />\n                </ButtonIcon>\n              </nav>\n              <DayPicker\n                captionElement={<NullComponent />}\n                disabledDays={{ after, before: minDate }}\n                firstDayOfWeek={1}\n                modifiers={modifiers}\n                month={this.state.currentMonth}\n                navbarElement={<NullComponent />}\n                onDayClick={this.handleDayClick}\n                onDayMouseEnter={this.handleDayMouseEnter}\n                selectedDays={selectedDays}\n                weekdaysLong={weekdaysLong}\n                weekdaysShort={weekdaysShort}\n              />\n            </div>\n          )}\n        </span>\n      </OutsideClickHandler>\n    );\n  }\n}\n\nfunction NullComponent() {\n  return null;\n}\n\ntype InputWrapperProps = T.Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value'> &\n  WrappedComponentProps & {\n    innerRef: React.Ref<HTMLInputElement>;\n    value: Date | undefined;\n  };\n\nconst InputWrapper = injectIntl(({ innerRef, intl, value, ...other }: InputWrapperProps) => {\n  const formattedValue =\n    value && intl.formatDate(value, { year: 'numeric', month: 'short', day: 'numeric' });\n  return <input {...other} ref={innerRef} value={formattedValue || ''} />;\n});\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { max, min } from 'date-fns';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport DateInput from './DateInput';\n\ntype DateRange = { from?: Date; to?: Date };\n\ninterface Props {\n  className?: string;\n  maxDate?: Date;\n  minDate?: Date;\n  onChange: (date: DateRange) => void;\n  value?: DateRange;\n}\n\nexport default class DateRangeInput extends React.PureComponent<Props> {\n  toDateInput?: DateInput | null;\n\n  get from() {\n    return this.props.value && this.props.value.from;\n  }\n\n  get to() {\n    return this.props.value && this.props.value.to;\n  }\n\n  handleFromChange = (from: Date | undefined) => {\n    this.props.onChange({ from, to: this.to });\n\n    // use `setTimeout` to work around the immediate closing of the `toDateInput`\n    setTimeout(() => {\n      if (from && !this.to && this.toDateInput) {\n        this.toDateInput.focus();\n      }\n    }, 0);\n  };\n\n  handleToChange = (to: Date | undefined) => {\n    this.props.onChange({ from: this.from, to });\n  };\n\n  render() {\n    const { minDate, maxDate } = this.props;\n\n    return (\n      <div className={classNames('display-inline-flex-center', this.props.className)}>\n        <DateInput\n          currentMonth={this.to}\n          data-test=\"from\"\n          highlightTo={this.to}\n          minDate={minDate}\n          maxDate={maxDate && this.to ? min(maxDate, this.to) : maxDate || this.to}\n          onChange={this.handleFromChange}\n          placeholder={translate('start_date')}\n          value={this.from}\n        />\n        <span className=\"note little-spacer-left little-spacer-right\">{translate('to_')}</span>\n        <DateInput\n          currentMonth={this.from}\n          data-test=\"to\"\n          highlightFrom={this.from}\n          minDate={minDate && this.from ? max(minDate, this.from) : minDate || this.from}\n          maxDate={maxDate}\n          onChange={this.handleToChange}\n          placeholder={translate('end_date')}\n          ref={element => (this.toDateInput = element)}\n          value={this.to}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport './Radio.css';\n\ninterface Props {\n  checked: boolean;\n  className?: string;\n  disabled?: boolean;\n  onCheck: (value: string) => void;\n  value: string;\n}\n\nexport default class Radio extends React.PureComponent<Props> {\n  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n\n    if (!this.props.disabled) {\n      this.props.onCheck(this.props.value);\n    }\n  };\n\n  render() {\n    const { className, checked, children, disabled } = this.props;\n\n    return (\n      <a\n        aria-checked={checked}\n        className={classNames('display-inline-flex-center link-radio', className, { disabled })}\n        href=\"#\"\n        onClick={this.handleClick}\n        role=\"radio\">\n        <i className={classNames('icon-radio', 'spacer-right', { 'is-checked': checked })} />\n        {children}\n      </a>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { endOfDay, startOfDay, subDays } from 'date-fns';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport '../style.css';\nimport { now, RangeOption } from '../utils';\n\nexport interface DownloadButtonProps {\n  dateRange?: { from?: Date; to?: Date };\n  downloadStarted: boolean;\n  onStartDownload: () => void;\n  selection: RangeOption;\n}\n\nconst RANGE_OPTION_START = {\n  [RangeOption.Today]: () => now(),\n  [RangeOption.Week]: () => subDays(now(), 7),\n  [RangeOption.Month]: () => subDays(now(), 30),\n  [RangeOption.Trimester]: () => subDays(now(), 90)\n};\n\nconst toISODateString = (date: Date) => date.toISOString();\n\nfunction getRangeParams(selection: RangeOption, dateRange?: { from?: Date; to?: Date }) {\n  if (selection === RangeOption.Custom) {\n    // dateRange should be complete if 'custom' is selected\n    if (!(dateRange?.to && dateRange?.from)) {\n      return '';\n    }\n\n    return new URLSearchParams({\n      from: toISODateString(startOfDay(dateRange.from)),\n      to: toISODateString(endOfDay(dateRange.to))\n    }).toString();\n  }\n\n  return new URLSearchParams({\n    from: toISODateString(startOfDay(RANGE_OPTION_START[selection]())),\n    to: toISODateString(now())\n  }).toString();\n}\n\nexport default function DownloadButton(props: DownloadButtonProps) {\n  const { dateRange, downloadStarted, selection } = props;\n\n  const downloadDisabled =\n    downloadStarted ||\n    (selection === RangeOption.Custom &&\n      (dateRange?.from === undefined || dateRange?.to === undefined));\n\n  const downloadUrl = downloadDisabled\n    ? '#'\n    : `${getBaseUrl()}/api/audit_logs/download?${getRangeParams(selection, dateRange)}`;\n\n  return (\n    <>\n      <a\n        className={classNames('button button-primary', { disabled: downloadDisabled })}\n        download=\"audit_logs.json\"\n        onClick={downloadDisabled ? undefined : props.onStartDownload}\n        href={downloadUrl}\n        rel=\"noopener noreferrer\"\n        target=\"_blank\">\n        {translate('download_verb')}\n      </a>\n\n      {downloadStarted && (\n        <div className=\"spacer-top\">\n          <p>{translate('audit_logs.download_start.sentence.1')}</p>\n          <p>{translate('audit_logs.download_start.sentence.2')}</p>\n          <br />\n          <p>{translate('audit_logs.download_start.sentence.3')}</p>\n        </div>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { subDays } from 'date-fns';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport DateRangeInput from '../../../components/controls/DateRangeInput';\nimport Radio from '../../../components/controls/Radio';\nimport { translate } from '../../../helpers/l10n';\nimport '../style.css';\nimport { HousekeepingPolicy, now, RangeOption } from '../utils';\nimport DownloadButton from './DownloadButton';\n\nexport interface AuditAppRendererProps {\n  dateRange?: { from?: Date; to?: Date };\n  downloadStarted: boolean;\n  handleOptionSelection: (option: RangeOption) => void;\n  handleDateSelection: (dateRange: { from?: Date; to?: Date }) => void;\n  handleStartDownload: () => void;\n  housekeepingPolicy: HousekeepingPolicy;\n  selection: RangeOption;\n}\n\nconst HOUSEKEEPING_MONTH_THRESHOLD = 30;\nconst HOUSEKEEPING_TRIMESTER_THRESHOLD = 90;\n\nconst HOUSEKEEPING_POLICY_VALUES = {\n  [HousekeepingPolicy.Weekly]: 7,\n  [HousekeepingPolicy.Monthly]: 30,\n  [HousekeepingPolicy.Trimestrial]: 90,\n  [HousekeepingPolicy.Yearly]: 365\n};\n\nconst getRangeOptions = (housekeepingPolicy: HousekeepingPolicy) => {\n  const rangeOptions = [RangeOption.Today, RangeOption.Week];\n\n  if (HOUSEKEEPING_POLICY_VALUES[housekeepingPolicy] >= HOUSEKEEPING_MONTH_THRESHOLD) {\n    rangeOptions.push(RangeOption.Month);\n  }\n\n  if (HOUSEKEEPING_POLICY_VALUES[housekeepingPolicy] >= HOUSEKEEPING_TRIMESTER_THRESHOLD) {\n    rangeOptions.push(RangeOption.Trimester);\n  }\n\n  rangeOptions.push(RangeOption.Custom);\n\n  return rangeOptions;\n};\n\nexport default function AuditAppRenderer(props: AuditAppRendererProps) {\n  const { dateRange, downloadStarted, housekeepingPolicy, selection } = props;\n\n  return (\n    <div className=\"page page-limited\" id=\"marketplace-page\">\n      <Suggestions suggestions=\"audit-logs\" />\n      <Helmet title={translate('audit_logs.page')} />\n\n      <header className=\"page-header\">\n        <h1 className=\"page-title\">{translate('audit_logs.page')}</h1>\n      </header>\n\n      <p className=\"big-spacer-bottom\">\n        {translate('audit_logs.page.description.1')}\n        <br />\n        <FormattedMessage\n          id=\"audit_logs.page.description.2\"\n          defaultMessage={translate('audit_logs.page.description.2')}\n          values={{\n            housekeeping: translate('audit_logs.housekeeping_policy', housekeepingPolicy),\n            link: (\n              <Link\n                to={{\n                  pathname: '/admin/settings',\n                  query: { category: 'housekeeping' },\n                  hash: '#auditLogs'\n                }}>\n                {translate('audit_logs.page.description.link')}\n              </Link>\n            )\n          }}\n        />\n      </p>\n\n      <div className=\"huge-spacer-bottom\">\n        <h2 className=\"big-spacer-bottom\">{translate('audit_logs.download')}</h2>\n\n        <ul>\n          {getRangeOptions(housekeepingPolicy).map(option => (\n            <li key={option} className=\"spacer-bottom\">\n              <Radio\n                checked={selection === option}\n                onCheck={props.handleOptionSelection}\n                value={option}>\n                {translate('audit_logs.range_option', option)}\n              </Radio>\n            </li>\n          ))}\n        </ul>\n\n        <DateRangeInput\n          className=\"big-spacer-left\"\n          onChange={props.handleDateSelection}\n          minDate={subDays(now(), HOUSEKEEPING_POLICY_VALUES[housekeepingPolicy])}\n          maxDate={now()}\n          value={dateRange}\n        />\n      </div>\n\n      <DownloadButton\n        dateRange={dateRange}\n        downloadStarted={downloadStarted}\n        onStartDownload={props.handleStartDownload}\n        selection={selection}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getAppState, getGlobalSettingValue, Store } from '../../../store/rootReducer';\nimport { AdminPageExtension } from '../../../types/extension';\nimport { fetchValues } from '../../settings/store/actions';\nimport '../style.css';\nimport { HousekeepingPolicy, RangeOption } from '../utils';\nimport AuditAppRenderer from './AuditAppRenderer';\n\ninterface Props {\n  auditHousekeepingPolicy: HousekeepingPolicy;\n  fetchValues: typeof fetchValues;\n  hasGovernanceExtension?: boolean;\n}\n\ninterface State {\n  dateRange?: { from?: Date; to?: Date };\n  downloadStarted: boolean;\n  selection: RangeOption;\n}\n\nexport class AuditApp extends React.PureComponent<Props, State> {\n  state: State = {\n    downloadStarted: false,\n    selection: RangeOption.Today\n  };\n\n  componentDidMount() {\n    const { hasGovernanceExtension } = this.props;\n    if (hasGovernanceExtension) {\n      this.props.fetchValues(['sonar.dbcleaner.auditHousekeeping']);\n    }\n  }\n\n  handleDateSelection = (dateRange: { from?: Date; to?: Date }) =>\n    this.setState({ dateRange, downloadStarted: false, selection: RangeOption.Custom });\n\n  handleOptionSelection = (selection: RangeOption) =>\n    this.setState({ dateRange: undefined, downloadStarted: false, selection });\n\n  handleStartDownload = () => {\n    setTimeout(() => {\n      this.setState({ downloadStarted: true });\n    }, 0);\n  };\n\n  render() {\n    const { hasGovernanceExtension, auditHousekeepingPolicy } = this.props;\n\n    return hasGovernanceExtension ? (\n      <AuditAppRenderer\n        handleDateSelection={this.handleDateSelection}\n        handleOptionSelection={this.handleOptionSelection}\n        handleStartDownload={this.handleStartDownload}\n        housekeepingPolicy={auditHousekeepingPolicy || HousekeepingPolicy.Monthly}\n        {...this.state}\n      />\n    ) : null;\n  }\n}\n\nconst mapDispatchToProps = { fetchValues };\n\nconst mapStateToProps = (state: Store) => {\n  const settingValue = getGlobalSettingValue(state, 'sonar.dbcleaner.auditHousekeeping');\n  const { adminPages } = getAppState(state);\n  const hasGovernanceExtension = Boolean(\n    adminPages?.find(e => e.key === AdminPageExtension.GovernanceConsole)\n  );\n  return {\n    auditHousekeepingPolicy: settingValue?.value as HousekeepingPolicy,\n    hasGovernanceExtension\n  };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AuditApp);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/AuditApp')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, RequestData } from '../helpers/request';\nimport { IndexationStatus } from '../types/indexation';\nimport { Task, TaskWarning } from '../types/tasks';\n\nexport function getAnalysisStatus(data: {\n  component: string;\n  branch?: string;\n  pullRequest?: string;\n}): Promise<{\n  component: {\n    branch?: string;\n    key: string;\n    name: string;\n    pullRequest?: string;\n    warnings: TaskWarning[];\n  };\n}> {\n  return getJSON('/api/ce/analysis_status', data).catch(throwGlobalError);\n}\n\nexport function getActivity(data: RequestData): Promise<{ tasks: Task[] }> {\n  return getJSON('/api/ce/activity', data);\n}\n\nexport function getStatus(\n  component?: string\n): Promise<{ failing: number; inProgress: number; pending: number; pendingTime?: number }> {\n  return getJSON('/api/ce/activity_status', { component });\n}\n\nexport function getTask(id: string, additionalFields?: string[]): Promise<Task> {\n  return getJSON('/api/ce/task', { id, additionalFields }).then(r => r.task);\n}\n\nexport function cancelTask(id: string): Promise<any> {\n  return post('/api/ce/cancel', { id }).then(\n    () => getTask(id),\n    () => getTask(id)\n  );\n}\n\nexport function cancelAllTasks(): Promise<any> {\n  return post('/api/ce/cancel_all');\n}\n\nexport function getTasksForComponent(component: string): Promise<{ queue: Task[]; current: Task }> {\n  return getJSON('/api/ce/component', { component }).catch(throwGlobalError);\n}\n\nexport function getTypes(): Promise<string[]> {\n  return getJSON('/api/ce/task_types').then(r => r.taskTypes);\n}\n\nexport function getWorkers(): Promise<{ canSetWorkerCount: boolean; value: number }> {\n  return getJSON('/api/ce/worker_count').catch(throwGlobalError);\n}\n\nexport function setWorkerCount(count: number): Promise<void | Response> {\n  return post('/api/ce/set_worker_count', { count }).catch(throwGlobalError);\n}\n\nexport function getIndexationStatus(): Promise<IndexationStatus> {\n  return getJSON('/api/ce/indexation_status').catch(throwGlobalError);\n}\n\nexport function dismissAnalysisWarning(component: string, warning: string) {\n  return post('/api/ce/dismiss_analysis_warning', { component, warning }).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isEqual, isNil, omitBy } from 'lodash';\nimport { isValidDate, parseDate, toNotSoISOString, toShortNotSoISOString } from './dates';\n\nexport function queriesEqual(a: T.RawQuery, b: T.RawQuery): boolean {\n  const keysA = Object.keys(a);\n  const keysB = Object.keys(b);\n\n  if (keysA.length !== keysB.length) {\n    return false;\n  }\n\n  return keysA.every(key => isEqual(a[key], b[key]));\n}\n\nexport function cleanQuery(query: T.RawQuery): T.RawQuery {\n  return omitBy(query, isNil);\n}\n\nexport function parseAsBoolean(value: string | undefined, defaultValue = true): boolean {\n  if (value === 'false') {\n    return false;\n  }\n  if (value === 'true') {\n    return true;\n  }\n  return defaultValue;\n}\n\nexport function parseAsOptionalBoolean(value: string | undefined): boolean | undefined {\n  if (value === 'true') {\n    return true;\n  } else if (value === 'false') {\n    return false;\n  }\n  return undefined;\n}\n\nexport function parseAsDate(value?: string): Date | undefined {\n  if (value) {\n    const date = parseDate(value);\n    if (isValidDate(date)) {\n      return date;\n    }\n  }\n  return undefined;\n}\n\nexport function parseAsString(value: string | undefined): string {\n  return value || '';\n}\n\nexport function parseAsOptionalString(value: string | undefined): string | undefined {\n  return value || undefined;\n}\n\nexport function parseAsArray<T>(value: string | undefined, itemParser: (x: string) => T): T[] {\n  return value ? value.split(',').map(itemParser) : [];\n}\n\nexport function parseAsOptionalArray<T>(\n  value: string | undefined,\n  itemParser: (x: string) => T\n): T[] | undefined {\n  return value ? parseAsArray(value, itemParser) : undefined;\n}\n\nexport function serializeDate(value?: Date, serializer = toNotSoISOString): string | undefined {\n  if (value != null && value.toISOString) {\n    return serializer(value);\n  }\n  return undefined;\n}\n\nexport function serializeDateShort(value: Date | undefined): string | undefined {\n  return serializeDate(value, toShortNotSoISOString);\n}\n\nexport function serializeString(value: string | undefined): string | undefined {\n  return value || undefined;\n}\n\nexport function serializeStringArray(value: string[] | undefined[]): string | undefined {\n  return value && value.length ? value.join() : undefined;\n}\n\nexport function serializeOptionalBoolean(value: boolean | undefined): string | undefined {\n  if (value === true) {\n    return 'true';\n  } else if (value === false) {\n    return 'false';\n  }\n  return undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum TaskTypes {\n  Report = 'REPORT',\n  IssueSync = 'ISSUE_SYNC',\n  AppRefresh = 'APP_REFRESH',\n  ViewRefresh = 'VIEW_REFRESH',\n  ProjectExport = 'PROJECT_EXPORT',\n  ProjectImport = 'PROJECT_IMPORT'\n}\n\nexport enum TaskStatuses {\n  Pending = 'PENDING',\n  InProgress = 'IN_PROGRESS',\n  Success = 'SUCCESS',\n  Failed = 'FAILED',\n  Canceled = 'CANCELED'\n}\n\nexport interface Task {\n  analysisId?: string;\n  branch?: string;\n  componentKey?: string;\n  componentName?: string;\n  componentQualifier?: string;\n  errorMessage?: string;\n  errorStacktrace?: string;\n  errorType?: string;\n  executedAt?: string;\n  executionTimeMs?: number;\n  hasErrorStacktrace?: boolean;\n  hasScannerContext?: boolean;\n  id: string;\n  pullRequest?: string;\n  pullRequestTitle?: string;\n  scannerContext?: string;\n  startedAt?: string;\n  status: TaskStatuses;\n  submittedAt: string;\n  submitterLogin?: string;\n  type: TaskTypes;\n  warningCount?: number;\n  warnings?: string[];\n}\n\nexport interface TaskWarning {\n  key: string;\n  message: string;\n  dismissable: boolean;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Query } from './utils';\n\nexport const STATUSES = {\n  ALL: '__ALL__',\n  ALL_EXCEPT_PENDING: '__ALL_EXCEPT_PENDING__'\n};\n\nexport const ALL_TYPES = 'ALL_TYPES';\n\nexport const CURRENTS = {\n  ALL: '__ALL__',\n  ONLY_CURRENTS: 'CURRENTS'\n};\n\nexport const DATE = {\n  ANY: 'ANY',\n  TODAY: 'TODAY',\n  CUSTOM: 'CUSTOM'\n};\n\nexport const DEFAULT_FILTERS: Query = {\n  status: STATUSES.ALL_EXCEPT_PENDING,\n  taskType: ALL_TYPES,\n  currents: CURRENTS.ALL,\n  minSubmittedAt: undefined,\n  maxExecutedAt: undefined,\n  query: ''\n};\n\nexport const DATE_FORMAT = 'YYYY-MM-DD';\n\nexport const DEBOUNCE_DELAY = 250;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { toShortNotSoISOString } from '../../helpers/dates';\nimport { Task, TaskStatuses } from '../../types/tasks';\nimport { ALL_TYPES, CURRENTS, STATUSES } from './constants';\n\nexport interface Query {\n  currents: string;\n  maxExecutedAt?: Date;\n  minSubmittedAt?: Date;\n  query: string;\n  status: string;\n  taskType: string;\n}\n\nexport function updateTask(tasks: Task[], newTask: Task) {\n  return tasks.map(task => (task.id === newTask.id ? newTask : task));\n}\n\nexport function mapFiltersToParameters(filters: Partial<Query> = {}) {\n  const parameters: any = {};\n\n  if (filters.status === STATUSES.ALL) {\n    parameters.status = [\n      TaskStatuses.Pending,\n      TaskStatuses.InProgress,\n      TaskStatuses.Success,\n      TaskStatuses.Failed,\n      TaskStatuses.Canceled\n    ].join();\n  } else if (filters.status === STATUSES.ALL_EXCEPT_PENDING) {\n    parameters.status = [\n      TaskStatuses.InProgress,\n      TaskStatuses.Success,\n      TaskStatuses.Failed,\n      TaskStatuses.Canceled\n    ].join();\n  } else {\n    parameters.status = filters.status;\n  }\n\n  if (filters.taskType !== ALL_TYPES) {\n    parameters.type = filters.taskType;\n  }\n\n  if (filters.currents !== CURRENTS.ALL) {\n    parameters.onlyCurrents = true;\n  }\n\n  if (filters.minSubmittedAt) {\n    parameters.minSubmittedAt = toShortNotSoISOString(filters.minSubmittedAt);\n  }\n\n  if (filters.maxExecutedAt) {\n    parameters.maxExecutedAt = toShortNotSoISOString(filters.maxExecutedAt);\n  }\n\n  if (filters.query) {\n    parameters.q = filters.query;\n  }\n\n  return parameters;\n}\n\nconst ONE_SECOND = 1000;\nconst ONE_MINUTE = 60 * ONE_SECOND;\nconst ONE_HOUR = 60 * ONE_MINUTE;\n\nfunction format(int: number, suffix: string) {\n  return `${int}${suffix}`;\n}\n\nexport function formatDuration(value: number | undefined) {\n  if (!value) {\n    return '';\n  }\n  if (value < ONE_SECOND) {\n    return format(value, 'ms');\n  } else if (value < ONE_SECOND * 10) {\n    const seconds = Math.floor(value / ONE_SECOND);\n    const ms = value - seconds * ONE_SECOND;\n    return seconds + '.' + format(ms, 's');\n  } else if (value < ONE_MINUTE) {\n    const seconds = Math.floor(value / ONE_SECOND);\n    return format(seconds, 's');\n  } else if (value < ONE_MINUTE * 10) {\n    const minutes = Math.floor(value / ONE_MINUTE);\n    const seconds = Math.floor((value - minutes * ONE_MINUTE) / ONE_SECOND);\n    return format(minutes, 'min') + ' ' + format(seconds, 's');\n  }\n  const hours = Math.floor(value / ONE_HOUR);\n  const minutes = Math.floor((value - hours * ONE_HOUR) / ONE_MINUTE);\n  return format(hours, 'h') + ' ' + format(minutes, 'min');\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { Task } from '../../../types/tasks';\n\nconst LIMIT = 1000;\n\ninterface Props {\n  tasks: Task[];\n}\n\nexport default function Footer({ tasks }: Props) {\n  if (tasks.length < LIMIT) {\n    return null;\n  }\n\n  return (\n    <footer className=\"spacer-top note text-center\">\n      {translateWithParameters('max_results_reached', LIMIT)}\n    </footer>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function PlusCircleIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 1c3.863 0 7 3.137 7 7s-3.137 7-7 7-7-3.137-7-7 3.137-7 7-7zm3.726 7.985A.274.274 0 0 0 12 8.711V7.289a.274.274 0 0 0-.274-.274H8.985V4.274A.274.274 0 0 0 8.711 4H7.289a.274.274 0 0 0-.274.274v2.741H4.274A.274.274 0 0 0 4 7.289v1.422c0 .152.123.274.274.274h2.741v2.741c0 .151.122.274.274.274h1.422a.274.274 0 0 0 .274-.274V8.985h2.741z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function NoWorkersSupportPopup() {\n  return (\n    <>\n      <p className=\"spacer-bottom\">\n        <strong>{translate('background_tasks.add_more_workers')}</strong>\n      </p>\n      <p className=\"big-spacer-bottom markdown\">\n        {translate('background_tasks.add_more_workers.text')}\n      </p>\n      <p>\n        <a\n          href=\"https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks\"\n          rel=\"noopener noreferrer\"\n          target=\"_blank\">\n          {translate('learn_more')}\n        </a>\n      </p>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setWorkerCount } from '../../../api/ce';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport Select from '../../../components/controls/Select';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\n\nconst MAX_WORKERS = 10;\n\ninterface Props {\n  onClose: (newWorkerCount?: number) => void;\n  workerCount: number;\n}\n\ninterface State {\n  newWorkerCount: number;\n  submitting: boolean;\n}\n\nexport default class WorkersForm extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      newWorkerCount: props.workerCount,\n      submitting: false\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleClose = () => {\n    this.props.onClose();\n  };\n\n  handleWorkerCountChange = (option: { value: number }) =>\n    this.setState({ newWorkerCount: option.value });\n\n  handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ submitting: true });\n    const { newWorkerCount } = this.state;\n    setWorkerCount(newWorkerCount).then(\n      () => {\n        if (this.mounted) {\n          this.props.onClose(newWorkerCount);\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ submitting: false });\n        }\n      }\n    );\n  };\n\n  render() {\n    const options = [];\n    for (let i = 1; i <= MAX_WORKERS; i++) {\n      options.push({ label: String(i), value: i });\n    }\n\n    return (\n      <Modal\n        contentLabel={translate('background_tasks.change_number_of_workers')}\n        onRequestClose={this.handleClose}>\n        <header className=\"modal-head\">\n          <h2>{translate('background_tasks.change_number_of_workers')}</h2>\n        </header>\n        <form onSubmit={this.handleSubmit}>\n          <div className=\"modal-body\">\n            <Select\n              className=\"input-tiny spacer-top\"\n              clearable={false}\n              onChange={this.handleWorkerCountChange}\n              options={options}\n              searchable={false}\n              value={this.state.newWorkerCount}\n            />\n            <Alert className=\"big-spacer-top\" variant=\"info\">\n              {translate('background_tasks.change_number_of_workers.hint')}\n            </Alert>\n          </div>\n          <footer className=\"modal-foot\">\n            <div>\n              {this.state.submitting && <i className=\"spinner spacer-right\" />}\n              <SubmitButton disabled={this.state.submitting}>{translate('save')}</SubmitButton>\n              <ResetButtonLink onClick={this.handleClose}>{translate('cancel')}</ResetButtonLink>\n            </div>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getWorkers } from '../../../api/ce';\nimport { colors } from '../../../app/theme';\nimport { EditButton } from '../../../components/controls/buttons';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport AlertWarnIcon from '../../../components/icons/AlertWarnIcon';\nimport PlusCircleIcon from '../../../components/icons/PlusCircleIcon';\nimport { translate } from '../../../helpers/l10n';\nimport NoWorkersSupportPopup from './NoWorkersSupportPopup';\nimport WorkersForm from './WorkersForm';\n\ninterface State {\n  canSetWorkerCount: boolean;\n  formOpen: boolean;\n  loading: boolean;\n  noSupportPopup: boolean;\n  workerCount: number;\n}\n\nexport default class Workers extends React.PureComponent<{}, State> {\n  mounted = false;\n  state: State = {\n    canSetWorkerCount: false,\n    formOpen: false,\n    loading: true,\n    noSupportPopup: false,\n    workerCount: 1\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadWorkers();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadWorkers = () => {\n    this.setState({ loading: true });\n    getWorkers().then(\n      ({ canSetWorkerCount, value }) => {\n        if (this.mounted) {\n          this.setState({\n            canSetWorkerCount,\n            loading: false,\n            workerCount: value\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  closeForm = (newWorkerCount?: number) =>\n    newWorkerCount\n      ? this.setState({ formOpen: false, workerCount: newWorkerCount })\n      : this.setState({ formOpen: false });\n\n  handleChangeClick = () => {\n    this.setState({ formOpen: true });\n  };\n\n  handleHelpClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.stopPropagation();\n    this.toggleNoSupportPopup();\n  };\n\n  toggleNoSupportPopup = (show?: boolean) => {\n    if (show !== undefined) {\n      this.setState({ noSupportPopup: show });\n    } else {\n      this.setState(state => ({ noSupportPopup: !state.noSupportPopup }));\n    }\n  };\n\n  render() {\n    const { canSetWorkerCount, formOpen, loading, workerCount } = this.state;\n\n    return (\n      <div className=\"display-flex-center\">\n        {!loading && workerCount > 1 && (\n          <Tooltip overlay={translate('background_tasks.number_of_workers.warning')}>\n            <span className=\"display-inline-flex-center little-spacer-right\">\n              <AlertWarnIcon fill=\"#d3d3d3\" />\n            </span>\n          </Tooltip>\n        )}\n\n        <span className=\"text-middle\">\n          {translate('background_tasks.number_of_workers')}\n\n          {loading ? (\n            <i className=\"spinner little-spacer-left\" />\n          ) : (\n            <strong className=\"little-spacer-left\">{workerCount}</strong>\n          )}\n        </span>\n\n        {!loading && canSetWorkerCount && (\n          <Tooltip overlay={translate('background_tasks.change_number_of_workers')}>\n            <EditButton\n              className=\"js-edit button-small spacer-left\"\n              onClick={this.handleChangeClick}\n            />\n          </Tooltip>\n        )}\n\n        {!loading && !canSetWorkerCount && (\n          <HelpTooltip className=\"spacer-left\" overlay={<NoWorkersSupportPopup />}>\n            <PlusCircleIcon fill={colors.blue} size={12} />\n          </HelpTooltip>\n        )}\n\n        {formOpen && <WorkersForm onClose={this.closeForm} workerCount={this.state.workerCount} />}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\nimport Workers from './Workers';\n\ninterface Props {\n  component?: any;\n}\n\nexport default function Header(props: Props) {\n  return (\n    <header className=\"page-header\">\n      <h1 className=\"page-title\">{translate('background_tasks.page')}</h1>\n      {!props.component && (\n        <div className=\"page-actions\">\n          <Workers />\n        </div>\n      )}\n      <p className=\"page-description\">\n        {translate('background_tasks.page.description')}\n        <Link\n          className=\"spacer-left\"\n          target=\"_blank\"\n          to={{ pathname: '/documentation/analysis/background-tasks/' }}>\n          {translate('learn_more')}\n        </Link>\n      </p>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport { translate } from '../../../helpers/l10n';\nimport { CURRENTS } from '../constants';\n\ninterface Props {\n  value?: string;\n  onChange: (value: string) => void;\n}\n\nexport default class CurrentsFilter extends React.PureComponent<Props> {\n  handleChange = (value: boolean) => {\n    const newValue = value ? CURRENTS.ONLY_CURRENTS : CURRENTS.ALL;\n    this.props.onChange(newValue);\n  };\n\n  render() {\n    const checked = this.props.value === CURRENTS.ONLY_CURRENTS;\n    return (\n      <div className=\"bt-search-form-field\">\n        <Checkbox checked={checked} onCheck={this.handleChange}>\n          <span className=\"little-spacer-left\">{translate('yes')}</span>\n        </Checkbox>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DageRangeInput from '../../../components/controls/DateRangeInput';\n\ninterface Props {\n  maxExecutedAt: Date | undefined;\n  minSubmittedAt: Date | undefined;\n  onChange: (x: { maxExecutedAt?: Date; minSubmittedAt?: Date }) => void;\n}\n\nexport default class DateFilter extends React.PureComponent<Props> {\n  handleDateRangeChange = ({ from, to }: { from?: Date; to?: Date }) => {\n    this.props.onChange({ minSubmittedAt: from, maxExecutedAt: to });\n  };\n\n  render() {\n    const dateRange = { from: this.props.minSubmittedAt, to: this.props.maxExecutedAt };\n    return (\n      <div className=\"nowrap\">\n        <DageRangeInput onChange={this.handleDateRangeChange} value={dateRange} />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport { translate } from '../../../helpers/l10n';\nimport { TaskStatuses } from '../../../types/tasks';\nimport { STATUSES } from '../constants';\n\ninterface Props {\n  value?: string;\n  onChange: (value?: string) => void;\n}\n\nexport default class StatusFilter extends React.PureComponent<Props> {\n  handleChange = ({ value }: { value: string }) => {\n    this.props.onChange(value);\n  };\n\n  render() {\n    const options = [\n      { value: STATUSES.ALL, label: translate('background_task.status.ALL') },\n      {\n        value: STATUSES.ALL_EXCEPT_PENDING,\n        label: translate('background_task.status.ALL_EXCEPT_PENDING')\n      },\n      { value: TaskStatuses.Pending, label: translate('background_task.status.PENDING') },\n      { value: TaskStatuses.InProgress, label: translate('background_task.status.IN_PROGRESS') },\n      { value: TaskStatuses.Success, label: translate('background_task.status.SUCCESS') },\n      { value: TaskStatuses.Failed, label: translate('background_task.status.FAILED') },\n      { value: TaskStatuses.Canceled, label: translate('background_task.status.CANCELED') }\n    ];\n\n    return (\n      <Select\n        className=\"input-medium\"\n        clearable={false}\n        onChange={this.handleChange}\n        options={options}\n        searchable={false}\n        value={this.props.value}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport { translate } from '../../../helpers/l10n';\nimport { ALL_TYPES } from '../constants';\n\ninterface Props {\n  value: string;\n  onChange: Function;\n  types: string[];\n}\n\nexport default class TypesFilter extends React.PureComponent<Props> {\n  handleChange = ({ value }: { value: string }) => {\n    this.props.onChange(value);\n  };\n\n  render() {\n    const { value, types } = this.props;\n    const options = types.map(t => {\n      return {\n        value: t,\n        label: translate('background_task.type', t)\n      };\n    });\n\n    const allOptions = [\n      { value: ALL_TYPES, label: translate('background_task.type.ALL') },\n      ...options\n    ];\n\n    return (\n      <Select\n        className=\"input-large\"\n        clearable={false}\n        onChange={this.handleChange}\n        options={allOptions}\n        searchable={false}\n        value={value}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { translate } from '../../../helpers/l10n';\nimport { DEFAULT_FILTERS } from '../constants';\nimport { Query } from '../utils';\nimport CurrentsFilter from './CurrentsFilter';\nimport DateFilter from './DateFilter';\nimport StatusFilter from './StatusFilter';\nimport TypesFilter from './TypesFilter';\n\ninterface Props {\n  component?: unknown;\n  currents: string;\n  loading: boolean;\n  onFilterUpdate: (changes: Partial<Query>) => void;\n  onReload: () => void;\n  query: string;\n  status: string;\n  taskType: string;\n  maxExecutedAt: Date | undefined;\n  minSubmittedAt: Date | undefined;\n  types: string[];\n}\n\nexport default class Search extends React.PureComponent<Props> {\n  handleStatusChange = (status: string) => {\n    this.props.onFilterUpdate({ status });\n  };\n\n  handleTypeChange = (taskType: string) => {\n    this.props.onFilterUpdate({ taskType });\n  };\n\n  handleCurrentsChange = (currents: string) => {\n    this.props.onFilterUpdate({ currents });\n  };\n\n  handleDateChange = (date: { maxExecutedAt?: Date; minSubmittedAt?: Date }) => {\n    this.props.onFilterUpdate(date);\n  };\n\n  handleQueryChange = (query: string) => {\n    this.props.onFilterUpdate({ query });\n  };\n\n  handleReset = () => {\n    this.props.onFilterUpdate(DEFAULT_FILTERS);\n  };\n\n  renderSearchBox() {\n    const { component, query } = this.props;\n\n    if (component) {\n      // do not render search form on the project-level page\n      return null;\n    }\n\n    return (\n      <li className=\"bt-search-form-large\">\n        <SearchBox\n          onChange={this.handleQueryChange}\n          placeholder={translate('background_tasks.search_by_task_or_component')}\n          value={query}\n        />\n      </li>\n    );\n  }\n\n  render() {\n    const {\n      loading,\n      component,\n      types,\n      status,\n      taskType,\n      currents,\n      minSubmittedAt,\n      maxExecutedAt\n    } = this.props;\n\n    return (\n      <section className=\"big-spacer-top big-spacer-bottom\">\n        <ul className=\"bt-search-form\">\n          <li>\n            <h6 className=\"bt-search-form-label\">{translate('status')}</h6>\n            <StatusFilter onChange={this.handleStatusChange} value={status} />\n          </li>\n          {types.length > 1 && (\n            <li>\n              <h6 className=\"bt-search-form-label\">{translate('type')}</h6>\n              <TypesFilter onChange={this.handleTypeChange} types={types} value={taskType} />\n            </li>\n          )}\n          {!component && (\n            <li>\n              <h6 className=\"bt-search-form-label\">\n                {translate('background_tasks.currents_filter.ONLY_CURRENTS')}\n              </h6>\n              <CurrentsFilter onChange={this.handleCurrentsChange} value={currents} />\n            </li>\n          )}\n          <li>\n            <h6 className=\"bt-search-form-label\">{translate('date')}</h6>\n            <DateFilter\n              maxExecutedAt={maxExecutedAt}\n              minSubmittedAt={minSubmittedAt}\n              onChange={this.handleDateChange}\n            />\n          </li>\n\n          {this.renderSearchBox()}\n\n          <li className=\"nowrap\">\n            <Button className=\"js-reload\" disabled={loading} onClick={this.props.onReload}>\n              {translate('reload')}\n            </Button>{' '}\n            <Button disabled={loading} onClick={this.handleReset}>\n              {translate('reset_verb')}\n            </Button>\n          </li>\n        </ul>\n      </section>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { colors } from '../../../app/theme';\nimport { ClearButton } from '../../../components/controls/buttons';\nimport ConfirmButton from '../../../components/controls/ConfirmButton';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { getAppState, Store } from '../../../store/rootReducer';\n\nexport interface Props {\n  isSystemAdmin?: boolean;\n  onCancelAllPending: () => void;\n  pendingCount?: number;\n}\n\nexport function StatPendingCount({ isSystemAdmin, onCancelAllPending, pendingCount }: Props) {\n  if (pendingCount === undefined) {\n    return null;\n  }\n\n  return (\n    <span>\n      <span className=\"emphasised-measure\">{pendingCount}</span>\n      <span className=\"little-spacer-left display-inline-flex-center\">\n        {translate('background_tasks.pending')}\n        {isSystemAdmin && pendingCount > 0 && (\n          <ConfirmButton\n            cancelButtonText={translate('close')}\n            confirmButtonText={translate('background_tasks.cancel_all_tasks.submit')}\n            isDestructive={true}\n            modalBody={translate('background_tasks.cancel_all_tasks.text')}\n            modalHeader={translate('background_tasks.cancel_all_tasks')}\n            onConfirm={onCancelAllPending}>\n            {({ onClick }) => (\n              <Tooltip overlay={translate('background_tasks.cancel_all_tasks')}>\n                <ClearButton className=\"little-spacer-left\" color={colors.red} onClick={onClick} />\n              </Tooltip>\n            )}\n          </ConfirmButton>\n        )}\n      </span>\n    </span>\n  );\n}\n\nconst mapStateToProps = (state: Store) => ({\n  isSystemAdmin: getAppState(state).canAdmin\n});\n\nexport default connect(mapStateToProps)(StatPendingCount);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\n\n// Do not display the pending time for values smaller than this threshold (in ms)\nconst MIN_PENDING_TIME_THRESHOLD = 1000;\n\nexport interface Props {\n  className?: string;\n  component?: Pick<T.Component, 'key'>;\n  pendingCount?: number;\n  pendingTime?: number;\n}\n\nexport default function StatPendingTime({ className, pendingCount, pendingTime }: Props) {\n  if (!pendingTime || !pendingCount || pendingTime < MIN_PENDING_TIME_THRESHOLD) {\n    return null;\n  }\n  return (\n    <span className={className}>\n      <span className=\"emphasised-measure\">{formatMeasure(pendingTime, 'MILLISEC')}</span>\n      <span className=\"little-spacer-left\">{translate('background_tasks.pending_time')}</span>\n      <HelpTooltip\n        className=\"little-spacer-left\"\n        overlay={translate('background_tasks.pending_time.description')}\n      />\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface Props {\n  className?: string;\n  failingCount?: number;\n  onShowFailing: () => void;\n}\n\nexport default function StatStillFailing({ className, failingCount, onShowFailing }: Props) {\n  if (failingCount === undefined) {\n    return null;\n  }\n\n  return (\n    <span className={className}>\n      {failingCount > 0 ? (\n        <ButtonLink className=\"emphasised-measure text-baseline\" onClick={onShowFailing}>\n          {failingCount}\n        </ButtonLink>\n      ) : (\n        <span className=\"emphasised-measure\">{failingCount}</span>\n      )}\n      <span className=\"little-spacer-left\">{translate('background_tasks.failures')}</span>\n      <HelpTooltip\n        className=\"little-spacer-left\"\n        overlay={translate('background_tasks.failing_count')}\n      />\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport StatPendingCount from './StatPendingCount';\nimport StatPendingTime from './StatPendingTime';\nimport StatStillFailing from './StatStillFailing';\n\nexport interface Props {\n  component?: Pick<T.Component, 'key'>;\n  failingCount?: number;\n  onCancelAllPending: () => void;\n  onShowFailing: () => void;\n  pendingCount?: number;\n  pendingTime?: number;\n}\n\nexport default function Stats({ component, pendingCount, pendingTime, ...props }: Props) {\n  return (\n    <section className=\"big-spacer-top big-spacer-bottom\">\n      <StatPendingCount onCancelAllPending={props.onCancelAllPending} pendingCount={pendingCount} />\n      {!component && (\n        <StatPendingTime\n          className=\"huge-spacer-left\"\n          pendingCount={pendingCount}\n          pendingTime={pendingTime}\n        />\n      )}\n      {!component && (\n        <StatStillFailing\n          className=\"huge-spacer-left\"\n          failingCount={props.failingCount}\n          onShowFailing={props.onShowFailing}\n        />\n      )}\n    </section>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getTask } from '../../../api/ce';\nimport Modal from '../../../components/controls/Modal';\nimport { translate } from '../../../helpers/l10n';\nimport { Task } from '../../../types/tasks';\n\ninterface Props {\n  onClose: () => void;\n  task: Pick<Task, 'componentName' | 'id' | 'type'>;\n}\n\ninterface State {\n  scannerContext?: string;\n}\n\nexport default class ScannerContext extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadScannerContext();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadScannerContext() {\n    getTask(this.props.task.id, ['scannerContext']).then(task => {\n      if (this.mounted) {\n        this.setState({ scannerContext: task.scannerContext });\n      }\n    });\n  }\n\n  handleCloseClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.props.onClose();\n  };\n\n  render() {\n    const { task } = this.props;\n    const { scannerContext } = this.state;\n\n    return (\n      <Modal contentLabel=\"scanner context\" onRequestClose={this.props.onClose} size=\"large\">\n        <div className=\"modal-head\">\n          <h2>\n            {translate('background_tasks.scanner_context')}\n            {': '}\n            {task.componentName}\n            {' ['}\n            {translate('background_task.type', task.type)}\n            {']'}\n          </h2>\n        </div>\n\n        <div className=\"modal-body modal-container\">\n          {scannerContext != null ? (\n            <pre className=\"js-task-scanner-context\">{scannerContext}</pre>\n          ) : (\n            <i className=\"spinner\" />\n          )}\n        </div>\n\n        <div className=\"modal-foot\">\n          <a className=\"js-modal-close\" href=\"#\" onClick={this.handleCloseClick}>\n            {translate('close')}\n          </a>\n        </div>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getTask } from '../../../api/ce';\nimport Modal from '../../../components/controls/Modal';\nimport { translate } from '../../../helpers/l10n';\nimport { Task } from '../../../types/tasks';\n\ninterface Props {\n  onClose: () => void;\n  task: Pick<Task, 'componentName' | 'errorMessage' | 'id' | 'type'>;\n}\n\ninterface State {\n  loading: boolean;\n  stacktrace?: string;\n}\n\nexport default class Stacktrace extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadStacktrace();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadStacktrace() {\n    getTask(this.props.task.id, ['stacktrace']).then(\n      task => {\n        if (this.mounted) {\n          this.setState({ loading: false, stacktrace: task.errorStacktrace });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  }\n\n  handleCloseClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.props.onClose();\n  };\n\n  render() {\n    const { task } = this.props;\n    const { loading, stacktrace } = this.state;\n\n    return (\n      <Modal contentLabel=\"stacktrace\" onRequestClose={this.props.onClose} size=\"large\">\n        <div className=\"modal-head\">\n          <h2>\n            {translate('background_tasks.error_stacktrace')}\n            {': '}\n            {task.componentName}\n            {' ['}\n            {translate('background_task.type', task.type)}\n            {']'}\n          </h2>\n        </div>\n\n        <div className=\"modal-body modal-container\">\n          {loading ? (\n            <i className=\"spinner\" />\n          ) : stacktrace ? (\n            <div>\n              <h4 className=\"spacer-bottom\">{translate('background_tasks.error_stacktrace')}</h4>\n              <pre className=\"js-task-stacktrace\">{stacktrace}</pre>\n            </div>\n          ) : (\n            <div>\n              <h4 className=\"spacer-bottom\">{translate('background_tasks.error_message')}</h4>\n              <pre className=\"js-task-error-message\">{task.errorMessage}</pre>\n            </div>\n          )}\n        </div>\n\n        <div className=\"modal-foot\">\n          <a className=\"js-modal-close\" href=\"#\" onClick={this.handleCloseClick}>\n            {translate('close')}\n          </a>\n        </div>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nexport default function WarningIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M9 12.242v-1.484c0-.14-.11-.258-.25-.258h-1.5c-.14 0-.25.117-.25.258v1.484c0 .14.11.258.25.258h1.5c.14 0 .25-.117.25-.258zM8.984 9.32l.141-3.586a.189.189 0 0 0-.078-.148C9 5.546 8.93 5.5 8.859 5.5H7.141c-.07 0-.141.047-.188.086-.055.039-.078.117-.078.164l.133 3.57c0 .102.117.18.265.18H8.72c.14 0 .258-.078.265-.18zm-.109-7.297l6 11A1 1 0 0 1 14 14.5H2a1 1 0 0 1-.875-1.477l6-11a.994.994 0 0 1 1.75 0z\"\n        style={{ fill: fill || colors.warningIconColor }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { dismissAnalysisWarning, getTask } from '../../api/ce';\nimport { ButtonLink } from '../../components/controls/buttons';\nimport Modal from '../../components/controls/Modal';\nimport WarningIcon from '../../components/icons/WarningIcon';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate } from '../../helpers/l10n';\nimport { sanitizeStringRestricted } from '../../helpers/sanitize';\nimport { TaskWarning } from '../../types/tasks';\nimport { withCurrentUser } from '../hoc/withCurrentUser';\n\ninterface Props {\n  componentKey?: string;\n  currentUser: T.CurrentUser;\n  onClose: () => void;\n  onWarningDismiss?: () => void;\n  taskId?: string;\n  warnings?: TaskWarning[];\n}\n\ninterface State {\n  loading: boolean;\n  dismissedWarning?: string;\n  warnings: TaskWarning[];\n}\n\nexport class AnalysisWarningsModal extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      loading: !props.warnings,\n      warnings: props.warnings || []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    if (!this.props.warnings && this.props.taskId) {\n      this.loadWarnings(this.props.taskId);\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    const { taskId, warnings } = this.props;\n    if (!warnings && taskId && prevProps.taskId !== taskId) {\n      this.loadWarnings(taskId);\n    } else if (warnings && prevProps.warnings !== warnings) {\n      this.setState({ warnings });\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleDismissMessage = async (messageKey: string) => {\n    const { componentKey } = this.props;\n\n    if (componentKey === undefined) {\n      return;\n    }\n\n    this.setState({ dismissedWarning: messageKey });\n\n    try {\n      await dismissAnalysisWarning(componentKey, messageKey);\n\n      if (this.props.onWarningDismiss) {\n        this.props.onWarningDismiss();\n      }\n    } catch (e) {\n      // Noop\n    }\n\n    if (this.mounted) {\n      this.setState({ dismissedWarning: undefined });\n    }\n  };\n\n  loadWarnings = async (taskId: string) => {\n    this.setState({ loading: true });\n    try {\n      const { warnings = [] } = await getTask(taskId, ['warnings']);\n\n      if (this.mounted) {\n        this.setState({\n          loading: false,\n          warnings: warnings.map(w => ({ key: w, message: w, dismissable: false }))\n        });\n      }\n    } catch (e) {\n      if (this.mounted) {\n        this.setState({ loading: false });\n      }\n    }\n  };\n\n  render() {\n    const { currentUser } = this.props;\n    const { loading, dismissedWarning, warnings } = this.state;\n\n    const header = translate('warnings');\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n\n        <div className=\"modal-body modal-container js-analysis-warnings\">\n          <DeferredSpinner loading={loading}>\n            {warnings.map(({ dismissable, key, message }) => (\n              <div className=\"panel panel-vertical\" key={key}>\n                <WarningIcon className=\"pull-left spacer-right\" />\n                <div className=\"overflow-hidden markdown\">\n                  <span\n                    // eslint-disable-next-line react/no-danger\n                    dangerouslySetInnerHTML={{\n                      __html: sanitizeStringRestricted(message.trim().replace(/\\n/g, '<br />'))\n                    }}\n                  />\n\n                  {dismissable && currentUser.isLoggedIn && (\n                    <div className=\"spacer-top display-flex-inline\">\n                      <ButtonLink\n                        className=\"link-base-color\"\n                        disabled={Boolean(dismissedWarning)}\n                        onClick={() => {\n                          this.handleDismissMessage(key);\n                        }}>\n                        {translate('dismiss_permanently')}\n                      </ButtonLink>\n                      {dismissedWarning === key && <i className=\"spinner spacer-left\" />}\n                    </div>\n                  )}\n                </div>\n              </div>\n            ))}\n          </DeferredSpinner>\n        </div>\n\n        <footer className=\"modal-foot\">\n          <ButtonLink className=\"js-modal-close\" onClick={this.props.onClose}>\n            {translate('close')}\n          </ButtonLink>\n        </footer>\n      </Modal>\n    );\n  }\n}\n\nexport default withCurrentUser(AnalysisWarningsModal);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown';\nimport ConfirmModal from '../../../components/controls/ConfirmModal';\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Task, TaskStatuses } from '../../../types/tasks';\nimport ScannerContext from './ScannerContext';\nimport Stacktrace from './Stacktrace';\n\nconst AnalysisWarningsModal = lazyLoadComponent(\n  () => import('../../../components/common/AnalysisWarningsModal'),\n  'AnalysisWarningsModal'\n);\n\ninterface Props {\n  component?: unknown;\n  onCancelTask: (task: Task) => Promise<void>;\n  onFilterTask: (task: Task) => void;\n  task: Task;\n}\n\ninterface State {\n  cancelTaskOpen: boolean;\n  scannerContextOpen: boolean;\n  stacktraceOpen: boolean;\n  warningsOpen: boolean;\n}\n\nexport default class TaskActions extends React.PureComponent<Props, State> {\n  state: State = {\n    cancelTaskOpen: false,\n    scannerContextOpen: false,\n    stacktraceOpen: false,\n    warningsOpen: false\n  };\n\n  handleFilterClick = () => {\n    this.props.onFilterTask(this.props.task);\n  };\n\n  handleCancelTask = () => {\n    return this.props.onCancelTask(this.props.task);\n  };\n\n  handleCancelClick = () => {\n    this.setState({ cancelTaskOpen: true });\n  };\n\n  handleShowScannerContextClick = () => {\n    this.setState({ scannerContextOpen: true });\n  };\n\n  closeCancelTask = () => {\n    this.setState({ cancelTaskOpen: false });\n  };\n\n  closeScannerContext = () => {\n    this.setState({ scannerContextOpen: false });\n  };\n\n  handleShowStacktraceClick = () => {\n    this.setState({ stacktraceOpen: true });\n  };\n\n  closeStacktrace = () => {\n    this.setState({ stacktraceOpen: false });\n  };\n\n  handleShowWarningsClick = () => {\n    this.setState({ warningsOpen: true });\n  };\n\n  closeWarnings = () => {\n    this.setState({ warningsOpen: false });\n  };\n\n  render() {\n    const { component, task } = this.props;\n\n    const canFilter = component === undefined;\n    const canCancel = task.status === TaskStatuses.Pending;\n    const canShowStacktrace = task.errorMessage !== undefined;\n    const canShowWarnings = task.warningCount !== undefined && task.warningCount > 0;\n    const hasActions =\n      canFilter || canCancel || task.hasScannerContext || canShowStacktrace || canShowWarnings;\n\n    if (!hasActions) {\n      return <td>&nbsp;</td>;\n    }\n\n    return (\n      <td className=\"thin nowrap\">\n        <ActionsDropdown className=\"js-task-action\">\n          {canFilter && task.componentName && (\n            <ActionsDropdownItem className=\"js-task-filter\" onClick={this.handleFilterClick}>\n              {translateWithParameters(\n                'background_tasks.filter_by_component_x',\n                task.componentName\n              )}\n            </ActionsDropdownItem>\n          )}\n          {canCancel && (\n            <ActionsDropdownItem\n              className=\"js-task-cancel\"\n              destructive={true}\n              onClick={this.handleCancelClick}>\n              {translate('background_tasks.cancel_task')}\n            </ActionsDropdownItem>\n          )}\n          {task.hasScannerContext && (\n            <ActionsDropdownItem\n              className=\"js-task-show-scanner-context\"\n              onClick={this.handleShowScannerContextClick}>\n              {translate('background_tasks.show_scanner_context')}\n            </ActionsDropdownItem>\n          )}\n          {canShowStacktrace && (\n            <ActionsDropdownItem\n              className=\"js-task-show-stacktrace\"\n              onClick={this.handleShowStacktraceClick}>\n              {translate('background_tasks.show_stacktrace')}\n            </ActionsDropdownItem>\n          )}\n          {canShowWarnings && (\n            <ActionsDropdownItem\n              className=\"js-task-show-warnings\"\n              onClick={this.handleShowWarningsClick}>\n              {translate('background_tasks.show_warnings')}\n            </ActionsDropdownItem>\n          )}\n        </ActionsDropdown>\n\n        {this.state.cancelTaskOpen && (\n          <ConfirmModal\n            cancelButtonText={translate('close')}\n            confirmButtonText={translate('background_tasks.cancel_task')}\n            header={translate('background_tasks.cancel_task')}\n            isDestructive={true}\n            onClose={this.closeCancelTask}\n            onConfirm={this.handleCancelTask}>\n            {translate('background_tasks.cancel_task.text')}\n          </ConfirmModal>\n        )}\n\n        {this.state.scannerContextOpen && (\n          <ScannerContext onClose={this.closeScannerContext} task={task} />\n        )}\n\n        {this.state.stacktraceOpen && <Stacktrace onClose={this.closeStacktrace} task={task} />}\n\n        {this.state.warningsOpen && (\n          <AnalysisWarningsModal\n            componentKey={task.componentKey}\n            onClose={this.closeWarnings}\n            taskId={task.id}\n          />\n        )}\n      </td>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nexport default function PullRequestIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M13,11.9L13,5.5C13,5.4 13.232,1.996 7.9,2L9.1,0.8L8.5,0.1L5.9,2.6L8.5,5.1L9.2,4.4L7.905,3.008C12.256,2.99 12,5.4 12,5.5L12,11.9C11.1,12.1 10.5,12.9 10.5,13.8C10.5,14.9 11.4,15.8 12.5,15.8C13.6,15.8 14.5,14.9 14.5,13.8C14.5,12.9 13.9,12.2 13,11.9ZM4,11.9C4.9,12.2 5.5,12.9 5.5,13.8C5.5,14.9 4.6,15.8 3.5,15.8C2.4,15.8 1.5,14.9 1.5,13.8C1.5,12.9 2.1,12.1 3,11.9L3,4.1C2.1,3.9 1.5,3.1 1.5,2.2C1.5,1.1 2.4,0.2 3.5,0.2C4.6,0.2 5.5,1.1 5.5,2.2C5.5,3.1 4.9,3.9 4,4.1L4,11.9ZM12.5,14.9C11.9,14.9 11.5,14.5 11.5,13.9C11.5,13.3 11.9,12.9 12.5,12.9C13.1,12.9 13.5,13.3 13.5,13.9C13.5,14.5 13.1,14.9 12.5,14.9ZM3.5,14.9C2.9,14.9 2.5,14.5 2.5,13.9C2.5,13.3 2.9,12.9 3.5,12.9C4.1,12.9 4.5,13.3 4.5,13.9C4.5,14.5 4.1,14.9 3.5,14.9ZM2.5,2.2C2.5,1.6 2.9,1.2 3.5,1.2C4.1,1.2 4.5,1.6 4.5,2.2C4.5,2.8 4.1,3.2 3.5,3.2C2.9,3.2 2.5,2.8 2.5,2.2Z\"\n        style={{ fill: fill || colors.blue }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  type: string;\n}\n\nexport default function TaskType({ type }: Props) {\n  return (\n    <span className=\"display-inline-block note\">\n      {'['}\n      {translate('background_task.type', type)}\n      {']'}\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport BranchIcon from '../../../components/icons/BranchIcon';\nimport PullRequestIcon from '../../../components/icons/PullRequestIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport {\n  getBranchUrl,\n  getPortfolioUrl,\n  getProjectUrl,\n  getPullRequestUrl\n} from '../../../helpers/urls';\nimport { isPortfolioLike } from '../../../types/component';\nimport { Task } from '../../../types/tasks';\nimport TaskType from './TaskType';\n\ninterface Props {\n  task: Task;\n}\n\nexport default function TaskComponent({ task }: Props) {\n  if (!task.componentKey) {\n    return (\n      <td>\n        <span className=\"note\">{task.id}</span>\n        <TaskType type={task.type} />\n      </td>\n    );\n  }\n\n  return (\n    <td>\n      {task.branch !== undefined && <BranchIcon className=\"little-spacer-right\" />}\n      {task.pullRequest !== undefined && <PullRequestIcon className=\"little-spacer-right\" />}\n\n      {!task.branch && !task.pullRequest && task.componentQualifier && (\n        <span className=\"little-spacer-right\">\n          <QualifierIcon qualifier={task.componentQualifier} />\n        </span>\n      )}\n\n      {task.componentName && (\n        <Link className=\"spacer-right\" to={getTaskComponentUrl(task.componentKey, task)}>\n          {task.componentName}\n\n          {task.branch && (\n            <span className=\"text-limited text-text-top\" title={task.branch}>\n              <span style={{ marginLeft: 5, marginRight: 5 }}>/</span>\n              {task.branch}\n            </span>\n          )}\n\n          {task.pullRequest && (\n            <span className=\"text-limited text-text-top\" title={task.pullRequestTitle}>\n              <span style={{ marginLeft: 5, marginRight: 5 }}>/</span>\n              {task.pullRequest}\n            </span>\n          )}\n        </Link>\n      )}\n\n      <TaskType type={task.type} />\n    </td>\n  );\n}\n\nfunction getTaskComponentUrl(componentKey: string, task: Task) {\n  if (isPortfolioLike(task.componentQualifier)) {\n    return getPortfolioUrl(componentKey);\n  } else if (task.branch) {\n    return getBranchUrl(componentKey, task.branch);\n  } else if (task.pullRequest) {\n    return getPullRequestUrl(componentKey, task.pullRequest);\n  }\n  return getProjectUrl(componentKey);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormatDateOptions, FormattedTime } from 'react-intl';\nimport { parseDate } from '../../helpers/dates';\nimport { ParsableDate } from '../../types/dates';\n\nexport interface TimeFormatterProps {\n  children?: (formattedDate: string) => React.ReactNode;\n  date: ParsableDate;\n  long?: boolean;\n}\n\nexport const formatterOption: FormatDateOptions = { hour: 'numeric', minute: 'numeric' };\n\nexport const longFormatterOption: FormatDateOptions = {\n  hour: 'numeric',\n  minute: 'numeric',\n  second: 'numeric'\n};\n\nexport default function TimeFormatter({ children, date, long }: TimeFormatterProps) {\n  return (\n    <FormattedTime value={parseDate(date)} {...(long ? longFormatterOption : formatterOption)}>\n      {children}\n    </FormattedTime>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { differenceInDays } from 'date-fns';\nimport * as React from 'react';\nimport TimeFormatter from '../../../components/intl/TimeFormatter';\nimport { isValidDate, parseDate } from '../../../helpers/dates';\n\ninterface Props {\n  date?: string;\n  baseDate?: string;\n}\n\nexport default function TaskDate({ date, baseDate }: Props) {\n  const parsedDate = date && parseDate(date);\n  const parsedBaseDate = baseDate && parseDate(baseDate);\n  const diff =\n    parsedDate && parsedBaseDate && isValidDate(parsedDate) && isValidDate(parsedBaseDate)\n      ? differenceInDays(parsedDate, parsedBaseDate)\n      : 0;\n\n  return (\n    <td className=\"thin nowrap text-right\">\n      {diff > 0 && <span className=\"text-warning little-spacer-right\">{`(+${diff}d)`}</span>}\n\n      {parsedDate && isValidDate(parsedDate) ? <TimeFormatter date={parsedDate} long={true} /> : ''}\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isSameDay } from 'date-fns';\nimport * as React from 'react';\nimport DateFormatter from '../../../components/intl/DateFormatter';\nimport { parseDate } from '../../../helpers/dates';\n\ninterface Props {\n  submittedAt: string;\n  prevSubmittedAt?: string;\n}\n\nexport default function TaskDay({ submittedAt, prevSubmittedAt }: Props) {\n  const shouldDisplay =\n    !prevSubmittedAt || !isSameDay(parseDate(submittedAt), parseDate(prevSubmittedAt));\n\n  return (\n    <td className=\"thin nowrap text-right small\">\n      {shouldDisplay ? <DateFormatter date={submittedAt} long={true} /> : ''}\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { formatDuration } from '../utils';\n\ninterface Props {\n  ms?: number;\n}\n\nexport default function TaskExecutionTime({ ms }: Props) {\n  return <td className=\"thin nowrap text-right\">{ms && formatDuration(ms)}</td>;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\ninterface Props {\n  id: string;\n}\n\nexport default function TaskId({ id }: Props) {\n  return (\n    <td className=\"thin nowrap\">\n      <div className=\"note\">{id}</div>\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nexport default function PendingIcon({ fill, ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <g transform=\"matrix(0.0364583,0,0,0.0364583,1,-0.166667)\">\n        <path\n          d=\"M224,136L224,248C224,250.333 223.25,252.25 221.75,253.75C220.25,255.25 218.333,256 216,256L136,256C133.667,256 131.75,255.25 130.25,253.75C128.75,252.25 128,250.333 128,248L128,232C128,229.667 128.75,227.75 130.25,226.25C131.75,224.75 133.667,224 136,224L192,224L192,136C192,133.667 192.75,131.75 194.25,130.25C195.75,128.75 197.667,128 200,128L216,128C218.333,128 220.25,128.75 221.75,130.25C223.25,131.75 224,133.667 224,136ZM328,224C328,199.333 321.917,176.583 309.75,155.75C297.583,134.917 281.083,118.417 260.25,106.25C239.417,94.083 216.667,88 192,88C167.333,88 144.583,94.083 123.75,106.25C102.917,118.417 86.417,134.917 74.25,155.75C62.083,176.583 56,199.333 56,224C56,248.667 62.083,271.417 74.25,292.25C86.417,313.083 102.917,329.583 123.75,341.75C144.583,353.917 167.333,360 192,360C216.667,360 239.417,353.917 260.25,341.75C281.083,329.583 297.583,313.083 309.75,292.25C321.917,271.417 328,248.667 328,224ZM384,224C384,258.833 375.417,290.958 358.25,320.375C341.083,349.792 317.792,373.083 288.375,390.25C258.958,407.417 226.833,416 192,416C157.167,416 125.042,407.417 95.625,390.25C66.208,373.083 42.917,349.792 25.75,320.375C8.583,290.958 0,258.833 0,224C0,189.167 8.583,157.042 25.75,127.625C42.917,98.208 66.208,74.917 95.625,57.75C125.042,40.583 157.167,32 192,32C226.833,32 258.958,40.583 288.375,57.75C317.792,74.917 341.083,98.208 358.25,127.625C375.417,157.042 384,189.167 384,224Z\"\n          style={{ fill: fill || colors.gray67 }}\n        />\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport PendingIcon from '../../../components/icons/PendingIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { TaskStatuses } from '../../../types/tasks';\n\ninterface Props {\n  status: string;\n}\n\nexport default function TaskStatus({ status }: Props) {\n  let inner;\n\n  switch (status) {\n    case TaskStatuses.Pending:\n      inner = <PendingIcon />;\n      break;\n    case TaskStatuses.InProgress:\n      inner = <i className=\"spinner\" />;\n      break;\n    case TaskStatuses.Success:\n      inner = (\n        <span className=\"badge badge-success\">{translate('background_task.status.SUCCESS')}</span>\n      );\n      break;\n    case TaskStatuses.Failed:\n      inner = (\n        <span className=\"badge badge-error\">{translate('background_task.status.FAILED')}</span>\n      );\n      break;\n    case TaskStatuses.Canceled:\n      inner = <span className=\"badge\">{translate('background_task.status.CANCELED')}</span>;\n      break;\n    default:\n      inner = '';\n  }\n\n  return <td className=\"thin spacer-right\">{inner}</td>;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  submitter?: string;\n}\n\nexport default function TaskSubmitter({ submitter }: Props) {\n  return (\n    <td className=\"thin note\">\n      <span className=\"text-limited-small text-bottom\">{submitter || translate('anonymous')}</span>\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Task as ITask } from '../../../types/tasks';\nimport TaskActions from './TaskActions';\nimport TaskComponent from './TaskComponent';\nimport TaskDate from './TaskDate';\nimport TaskDay from './TaskDay';\nimport TaskExecutionTime from './TaskExecutionTime';\nimport TaskId from './TaskId';\nimport TaskStatus from './TaskStatus';\nimport TaskSubmitter from './TaskSubmitter';\n\ninterface Props {\n  component?: unknown;\n  onCancelTask: (task: ITask) => Promise<void>;\n  onFilterTask: (task: ITask) => void;\n  task: ITask;\n  previousTask?: ITask;\n}\n\nexport default function Task(props: Props) {\n  const { task, component, onCancelTask, onFilterTask, previousTask } = props;\n\n  return (\n    <tr>\n      <TaskStatus status={task.status} />\n      <TaskComponent task={task} />\n      <TaskId id={task.id} />\n      <TaskSubmitter submitter={task.submitterLogin} />\n      <TaskDay\n        prevSubmittedAt={previousTask && previousTask.submittedAt}\n        submittedAt={task.submittedAt}\n      />\n      <TaskDate date={task.submittedAt} />\n      <TaskDate baseDate={task.submittedAt} date={task.startedAt} />\n      <TaskDate baseDate={task.submittedAt} date={task.executedAt} />\n      <TaskExecutionTime ms={task.executionTimeMs} />\n      <TaskActions\n        component={component}\n        onCancelTask={onCancelTask}\n        onFilterTask={onFilterTask}\n        task={task}\n      />\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Task as ITask } from '../../../types/tasks';\nimport Task from './Task';\n\ninterface Props {\n  tasks: ITask[];\n  component?: unknown;\n  loading: boolean;\n  onCancelTask: (task: ITask) => Promise<void>;\n  onFilterTask: (task: ITask) => void;\n}\n\nexport default function Tasks({ tasks, component, loading, onCancelTask, onFilterTask }: Props) {\n  const className = classNames('data zebra zebra-hover background-tasks', {\n    'new-loading': loading\n  });\n\n  return (\n    <div className=\"boxed-group boxed-group-inner\">\n      <table className={className}>\n        <thead>\n          <tr>\n            <th>{translate('background_tasks.table.status')}</th>\n            <th>{translate('background_tasks.table.task')}</th>\n            <th>{translate('background_tasks.table.id')}</th>\n            <th>{translate('background_tasks.table.submitter')}</th>\n            <th>&nbsp;</th>\n            <th className=\"text-right\">{translate('background_tasks.table.submitted')}</th>\n            <th className=\"text-right\">{translate('background_tasks.table.started')}</th>\n            <th className=\"text-right\">{translate('background_tasks.table.finished')}</th>\n            <th className=\"text-right\">{translate('background_tasks.table.duration')}</th>\n            <th>&nbsp;</th>\n          </tr>\n        </thead>\n        <tbody>\n          {tasks.map((task, index, tasks) => (\n            <Task\n              component={component}\n              key={task.id}\n              onCancelTask={onCancelTask}\n              onFilterTask={onFilterTask}\n              previousTask={index > 0 ? tasks[index - 1] : undefined}\n              task={task}\n            />\n          ))}\n        </tbody>\n      </table>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport {\n  cancelAllTasks,\n  cancelTask as cancelTaskAPI,\n  getActivity,\n  getStatus,\n  getTypes\n} from '../../../api/ce';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport { Location, Router } from '../../../components/hoc/withRouter';\nimport { toShortNotSoISOString } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport { parseAsDate } from '../../../helpers/query';\nimport { Task, TaskStatuses } from '../../../types/tasks';\nimport '../background-tasks.css';\nimport { CURRENTS, DEBOUNCE_DELAY, DEFAULT_FILTERS } from '../constants';\nimport { mapFiltersToParameters, Query, updateTask } from '../utils';\nimport Footer from './Footer';\nimport Header from './Header';\nimport Search from './Search';\nimport Stats from './Stats';\nimport Tasks from './Tasks';\n\ninterface Props {\n  component?: Pick<T.Component, 'key'> & { id: string }; // id should be removed when api/ce/activity accept a component key instead of an id\n  location: Location;\n  router: Pick<Router, 'push'>;\n}\n\ninterface State {\n  failingCount: number;\n  loading: boolean;\n  pendingCount: number;\n  pendingTime?: number;\n  tasks: Task[];\n  types?: string[];\n}\n\nexport default class BackgroundTasksApp extends React.PureComponent<Props, State> {\n  loadTasksDebounced: () => void;\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = { failingCount: 0, loading: true, pendingCount: 0, tasks: [] };\n    this.loadTasksDebounced = debounce(this.loadTasks, DEBOUNCE_DELAY);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n\n    getTypes().then(\n      types => {\n        this.setState({ types });\n        this.loadTasks();\n      },\n      () => {}\n    );\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      prevProps.component !== this.props.component ||\n      prevProps.location !== this.props.location\n    ) {\n      this.loadTasksDebounced();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  loadTasks = () => {\n    this.setState({ loading: true });\n\n    const status = this.props.location.query.status || DEFAULT_FILTERS.status;\n    const taskType = this.props.location.query.taskType || DEFAULT_FILTERS.taskType;\n    const currents = this.props.location.query.currents || DEFAULT_FILTERS.currents;\n    const minSubmittedAt =\n      this.props.location.query.minSubmittedAt || DEFAULT_FILTERS.minSubmittedAt;\n    const maxExecutedAt = this.props.location.query.maxExecutedAt || DEFAULT_FILTERS.maxExecutedAt;\n    const query = this.props.location.query.query || DEFAULT_FILTERS.query;\n\n    const filters = { status, taskType, currents, minSubmittedAt, maxExecutedAt, query };\n    const parameters = mapFiltersToParameters(filters);\n\n    if (this.props.component) {\n      parameters.component = this.props.component.key;\n    }\n\n    Promise.all([getActivity(parameters), getStatus(parameters.component)]).then(\n      ([{ tasks }, status]) => {\n        if (this.mounted) {\n          this.setState({\n            failingCount: status.failing,\n            loading: false,\n            pendingCount: status.pending,\n            pendingTime: status.pendingTime,\n            tasks\n          });\n        }\n      },\n      this.stopLoading\n    );\n  };\n\n  handleFilterUpdate = (nextState: Partial<Query>) => {\n    const nextQuery = { ...this.props.location.query, ...nextState };\n\n    // remove defaults\n    Object.keys(DEFAULT_FILTERS).forEach((key: keyof typeof DEFAULT_FILTERS) => {\n      if (nextQuery[key] === DEFAULT_FILTERS[key]) {\n        delete nextQuery[key];\n      }\n    });\n\n    if (nextQuery.minSubmittedAt) {\n      nextQuery.minSubmittedAt = toShortNotSoISOString(nextQuery.minSubmittedAt);\n    }\n\n    if (nextQuery.maxExecutedAt) {\n      nextQuery.maxExecutedAt = toShortNotSoISOString(nextQuery.maxExecutedAt);\n    }\n\n    this.props.router.push({\n      pathname: this.props.location.pathname,\n      query: nextQuery\n    });\n  };\n\n  handleCancelTask = (task: Task) => {\n    this.setState({ loading: true });\n\n    return cancelTaskAPI(task.id).then(nextTask => {\n      if (this.mounted) {\n        this.setState(state => ({\n          tasks: updateTask(state.tasks, nextTask),\n          loading: false\n        }));\n      }\n    }, this.stopLoading);\n  };\n\n  handleFilterTask = (task: Task) => {\n    this.handleFilterUpdate({ query: task.componentKey });\n  };\n\n  handleShowFailing = () => {\n    this.handleFilterUpdate({\n      ...DEFAULT_FILTERS,\n      status: TaskStatuses.Failed,\n      currents: CURRENTS.ONLY_CURRENTS\n    });\n  };\n\n  handleCancelAllPending = () => {\n    this.setState({ loading: true });\n\n    cancelAllTasks().then(() => {\n      if (this.mounted) {\n        this.loadTasks();\n      }\n    }, this.stopLoading);\n  };\n\n  render() {\n    const { component } = this.props;\n    const { loading, types, tasks } = this.state;\n\n    if (!types) {\n      return (\n        <div className=\"page page-limited\">\n          <i className=\"spinner\" />\n        </div>\n      );\n    }\n\n    const status = this.props.location.query.status || DEFAULT_FILTERS.status;\n    const taskType = this.props.location.query.taskType || DEFAULT_FILTERS.taskType;\n    const currents = this.props.location.query.currents || DEFAULT_FILTERS.currents;\n    const minSubmittedAt = parseAsDate(this.props.location.query.minSubmittedAt);\n    const maxExecutedAt = parseAsDate(this.props.location.query.maxExecutedAt);\n    const query = this.props.location.query.query || '';\n\n    return (\n      <div className=\"page page-limited\">\n        <Suggestions suggestions=\"background_tasks\" />\n        <Helmet defer={false} title={translate('background_tasks.page')} />\n        <Header component={component} />\n\n        <Stats\n          component={component}\n          failingCount={this.state.failingCount}\n          onCancelAllPending={this.handleCancelAllPending}\n          onShowFailing={this.handleShowFailing}\n          pendingCount={this.state.pendingCount}\n          pendingTime={this.state.pendingTime}\n        />\n\n        <Search\n          component={component}\n          currents={currents}\n          loading={loading}\n          maxExecutedAt={maxExecutedAt}\n          minSubmittedAt={minSubmittedAt}\n          onFilterUpdate={this.handleFilterUpdate}\n          onReload={this.loadTasksDebounced}\n          query={query}\n          status={status}\n          taskType={taskType}\n          types={types}\n        />\n\n        <Tasks\n          component={component}\n          loading={loading}\n          onCancelTask={this.handleCancelTask}\n          onFilterTask={this.handleFilterTask}\n          tasks={tasks}\n        />\n\n        <Footer tasks={tasks} />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/BackgroundTasksApp')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { request } from '../helpers/request';\n\nexport function login(login: string, password: string): Promise<Response> {\n  return request('/api/authentication/login')\n    .setMethod('POST')\n    .setData({ login, password })\n    .submit()\n    .then(basicCheckStatus);\n}\n\nexport function logout(): Promise<Response> {\n  return request('/api/authentication/logout')\n    .setMethod('POST')\n    .submit()\n    .then(basicCheckStatus);\n}\n\nfunction basicCheckStatus(response: Response): Promise<Response> {\n  if (response.status >= 200 && response.status < 300) {\n    return Promise.resolve(response);\n  } else {\n    return Promise.reject(response);\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON } from '../helpers/request';\n\nexport function getLanguages(): Promise<T.Language[]> {\n  return getJSON('/api/languages/list').then(r => r.languages, throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON } from '../helpers/request';\n\nexport interface MetricsResponse {\n  metrics: T.Metric[];\n  p: number;\n  ps: number;\n  total: number;\n}\n\nexport function getMetrics(data?: {\n  isCustom?: boolean;\n  p?: number;\n  ps?: number;\n}): Promise<MetricsResponse> {\n  return getJSON('/api/metrics/search', data).catch(throwGlobalError);\n}\n\nexport function getAllMetrics(data?: {\n  isCustom?: boolean;\n  p?: number;\n  ps?: number;\n}): Promise<T.Metric[]> {\n  return inner(data);\n\n  function inner(\n    data: { p?: number; ps?: number } = { ps: 500 },\n    prev?: MetricsResponse\n  ): Promise<T.Metric[]> {\n    return getMetrics(data).then(r => {\n      const result = prev ? prev.metrics.concat(r.metrics) : r.metrics;\n      if (r.p * r.ps >= r.total) {\n        return result;\n      }\n      return inner({ ...data, p: r.p + 1 }, { ...r, metrics: result });\n    });\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON } from '../helpers/request';\nimport { BranchParameters } from '../types/branch-like';\nimport {\n  AddDeleteGroupPermissionsParameters,\n  AddDeleteUserPermissionsParameters,\n  Group,\n  QualityGateApplicationStatus,\n  QualityGateProjectStatus,\n  SearchPermissionsParameters\n} from '../types/quality-gates';\n\nexport function fetchQualityGates(): Promise<{\n  actions: { create: boolean };\n  qualitygates: T.QualityGate[];\n}> {\n  return getJSON('/api/qualitygates/list').catch(throwGlobalError);\n}\n\nexport function fetchQualityGate(data: { id: number | string }): Promise<T.QualityGate> {\n  return getJSON('/api/qualitygates/show', data).catch(throwGlobalError);\n}\n\nexport function createQualityGate(data: { name: string }): Promise<T.QualityGate> {\n  return postJSON('/api/qualitygates/create', data).catch(throwGlobalError);\n}\n\nexport function deleteQualityGate(data: { id: string }): Promise<void | Response> {\n  return post('/api/qualitygates/destroy', data).catch(throwGlobalError);\n}\n\nexport function renameQualityGate(data: { id: string; name: string }): Promise<void | Response> {\n  return post('/api/qualitygates/rename', data).catch(throwGlobalError);\n}\n\nexport function copyQualityGate(data: { id: string; name: string }): Promise<T.QualityGate> {\n  return postJSON('/api/qualitygates/copy', data).catch(throwGlobalError);\n}\n\nexport function setQualityGateAsDefault(data: { id: string }): Promise<void | Response> {\n  return post('/api/qualitygates/set_as_default', data).catch(throwGlobalError);\n}\n\nexport function createCondition(\n  data: {\n    gateId: string;\n  } & T.Omit<T.Condition, 'id'>\n): Promise<T.Condition> {\n  return postJSON('/api/qualitygates/create_condition', data).catch(throwGlobalError);\n}\n\nexport function updateCondition(data: T.Condition): Promise<T.Condition> {\n  return postJSON('/api/qualitygates/update_condition', data).catch(throwGlobalError);\n}\n\nexport function deleteCondition(data: { id: number }): Promise<void> {\n  return post('/api/qualitygates/delete_condition', data);\n}\n\nexport function getGateForProject(data: { project: string }): Promise<T.QualityGate | undefined> {\n  return getJSON('/api/qualitygates/get_by_project', data).then(\n    ({ qualityGate }) =>\n      qualityGate && {\n        ...qualityGate,\n        isDefault: qualityGate.default\n      },\n    throwGlobalError\n  );\n}\n\nexport function searchProjects(data: {\n  gateName: string;\n  page?: number;\n  pageSize?: number;\n  query?: string;\n  selected?: string;\n}): Promise<{\n  paging: T.Paging;\n  results: Array<{ key: string; name: string; selected: boolean }>;\n}> {\n  return getJSON('/api/qualitygates/search', data).catch(throwGlobalError);\n}\n\nexport function associateGateWithProject(data: {\n  gateId: string;\n  projectKey: string;\n}): Promise<void | Response> {\n  return post('/api/qualitygates/select', data).catch(throwGlobalError);\n}\n\nexport function dissociateGateWithProject(data: {\n  gateId: string;\n  projectKey: string;\n}): Promise<void | Response> {\n  return post('/api/qualitygates/deselect', data).catch(throwGlobalError);\n}\n\nexport function getApplicationQualityGate(data: {\n  application: string;\n  branch?: string;\n}): Promise<QualityGateApplicationStatus> {\n  return getJSON('/api/qualitygates/application_status', data).catch(throwGlobalError);\n}\n\nexport function getQualityGateProjectStatus(\n  data: {\n    projectKey?: string;\n    projectId?: string;\n  } & BranchParameters\n): Promise<QualityGateProjectStatus> {\n  return getJSON('/api/qualitygates/project_status', data)\n    .then(r => r.projectStatus)\n    .catch(throwGlobalError);\n}\n\nexport function addUser(data: AddDeleteUserPermissionsParameters) {\n  return post('/api/qualitygates/add_user', data).catch(throwGlobalError);\n}\n\nexport function removeUser(data: AddDeleteUserPermissionsParameters) {\n  return post('/api/qualitygates/remove_user', data).catch(throwGlobalError);\n}\n\nexport function searchUsers(data: SearchPermissionsParameters): Promise<{ users: T.UserBase[] }> {\n  return getJSON('/api/qualitygates/search_users', data).catch(throwGlobalError);\n}\n\nexport function addGroup(data: AddDeleteGroupPermissionsParameters) {\n  return post('/api/qualitygates/add_group', data).catch(throwGlobalError);\n}\n\nexport function removeGroup(data: AddDeleteGroupPermissionsParameters) {\n  return post('/api/qualitygates/remove_group', data).catch(throwGlobalError);\n}\n\nexport function searchGroups(data: SearchPermissionsParameters): Promise<{ groups: Group[] }> {\n  return getJSON('/api/qualitygates/search_groups', data).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport {\n  QualityGateApplicationStatusChildProject,\n  QualityGateProjectStatus,\n  QualityGateStatusCondition\n} from '../types/quality-gates';\n\nexport function extractStatusConditionsFromProjectStatus(\n  projectStatus: QualityGateProjectStatus\n): QualityGateStatusCondition[] {\n  const { conditions } = projectStatus;\n  return conditions\n    ? conditions.map(c => ({\n        actual: c.actualValue,\n        error: c.errorThreshold,\n        level: c.status,\n        metric: c.metricKey,\n        op: c.comparator,\n        period: c.periodIndex\n      }))\n    : [];\n}\n\nexport function extractStatusConditionsFromApplicationStatusChildProject(\n  projectStatus: QualityGateApplicationStatusChildProject\n): QualityGateStatusCondition[] {\n  const { conditions } = projectStatus;\n  return conditions\n    ? conditions.map(c => ({\n        actual: c.value,\n        error: c.errorThreshold,\n        level: c.status,\n        metric: c.metric,\n        op: c.comparator,\n        period: c.periodIndex\n      }))\n    : [];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { InjectedRouter } from 'react-router';\nimport { Dispatch } from 'redux';\nimport * as auth from '../api/auth';\nimport { getLanguages } from '../api/languages';\nimport { getAllMetrics } from '../api/metrics';\nimport { getQualityGateProjectStatus } from '../api/quality-gates';\nimport { getBranchLikeQuery } from '../helpers/branch-like';\nimport { extractStatusConditionsFromProjectStatus } from '../helpers/qualityGates';\nimport { BranchLike } from '../types/branch-like';\nimport { requireAuthorization as requireAuthorizationAction } from './appState';\nimport { registerBranchStatusAction } from './branches';\nimport { addGlobalErrorMessage } from './globalMessages';\nimport { receiveLanguages } from './languages';\nimport { receiveMetrics } from './metrics';\n\nexport function fetchLanguages() {\n  return (dispatch: Dispatch) => {\n    getLanguages().then(\n      languages => dispatch(receiveLanguages(languages)),\n      () => {\n        /* do nothing */\n      }\n    );\n  };\n}\n\nexport function fetchMetrics() {\n  return (dispatch: Dispatch) => {\n    getAllMetrics().then(\n      metrics => dispatch(receiveMetrics(metrics)),\n      () => {\n        /* do nothing */\n      }\n    );\n  };\n}\n\nexport function fetchBranchStatus(branchLike: BranchLike, projectKey: string) {\n  return (dispatch: Dispatch<any>) => {\n    getQualityGateProjectStatus({ projectKey, ...getBranchLikeQuery(branchLike) }).then(\n      projectStatus => {\n        const { ignoredConditions, status } = projectStatus;\n        const conditions = extractStatusConditionsFromProjectStatus(projectStatus);\n        dispatch(\n          registerBranchStatusAction(branchLike, projectKey, status, conditions, ignoredConditions)\n        );\n      },\n      () => {\n        dispatch(addGlobalErrorMessage('Fetching Quality Gate status failed'));\n      }\n    );\n  };\n}\n\nexport function doLogin(login: string, password: string) {\n  return (dispatch: Dispatch<any>) =>\n    auth.login(login, password).then(\n      () => {\n        /* everything is fine */\n      },\n      () => {\n        dispatch(addGlobalErrorMessage('Authentication failed'));\n        return Promise.reject();\n      }\n    );\n}\n\nexport function doLogout() {\n  return (dispatch: Dispatch<any>) =>\n    auth.logout().then(\n      () => {\n        /* everything is fine */\n      },\n      () => {\n        dispatch(addGlobalErrorMessage('Logout failed'));\n        return Promise.reject();\n      }\n    );\n}\n\nexport function requireAuthorization(router: Pick<InjectedRouter, 'replace'>) {\n  const returnTo = window.location.pathname + window.location.search + window.location.hash;\n  router.replace({ pathname: '/sessions/new', query: { return_to: returnTo } });\n  return requireAuthorizationAction();\n}\n\nexport function registerBranchStatus(branchLike: BranchLike, component: string, status: T.Status) {\n  return (dispatch: Dispatch) => {\n    dispatch(registerBranchStatusAction(branchLike, component, status));\n  };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nlet bucket: T.Dict<T.ComponentMeasure> = {};\nlet childrenBucket: T.Dict<{\n  children: T.ComponentMeasure[];\n  page: number;\n  total: number;\n}> = {};\nlet breadcrumbsBucket: T.Dict<T.Breadcrumb[]> = {};\n\nexport function addComponent(component: T.ComponentMeasure): void {\n  bucket[component.key] = component;\n}\n\nexport function getComponent(componentKey: string): T.ComponentMeasure {\n  return bucket[componentKey];\n}\n\nexport function addComponentChildren(\n  componentKey: string,\n  children: T.ComponentMeasure[],\n  total: number,\n  page: number\n): void {\n  const previous = getComponentChildren(componentKey);\n  if (previous) {\n    children = [...previous.children, ...children];\n  }\n  childrenBucket[componentKey] = { children, total, page };\n}\n\nexport function getComponentChildren(\n  componentKey: string\n): {\n  children: T.ComponentMeasure[];\n  page: number;\n  total: number;\n} {\n  return childrenBucket[componentKey];\n}\n\nexport function addComponentBreadcrumbs(componentKey: string, breadcrumbs: T.Breadcrumb[]): void {\n  breadcrumbsBucket[componentKey] = breadcrumbs;\n}\n\nexport function getComponentBreadcrumbs(componentKey: string): T.Breadcrumb[] {\n  return breadcrumbsBucket[componentKey];\n}\n\nexport function clearBucket(): void {\n  bucket = {};\n  childrenBucket = {};\n  breadcrumbsBucket = {};\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum MetricKey {\n  alert_status = 'alert_status',\n  blocker_violations = 'blocker_violations',\n  branch_coverage = 'branch_coverage',\n  bugs = 'bugs',\n  burned_budget = 'burned_budget',\n  business_value = 'business_value',\n  class_complexity = 'class_complexity',\n  classes = 'classes',\n  code_smells = 'code_smells',\n  cognitive_complexity = 'cognitive_complexity',\n  comment_lines = 'comment_lines',\n  comment_lines_data = 'comment_lines_data',\n  comment_lines_density = 'comment_lines_density',\n  complexity = 'complexity',\n  complexity_in_classes = 'complexity_in_classes',\n  complexity_in_functions = 'complexity_in_functions',\n  conditions_to_cover = 'conditions_to_cover',\n  confirmed_issues = 'confirmed_issues',\n  coverage = 'coverage',\n  critical_violations = 'critical_violations',\n  development_cost = 'development_cost',\n  directories = 'directories',\n  duplicated_blocks = 'duplicated_blocks',\n  duplicated_files = 'duplicated_files',\n  duplicated_lines = 'duplicated_lines',\n  duplicated_lines_density = 'duplicated_lines_density',\n  duplications_data = 'duplications_data',\n  effort_to_reach_maintainability_rating_a = 'effort_to_reach_maintainability_rating_a',\n  executable_lines_data = 'executable_lines_data',\n  false_positive_issues = 'false_positive_issues',\n  file_complexity = 'file_complexity',\n  file_complexity_distribution = 'file_complexity_distribution',\n  filename_size = 'filename_size',\n  filename_size_rating = 'filename_size_rating',\n  files = 'files',\n  function_complexity = 'function_complexity',\n  function_complexity_distribution = 'function_complexity_distribution',\n  functions = 'functions',\n  generated_lines = 'generated_lines',\n  generated_ncloc = 'generated_ncloc',\n  info_violations = 'info_violations',\n  last_change_on_maintainability_rating = 'last_change_on_maintainability_rating',\n  last_change_on_releasability_rating = 'last_change_on_releasability_rating',\n  last_change_on_reliability_rating = 'last_change_on_reliability_rating',\n  last_change_on_security_rating = 'last_change_on_security_rating',\n  last_change_on_security_review_rating = 'last_change_on_security_review_rating',\n  last_commit_date = 'last_commit_date',\n  leak_projects = 'leak_projects',\n  line_coverage = 'line_coverage',\n  lines = 'lines',\n  lines_to_cover = 'lines_to_cover',\n  maintainability_rating_effort = 'maintainability_rating_effort',\n  major_violations = 'major_violations',\n  minor_violations = 'minor_violations',\n  ncloc = 'ncloc',\n  ncloc_data = 'ncloc_data',\n  ncloc_language_distribution = 'ncloc_language_distribution',\n  new_blocker_violations = 'new_blocker_violations',\n  new_branch_coverage = 'new_branch_coverage',\n  new_bugs = 'new_bugs',\n  new_code_smells = 'new_code_smells',\n  new_conditions_to_cover = 'new_conditions_to_cover',\n  new_coverage = 'new_coverage',\n  new_critical_violations = 'new_critical_violations',\n  new_development_cost = 'new_development_cost',\n  new_duplicated_blocks = 'new_duplicated_blocks',\n  new_duplicated_lines = 'new_duplicated_lines',\n  new_duplicated_lines_density = 'new_duplicated_lines_density',\n  new_info_violations = 'new_info_violations',\n  new_line_coverage = 'new_line_coverage',\n  new_lines = 'new_lines',\n  new_lines_to_cover = 'new_lines_to_cover',\n  new_maintainability_rating = 'new_maintainability_rating',\n  new_major_violations = 'new_major_violations',\n  new_minor_violations = 'new_minor_violations',\n  new_reliability_rating = 'new_reliability_rating',\n  new_reliability_remediation_effort = 'new_reliability_remediation_effort',\n  new_security_hotspots = 'new_security_hotspots',\n  new_security_hotspots_reviewed = 'new_security_hotspots_reviewed',\n  new_security_rating = 'new_security_rating',\n  new_security_remediation_effort = 'new_security_remediation_effort',\n  new_security_review_rating = 'new_security_review_rating',\n  new_sqale_debt_ratio = 'new_sqale_debt_ratio',\n  new_technical_debt = 'new_technical_debt',\n  new_uncovered_conditions = 'new_uncovered_conditions',\n  new_uncovered_lines = 'new_uncovered_lines',\n  new_violations = 'new_violations',\n  new_vulnerabilities = 'new_vulnerabilities',\n  open_issues = 'open_issues',\n  projects = 'projects',\n  public_api = 'public_api',\n  public_documented_api_density = 'public_documented_api_density',\n  public_undocumented_api = 'public_undocumented_api',\n  quality_gate_details = 'quality_gate_details',\n  quality_profiles = 'quality_profiles',\n  releasability_effort = 'releasability_effort',\n  releasability_rating = 'releasability_rating',\n  reliability_rating = 'reliability_rating',\n  reliability_rating_effort = 'reliability_rating_effort',\n  reliability_remediation_effort = 'reliability_remediation_effort',\n  reopened_issues = 'reopened_issues',\n  security_hotspots = 'security_hotspots',\n  security_hotspots_reviewed = 'security_hotspots_reviewed',\n  security_rating = 'security_rating',\n  security_rating_effort = 'security_rating_effort',\n  security_remediation_effort = 'security_remediation_effort',\n  security_review_rating = 'security_review_rating',\n  security_review_rating_effort = 'security_review_rating_effort',\n  skipped_tests = 'skipped_tests',\n  sonarjava_feedback = 'sonarjava_feedback',\n  sqale_debt_ratio = 'sqale_debt_ratio',\n  sqale_index = 'sqale_index',\n  sqale_rating = 'sqale_rating',\n  statements = 'statements',\n  team_at_sonarsource = 'team_at_sonarsource',\n  team_size = 'team_size',\n  test_errors = 'test_errors',\n  test_execution_time = 'test_execution_time',\n  test_failures = 'test_failures',\n  test_success_density = 'test_success_density',\n  tests = 'tests',\n  uncovered_conditions = 'uncovered_conditions',\n  uncovered_lines = 'uncovered_lines',\n  violations = 'violations',\n  vulnerabilities = 'vulnerabilities',\n  wont_fix_issues = 'wont_fix_issues'\n}\n\nexport enum MetricType {\n  Rating = 'RATING',\n  Percent = 'PERCENT',\n  Integer = 'INT',\n  Level = 'LEVEL',\n  ShortInteger = 'SHORT_INT',\n  ShortWorkDuration = 'SHORT_WORK_DUR',\n  Data = 'DATA'\n}\n\nexport function isMetricKey(key: string): key is MetricKey {\n  return (Object.values(MetricKey) as string[]).includes(key);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getBreadcrumbs, getChildren, getComponent } from '../../api/components';\nimport { getBranchLikeQuery, isPullRequest } from '../../helpers/branch-like';\nimport { BranchLike } from '../../types/branch-like';\nimport { MetricKey } from '../../types/metrics';\nimport {\n  addComponent,\n  addComponentBreadcrumbs,\n  addComponentChildren,\n  getComponent as getComponentFromBucket,\n  getComponentBreadcrumbs,\n  getComponentChildren\n} from './bucket';\n\nconst METRICS = [\n  MetricKey.ncloc,\n  MetricKey.bugs,\n  MetricKey.vulnerabilities,\n  MetricKey.code_smells,\n  MetricKey.security_hotspots,\n  MetricKey.coverage,\n  MetricKey.duplicated_lines_density\n];\n\nconst APPLICATION_METRICS = [MetricKey.alert_status, ...METRICS];\n\nconst PORTFOLIO_METRICS = [\n  MetricKey.releasability_rating,\n  MetricKey.reliability_rating,\n  MetricKey.security_rating,\n  MetricKey.security_review_rating,\n  MetricKey.sqale_rating,\n  MetricKey.ncloc\n];\n\nconst LEAK_METRICS = [\n  MetricKey.new_lines,\n  MetricKey.bugs,\n  MetricKey.vulnerabilities,\n  MetricKey.code_smells,\n  MetricKey.security_hotspots,\n  MetricKey.new_coverage,\n  MetricKey.new_duplicated_lines_density\n];\n\nconst PAGE_SIZE = 100;\n\ninterface Children {\n  components: T.ComponentMeasure[];\n  page: number;\n  total: number;\n}\n\nfunction prepareChildren(r: any): Children {\n  return {\n    components: r.components,\n    total: r.paging.total,\n    page: r.paging.pageIndex\n  };\n}\n\nexport function showLeakMeasure(branchLike?: BranchLike) {\n  return isPullRequest(branchLike);\n}\n\nfunction skipRootDir(breadcrumbs: T.ComponentMeasure[]) {\n  return breadcrumbs.filter(component => {\n    return !(component.qualifier === 'DIR' && component.name === '/');\n  });\n}\n\nfunction storeChildrenBase(children: T.ComponentMeasure[]) {\n  children.forEach(addComponent);\n}\n\nfunction storeChildrenBreadcrumbs(parentComponentKey: string, children: T.Breadcrumb[]) {\n  const parentBreadcrumbs = getComponentBreadcrumbs(parentComponentKey);\n  if (parentBreadcrumbs) {\n    children.forEach(child => {\n      const breadcrumbs = [...parentBreadcrumbs, child];\n      addComponentBreadcrumbs(child.key, breadcrumbs);\n    });\n  }\n}\n\nexport function getCodeMetrics(\n  qualifier: string,\n  branchLike?: BranchLike,\n  options: { includeQGStatus?: boolean } = {}\n) {\n  if (['VW', 'SVW'].includes(qualifier)) {\n    const metrics = [...PORTFOLIO_METRICS];\n    return options.includeQGStatus ? metrics.concat(MetricKey.alert_status) : metrics;\n  }\n  if (qualifier === 'APP') {\n    return [...APPLICATION_METRICS];\n  }\n  if (showLeakMeasure(branchLike)) {\n    return [...LEAK_METRICS];\n  }\n  return [...METRICS];\n}\n\nfunction retrieveComponentBase(\n  componentKey: string,\n  qualifier: string,\n  instance: { mounted: boolean },\n  branchLike?: BranchLike\n) {\n  const existing = getComponentFromBucket(componentKey);\n  if (existing) {\n    return Promise.resolve(existing);\n  }\n\n  const metrics = getCodeMetrics(qualifier, branchLike);\n\n  return getComponent({\n    component: componentKey,\n    metricKeys: metrics.join(),\n    ...getBranchLikeQuery(branchLike)\n  }).then(({ component }) => {\n    if (instance.mounted) {\n      addComponent(component);\n    }\n    return component;\n  });\n}\n\nexport function retrieveComponentChildren(\n  componentKey: string,\n  qualifier: string,\n  instance: { mounted: boolean },\n  branchLike?: BranchLike\n): Promise<{ components: T.ComponentMeasure[]; page: number; total: number }> {\n  const existing = getComponentChildren(componentKey);\n  if (existing) {\n    return Promise.resolve({\n      components: existing.children,\n      total: existing.total,\n      page: existing.page\n    });\n  }\n\n  const metrics = getCodeMetrics(qualifier, branchLike, { includeQGStatus: true });\n\n  return getChildren(componentKey, metrics, {\n    ps: PAGE_SIZE,\n    s: 'qualifier,name',\n    ...getBranchLikeQuery(branchLike)\n  })\n    .then(prepareChildren)\n    .then(r => {\n      if (instance.mounted) {\n        addComponentChildren(componentKey, r.components, r.total, r.page);\n        storeChildrenBase(r.components);\n        storeChildrenBreadcrumbs(componentKey, r.components);\n      }\n      return r;\n    });\n}\n\nfunction retrieveComponentBreadcrumbs(\n  component: string,\n  instance: { mounted: boolean },\n  branchLike?: BranchLike\n): Promise<T.Breadcrumb[]> {\n  const existing = getComponentBreadcrumbs(component);\n  if (existing) {\n    return Promise.resolve(existing);\n  }\n\n  return getBreadcrumbs({ component, ...getBranchLikeQuery(branchLike) })\n    .then(skipRootDir)\n    .then(breadcrumbs => {\n      if (instance.mounted) {\n        addComponentBreadcrumbs(component, breadcrumbs);\n      }\n      return breadcrumbs;\n    });\n}\n\nexport function retrieveComponent(\n  componentKey: string,\n  qualifier: string,\n  instance: { mounted: boolean },\n  branchLike?: BranchLike\n): Promise<{\n  breadcrumbs: T.Breadcrumb[];\n  component: T.ComponentMeasure;\n  components: T.ComponentMeasure[];\n  page: number;\n  total: number;\n}> {\n  return Promise.all([\n    retrieveComponentBase(componentKey, qualifier, instance, branchLike),\n    retrieveComponentChildren(componentKey, qualifier, instance, branchLike),\n    retrieveComponentBreadcrumbs(componentKey, instance, branchLike)\n  ]).then(r => {\n    return {\n      breadcrumbs: r[2],\n      component: r[0],\n      components: r[1].components,\n      page: r[1].page,\n      total: r[1].total\n    };\n  });\n}\n\nexport function loadMoreChildren(\n  componentKey: string,\n  page: number,\n  qualifier: string,\n  instance: { mounted: boolean },\n  branchLike?: BranchLike\n): Promise<Children> {\n  const metrics = getCodeMetrics(qualifier, branchLike, { includeQGStatus: true });\n\n  return getChildren(componentKey, metrics, {\n    ps: PAGE_SIZE,\n    p: page,\n    s: 'qualifier,name',\n    ...getBranchLikeQuery(branchLike)\n  })\n    .then(prepareChildren)\n    .then(r => {\n      if (instance.mounted) {\n        addComponentChildren(componentKey, r.components, r.total, r.page);\n        storeChildrenBase(r.components);\n        storeChildrenBreadcrumbs(componentKey, r.components);\n      }\n      return r;\n    });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { colors } from '../../../app/theme';\nimport BranchIcon from '../../../components/icons/BranchIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\n\nexport function getTooltip(component: T.ComponentMeasure) {\n  const isFile = component.qualifier === 'FIL' || component.qualifier === 'UTS';\n\n  if (isFile && component.path) {\n    return component.path + '\\n\\n' + component.key;\n  }\n\n  return [component.name, component.key, component.branch].filter(s => !!s).join('\\n\\n');\n}\n\nexport function mostCommonPrefix(strings: string[]) {\n  const sortedStrings = strings.slice(0).sort();\n  const firstString = sortedStrings[0];\n  const firstStringLength = firstString.length;\n  const lastString = sortedStrings[sortedStrings.length - 1];\n  let i = 0;\n  while (i < firstStringLength && firstString.charAt(i) === lastString.charAt(i)) {\n    i++;\n  }\n  const prefix = firstString.substr(0, i);\n  const prefixTokens = prefix.split(/[\\s\\\\/]/);\n  const lastPrefixPart = prefixTokens[prefixTokens.length - 1];\n  return prefix.substr(0, prefix.length - lastPrefixPart.length);\n}\n\nexport interface Props {\n  branchLike?: BranchLike;\n  canBrowse?: boolean;\n  component: T.ComponentMeasure;\n  previous?: T.ComponentMeasure;\n  rootComponent: T.ComponentMeasure;\n}\n\nexport default function ComponentName({\n  branchLike,\n  component,\n  rootComponent,\n  previous,\n  canBrowse = false\n}: Props) {\n  const areBothDirs = component.qualifier === 'DIR' && previous && previous.qualifier === 'DIR';\n  const prefix =\n    areBothDirs && previous !== undefined\n      ? mostCommonPrefix([component.name + '/', previous.name + '/'])\n      : '';\n  const name = prefix ? (\n    <span>\n      <span style={{ color: colors.secondFontColor }}>{prefix}</span>\n      <span>{component.name.substr(prefix.length)}</span>\n    </span>\n  ) : (\n    component.name\n  );\n\n  let inner = null;\n\n  if (component.refKey && component.qualifier !== ComponentQualifier.SubPortfolio) {\n    const branch = [ComponentQualifier.Application, ComponentQualifier.Portfolio].includes(\n      rootComponent.qualifier as ComponentQualifier\n    )\n      ? component.branch\n      : undefined;\n    inner = (\n      <Link className=\"link-with-icon\" to={getProjectUrl(component.refKey, branch)}>\n        <QualifierIcon qualifier={component.qualifier} /> <span>{name}</span>\n      </Link>\n    );\n  } else if (canBrowse) {\n    const query = { id: rootComponent.key, ...getBranchLikeQuery(branchLike) };\n    if (component.key !== rootComponent.key) {\n      Object.assign(query, { selected: component.key });\n    }\n    inner = (\n      <Link className=\"link-with-icon\" to={{ pathname: '/code', query }}>\n        <QualifierIcon qualifier={component.qualifier} /> <span>{name}</span>\n      </Link>\n    );\n  } else {\n    inner = (\n      <span>\n        <QualifierIcon qualifier={component.qualifier} /> {name}\n      </span>\n    );\n  }\n\n  if (\n    [ComponentQualifier.Application, ComponentQualifier.Portfolio].includes(\n      rootComponent.qualifier as ComponentQualifier\n    ) &&\n    [ComponentQualifier.Application, ComponentQualifier.Project].includes(\n      component.qualifier as ComponentQualifier\n    )\n  ) {\n    return (\n      <span className=\"max-width-100 display-inline-flex-center\">\n        <span className=\"text-ellipsis\" title={getTooltip(component)}>\n          {inner}\n        </span>\n        {component.branch ? (\n          <span className=\"text-ellipsis spacer-left\">\n            <BranchIcon className=\"little-spacer-right\" />\n            <span className=\"note\">{component.branch}</span>\n          </span>\n        ) : (\n          <span className=\"spacer-left badge flex-1\">{translate('branches.main_branch')}</span>\n        )}\n      </span>\n    );\n  } else {\n    return (\n      <span\n        className=\"max-width-100 display-inline-block text-ellipsis\"\n        title={getTooltip(component)}>\n        {inner}\n      </span>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { BranchLike } from '../../../types/branch-like';\nimport ComponentName from './ComponentName';\n\ninterface Props {\n  branchLike?: BranchLike;\n  breadcrumbs: T.Breadcrumb[];\n  rootComponent: T.ComponentMeasure;\n}\n\nexport default function Breadcrumbs({ branchLike, breadcrumbs, rootComponent }: Props) {\n  return (\n    <ul className=\"code-breadcrumbs\">\n      {breadcrumbs.map((component, index) => (\n        <li key={component.key}>\n          <ComponentName\n            branchLike={branchLike}\n            canBrowse={index < breadcrumbs.length - 1}\n            component={component}\n            rootComponent={rootComponent}\n          />\n        </li>\n      ))}\n    </ul>\n  );\n}\n", "//     keymaster.js\n//     (c) 2011-2013 Thomas Fuchs\n//     keymaster.js may be freely distributed under the MIT license.\n\n;(function(global){\n  var k,\n    _handlers = {},\n    _mods = { 16: false, 18: false, 17: false, 91: false },\n    _scope = 'all',\n    // modifier keys\n    _MODIFIERS = {\n      '\u21E7': 16, shift: 16,\n      '\u2325': 18, alt: 18, option: 18,\n      '\u2303': 17, ctrl: 17, control: 17,\n      '\u2318': 91, command: 91\n    },\n    // special keys\n    _MAP = {\n      backspace: 8, tab: 9, clear: 12,\n      enter: 13, 'return': 13,\n      esc: 27, escape: 27, space: 32,\n      left: 37, up: 38,\n      right: 39, down: 40,\n      del: 46, 'delete': 46,\n      home: 36, end: 35,\n      pageup: 33, pagedown: 34,\n      ',': 188, '.': 190, '/': 191,\n      '`': 192, '-': 189, '=': 187,\n      ';': 186, '\\'': 222,\n      '[': 219, ']': 221, '\\\\': 220\n    },\n    code = function(x){\n      return _MAP[x] || x.toUpperCase().charCodeAt(0);\n    },\n    _downKeys = [];\n\n  for(k=1;k<20;k++) _MAP['f'+k] = 111+k;\n\n  // IE doesn't support Array#indexOf, so have a simple replacement\n  function index(array, item){\n    var i = array.length;\n    while(i--) if(array[i]===item) return i;\n    return -1;\n  }\n\n  // for comparing mods before unassignment\n  function compareArray(a1, a2) {\n    if (a1.length != a2.length) return false;\n    for (var i = 0; i < a1.length; i++) {\n        if (a1[i] !== a2[i]) return false;\n    }\n    return true;\n  }\n\n  var modifierMap = {\n      16:'shiftKey',\n      18:'altKey',\n      17:'ctrlKey',\n      91:'metaKey'\n  };\n  function updateModifierKey(event) {\n      for(k in _mods) _mods[k] = event[modifierMap[k]];\n  };\n\n  // handle keydown event\n  function dispatch(event) {\n    var key, handler, k, i, modifiersMatch, scope;\n    key = event.keyCode;\n\n    if (index(_downKeys, key) == -1) {\n        _downKeys.push(key);\n    }\n\n    // if a modifier key, set the key.<modifierkeyname> property to true and return\n    if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko\n    if(key in _mods) {\n      _mods[key] = true;\n      // 'assignKey' from inside this closure is exported to window.key\n      for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;\n      return;\n    }\n    updateModifierKey(event);\n\n    // see if we need to ignore the keypress (filter() can can be overridden)\n    // by default ignore key presses if a select, textarea, or input is focused\n    if(!assignKey.filter.call(this, event)) return;\n\n    // abort if no potentially matching shortcuts found\n    if (!(key in _handlers)) return;\n\n    scope = getScope();\n\n    // for each potential shortcut\n    for (i = 0; i < _handlers[key].length; i++) {\n      handler = _handlers[key][i];\n\n      // see if it's in the current scope\n      if(handler.scope == scope || handler.scope == 'all'){\n        // check if modifiers match if any\n        modifiersMatch = handler.mods.length > 0;\n        for(k in _mods)\n          if((!_mods[k] && index(handler.mods, +k) > -1) ||\n            (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;\n        // call the handler and stop the event if neccessary\n        if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){\n          if(handler.method(event, handler)===false){\n            if(event.preventDefault) event.preventDefault();\n              else event.returnValue = false;\n            if(event.stopPropagation) event.stopPropagation();\n            if(event.cancelBubble) event.cancelBubble = true;\n          }\n        }\n      }\n    }\n  };\n\n  // unset modifier keys on keyup\n  function clearModifier(event){\n    var key = event.keyCode, k,\n        i = index(_downKeys, key);\n\n    // remove key from _downKeys\n    if (i >= 0) {\n        _downKeys.splice(i, 1);\n    }\n\n    if(key == 93 || key == 224) key = 91;\n    if(key in _mods) {\n      _mods[key] = false;\n      for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = false;\n    }\n  };\n\n  function resetModifiers() {\n    for(k in _mods) _mods[k] = false;\n    for(k in _MODIFIERS) assignKey[k] = false;\n  };\n\n  // parse and assign shortcut\n  function assignKey(key, scope, method){\n    var keys, mods;\n    keys = getKeys(key);\n    if (method === undefined) {\n      method = scope;\n      scope = 'all';\n    }\n\n    // for each shortcut\n    for (var i = 0; i < keys.length; i++) {\n      // set modifier keys if any\n      mods = [];\n      key = keys[i].split('+');\n      if (key.length > 1){\n        mods = getMods(key);\n        key = [key[key.length-1]];\n      }\n      // convert to keycode and...\n      key = key[0]\n      key = code(key);\n      // ...store handler\n      if (!(key in _handlers)) _handlers[key] = [];\n      _handlers[key].push({ shortcut: keys[i], scope: scope, method: method, key: keys[i], mods: mods });\n    }\n  };\n\n  // unbind all handlers for given key in current scope\n  function unbindKey(key, scope) {\n    var multipleKeys, keys,\n      mods = [],\n      i, j, obj;\n\n    multipleKeys = getKeys(key);\n\n    for (j = 0; j < multipleKeys.length; j++) {\n      keys = multipleKeys[j].split('+');\n\n      if (keys.length > 1) {\n        mods = getMods(keys);\n        key = keys[keys.length - 1];\n      }\n\n      key = code(key);\n\n      if (scope === undefined) {\n        scope = getScope();\n      }\n      if (!_handlers[key]) {\n        return;\n      }\n      for (i = 0; i < _handlers[key].length; i++) {\n        obj = _handlers[key][i];\n        // only clear handlers if correct scope and mods match\n        if (obj.scope === scope && compareArray(obj.mods, mods)) {\n          _handlers[key][i] = {};\n        }\n      }\n    }\n  };\n\n  // Returns true if the key with code 'keyCode' is currently down\n  // Converts strings into key codes.\n  function isPressed(keyCode) {\n      if (typeof(keyCode)=='string') {\n        keyCode = code(keyCode);\n      }\n      return index(_downKeys, keyCode) != -1;\n  }\n\n  function getPressedKeyCodes() {\n      return _downKeys.slice(0);\n  }\n\n  function filter(event){\n    var tagName = (event.target || event.srcElement).tagName;\n    // ignore keypressed in any elements that support keyboard data input\n    return !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');\n  }\n\n  // initialize key.<modifier> to false\n  for(k in _MODIFIERS) assignKey[k] = false;\n\n  // set current scope (default 'all')\n  function setScope(scope){ _scope = scope || 'all' };\n  function getScope(){ return _scope || 'all' };\n\n  // delete all handlers for a given scope\n  function deleteScope(scope){\n    var key, handlers, i;\n\n    for (key in _handlers) {\n      handlers = _handlers[key];\n      for (i = 0; i < handlers.length; ) {\n        if (handlers[i].scope === scope) handlers.splice(i, 1);\n        else i++;\n      }\n    }\n  };\n\n  // abstract key logic for assign and unassign\n  function getKeys(key) {\n    var keys;\n    key = key.replace(/\\s/g, '');\n    keys = key.split(',');\n    if ((keys[keys.length - 1]) == '') {\n      keys[keys.length - 2] += ',';\n    }\n    return keys;\n  }\n\n  // abstract mods logic for assign and unassign\n  function getMods(key) {\n    var mods = key.slice(0, key.length - 1);\n    for (var mi = 0; mi < mods.length; mi++)\n    mods[mi] = _MODIFIERS[mods[mi]];\n    return mods;\n  }\n\n  // cross-browser events\n  function addEvent(object, event, method) {\n    if (object.addEventListener)\n      object.addEventListener(event, method, false);\n    else if(object.attachEvent)\n      object.attachEvent('on'+event, function(){ method(window.event) });\n  };\n\n  // set the handlers globally on document\n  addEvent(document, 'keydown', function(event) { dispatch(event) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48\n  addEvent(document, 'keyup', clearModifier);\n\n  // reset modifiers to false whenever the window is (re)focused.\n  addEvent(window, 'focus', resetModifiers);\n\n  // store previously defined key\n  var previousKey = global.key;\n\n  // restore previously defined key and return reference to our key object\n  function noConflict() {\n    var k = global.key;\n    global.key = previousKey;\n    return k;\n  }\n\n  // set window.key and window.key.set/get/deleteScope, and the default filter\n  global.key = assignKey;\n  global.key.setScope = setScope;\n  global.key.getScope = getScope;\n  global.key.deleteScope = deleteScope;\n  global.key.filter = filter;\n  global.key.isPressed = isPressed;\n  global.key.getPressedKeyCodes = getPressedKeyCodes;\n  global.key.noConflict = noConflict;\n  global.key.unbind = unbindKey;\n\n  if(typeof module !== 'undefined') module.exports = assignKey;\n\n})(this);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport { ComponentQualifier } from '../../types/component';\n\nexport interface Props {\n  componentQualifier?: string;\n  current?: number;\n  showShortcuts?: boolean;\n  total?: number;\n}\n\nexport default function PageActions(props: Props) {\n  const { componentQualifier, current, showShortcuts, total = 0 } = props;\n\n  return (\n    <div className=\"page-actions display-flex-center\">\n      {showShortcuts && (\n        <span className=\"note nowrap\">\n          <span className=\"big-spacer-right\">\n            <span className=\"shortcut-button little-spacer-right\">\u2191</span>\n            <span className=\"shortcut-button little-spacer-right\">\u2193</span>\n            {translate('component_measures.to_select_files')}\n          </span>\n\n          <span>\n            <span className=\"shortcut-button little-spacer-right\">\u2190</span>\n            <span className=\"shortcut-button little-spacer-right\">\u2192</span>\n            {translate('component_measures.to_navigate')}\n          </span>\n        </span>\n      )}\n      {total > 0 && componentQualifier === ComponentQualifier.Project && (\n        <div className=\"nowrap\">\n          <span className=\"big-spacer-left\">\n            <strong>\n              {current !== undefined && (\n                <span>\n                  {formatMeasure(current, 'INT')}\n                  {' / '}\n                </span>\n              )}\n              {formatMeasure(total, 'INT')}\n            </strong>{' '}\n            {translate('component_measures.files')}\n          </span>\n        </div>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nexport function getComponentMeasureUniqueKey(\n  component?: T.ComponentMeasure | T.ComponentMeasureEnhanced\n) {\n  return component ? [component.key, component.branch].filter(s => !!s).join('/') : undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport key from 'keymaster';\nimport * as React from 'react';\nimport PageActions from '../../components/ui/PageActions';\nimport { getComponentMeasureUniqueKey } from '../../helpers/component';\nimport { getWrappedDisplayName } from './utils';\n\nexport interface WithKeyboardNavigationProps {\n  components?: T.ComponentMeasure[];\n  cycle?: boolean;\n  isFile?: boolean;\n  onEndOfList?: () => void;\n  onGoToParent?: () => void;\n  onHighlight?: (item: T.ComponentMeasure) => void;\n  onSelect?: (item: T.ComponentMeasure) => void;\n  selected?: T.ComponentMeasure;\n}\n\nconst KEY_SCOPE = 'key_nav';\n\nexport default function withKeyboardNavigation<P>(\n  WrappedComponent: React.ComponentClass<P & Partial<WithKeyboardNavigationProps>>\n) {\n  return class Wrapper extends React.Component<P & WithKeyboardNavigationProps> {\n    static displayName = getWrappedDisplayName(WrappedComponent, 'withKeyboardNavigation');\n\n    componentDidMount() {\n      this.attachShortcuts();\n    }\n\n    componentWillUnmount() {\n      this.detachShortcuts();\n    }\n\n    attachShortcuts = () => {\n      key.setScope(KEY_SCOPE);\n      key('up', KEY_SCOPE, () => {\n        return this.skipIfFile(this.handleHighlightPrevious);\n      });\n      key('down', KEY_SCOPE, () => {\n        return this.skipIfFile(this.handleHighlightNext);\n      });\n      key('right,enter', KEY_SCOPE, () => {\n        return this.skipIfFile(this.handleSelectCurrent);\n      });\n      key('left', KEY_SCOPE, () => {\n        this.handleSelectParent();\n        return false; // always hijack left\n      });\n    };\n\n    detachShortcuts = () => {\n      key.deleteScope(KEY_SCOPE);\n    };\n\n    getCurrentIndex = () => {\n      const { selected, components = [] } = this.props;\n      return selected\n        ? components.findIndex(\n            component =>\n              getComponentMeasureUniqueKey(component) === getComponentMeasureUniqueKey(selected)\n          )\n        : -1;\n    };\n\n    skipIfFile = (handler: () => void) => {\n      if (this.props.isFile) {\n        return true;\n      } else {\n        handler();\n        return false;\n      }\n    };\n\n    handleHighlightNext = () => {\n      if (this.props.onHighlight === undefined) {\n        return;\n      }\n\n      const { components = [], cycle } = this.props;\n      const index = this.getCurrentIndex();\n      const first = cycle ? 0 : index;\n\n      this.props.onHighlight(\n        index < components.length - 1 ? components[index + 1] : components[first]\n      );\n\n      if (index + 1 === components.length - 1 && this.props.onEndOfList) {\n        this.props.onEndOfList();\n      }\n    };\n\n    handleHighlightPrevious = () => {\n      if (this.props.onHighlight === undefined) {\n        return;\n      }\n      const { components = [], cycle } = this.props;\n      const index = this.getCurrentIndex();\n      const last = cycle ? components.length - 1 : index;\n\n      this.props.onHighlight(index > 0 ? components[index - 1] : components[last]);\n    };\n\n    handleSelectCurrent = () => {\n      if (this.props.onSelect === undefined) {\n        return;\n      }\n\n      const { selected } = this.props;\n      if (selected !== undefined) {\n        this.props.onSelect(selected as T.ComponentMeasure);\n      }\n    };\n\n    handleSelectNext = () => {\n      if (this.props.onSelect === undefined) {\n        return;\n      }\n\n      const { components = [] } = this.props;\n      const index = this.getCurrentIndex();\n\n      if (index !== -1 && index < components.length - 1) {\n        this.props.onSelect(components[index + 1]);\n      }\n    };\n\n    handleSelectParent = () => {\n      if (this.props.onGoToParent !== undefined) {\n        this.props.onGoToParent();\n      }\n    };\n\n    handleSelectPrevious = () => {\n      if (this.props.onSelect === undefined) {\n        return;\n      }\n\n      const { components = [] } = this.props;\n      const index = this.getCurrentIndex();\n\n      if (components.length && index > 0) {\n        this.props.onSelect(components[index - 1]);\n      }\n    };\n\n    render() {\n      return (\n        <>\n          <PageActions showShortcuts={!this.props.isFile} />\n\n          <WrappedComponent {...this.props} />\n        </>\n      );\n    }\n  };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport { getWrappedDisplayName } from './utils';\n\nexport interface WithScrollToProps {\n  selected?: boolean;\n}\n\nconst TOP_OFFSET = 200;\nconst BOTTOM_OFFSET = 10;\n\nexport function withScrollTo<P>(WrappedComponent: React.ComponentClass<P>) {\n  return class Wrapper extends React.Component<P & Partial<WithScrollToProps>> {\n    componentRef?: React.Component | null;\n    node?: Element | Text | null;\n\n    static displayName = getWrappedDisplayName(WrappedComponent, 'withScrollTo');\n\n    componentDidMount() {\n      if (this.componentRef) {\n        // eslint-disable-next-line react/no-find-dom-node\n        this.node = findDOMNode(this.componentRef);\n        this.handleUpdate();\n      }\n    }\n\n    componentDidUpdate() {\n      this.handleUpdate();\n    }\n\n    handleUpdate() {\n      const { selected } = this.props;\n\n      if (selected) {\n        setTimeout(() => {\n          this.handleScroll();\n        }, 0);\n      }\n    }\n\n    handleScroll() {\n      if (this.node && this.node instanceof Element) {\n        const position = this.node.getBoundingClientRect();\n        const { top, bottom } = position;\n        if (bottom > window.innerHeight - BOTTOM_OFFSET) {\n          window.scrollTo(0, bottom - window.innerHeight + window.pageYOffset + BOTTOM_OFFSET);\n        } else if (top < TOP_OFFSET) {\n          window.scrollTo(0, top + window.pageYOffset - TOP_OFFSET);\n        }\n      }\n    }\n\n    render() {\n      return (\n        <WrappedComponent\n          {...this.props}\n          ref={ref => {\n            this.componentRef = ref;\n          }}\n        />\n      );\n    }\n  };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { createContext } from 'react';\nimport { BranchLike } from '../../types/branch-like';\n\nexport interface ComponentDescriptor {\n  branchLike: BranchLike | undefined;\n  key: string;\n  line?: number;\n  name?: string;\n  qualifier?: string;\n}\n\nexport interface RuleDescriptor {\n  key: string;\n  name?: string;\n}\n\nexport interface WorkspaceContextShape {\n  externalRulesRepoNames: T.Dict<string>;\n  openComponent: (component: ComponentDescriptor) => void;\n  openRule: (rule: RuleDescriptor) => void;\n}\n\nexport const WorkspaceContext = createContext<WorkspaceContextShape>({\n  externalRulesRepoNames: {},\n  openComponent: () => {},\n  openRule: () => {}\n});\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport './Rating.css';\n\ninterface Props extends React.AriaAttributes {\n  className?: string;\n  muted?: boolean;\n  small?: boolean;\n  value: string | number | undefined;\n}\n\nexport default function Rating({\n  className,\n  muted = false,\n  small = false,\n  value,\n  ...ariaAttrs\n}: Props) {\n  if (value === undefined) {\n    return (\n      <span aria-label={translate('metric.no_rating')} {...ariaAttrs}>\n        \u2013\n      </span>\n    );\n  }\n  const formatted = formatMeasure(value, 'RATING');\n  return (\n    <span\n      aria-label={translateWithParameters('metric.has_rating_X', formatted)}\n      className={classNames(\n        'rating',\n        `rating-${formatted}`,\n        { 'rating-small': small, 'rating-muted': muted },\n        className\n      )}\n      {...ariaAttrs}>\n      {formatted}\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getRatingTooltip as nextGetRatingTooltip, isDiffMetric } from '../../helpers/measures';\n\nconst KNOWN_RATINGS = [\n  'sqale_rating',\n  'maintainability_rating', // Needed to provide the label for \"new_maintainability_rating\"\n  'reliability_rating',\n  'security_rating',\n  'security_review_rating'\n];\n\nexport function enhanceMeasure(measure: T.Measure, metrics: T.Dict<T.Metric>): T.MeasureEnhanced {\n  return {\n    ...measure,\n    metric: metrics[measure.metric],\n    leak: getLeakValue(measure)\n  };\n}\n\nexport function getLeakValue(measure: T.MeasureIntern | undefined): string | undefined {\n  return measure?.period?.value;\n}\n\nexport function getRatingTooltip(metricKey: string, value: number): string | undefined {\n  const finalMetricKey = isDiffMetric(metricKey) ? metricKey.substr(4) : metricKey;\n  if (KNOWN_RATINGS.includes(finalMetricKey)) {\n    return nextGetRatingTooltip(finalMetricKey, value);\n  }\n  return undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../components/controls/Tooltip';\nimport Level from '../../components/ui/Level';\nimport Rating from '../../components/ui/Rating';\nimport { formatMeasure } from '../../helpers/measures';\nimport { getRatingTooltip } from './utils';\n\ninterface Props {\n  className?: string;\n  decimals?: number | null;\n  metricKey: string;\n  metricType: string;\n  small?: boolean;\n  value: string | undefined;\n}\n\nexport default function Measure({\n  className,\n  decimals,\n  metricKey,\n  metricType,\n  small,\n  value\n}: Props) {\n  if (value === undefined) {\n    return <span className={className}>\u2013</span>;\n  }\n\n  if (metricType === 'LEVEL') {\n    return <Level className={className} level={value} small={small} />;\n  }\n\n  if (metricType !== 'RATING') {\n    const formattedValue = formatMeasure(value, metricType, {\n      decimals,\n      omitExtraDecimalZeros: metricType === 'PERCENT'\n    });\n    return <span className={className}>{formattedValue != null ? formattedValue : '\u2013'}</span>;\n  }\n\n  const tooltip = getRatingTooltip(metricKey, Number(value));\n  const rating = <Rating small={small} value={value} />;\n  if (tooltip) {\n    return (\n      <Tooltip overlay={tooltip}>\n        <span className={className}>{rating}</span>\n      </Tooltip>\n    );\n  }\n  return rating;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Measure from '../../../components/measure/Measure';\nimport { getLeakValue } from '../../../components/measure/utils';\nimport { isDiffMetric } from '../../../helpers/measures';\n\ninterface Props {\n  component: T.ComponentMeasure;\n  metric: T.Metric;\n}\n\nexport default class ComponentMeasure extends React.PureComponent<Props> {\n  render() {\n    const { component, metric } = this.props;\n    const isProject = component.qualifier === 'TRK';\n    const isReleasability = metric.key === 'releasability_rating';\n\n    const finalMetricKey = isProject && isReleasability ? 'alert_status' : metric.key;\n    const finalMetricType = isProject && isReleasability ? 'LEVEL' : metric.type;\n\n    const measure =\n      Array.isArray(component.measures) &&\n      component.measures.find(measure => measure.metric === finalMetricKey);\n\n    if (!measure) {\n      return measure === false ? <span /> : <span>\u2014</span>;\n    }\n\n    const value = isDiffMetric(metric.key) ? getLeakValue(measure) : measure.value;\n    return <Measure metricKey={finalMetricKey} metricType={finalMetricType} value={value} />;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function PinIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M7.25 7.25v-3.5a.243.243 0 0 0-.07-.18A.243.243 0 0 0 7 3.5a.243.243 0 0 0-.18.07.243.243 0 0 0-.07.18v3.5c0 .073.023.133.07.18.047.047.107.07.18.07a.243.243 0 0 0 .18-.07.243.243 0 0 0 .07-.18zM12.5 10a.482.482 0 0 1-.148.352.482.482 0 0 1-.352.148H8.648l-.398 3.773a.29.29 0 0 1-.082.161.219.219 0 0 1-.16.066H8c-.141 0-.224-.07-.25-.211L7.156 10.5H4a.482.482 0 0 1-.352-.148A.482.482 0 0 1 3.5 10c0-.641.204-1.217.613-1.73.409-.513.871-.77 1.387-.77v-4a.96.96 0 0 1-.703-.297A.96.96 0 0 1 4.5 2.5a.96.96 0 0 1 .297-.703A.96.96 0 0 1 5.5 1.5h5a.96.96 0 0 1 .703.297.96.96 0 0 1 .297.703.96.96 0 0 1-.297.703.96.96 0 0 1-.703.297v4c.516 0 .978.257 1.387.77.409.513.613 1.089.613 1.73z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport PinIcon from '../../../components/icons/PinIcon';\nimport { WorkspaceContextShape } from '../../../components/workspace/context';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.ComponentMeasure;\n  openComponent: WorkspaceContextShape['openComponent'];\n}\n\nexport default class ComponentPin extends React.PureComponent<Props> {\n  handleClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.props.openComponent({\n      branchLike: this.props.branchLike,\n      key: this.props.component.key,\n      name: this.props.component.path,\n      qualifier: this.props.component.qualifier\n    });\n  };\n\n  render() {\n    return (\n      <a\n        className=\"link-no-underline\"\n        href=\"#\"\n        onClick={this.handleClick}\n        title={translate('component_viewer.open_in_workspace')}>\n        <PinIcon />\n      </a>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { withScrollTo } from '../../../components/hoc/withScrollTo';\nimport { WorkspaceContext } from '../../../components/workspace/context';\nimport { BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport { MetricType } from '../../../types/metrics';\nimport ComponentMeasure from './ComponentMeasure';\nimport ComponentName from './ComponentName';\nimport ComponentPin from './ComponentPin';\n\ninterface Props {\n  branchLike?: BranchLike;\n  canBePinned?: boolean;\n  canBrowse?: boolean;\n  component: T.ComponentMeasure;\n  hasBaseComponent: boolean;\n  metrics: T.Metric[];\n  previous?: T.ComponentMeasure;\n  rootComponent: T.ComponentMeasure;\n  selected?: boolean;\n}\n\nexport class Component extends React.PureComponent<Props> {\n  render() {\n    const {\n      branchLike,\n      canBePinned = true,\n      canBrowse = false,\n      component,\n      hasBaseComponent,\n      metrics,\n      previous,\n      rootComponent,\n      selected = false\n    } = this.props;\n\n    const isFile =\n      component.qualifier === ComponentQualifier.File ||\n      component.qualifier === ComponentQualifier.TestFile;\n\n    return (\n      <tr className={classNames({ selected })}>\n        <td className=\"blank\" />\n        {canBePinned && (\n          <td className=\"thin nowrap\">\n            {isFile && (\n              <span className=\"spacer-right\">\n                <WorkspaceContext.Consumer>\n                  {({ openComponent }) => (\n                    <ComponentPin\n                      branchLike={branchLike}\n                      component={component}\n                      openComponent={openComponent}\n                    />\n                  )}\n                </WorkspaceContext.Consumer>\n              </span>\n            )}\n          </td>\n        )}\n        <td className=\"code-name-cell\">\n          <div className=\"display-flex-center\">\n            {hasBaseComponent && <div className=\"code-child-component-icon\" />}\n            <ComponentName\n              branchLike={branchLike}\n              canBrowse={canBrowse}\n              component={component}\n              previous={previous}\n              rootComponent={rootComponent}\n            />\n          </div>\n        </td>\n\n        {metrics.map(metric => (\n          <td\n            className={classNames('thin', {\n              'text-center': metric.type === MetricType.Rating,\n              'nowrap text-right': metric.type !== MetricType.Rating\n            })}\n            key={metric.key}>\n            <div\n              className={classNames({\n                'code-components-rating-cell': metric.type === MetricType.Rating,\n                'code-components-cell': metric.type !== MetricType.Rating\n              })}>\n              <ComponentMeasure component={component} metric={metric} />\n            </div>\n          </td>\n        ))}\n        <td className=\"blank\" />\n      </tr>\n    );\n  }\n}\n\nexport default withScrollTo(Component);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  canBePinned?: boolean;\n}\n\nexport default function ComponentsEmpty({ canBePinned = true }: Props) {\n  return (\n    <tr>\n      {canBePinned && <td />}\n      <td className=\"note\" colSpan={2}>\n        {translate('no_results')}\n      </td>\n      <td colSpan={10} />\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  baseComponent?: T.ComponentMeasure;\n  canBePinned?: boolean;\n  metrics: string[];\n  rootComponent: T.ComponentMeasure;\n}\n\nconst SHORT_NAME_METRICS = [\n  'duplicated_lines_density',\n  'new_lines',\n  'new_coverage',\n  'new_duplicated_lines_density'\n];\n\nexport default function ComponentsHeader({\n  baseComponent,\n  canBePinned = true,\n  metrics,\n  rootComponent\n}: Props) {\n  const isPortfolio = ['VW', 'SVW'].includes(rootComponent.qualifier);\n  let columns: string[] = [];\n  if (isPortfolio) {\n    columns = [\n      translate('metric_domain.Releasability'),\n      translate('metric_domain.Reliability'),\n      translate('portfolio.metric_domain.vulnerabilities'),\n      translate('portfolio.metric_domain.security_hotspots'),\n      translate('metric_domain.Maintainability'),\n      translate('metric', 'ncloc', 'name')\n    ];\n  } else {\n    columns = metrics.map(metric =>\n      translate('metric', metric, SHORT_NAME_METRICS.includes(metric) ? 'short_name' : 'name')\n    );\n  }\n\n  return (\n    <thead>\n      <tr className=\"code-components-header\">\n        <th className=\"thin nowrap\" colSpan={canBePinned ? 2 : 1} />\n        <th />\n        {baseComponent &&\n          columns.map((column, index) => (\n            <th\n              className={classNames('thin', {\n                'code-components-cell': !isPortfolio && index > 0,\n                nowrap: !isPortfolio,\n                'text-center': isPortfolio && index < columns.length - 1,\n                'text-right': !isPortfolio || index === columns.length - 1\n              })}\n              key={column}>\n              {column}\n            </th>\n          ))}\n        <th />\n      </tr>\n    </thead>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { intersection, sortBy } from 'lodash';\nimport * as React from 'react';\nimport withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation';\nimport { getComponentMeasureUniqueKey } from '../../../helpers/component';\nimport { BranchLike } from '../../../types/branch-like';\nimport { getCodeMetrics } from '../utils';\nimport Component from './Component';\nimport ComponentsEmpty from './ComponentsEmpty';\nimport ComponentsHeader from './ComponentsHeader';\n\ninterface Props {\n  baseComponent?: T.ComponentMeasure;\n  branchLike?: BranchLike;\n  components: T.ComponentMeasure[];\n  metrics: T.Dict<T.Metric>;\n  rootComponent: T.ComponentMeasure;\n  selected?: T.ComponentMeasure;\n}\n\nconst BASE_COLUMN_COUNT = 4;\n\nexport class Components extends React.PureComponent<Props> {\n  render() {\n    const { baseComponent, branchLike, components, rootComponent, selected } = this.props;\n    const metricKeys = intersection(\n      getCodeMetrics(rootComponent.qualifier, branchLike),\n      Object.keys(this.props.metrics)\n    );\n    const metrics = metricKeys.map(metric => this.props.metrics[metric]);\n    const colSpan = metrics.length + BASE_COLUMN_COUNT;\n    const canBePinned = baseComponent && !['APP', 'VW', 'SVW'].includes(baseComponent.qualifier);\n\n    return (\n      <table className=\"data boxed-padding zebra\">\n        {baseComponent && (\n          <ComponentsHeader\n            baseComponent={baseComponent}\n            canBePinned={canBePinned}\n            metrics={metricKeys}\n            rootComponent={rootComponent}\n          />\n        )}\n        <tbody>\n          {baseComponent && (\n            <>\n              <Component\n                branchLike={branchLike}\n                canBePinned={canBePinned}\n                component={baseComponent}\n                hasBaseComponent={false}\n                key={baseComponent.key}\n                metrics={metrics}\n                rootComponent={rootComponent}\n              />\n              <tr className=\"blank\">\n                <td colSpan={3}>\n                  <hr className=\"null-spacer-top\" />\n                </td>\n                <td colSpan={colSpan}>\n                  <hr className=\"null-spacer-top\" />\n                </td>\n              </tr>\n            </>\n          )}\n\n          {components.length ? (\n            sortBy(\n              components,\n              c => c.qualifier,\n              c => c.name.toLowerCase(),\n              c => c.branch?.toLowerCase()\n            ).map((component, index, list) => (\n              <Component\n                branchLike={branchLike}\n                canBePinned={canBePinned}\n                canBrowse={true}\n                component={component}\n                hasBaseComponent={baseComponent !== undefined}\n                key={getComponentMeasureUniqueKey(component)}\n                metrics={metrics}\n                previous={index > 0 ? list[index - 1] : undefined}\n                rootComponent={rootComponent}\n                selected={\n                  selected &&\n                  getComponentMeasureUniqueKey(component) === getComponentMeasureUniqueKey(selected)\n                }\n              />\n            ))\n          ) : (\n            <ComponentsEmpty canBePinned={canBePinned} />\n          )}\n\n          <tr className=\"blank\">\n            <td colSpan={3} />\n            <td colSpan={colSpan} />\n          </tr>\n        </tbody>\n      </table>\n    );\n  }\n}\n\nexport default withKeyboardNavigation(Components);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { withRouter as originalWithRouter, WithRouterProps } from 'react-router';\n\nexport type Location = WithRouterProps['location'];\nexport type Router = WithRouterProps['router'];\n\ninterface InjectedProps {\n  location?: Partial<Location>;\n  router?: Partial<Router>;\n}\n\nexport function withRouter<P extends InjectedProps>(\n  WrappedComponent: React.ComponentType<P & InjectedProps>\n): React.ComponentType<T.Omit<P, keyof InjectedProps>> {\n  return originalWithRouter(WrappedComponent as any);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit } from 'lodash';\nimport * as React from 'react';\nimport { getTree } from '../../../api/components';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { Location, Router, withRouter } from '../../../components/hoc/withRouter';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.ComponentMeasure;\n  location: Location;\n  onSearchClear: () => void;\n  onSearchResults: (results?: T.ComponentMeasure[]) => void;\n  router: Router;\n}\n\ninterface State {\n  query: string;\n  loading: boolean;\n}\n\nexport class Search extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    query: '',\n    loading: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    if (this.props.location.query.search) {\n      this.handleQueryChange(this.props.location.query.search);\n    }\n  }\n\n  componentDidUpdate(nextProps: Props) {\n    // if the component has change, reset the current state\n    if (nextProps.location.query.id !== this.props.location.query.id) {\n      this.setState({\n        query: '',\n        loading: false\n      });\n      this.props.onSearchClear();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n    switch (event.keyCode) {\n      case 13:\n      case 38:\n      case 40:\n        event.preventDefault();\n        event.currentTarget.blur();\n        break;\n    }\n  };\n\n  handleSearch = (query: string) => {\n    if (this.mounted) {\n      const { branchLike, component, router, location } = this.props;\n      this.setState({ loading: true });\n      router.replace({ pathname: location.pathname, query: { ...location.query, search: query } });\n\n      const isPortfolio = ['VW', 'SVW', 'APP'].includes(component.qualifier);\n      const qualifiers = isPortfolio ? 'SVW,TRK' : 'BRC,UTS,FIL';\n\n      getTree({\n        component: component.key,\n        q: query,\n        s: 'qualifier,name',\n        qualifiers,\n        ...getBranchLikeQuery(branchLike)\n      })\n        .then(r => {\n          if (this.mounted) {\n            this.setState({\n              loading: false\n            });\n            this.props.onSearchResults(r.components);\n          }\n        })\n        .catch(() => {\n          if (this.mounted) {\n            this.setState({ loading: false });\n          }\n        });\n    }\n  };\n\n  handleQueryChange = (query: string) => {\n    const { router, location } = this.props;\n    this.setState({ query });\n    if (query.length === 0) {\n      router.replace({ pathname: location.pathname, query: omit(location.query, 'search') });\n      this.props.onSearchClear();\n    } else {\n      this.handleSearch(query);\n    }\n  };\n\n  render() {\n    const { component } = this.props;\n    const { loading } = this.state;\n    const isPortfolio = ['VW', 'SVW', 'APP'].includes(component.qualifier);\n\n    return (\n      <div className=\"code-search\" id=\"code-search\">\n        <SearchBox\n          minLength={3}\n          onChange={this.handleQueryChange}\n          onKeyDown={this.handleKeyDown}\n          placeholder={translate(\n            isPortfolio ? 'code.search_placeholder.portfolio' : 'code.search_placeholder'\n          )}\n          value={this.state.query}\n        />\n        <DeferredSpinner className=\"spacer-left\" loading={loading} />\n      </div>\n    );\n  }\n}\n\nexport default withRouter(Search);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { Alert } from '../../../components/ui/Alert';\nimport { isPullRequest } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { collapsedDirFromPath, fileFromPath } from '../../../helpers/path';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport { WorkspaceContextShape } from '../../workspace/context';\n\ninterface Props {\n  blocks: T.DuplicationBlock[];\n  branchLike: BranchLike | undefined;\n  duplicatedFiles?: T.Dict<T.DuplicatedFile>;\n  inRemovedComponent: boolean;\n  openComponent: WorkspaceContextShape['openComponent'];\n  sourceViewerFile: T.SourceViewerFile;\n}\n\nexport default class DuplicationPopup extends React.PureComponent<Props> {\n  shouldLink() {\n    const { branchLike } = this.props;\n    return !isPullRequest(branchLike);\n  }\n\n  isDifferentComponent = (\n    a: { project: string; subProject?: string },\n    b: { project: string; subProject?: string }\n  ) => {\n    return Boolean(a && b && (a.project !== b.project || a.subProject !== b.subProject));\n  };\n\n  handleFileClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    const { key, line } = event.currentTarget.dataset;\n    if (this.shouldLink() && key) {\n      this.props.openComponent({\n        branchLike: this.props.branchLike,\n        key,\n        line: line ? Number(line) : undefined\n      });\n    }\n  };\n\n  renderDuplication(file: T.DuplicatedFile, children: React.ReactNode, line?: number) {\n    return this.shouldLink() ? (\n      <a\n        data-key={file.key}\n        data-line={line}\n        href=\"#\"\n        onClick={this.handleFileClick}\n        title={file.name}>\n        {children}\n      </a>\n    ) : (\n      children\n    );\n  }\n\n  render() {\n    const { duplicatedFiles = {}, sourceViewerFile } = this.props;\n\n    const groupedBlocks = groupBy(this.props.blocks, '_ref');\n    let duplications = Object.keys(groupedBlocks).map(fileRef => {\n      return {\n        blocks: groupedBlocks[fileRef],\n        file: duplicatedFiles[fileRef]\n      };\n    });\n\n    // first duplications in the same file\n    // then duplications in the same sub-project\n    // then duplications in the same project\n    // then duplications in other projects\n    duplications = sortBy(\n      duplications,\n      d => d.file.projectName !== sourceViewerFile.projectName,\n      d => d.file.subProjectName !== sourceViewerFile.subProjectName,\n      d => d.file.key !== sourceViewerFile.key\n    );\n\n    return (\n      <div className=\"source-viewer-bubble-popup abs-width-400\">\n        {this.props.inRemovedComponent && (\n          <Alert variant=\"warning\">\n            {translate('duplications.dups_found_on_deleted_resource')}\n          </Alert>\n        )}\n        {duplications.length > 0 && (\n          <>\n            <h6 className=\"spacer-bottom\">\n              {translate('component_viewer.transition.duplication')}\n            </h6>\n            {duplications.map(duplication => (\n              <div className=\"spacer-top text-ellipsis\" key={duplication.file.key}>\n                <div className=\"component-name\">\n                  {this.isDifferentComponent(duplication.file, this.props.sourceViewerFile) && (\n                    <>\n                      <div className=\"component-name-parent\">\n                        <QualifierIcon className=\"little-spacer-right\" qualifier=\"TRK\" />\n                        <Link to={getProjectUrl(duplication.file.project)}>\n                          {duplication.file.projectName}\n                        </Link>\n                      </div>\n                      {duplication.file.subProject && duplication.file.subProjectName && (\n                        <div className=\"component-name-parent\">\n                          <QualifierIcon className=\"little-spacer-right\" qualifier=\"BRC\" />\n                          {duplication.file.subProjectName}\n                        </div>\n                      )}\n                    </>\n                  )}\n\n                  {duplication.file.key !== this.props.sourceViewerFile.key && (\n                    <div className=\"component-name-path\">\n                      {this.renderDuplication(\n                        duplication.file,\n                        <>\n                          <span>{collapsedDirFromPath(duplication.file.name)}</span>\n                          <span className=\"component-name-file\">\n                            {fileFromPath(duplication.file.name)}\n                          </span>\n                        </>\n                      )}\n                    </div>\n                  )}\n\n                  <div className=\"component-name-path\">\n                    {'Lines: '}\n                    {duplication.blocks.map((block, index) => (\n                      <React.Fragment key={index}>\n                        {this.renderDuplication(\n                          duplication.file,\n                          <>\n                            {block.from}\n                            {' \u2013 '}\n                            {block.from + block.size - 1}\n                          </>,\n                          block.from\n                        )}\n                        {index < duplication.blocks.length - 1 && ', '}\n                      </React.Fragment>\n                    ))}\n                  </div>\n                </div>\n              </div>\n            ))}\n          </>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n// TODO Test this function, but I don't get the logic behind it\nexport function filterDuplicationBlocksByLine(blocks: T.DuplicationBlock[], line: number) {\n  /* eslint-disable no-underscore-dangle */\n  let foundOne = false;\n  return blocks.filter(b => {\n    const outOfBounds = b.from > line || b.from + b.size < line;\n    const currentFile = b._ref === '1';\n    const shouldDisplayForCurrentFile = outOfBounds || foundOne;\n    const shouldDisplay = !currentFile || shouldDisplayForCurrentFile;\n    const isOk = b._ref !== undefined && shouldDisplay;\n    if (b._ref === '1' && !outOfBounds) {\n      foundOne = true;\n    }\n    return isOk;\n  });\n  /* eslint-enable no-underscore-dangle */\n}\n\nexport function getDuplicationBlocksForIndex(\n  duplications: T.Duplication[] | undefined,\n  index: number\n) {\n  return (duplications && duplications[index] && duplications[index].blocks) || [];\n}\n\nexport function isDuplicationBlockInRemovedComponent(blocks: T.DuplicationBlock[]) {\n  return blocks.some(b => b._ref === undefined); // eslint-disable-line no-underscore-dangle\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport default function getCoverageStatus(s: T.SourceLine): T.SourceLineCoverageStatus | undefined {\n  let status: T.SourceLineCoverageStatus | undefined;\n  if (s.lineHits != null && s.lineHits > 0) {\n    status = 'partially-covered';\n  }\n  if (s.lineHits != null && s.lineHits > 0 && s.conditions === s.coveredConditions) {\n    status = 'covered';\n  }\n  if (s.lineHits === 0 || s.coveredConditions === 0) {\n    status = 'uncovered';\n  }\n  return status;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniq } from 'lodash';\n\nexport interface Token {\n  className: string;\n  markers: number[];\n  text: string;\n}\n\nconst ISSUE_LOCATION_CLASS = 'source-line-code-issue';\n\nexport function splitByTokens(code: string, rootClassName = ''): Token[] {\n  const container = document.createElement('div');\n  let tokens: Token[] = [];\n  container.innerHTML = code;\n  [].forEach.call(container.childNodes, (node: Element) => {\n    if (node.nodeType === 1) {\n      // ELEMENT NODE\n      const fullClassName = rootClassName ? rootClassName + ' ' + node.className : node.className;\n      const innerTokens = splitByTokens(node.innerHTML, fullClassName);\n      tokens = tokens.concat(innerTokens);\n    }\n    if (node.nodeType === 3 && node.nodeValue) {\n      // TEXT NODE\n      tokens.push({ className: rootClassName, markers: [], text: node.nodeValue });\n    }\n  });\n  return tokens;\n}\n\nexport function highlightSymbol(tokens: Token[], symbol: string): Token[] {\n  const symbolRegExp = new RegExp(`\\\\b${symbol}\\\\b`);\n  return tokens.map(token =>\n    symbolRegExp.test(token.className)\n      ? { ...token, className: `${token.className} highlighted` }\n      : token\n  );\n}\n\n/**\n * Intersect two ranges\n * @param s1 Start position of the first range\n * @param e1 End position of the first range\n * @param s2 Start position of the second range\n * @param e2 End position of the second range\n */\nfunction intersect(s1: number, e1: number, s2: number, e2: number) {\n  return { from: Math.max(s1, s2), to: Math.min(e1, e2) };\n}\n\n/**\n * Get the substring of a string\n * @param str A string\n * @param from \"From\" offset\n * @param to \"To\" offset\n * @param acc Global offset to eliminate\n */\nfunction part(str: string, from: number, to: number, acc: number): string {\n  // we do not want negative number as the first argument of `substr`\n  return from >= acc ? str.substr(from - acc, to - from) : str.substr(0, to - from);\n}\n\n/**\n * Highlight issue locations in the list of tokens\n */\nexport function highlightIssueLocations(\n  tokens: Token[],\n  issueLocations: T.LinearIssueLocation[],\n  rootClassName: string = ISSUE_LOCATION_CLASS\n): Token[] {\n  issueLocations.forEach(location => {\n    const nextTokens: Token[] = [];\n    let acc = 0;\n    let markerAdded = location.line !== location.startLine;\n    tokens.forEach(token => {\n      const x = intersect(acc, acc + token.text.length, location.from, location.to);\n      const p1 = part(token.text, acc, x.from, acc);\n      const p2 = part(token.text, x.from, x.to, acc);\n      const p3 = part(token.text, x.to, acc + token.text.length, acc);\n      if (p1.length) {\n        nextTokens.push({ ...token, text: p1 });\n      }\n      if (p2.length) {\n        const newClassName =\n          token.className.indexOf(rootClassName) === -1\n            ? `${token.className} ${rootClassName}`\n            : token.className;\n        nextTokens.push({\n          className: newClassName,\n          markers:\n            !markerAdded && location.index != null\n              ? uniq([...token.markers, location.index])\n              : token.markers,\n          text: p2\n        });\n        markerAdded = true;\n      }\n      if (p3.length) {\n        nextTokens.push({ ...token, text: p3 });\n      }\n      acc += token.text.length;\n    });\n    tokens = nextTokens.slice();\n  });\n  return tokens;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function getLinearLocations(textRange: T.TextRange | undefined): T.LinearIssueLocation[] {\n  if (!textRange) {\n    return [];\n  }\n  const locations = [];\n\n  // go through all lines of the `textRange`\n  for (let line = textRange.startLine; line <= textRange.endLine; line++) {\n    // TODO fix 999999\n    const from = line === textRange.startLine ? textRange.startOffset : 0;\n    const to = line === textRange.endLine ? textRange.endOffset : 999999;\n    locations.push({ line, from, to });\n  }\n  return locations;\n}\n\nexport function getSecondaryIssueLocationsForLine(\n  line: T.SourceLine,\n  highlightedLocations: (T.FlowLocation | undefined)[] | undefined\n): T.LinearIssueLocation[] {\n  if (!highlightedLocations) {\n    return [];\n  }\n  return highlightedLocations.reduce((locations, location) => {\n    const linearLocations: T.LinearIssueLocation[] = location\n      ? getLinearLocations(location.textRange)\n          .filter(l => l.line === line.line)\n          .map(l => ({\n            ...l,\n            startLine: location.textRange.startLine,\n            index: location.index,\n            text: location.msg\n          }))\n      : [];\n    return [...locations, ...linearLocations];\n  }, []);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { flatten } from 'lodash';\nimport { splitByTokens } from './highlight';\nimport { getLinearLocations } from './issueLocations';\n\nexport function issuesByLine(issues: T.Issue[]) {\n  const index: { [line: number]: T.Issue[] } = {};\n  issues.forEach(issue => {\n    const line = issue.textRange ? issue.textRange.endLine : 0;\n    if (!(line in index)) {\n      index[line] = [];\n    }\n    index[line].push(issue);\n  });\n  return index;\n}\n\nexport function issuesByComponentAndLine(\n  issues: T.Issue[] = []\n): { [component: string]: { [line: number]: T.Issue[] } } {\n  return issues.reduce((mapping: { [component: string]: { [line: number]: T.Issue[] } }, issue) => {\n    mapping[issue.component] = mapping[issue.component] || {};\n    const line = issue.textRange ? issue.textRange.endLine : 0;\n    mapping[issue.component][line] = mapping[issue.component][line] || [];\n    mapping[issue.component][line].push(issue);\n    return mapping;\n  }, {});\n}\n\nexport function locationsByLine(issues: Pick<T.Issue, 'textRange'>[]) {\n  const index: { [line: number]: T.LinearIssueLocation[] } = {};\n  issues.forEach(issue => {\n    getLinearLocations(issue.textRange).forEach(location => {\n      if (!(location.line in index)) {\n        index[location.line] = [];\n      }\n      index[location.line].push(location);\n    });\n  });\n  return index;\n}\n\nexport function duplicationsByLine(duplications: T.Duplication[] | undefined) {\n  if (duplications == null) {\n    return {};\n  }\n\n  const duplicationsByLine: { [line: number]: number[] } = {};\n\n  duplications.forEach(({ blocks }, duplicationIndex) => {\n    blocks.forEach(block => {\n      // eslint-disable-next-line no-underscore-dangle\n      if (block._ref === '1') {\n        for (let line = block.from; line < block.from + block.size; line++) {\n          if (!(line in duplicationsByLine)) {\n            duplicationsByLine[line] = [];\n          }\n          duplicationsByLine[line].push(duplicationIndex);\n        }\n      }\n    });\n  });\n\n  return duplicationsByLine;\n}\n\nexport function symbolsByLine(sources: T.SourceLine[]) {\n  const index: { [line: number]: string[] } = {};\n  sources.forEach(line => {\n    const tokens = splitByTokens(line.code || '');\n    const symbols = flatten(\n      tokens.map(token => {\n        const keys = token.className.match(/sym-\\d+/g);\n        return keys != null ? keys : [];\n      })\n    );\n    index[line.line] = symbols.filter(key => key);\n  });\n  return index;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport getCoverageStatus from '../components/SourceViewer/helpers/getCoverageStatus';\nimport { getJSON, post, postJSON, RequestData } from '../helpers/request';\nimport { IssueResponse, RawIssuesResponse } from '../types/issues';\n\ntype FacetName =\n  | 'assigned_to_me'\n  | 'assignees'\n  | 'author'\n  | 'createdAt'\n  | 'cwe'\n  | 'directories'\n  | 'files'\n  | 'languages'\n  | 'owaspTop10'\n  | 'projects'\n  | 'reporters'\n  | 'resolutions'\n  | 'rules'\n  | 'sansTop25'\n  | 'severities'\n  | 'statuses'\n  | 'tags'\n  | 'types';\n\nexport function searchIssues(query: RequestData): Promise<RawIssuesResponse> {\n  return getJSON('/api/issues/search', query).catch(throwGlobalError);\n}\n\nexport function getFacets(\n  query: RequestData,\n  facets: FacetName[]\n): Promise<{\n  facets: Array<{ property: string; values: T.FacetValue[] }>;\n  response: RawIssuesResponse;\n}> {\n  const data = {\n    ...query,\n    facets: facets.join(),\n    ps: 1,\n    additionalFields: '_all'\n  };\n  return searchIssues(data).then(r => {\n    return { facets: r.facets, response: r };\n  });\n}\n\nexport function getFacet(\n  query: RequestData,\n  facet: FacetName\n): Promise<{ facet: { count: number; val: string }[]; response: RawIssuesResponse }> {\n  return getFacets(query, [facet]).then(r => {\n    return { facet: r.facets[0].values, response: r.response };\n  });\n}\n\nexport function searchIssueTags(data: {\n  project?: string;\n  branch?: string;\n  all?: boolean;\n  ps?: number;\n  q?: string;\n}): Promise<string[]> {\n  return getJSON('/api/issues/tags', data)\n    .then(r => r.tags)\n    .catch(throwGlobalError);\n}\n\nexport function getIssueChangelog(issue: string): Promise<{ changelog: T.IssueChangelog[] }> {\n  return getJSON('/api/issues/changelog', { issue }).catch(throwGlobalError);\n}\n\nexport function getIssueFilters() {\n  return getJSON('/api/issue_filters/search').then(r => r.issueFilters);\n}\n\nexport function addIssueComment(data: { issue: string; text: string }): Promise<IssueResponse> {\n  return postJSON('/api/issues/add_comment', data);\n}\n\nexport function deleteIssueComment(data: { comment: string }): Promise<IssueResponse> {\n  return postJSON('/api/issues/delete_comment', data);\n}\n\nexport function editIssueComment(data: { comment: string; text: string }): Promise<IssueResponse> {\n  return postJSON('/api/issues/edit_comment', data);\n}\n\nexport function setIssueAssignee(data: {\n  issue: string;\n  assignee?: string;\n}): Promise<IssueResponse> {\n  return postJSON('/api/issues/assign', data);\n}\n\nexport function setIssueSeverity(data: { issue: string; severity: string }): Promise<any> {\n  return postJSON('/api/issues/set_severity', data);\n}\n\nexport function setIssueTags(data: { issue: string; tags: string }): Promise<IssueResponse> {\n  return postJSON('/api/issues/set_tags', data);\n}\n\nexport function setIssueTransition(data: {\n  issue: string;\n  transition: string;\n}): Promise<IssueResponse> {\n  return postJSON('/api/issues/do_transition', data);\n}\n\nexport function setIssueType(data: { issue: string; type: string }): Promise<IssueResponse> {\n  return postJSON('/api/issues/set_type', data);\n}\n\nexport function bulkChangeIssues(issueKeys: string[], query: RequestData): Promise<void> {\n  return post('/api/issues/bulk_change', { issues: issueKeys.join(), ...query });\n}\n\nexport function searchIssueAuthors(data: {\n  project?: string;\n  ps?: number;\n  q?: string;\n}): Promise<string[]> {\n  return getJSON('/api/issues/authors', data).then(r => r.authors, throwGlobalError);\n}\n\nexport function getIssueFlowSnippets(issueKey: string): Promise<T.Dict<T.SnippetsByComponent>> {\n  return getJSON('/api/sources/issue_snippets', { issueKey }).then(result => {\n    Object.keys(result).forEach(k => {\n      if (result[k].sources) {\n        result[k].sources = result[k].sources.reduce(\n          (lineMap: T.Dict<T.SourceLine>, line: T.SourceLine) => {\n            line.coverageStatus = getCoverageStatus(line);\n            lineMap[line.line] = line;\n            return lineMap;\n          },\n          {}\n        );\n      }\n    });\n    return result;\n  });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function BugIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M10.09,1.88A2.86,2.86,0,0,0,8,1a2.87,2.87,0,0,0-2.11.87A2.93,2.93,0,0,0,5,4h6A2.93,2.93,0,0,0,10.09,1.88Z\"\n        style={{ fill }}\n      />\n      <path\n        d=\"M14.54,9H13V5.6L14.3,4.42a.5.5,0,0,0,0-.71.49.49,0,0,0-.7,0L12.17,5H3.82L2.34,3.66a.5.5,0,0,0-.67.74L2.94,5.55V9H1.46a.5.5,0,0,0,0,1H3a5.2,5.2,0,0,0,1.05,2.32l-2,1.81a.5.5,0,1,0,.67.74l2-1.82A4.62,4.62,0,0,0,7,14.1V8A1,1,0,0,1,8,7a.94.94,0,0,1,1,.9v6.17A4.55,4.55,0,0,0,11.18,13l2,1.83a.51.51,0,0,0,.33.13.48.48,0,0,0,.37-.17.49.49,0,0,0,0-.7l-2-1.8a5.34,5.34,0,0,0,1-2.29h1.64a.5.5,0,0,0,0-1Z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function CodeSmellIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8,15.1a7,7,0,1,0-7-7A7,7,0,0,0,8,15.1Zm.74-8.9,1.46-2.52a.29.29,0,0,1,.25-.14.3.3,0,0,1,.15,0,5.26,5.26,0,0,1,2.61,4.53.28.28,0,0,1-.29.29H10a.28.28,0,0,1-.29-.29,1.78,1.78,0,0,0-.88-1.51A.29.29,0,0,1,8.75,6.2Zm.11,3.44A.23.23,0,0,1,9,9.6a.29.29,0,0,1,.25.14l1.46,2.52a.18.18,0,0,1,0,.13.3.3,0,0,1-.15.27,5.3,5.3,0,0,1-5.23,0,.3.3,0,0,1-.1-.4L6.73,9.74A.29.29,0,0,1,7,9.6a.23.23,0,0,1,.14,0A1.79,1.79,0,0,0,8.86,9.64ZM5.33,3.59a.3.3,0,0,1,.41.1L7.2,6.21a.29.29,0,0,1-.1.4,1.79,1.79,0,0,0-.87,1.51.28.28,0,0,1-.29.29H3a.32.32,0,0,1-.32-.29A5.26,5.26,0,0,1,5.33,3.59Z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function SecurityHotspotIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14.08 3.23a1 1 0 00-.67-.77L8.16 1a1.06 1.06 0 00-.5 0L2.41 2.46a.94.94 0 00-.67.77c-.08.57-.74 5.63 1.14 8.31A9 9 0 007.68 15a.85.85 0 00.23 0 .78.78 0 00.22 0 8.93 8.93 0 004.81-3.46c1.85-2.68 1.21-7.74 1.14-8.31zM12.21 8a6.15 6.15 0 01-.86 2.42A7.92 7.92 0 018 13V8zM8 3v5H3.59a24.29 24.29 0 010-3.82z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function VulnerabilityIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M12,7.05H6V5a2,2,0,1,1,4,0,1,1,0,0,0,2,0A4,4,0,1,0,4,5V7.06A1.12,1.12,0,0,0,3,8.17V14a1.12,1.12,0,0,0,1.12,1.12H12A1.12,1.12,0,0,0,13.1,14V8.17A1.12,1.12,0,0,0,12,7.05ZM8,13a2,2,0,1,1,2-2A2,2,0,0,1,8,13Z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum IssueType {\n  CodeSmell = 'CODE_SMELL',\n  Vulnerability = 'VULNERABILITY',\n  Bug = 'BUG',\n  SecurityHotspot = 'SECURITY_HOTSPOT'\n}\n\nexport enum IssueScope {\n  Main = 'MAIN',\n  Test = 'TEST'\n}\n\ninterface Comment {\n  createdAt: string;\n  htmlText: string;\n  key: string;\n  login: string;\n  markdown: string;\n  updatable: boolean;\n}\n\nexport interface RawIssue {\n  assignee?: string;\n  author?: string;\n  comments?: Array<Comment>;\n  component: string;\n  flows?: Array<{\n    // `componentName` is not available in RawIssue\n    locations?: Array<T.Omit<T.FlowLocation, 'componentName'>>;\n  }>;\n  key: string;\n  line?: number;\n  project: string;\n  rule: string;\n  severity: string;\n  status: string;\n  subProject?: string;\n  textRange?: T.TextRange;\n}\n\nexport interface IssueResponse {\n  components?: Array<{ key: string; name: string }>;\n  issue: RawIssue;\n  rules?: Array<{}>;\n  users?: Array<T.UserBase>;\n}\n\nexport interface RawIssuesResponse {\n  components: ReferencedComponent[];\n  effortTotal: number;\n  facets: RawFacet[];\n  issues: RawIssue[];\n  languages: ReferencedLanguage[];\n  paging: T.Paging;\n  rules?: Array<{}>;\n  users?: Array<T.UserBase>;\n}\n\nexport interface FetchIssuesPromise {\n  components: ReferencedComponent[];\n  effortTotal: number;\n  facets: RawFacet[];\n  issues: T.Issue[];\n  languages: ReferencedLanguage[];\n  paging: T.Paging;\n  rules: ReferencedRule[];\n  users: T.UserBase[];\n}\n\nexport interface ReferencedComponent {\n  key: string;\n  name: string;\n  path?: string;\n  uuid: string;\n}\n\nexport interface ReferencedLanguage {\n  name: string;\n}\n\nexport interface ReferencedRule {\n  langName?: string;\n  name: string;\n}\n\nexport interface RawFacet {\n  property: string;\n  values: Array<{ val: string; count: number }>;\n}\n\nexport interface Facet {\n  [value: string]: number;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { colors } from '../app/theme';\nimport { AlmKeys } from '../types/alm-settings';\nimport { ComponentQualifier } from '../types/component';\nimport { IssueScope, IssueType } from '../types/issues';\n\nexport const SEVERITIES = ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'];\nexport const STATUSES = ['OPEN', 'REOPENED', 'CONFIRMED', 'RESOLVED', 'CLOSED'];\nexport const ISSUE_TYPES: T.IssueType[] = [\n  IssueType.Bug,\n  IssueType.Vulnerability,\n  IssueType.CodeSmell,\n  IssueType.SecurityHotspot\n];\nexport const SOURCE_SCOPES = [\n  { scope: IssueScope.Main, qualifier: ComponentQualifier.File },\n  { scope: IssueScope.Test, qualifier: ComponentQualifier.TestFile }\n];\nexport const RULE_TYPES: T.RuleType[] = ['BUG', 'VULNERABILITY', 'CODE_SMELL', 'SECURITY_HOTSPOT'];\nexport const RULE_STATUSES = ['READY', 'BETA', 'DEPRECATED'];\n\nexport const CHART_COLORS_RANGE_PERCENT = [\n  colors.green,\n  colors.lightGreen,\n  colors.yellow,\n  colors.orange,\n  colors.red\n];\n\nexport const CHART_REVERSED_COLORS_RANGE_PERCENT = [\n  colors.red,\n  colors.orange,\n  colors.yellow,\n  colors.lightGreen,\n  colors.green\n];\n\nexport const RATING_COLORS = [\n  colors.green,\n  colors.lightGreen,\n  colors.yellow,\n  colors.orange,\n  colors.red\n];\n\nexport const PROJECT_KEY_MAX_LEN = 400;\n\nexport const ALM_DOCUMENTATION_PATHS = {\n  [AlmKeys.Azure]: '/documentation/analysis/azuredevops-integration/',\n  [AlmKeys.BitbucketServer]: '/documentation/analysis/bitbucket-integration/',\n  [AlmKeys.BitbucketCloud]: '/documentation/analysis/bitbucket-cloud-integration/',\n  [AlmKeys.GitHub]: '/documentation/analysis/github-integration/',\n  [AlmKeys.GitLab]: '/documentation/analysis/gitlab-integration/'\n};\n\nexport const IMPORT_COMPATIBLE_ALMS = [\n  AlmKeys.Azure,\n  AlmKeys.BitbucketServer,\n  AlmKeys.BitbucketCloud,\n  AlmKeys.GitHub,\n  AlmKeys.GitLab\n];\n\n// Count both Bitbuckets as a single ALM.\nexport const IMPORT_COMPATIBLE_ALM_COUNT = IMPORT_COMPATIBLE_ALMS.filter(\n  a => a !== AlmKeys.BitbucketCloud\n).length;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { flatten, sortBy } from 'lodash';\nimport BugIcon from '../components/icons/BugIcon';\nimport CodeSmellIcon from '../components/icons/CodeSmellIcon';\nimport SecurityHotspotIcon from '../components/icons/SecurityHotspotIcon';\nimport VulnerabilityIcon from '../components/icons/VulnerabilityIcon';\nimport { IssueType, RawIssue } from '../types/issues';\nimport { MetricKey } from '../types/metrics';\nimport { ISSUE_TYPES } from './constants';\n\ninterface Rule {}\n\ninterface Component {\n  key: string;\n  name: string;\n}\n\nexport function sortByType<T extends Pick<T.Issue, 'type'>>(issues: T[]): T[] {\n  return sortBy(issues, issue => ISSUE_TYPES.indexOf(issue.type));\n}\n\nfunction injectRelational(\n  issue: T.Dict<any>,\n  source: any[] | undefined,\n  baseField: string,\n  lookupField: string\n) {\n  const newFields: T.Dict<any> = {};\n  const baseValue = issue[baseField];\n  if (baseValue !== undefined && source !== undefined) {\n    const lookupValue = source.find(candidate => candidate[lookupField] === baseValue);\n    if (lookupValue != null) {\n      Object.keys(lookupValue).forEach(key => {\n        const newKey = baseField + key.charAt(0).toUpperCase() + key.slice(1);\n        newFields[newKey] = lookupValue[key];\n      });\n    }\n  }\n  return newFields;\n}\n\nfunction injectCommentsRelational(issue: RawIssue, users?: T.UserBase[]) {\n  if (!issue.comments) {\n    return {};\n  }\n  const comments = issue.comments.map(comment => {\n    const commentWithAuthor = { ...comment, author: comment.login, login: undefined };\n    return {\n      ...commentWithAuthor,\n      ...injectRelational(commentWithAuthor, users, 'author', 'login')\n    };\n  });\n  return { comments };\n}\n\nfunction prepareClosed(\n  issue: RawIssue,\n  secondaryLocations: T.FlowLocation[],\n  flows: T.FlowLocation[][]\n) {\n  return issue.status === 'CLOSED'\n    ? { flows: [], line: undefined, textRange: undefined, secondaryLocations: [] }\n    : { flows, secondaryLocations };\n}\n\nfunction ensureTextRange(issue: RawIssue): { textRange?: T.TextRange } {\n  return issue.line && !issue.textRange\n    ? {\n        textRange: {\n          startLine: issue.line,\n          endLine: issue.line,\n          startOffset: 0,\n          endOffset: 999999\n        }\n      }\n    : {};\n}\n\nfunction reverseLocations(locations: T.FlowLocation[]): T.FlowLocation[] {\n  const x = [...locations];\n  x.reverse();\n  return x;\n}\n\nfunction splitFlows(\n  issue: RawIssue,\n  components: Component[] = []\n): { secondaryLocations: T.FlowLocation[]; flows: T.FlowLocation[][] } {\n  const parsedFlows: T.FlowLocation[][] = (issue.flows || [])\n    .filter(flow => flow.locations !== undefined)\n    .map(flow => flow.locations!.filter(location => location.textRange != null))\n    .map(flow =>\n      flow.map(location => {\n        const component = components.find(component => component.key === location.component);\n        return { ...location, componentName: component && component.name };\n      })\n    );\n\n  const onlySecondaryLocations = parsedFlows.every(flow => flow.length === 1);\n\n  return onlySecondaryLocations\n    ? { secondaryLocations: orderLocations(flatten(parsedFlows)), flows: [] }\n    : { secondaryLocations: [], flows: parsedFlows.map(reverseLocations) };\n}\n\nfunction orderLocations(locations: T.FlowLocation[]) {\n  return sortBy(\n    locations,\n    location => location.textRange && location.textRange.startLine,\n    location => location.textRange && location.textRange.startOffset\n  );\n}\n\nexport function parseIssueFromResponse(\n  issue: RawIssue,\n  components?: Component[],\n  users?: T.UserBase[],\n  rules?: Rule[]\n): T.Issue {\n  const { secondaryLocations, flows } = splitFlows(issue, components);\n  return {\n    ...issue,\n    ...injectRelational(issue, components, 'component', 'key'),\n    ...injectRelational(issue, components, 'project', 'key'),\n    ...injectRelational(issue, components, 'subProject', 'key'),\n    ...injectRelational(issue, rules, 'rule', 'key'),\n    ...injectRelational(issue, users, 'assignee', 'login'),\n    ...injectCommentsRelational(issue, users),\n    ...prepareClosed(issue, secondaryLocations, flows),\n    ...ensureTextRange(issue)\n  } as T.Issue;\n}\n\nexport const ISSUETYPE_METRIC_KEYS_MAP = {\n  [IssueType.CodeSmell]: {\n    metric: MetricKey.code_smells,\n    newMetric: MetricKey.new_code_smells,\n    rating: MetricKey.sqale_rating,\n    newRating: MetricKey.new_maintainability_rating,\n    ratingName: 'Maintainability',\n    iconClass: CodeSmellIcon\n  },\n  [IssueType.Vulnerability]: {\n    metric: MetricKey.vulnerabilities,\n    newMetric: MetricKey.new_vulnerabilities,\n    rating: MetricKey.security_rating,\n    newRating: MetricKey.new_security_rating,\n    ratingName: 'Security',\n    iconClass: VulnerabilityIcon\n  },\n  [IssueType.Bug]: {\n    metric: MetricKey.bugs,\n    newMetric: MetricKey.new_bugs,\n    rating: MetricKey.reliability_rating,\n    newRating: MetricKey.new_reliability_rating,\n    ratingName: 'Reliability',\n    iconClass: BugIcon\n  },\n  [IssueType.SecurityHotspot]: {\n    metric: MetricKey.security_hotspots,\n    newMetric: MetricKey.new_security_hotspots,\n    rating: MetricKey.security_review_rating,\n    newRating: MetricKey.new_security_review_rating,\n    ratingName: 'SecurityReview',\n    iconClass: SecurityHotspotIcon\n  }\n};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { searchIssues } from '../../../api/issues';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { parseIssueFromResponse } from '../../../helpers/issues';\nimport { BranchLike } from '../../../types/branch-like';\n\n// maximum possible value\nconst PAGE_SIZE = 500;\n\nfunction buildQuery(component: string, branchLike: BranchLike | undefined) {\n  return {\n    additionalFields: '_all',\n    resolved: 'false',\n    componentKeys: component,\n    s: 'FILE_LINE',\n    ...getBranchLikeQuery(branchLike)\n  };\n}\n\nexport function loadPage(\n  query: T.RawQuery,\n  page: number,\n  pageSize = PAGE_SIZE\n): Promise<T.Issue[]> {\n  return searchIssues({\n    ...query,\n    p: page,\n    ps: pageSize\n  }).then(r =>\n    r.issues.map(issue => parseIssueFromResponse(issue, r.components, r.users, r.rules))\n  );\n}\n\nexport function loadPageAndNext(\n  query: T.RawQuery,\n  toLine: number,\n  page: number,\n  pageSize = PAGE_SIZE\n): Promise<T.Issue[]> {\n  return loadPage(query, page).then(issues => {\n    if (issues.length === 0) {\n      return [];\n    }\n\n    const lastIssue = issues[issues.length - 1];\n\n    if (\n      (lastIssue.textRange != null && lastIssue.textRange.endLine > toLine) ||\n      issues.length < pageSize\n    ) {\n      return issues;\n    }\n\n    return loadPageAndNext(query, toLine, page + 1, pageSize).then(nextIssues => {\n      return [...issues, ...nextIssues];\n    });\n  });\n}\n\nexport default function loadIssues(\n  component: string,\n  _fromLine: number,\n  toLine: number,\n  branchLike: BranchLike | undefined\n): Promise<T.Issue[]> {\n  const query = buildQuery(component, branchLike);\n  return new Promise(resolve => {\n    loadPageAndNext(query, toLine, 1).then(issues => {\n      resolve(issues);\n    });\n  });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport './LocationIndex.css';\n\ninterface Props {\n  children?: React.ReactNode;\n  leading?: boolean;\n  onClick?: () => void;\n  selected?: boolean;\n  [x: string]: any;\n}\n\nexport default function LocationIndex(props: Props) {\n  const { children, leading, onClick, selected, ...other } = props;\n  const clickAttributes = onClick ? { onClick, role: 'button', tabIndex: 0 } : {};\n  // put {...others} because Tooltip sets some event handlers\n  return (\n    <div\n      className={classNames('location-index', {\n        'is-leading': leading,\n        selected\n      })}\n      {...clickAttributes}\n      {...other}>\n      {children}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport './LocationMessage.css';\n\ninterface Props {\n  children?: React.ReactNode;\n  selected: boolean;\n}\n\nexport default function LocationMessage(props: Props) {\n  return (\n    <div className={classNames('location-message', { selected: props.selected })}>\n      {props.children}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../../app/utils/throwGlobalError';\nimport { parseIssueFromResponse } from '../../helpers/issues';\nimport { IssueResponse } from '../../types/issues';\n\nexport const updateIssue = (\n  onChange: (issue: T.Issue) => void,\n  resultPromise: Promise<IssueResponse>,\n  oldIssue?: T.Issue,\n  newIssue?: T.Issue\n) => {\n  const optimisticUpdate = oldIssue !== undefined && newIssue !== undefined;\n  if (optimisticUpdate) {\n    onChange(newIssue!);\n  }\n\n  resultPromise.then(\n    response => {\n      if (!optimisticUpdate) {\n        const issue = parseIssueFromResponse(\n          response.issue,\n          response.components,\n          response.users,\n          response.rules\n        );\n        onChange(issue);\n      }\n    },\n    param => {\n      if (optimisticUpdate) {\n        onChange(oldIssue!);\n      }\n      throwGlobalError(param);\n    }\n  );\n};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Tooltip from '../../components/controls/Tooltip';\n\ninterface Props {\n  active?: string;\n  className?: string;\n  item: string;\n  onHover?: (item: string) => void;\n  onSelect?: (item: string) => void;\n  title?: React.ReactNode;\n}\n\nexport default class SelectListItem extends React.PureComponent<Props> {\n  handleSelect = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    if (this.props.onSelect) {\n      this.props.onSelect(this.props.item);\n    }\n  };\n\n  handleHover = () => {\n    if (this.props.onHover) {\n      this.props.onHover(this.props.item);\n    }\n  };\n\n  renderLink() {\n    const children = this.props.children || this.props.item;\n    return (\n      <li>\n        <a\n          className={classNames(\n            { active: this.props.active === this.props.item },\n            this.props.className\n          )}\n          href=\"#\"\n          onClick={this.handleSelect}\n          onFocus={this.handleHover}\n          onMouseOver={this.handleHover}>\n          {children}\n        </a>\n      </li>\n    );\n  }\n\n  render() {\n    return (\n      <Tooltip overlay={this.props.title || undefined} placement=\"right\">\n        {this.renderLink()}\n      </Tooltip>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport key from 'keymaster';\nimport { uniqueId } from 'lodash';\nimport * as React from 'react';\nimport SelectListItem from './SelectListItem';\n\ninterface Props {\n  className?: string;\n  items: string[];\n  currentItem: string;\n  onSelect: (item: string) => void;\n}\n\ninterface State {\n  active: string;\n}\n\nexport default class SelectList extends React.PureComponent<Props, State> {\n  currentKeyScope?: string;\n  previousFilter?: (event: any) => void;\n  previousKeyScope?: string;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      active: props.currentItem\n    };\n  }\n\n  componentDidMount() {\n    this.attachShortcuts();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      prevProps.currentItem !== this.props.currentItem &&\n      !this.props.items.includes(this.state.active)\n    ) {\n      this.setState({ active: this.props.currentItem });\n    }\n  }\n\n  componentWillUnmount() {\n    this.detachShortcuts();\n  }\n\n  attachShortcuts = () => {\n    this.previousKeyScope = key.getScope();\n    this.previousFilter = key.filter;\n    this.currentKeyScope = uniqueId('key-scope');\n    key.setScope(this.currentKeyScope);\n\n    // sometimes there is a *focused* search field next to the SelectList component\n    // we need to allow shortcuts in this case, but only for the used keys\n\n    Object.assign(key, {\n      filter: (event: KeyboardEvent & { target: HTMLElement }) => {\n        const { tagName } = event.target || event.srcElement;\n        const isInput = tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';\n        return [13, 38, 40].includes(event.keyCode) || !isInput;\n      }\n    });\n\n    key('down', this.currentKeyScope, () => {\n      this.setState(this.selectNextElement);\n      return false;\n    });\n\n    key('up', this.currentKeyScope, () => {\n      this.setState(this.selectPreviousElement);\n      return false;\n    });\n\n    key('return', this.currentKeyScope, () => {\n      if (this.state.active != null) {\n        this.handleSelect(this.state.active);\n      }\n      return false;\n    });\n  };\n\n  detachShortcuts = () => {\n    if (this.previousKeyScope) {\n      key.setScope(this.previousKeyScope);\n    }\n    if (this.currentKeyScope) {\n      key.deleteScope(this.currentKeyScope);\n    }\n    Object.assign(key, { filter: this.previousFilter });\n  };\n\n  handleSelect = (item: string) => {\n    this.props.onSelect(item);\n  };\n\n  handleHover = (item: string) => {\n    this.setState({ active: item });\n  };\n\n  selectNextElement = (state: State, props: Props) => {\n    const idx = props.items.indexOf(state.active);\n    if (idx < 0) {\n      return { active: props.items[0] };\n    }\n    return { active: props.items[(idx + 1) % props.items.length] };\n  };\n\n  selectPreviousElement = (state: State, props: Props) => {\n    const idx = props.items.indexOf(state.active);\n    if (idx <= 0) {\n      return { active: props.items[props.items.length - 1] };\n    }\n    return { active: props.items[idx - 1] };\n  };\n\n  renderChild = (child: any) => {\n    if (child == null) {\n      return null;\n    }\n    // do not pass extra props to children like `<li className=\"divider\" />`\n    if (child.type !== SelectListItem) {\n      return child;\n    }\n    return React.cloneElement(child, {\n      active: this.state.active,\n      onHover: this.handleHover,\n      onSelect: this.handleSelect\n    });\n  };\n\n  render() {\n    const { children } = this.props;\n    const hasChildren = React.Children.count(children) > 0;\n    return (\n      <ul className={classNames('menu', this.props.className)}>\n        {hasChildren && React.Children.map(children, this.renderChild)}\n        {!hasChildren &&\n          this.props.items.map(item => (\n            <SelectListItem\n              active={this.state.active}\n              item={item}\n              key={item}\n              onHover={this.handleHover}\n              onSelect={this.handleSelect}\n            />\n          ))}\n      </ul>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { map } from 'lodash';\nimport * as React from 'react';\nimport { searchUsers } from '../../../api/users';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { translate } from '../../../helpers/l10n';\nimport { isLoggedIn, isUserActive } from '../../../helpers/users';\nimport SelectList from '../../common/SelectList';\nimport SelectListItem from '../../common/SelectListItem';\nimport { withCurrentUser } from '../../hoc/withCurrentUser';\nimport Avatar from '../../ui/Avatar';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  onSelect: (login: string) => void;\n}\n\ninterface State {\n  currentUser: string;\n  query: string;\n  users: T.UserActive[];\n}\n\nconst LIST_SIZE = 10;\n\nexport class SetAssigneePopup extends React.PureComponent<Props, State> {\n  defaultUsersArray: T.UserActive[];\n\n  constructor(props: Props) {\n    super(props);\n    this.defaultUsersArray = [{ login: '', name: translate('unassigned') }];\n\n    if (isLoggedIn(props.currentUser)) {\n      this.defaultUsersArray = [props.currentUser, ...this.defaultUsersArray];\n    }\n\n    this.state = {\n      query: '',\n      users: this.defaultUsersArray,\n      currentUser: this.defaultUsersArray.length > 0 ? this.defaultUsersArray[0].login : ''\n    };\n  }\n\n  searchUsers = (query: string) => {\n    searchUsers({ q: query, ps: LIST_SIZE }).then(this.handleSearchResult, () => {});\n  };\n\n  handleSearchResult = ({ users }: { users: T.UserBase[] }) => {\n    const activeUsers = users.filter(isUserActive);\n    this.setState({\n      users: activeUsers,\n      currentUser: activeUsers.length > 0 ? activeUsers[0].login : ''\n    });\n  };\n\n  handleSearchChange = (query: string) => {\n    if (query.length === 0) {\n      this.setState({\n        query,\n        users: this.defaultUsersArray,\n        currentUser: this.defaultUsersArray[0].login\n      });\n    } else {\n      this.setState({ query });\n      this.searchUsers(query);\n    }\n  };\n\n  render() {\n    return (\n      <DropdownOverlay noPadding={true}>\n        <div className=\"multi-select\">\n          <div className=\"menu-search\">\n            <SearchBox\n              autoFocus={true}\n              className=\"little-spacer-top\"\n              minLength={2}\n              onChange={this.handleSearchChange}\n              placeholder={translate('search.search_for_users')}\n              value={this.state.query}\n            />\n          </div>\n          <SelectList\n            currentItem={this.state.currentUser}\n            items={map(this.state.users, 'login')}\n            onSelect={this.props.onSelect}>\n            {this.state.users.map(user => (\n              <SelectListItem item={user.login} key={user.login}>\n                {!!user.login && (\n                  <Avatar className=\"spacer-right\" hash={user.avatar} name={user.name} size={16} />\n                )}\n                <span className=\"text-middle\" style={{ marginLeft: user.login ? 24 : undefined }}>\n                  {user.name}\n                </span>\n              </SelectListItem>\n            ))}\n          </SelectList>\n        </div>\n      </DropdownOverlay>\n    );\n  }\n}\n\nexport default withCurrentUser(SetAssigneePopup);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport Avatar from '../../ui/Avatar';\nimport SetAssigneePopup from '../popups/SetAssigneePopup';\n\ninterface Props {\n  isOpen: boolean;\n  issue: T.Issue;\n  canAssign: boolean;\n  onAssign: (login: string) => void;\n  togglePopup: (popup: string, show?: boolean) => void;\n}\n\nexport default class IssueAssign extends React.PureComponent<Props> {\n  toggleAssign = (open?: boolean) => {\n    this.props.togglePopup('assign', open);\n  };\n\n  handleClose = () => {\n    this.toggleAssign(false);\n  };\n\n  renderAssignee() {\n    const { issue } = this.props;\n    const assigneeName = issue.assigneeName || issue.assignee;\n\n    if (assigneeName) {\n      return (\n        <>\n          <span className=\"text-top\">\n            <Avatar\n              className=\"little-spacer-right\"\n              hash={issue.assigneeAvatar}\n              name={assigneeName}\n              size={16}\n            />\n          </span>\n          <span className=\"issue-meta-label\">\n            {issue.assigneeActive === false\n              ? translateWithParameters('user.x_deleted', assigneeName)\n              : assigneeName}\n          </span>\n        </>\n      );\n    }\n\n    return <span className=\"issue-meta-label\">{translate('unassigned')}</span>;\n  }\n\n  render() {\n    const { canAssign, isOpen, issue } = this.props;\n    const assigneeName = issue.assigneeName || issue.assignee;\n\n    if (canAssign) {\n      return (\n        <div className=\"dropdown\">\n          <Toggler\n            closeOnEscape={true}\n            onRequestClose={this.handleClose}\n            open={isOpen}\n            overlay={<SetAssigneePopup onSelect={this.props.onAssign} />}>\n            <ButtonLink\n              aria-expanded={isOpen}\n              aria-label={\n                assigneeName\n                  ? translateWithParameters(\n                      'issue.assign.assigned_to_x_click_to_change',\n                      assigneeName\n                    )\n                  : translate('issue.assign.unassigned_click_to_assign')\n              }\n              className=\"issue-action issue-action-with-options js-issue-assign\"\n              onClick={this.toggleAssign}>\n              {this.renderAssignee()}\n              <DropdownIcon className=\"little-spacer-left\" />\n            </ButtonLink>\n          </Toggler>\n        </div>\n      );\n    }\n\n    return this.renderAssignee();\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { getFormattingHelpUrl } from '../../helpers/urls';\n\ninterface Props {\n  className?: string;\n}\n\nexport default class FormattingTips extends React.PureComponent<Props> {\n  handleClick(evt: React.SyntheticEvent<HTMLAnchorElement>) {\n    evt.preventDefault();\n    window.open(\n      getFormattingHelpUrl(),\n      'Formatting',\n      'height=300,width=600,scrollbars=1,resizable=1'\n    );\n  }\n\n  render() {\n    return (\n      <div className={classNames('markdown-tips', this.props.className)}>\n        <a className=\"little-spacer-right\" href=\"#\" onClick={this.handleClick}>\n          {translate('formatting.helplink')}\n        </a>\n        {':'}\n        <span className=\"spacer-left\">*{translate('bold')}*</span>\n        <span className=\"spacer-left\">\n          ``\n          {translate('code')}\n          ``\n        </span>\n        <span className=\"spacer-left\">* {translate('bulleted_point')}</span>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button, ResetButtonLink } from '../../../components/controls/buttons';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate } from '../../../helpers/l10n';\nimport FormattingTips from '../../common/FormattingTips';\n\ninterface Props {\n  comment?: Pick<T.IssueComment, 'markdown'>;\n  onComment: (text: string) => void;\n  toggleComment: (visible: boolean) => void;\n  placeholder: string;\n  placement?: PopupPlacement;\n  autoTriggered?: boolean;\n}\n\ninterface State {\n  textComment: string;\n}\n\nexport default class CommentPopup extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      textComment: props.comment ? props.comment.markdown : ''\n    };\n  }\n\n  handleCommentChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.setState({ textComment: event.target.value });\n  };\n\n  handleCommentClick = () => {\n    if (this.state.textComment.trim().length > 0) {\n      this.props.onComment(this.state.textComment);\n    }\n  };\n\n  handleCancelClick = () => {\n    this.props.toggleComment(false);\n  };\n\n  handleKeyboard = (event: React.KeyboardEvent) => {\n    if (event.keyCode === 13 && (event.metaKey || event.ctrlKey)) {\n      // Ctrl + Enter\n      this.handleCommentClick();\n    } else if ([37, 38, 39, 40].includes(event.keyCode)) {\n      // Arrow keys\n      event.stopPropagation();\n    }\n  };\n\n  render() {\n    const { comment, autoTriggered } = this.props;\n    return (\n      <DropdownOverlay placement={this.props.placement}>\n        <div className=\"issue-comment-bubble-popup\">\n          <div className=\"issue-comment-form-text\">\n            <textarea\n              autoFocus={true}\n              onChange={this.handleCommentChange}\n              onKeyDown={this.handleKeyboard}\n              placeholder={this.props.placeholder}\n              rows={2}\n              value={this.state.textComment}\n            />\n          </div>\n          <div className=\"issue-comment-form-footer\">\n            <div className=\"issue-comment-form-actions\">\n              <Button\n                className=\"js-issue-comment-submit little-spacer-right\"\n                disabled={this.state.textComment.trim().length < 1}\n                onClick={this.handleCommentClick}>\n                {comment && translate('save')}\n                {!comment && translate('issue.comment.submit')}\n              </Button>\n              <ResetButtonLink className=\"js-issue-comment-cancel\" onClick={this.handleCancelClick}>\n                {autoTriggered ? translate('skip') : translate('cancel')}\n              </ResetButtonLink>\n            </div>\n            <div className=\"issue-comment-form-tips\">\n              <FormattingTips />\n            </div>\n          </div>\n        </div>\n      </DropdownOverlay>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { addIssueComment } from '../../../api/issues';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport { translate } from '../../../helpers/l10n';\nimport { updateIssue } from '../actions';\nimport CommentPopup from '../popups/CommentPopup';\n\ninterface Props {\n  commentAutoTriggered?: boolean;\n  commentPlaceholder: string;\n  currentPopup?: string;\n  issueKey: string;\n  onChange: (issue: T.Issue) => void;\n  toggleComment: (open?: boolean, placeholder?: string, autoTriggered?: boolean) => void;\n}\n\nexport default class IssueCommentAction extends React.PureComponent<Props> {\n  addComment = (text: string) => {\n    updateIssue(this.props.onChange, addIssueComment({ issue: this.props.issueKey, text }));\n    this.props.toggleComment(false);\n  };\n\n  handleCommentClick = () => {\n    this.props.toggleComment();\n  };\n\n  handleClose = () => {\n    this.props.toggleComment(false);\n  };\n\n  render() {\n    return (\n      <li className=\"issue-meta dropdown\">\n        <Toggler\n          closeOnClickOutside={false}\n          onRequestClose={this.handleClose}\n          open={this.props.currentPopup === 'comment'}\n          overlay={\n            <CommentPopup\n              autoTriggered={this.props.commentAutoTriggered}\n              onComment={this.addComment}\n              placeholder={this.props.commentPlaceholder}\n              toggleComment={this.props.toggleComment}\n            />\n          }>\n          <ButtonLink\n            aria-expanded={this.props.currentPopup === 'comment'}\n            aria-label={translate('issue.comment.add_comment')}\n            className=\"issue-action js-issue-comment\"\n            onClick={this.handleCommentClick}>\n            <span className=\"issue-meta-label\">{translate('issue.comment.formlink')}</span>\n          </ButtonLink>\n        </Toggler>\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\ninterface Props extends IconProps {\n  severity: string | null | undefined;\n}\n\nconst severityIcons: T.Dict<(props: IconProps) => React.ReactElement> = {\n  blocker: BlockerSeverityIcon,\n  critical: CriticalSeverityIcon,\n  major: MajorSeverityIcon,\n  minor: MinorSeverityIcon,\n  info: InfoSeverityIcon\n};\n\nexport default function SeverityIcon({ severity, ...iconProps }: Props) {\n  if (!severity) {\n    return null;\n  }\n\n  const DesiredIcon = severityIcons[severity.toLowerCase()];\n  return DesiredIcon ? <DesiredIcon {...iconProps} /> : null;\n}\n\nfunction BlockerSeverityIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 14c-3.311 0-6-2.689-6-6s2.689-6 6-6 6 2.689 6 6-2.689 6-6 6zM7 9h2V4H7v5zm0 3h2v-2H7v2z\"\n        style={{ fill: colors.red, fillRule: 'nonzero' }}\n      />\n    </Icon>\n  );\n}\n\nfunction CriticalSeverityIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 2c3.311 0 6 2.689 6 6s-2.689 6-6 6-6-2.689-6-6 2.689-6 6-6zm1 10V7.414l1.893 1.893c.13.124.282.216.457.261a1.006 1.006 0 0 0 1.176-.591 1.01 1.01 0 0 0 .01-.729 1.052 1.052 0 0 0-.229-.355c-1.212-1.212-2.394-2.456-3.638-3.636a1.073 1.073 0 0 0-.169-.123 1.05 1.05 0 0 0-.448-.133h-.104a1.053 1.053 0 0 0-.493.16 1.212 1.212 0 0 0-.162.132C6.08 5.505 4.836 6.687 3.656 7.932a.994.994 0 0 0-.051 1.275c.208.271.548.42.888.389.198-.019.378-.098.535-.218.041-.035.04-.034.079-.071L7 7.414V12h2z\"\n        style={{ fill: colors.red, fillRule: 'nonzero' }}\n      />\n    </Icon>\n  );\n}\n\nfunction MajorSeverityIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 2c3.311 0 6 2.689 6 6s-2.689 6-6 6-6-2.689-6-6 2.689-6 6-6zm.08 2.903c.071.008.14.019.208.039.138.042.26.114.37.205 1.244 1.146 2.426 2.357 3.639 3.536.1.103.181.218.234.352a1.01 1.01 0 0 1 .001.728 1.002 1.002 0 0 1-1.169.609 1.042 1.042 0 0 1-.46-.255L8 7.295l-2.903 2.822c-.039.036-.039.036-.08.07a1.002 1.002 0 0 1-1.604-.947c.032-.196.122-.37.253-.519C4.847 7.51 6.09 6.362 7.303 5.183c.052-.048.106-.093.167-.131a1.041 1.041 0 0 1 .61-.149z\"\n        style={{ fill: colors.red }}\n      />\n    </Icon>\n  );\n}\n\nfunction MinorSeverityIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 2c3.311 0 6 2.689 6 6s-2.689 6-6 6-6-2.689-6-6 2.689-6 6-6zm1 6.586V4H7v4.586L5.107 6.693a1.178 1.178 0 0 0-.165-.134 1.041 1.041 0 0 0-.662-.152 1 1 0 0 0-.587 1.7c1.212 1.212 2.394 2.456 3.638 3.636.094.08.195.146.311.191a1.008 1.008 0 0 0 1.065-.227c1.213-1.212 2.457-2.394 3.637-3.639a.994.994 0 0 0 .051-1.275 1.012 1.012 0 0 0-.888-.389 1.041 1.041 0 0 0-.535.218c-.04.034-.04.034-.079.071L9 8.586z\"\n        style={{ fill: colors.lightGreen }}\n      />\n    </Icon>\n  );\n}\n\nfunction InfoSeverityIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 2c3.311 0 6 2.689 6 6s-2.689 6-6 6-6-2.689-6-6 2.689-6 6-6zm1 5H7v5h2V7zm0-3H7v2h2V4z\"\n        style={{ fill: colors.blue }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SeverityIcon from '../../components/icons/SeverityIcon';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  className?: string;\n  severity: string;\n}\n\nexport default function SeverityHelper({ className, severity }: Props) {\n  if (!severity) {\n    return null;\n  }\n  return (\n    <span className={className}>\n      <SeverityIcon className=\"little-spacer-right\" severity={severity} />\n      {translate('severity', severity)}\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport SeverityIcon from '../../../components/icons/SeverityIcon';\nimport { translate } from '../../../helpers/l10n';\nimport SelectList from '../../common/SelectList';\nimport SelectListItem from '../../common/SelectListItem';\n\ntype Props = {\n  issue: Pick<T.Issue, 'severity'>;\n  onSelect: (severity: string) => void;\n};\n\nconst SEVERITY = ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'];\n\nexport default function SetSeverityPopup({ issue, onSelect }: Props) {\n  return (\n    <DropdownOverlay>\n      <SelectList currentItem={issue.severity} items={SEVERITY} onSelect={onSelect}>\n        {SEVERITY.map(severity => (\n          <SelectListItem className=\"display-flex-center\" item={severity} key={severity}>\n            <SeverityIcon className=\"little-spacer-right\" severity={severity} />\n            {translate('severity', severity)}\n          </SelectListItem>\n        ))}\n      </SelectList>\n    </DropdownOverlay>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setIssueSeverity } from '../../../api/issues';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { IssueResponse } from '../../../types/issues';\nimport SeverityHelper from '../../shared/SeverityHelper';\nimport SetSeverityPopup from '../popups/SetSeverityPopup';\n\ninterface Props {\n  canSetSeverity: boolean;\n  isOpen: boolean;\n  issue: Pick<T.Issue, 'severity'>;\n  setIssueProperty: (\n    property: keyof T.Issue,\n    popup: string,\n    apiCall: (query: T.RawQuery) => Promise<IssueResponse>,\n    value: string\n  ) => void;\n  togglePopup: (popup: string, show?: boolean) => void;\n}\n\nexport default class IssueSeverity extends React.PureComponent<Props> {\n  toggleSetSeverity = (open?: boolean) => {\n    this.props.togglePopup('set-severity', open);\n  };\n\n  setSeverity = (severity: string) => {\n    this.props.setIssueProperty('severity', 'set-severity', setIssueSeverity, severity);\n  };\n\n  handleClose = () => {\n    this.toggleSetSeverity(false);\n  };\n\n  render() {\n    const { issue } = this.props;\n    if (this.props.canSetSeverity) {\n      return (\n        <div className=\"dropdown\">\n          <Toggler\n            onRequestClose={this.handleClose}\n            open={this.props.isOpen && this.props.canSetSeverity}\n            overlay={<SetSeverityPopup issue={issue} onSelect={this.setSeverity} />}>\n            <ButtonLink\n              aria-label={translateWithParameters(\n                'issue.severity.severity_x_click_to_change',\n                translate('severity', issue.severity)\n              )}\n              aria-expanded={this.props.isOpen}\n              className=\"issue-action issue-action-with-options js-issue-set-severity\"\n              onClick={this.toggleSetSeverity}>\n              <SeverityHelper className=\"issue-meta-label\" severity={issue.severity} />\n              <DropdownIcon className=\"little-spacer-left\" />\n            </ButtonLink>\n          </Toggler>\n        </div>\n      );\n    }\n\n    return <SeverityHelper className=\"issue-meta-label\" severity={issue.severity} />;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function TagsIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M4.303 5.36a.94.94 0 0 0-.944-.945.94.94 0 0 0-.944.944c0 .524.42.944.944.944a.94.94 0 0 0 .944-.944zm7.866 4.246a.95.95 0 0 1-.273.663l-3.62 3.627a.95.95 0 0 1-1.334 0L1.671 8.618C1.295 8.249 1 7.534 1 7.01V3.944A.95.95 0 0 1 1.944 3H5.01c.523 0 1.238.295 1.614.67l5.271 5.265a.98.98 0 0 1 .273.67zm2.831 0a.95.95 0 0 1-.273.663l-3.62 3.627a.98.98 0 0 1-.67.273c-.384 0-.575-.177-.826-.435l3.465-3.465a.95.95 0 0 0 0-1.334L7.805 3.67C7.429 3.295 6.714 3 6.19 3h1.651c.524 0 1.239.295 1.615.67l5.271 5.265a.98.98 0 0 1 .273.67z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport DropdownIcon from '../../components/icons/DropdownIcon';\nimport TagsIcon from '../../components/icons/TagsIcon';\nimport { translateWithParameters } from '../../helpers/l10n';\nimport './TagsList.css';\n\ninterface Props {\n  allowUpdate?: boolean;\n  className?: string;\n  tags: string[];\n}\n\nexport default function TagsList({ allowUpdate = false, className, tags }: Props) {\n  return (\n    <span\n      aria-label={translateWithParameters('tags_list_x', tags.join(', '))}\n      className={classNames('tags-list', className)}>\n      <TagsIcon className=\"text-middle\" />\n      <span aria-hidden={true} className=\"text-ellipsis text-middle\" title={tags.join(', ')}>\n        {tags.join(', ')}\n      </span>\n      {allowUpdate && <DropdownIcon className=\"text-middle\" />}\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Checkbox from '../../components/controls/Checkbox';\nimport { translate } from '../../helpers/l10n';\n\nexport interface MultiSelectOptionProps {\n  active?: boolean;\n  custom?: boolean;\n  disabled?: boolean;\n  element: string;\n  onHover: (element: string) => void;\n  onSelectChange: (selected: boolean, element: string) => void;\n  renderLabel: (element: string) => React.ReactNode;\n  selected?: boolean;\n}\n\nexport default function MultiSelectOption(props: MultiSelectOptionProps) {\n  const { active, custom, disabled, element, selected } = props;\n  const onHover = () => props.onHover(element);\n  const className = classNames({ active, disabled });\n  const label = props.renderLabel(element);\n\n  return (\n    <li onFocus={onHover} onMouseOver={onHover}>\n      <Checkbox\n        checked={Boolean(selected)}\n        className={className}\n        disabled={disabled}\n        id={element}\n        onCheck={props.onSelectChange}>\n        {custom ? (\n          <span\n            aria-label={`${translate('create_new_element')}: ${label}`}\n            className=\"little-spacer-left\">\n            <span aria-hidden={true} className=\"little-spacer-right\">\n              +\n            </span>\n            {label}\n          </span>\n        ) : (\n          <span className=\"little-spacer-left\">{label}</span>\n        )}\n      </Checkbox>\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { difference } from 'lodash';\nimport * as React from 'react';\nimport SearchBox from '../../components/controls/SearchBox';\nimport { translateWithParameters } from '../../helpers/l10n';\nimport MultiSelectOption from './MultiSelectOption';\n\ninterface Props {\n  allowNewElements?: boolean;\n  allowSelection?: boolean;\n  elements: string[];\n  filterSelected?: (query: string, selectedElements: string[]) => string[];\n  footerNode?: React.ReactNode;\n  listSize?: number;\n  onSearch: (query: string) => Promise<void>;\n  onSelect: (item: string) => void;\n  onUnselect: (item: string) => void;\n  placeholder: string;\n  renderLabel?: (element: string) => React.ReactNode;\n  selectedElements: string[];\n  validateSearchInput?: (value: string) => string;\n}\n\ninterface State {\n  activeIdx: number;\n  loading: boolean;\n  query: string;\n  selectedElements: string[];\n  unselectedElements: string[];\n}\n\ninterface DefaultProps {\n  filterSelected: (query: string, selectedElements: string[]) => string[];\n  listSize: number;\n  renderLabel: (element: string) => React.ReactNode;\n  validateSearchInput: (value: string) => string;\n}\n\ntype PropsWithDefault = Props & DefaultProps;\n\nexport default class MultiSelect extends React.PureComponent<Props, State> {\n  container?: HTMLDivElement | null;\n  searchInput?: HTMLInputElement | null;\n  mounted = false;\n\n  static defaultProps: DefaultProps = {\n    filterSelected: (query: string, selectedElements: string[]) =>\n      selectedElements.filter(elem => elem.includes(query)),\n    listSize: 0,\n    renderLabel: (element: string) => element,\n    validateSearchInput: (value: string) => value\n  };\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      activeIdx: 0,\n      loading: true,\n      query: '',\n      selectedElements: [],\n      unselectedElements: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.onSearchQuery('');\n    this.updateSelectedElements(this.props as PropsWithDefault);\n    this.updateUnselectedElements(this.props as PropsWithDefault);\n    if (this.container) {\n      this.container.addEventListener('keydown', this.handleKeyboard, true);\n    }\n  }\n\n  componentWillReceiveProps(nextProps: PropsWithDefault) {\n    if (\n      this.props.elements !== nextProps.elements ||\n      this.props.selectedElements !== nextProps.selectedElements\n    ) {\n      this.updateSelectedElements(nextProps);\n      this.updateUnselectedElements(nextProps);\n\n      const totalElements = this.getAllElements(nextProps, this.state).length;\n      if (this.state.activeIdx >= totalElements) {\n        this.setState({ activeIdx: totalElements - 1 });\n      }\n    }\n  }\n\n  componentDidUpdate() {\n    if (this.searchInput) {\n      this.searchInput.focus();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    if (this.container) {\n      this.container.removeEventListener('keydown', this.handleKeyboard);\n    }\n  }\n\n  handleSelectChange = (selected: boolean, item: string) => {\n    if (selected) {\n      this.onSelectItem(item);\n    } else {\n      this.onUnselectItem(item);\n    }\n  };\n\n  handleSearchChange = (value: string) => {\n    this.onSearchQuery((this.props as PropsWithDefault).validateSearchInput(value));\n  };\n\n  handleElementHover = (element: string) => {\n    this.setState((prevState, props) => {\n      return { activeIdx: this.getAllElements(props, prevState).indexOf(element) };\n    });\n  };\n\n  handleKeyboard = (evt: KeyboardEvent) => {\n    switch (evt.keyCode) {\n      case 40: // down\n        evt.stopPropagation();\n        evt.preventDefault();\n        this.setState(this.selectNextElement);\n        break;\n      case 38: // up\n        evt.stopPropagation();\n        evt.preventDefault();\n        this.setState(this.selectPreviousElement);\n        break;\n      case 37: // left\n      case 39: // right\n        evt.stopPropagation();\n        break;\n      case 13: // enter\n        if (this.state.activeIdx >= 0) {\n          this.toggleSelect(this.getAllElements(this.props, this.state)[this.state.activeIdx]);\n        }\n        break;\n    }\n  };\n\n  onSearchQuery = (query: string) => {\n    this.setState({ activeIdx: 0, loading: true, query });\n    this.props.onSearch(query).then(this.stopLoading, this.stopLoading);\n  };\n\n  onSelectItem = (item: string) => {\n    if (this.isNewElement(item, this.props)) {\n      this.onSearchQuery('');\n    }\n    this.props.onSelect(item);\n  };\n\n  onUnselectItem = (item: string) => this.props.onUnselect(item);\n\n  isNewElement = (elem: string, { selectedElements, elements }: Props) =>\n    elem.length > 0 && selectedElements.indexOf(elem) === -1 && elements.indexOf(elem) === -1;\n\n  updateSelectedElements = (props: PropsWithDefault) => {\n    this.setState((state: State) => {\n      if (state.query) {\n        return {\n          selectedElements: props.filterSelected(state.query, props.selectedElements)\n        };\n      } else {\n        return { selectedElements: [...props.selectedElements] };\n      }\n    });\n  };\n\n  updateUnselectedElements = (props: PropsWithDefault) => {\n    this.setState((state: State) => {\n      if (props.listSize === 0) {\n        return { unselectedElements: difference(props.elements, props.selectedElements) };\n      } else if (props.listSize < state.selectedElements.length) {\n        return { unselectedElements: [] };\n      } else {\n        return {\n          unselectedElements: difference(props.elements, props.selectedElements).slice(\n            0,\n            props.listSize - state.selectedElements.length\n          )\n        };\n      }\n    });\n  };\n\n  getAllElements = (props: Props, state: State) => {\n    if (this.isNewElement(state.query, props)) {\n      return [...state.selectedElements, ...state.unselectedElements, state.query];\n    } else {\n      return [...state.selectedElements, ...state.unselectedElements];\n    }\n  };\n\n  setElementActive = (idx: number) => this.setState({ activeIdx: idx });\n\n  selectNextElement = (state: State, props: Props) => {\n    const { activeIdx } = state;\n    const allElements = this.getAllElements(props, state);\n    if (activeIdx < 0 || activeIdx >= allElements.length - 1) {\n      return { activeIdx: 0 };\n    } else {\n      return { activeIdx: activeIdx + 1 };\n    }\n  };\n\n  selectPreviousElement = (state: State, props: Props) => {\n    const { activeIdx } = state;\n    const allElements = this.getAllElements(props, state);\n    if (activeIdx <= 0) {\n      const lastIdx = allElements.length - 1;\n      return { activeIdx: lastIdx };\n    } else {\n      return { activeIdx: activeIdx - 1 };\n    }\n  };\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  toggleSelect = (item: string) => {\n    if (this.props.selectedElements.indexOf(item) === -1) {\n      this.onSelectItem(item);\n    } else {\n      this.onUnselectItem(item);\n    }\n  };\n\n  render() {\n    const { allowSelection = true, allowNewElements = true, footerNode = '' } = this.props;\n    const { renderLabel } = this.props as PropsWithDefault;\n    const { query, activeIdx, selectedElements, unselectedElements } = this.state;\n    const activeElement = this.getAllElements(this.props, this.state)[activeIdx];\n    const showNewElement = allowNewElements && this.isNewElement(query, this.props);\n    const infiniteList = this.props.listSize === 0;\n    const listClasses = classNames('menu', {\n      'menu-vertically-limited': infiniteList,\n      'spacer-top': infiniteList,\n      'with-top-separator': infiniteList,\n      'with-bottom-separator': Boolean(footerNode)\n    });\n\n    return (\n      <div className=\"multi-select\" ref={div => (this.container = div)}>\n        <div className=\"menu-search\">\n          <SearchBox\n            autoFocus={true}\n            className=\"little-spacer-top\"\n            loading={this.state.loading}\n            onChange={this.handleSearchChange}\n            placeholder={this.props.placeholder}\n            value={query}\n          />\n        </div>\n        <ul className={listClasses}>\n          {selectedElements.length > 0 &&\n            selectedElements.map(element => (\n              <MultiSelectOption\n                active={activeElement === element}\n                element={element}\n                key={element}\n                onHover={this.handleElementHover}\n                onSelectChange={this.handleSelectChange}\n                renderLabel={renderLabel}\n                selected={true}\n              />\n            ))}\n          {unselectedElements.length > 0 &&\n            unselectedElements.map(element => (\n              <MultiSelectOption\n                active={activeElement === element}\n                disabled={!allowSelection}\n                element={element}\n                key={element}\n                onHover={this.handleElementHover}\n                onSelectChange={this.handleSelectChange}\n                renderLabel={renderLabel}\n              />\n            ))}\n          {showNewElement && (\n            <MultiSelectOption\n              active={activeElement === query}\n              custom={true}\n              element={query}\n              key={query}\n              onHover={this.handleElementHover}\n              onSelectChange={this.handleSelectChange}\n              renderLabel={renderLabel}\n            />\n          )}\n          {!showNewElement && selectedElements.length < 1 && unselectedElements.length < 1 && (\n            <li className=\"spacer-left\">{translateWithParameters('no_results_for_x', query)}</li>\n          )}\n        </ul>\n        {footerNode}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport MultiSelect from '../common/MultiSelect';\nimport './TagsList.css';\n\ninterface Props {\n  listSize: number;\n  onSearch: (query: string) => Promise<void>;\n  onSelect: (item: string) => void;\n  onUnselect: (item: string) => void;\n  selectedTags: string[];\n  tags: string[];\n}\n\nexport default function TagsSelector(props: Props) {\n  return (\n    <MultiSelect\n      elements={props.tags}\n      listSize={props.listSize}\n      onSearch={props.onSearch}\n      onSelect={props.onSelect}\n      onUnselect={props.onUnselect}\n      placeholder={translate('search.search_for_tags')}\n      selectedElements={props.selectedTags}\n      validateSearchInput={validateTag}\n    />\n  );\n}\n\nexport function validateTag(value: string) {\n  // Allow only a-z, 0-9, '+', '-', '#', '.'\n  return value.toLowerCase().replace(/[^-a-z0-9+#.]/gi, '');\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { difference, without } from 'lodash';\nimport * as React from 'react';\nimport { searchIssueTags } from '../../../api/issues';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport TagsSelector from '../../tags/TagsSelector';\n\ninterface Props {\n  selectedTags: string[];\n  setTags: (tags: string[]) => void;\n}\n\ninterface State {\n  searchResult: string[];\n}\n\nconst LIST_SIZE = 10;\nconst MAX_LIST_SIZE = 100;\n\nexport default class SetIssueTagsPopup extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { searchResult: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  onSearch = (query: string) => {\n    return searchIssueTags({\n      all: true,\n      q: query,\n      ps: Math.min(this.props.selectedTags.length - 1 + LIST_SIZE, MAX_LIST_SIZE)\n    }).then(\n      (tags: string[]) => {\n        if (this.mounted) {\n          this.setState({ searchResult: tags });\n        }\n      },\n      () => {}\n    );\n  };\n\n  onSelect = (tag: string) => {\n    this.props.setTags([...this.props.selectedTags, tag]);\n  };\n\n  onUnselect = (tag: string) => {\n    this.props.setTags(without(this.props.selectedTags, tag));\n  };\n\n  render() {\n    const availableTags = difference(this.state.searchResult, this.props.selectedTags);\n    return (\n      <DropdownOverlay placement={PopupPlacement.BottomRight}>\n        <TagsSelector\n          listSize={LIST_SIZE}\n          onSearch={this.onSearch}\n          onSelect={this.onSelect}\n          onUnselect={this.onUnselect}\n          selectedTags={this.props.selectedTags}\n          tags={availableTags}\n        />\n      </DropdownOverlay>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setIssueTags } from '../../../api/issues';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport { translate } from '../../../helpers/l10n';\nimport TagsList from '../../tags/TagsList';\nimport { updateIssue } from '../actions';\nimport SetIssueTagsPopup from '../popups/SetIssueTagsPopup';\n\ninterface Props {\n  canSetTags: boolean;\n  isOpen: boolean;\n  issue: Pick<T.Issue, 'key' | 'tags'>;\n  onChange: (issue: T.Issue) => void;\n  togglePopup: (popup: string, show?: boolean) => void;\n}\n\nexport default class IssueTags extends React.PureComponent<Props> {\n  toggleSetTags = (open?: boolean) => {\n    this.props.togglePopup('edit-tags', open);\n  };\n\n  setTags = (tags: string[]) => {\n    const { issue } = this.props;\n    const newIssue = { ...issue, tags };\n    updateIssue(\n      this.props.onChange,\n      setIssueTags({ issue: issue.key, tags: tags.join(',') }),\n      issue as T.Issue,\n      newIssue as T.Issue\n    );\n  };\n\n  handleClose = () => {\n    this.toggleSetTags(false);\n  };\n\n  render() {\n    const { issue } = this.props;\n    const { tags = [] } = issue;\n\n    if (this.props.canSetTags) {\n      return (\n        <div className=\"dropdown\">\n          <Toggler\n            onRequestClose={this.handleClose}\n            open={this.props.isOpen}\n            overlay={<SetIssueTagsPopup selectedTags={tags} setTags={this.setTags} />}>\n            <ButtonLink\n              aria-expanded={this.props.isOpen}\n              className=\"issue-action issue-action-with-options js-issue-edit-tags\"\n              onClick={this.toggleSetTags}>\n              <TagsList\n                allowUpdate={this.props.canSetTags}\n                tags={\n                  issue.tags && issue.tags.length > 0 ? issue.tags : [translate('issue.no_tag')]\n                }\n              />\n            </ButtonLink>\n          </Toggler>\n        </div>\n      );\n    }\n\n    return (\n      <TagsList\n        allowUpdate={this.props.canSetTags}\n        className=\"note\"\n        tags={issue.tags && issue.tags.length > 0 ? issue.tags : [translate('issue.no_tag')]}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\ninterface Props extends IconProps {\n  status: string;\n}\n\nconst statusIcons: T.Dict<(props: IconProps) => React.ReactElement> = {\n  open: OpenStatusIcon,\n  confirmed: ConfirmedStatusIcon,\n  reopened: ReopenedStatusIcon,\n  resolved: ResolvedStatusIcon,\n  closed: ClosedStatusIcon,\n  to_review: OpenStatusIcon,\n  in_review: ConfirmedStatusIcon,\n  reviewed: ResolvedStatusIcon\n};\n\nexport default function StatusIcon({ status, ...iconProps }: Props) {\n  const DesiredStatusIcon = statusIcons[status.toLowerCase()];\n  return DesiredStatusIcon ? <DesiredStatusIcon {...iconProps} /> : null;\n}\n\nfunction OpenStatusIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 3.75c-.77 0-1.482.19-2.133.57A4.25 4.25 0 0 0 4.32 5.867c-.38.65-.57 1.362-.57 2.133 0 .77.19 1.482.57 2.133.38.65.896 1.167 1.547 1.547.65.38 1.362.57 2.133.57.77 0 1.482-.19 2.133-.57a4.242 4.242 0 0 0 1.547-1.547c.38-.65.57-1.362.57-2.133 0-.77-.19-1.482-.57-2.133a4.25 4.25 0 0 0-1.547-1.547A4.153 4.153 0 0 0 8 3.75zM14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z\"\n        style={{ fill: colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction ConfirmedStatusIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M10 8c0 .552-.195 1.023-.586 1.414-.39.39-.862.586-1.414.586a1.926 1.926 0 0 1-1.414-.586A1.928 1.928 0 0 1 6 8c0-.552.195-1.023.586-1.414C6.976 6.196 7.448 6 8 6c.552 0 1.023.195 1.414.586.39.39.586.862.586 1.414zM8 3.75c-.77 0-1.482.19-2.133.57A4.25 4.25 0 0 0 4.32 5.867c-.38.65-.57 1.362-.57 2.133 0 .77.19 1.482.57 2.133.38.65.896 1.167 1.547 1.547.65.38 1.362.57 2.133.57.77 0 1.482-.19 2.133-.57a4.242 4.242 0 0 0 1.547-1.547c.38-.65.57-1.362.57-2.133 0-.77-.19-1.482-.57-2.133a4.25 4.25 0 0 0-1.547-1.547A4.153 4.153 0 0 0 8 3.75zM14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z\"\n        style={{ fill: colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction ReopenedStatusIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 12.25v-8.5c-.77 0-1.482.19-2.133.57A4.25 4.25 0 0 0 4.32 5.867c-.38.65-.57 1.362-.57 2.133 0 .77.19 1.482.57 2.133.38.65.896 1.167 1.547 1.547.65.38 1.362.57 2.133.57zM14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z\"\n        style={{ fill: colors.blue }}\n      />\n    </Icon>\n  );\n}\n\nfunction ResolvedStatusIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M12.03 6.734a.49.49 0 0 0-.14-.36l-.71-.702a.48.48 0 0 0-.352-.15.474.474 0 0 0-.35.15l-3.19 3.18-1.765-1.766a.479.479 0 0 0-.35-.15.479.479 0 0 0-.353.15l-.71.703a.482.482 0 0 0-.14.358c0 .14.046.258.14.352l2.828 2.828c.098.1.216.15.35.15.142 0 .26-.05.36-.15l4.243-4.242a.475.475 0 0 0 .14-.352l-.001.001zM14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z\"\n        style={{ fill: colors.baseFontColor }}\n      />\n    </Icon>\n  );\n}\n\nfunction ClosedStatusIcon(iconProps: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z\"\n        style={{ fill: colors.baseFontColor }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport StatusIcon from '../../components/icons/StatusIcon';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  className?: string;\n  resolution: string | undefined;\n  status: string;\n}\n\nexport default function StatusHelper(props: Props) {\n  const resolution = props.resolution && ` (${translate('issue.resolution', props.resolution)})`;\n  return (\n    <span className={props.className}>\n      <StatusIcon className=\"little-spacer-right\" status={props.status} />\n      {translate('issue.status', props.status)}\n      {resolution}\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport { hasMessage, translate } from '../../../helpers/l10n';\nimport SelectList from '../../common/SelectList';\nimport SelectListItem from '../../common/SelectListItem';\n\nexport interface Props {\n  fromHotspot: boolean;\n  onSelect: (transition: string) => void;\n  transitions: string[];\n  type: T.IssueType;\n}\n\nexport default function SetTransitionPopup({ fromHotspot, onSelect, transitions, type }: Props) {\n  const isManualVulnerability = fromHotspot && type === 'VULNERABILITY';\n  return (\n    <DropdownOverlay>\n      <SelectList currentItem={transitions[0]} items={transitions} onSelect={onSelect}>\n        {transitions.map(transition => {\n          const [name, description] = translateTransition(transition, isManualVulnerability);\n          return (\n            <SelectListItem item={transition} key={transition} title={description}>\n              {name}\n            </SelectListItem>\n          );\n        })}\n      </SelectList>\n    </DropdownOverlay>\n  );\n}\n\nfunction translateTransition(transition: string, isManualVulnerability: boolean) {\n  return isManualVulnerability && hasMessage('vulnerability.transition', transition)\n    ? [\n        translate('vulnerability.transition', transition),\n        translate('vulnerability.transition', transition, 'description')\n      ]\n    : [\n        translate('issue.transition', transition),\n        <FormattedMessage\n          key=\"description\"\n          defaultMessage={translate('issue.transition', transition, 'description')}\n          id={`issue.transition.${transition}.description`}\n          values={{\n            community_plug_link: (\n              <a\n                href=\"https://community.sonarsource.com/\"\n                rel=\"noopener noreferrer\"\n                target=\"_blank\">\n                {translate('issue.transition.community_plug_link')}\n              </a>\n            )\n          }}\n        />\n      ];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setIssueTransition } from '../../../api/issues';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport StatusHelper from '../../shared/StatusHelper';\nimport { updateIssue } from '../actions';\nimport SetTransitionPopup from '../popups/SetTransitionPopup';\n\ninterface Props {\n  hasTransitions: boolean;\n  isOpen: boolean;\n  issue: Pick<T.Issue, 'fromHotspot' | 'key' | 'resolution' | 'status' | 'transitions' | 'type'>;\n  onChange: (issue: T.Issue) => void;\n  togglePopup: (popup: string, show?: boolean) => void;\n}\n\nexport default class IssueTransition extends React.PureComponent<Props> {\n  setTransition = (transition: string) => {\n    updateIssue(\n      this.props.onChange,\n      setIssueTransition({ issue: this.props.issue.key, transition })\n    );\n    this.toggleSetTransition();\n  };\n\n  toggleSetTransition = (open?: boolean) => {\n    this.props.togglePopup('transition', open);\n  };\n\n  handleClose = () => {\n    this.toggleSetTransition(false);\n  };\n\n  render() {\n    const { issue } = this.props;\n\n    if (this.props.hasTransitions) {\n      return (\n        <div className=\"dropdown\">\n          <Toggler\n            onRequestClose={this.handleClose}\n            open={this.props.isOpen && this.props.hasTransitions}\n            overlay={\n              <SetTransitionPopup\n                fromHotspot={issue.fromHotspot}\n                onSelect={this.setTransition}\n                transitions={issue.transitions}\n                type={issue.type}\n              />\n            }>\n            <ButtonLink\n              aria-label={translateWithParameters(\n                'issue.transition.status_x_click_to_change',\n                translate('issue.status', issue.status)\n              )}\n              aria-expanded={this.props.isOpen}\n              className=\"issue-action issue-action-with-options js-issue-transition\"\n              onClick={this.toggleSetTransition}>\n              <StatusHelper\n                className=\"issue-meta-label\"\n                resolution={issue.resolution}\n                status={issue.status}\n              />\n              <DropdownIcon className=\"little-spacer-left\" />\n            </ButtonLink>\n          </Toggler>\n        </div>\n      );\n    }\n\n    return (\n      <StatusHelper\n        className=\"issue-meta-label\"\n        resolution={issue.resolution}\n        status={issue.status}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BugIcon from './BugIcon';\nimport CodeSmellIcon from './CodeSmellIcon';\nimport { IconProps } from './Icon';\nimport SecurityHotspotIcon from './SecurityHotspotIcon';\nimport VulnerabilityIcon from './VulnerabilityIcon';\n\ninterface Props extends IconProps {\n  type: T.IssueType;\n}\n\nexport default function IssueIcon({ type, ...iconProps }: Props) {\n  switch (type) {\n    case 'BUG':\n      return <BugIcon {...iconProps} />;\n    case 'VULNERABILITY':\n      return <VulnerabilityIcon {...iconProps} />;\n    case 'CODE_SMELL':\n      return <CodeSmellIcon {...iconProps} />;\n    case 'SECURITY_HOTSPOT':\n      return <SecurityHotspotIcon {...iconProps} />;\n    default:\n      return null;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { IconProps } from './Icon';\nimport IssueIcon from './IssueIcon';\n\nexport interface Props extends IconProps {\n  query: string;\n}\n\nexport default function IssueTypeIcon({ query, ...iconProps }: Props) {\n  let type: T.IssueType;\n\n  switch (query.toLowerCase()) {\n    case 'bug':\n    case 'bugs':\n    case 'new_bugs':\n      type = 'BUG';\n      break;\n    case 'vulnerability':\n    case 'vulnerabilities':\n    case 'new_vulnerabilities':\n      type = 'VULNERABILITY';\n      break;\n    case 'code_smell':\n    case 'code_smells':\n    case 'new_code_smells':\n      type = 'CODE_SMELL';\n      break;\n    case 'security_hotspot':\n    case 'security_hotspots':\n    case 'new_security_hotspots':\n      type = 'SECURITY_HOTSPOT';\n      break;\n    default:\n      return null;\n  }\n\n  return <IssueIcon type={type} {...iconProps} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport { translate } from '../../../helpers/l10n';\nimport SelectList from '../../common/SelectList';\nimport SelectListItem from '../../common/SelectListItem';\n\ninterface Props {\n  issue: Pick<T.Issue, 'type'>;\n  onSelect: (type: T.IssueType) => void;\n}\n\nconst TYPES = ['BUG', 'VULNERABILITY', 'CODE_SMELL'];\n\nexport default function SetTypePopup({ issue, onSelect }: Props) {\n  return (\n    <DropdownOverlay>\n      <SelectList currentItem={issue.type} items={TYPES} onSelect={onSelect}>\n        {TYPES.map(type => (\n          <SelectListItem className=\"display-flex-center\" item={type} key={type}>\n            <IssueTypeIcon className=\"little-spacer-right\" query={type} />\n            {translate('issue.type', type)}\n          </SelectListItem>\n        ))}\n      </SelectList>\n    </DropdownOverlay>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setIssueType } from '../../../api/issues';\nimport { colors } from '../../../app/theme';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { IssueResponse } from '../../../types/issues';\nimport SetTypePopup from '../popups/SetTypePopup';\n\ninterface Props {\n  canSetType: boolean;\n  isOpen: boolean;\n  issue: Pick<T.Issue, 'type'>;\n  setIssueProperty: (\n    property: keyof T.Issue,\n    popup: string,\n    apiCall: (query: T.RawQuery) => Promise<IssueResponse>,\n    value: string\n  ) => void;\n  togglePopup: (popup: string, show?: boolean) => void;\n}\n\nexport default class IssueType extends React.PureComponent<Props> {\n  toggleSetType = (open?: boolean) => {\n    this.props.togglePopup('set-type', open);\n  };\n\n  setType = (type: string) => {\n    this.props.setIssueProperty('type', 'set-type', setIssueType, type);\n  };\n\n  handleClose = () => {\n    this.toggleSetType(false);\n  };\n\n  render() {\n    const { issue } = this.props;\n    if (this.props.canSetType) {\n      return (\n        <div className=\"dropdown\">\n          <Toggler\n            onRequestClose={this.handleClose}\n            open={this.props.isOpen && this.props.canSetType}\n            overlay={<SetTypePopup issue={issue} onSelect={this.setType} />}>\n            <ButtonLink\n              aria-label={translateWithParameters(\n                'issue.type.type_x_click_to_change',\n                translate('issue.type', issue.type)\n              )}\n              aria-expanded={this.props.isOpen}\n              className=\"issue-action issue-action-with-options js-issue-set-type\"\n              onClick={this.toggleSetType}>\n              <IssueTypeIcon\n                className=\"little-spacer-right\"\n                fill={colors.baseFontColor}\n                query={issue.type}\n              />\n              {translate('issue.type', issue.type)}\n              <DropdownIcon className=\"little-spacer-left\" />\n            </ButtonLink>\n          </Toggler>\n        </div>\n      );\n    }\n\n    return (\n      <span>\n        <IssueTypeIcon className=\"little-spacer-right\" query={issue.type} />\n        {translate('issue.type', issue.type)}\n      </span>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { IssueResponse } from '../../../types/issues';\nimport { updateIssue } from '../actions';\nimport IssueAssign from './IssueAssign';\nimport IssueCommentAction from './IssueCommentAction';\nimport IssueSeverity from './IssueSeverity';\nimport IssueTags from './IssueTags';\nimport IssueTransition from './IssueTransition';\nimport IssueType from './IssueType';\n\ninterface Props {\n  issue: T.Issue;\n  currentPopup?: string;\n  onAssign: (login: string) => void;\n  onChange: (issue: T.Issue) => void;\n  togglePopup: (popup: string, show?: boolean) => void;\n}\n\ninterface State {\n  commentAutoTriggered: boolean;\n  commentPlaceholder: string;\n}\n\nexport default class IssueActionsBar extends React.PureComponent<Props, State> {\n  state: State = {\n    commentAutoTriggered: false,\n    commentPlaceholder: ''\n  };\n\n  setIssueProperty = (\n    property: keyof T.Issue,\n    popup: string,\n    apiCall: (query: T.RawQuery) => Promise<IssueResponse>,\n    value: string\n  ) => {\n    const { issue } = this.props;\n    if (issue[property] !== value) {\n      const newIssue = { ...issue, [property]: value };\n      updateIssue(\n        this.props.onChange,\n        apiCall({ issue: issue.key, [property]: value }),\n        issue,\n        newIssue\n      );\n    }\n    this.props.togglePopup(popup, false);\n  };\n\n  toggleComment = (open: boolean | undefined, placeholder = '', autoTriggered = false) => {\n    this.setState({\n      commentPlaceholder: placeholder,\n      commentAutoTriggered: autoTriggered\n    });\n    this.props.togglePopup('comment', open);\n  };\n\n  handleTransition = (issue: T.Issue) => {\n    this.props.onChange(issue);\n    if (\n      issue.resolution === 'FALSE-POSITIVE' ||\n      (issue.resolution === 'WONTFIX' && issue.type !== 'SECURITY_HOTSPOT')\n    ) {\n      this.toggleComment(true, translate('issue.comment.explain_why'), true);\n    }\n  };\n\n  render() {\n    const { issue } = this.props;\n    const canAssign = issue.actions.includes('assign');\n    const canComment = issue.actions.includes('comment');\n    const canSetSeverity = issue.actions.includes('set_severity');\n    const canSetType = issue.actions.includes('set_type');\n    const canSetTags = issue.actions.includes('set_tags');\n    const hasTransitions = issue.transitions && issue.transitions.length > 0;\n    const isSecurityHotspot = issue.type === 'SECURITY_HOTSPOT';\n\n    return (\n      <div className=\"issue-actions\">\n        <div className=\"issue-meta-list\">\n          <div className=\"issue-meta\">\n            <IssueType\n              canSetType={canSetType}\n              isOpen={this.props.currentPopup === 'set-type' && canSetType}\n              issue={issue}\n              setIssueProperty={this.setIssueProperty}\n              togglePopup={this.props.togglePopup}\n            />\n          </div>\n          {!isSecurityHotspot && (\n            <div className=\"issue-meta\">\n              <IssueSeverity\n                canSetSeverity={canSetSeverity}\n                isOpen={this.props.currentPopup === 'set-severity' && canSetSeverity}\n                issue={issue}\n                setIssueProperty={this.setIssueProperty}\n                togglePopup={this.props.togglePopup}\n              />\n            </div>\n          )}\n          <div className=\"issue-meta\">\n            <IssueTransition\n              hasTransitions={hasTransitions}\n              isOpen={this.props.currentPopup === 'transition' && hasTransitions}\n              issue={issue}\n              onChange={this.handleTransition}\n              togglePopup={this.props.togglePopup}\n            />\n          </div>\n          <div className=\"issue-meta\">\n            <IssueAssign\n              canAssign={canAssign}\n              isOpen={this.props.currentPopup === 'assign' && canAssign}\n              issue={issue}\n              onAssign={this.props.onAssign}\n              togglePopup={this.props.togglePopup}\n            />\n          </div>\n          {!isSecurityHotspot && issue.effort && (\n            <div className=\"issue-meta\">\n              <span className=\"issue-meta-label\">\n                {translateWithParameters('issue.x_effort', issue.effort)}\n              </span>\n            </div>\n          )}\n          {canComment && (\n            <IssueCommentAction\n              commentAutoTriggered={this.state.commentAutoTriggered}\n              commentPlaceholder={this.state.commentPlaceholder}\n              currentPopup={this.props.currentPopup}\n              issueKey={issue.key}\n              onChange={this.props.onChange}\n              toggleComment={this.toggleComment}\n            />\n          )}\n        </div>\n        <div className=\"list-inline\">\n          <div className=\"issue-meta js-issue-tags\">\n            <IssueTags\n              canSetTags={canSetTags}\n              isOpen={this.props.currentPopup === 'edit-tags' && canSetTags}\n              issue={issue}\n              onChange={this.props.onChange}\n              togglePopup={this.props.togglePopup}\n            />\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onDelete: () => void;\n}\n\nexport default function CommentDeletePopup({ onDelete }: Props) {\n  return (\n    <DropdownOverlay placement={PopupPlacement.BottomRight}>\n      <div className=\"menu is-container\">\n        <div className=\"spacer-bottom\">{translate('issue.comment.delete_confirm_message')}</div>\n        <Button className=\"button-red\" onClick={onDelete}>\n          {translate('delete')}\n        </Button>\n      </div>\n    </DropdownOverlay>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DeleteButton, EditButton } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { sanitizeString } from '../../../helpers/sanitize';\nimport DateFromNow from '../../intl/DateFromNow';\nimport Avatar from '../../ui/Avatar';\nimport CommentDeletePopup from '../popups/CommentDeletePopup';\nimport CommentPopup from '../popups/CommentPopup';\n\ninterface Props {\n  comment: T.IssueComment;\n  onDelete: (comment: string) => void;\n  onEdit: (comment: string, text: string) => void;\n}\n\ninterface State {\n  openPopup: string;\n}\n\nexport default class IssueCommentLine extends React.PureComponent<Props, State> {\n  state: State = {\n    openPopup: ''\n  };\n\n  handleEdit = (text: string) => {\n    this.props.onEdit(this.props.comment.key, text);\n    this.toggleEditPopup(false);\n  };\n\n  handleDelete = () => {\n    this.props.onDelete(this.props.comment.key);\n    this.toggleDeletePopup(false);\n  };\n\n  togglePopup = (popupName: string, force?: boolean) => {\n    this.setState(prevState => {\n      if (prevState.openPopup !== popupName && force !== false) {\n        return { openPopup: popupName };\n      } else if (prevState.openPopup === popupName && force !== true) {\n        return { openPopup: '' };\n      }\n      return prevState;\n    });\n  };\n\n  toggleDeletePopup = (force?: boolean) => {\n    this.togglePopup('delete', force);\n  };\n\n  toggleEditPopup = (force?: boolean) => {\n    this.togglePopup('edit', force);\n  };\n\n  closePopups = () => {\n    this.setState({ openPopup: '' });\n  };\n\n  render() {\n    const { comment } = this.props;\n    const author = comment.authorName || comment.author;\n    const displayName =\n      comment.authorActive === false && author\n        ? translateWithParameters('user.x_deleted', author)\n        : author;\n    return (\n      <div className=\"issue-comment\">\n        <div className=\"issue-comment-author\" title={displayName}>\n          <Avatar\n            className=\"little-spacer-right\"\n            hash={comment.authorAvatar}\n            name={author}\n            size={16}\n          />\n          {displayName}\n        </div>\n        <div\n          className=\"issue-comment-text markdown\"\n          // eslint-disable-next-line react/no-danger\n          dangerouslySetInnerHTML={{ __html: sanitizeString(comment.htmlText) }}\n        />\n        <div className=\"issue-comment-age\">\n          <span className=\"a11y-hidden\">{translate('issue.comment.posted_on')}</span>\n          <DateFromNow date={comment.createdAt} />\n        </div>\n        <div className=\"issue-comment-actions\">\n          {comment.updatable && (\n            <div className=\"dropdown\">\n              <Toggler\n                closeOnClickOutside={false}\n                onRequestClose={this.closePopups}\n                open={this.state.openPopup === 'edit'}\n                overlay={\n                  <CommentPopup\n                    comment={comment}\n                    onComment={this.handleEdit}\n                    placeholder=\"\"\n                    placement={PopupPlacement.BottomRight}\n                    toggleComment={this.toggleEditPopup}\n                  />\n                }>\n                <EditButton\n                  aria-label={translate('issue.comment.edit')}\n                  className=\"js-issue-comment-edit button-small\"\n                  onClick={this.toggleEditPopup}\n                />\n              </Toggler>\n            </div>\n          )}\n          {comment.updatable && (\n            <div className=\"dropdown\">\n              <Toggler\n                onRequestClose={this.closePopups}\n                open={this.state.openPopup === 'delete'}\n                overlay={<CommentDeletePopup onDelete={this.handleDelete} />}>\n                <DeleteButton\n                  aria-label={translate('issue.comment.delete')}\n                  className=\"js-issue-comment-delete button-small\"\n                  onClick={this.toggleDeletePopup}\n                />\n              </Toggler>\n            </div>\n          )}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function LinkIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <g transform=\"matrix(0.823497,0,0,0.823497,1.47008,1.4122)\">\n        <path\n          d=\"M13.501,11.429C13.501,11.191 13.418,10.989 13.251,10.822L11.394,8.965C11.227,8.798 11.025,8.715 10.787,8.715C10.537,8.715 10.323,8.81 10.144,9.001C10.162,9.019 10.219,9.074 10.314,9.166C10.409,9.258 10.473,9.322 10.506,9.358C10.539,9.394 10.583,9.451 10.64,9.528C10.697,9.605 10.735,9.681 10.756,9.756C10.777,9.831 10.787,9.913 10.787,10.002C10.787,10.24 10.704,10.442 10.537,10.609C10.37,10.776 10.168,10.859 9.93,10.859C9.841,10.859 9.759,10.849 9.684,10.828C9.609,10.807 9.533,10.769 9.456,10.712C9.379,10.655 9.322,10.611 9.286,10.578C9.25,10.545 9.186,10.481 9.094,10.386C9.002,10.291 8.947,10.234 8.929,10.216C8.732,10.401 8.634,10.618 8.634,10.868C8.634,11.106 8.717,11.308 8.884,11.475L10.723,13.323C10.884,13.484 11.086,13.564 11.33,13.564C11.568,13.564 11.77,13.487 11.937,13.332L13.25,12.028C13.417,11.861 13.5,11.662 13.5,11.43L13.501,11.429ZM7.224,5.134C7.224,4.896 7.141,4.694 6.974,4.527L5.135,2.679C4.968,2.512 4.766,2.429 4.528,2.429C4.296,2.429 4.094,2.509 3.921,2.67L2.608,3.974C2.441,4.141 2.358,4.34 2.358,4.572C2.358,4.81 2.441,5.012 2.608,5.179L4.465,7.036C4.626,7.197 4.828,7.277 5.072,7.277C5.322,7.277 5.536,7.185 5.715,7C5.697,6.982 5.64,6.927 5.545,6.835C5.45,6.743 5.386,6.679 5.353,6.643C5.32,6.607 5.276,6.55 5.219,6.473C5.162,6.396 5.124,6.32 5.103,6.245C5.082,6.17 5.072,6.088 5.072,5.999C5.072,5.761 5.155,5.559 5.322,5.392C5.489,5.225 5.691,5.142 5.929,5.142C6.018,5.142 6.1,5.152 6.175,5.173C6.25,5.194 6.326,5.232 6.403,5.289C6.48,5.346 6.537,5.39 6.573,5.423C6.609,5.456 6.673,5.52 6.765,5.615C6.857,5.71 6.912,5.767 6.93,5.785C7.127,5.6 7.225,5.383 7.225,5.133L7.224,5.134ZM15.215,11.429C15.215,12.143 14.962,12.747 14.456,13.242L13.143,14.546C12.649,15.04 12.045,15.287 11.33,15.287C10.61,15.287 10.003,15.034 9.509,14.528L7.67,12.68C7.176,12.186 6.929,11.582 6.929,10.867C6.929,10.135 7.191,9.513 7.715,9.001L6.929,8.215C6.417,8.739 5.798,9.001 5.072,9.001C4.358,9.001 3.751,8.751 3.251,8.251L1.394,6.394C0.894,5.894 0.644,5.287 0.644,4.573C0.644,3.859 0.897,3.255 1.403,2.76L2.716,1.456C3.21,0.962 3.814,0.715 4.529,0.715C5.249,0.715 5.856,0.968 6.35,1.474L8.189,3.322C8.683,3.816 8.93,4.42 8.93,5.135C8.93,5.867 8.668,6.489 8.144,7.001L8.93,7.787C9.442,7.263 10.061,7.001 10.787,7.001C11.501,7.001 12.108,7.251 12.608,7.751L14.465,9.608C14.965,10.108 15.215,10.715 15.215,11.429L15.215,11.429Z\"\n          style={{ fill }}\n        />\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\n\ninterface Props {\n  diff: T.IssueChangelogDiff;\n}\n\nexport default function IssueChangelogDiff({ diff }: Props) {\n  if (diff.key === 'file') {\n    return (\n      <p>\n        {translateWithParameters(\n          'issue.change.file_move',\n          diff.oldValue || '',\n          diff.newValue || ''\n        )}\n      </p>\n    );\n  } else if (['from_long_branch', 'from_branch'].includes(diff.key)) {\n    return (\n      <p>\n        {translateWithParameters(\n          'issue.change.from_branch',\n          diff.oldValue || '',\n          diff.newValue || ''\n        )}\n      </p>\n    );\n  } else if (diff.key === 'from_short_branch') {\n    // Applies to both legacy short lived branch and pull request\n    return (\n      <p>\n        {translateWithParameters(\n          'issue.change.from_non_branch',\n          diff.oldValue || '',\n          diff.newValue || ''\n        )}\n      </p>\n    );\n  } else if (diff.key === 'line') {\n    return <p>{translateWithParameters('issue.changelog.line_removed_X', diff.oldValue || '')}</p>;\n  }\n\n  let message;\n  if (diff.newValue != null) {\n    let { newValue } = diff;\n    if (diff.key === 'effort') {\n      newValue = formatMeasure(diff.newValue, 'WORK_DUR');\n    }\n    message = translateWithParameters(\n      'issue.changelog.changed_to',\n      translate('issue.changelog.field', diff.key),\n      newValue\n    );\n  } else {\n    message = translateWithParameters(\n      'issue.changelog.removed',\n      translate('issue.changelog.field', diff.key)\n    );\n  }\n\n  if (diff.oldValue != null) {\n    let { oldValue } = diff;\n    if (diff.key === 'effort') {\n      oldValue = formatMeasure(diff.oldValue, 'WORK_DUR');\n    }\n    message += ` (${translateWithParameters('issue.changelog.was', oldValue)})`;\n  }\n  return <p>{message}</p>;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getIssueChangelog } from '../../../api/issues';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport DateTimeFormatter from '../../intl/DateTimeFormatter';\nimport Avatar from '../../ui/Avatar';\nimport IssueChangelogDiff from '../components/IssueChangelogDiff';\n\ninterface Props {\n  issue: Pick<T.Issue, 'author' | 'creationDate' | 'key'>;\n}\n\ninterface State {\n  changelog: T.IssueChangelog[];\n}\n\nexport default class ChangelogPopup extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { changelog: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadChangelog();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadChangelog() {\n    getIssueChangelog(this.props.issue.key).then(\n      ({ changelog }) => {\n        if (this.mounted) {\n          this.setState({ changelog });\n        }\n      },\n      () => {}\n    );\n  }\n\n  render() {\n    const { issue } = this.props;\n    const { author } = issue;\n    return (\n      <DropdownOverlay placement={PopupPlacement.BottomRight}>\n        <div className=\"menu is-container issue-changelog\">\n          <table className=\"spaced\">\n            <tbody>\n              <tr>\n                <td className=\"thin text-left text-top nowrap\">\n                  <DateTimeFormatter date={issue.creationDate} />\n                </td>\n                <td className=\"text-left text-top\">\n                  {author ? `${translate('created_by')} ${author}` : translate('created')}\n                </td>\n              </tr>\n\n              {this.state.changelog.map((item, idx) => {\n                const userName = item.userName || item.user;\n\n                return (\n                  <tr key={idx}>\n                    <td className=\"thin text-left text-top nowrap\">\n                      <DateTimeFormatter date={item.creationDate} />\n                    </td>\n                    <td className=\"text-left text-top\">\n                      {userName && (\n                        <p>\n                          <Avatar\n                            className=\"little-spacer-right\"\n                            hash={item.avatar}\n                            name={userName}\n                            size={16}\n                          />\n                          {item.isUserActive\n                            ? userName\n                            : translateWithParameters('user.x_deleted', userName)}\n                        </p>\n                      )}\n                      {item.diffs.map(diff => (\n                        <IssueChangelogDiff diff={diff} key={diff.key} />\n                      ))}\n                    </td>\n                  </tr>\n                );\n              })}\n            </tbody>\n          </table>\n        </div>\n      </DropdownOverlay>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport DateFromNow from '../../intl/DateFromNow';\nimport ChangelogPopup from '../popups/ChangelogPopup';\n\ninterface Props {\n  isOpen: boolean;\n  issue: Pick<T.Issue, 'author' | 'creationDate' | 'key'>;\n  creationDate: string;\n  togglePopup: (popup: string, show?: boolean) => void;\n}\n\nexport default class IssueChangelog extends React.PureComponent<Props> {\n  toggleChangelog = (open?: boolean) => {\n    this.props.togglePopup('changelog', open);\n  };\n\n  handleClick = () => {\n    this.toggleChangelog();\n  };\n\n  handleClose = () => {\n    this.toggleChangelog(false);\n  };\n\n  render() {\n    return (\n      <div className=\"dropdown\">\n        <Toggler\n          onRequestClose={this.handleClose}\n          open={this.props.isOpen}\n          overlay={<ChangelogPopup issue={this.props.issue} />}>\n          <ButtonLink\n            aria-expanded={this.props.isOpen}\n            className=\"issue-action issue-action-with-options js-issue-show-changelog\"\n            onClick={this.handleClick}>\n            <span className=\"issue-meta-label\">\n              <DateFromNow date={this.props.creationDate} />\n            </span>\n            <DropdownIcon className=\"little-spacer-left\" />\n          </ButtonLink>\n        </Toggler>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum RuleStatus {\n  Ready = 'READY',\n  Beta = 'BETA',\n  Deprecated = 'DEPRECATED',\n  Removed = 'REMOVED'\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { isWebUri } from 'valid-url';\nimport HelpTooltip from '../../components/controls/HelpTooltip';\nimport DetachIcon from '../../components/icons/DetachIcon';\n\nexport interface DocumentationTooltipProps {\n  children?: React.ReactNode;\n  className?: string;\n  content?: React.ReactNode;\n  links?: Array<{ href: string; label: string; inPlace?: boolean }>;\n  title?: string;\n}\n\nexport default function DocumentationTooltip(props: DocumentationTooltipProps) {\n  const { className, content, links, title } = props;\n\n  return (\n    <HelpTooltip\n      className={className}\n      overlay={\n        <div className=\"big-padded-top big-padded-bottom\">\n          {title && (\n            <div className=\"spacer-bottom\">\n              <strong>{title}</strong>\n            </div>\n          )}\n\n          {content && <p>{content}</p>}\n\n          {links && (\n            <>\n              <hr className=\"big-spacer-top big-spacer-bottom\" />\n\n              {links.map(({ href, label, inPlace }) => (\n                <div className=\"little-spacer-bottom\" key={label}>\n                  {inPlace ? (\n                    <Link to={href}>\n                      <span>{label}</span>\n                    </Link>\n                  ) : (\n                    <Link\n                      className=\"display-inline-flex-center link-with-icon\"\n                      to={href}\n                      rel=\"noopener noreferrer\"\n                      target=\"_blank\">\n                      {isWebUri(href) && <DetachIcon size={14} className=\"spacer-right\" />}\n                      <span>{label}</span>\n                    </Link>\n                  )}\n                </div>\n              ))}\n            </>\n          )}\n        </div>\n      }>\n      {props.children}\n    </HelpTooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function SonarLintIcon(props: IconProps) {\n  return (\n    <Icon {...props} viewBox=\"0 0 512 512\">\n      <defs>\n        <path id=\"a\" d=\"M0 0h512v512H0z\" />\n      </defs>\n      <clipPath id=\"b\">\n        <use xlinkHref=\"#a\" style={{ overflow: 'visible' }} />\n      </clipPath>\n      <path\n        d=\"M255.7 450.7c-107.8 0-195.5-87.6-195.5-195.3 0-107.7 87.7-195.3 195.5-195.3s195.5 87.6 195.5 195.3c0 107.7-87.7 195.3-195.5 195.3m0-355.2c-88.2 0-160 71.7-160 159.8 0 88.1 71.8 159.8 160 159.8s160-71.7 160-159.8c0-88.1-71.8-159.8-160-159.8\"\n        style={{ clipPath: 'url(#b)', fill: '#cb2029' }}\n      />\n      <path\n        d=\"M392.6 244.9c-5.1-10.2-11.5-23-24.1-23-12.5 0-18.9 12.7-24.1 23-4.8 9.5-7.5 14.5-13.5 14.5s-8.7-5-13.5-14.5c-5.1-10.2-11.5-23-24.1-23s-18.9 12.7-24.1 23c-4.8 9.5-7.5 14.5-13.5 14.5s-8.7-5-13.5-14.5c-5.1-10.2-11.5-23-24.1-23s-18.9 12.7-24.1 23c-4.8 9.5-7.5 14.5-13.5 14.5s-8.7-5-13.5-14.5c-5.1-10.2-11.5-23-24.1-23-12.5 0-18.9 12.1-24 22.3 0 0-3.9 8.7-5.6 12.8-1.7 4.1-8.3 19.7-2.3 27.2 3.4 4.2 8.3-1.8 11.1-6.2 2.1-3.4 7.1-13.2 7.1-13.2 5.1-9.1 7.8-14 13.7-14 6 0 8.7 5 13.5 14.5 5.1 10.2 11.5 23 24.1 23 12.5 0 18.9-12.7 24.1-23 4.8-9.5 7.5-14.5 13.5-14.5s8.7 5 13.5 14.5c5.1 10.2 11.5 23 24.1 23 12.5 0 18.9-12.7 24.1-23 4.8-9.5 7.5-14.5 13.5-14.5s8.7 5 13.5 14.5c5.1 10.2 11.5 23 24.1 23s18.9-12.7 24.1-23c4.8-9.5 7.5-14.5 13.5-14.5s8.7 5 13.5 14.5c0 0 2.2 4.3 5.4 9.9 1.4 2.3 6.6 11.1 11.2 10.8 4.1-.3 5.6-13.3 1-24.7-3.1-7.6-7-16.4-7-16.4z\"\n        style={{ fill: '#cb2029' }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { RuleStatus } from '../../../types/rules';\nimport DocumentationTooltip from '../../common/DocumentationTooltip';\nimport SonarLintIcon from '../../icons/SonarLintIcon';\nimport { WorkspaceContextShape } from '../../workspace/context';\n\nexport interface IssueMessageProps {\n  engine?: string;\n  engineName?: string;\n  quickFixAvailable?: boolean;\n  manualVulnerability: boolean;\n  message: string;\n  onOpenRule: WorkspaceContextShape['openRule'];\n  ruleKey: string;\n  ruleStatus?: RuleStatus;\n}\n\nexport default function IssueMessage(props: IssueMessageProps) {\n  const {\n    engine,\n    engineName,\n    quickFixAvailable,\n    manualVulnerability,\n    message,\n    ruleKey,\n    ruleStatus\n  } = props;\n  const ruleEngine = engineName ? engineName : engine;\n\n  return (\n    <div className=\"display-inline-flex-center issue-message break-word\">\n      <span className=\"spacer-right\">{message}</span>\n      {quickFixAvailable && (\n        <Tooltip\n          overlay={\n            <FormattedMessage\n              id=\"issue.quick_fix_available_with_sonarlint\"\n              defaultMessage={translate('issue.quick_fix_available_with_sonarlint')}\n              values={{\n                link: (\n                  <a\n                    href=\"https://www.sonarqube.org/sonarlint/?referrer=sonarqube-quick-fix\"\n                    rel=\"noopener noreferrer\"\n                    target=\"_blank\">\n                    SonarLint\n                  </a>\n                )\n              }}\n            />\n          }\n          mouseLeaveDelay={0.5}>\n          <SonarLintIcon className=\"it__issues-sonarlint-quick-fix spacer-right\" size={15} />\n        </Tooltip>\n      )}\n      <ButtonLink\n        aria-label={translate('issue.why_this_issue.long')}\n        className=\"issue-see-rule spacer-right text-baseline\"\n        onClick={() =>\n          props.onOpenRule({\n            key: ruleKey\n          })\n        }>\n        {translate('issue.why_this_issue')}\n      </ButtonLink>\n      {ruleStatus && (ruleStatus === RuleStatus.Deprecated || ruleStatus === RuleStatus.Removed) && (\n        <DocumentationTooltip\n          className=\"spacer-left\"\n          content={translate('rules.status', ruleStatus, 'help')}\n          links={[\n            {\n              href: '/documentation/user-guide/rules/',\n              label: translateWithParameters('see_x', translate('rules'))\n            }\n          ]}>\n          <span className=\"spacer-right badge badge-error\">\n            {translate('rules.status', ruleStatus)}\n          </span>\n        </DocumentationTooltip>\n      )}\n      {ruleEngine && (\n        <Tooltip overlay={translateWithParameters('issue.from_external_rule_engine', ruleEngine)}>\n          <div className=\"badge spacer-right text-baseline\">{ruleEngine}</div>\n        </Tooltip>\n      )}\n      {manualVulnerability && (\n        <Tooltip overlay={translate('issue.manual_vulnerability.description')}>\n          <div className=\"badge spacer-right text-baseline\">\n            {translate('issue.manual_vulnerability')}\n          </div>\n        </Tooltip>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function FilterIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M13.957 2.333a.536.536 0 0 1-.12.596l-4.2 4.202v6.323a.552.552 0 0 1-.333.503.632.632 0 0 1-.213.043.51.51 0 0 1-.384-.162l-2.181-2.182a.542.542 0 0 1-.162-.383V7.13L2.162 2.929a.536.536 0 0 1-.12-.596A.552.552 0 0 1 2.547 2h10.908c.222 0 .418.137.503.333z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport TagsIcon from '../../../components/icons/TagsIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { fileFromPath, limitComponentName } from '../../../helpers/path';\nimport SelectList from '../../common/SelectList';\nimport SelectListItem from '../../common/SelectListItem';\nimport SeverityHelper from '../../shared/SeverityHelper';\nimport StatusHelper from '../../shared/StatusHelper';\nimport Avatar from '../../ui/Avatar';\n\ninterface Props {\n  issue: T.Issue;\n  onFilter: (property: string, issue: T.Issue) => void;\n}\n\nexport default class SimilarIssuesPopup extends React.PureComponent<Props> {\n  handleSelect = (property: string) => {\n    this.props.onFilter(property, this.props.issue);\n  };\n\n  render() {\n    const { issue } = this.props;\n\n    const items = [\n      'type',\n      'severity',\n      'status',\n      'resolution',\n      'assignee',\n      'rule',\n      ...(issue.tags || []).map(tag => `tag###${tag}`),\n      'project',\n      issue.subProject ? 'module' : undefined,\n      'file'\n    ].filter(item => item) as string[];\n\n    const assignee = issue.assigneeName || issue.assignee;\n\n    return (\n      <DropdownOverlay noPadding={true}>\n        <header className=\"menu-search\">\n          <h6>{translate('issue.filter_similar_issues')}</h6>\n        </header>\n\n        <SelectList\n          className=\"issues-similar-issues-menu\"\n          currentItem={items[0]}\n          items={items}\n          onSelect={this.handleSelect}>\n          <SelectListItem className=\"display-flex-center\" item=\"type\">\n            <IssueTypeIcon className=\"little-spacer-right\" query={issue.type} />\n            {translate('issue.type', issue.type)}\n          </SelectListItem>\n\n          <SelectListItem item=\"severity\">\n            <SeverityHelper className=\"display-flex-center\" severity={issue.severity} />\n          </SelectListItem>\n\n          <SelectListItem item=\"status\">\n            <StatusHelper\n              className=\"display-flex-center\"\n              resolution={undefined}\n              status={issue.status}\n            />\n          </SelectListItem>\n\n          <SelectListItem item=\"resolution\">\n            {issue.resolution != null\n              ? translate('issue.resolution', issue.resolution)\n              : translate('unresolved')}\n          </SelectListItem>\n\n          <SelectListItem item=\"assignee\">\n            {assignee ? (\n              <span>\n                {translate('assigned_to')}\n                <Avatar\n                  className=\"little-spacer-left little-spacer-right\"\n                  hash={issue.assigneeAvatar}\n                  name={assignee}\n                  size={16}\n                />\n                {issue.assigneeActive === false\n                  ? translateWithParameters('user.x_deleted', assignee)\n                  : assignee}\n              </span>\n            ) : (\n              translate('unassigned')\n            )}\n          </SelectListItem>\n\n          <li className=\"divider\" />\n\n          <SelectListItem item=\"rule\">{limitComponentName(issue.ruleName)}</SelectListItem>\n\n          {issue.tags != null &&\n            issue.tags.map(tag => (\n              <SelectListItem item={`tag###${tag}`} key={`tag###${tag}`}>\n                <TagsIcon className=\"icon-half-transparent little-spacer-right text-middle\" />\n                <span className=\"text-middle\">{tag}</span>\n              </SelectListItem>\n            ))}\n\n          <li className=\"divider\" />\n\n          <SelectListItem item=\"project\">\n            <QualifierIcon className=\"little-spacer-right\" qualifier=\"TRK\" />\n            {issue.projectName}\n          </SelectListItem>\n\n          {issue.subProject != null && (\n            <SelectListItem item=\"module\">\n              <QualifierIcon className=\"little-spacer-right\" qualifier=\"BRC\" />\n              {issue.subProjectName}\n            </SelectListItem>\n          )}\n\n          <SelectListItem item=\"file\">\n            <QualifierIcon className=\"little-spacer-right\" qualifier={issue.componentQualifier} />\n            {fileFromPath(issue.componentLongName)}\n          </SelectListItem>\n        </SelectList>\n      </DropdownOverlay>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport FilterIcon from '../../../components/icons/FilterIcon';\nimport { translate } from '../../../helpers/l10n';\nimport SimilarIssuesPopup from '../popups/SimilarIssuesPopup';\n\ninterface Props {\n  isOpen: boolean;\n  issue: T.Issue;\n  togglePopup: (popup: string, show?: boolean) => void;\n  onFilter?: (property: string, issue: T.Issue) => void;\n}\n\nexport default class SimilarIssuesFilter extends React.PureComponent<Props> {\n  handleFilter = (property: string, issue: T.Issue) => {\n    this.togglePopup(false);\n    if (this.props.onFilter) {\n      this.props.onFilter(property, issue);\n    }\n  };\n\n  togglePopup = (open?: boolean) => {\n    this.props.togglePopup('similarIssues', open);\n  };\n\n  handleClose = () => {\n    this.togglePopup(false);\n  };\n\n  render() {\n    return (\n      <div className=\"dropdown\">\n        <Toggler\n          onRequestClose={this.handleClose}\n          open={this.props.isOpen}\n          overlay={<SimilarIssuesPopup issue={this.props.issue} onFilter={this.handleFilter} />}>\n          <ButtonLink\n            aria-label={translate('issue.filter_similar_issues')}\n            aria-expanded={this.props.isOpen}\n            className=\"issue-action issue-action-with-options js-issue-filter\"\n            onClick={this.togglePopup}\n            title={translate('issue.filter_similar_issues')}>\n            <FilterIcon className=\"icon-half-transparent\" />\n            <DropdownIcon className=\"icon-half-transparent\" />\n          </ButtonLink>\n        </Toggler>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport LinkIcon from '../../../components/icons/LinkIcon';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { getComponentIssuesUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport { RuleStatus } from '../../../types/rules';\nimport LocationIndex from '../../common/LocationIndex';\nimport { WorkspaceContext } from '../../workspace/context';\nimport IssueChangelog from './IssueChangelog';\nimport IssueMessage from './IssueMessage';\nimport SimilarIssuesFilter from './SimilarIssuesFilter';\n\nexport interface IssueTitleBarProps {\n  branchLike?: BranchLike;\n  currentPopup?: string;\n  displayLocationsCount?: boolean;\n  displayLocationsLink?: boolean;\n  issue: T.Issue;\n  onFilter?: (property: string, issue: T.Issue) => void;\n  togglePopup: (popup: string, show?: boolean) => void;\n}\n\nexport default function IssueTitleBar(props: IssueTitleBarProps) {\n  const { issue } = props;\n  const hasSimilarIssuesFilter = props.onFilter != null;\n\n  const locationsCount =\n    issue.secondaryLocations.length +\n    issue.flows.reduce((sum, locations) => sum + locations.length, 0);\n\n  const locationsBadge = (\n    <Tooltip\n      overlay={translateWithParameters(\n        'issue.this_issue_involves_x_code_locations',\n        formatMeasure(locationsCount, 'INT')\n      )}>\n      <LocationIndex>{locationsCount}</LocationIndex>\n    </Tooltip>\n  );\n\n  const displayLocations = props.displayLocationsCount && locationsCount > 0;\n\n  const issueUrl = getComponentIssuesUrl(issue.project, {\n    ...getBranchLikeQuery(props.branchLike),\n    issues: issue.key,\n    open: issue.key,\n    types: issue.type === 'SECURITY_HOTSPOT' ? issue.type : undefined\n  });\n\n  return (\n    <div className=\"issue-row\">\n      <WorkspaceContext.Consumer>\n        {({ externalRulesRepoNames, openRule }) => (\n          <IssueMessage\n            engine={issue.externalRuleEngine}\n            engineName={\n              issue.externalRuleEngine &&\n              externalRulesRepoNames &&\n              externalRulesRepoNames[issue.externalRuleEngine]\n            }\n            quickFixAvailable={issue.quickFixAvailable}\n            manualVulnerability={issue.fromHotspot && issue.type === 'VULNERABILITY'}\n            message={issue.message}\n            onOpenRule={openRule}\n            ruleKey={issue.rule}\n            ruleStatus={issue.ruleStatus as RuleStatus | undefined}\n          />\n        )}\n      </WorkspaceContext.Consumer>\n\n      <div className=\"issue-row-meta\">\n        <div className=\"issue-meta-list\">\n          <div className=\"issue-meta\">\n            <IssueChangelog\n              creationDate={issue.creationDate}\n              isOpen={props.currentPopup === 'changelog'}\n              issue={issue}\n              togglePopup={props.togglePopup}\n            />\n          </div>\n          {issue.textRange != null && (\n            <div className=\"issue-meta\">\n              <span className=\"issue-meta-label\" title={translate('line_number')}>\n                L{issue.textRange.endLine}\n              </span>\n            </div>\n          )}\n          {displayLocations && (\n            <div className=\"issue-meta\">\n              {props.displayLocationsLink ? (\n                <Link target=\"_blank\" to={issueUrl}>\n                  {locationsBadge}\n                </Link>\n              ) : (\n                locationsBadge\n              )}\n            </div>\n          )}\n          <div className=\"issue-meta\">\n            <Link\n              className=\"js-issue-permalink link-no-underline\"\n              target=\"_blank\"\n              title={translate('permalink')}\n              to={issueUrl}>\n              <LinkIcon />\n            </Link>\n          </div>\n          {hasSimilarIssuesFilter && (\n            <div className=\"issue-meta\">\n              <SimilarIssuesFilter\n                isOpen={props.currentPopup === 'similarIssues'}\n                issue={issue}\n                onFilter={props.onFilter}\n                togglePopup={props.togglePopup}\n              />\n            </div>\n          )}\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { deleteIssueComment, editIssueComment } from '../../api/issues';\nimport Checkbox from '../../components/controls/Checkbox';\nimport { BranchLike } from '../../types/branch-like';\nimport { updateIssue } from './actions';\nimport IssueActionsBar from './components/IssueActionsBar';\nimport IssueCommentLine from './components/IssueCommentLine';\nimport IssueTitleBar from './components/IssueTitleBar';\n\ninterface Props {\n  branchLike?: BranchLike;\n  checked?: boolean;\n  currentPopup?: string;\n  displayLocationsCount?: boolean;\n  displayLocationsLink?: boolean;\n  issue: T.Issue;\n  onAssign: (login: string) => void;\n  onChange: (issue: T.Issue) => void;\n  onCheck?: (issue: string) => void;\n  onClick: (issueKey: string) => void;\n  onFilter?: (property: string, issue: T.Issue) => void;\n  selected: boolean;\n  togglePopup: (popup: string, show: boolean | void) => void;\n}\n\nexport default class IssueView extends React.PureComponent<Props> {\n  handleCheck = () => {\n    if (this.props.onCheck) {\n      this.props.onCheck(this.props.issue.key);\n    }\n  };\n\n  handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n    if (!isClickable(event.target as HTMLElement) && this.props.onClick) {\n      event.preventDefault();\n      this.props.onClick(this.props.issue.key);\n    }\n  };\n\n  editComment = (comment: string, text: string) => {\n    updateIssue(this.props.onChange, editIssueComment({ comment, text }));\n  };\n\n  deleteComment = (comment: string) => {\n    updateIssue(this.props.onChange, deleteIssueComment({ comment }));\n  };\n\n  render() {\n    const { issue } = this.props;\n\n    const hasCheckbox = this.props.onCheck != null;\n\n    const issueClass = classNames('issue', {\n      hotspot: issue.type === 'SECURITY_HOTSPOT',\n      'issue-with-checkbox': hasCheckbox,\n      selected: this.props.selected\n    });\n\n    return (\n      <div className={issueClass} data-issue={issue.key} onClick={this.handleClick} role=\"group\">\n        <IssueTitleBar\n          branchLike={this.props.branchLike}\n          currentPopup={this.props.currentPopup}\n          displayLocationsCount={this.props.displayLocationsCount}\n          displayLocationsLink={this.props.displayLocationsLink}\n          issue={issue}\n          onFilter={this.props.onFilter}\n          togglePopup={this.props.togglePopup}\n        />\n        <IssueActionsBar\n          currentPopup={this.props.currentPopup}\n          issue={issue}\n          onAssign={this.props.onAssign}\n          onChange={this.props.onChange}\n          togglePopup={this.props.togglePopup}\n        />\n        {issue.comments && issue.comments.length > 0 && (\n          <div className=\"issue-comments\">\n            {issue.comments.map(comment => (\n              <IssueCommentLine\n                comment={comment}\n                key={comment.key}\n                onDelete={this.deleteComment}\n                onEdit={this.editComment}\n              />\n            ))}\n          </div>\n        )}\n        {hasCheckbox && (\n          <>\n            <Checkbox\n              checked={this.props.checked || false}\n              className=\"issue-checkbox-container\"\n              onCheck={this.handleCheck}\n            />\n          </>\n        )}\n      </div>\n    );\n  }\n}\n\nfunction isClickable(node: HTMLElement | undefined | null): boolean {\n  if (!node) {\n    return false;\n  }\n  const clickableTags = ['A', 'BUTTON', 'INPUT', 'TEXTAREA'];\n  const tagName = (node.tagName || '').toUpperCase();\n  return clickableTags.includes(tagName) || isClickable(node.parentElement);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport key from 'keymaster';\nimport * as React from 'react';\nimport { setIssueAssignee } from '../../api/issues';\nimport { BranchLike } from '../../types/branch-like';\nimport { updateIssue } from './actions';\nimport './Issue.css';\nimport IssueView from './IssueView';\n\ninterface Props {\n  branchLike?: BranchLike;\n  checked?: boolean;\n  displayLocationsCount?: boolean;\n  displayLocationsLink?: boolean;\n  issue: T.Issue;\n  onChange: (issue: T.Issue) => void;\n  onCheck?: (issue: string) => void;\n  onClick: (issueKey: string) => void;\n  onFilter?: (property: string, issue: T.Issue) => void;\n  onPopupToggle: (issue: string, popupName: string, open?: boolean) => void;\n  openPopup?: string;\n  selected: boolean;\n}\n\nexport default class Issue extends React.PureComponent<Props> {\n  static defaultProps = {\n    selected: false\n  };\n\n  componentDidMount() {\n    if (this.props.selected) {\n      this.bindShortcuts();\n    }\n  }\n\n  componentWillUpdate(nextProps: Props) {\n    if (!nextProps.selected && this.props.selected) {\n      this.unbindShortcuts();\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (!prevProps.selected && this.props.selected) {\n      this.bindShortcuts();\n    }\n  }\n\n  componentWillUnmount() {\n    if (this.props.selected) {\n      this.unbindShortcuts();\n    }\n  }\n\n  bindShortcuts() {\n    key('f', 'issues', () => {\n      this.togglePopup('transition');\n      return false;\n    });\n    key('a', 'issues', () => {\n      this.togglePopup('assign');\n      return false;\n    });\n    key('m', 'issues', () => {\n      if (this.props.issue.actions.includes('assign')) {\n        this.handleAssignement('_me');\n      }\n      return false;\n    });\n    key('i', 'issues', () => {\n      this.togglePopup('set-severity');\n      return false;\n    });\n    key('c', 'issues', () => {\n      this.togglePopup('comment');\n      return false;\n    });\n    key('t', 'issues', () => {\n      this.togglePopup('edit-tags');\n      return false;\n    });\n    key('space', 'issues', () => {\n      if (this.props.onCheck) {\n        this.props.onCheck(this.props.issue.key);\n        return false;\n      }\n      return undefined;\n    });\n  }\n\n  unbindShortcuts() {\n    key.unbind('f', 'issues');\n    key.unbind('a', 'issues');\n    key.unbind('m', 'issues');\n    key.unbind('i', 'issues');\n    key.unbind('c', 'issues');\n    key.unbind('space', 'issues');\n    key.unbind('t', 'issues');\n  }\n\n  togglePopup = (popupName: string, open?: boolean) => {\n    this.props.onPopupToggle(this.props.issue.key, popupName, open);\n  };\n\n  handleAssignement = (login: string) => {\n    const { issue } = this.props;\n    if (issue.assignee !== login) {\n      updateIssue(this.props.onChange, setIssueAssignee({ issue: issue.key, assignee: login }));\n    }\n    this.togglePopup('assign', false);\n  };\n\n  render() {\n    return (\n      <IssueView\n        branchLike={this.props.branchLike}\n        checked={this.props.checked}\n        currentPopup={this.props.openPopup}\n        displayLocationsCount={this.props.displayLocationsCount}\n        displayLocationsLink={this.props.displayLocationsLink}\n        issue={this.props.issue}\n        onAssign={this.handleAssignement}\n        onChange={this.props.onChange}\n        onCheck={this.props.onCheck}\n        onClick={this.props.onClick}\n        onFilter={this.props.onFilter}\n        selected={this.props.selected}\n        togglePopup={this.togglePopup}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { BranchLike } from '../../../types/branch-like';\nimport Issue from '../../issue/Issue';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  displayIssueLocationsCount?: boolean;\n  displayIssueLocationsLink?: boolean;\n  issuePopup: { issue: string; name: string } | undefined;\n  issues: T.Issue[];\n  onIssueChange: (issue: T.Issue) => void;\n  onIssueClick: (issueKey: string) => void;\n  onIssuePopupToggle: (issue: string, popupName: string, open?: boolean) => void;\n  selectedIssue: string | undefined;\n}\n\nexport default function LineIssuesList(props: Props) {\n  const { issuePopup } = props;\n\n  return (\n    <div className=\"issue-list\">\n      {props.issues.map(issue => (\n        <Issue\n          branchLike={props.branchLike}\n          displayLocationsCount={props.displayIssueLocationsCount}\n          displayLocationsLink={props.displayIssueLocationsLink}\n          issue={issue}\n          key={issue.key}\n          onChange={props.onIssueChange}\n          onClick={props.onIssueClick}\n          onPopupToggle={props.onIssuePopupToggle}\n          openPopup={issuePopup && issuePopup.issue === issue.key ? issuePopup.name : undefined}\n          selected={props.selectedIssue === issue.key}\n        />\n      ))}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { BranchLike } from '../../../types/branch-like';\nimport LocationIndex from '../../common/LocationIndex';\nimport LocationMessage from '../../common/LocationMessage';\nimport {\n  highlightIssueLocations,\n  highlightSymbol,\n  splitByTokens,\n  Token\n} from '../helpers/highlight';\nimport LineIssuesList from './LineIssuesList';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  displayIssueLocationsCount?: boolean;\n  displayIssueLocationsLink?: boolean;\n  displayLocationMarkers?: boolean;\n  highlightedLocationMessage: { index: number; text: string | undefined } | undefined;\n  highlightedSymbols: string[] | undefined;\n  issueLocations: T.LinearIssueLocation[];\n  issuePopup: { issue: string; name: string } | undefined;\n  issues: T.Issue[];\n  line: T.SourceLine;\n  onIssueChange: (issue: T.Issue) => void;\n  onIssuePopupToggle: (issue: string, popupName: string, open?: boolean) => void;\n  onIssueSelect: (issueKey: string) => void;\n  onLocationSelect: ((index: number) => void) | undefined;\n  onSymbolClick: (symbols: Array<string>) => void;\n  padding?: number;\n  scroll?: (element: HTMLElement) => void;\n  secondaryIssueLocations: T.LinearIssueLocation[];\n  selectedIssue: string | undefined;\n  showIssues?: boolean;\n}\n\ninterface State {\n  tokens: Token[];\n}\n\nexport default class LineCode extends React.PureComponent<Props, State> {\n  activeMarkerNode?: HTMLElement | null;\n  codeNode?: HTMLElement | null;\n  symbols?: NodeListOf<HTMLElement>;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      tokens: splitByTokens(props.line.code || '')\n    };\n  }\n\n  componentDidMount() {\n    this.attachEvents();\n    if (this.props.highlightedLocationMessage && this.activeMarkerNode && this.props.scroll) {\n      this.props.scroll(this.activeMarkerNode);\n    }\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    if (nextProps.line.code !== this.props.line.code) {\n      this.setState({\n        tokens: splitByTokens(nextProps.line.code || '')\n      });\n    }\n  }\n\n  componentWillUpdate() {\n    this.detachEvents();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    this.attachEvents();\n    if (\n      this.props.highlightedLocationMessage &&\n      (!prevProps.highlightedLocationMessage ||\n        prevProps.highlightedLocationMessage.index !==\n          this.props.highlightedLocationMessage.index) &&\n      this.activeMarkerNode &&\n      this.props.scroll\n    ) {\n      this.props.scroll(this.activeMarkerNode);\n    }\n  }\n\n  componentWillUnmount() {\n    this.detachEvents();\n  }\n\n  attachEvents() {\n    if (this.codeNode) {\n      this.symbols = this.codeNode.querySelectorAll('.sym');\n      if (this.symbols) {\n        for (let i = 0; i < this.symbols.length; i++) {\n          const symbol = this.symbols[i];\n          symbol.addEventListener('click', this.handleSymbolClick);\n        }\n      }\n    }\n  }\n\n  detachEvents() {\n    if (this.symbols) {\n      for (let i = 0; i < this.symbols.length; i++) {\n        const symbol = this.symbols[i];\n        symbol.addEventListener('click', this.handleSymbolClick);\n      }\n    }\n  }\n\n  handleSymbolClick = (event: MouseEvent) => {\n    event.preventDefault();\n    const keys = (event.currentTarget as HTMLElement).className.match(/sym-\\d+/g);\n    if (keys && keys.length > 0) {\n      this.props.onSymbolClick(keys);\n    }\n  };\n\n  renderMarker(index: number, message: string | undefined, selected: boolean, leading: boolean) {\n    const { onLocationSelect } = this.props;\n    const onClick = onLocationSelect ? () => onLocationSelect(index) : undefined;\n    const ref = selected ? (node: HTMLElement | null) => (this.activeMarkerNode = node) : undefined;\n    return (\n      <LocationIndex\n        key={`marker-${index}`}\n        leading={leading}\n        onClick={onClick}\n        selected={selected}>\n        <span ref={ref}>{index + 1}</span>\n        {message && <LocationMessage selected={true}>{message}</LocationMessage>}\n      </LocationIndex>\n    );\n  }\n\n  render() {\n    const {\n      highlightedLocationMessage,\n      highlightedSymbols,\n      issues,\n      issueLocations,\n      line,\n      onIssueSelect,\n      padding,\n      secondaryIssueLocations,\n      selectedIssue,\n      showIssues\n    } = this.props;\n\n    let tokens = [...this.state.tokens];\n\n    if (highlightedSymbols) {\n      highlightedSymbols.forEach(symbol => {\n        tokens = highlightSymbol(tokens, symbol);\n      });\n    }\n\n    if (issueLocations.length > 0) {\n      tokens = highlightIssueLocations(tokens, issueLocations);\n    }\n\n    if (secondaryIssueLocations) {\n      tokens = highlightIssueLocations(tokens, secondaryIssueLocations, 'issue-location');\n\n      if (highlightedLocationMessage) {\n        const location = secondaryIssueLocations.find(\n          location => location.index === highlightedLocationMessage.index\n        );\n        if (location) {\n          tokens = highlightIssueLocations(tokens, [location], 'selected');\n        }\n      }\n    }\n\n    const className = classNames('source-line-code', 'code', {\n      'has-issues': issues.length > 0\n    });\n\n    const renderedTokens: React.ReactNode[] = [];\n\n    // track if the first marker is displayed before the source code\n    // set `false` for the first token in a row\n    let leadingMarker = false;\n\n    tokens.forEach((token, index) => {\n      if (this.props.displayLocationMarkers && token.markers.length > 0) {\n        token.markers.forEach(marker => {\n          const selected =\n            highlightedLocationMessage !== undefined && highlightedLocationMessage.index === marker;\n          const loc = secondaryIssueLocations.find(loc => loc.index === marker);\n          const message = loc && loc.text;\n          renderedTokens.push(this.renderMarker(marker, message, selected, leadingMarker));\n        });\n      }\n      renderedTokens.push(\n        <span className={token.className} key={index}>\n          {token.text}\n        </span>\n      );\n\n      // keep leadingMarker truthy if previous token has only whitespaces\n      leadingMarker = (index === 0 ? true : leadingMarker) && !token.text.trim().length;\n    });\n\n    const style = padding ? { paddingBottom: `${padding}px` } : undefined;\n    const filteredSelectedIssues = issues.filter(i => i.key === selectedIssue);\n\n    return (\n      <td className={className} data-line-number={line.line} style={style}>\n        <div className=\"source-line-code-inner\">\n          <pre ref={node => (this.codeNode = node)}>{renderedTokens}</pre>\n        </div>\n        {showIssues && issues.length > 0 && (\n          <LineIssuesList\n            branchLike={this.props.branchLike}\n            displayIssueLocationsCount={this.props.displayIssueLocationsCount}\n            displayIssueLocationsLink={this.props.displayIssueLocationsLink}\n            issuePopup={this.props.issuePopup}\n            issues={issues}\n            onIssueChange={this.props.onIssueChange}\n            onIssueClick={onIssueSelect}\n            onIssuePopupToggle={this.props.onIssuePopupToggle}\n            selectedIssue={selectedIssue}\n          />\n        )}\n        {selectedIssue && !showIssues && (\n          <LineIssuesList\n            branchLike={this.props.branchLike}\n            issuePopup={this.props.issuePopup}\n            issues={filteredSelectedIssues}\n            onIssueChange={this.props.onIssueChange}\n            onIssueClick={onIssueSelect}\n            onIssuePopupToggle={this.props.onIssuePopupToggle}\n            selectedIssue={selectedIssue}\n          />\n        )}\n      </td>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\nexport interface LineCoverageProps {\n  line: T.SourceLine;\n  scroll?: (element: HTMLElement) => void;\n  scrollToUncoveredLine?: boolean;\n}\n\nexport function LineCoverage({ line, scroll, scrollToUncoveredLine }: LineCoverageProps) {\n  const coverageMarker = React.useRef<HTMLTableDataCellElement>(null);\n  React.useEffect(() => {\n    if (scrollToUncoveredLine && scroll && coverageMarker.current) {\n      scroll(coverageMarker.current);\n    }\n  }, [scrollToUncoveredLine, scroll, coverageMarker]);\n\n  const className =\n    'source-meta source-line-coverage' +\n    (line.coverageStatus != null ? ` source-line-${line.coverageStatus}` : '');\n  const status = getStatusTooltip(line);\n\n  return (\n    <td className={className} data-line-number={line.line} ref={coverageMarker}>\n      <Tooltip overlay={status} placement=\"bottom\">\n        <div aria-label={status} className=\"source-line-bar\" />\n      </Tooltip>\n    </td>\n  );\n}\n\nfunction getStatusTooltip(line: T.SourceLine) {\n  if (line.coverageStatus === 'uncovered') {\n    if (line.conditions) {\n      return translateWithParameters('source_viewer.tooltip.uncovered.conditions', line.conditions);\n    } else {\n      return translate('source_viewer.tooltip.uncovered');\n    }\n  } else if (line.coverageStatus === 'covered') {\n    if (line.conditions) {\n      return translateWithParameters('source_viewer.tooltip.covered.conditions', line.conditions);\n    } else {\n      return translate('source_viewer.tooltip.covered');\n    }\n  } else if (line.coverageStatus === 'partially-covered') {\n    if (line.conditions) {\n      return translateWithParameters(\n        'source_viewer.tooltip.partially-covered.conditions',\n        line.coveredConditions || 0,\n        line.conditions\n      );\n    } else {\n      return translate('source_viewer.tooltip.partially-covered');\n    }\n  }\n  return undefined;\n}\n\nexport default React.memo(LineCoverage);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport Toggler from '../../../components/controls/Toggler';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface LineDuplicationBlockProps {\n  blocksLoaded: boolean;\n  duplicated: boolean;\n  index: number;\n  line: T.SourceLine;\n  onClick?: (line: T.SourceLine) => void;\n  renderDuplicationPopup: (index: number, line: number) => React.ReactNode;\n}\n\nexport function LineDuplicationBlock(props: LineDuplicationBlockProps) {\n  const { blocksLoaded, duplicated, index, line } = props;\n  const [dropdownOpen, setDropdownOpen] = React.useState(false);\n\n  const className = classNames('source-meta', 'source-line-duplications', {\n    'source-line-duplicated': duplicated\n  });\n\n  return duplicated ? (\n    <td className={className} data-index={index} data-line-number={line.line}>\n      <Tooltip\n        overlay={dropdownOpen ? undefined : translate('source_viewer.tooltip.duplicated_block')}\n        placement=\"right\">\n        <div>\n          <Toggler\n            onRequestClose={() => setDropdownOpen(false)}\n            open={dropdownOpen}\n            overlay={\n              <DropdownOverlay placement={PopupPlacement.RightTop}>\n                {props.renderDuplicationPopup(index, line.line)}\n              </DropdownOverlay>\n            }>\n            <div\n              aria-label={translate('source_viewer.tooltip.duplicated_block')}\n              className=\"source-line-bar\"\n              onClick={() => {\n                setDropdownOpen(true);\n                if (!blocksLoaded && line.duplicated && props.onClick) {\n                  props.onClick(line);\n                }\n              }}\n              role=\"button\"\n              tabIndex={0}\n            />\n          </Toggler>\n        </div>\n      </Tooltip>\n    </td>\n  ) : (\n    <td className={className} data-index={index} data-line-number={line.line}>\n      <div className=\"source-line-bar\" />\n    </td>\n  );\n}\n\nexport default React.memo(LineDuplicationBlock);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { uniq } from 'lodash';\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport IssueIcon from '../../../components/icons/IssueIcon';\nimport { sortByType } from '../../../helpers/issues';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\nexport interface LineIssuesIndicatorProps {\n  issues: T.Issue[];\n  issuesOpen?: boolean;\n  line: T.SourceLine;\n  onClick: () => void;\n}\n\nexport function LineIssuesIndicator(props: LineIssuesIndicatorProps) {\n  const { issues, issuesOpen, line } = props;\n  const hasIssues = issues.length > 0;\n  const className = classNames('source-meta', 'source-line-issues', {\n    'source-line-with-issues': hasIssues\n  });\n\n  if (!hasIssues) {\n    return <td className={className} data-line-number={line.line} />;\n  }\n\n  const mostImportantIssue = sortByType(issues)[0];\n  const issueTypes = uniq(issues.map(i => i.type));\n\n  let tooltipContent;\n  if (issueTypes.length > 1) {\n    tooltipContent = translate('source_viewer.issues_on_line.multiple_issues');\n  } else if (issues.length === 1) {\n    tooltipContent = translateWithParameters(\n      'source_viewer.issues_on_line.issue_of_type_X',\n      translate('issue.type', mostImportantIssue.type)\n    );\n  } else {\n    tooltipContent = translateWithParameters(\n      'source_viewer.issues_on_line.X_issues_of_type_Y',\n      issues.length,\n      translate('issue.type', mostImportantIssue.type, 'plural')\n    );\n  }\n\n  return (\n    <td className={className} data-line-number={line.line}>\n      <span\n        aria-label={translate('source_viewer.issues_on_line', issuesOpen ? 'hide' : 'show')}\n        onClick={(e: React.MouseEvent<HTMLElement>) => {\n          e.preventDefault();\n          e.currentTarget.blur();\n          props.onClick();\n        }}\n        role=\"button\"\n        tabIndex={0}>\n        <Tooltip overlay={tooltipContent}>\n          <IssueIcon type={mostImportantIssue.type} />\n        </Tooltip>\n        {issues.length > 1 && <span className=\"source-line-issues-counter\">{issues.length}</span>}\n      </span>\n    </td>\n  );\n}\n\nexport default React.memo(LineIssuesIndicator);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { BranchLike } from '../../types/branch-like';\n\ninterface SourceViewerContextShape {\n  branchLike?: BranchLike;\n  file: T.SourceViewerFile;\n}\n\nexport const SourceViewerContext = React.createContext<SourceViewerContextShape>({\n  branchLike: {} as BranchLike,\n  file: {} as T.SourceViewerFile\n});\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate } from '../../../helpers/l10n';\nimport { getCodeUrl, getPathUrlAsString } from '../../../helpers/urls';\nimport { ActionsDropdownItem } from '../../controls/ActionsDropdown';\nimport { SourceViewerContext } from '../SourceViewerContext';\n\nexport interface LineOptionsPopupProps {\n  firstLineNumber: number;\n  line: T.SourceLine;\n}\n\nexport function LineOptionsPopup({ firstLineNumber, line }: LineOptionsPopupProps) {\n  return (\n    <SourceViewerContext.Consumer>\n      {({ branchLike, file }) => {\n        const codeLocation = getCodeUrl(file.project, branchLike, file.key, line.line);\n        const codeUrl = getPathUrlAsString(codeLocation, false);\n        const isAtTop = line.line - 4 < firstLineNumber;\n        return (\n          <DropdownOverlay\n            className=\"big-spacer-left\"\n            noPadding={true}\n            placement={isAtTop ? PopupPlacement.BottomLeft : PopupPlacement.TopLeft}>\n            <ul className=\"padded source-viewer-bubble-popup nowrap\">\n              <ActionsDropdownItem copyValue={codeUrl}>\n                {translate('component_viewer.copy_permalink')}\n              </ActionsDropdownItem>\n            </ul>\n          </DropdownOverlay>\n        );\n      }}\n    </SourceViewerContext.Consumer>\n  );\n}\n\nexport default React.memo(LineOptionsPopup);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Toggler from '../../../components/controls/Toggler';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport LineOptionsPopup from './LineOptionsPopup';\n\nexport interface LineNumberProps {\n  displayOptions: boolean;\n  firstLineNumber: number;\n  line: T.SourceLine;\n}\n\nexport function LineNumber({ displayOptions, firstLineNumber, line }: LineNumberProps) {\n  const [isOpen, setOpen] = React.useState<boolean>(false);\n  const { line: lineNumber } = line;\n  const hasLineNumber = !!lineNumber;\n\n  return hasLineNumber ? (\n    <td className=\"source-meta source-line-number\" data-line-number={lineNumber}>\n      {displayOptions ? (\n        <Toggler\n          closeOnClickOutside={true}\n          onRequestClose={() => setOpen(false)}\n          open={isOpen}\n          overlay={<LineOptionsPopup firstLineNumber={firstLineNumber} line={line} />}>\n          <span\n            aria-expanded={isOpen}\n            aria-haspopup={true}\n            aria-label={translateWithParameters('source_viewer.line_X', lineNumber)}\n            onClick={() => setOpen(true)}\n            role=\"button\"\n            tabIndex={0}>\n            {lineNumber}\n          </span>\n        </Toggler>\n      ) : (\n        lineNumber\n      )}\n    </td>\n  ) : (\n    <td className=\"source-meta source-line-number\" />\n  );\n}\n\nexport default React.memo(LineNumber);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport DateFormatter from '../../intl/DateFormatter';\n\nexport interface SCMPopupProps {\n  line: T.SourceLine;\n}\n\nexport function SCMPopup({ line }: SCMPopupProps) {\n  const hasAuthor = line.scmAuthor !== undefined && line.scmAuthor !== '';\n  const hasDate = line.scmDate !== undefined;\n  return (\n    <div className=\"source-viewer-bubble-popup abs-width-400\">\n      {hasAuthor && (\n        <div>\n          <h4>{translate('author')}</h4>\n          {line.scmAuthor}\n        </div>\n      )}\n      {hasDate && (\n        <div className={classNames({ 'spacer-top': hasAuthor })}>\n          <h4>{translate('source_viewer.tooltip.scm.commited_on')}</h4>\n          <DateFormatter date={line.scmDate!} />\n        </div>\n      )}\n      {line.scmRevision && (\n        <div className={classNames({ 'spacer-top': hasAuthor || hasDate })}>\n          <h4>{translate('source_viewer.tooltip.scm.revision')}</h4>\n          {line.scmRevision}\n        </div>\n      )}\n    </div>\n  );\n}\n\nexport default React.memo(SCMPopup);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Dropdown from '../../../components/controls/Dropdown';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport SCMPopup from './SCMPopup';\n\nexport interface LineSCMProps {\n  line: T.SourceLine;\n  previousLine: T.SourceLine | undefined;\n}\n\nexport function LineSCM({ line, previousLine }: LineSCMProps) {\n  const hasPopup = !!line.line;\n  const cell = (\n    <div className=\"source-line-scm-inner\">\n      {isSCMChanged(line, previousLine) ? line.scmAuthor || '\u2026' : ' '}\n    </div>\n  );\n\n  if (hasPopup) {\n    let ariaLabel = translate('source_viewer.click_for_scm_info');\n    if (line.scmAuthor) {\n      ariaLabel = `${translateWithParameters(\n        'source_viewer.author_X',\n        line.scmAuthor\n      )}, ${ariaLabel}`;\n    }\n\n    return (\n      <td className=\"source-meta source-line-scm\" data-line-number={line.line}>\n        <Dropdown overlay={<SCMPopup line={line} />} overlayPlacement={PopupPlacement.RightTop}>\n          <div aria-label={ariaLabel} role=\"button\">\n            {cell}\n          </div>\n        </Dropdown>\n      </td>\n    );\n  } else {\n    return (\n      <td className=\"source-meta source-line-scm\" data-line-number={line.line}>\n        {cell}\n      </td>\n    );\n  }\n}\n\nfunction isSCMChanged(s: T.SourceLine, p: T.SourceLine | undefined) {\n  let changed = true;\n  if (p != null && s.scmRevision != null && p.scmRevision != null) {\n    changed = s.scmRevision !== p.scmRevision || s.scmDate !== p.scmDate;\n  }\n  return changed;\n}\n\nexport default React.memo(LineSCM);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { times } from 'lodash';\nimport * as React from 'react';\nimport { BranchLike } from '../../../types/branch-like';\nimport './Line.css';\nimport LineCode from './LineCode';\nimport LineCoverage from './LineCoverage';\nimport LineDuplicationBlock from './LineDuplicationBlock';\nimport LineIssuesIndicator from './LineIssuesIndicator';\nimport LineNumber from './LineNumber';\nimport LineSCM from './LineSCM';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  displayAllIssues?: boolean;\n  displayCoverage: boolean;\n  displayDuplications: boolean;\n  displayIssueLocationsCount?: boolean;\n  displayIssueLocationsLink?: boolean;\n  displayIssues: boolean;\n  displayLineNumberOptions?: boolean;\n  displayLocationMarkers?: boolean;\n  displaySCM?: boolean;\n  duplications: number[];\n  duplicationsCount: number;\n  firstLineNumber: number;\n  highlighted: boolean;\n  highlightedLocationMessage: { index: number; text: string | undefined } | undefined;\n  highlightedSymbols: string[] | undefined;\n  issueLocations: T.LinearIssueLocation[];\n  issuePopup: { issue: string; name: string } | undefined;\n  issues: T.Issue[];\n  last: boolean;\n  line: T.SourceLine;\n  loadDuplications: (line: T.SourceLine) => void;\n  onIssueChange: (issue: T.Issue) => void;\n  onIssuePopupToggle: (issueKey: string, popupName: string, open?: boolean) => void;\n  onIssuesClose: (line: T.SourceLine) => void;\n  onIssueSelect: (issueKey: string) => void;\n  onIssuesOpen: (line: T.SourceLine) => void;\n  onIssueUnselect: () => void;\n  onLocationSelect: ((x: number) => void) | undefined;\n  onSymbolClick: (symbols: string[]) => void;\n  openIssues: boolean;\n  previousLine: T.SourceLine | undefined;\n  renderDuplicationPopup: (index: number, line: number) => React.ReactNode;\n  scroll?: (element: HTMLElement) => void;\n  scrollToUncoveredLine?: boolean;\n  secondaryIssueLocations: T.LinearIssueLocation[];\n  selectedIssue: string | undefined;\n  verticalBuffer?: number;\n}\n\nconst LINE_HEIGHT = 18;\n\nexport default class Line extends React.PureComponent<Props> {\n  handleIssuesIndicatorClick = () => {\n    if (this.props.openIssues) {\n      this.props.onIssuesClose(this.props.line);\n      this.props.onIssueUnselect();\n    } else {\n      this.props.onIssuesOpen(this.props.line);\n\n      const { issues } = this.props;\n      if (issues.length > 0) {\n        this.props.onIssueSelect(issues[0].key);\n      }\n    }\n  };\n\n  render() {\n    const {\n      branchLike,\n      displayAllIssues,\n      displayCoverage,\n      displayDuplications,\n      displayIssueLocationsCount,\n      displayIssueLocationsLink,\n      displayLineNumberOptions,\n      displayLocationMarkers,\n      highlightedLocationMessage,\n      displayIssues,\n      displaySCM = true,\n      duplications,\n      duplicationsCount,\n      firstLineNumber,\n      highlighted,\n      highlightedSymbols,\n      issueLocations,\n      issuePopup,\n      issues,\n      last,\n      line,\n      openIssues,\n      previousLine,\n      scrollToUncoveredLine,\n      secondaryIssueLocations,\n      selectedIssue,\n      verticalBuffer\n    } = this.props;\n\n    const className = classNames('source-line', {\n      'source-line-highlighted': highlighted,\n      'source-line-filtered': line.isNew,\n      'source-line-filtered-dark':\n        displayCoverage &&\n        (line.coverageStatus === 'uncovered' || line.coverageStatus === 'partially-covered'),\n      'source-line-last': last === true\n    });\n\n    const bottomPadding = verticalBuffer ? verticalBuffer * LINE_HEIGHT : undefined;\n\n    // default is true\n    const displayOptions = displayLineNumberOptions !== false;\n\n    return (\n      <tr className={className} data-line-number={line.line}>\n        <LineNumber displayOptions={displayOptions} firstLineNumber={firstLineNumber} line={line} />\n\n        {displaySCM && <LineSCM line={line} previousLine={previousLine} />}\n        {displayIssues && !displayAllIssues ? (\n          <LineIssuesIndicator\n            issues={issues}\n            issuesOpen={openIssues}\n            line={line}\n            onClick={this.handleIssuesIndicatorClick}\n          />\n        ) : (\n          <td className=\"source-meta source-line-issues\" />\n        )}\n\n        {displayDuplications && (\n          <LineDuplicationBlock\n            blocksLoaded={duplicationsCount > 0}\n            duplicated={Boolean(line.duplicated)}\n            index={0}\n            key={0}\n            line={this.props.line}\n            onClick={this.props.loadDuplications}\n            renderDuplicationPopup={this.props.renderDuplicationPopup}\n          />\n        )}\n\n        {duplicationsCount > 1 &&\n          times(duplicationsCount - 1, index => (\n            <LineDuplicationBlock\n              blocksLoaded={true}\n              duplicated={duplications.includes(index + 1)}\n              index={index + 1}\n              key={index + 1}\n              line={this.props.line}\n              renderDuplicationPopup={this.props.renderDuplicationPopup}\n            />\n          ))}\n\n        {displayCoverage && (\n          <LineCoverage\n            line={line}\n            scroll={this.props.scroll}\n            scrollToUncoveredLine={scrollToUncoveredLine}\n          />\n        )}\n\n        <LineCode\n          branchLike={branchLike}\n          displayIssueLocationsCount={displayIssueLocationsCount}\n          displayIssueLocationsLink={displayIssueLocationsLink}\n          displayLocationMarkers={displayLocationMarkers}\n          highlightedLocationMessage={highlightedLocationMessage}\n          highlightedSymbols={highlightedSymbols}\n          issueLocations={issueLocations}\n          issuePopup={issuePopup}\n          issues={issues}\n          line={line}\n          onIssueChange={this.props.onIssueChange}\n          onIssuePopupToggle={this.props.onIssuePopupToggle}\n          onIssueSelect={this.props.onIssueSelect}\n          onLocationSelect={this.props.onLocationSelect}\n          onSymbolClick={this.props.onSymbolClick}\n          padding={bottomPadding}\n          scroll={this.props.scroll}\n          secondaryIssueLocations={secondaryIssueLocations}\n          selectedIssue={selectedIssue}\n          showIssues={openIssues || displayAllIssues}\n        />\n      </tr>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { intersection } from 'lodash';\n\nexport function optimizeHighlightedSymbols(\n  symbolsForLine: string[] = [],\n  highlightedSymbols: string[] = []\n): string[] | undefined {\n  const symbols = intersection(symbolsForLine, highlightedSymbols);\n\n  return symbols.length ? symbols : undefined;\n}\n\nexport function optimizeLocationMessage(\n  highlightedLocationMessage: { index: number; text: string | undefined } | undefined,\n  optimizedSecondaryIssueLocations: T.LinearIssueLocation[]\n) {\n  return highlightedLocationMessage != null &&\n    optimizedSecondaryIssueLocations.some(\n      location => location.index === highlightedLocationMessage.index\n    )\n    ? highlightedLocationMessage\n    : undefined;\n}\n\nexport function optimizeSelectedIssue(selectedIssue: string | undefined, issuesForLine: T.Issue[]) {\n  return selectedIssue !== undefined && issuesForLine.find(issue => issue.key === selectedIssue)\n    ? selectedIssue\n    : undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport { translate } from '../../helpers/l10n';\nimport { BranchLike } from '../../types/branch-like';\nimport { MetricKey } from '../../types/metrics';\nimport Line from './components/Line';\nimport { getSecondaryIssueLocationsForLine } from './helpers/issueLocations';\nimport {\n  optimizeHighlightedSymbols,\n  optimizeLocationMessage,\n  optimizeSelectedIssue\n} from './helpers/lines';\n\nconst EMPTY_ARRAY: any[] = [];\n\nconst ZERO_LINE = {\n  code: '',\n  duplicated: false,\n  isNew: false,\n  line: 0\n};\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  componentKey: string;\n  displayAllIssues?: boolean;\n  displayIssueLocationsCount?: boolean;\n  displayIssueLocationsLink?: boolean;\n  displayLocationMarkers?: boolean;\n  duplications: T.Duplication[] | undefined;\n  duplicationsByLine: { [line: number]: number[] };\n  hasSourcesAfter: boolean;\n  hasSourcesBefore: boolean;\n  highlightedLine: number | undefined;\n  highlightedLocationMessage: { index: number; text: string | undefined } | undefined;\n  // `undefined` elements mean they are located in a different file,\n  // but kept to maintain the location indexes\n  highlightedLocations: (T.FlowLocation | undefined)[] | undefined;\n  highlightedSymbols: string[];\n  issueLocationsByLine: { [line: number]: T.LinearIssueLocation[] };\n  issuePopup: { issue: string; name: string } | undefined;\n  issues: T.Issue[] | undefined;\n  issuesByLine: { [line: number]: T.Issue[] };\n  loadDuplications: (line: T.SourceLine) => void;\n  loadingSourcesAfter: boolean;\n  loadingSourcesBefore: boolean;\n  loadSourcesAfter: () => void;\n  loadSourcesBefore: () => void;\n  onIssueChange: (issue: T.Issue) => void;\n  onIssuePopupToggle: (issue: string, popupName: string, open?: boolean) => void;\n  onIssuesClose: (line: T.SourceLine) => void;\n  onIssueSelect: (issueKey: string) => void;\n  onIssuesOpen: (line: T.SourceLine) => void;\n  onIssueUnselect: () => void;\n  onLocationSelect: ((index: number) => void) | undefined;\n  onSymbolClick: (symbols: string[]) => void;\n  openIssuesByLine: { [line: number]: boolean };\n  renderDuplicationPopup: (index: number, line: number) => React.ReactNode;\n  scroll?: (element: HTMLElement) => void;\n  metricKey?: string;\n  selectedIssue: string | undefined;\n  sources: T.SourceLine[];\n  symbolsByLine: { [line: number]: string[] };\n}\n\nexport default class SourceViewerCode extends React.PureComponent<Props> {\n  firstUncoveredLineFound = false;\n\n  componentDidUpdate(prevProps: Props) {\n    if (this.props.metricKey !== prevProps.metricKey) {\n      this.firstUncoveredLineFound = false;\n    }\n  }\n\n  getDuplicationsForLine = (line: T.SourceLine): number[] => {\n    return this.props.duplicationsByLine[line.line] || EMPTY_ARRAY;\n  };\n\n  getIssuesForLine = (line: T.SourceLine): T.Issue[] => {\n    return this.props.issuesByLine[line.line] || EMPTY_ARRAY;\n  };\n\n  getIssueLocationsForLine = (line: T.SourceLine): T.LinearIssueLocation[] => {\n    return this.props.issueLocationsByLine[line.line] || EMPTY_ARRAY;\n  };\n\n  renderLine = ({\n    line,\n    index,\n    displayCoverage,\n    displayDuplications,\n    displayIssues\n  }: {\n    line: T.SourceLine;\n    index: number;\n    displayCoverage: boolean;\n    displayDuplications: boolean;\n    displayIssues: boolean;\n  }) => {\n    const {\n      highlightedLocationMessage,\n      highlightedLocations,\n      metricKey,\n      selectedIssue,\n      sources\n    } = this.props;\n\n    const secondaryIssueLocations = getSecondaryIssueLocationsForLine(line, highlightedLocations);\n\n    const duplicationsCount = this.props.duplications ? this.props.duplications.length : 0;\n\n    const issuesForLine = this.getIssuesForLine(line);\n    const firstLineNumber = sources && sources.length ? sources[0].line : 0;\n\n    let scrollToUncoveredLine = false;\n    if (\n      !this.firstUncoveredLineFound &&\n      displayCoverage &&\n      line.coverageStatus &&\n      ['uncovered', 'partially-covered'].includes(line.coverageStatus)\n    ) {\n      scrollToUncoveredLine =\n        (metricKey === MetricKey.new_uncovered_lines && line.isNew) ||\n        metricKey === MetricKey.uncovered_lines;\n      this.firstUncoveredLineFound = scrollToUncoveredLine;\n    }\n\n    return (\n      <Line\n        branchLike={this.props.branchLike}\n        displayAllIssues={this.props.displayAllIssues}\n        displayCoverage={displayCoverage}\n        displayDuplications={displayDuplications}\n        displayIssueLocationsCount={this.props.displayIssueLocationsCount}\n        displayIssueLocationsLink={this.props.displayIssueLocationsLink}\n        displayIssues={displayIssues}\n        displayLocationMarkers={this.props.displayLocationMarkers}\n        duplications={this.getDuplicationsForLine(line)}\n        duplicationsCount={duplicationsCount}\n        firstLineNumber={firstLineNumber}\n        highlighted={line.line === this.props.highlightedLine}\n        highlightedLocationMessage={optimizeLocationMessage(\n          highlightedLocationMessage,\n          secondaryIssueLocations\n        )}\n        highlightedSymbols={optimizeHighlightedSymbols(\n          this.props.symbolsByLine[line.line],\n          this.props.highlightedSymbols\n        )}\n        issueLocations={this.getIssueLocationsForLine(line)}\n        issuePopup={this.props.issuePopup}\n        issues={issuesForLine}\n        key={line.line}\n        last={index === this.props.sources.length - 1 && !this.props.hasSourcesAfter}\n        line={line}\n        loadDuplications={this.props.loadDuplications}\n        onIssueChange={this.props.onIssueChange}\n        onIssuePopupToggle={this.props.onIssuePopupToggle}\n        onIssueSelect={this.props.onIssueSelect}\n        onIssueUnselect={this.props.onIssueUnselect}\n        onIssuesClose={this.props.onIssuesClose}\n        onIssuesOpen={this.props.onIssuesOpen}\n        onLocationSelect={this.props.onLocationSelect}\n        onSymbolClick={this.props.onSymbolClick}\n        openIssues={this.props.openIssuesByLine[line.line] || false}\n        previousLine={index > 0 ? sources[index - 1] : undefined}\n        renderDuplicationPopup={this.props.renderDuplicationPopup}\n        scroll={this.props.scroll}\n        scrollToUncoveredLine={scrollToUncoveredLine}\n        secondaryIssueLocations={secondaryIssueLocations}\n        selectedIssue={optimizeSelectedIssue(selectedIssue, issuesForLine)}\n      />\n    );\n  };\n\n  render() {\n    const { issues = [], sources } = this.props;\n\n    const displayCoverage = sources.some(s => s.coverageStatus != null);\n    const displayDuplications = sources.some(s => !!s.duplicated);\n    const displayIssues = issues.length > 0;\n\n    const hasFileIssues = displayIssues && issues.some(issue => !issue.textRange);\n\n    return (\n      <div className=\"source-viewer-code\">\n        {this.props.hasSourcesBefore && (\n          <div className=\"source-viewer-more-code\">\n            {this.props.loadingSourcesBefore ? (\n              <div className=\"js-component-viewer-loading-before\">\n                <i className=\"spinner\" />\n                <span className=\"note spacer-left\">\n                  {translate('source_viewer.loading_more_code')}\n                </span>\n              </div>\n            ) : (\n              <Button\n                className=\"js-component-viewer-source-before\"\n                onClick={this.props.loadSourcesBefore}>\n                {translate('source_viewer.load_more_code')}\n              </Button>\n            )}\n          </div>\n        )}\n\n        <table className=\"source-table\">\n          <tbody>\n            {hasFileIssues &&\n              this.renderLine({\n                line: ZERO_LINE,\n                index: -1,\n                displayCoverage,\n                displayDuplications,\n                displayIssues\n              })}\n            {sources.map((line, index) =>\n              this.renderLine({ line, index, displayCoverage, displayDuplications, displayIssues })\n            )}\n          </tbody>\n        </table>\n\n        {this.props.hasSourcesAfter && (\n          <div className=\"source-viewer-more-code\">\n            {this.props.loadingSourcesAfter ? (\n              <div className=\"js-component-viewer-loading-after\">\n                <i className=\"spinner\" />\n                <span className=\"note spacer-left\">\n                  {translate('source_viewer.loading_more_code')}\n                </span>\n              </div>\n            ) : (\n              <Button\n                className=\"js-component-viewer-source-after\"\n                onClick={this.props.loadSourcesAfter}>\n                {translate('source_viewer.load_more_code')}\n              </Button>\n            )}\n          </div>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ListIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M15.045 11.526v1.007q0 0.204-0.149 0.354t-0.354 0.149h-13.084q-0.204 0-0.354-0.149t-0.149-0.354v-1.006q0-0.204 0.149-0.354t0.354-0.149h13.084q0.204 0 0.354 0.149t0.149 0.354zM15.045 8.506v1.006q0 0.204-0.149 0.354t-0.354 0.149h-13.084q-0.204 0-0.354-0.149t-0.149-0.354v-1.006q0-0.204 0.149-0.354t0.354-0.149h13.084q0.204 0 0.354 0.149t0.149 0.354zM15.045 5.487v1.006q0 0.204-0.149 0.354t-0.354 0.149h-13.084q-0.204 0-0.354-0.149t-0.149-0.354v-1.006q0-0.204 0.149-0.354t0.354-0.149h13.084q0.204 0 0.354 0.149t0.149 0.354zM15.045 2.468v1.006q0 0.204-0.149 0.354t-0.354 0.149h-13.084q-0.204 0-0.354-0.149t-0.149-0.354v-1.006q0-0.204 0.149-0.354t0.354-0.149h13.084q0.204 0 0.354 0.149t0.149 0.354z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON } from '../helpers/request';\nimport { BranchParameters } from '../types/branch-like';\nimport {\n  MeasuresAndMetaWithMetrics,\n  MeasuresAndMetaWithPeriod,\n  MeasuresForProjects\n} from '../types/measures';\n\nconst COMPONENT_URL = '/api/measures/component';\n\nexport function getMeasures(\n  data: { component: string; metricKeys: string } & BranchParameters\n): Promise<T.Measure[]> {\n  return getJSON(COMPONENT_URL, data).then(r => r.component.measures, throwGlobalError);\n}\n\nexport function getMeasuresWithMetrics(\n  component: string,\n  metrics: string[],\n  branchParameters?: BranchParameters\n): Promise<MeasuresAndMetaWithMetrics> {\n  return getJSON(COMPONENT_URL, {\n    additionalFields: 'metrics',\n    component,\n    metricKeys: metrics.join(','),\n    ...branchParameters\n  }).catch(throwGlobalError);\n}\n\nexport function getMeasuresWithPeriod(\n  component: string,\n  metrics: string[],\n  branchParameters?: BranchParameters\n): Promise<MeasuresAndMetaWithPeriod> {\n  return getJSON(COMPONENT_URL, {\n    additionalFields: 'period',\n    component,\n    metricKeys: metrics.join(','),\n    ...branchParameters\n  }).catch(throwGlobalError);\n}\n\nexport function getMeasuresWithPeriodAndMetrics(\n  component: string,\n  metrics: string[],\n  branchParameters?: BranchParameters\n): Promise<MeasuresAndMetaWithPeriod & MeasuresAndMetaWithMetrics> {\n  return getJSON(COMPONENT_URL, {\n    additionalFields: 'period,metrics',\n    component,\n    metricKeys: metrics.join(','),\n    ...branchParameters\n  }).catch(throwGlobalError);\n}\n\nexport function getMeasuresForProjects(\n  projectKeys: string[],\n  metricKeys: string[]\n): Promise<MeasuresForProjects[]> {\n  return getJSON('/api/measures/search', {\n    projectKeys: projectKeys.join(),\n    metricKeys: metricKeys.join()\n  }).then(r => r.measures);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { inRange } from 'lodash';\nimport * as React from 'react';\nimport './DuplicationsRating.css';\n\ninterface Props {\n  muted?: boolean;\n  size?: 'small' | 'normal' | 'big' | 'huge';\n  value: number | null | undefined;\n}\n\nexport default function DuplicationsRating({ muted = false, size = 'normal', value }: Props) {\n  const className = classNames('duplications-rating', {\n    'duplications-rating-small': size === 'small',\n    'duplications-rating-big': size === 'big',\n    'duplications-rating-huge': size === 'huge',\n    'duplications-rating-muted': muted || value == null || isNaN(value),\n    'duplications-rating-A': inRange(value || 0, 0, 3),\n    'duplications-rating-B': inRange(value || 0, 3, 5),\n    'duplications-rating-C': inRange(value || 0, 5, 10),\n    'duplications-rating-D': inRange(value || 0, 10, 20),\n    'duplications-rating-E': (value || 0) >= 20\n  });\n\n  return <div className={className} />;\n}\n", "var pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We\u2019re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\nexport default path;\n", "export {default as path} from \"./path.js\";\n", "export default function(x) {\n  return function constant() {\n    return x;\n  };\n}\n", "export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\n\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n", "import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n  return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n  return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n  return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n  var x10 = x1 - x0, y10 = y1 - y0,\n      x32 = x3 - x2, y32 = y3 - y2,\n      t = y32 * x10 - x32 * y10;\n  if (t * t < epsilon) return;\n  t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n  return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n  var x01 = x0 - x1,\n      y01 = y0 - y1,\n      lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n      ox = lo * y01,\n      oy = -lo * x01,\n      x11 = x0 + ox,\n      y11 = y0 + oy,\n      x10 = x1 + ox,\n      y10 = y1 + oy,\n      x00 = (x11 + x10) / 2,\n      y00 = (y11 + y10) / 2,\n      dx = x10 - x11,\n      dy = y10 - y11,\n      d2 = dx * dx + dy * dy,\n      r = r1 - rc,\n      D = x11 * y10 - x10 * y11,\n      d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n      cx0 = (D * dy - dx * d) / d2,\n      cy0 = (-D * dx - dy * d) / d2,\n      cx1 = (D * dy + dx * d) / d2,\n      cy1 = (-D * dx + dy * d) / d2,\n      dx0 = cx0 - x00,\n      dy0 = cy0 - y00,\n      dx1 = cx1 - x00,\n      dy1 = cy1 - y00;\n\n  // Pick the closer of the two intersection points.\n  // TODO Is there a faster way to determine which intersection to use?\n  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n  return {\n    cx: cx0,\n    cy: cy0,\n    x01: -ox,\n    y01: -oy,\n    x11: cx0 * (r1 / r - 1),\n    y11: cy0 * (r1 / r - 1)\n  };\n}\n\nexport default function() {\n  var innerRadius = arcInnerRadius,\n      outerRadius = arcOuterRadius,\n      cornerRadius = constant(0),\n      padRadius = null,\n      startAngle = arcStartAngle,\n      endAngle = arcEndAngle,\n      padAngle = arcPadAngle,\n      context = null;\n\n  function arc() {\n    var buffer,\n        r,\n        r0 = +innerRadius.apply(this, arguments),\n        r1 = +outerRadius.apply(this, arguments),\n        a0 = startAngle.apply(this, arguments) - halfPi,\n        a1 = endAngle.apply(this, arguments) - halfPi,\n        da = abs(a1 - a0),\n        cw = a1 > a0;\n\n    if (!context) context = buffer = path();\n\n    // Ensure that the outer radius is always larger than the inner radius.\n    if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n    // Is it a point?\n    if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n    // Or is it a circle or annulus?\n    else if (da > tau - epsilon) {\n      context.moveTo(r1 * cos(a0), r1 * sin(a0));\n      context.arc(0, 0, r1, a0, a1, !cw);\n      if (r0 > epsilon) {\n        context.moveTo(r0 * cos(a1), r0 * sin(a1));\n        context.arc(0, 0, r0, a1, a0, cw);\n      }\n    }\n\n    // Or is it a circular or annular sector?\n    else {\n      var a01 = a0,\n          a11 = a1,\n          a00 = a0,\n          a10 = a1,\n          da0 = da,\n          da1 = da,\n          ap = padAngle.apply(this, arguments) / 2,\n          rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n          rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n          rc0 = rc,\n          rc1 = rc,\n          t0,\n          t1;\n\n      // Apply padding? Note that since r1 \u2265 r0, da1 \u2265 da0.\n      if (rp > epsilon) {\n        var p0 = asin(rp / r0 * sin(ap)),\n            p1 = asin(rp / r1 * sin(ap));\n        if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n        else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n        if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n        else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n      }\n\n      var x01 = r1 * cos(a01),\n          y01 = r1 * sin(a01),\n          x10 = r0 * cos(a10),\n          y10 = r0 * sin(a10);\n\n      // Apply rounded corners?\n      if (rc > epsilon) {\n        var x11 = r1 * cos(a11),\n            y11 = r1 * sin(a11),\n            x00 = r0 * cos(a00),\n            y00 = r0 * sin(a00),\n            oc;\n\n        // Restrict the corner radius according to the sector angle.\n        if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n          var ax = x01 - oc[0],\n              ay = y01 - oc[1],\n              bx = x11 - oc[0],\n              by = y11 - oc[1],\n              kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n              lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = min(rc, (r0 - lc) / (kc - 1));\n          rc1 = min(rc, (r1 - lc) / (kc + 1));\n        }\n      }\n\n      // Is the sector collapsed to a line?\n      if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n      // Does the sector\u2019s outer ring have rounded corners?\n      else if (rc1 > epsilon) {\n        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n          context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the outer ring just a circular arc?\n      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n      // Is there no inner ring, and it\u2019s a circular sector?\n      // Or perhaps it\u2019s an annular sector collapsed due to padding?\n      if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n      // Does the sector\u2019s inner ring (or point) have rounded corners?\n      else if (rc0 > epsilon) {\n        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n          context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the inner ring just a circular arc?\n      else context.arc(0, 0, r0, a10, a00, cw);\n    }\n\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  arc.centroid = function() {\n    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n    return [cos(a) * r, sin(a) * r];\n  };\n\n  arc.innerRadius = function(_) {\n    return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n  };\n\n  arc.outerRadius = function(_) {\n    return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n  };\n\n  arc.cornerRadius = function(_) {\n    return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n  };\n\n  arc.padRadius = function(_) {\n    return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n  };\n\n  arc.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n  };\n\n  arc.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n  };\n\n  arc.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n  };\n\n  arc.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n  };\n\n  return arc;\n}\n", "function Linear(context) {\n  this._context = context;\n}\n\nLinear.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; // proceed\n      default: this._context.lineTo(x, y); break;\n    }\n  }\n};\n\nexport default function(context) {\n  return new Linear(context);\n}\n", "export function x(p) {\n  return p[0];\n}\n\nexport function y(p) {\n  return p[1];\n}\n", "import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function() {\n  var x = pointX,\n      y = pointY,\n      defined = constant(true),\n      context = null,\n      curve = curveLinear,\n      output = null;\n\n  function line(data) {\n    var i,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer;\n\n    if (context == null) output = curve(buffer = path());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) output.lineStart();\n        else output.lineEnd();\n      }\n      if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  line.x = function(_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n  };\n\n  line.y = function(_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n  };\n\n  line.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n  };\n\n  line.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n  };\n\n  line.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n  };\n\n  return line;\n}\n", "import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function() {\n  var x0 = pointX,\n      x1 = null,\n      y0 = constant(0),\n      y1 = pointY,\n      defined = constant(true),\n      context = null,\n      curve = curveLinear,\n      output = null;\n\n  function area(data) {\n    var i,\n        j,\n        k,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer,\n        x0z = new Array(n),\n        y0z = new Array(n);\n\n    if (context == null) output = curve(buffer = path());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) {\n          j = i;\n          output.areaStart();\n          output.lineStart();\n        } else {\n          output.lineEnd();\n          output.lineStart();\n          for (k = i - 1; k >= j; --k) {\n            output.point(x0z[k], y0z[k]);\n          }\n          output.lineEnd();\n          output.areaEnd();\n        }\n      }\n      if (defined0) {\n        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n      }\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  function arealine() {\n    return line().defined(defined).curve(curve).context(context);\n  }\n\n  area.x = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n  };\n\n  area.x0 = function(_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n  };\n\n  area.x1 = function(_) {\n    return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n  };\n\n  area.y = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n  };\n\n  area.y0 = function(_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n  };\n\n  area.y1 = function(_) {\n    return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n  };\n\n  area.lineX0 =\n  area.lineY0 = function() {\n    return arealine().x(x0).y(y0);\n  };\n\n  area.lineY1 = function() {\n    return arealine().x(x0).y(y1);\n  };\n\n  area.lineX1 = function() {\n    return arealine().x(x1).y(y0);\n  };\n\n  area.defined = function(_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n  };\n\n  area.curve = function(_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n  };\n\n  area.context = function(_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n  };\n\n  return area;\n}\n", "export default function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n", "export default function(d) {\n  return d;\n}\n", "import constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n  var value = identity,\n      sortValues = descending,\n      sort = null,\n      startAngle = constant(0),\n      endAngle = constant(tau),\n      padAngle = constant(0);\n\n  function pie(data) {\n    var i,\n        n = data.length,\n        j,\n        k,\n        sum = 0,\n        index = new Array(n),\n        arcs = new Array(n),\n        a0 = +startAngle.apply(this, arguments),\n        da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n        a1,\n        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n        pa = p * (da < 0 ? -1 : 1),\n        v;\n\n    for (i = 0; i < n; ++i) {\n      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n        sum += v;\n      }\n    }\n\n    // Optionally sort the arcs by previously-computed values or by data.\n    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n    // Compute the arcs! They are stored in the original data's order.\n    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n        data: data[j],\n        index: i,\n        value: v,\n        startAngle: a0,\n        endAngle: a1,\n        padAngle: p\n      };\n    }\n\n    return arcs;\n  }\n\n  pie.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n  };\n\n  pie.sortValues = function(_) {\n    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n  };\n\n  pie.sort = function(_) {\n    return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n  };\n\n  pie.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n  };\n\n  pie.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n  };\n\n  pie.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n  };\n\n  return pie;\n}\n", "export function point(that, x, y) {\n  that._context.bezierCurveTo(\n    (2 * that._x0 + that._x1) / 3,\n    (2 * that._y0 + that._y1) / 3,\n    (that._x0 + 2 * that._x1) / 3,\n    (that._y0 + 2 * that._y1) / 3,\n    (that._x0 + 4 * that._x1 + x) / 6,\n    (that._y0 + 4 * that._y1 + y) / 6\n  );\n}\n\nexport function Basis(context) {\n  this._context = context;\n}\n\nBasis.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 3: point(this, this._x1, this._y1); // proceed\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\nexport default function(context) {\n  return new Basis(context);\n}\n", "export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {linkHorizontal, linkVertical, linkRadial} from \"./link/index.js\";\n\nexport {default as symbol, symbols} from \"./symbol.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { arc as d3Arc, pie as d3Pie, PieArcDatum } from 'd3-shape';\nimport * as React from 'react';\n\ninterface DataPoint {\n  fill: string;\n  value: number;\n}\n\nexport interface DonutChartProps {\n  data: DataPoint[];\n  height: number;\n  padAngle?: number;\n  padding?: [number, number, number, number];\n  thickness: number;\n  width: number;\n}\n\nexport default function DonutChart(props: DonutChartProps) {\n  const { height, padding = [0, 0, 0, 0], width } = props;\n\n  const availableWidth = width - padding[1] - padding[3];\n  const availableHeight = height - padding[0] - padding[2];\n\n  const size = Math.min(availableWidth, availableHeight);\n  const radius = Math.floor(size / 2);\n\n  const pie = d3Pie<any, DataPoint>()\n    .sort(null)\n    .value(d => d.value);\n\n  if (props.padAngle !== undefined) {\n    pie.padAngle(props.padAngle);\n  }\n\n  const sectors = pie(props.data).map((d, i) => {\n    return (\n      <Sector\n        data={d}\n        fill={props.data[i].fill}\n        // eslint-disable-next-line react/no-array-index-key\n        key={i}\n        radius={radius}\n        thickness={props.thickness}\n      />\n    );\n  });\n\n  return (\n    <svg className=\"donut-chart\" height={height} width={width}>\n      <g transform={`translate(${padding[3]}, ${padding[0]})`}>\n        <g transform={`translate(${radius}, ${radius})`}>{sectors}</g>\n      </g>\n    </svg>\n  );\n}\n\ninterface SectorProps {\n  data: PieArcDatum<DataPoint>;\n  fill: string;\n  radius: number;\n  thickness: number;\n}\n\nfunction Sector(props: SectorProps) {\n  const arc = d3Arc<any, PieArcDatum<DataPoint>>()\n    .outerRadius(props.radius)\n    .innerRadius(props.radius - props.thickness);\n  const d = arc(props.data) as string;\n  return <path d={d} style={{ fill: props.fill }} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport { lazyLoadComponent } from '../lazyLoadComponent';\n\nconst DonutChart = lazyLoadComponent(\n  () => import('../../components/charts/DonutChart'),\n  'DonutChart'\n);\n\nconst SIZE_TO_WIDTH_MAPPING = { small: 16, normal: 24, big: 40, huge: 60 };\n\nconst SIZE_TO_THICKNESS_MAPPING = { small: 2, normal: 3, big: 3, huge: 4 };\n\nexport interface CoverageRatingProps {\n  muted?: boolean;\n  size?: 'small' | 'normal' | 'big' | 'huge';\n  value: number | string | null | undefined;\n}\n\nexport default function CoverageRating({\n  muted = false,\n  size = 'normal',\n  value\n}: CoverageRatingProps) {\n  let data = [{ value: 100, fill: '#ccc ' }];\n  let padAngle = 0;\n\n  if (value != null) {\n    const numberValue = Number(value);\n    data = [\n      { value: numberValue, fill: muted ? colors.gray71 : colors.green },\n      { value: 100 - numberValue, fill: muted ? colors.barBackgroundColor : colors.lineCoverageRed }\n    ];\n    if (numberValue !== 0 && numberValue < 100) {\n      padAngle = 0.1; // Same for all sizes, because it scales automatically\n    }\n  }\n\n  const width = SIZE_TO_WIDTH_MAPPING[size];\n  const thickness = SIZE_TO_THICKNESS_MAPPING[size];\n\n  return (\n    <DonutChart\n      data={data}\n      height={width}\n      padAngle={padAngle}\n      thickness={thickness}\n      width={width}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport { getLocalizedMetricName } from '../../../helpers/l10n';\nimport { isMetricKey, MetricKey } from '../../../types/metrics';\nimport Measure from '../../measure/Measure';\n\nexport interface MeasureWithMetric {\n  metric: T.Metric;\n  value?: string;\n}\n\ninterface Props {\n  measure: MeasureWithMetric;\n}\n\nexport default function MeasuresOverlayMeasure({ measure }: Props) {\n  return (\n    <div\n      className=\"measure measure-one-line\"\n      data-metric={measure.metric.key}\n      key={measure.metric.key}>\n      <span className=\"measure-name\">\n        {isMetricKey(measure.metric.key) &&\n          [MetricKey.bugs, MetricKey.vulnerabilities, MetricKey.code_smells].includes(\n            measure.metric.key\n          ) && <IssueTypeIcon className=\"little-spacer-right\" query={measure.metric.key} />}\n        {getLocalizedMetricName(measure.metric)}\n      </span>\n      <span className=\"measure-value\">\n        <Measure\n          metricKey={measure.metric.key}\n          metricType={measure.metric.type}\n          small={true}\n          value={measure.value}\n        />\n      </span>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy, keyBy, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { getFacets } from '../../../api/issues';\nimport { getMeasures } from '../../../api/measures';\nimport { getAllMetrics } from '../../../api/metrics';\nimport { ResetButtonLink } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport TagsIcon from '../../../components/icons/TagsIcon';\nimport DuplicationsRating from '../../../components/ui/DuplicationsRating';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { ISSUE_TYPES, SEVERITIES } from '../../../helpers/constants';\nimport { getLocalizedMetricName, translate } from '../../../helpers/l10n';\nimport {\n  enhanceMeasuresWithMetrics,\n  formatMeasure,\n  getDisplayMetrics\n} from '../../../helpers/measures';\nimport { getBranchLikeUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport Measure from '../../measure/Measure';\nimport SeverityHelper from '../../shared/SeverityHelper';\nimport CoverageRating from '../../ui/CoverageRating';\nimport MeasuresOverlayMeasure from './MeasuresOverlayMeasure';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  onClose: () => void;\n  sourceViewerFile: T.SourceViewerFile;\n}\n\ninterface Measures {\n  [metricKey: string]: T.MeasureEnhanced;\n}\n\ninterface State {\n  loading: boolean;\n  measures: Measures;\n  severitiesFacet?: T.FacetValue[];\n  showAllMeasures: boolean;\n  tagsFacet?: T.FacetValue[];\n  typesFacet?: T.FacetValue<T.IssueType>[];\n}\n\nexport default class MeasuresOverlay extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true, measures: {}, showAllMeasures: false };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchData();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchData = () => {\n    Promise.all([this.fetchMeasures(), this.fetchIssues()]).then(\n      ([measures, facets]) => {\n        if (this.mounted) {\n          this.setState({ loading: false, measures, ...facets });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  fetchMeasures = () => {\n    return getAllMetrics().then(metrics => {\n      const metricKeys = getDisplayMetrics(metrics).map(metric => metric.key);\n\n      // eslint-disable-next-line promise/no-nesting\n      return getMeasures({\n        component: this.props.sourceViewerFile.key,\n        metricKeys: metricKeys.join(),\n        ...getBranchLikeQuery(this.props.branchLike)\n      }).then(measures => {\n        const withMetrics = enhanceMeasuresWithMetrics(measures, metrics).filter(\n          measure => measure.metric\n        );\n        return keyBy(withMetrics, measure => measure.metric.key);\n      });\n    });\n  };\n\n  fetchIssues = () => {\n    return getFacets(\n      {\n        componentKeys: this.props.sourceViewerFile.key,\n        resolved: 'false',\n        ...getBranchLikeQuery(this.props.branchLike)\n      },\n      ['types', 'severities', 'tags']\n    ).then(({ facets }) => {\n      const severitiesFacet = facets.find(f => f.property === 'severities');\n      const tagsFacet = facets.find(f => f.property === 'tags');\n      const typesFacet = facets.find(f => f.property === 'types');\n      return {\n        severitiesFacet: severitiesFacet && severitiesFacet.values,\n        tagsFacet: tagsFacet && tagsFacet.values,\n        typesFacet: typesFacet && (typesFacet.values as T.FacetValue<T.IssueType>[])\n      };\n    });\n  };\n\n  handleAllMeasuresClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.setState({ showAllMeasures: true });\n  };\n\n  renderMeasure = (measure: T.MeasureEnhanced | undefined) => {\n    return measure ? <MeasuresOverlayMeasure key={measure.metric.key} measure={measure} /> : null;\n  };\n\n  renderLines = () => {\n    const { measures } = this.state;\n\n    return (\n      <div className=\"measures-viewer-section\">\n        <div className=\"measures-viewer-card\">\n          <div className=\"measures\">\n            {this.renderMeasure(measures.lines)}\n            {this.renderMeasure(measures.ncloc)}\n            {this.renderMeasure(measures.comment_lines)}\n            {this.renderMeasure(measures.comment_lines_density)}\n          </div>\n\n          <div className=\"measures\">\n            {this.renderMeasure(measures.cognitive_complexity)}\n            {this.renderMeasure(measures.complexity)}\n            {this.renderMeasure(measures.function_complexity)}\n          </div>\n        </div>\n      </div>\n    );\n  };\n\n  renderBigMeasure = (measure: T.MeasureEnhanced | undefined) => {\n    return measure ? (\n      <div className=\"measure measure-big\" data-metric={measure.metric.key}>\n        <span className=\"measure-value\">\n          <Measure\n            metricKey={measure.metric.key}\n            metricType={measure.metric.type}\n            value={measure.value}\n          />\n        </span>\n        <span className=\"measure-name\">{getLocalizedMetricName(measure.metric, true)}</span>\n      </div>\n    ) : null;\n  };\n\n  renderIssues = () => {\n    const { measures, severitiesFacet, tagsFacet, typesFacet } = this.state;\n    return (\n      <div className=\"measures-viewer-section\">\n        <div className=\"measures-viewer-card\">\n          <div className=\"measures\">\n            {this.renderBigMeasure(measures.violations)}\n            {this.renderBigMeasure(measures.sqale_index)}\n          </div>\n          {measures.violations && !!measures.violations.value && (\n            <>\n              {typesFacet && (\n                <div className=\"measures\">\n                  {sortBy(typesFacet, f => ISSUE_TYPES.indexOf(f.val)).map(f => (\n                    <div className=\"measure measure-one-line\" key={f.val}>\n                      <span className=\"measure-name\">\n                        <IssueTypeIcon className=\"little-spacer-right\" query={f.val} />\n                        {translate('issue.type', f.val)}\n                      </span>\n                      <span className=\"measure-value\">{formatMeasure(f.count, 'SHORT_INT')}</span>\n                    </div>\n                  ))}\n                </div>\n              )}\n              {severitiesFacet && (\n                <div className=\"measures\">\n                  {sortBy(severitiesFacet, f => SEVERITIES.indexOf(f.val)).map(f => (\n                    <div className=\"measure measure-one-line\" key={f.val}>\n                      <span className=\"measure-name\">\n                        <SeverityHelper severity={f.val} />\n                      </span>\n                      <span className=\"measure-value\">{formatMeasure(f.count, 'SHORT_INT')}</span>\n                    </div>\n                  ))}\n                </div>\n              )}\n              {tagsFacet && (\n                <div className=\"measures\">\n                  {tagsFacet.map(f => (\n                    <div className=\"measure measure-one-line\" key={f.val}>\n                      <span className=\"measure-name\">\n                        <TagsIcon className=\"little-spacer-right\" />\n                        {f.val}\n                      </span>\n                      <span className=\"measure-value\">{formatMeasure(f.count, 'SHORT_INT')}</span>\n                    </div>\n                  ))}\n                </div>\n              )}\n            </>\n          )}\n        </div>\n      </div>\n    );\n  };\n\n  renderCoverage = () => {\n    const { coverage } = this.state.measures;\n    if (!coverage) {\n      return null;\n    }\n    return (\n      <div className=\"measures-viewer-section\">\n        <div className=\"measures-viewer-card\">\n          <div className=\"measures\">\n            <div className=\"measures-chart\">\n              <CoverageRating size=\"big\" value={coverage.value} />\n            </div>\n            <div className=\"measure measure-big\" data-metric={coverage.metric.key}>\n              <span className=\"measure-value\">\n                <Measure\n                  metricKey={coverage.metric.key}\n                  metricType={coverage.metric.type}\n                  value={coverage.value}\n                />\n              </span>\n              <span className=\"measure-name\">{getLocalizedMetricName(coverage.metric)}</span>\n            </div>\n          </div>\n\n          <div className=\"measures\">\n            {this.renderMeasure(this.state.measures.uncovered_lines)}\n            {this.renderMeasure(this.state.measures.lines_to_cover)}\n            {this.renderMeasure(this.state.measures.uncovered_conditions)}\n            {this.renderMeasure(this.state.measures.conditions_to_cover)}\n          </div>\n        </div>\n      </div>\n    );\n  };\n\n  renderDuplications = () => {\n    const { duplicated_lines_density: duplications } = this.state.measures;\n    if (!duplications) {\n      return null;\n    }\n    return (\n      <div className=\"measures-viewer-section\">\n        <div className=\"measures-viewer-card\">\n          <div className=\"measures\">\n            <div className=\"measures-chart\">\n              <DuplicationsRating\n                muted={duplications.value === undefined}\n                size=\"big\"\n                value={Number(duplications.value || 0)}\n              />\n            </div>\n            <div className=\"measure measure-big\" data-metric={duplications.metric.key}>\n              <span className=\"measure-value\">\n                <Measure\n                  metricKey={duplications.metric.key}\n                  metricType={duplications.metric.type}\n                  value={duplications.value}\n                />\n              </span>\n              <span className=\"measure-name\">\n                {getLocalizedMetricName(duplications.metric, true)}\n              </span>\n            </div>\n          </div>\n\n          <div className=\"measures\">\n            {this.renderMeasure(this.state.measures.duplicated_blocks)}\n            {this.renderMeasure(this.state.measures.duplicated_lines)}\n          </div>\n        </div>\n      </div>\n    );\n  };\n\n  renderTests = () => {\n    const { measures } = this.state;\n    return (\n      <div className=\"measures-viewer\">\n        <div className=\"measures-viewer-section measures-viewer-section-limited\">\n          <div className=\"measures-viewer-card\">\n            <div className=\"measures\">\n              {this.renderMeasure(measures.tests)}\n              {this.renderMeasure(measures.test_success_density)}\n              {this.renderMeasure(measures.test_failures)}\n              {this.renderMeasure(measures.test_errors)}\n              {this.renderMeasure(measures.skipped_tests)}\n              {this.renderMeasure(measures.test_execution_time)}\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  };\n\n  renderDomain = (domain: string, measures: T.MeasureEnhanced[]) => {\n    return (\n      <div className=\"measures-viewer-card\" key={domain}>\n        <div className=\"measures\">\n          <div className=\"measure measure-big\">\n            <span className=\"measure-name\">{translate('metric_domain', domain)}</span>\n          </div>\n          {sortBy(\n            measures.filter(measure => measure.value !== undefined),\n            measure => getLocalizedMetricName(measure.metric)\n          ).map(measure => this.renderMeasure(measure))}\n        </div>\n      </div>\n    );\n  };\n\n  renderAllMeasures = () => {\n    const domains = groupBy(Object.values(this.state.measures), measure => measure.metric.domain);\n    const domainKeys = Object.keys(domains);\n    const odd = domainKeys.filter((_, index) => index % 2 === 1);\n    const even = domainKeys.filter((_, index) => index % 2 === 0);\n    return (\n      <div className=\"measures-viewer measures-viewer-secondary\">\n        <div className=\"measures-viewer-section\">\n          {odd.map(domain => this.renderDomain(domain, domains[domain]))}\n        </div>\n        <div className=\"measures-viewer-section\">\n          {even.map(domain => this.renderDomain(domain, domains[domain]))}\n        </div>\n      </div>\n    );\n  };\n\n  render() {\n    const { branchLike, sourceViewerFile } = this.props;\n    const { loading } = this.state;\n\n    const header = translate('component_viewer.file_measures');\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose} size=\"large\">\n        <div className=\"modal-head\">\n          <h2>{header}</h2>\n        </div>\n        <div className=\"modal-body modal-container\">\n          <div className=\"measures-viewer-header big-spacer-bottom\">\n            <div>\n              <QualifierIcon className=\"little-spacer-right\" qualifier=\"TRK\" />\n              <Link to={getBranchLikeUrl(sourceViewerFile.project, branchLike)}>\n                {sourceViewerFile.projectName}\n              </Link>\n\n              {sourceViewerFile.subProject && (\n                <>\n                  <QualifierIcon className=\"big-spacer-left little-spacer-right\" qualifier=\"BRC\" />\n                  {sourceViewerFile.subProjectName}\n                </>\n              )}\n            </div>\n\n            <div className=\"display-flex-center little-spacer-top\">\n              <QualifierIcon className=\"little-spacer-right\" qualifier={sourceViewerFile.q} />\n              {sourceViewerFile.path}\n            </div>\n          </div>\n\n          {loading ? (\n            <i className=\"spinner\" />\n          ) : (\n            <>\n              {sourceViewerFile.q === 'UTS' ? (\n                this.renderTests()\n              ) : (\n                <div className=\"measures-viewer\">\n                  {this.renderLines()}\n                  {this.renderIssues()}\n                  {this.renderCoverage()}\n                  {this.renderDuplications()}\n                </div>\n              )}\n            </>\n          )}\n\n          <div className=\"spacer-top\">\n            {this.state.showAllMeasures ? (\n              this.renderAllMeasures()\n            ) : (\n              <a className=\"js-show-all-measures\" href=\"#\" onClick={this.handleAllMeasuresClick}>\n                {translate('component_viewer.show_all_measures')}\n              </a>\n            )}\n          </div>\n        </div>\n\n        <footer className=\"modal-foot\">\n          <ResetButtonLink onClick={this.props.onClose}>{translate('close')}</ResetButtonLink>\n        </footer>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { ButtonIcon } from '../../components/controls/buttons';\nimport { ClipboardIconButton } from '../../components/controls/clipboard';\nimport Dropdown from '../../components/controls/Dropdown';\nimport ListIcon from '../../components/icons/ListIcon';\nimport QualifierIcon from '../../components/icons/QualifierIcon';\nimport { PopupPlacement } from '../../components/ui/popups';\nimport { getBranchLikeQuery } from '../../helpers/branch-like';\nimport { ISSUE_TYPES } from '../../helpers/constants';\nimport { ISSUETYPE_METRIC_KEYS_MAP } from '../../helpers/issues';\nimport { translate } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport { collapsedDirFromPath, fileFromPath } from '../../helpers/path';\nimport { omitNil } from '../../helpers/request';\nimport { getBaseUrl } from '../../helpers/system';\nimport {\n  getBranchLikeUrl,\n  getCodeUrl,\n  getComponentIssuesUrl,\n  getPathUrlAsString\n} from '../../helpers/urls';\nimport { BranchLike } from '../../types/branch-like';\nimport { ComponentQualifier } from '../../types/component';\nimport { WorkspaceContextShape } from '../workspace/context';\nimport MeasuresOverlay from './components/MeasuresOverlay';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  componentMeasures?: T.Measure[];\n  openComponent: WorkspaceContextShape['openComponent'];\n  showMeasures?: boolean;\n  sourceViewerFile: T.SourceViewerFile;\n}\n\ninterface State {\n  measuresOverlay: boolean;\n}\n\nexport default class SourceViewerHeader extends React.PureComponent<Props, State> {\n  state: State = { measuresOverlay: false };\n\n  handleShowMeasuresClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.setState({ measuresOverlay: true });\n  };\n\n  handleMeasuresOverlayClose = () => {\n    this.setState({ measuresOverlay: false });\n  };\n\n  openInWorkspace = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    const { key } = this.props.sourceViewerFile;\n    this.props.openComponent({ branchLike: this.props.branchLike, key });\n  };\n\n  renderIssueMeasures = () => {\n    const { branchLike, componentMeasures, sourceViewerFile } = this.props;\n    return (\n      componentMeasures &&\n      componentMeasures.length > 0 && (\n        <>\n          <div className=\"source-viewer-header-measure-separator\" />\n\n          {ISSUE_TYPES.map((type: T.IssueType) => {\n            const params = {\n              ...getBranchLikeQuery(branchLike),\n              files: sourceViewerFile.path,\n              resolved: 'false',\n              types: type\n            };\n\n            const measure = componentMeasures.find(\n              m => m.metric === ISSUETYPE_METRIC_KEYS_MAP[type].metric\n            );\n            return (\n              <div className=\"source-viewer-header-measure\" key={type}>\n                <span className=\"source-viewer-header-measure-label\">\n                  {translate('issue.type', type)}\n                </span>\n                <span className=\"source-viewer-header-measure-value\">\n                  <Link to={getComponentIssuesUrl(sourceViewerFile.project, params)}>\n                    {formatMeasure((measure && measure.value) || 0, 'INT')}\n                  </Link>\n                </span>\n              </div>\n            );\n          })}\n        </>\n      )\n    );\n  };\n\n  render() {\n    const { showMeasures } = this.props;\n    const {\n      key,\n      measures,\n      path,\n      project,\n      projectName,\n      q,\n      subProject,\n      subProjectName\n    } = this.props.sourceViewerFile;\n    const unitTestsOrLines = q === ComponentQualifier.TestFile ? 'tests' : 'lines';\n    const workspace = false;\n    const query = new URLSearchParams(\n      omitNil({ key, ...getBranchLikeQuery(this.props.branchLike) })\n    ).toString();\n    const rawSourcesLink = `${getBaseUrl()}/api/sources/raw?${query}`;\n\n    // TODO favorite\n    return (\n      <div className=\"source-viewer-header display-flex-center\">\n        <div className=\"flex-1 little-spacer-top\">\n          <div className=\"component-name\">\n            <div className=\"component-name-parent\">\n              <a\n                className=\"link-with-icon\"\n                href={getPathUrlAsString(getBranchLikeUrl(project, this.props.branchLike))}>\n                <QualifierIcon qualifier=\"TRK\" /> <span>{projectName}</span>\n              </a>\n            </div>\n\n            {subProject !== undefined && (\n              <div className=\"component-name-parent\">\n                <QualifierIcon qualifier=\"BRC\" /> <span>{subProjectName}</span>\n              </div>\n            )}\n\n            <div className=\"component-name-path\">\n              <QualifierIcon qualifier={q} /> <span>{collapsedDirFromPath(path)}</span>\n              <span className=\"component-name-file\">{fileFromPath(path)}</span>\n              <span className=\"nudged-up spacer-left\">\n                <ClipboardIconButton\n                  aria-label={translate('component_viewer.copy_path_to_clipboard')}\n                  className=\"button-link link-no-underline\"\n                  copyValue={path}\n                />\n              </span>\n            </div>\n          </div>\n        </div>\n\n        {this.state.measuresOverlay && (\n          <MeasuresOverlay\n            branchLike={this.props.branchLike}\n            onClose={this.handleMeasuresOverlayClose}\n            sourceViewerFile={this.props.sourceViewerFile}\n          />\n        )}\n\n        {showMeasures && (\n          <div className=\"display-flex-center\">\n            {measures[unitTestsOrLines] && (\n              <div className=\"source-viewer-header-measure\">\n                <span className=\"source-viewer-header-measure-label\">\n                  {translate(`metric.${unitTestsOrLines}.name`)}\n                </span>\n                <span className=\"source-viewer-header-measure-value\">\n                  {formatMeasure(measures[unitTestsOrLines], 'SHORT_INT')}\n                </span>\n              </div>\n            )}\n\n            {measures.coverage !== undefined && (\n              <div className=\"source-viewer-header-measure\">\n                <span className=\"source-viewer-header-measure-label\">\n                  {translate('metric.coverage.name')}\n                </span>\n                <span className=\"source-viewer-header-measure-value\">\n                  {formatMeasure(measures.coverage, 'PERCENT')}\n                </span>\n              </div>\n            )}\n\n            {measures.duplicationDensity !== undefined && (\n              <div className=\"source-viewer-header-measure\">\n                <span className=\"source-viewer-header-measure-label\">\n                  {translate('duplications')}\n                </span>\n                <span className=\"source-viewer-header-measure-value\">\n                  {formatMeasure(measures.duplicationDensity, 'PERCENT')}\n                </span>\n              </div>\n            )}\n\n            {this.renderIssueMeasures()}\n          </div>\n        )}\n\n        <Dropdown\n          className=\"source-viewer-header-actions flex-0\"\n          overlay={\n            <ul className=\"menu\">\n              <li>\n                <a className=\"js-measures\" href=\"#\" onClick={this.handleShowMeasuresClick}>\n                  {translate('component_viewer.show_details')}\n                </a>\n              </li>\n              <li>\n                <Link\n                  className=\"js-new-window\"\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\"\n                  to={getCodeUrl(this.props.sourceViewerFile.project, this.props.branchLike, key)}>\n                  {translate('component_viewer.new_window')}\n                </Link>\n              </li>\n              {!workspace && (\n                <li>\n                  <a className=\"js-workspace\" href=\"#\" onClick={this.openInWorkspace}>\n                    {translate('component_viewer.open_in_workspace')}\n                  </a>\n                </li>\n              )}\n              <li>\n                <a\n                  className=\"js-raw-source\"\n                  href={rawSourcesLink}\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  {translate('component_viewer.show_raw_source')}\n                </a>\n              </li>\n            </ul>\n          }\n          overlayPlacement={PopupPlacement.BottomRight}>\n          <ButtonIcon className=\"js-actions\">\n            <ListIcon />\n          </ButtonIcon>\n        </Dropdown>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ExpandSnippetIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <g fill=\"none\" fillRule=\"evenodd\">\n        <path\n          d=\"M8 1v4H4\"\n          stroke={fill}\n          strokeWidth=\"2\"\n          transform=\"scale(-.83333 -.84583) rotate(45 7.66 -19.75)\"\n        />\n        <path d=\"M3 5.78h10v1.7H3z\" fill={fill} />\n        <path d=\"M7.17 2.4h1.66v5.07H7.17z\" fill={fill} />\n        <g>\n          <path\n            d=\"M8.16 1.81V6.1H3.9\"\n            stroke={fill}\n            strokeWidth=\"2\"\n            transform=\"scale(.83333 .84583) rotate(45 -4.2 13.2)\"\n          />\n          <path d=\"M13 10.01H3v-1.7h10z\" fill={fill} />\n          <path d=\"M8.83 13.4H7.17V9.15h1.66z\" fill={fill} />\n        </g>\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { ButtonIcon } from '../../components/controls/buttons';\nimport { ClipboardIconButton } from '../../components/controls/clipboard';\nimport ExpandSnippetIcon from '../../components/icons/ExpandSnippetIcon';\nimport QualifierIcon from '../../components/icons/QualifierIcon';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { getBranchLikeQuery } from '../../helpers/branch-like';\nimport { translate } from '../../helpers/l10n';\nimport { collapsedDirFromPath, fileFromPath } from '../../helpers/path';\nimport { getBranchLikeUrl, getComponentIssuesUrl, getPathUrlAsString } from '../../helpers/urls';\nimport { BranchLike } from '../../types/branch-like';\nimport { ComponentQualifier } from '../../types/component';\nimport './SourceViewerHeaderSlim.css';\n\nexport interface Props {\n  branchLike: BranchLike | undefined;\n  expandable?: boolean;\n  displayProjectName?: boolean;\n  linkToProject?: boolean;\n  loading?: boolean;\n  onExpand?: () => void;\n  sourceViewerFile: T.SourceViewerFile;\n}\n\nexport default function SourceViewerHeaderSlim(props: Props) {\n  const {\n    branchLike,\n    expandable,\n    displayProjectName = true,\n    linkToProject = true,\n    loading,\n    onExpand,\n    sourceViewerFile\n  } = props;\n  const { measures, path, project, projectName, q, subProject, subProjectName } = sourceViewerFile;\n\n  const projectNameLabel = (\n    <>\n      <QualifierIcon qualifier={ComponentQualifier.Project} /> <span>{projectName}</span>\n    </>\n  );\n\n  return (\n    <div className=\"source-viewer-header-slim display-flex-row display-flex-space-between\">\n      <div className=\"display-flex-center flex-1\">\n        {displayProjectName && (\n          <div className=\"spacer-right\">\n            {linkToProject ? (\n              <a\n                className=\"link-with-icon\"\n                href={getPathUrlAsString(getBranchLikeUrl(project, branchLike))}>\n                {projectNameLabel}\n              </a>\n            ) : (\n              projectNameLabel\n            )}\n          </div>\n        )}\n\n        {subProject !== undefined && (\n          <>\n            <QualifierIcon qualifier={ComponentQualifier.SubProject} />{' '}\n            <span className=\"spacer-right\">{subProjectName}</span>\n          </>\n        )}\n\n        <div className=\"spacer-right\">\n          <QualifierIcon qualifier={q} /> <span>{collapsedDirFromPath(path)}</span>\n          <span className=\"component-name-file\">{fileFromPath(path)}</span>\n        </div>\n\n        <div className=\"spacer-right\">\n          <ClipboardIconButton className=\"button-link link-no-underline\" copyValue={path} />\n        </div>\n      </div>\n\n      {measures.issues !== undefined && (\n        <div\n          className={classNames('flex-0 big-spacer-left', {\n            'little-spacer-right': !expandable || loading\n          })}>\n          <Link\n            to={getComponentIssuesUrl(project, {\n              ...getBranchLikeQuery(branchLike),\n              files: path,\n              resolved: 'false'\n            })}>\n            {translate('source_viewer.view_all_issues')}\n          </Link>\n        </div>\n      )}\n\n      {expandable && (\n        <DeferredSpinner className=\"little-spacer-right\" loading={loading}>\n          <div className=\"flex-0 big-spacer-left\">\n            <ButtonIcon className=\"js-actions\" onClick={onExpand}>\n              <ExpandSnippetIcon />\n            </ButtonIcon>\n          </div>\n        </DeferredSpinner>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { intersection, uniqBy } from 'lodash';\nimport * as React from 'react';\nimport {\n  getComponentData,\n  getComponentForSourceViewer,\n  getDuplications,\n  getSources\n} from '../../api/components';\nimport { Alert } from '../../components/ui/Alert';\nimport { getBranchLikeQuery, isSameBranchLike } from '../../helpers/branch-like';\nimport { translate } from '../../helpers/l10n';\nimport { BranchLike } from '../../types/branch-like';\nimport { WorkspaceContext } from '../workspace/context';\nimport DuplicationPopup from './components/DuplicationPopup';\nimport {\n  filterDuplicationBlocksByLine,\n  getDuplicationBlocksForIndex,\n  isDuplicationBlockInRemovedComponent\n} from './helpers/duplications';\nimport getCoverageStatus from './helpers/getCoverageStatus';\nimport {\n  duplicationsByLine,\n  issuesByLine,\n  locationsByLine,\n  symbolsByLine\n} from './helpers/indexing';\nimport defaultLoadIssues from './helpers/loadIssues';\nimport SourceViewerCode from './SourceViewerCode';\nimport { SourceViewerContext } from './SourceViewerContext';\nimport SourceViewerHeader from './SourceViewerHeader';\nimport SourceViewerHeaderSlim from './SourceViewerHeaderSlim';\nimport './styles.css';\n\n// TODO react-virtualized\n\nexport interface Props {\n  aroundLine?: number;\n  branchLike: BranchLike | undefined;\n  component: string;\n  componentMeasures?: T.Measure[];\n  displayAllIssues?: boolean;\n  displayIssueLocationsCount?: boolean;\n  displayIssueLocationsLink?: boolean;\n  displayLocationMarkers?: boolean;\n  highlightedLine?: number;\n  // `undefined` elements mean they are located in a different file,\n  // but kept to maintaint the location indexes\n  highlightedLocations?: (T.FlowLocation | undefined)[];\n  highlightedLocationMessage?: { index: number; text: string | undefined };\n  loadComponent?: (\n    component: string,\n    branchLike: BranchLike | undefined\n  ) => Promise<T.SourceViewerFile>;\n  loadIssues?: (\n    component: string,\n    from: number,\n    to: number,\n    branchLike: BranchLike | undefined\n  ) => Promise<T.Issue[]>;\n  loadSources?: (\n    component: string,\n    from: number,\n    to: number,\n    branchLike: BranchLike | undefined\n  ) => Promise<T.SourceLine[]>;\n  onLoaded?: (component: T.SourceViewerFile, sources: T.SourceLine[], issues: T.Issue[]) => void;\n  onLocationSelect?: (index: number) => void;\n  onIssueChange?: (issue: T.Issue) => void;\n  onIssueSelect?: (issueKey: string) => void;\n  onIssueUnselect?: () => void;\n  scroll?: (element: HTMLElement) => void;\n  selectedIssue?: string;\n  showMeasures?: boolean;\n  metricKey?: string;\n  slimHeader?: boolean;\n}\n\ninterface State {\n  component?: T.SourceViewerFile;\n  duplicatedFiles?: T.Dict<T.DuplicatedFile>;\n  duplications?: T.Duplication[];\n  duplicationsByLine: { [line: number]: number[] };\n  hasSourcesAfter: boolean;\n  highlightedSymbols: string[];\n  issueLocationsByLine: { [line: number]: T.LinearIssueLocation[] };\n  issuePopup?: { issue: string; name: string };\n  issues?: T.Issue[];\n  issuesByLine: { [line: number]: T.Issue[] };\n  loading: boolean;\n  loadingSourcesAfter: boolean;\n  loadingSourcesBefore: boolean;\n  notAccessible: boolean;\n  notExist: boolean;\n  openIssuesByLine: { [line: number]: boolean };\n  selectedIssue?: string;\n  sourceRemoved: boolean;\n  sources?: T.SourceLine[];\n  symbolsByLine: { [line: number]: string[] };\n}\n\nconst LINES = 500;\n\nexport default class SourceViewerBase extends React.PureComponent<Props, State> {\n  node?: HTMLElement | null;\n  mounted = false;\n\n  static defaultProps = {\n    displayAllIssues: false,\n    displayIssueLocationsCount: true,\n    displayIssueLocationsLink: true,\n    displayLocationMarkers: true\n  };\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      duplicationsByLine: {},\n      hasSourcesAfter: false,\n      highlightedSymbols: [],\n      issuesByLine: {},\n      issueLocationsByLine: {},\n      loading: true,\n      loadingSourcesAfter: false,\n      loadingSourcesBefore: false,\n      notAccessible: false,\n      notExist: false,\n      openIssuesByLine: {},\n      selectedIssue: props.selectedIssue,\n      sourceRemoved: false,\n      symbolsByLine: {}\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchComponent();\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    // if a component or a branch has changed,\n    // set `loading: true` immediately to avoid unwanted scrolling in `LineCode`\n    if (\n      nextProps.component !== this.props.component ||\n      !isSameBranchLike(nextProps.branchLike, this.props.branchLike)\n    ) {\n      this.setState({ loading: true });\n    }\n    if (\n      nextProps.onIssueSelect !== undefined &&\n      nextProps.selectedIssue !== this.props.selectedIssue\n    ) {\n      this.setState({ selectedIssue: nextProps.selectedIssue });\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      prevProps.component !== this.props.component ||\n      !isSameBranchLike(prevProps.branchLike, this.props.branchLike)\n    ) {\n      this.fetchComponent();\n    } else if (\n      this.props.aroundLine !== undefined &&\n      prevProps.aroundLine !== this.props.aroundLine &&\n      this.isLineOutsideOfRange(this.props.aroundLine)\n    ) {\n      this.fetchSources();\n    } else {\n      const { selectedIssue } = this.props;\n      const { issues } = this.state;\n      if (\n        selectedIssue !== undefined &&\n        issues !== undefined &&\n        issues.find(issue => issue.key === selectedIssue) === undefined\n      ) {\n        this.reloadIssues();\n      }\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  get loadComponent() {\n    return this.props.loadComponent || defaultLoadComponent;\n  }\n\n  get loadIssues() {\n    return this.props.loadIssues || defaultLoadIssues;\n  }\n\n  get propsLoadSources() {\n    return this.props.loadSources || defaultLoadSources;\n  }\n\n  computeCoverageStatus(lines: T.SourceLine[]) {\n    return lines.map(line => ({ ...line, coverageStatus: getCoverageStatus(line) }));\n  }\n\n  isLineOutsideOfRange(lineNumber: number) {\n    const { sources } = this.state;\n    if (sources && sources.length > 0) {\n      const firstLine = sources[0];\n      const lastList = sources[sources.length - 1];\n      return lineNumber < firstLine.line || lineNumber > lastList.line;\n    }\n\n    return true;\n  }\n\n  fetchComponent() {\n    this.setState({ loading: true });\n\n    const to = (this.props.aroundLine || 0) + LINES;\n    const loadIssues = (component: T.SourceViewerFile, sources: T.SourceLine[]) => {\n      this.loadIssues(this.props.component, 1, to, this.props.branchLike).then(\n        issues => {\n          if (this.mounted) {\n            const finalSources = sources.slice(0, LINES);\n\n            this.setState(\n              {\n                component,\n                duplicatedFiles: undefined,\n                duplications: undefined,\n                duplicationsByLine: {},\n                hasSourcesAfter: sources.length > LINES,\n                highlightedSymbols: [],\n                issueLocationsByLine: locationsByLine(issues),\n                issues,\n                issuesByLine: issuesByLine(issues),\n                loading: false,\n                notAccessible: false,\n                notExist: false,\n                openIssuesByLine: {},\n                issuePopup: undefined,\n                sourceRemoved: false,\n                sources: this.computeCoverageStatus(finalSources),\n                symbolsByLine: symbolsByLine(sources.slice(0, LINES))\n              },\n              () => {\n                if (this.props.onLoaded) {\n                  this.props.onLoaded(component, finalSources, issues);\n                }\n              }\n            );\n          }\n        },\n        () => {\n          // TODO\n        }\n      );\n    };\n\n    const onFailLoadComponent = (response: Response) => {\n      // TODO handle other statuses\n      if (this.mounted) {\n        if (response.status === 403) {\n          this.setState({ loading: false, notAccessible: true });\n        } else if (response.status === 404) {\n          this.setState({ loading: false, notExist: true });\n        }\n      }\n    };\n\n    const onFailLoadSources = (response: Response, component: T.SourceViewerFile) => {\n      // TODO handle other statuses\n      if (this.mounted) {\n        if (response.status === 403) {\n          this.setState({ component, loading: false, notAccessible: true });\n        } else if (response.status === 404) {\n          this.setState({ component, loading: false, sourceRemoved: true });\n        }\n      }\n    };\n\n    const onResolve = (component: T.SourceViewerFile) => {\n      const sourcesRequest =\n        component.q === 'FIL' || component.q === 'UTS' ? this.loadSources() : Promise.resolve([]);\n      sourcesRequest.then(\n        sources => loadIssues(component, sources),\n        response => onFailLoadSources(response, component)\n      );\n    };\n\n    this.loadComponent(this.props.component, this.props.branchLike).then(\n      onResolve,\n      onFailLoadComponent\n    );\n  }\n\n  fetchSources() {\n    this.loadSources().then(\n      sources => {\n        if (this.mounted) {\n          const finalSources = sources.slice(0, LINES);\n          this.setState(\n            {\n              sources: sources.slice(0, LINES),\n              hasSourcesAfter: sources.length > LINES\n            },\n            () => {\n              if (this.props.onLoaded && this.state.component && this.state.issues) {\n                this.props.onLoaded(this.state.component, finalSources, this.state.issues);\n              }\n            }\n          );\n        }\n      },\n      () => {\n        // TODO\n      }\n    );\n  }\n\n  reloadIssues() {\n    if (!this.state.sources) {\n      return;\n    }\n    const firstSourceLine = this.state.sources[0];\n    const lastSourceLine = this.state.sources[this.state.sources.length - 1];\n    this.loadIssues(\n      this.props.component,\n      firstSourceLine && firstSourceLine.line,\n      lastSourceLine && lastSourceLine.line,\n      this.props.branchLike\n    ).then(\n      issues => {\n        if (this.mounted) {\n          this.setState({\n            issues,\n            issuesByLine: issuesByLine(issues),\n            issueLocationsByLine: locationsByLine(issues)\n          });\n        }\n      },\n      () => {\n        // TODO\n      }\n    );\n  }\n\n  loadSources = (): Promise<T.SourceLine[]> => {\n    return new Promise((resolve, reject) => {\n      const onFailLoadSources = (response: Response) => {\n        // TODO handle other statuses\n        if (this.mounted) {\n          if ([403, 404].includes(response.status)) {\n            reject(response);\n          } else {\n            resolve([]);\n          }\n        }\n      };\n\n      const from = this.props.aroundLine ? Math.max(1, this.props.aroundLine - LINES / 2 + 1) : 1;\n\n      let to = this.props.aroundLine ? this.props.aroundLine + LINES / 2 + 1 : LINES + 1;\n      // make sure we try to download `LINES` lines\n      if (from === 1 && to < LINES) {\n        to = LINES;\n      }\n      // request one additional line to define `hasSourcesAfter`\n      to++;\n\n      this.propsLoadSources(this.props.component, from, to, this.props.branchLike).then(sources => {\n        resolve(sources);\n      }, onFailLoadSources);\n    });\n  };\n\n  loadSourcesBefore = () => {\n    if (!this.state.sources) {\n      return;\n    }\n    const firstSourceLine = this.state.sources[0];\n    this.setState({ loadingSourcesBefore: true });\n    const from = Math.max(1, firstSourceLine.line - LINES);\n    Promise.all([\n      this.propsLoadSources(\n        this.props.component,\n        from,\n        firstSourceLine.line - 1,\n        this.props.branchLike\n      ),\n      this.loadIssues(this.props.component, from, firstSourceLine.line - 1, this.props.branchLike)\n    ]).then(\n      ([sources, issues]) => {\n        if (this.mounted) {\n          this.setState(prevState => {\n            const nextIssues = uniqBy([...issues, ...(prevState.issues || [])], issue => issue.key);\n            return {\n              issues: nextIssues,\n              issuesByLine: issuesByLine(nextIssues),\n              issueLocationsByLine: locationsByLine(nextIssues),\n              loadingSourcesBefore: false,\n              sources: [...this.computeCoverageStatus(sources), ...(prevState.sources || [])],\n              symbolsByLine: { ...prevState.symbolsByLine, ...symbolsByLine(sources) }\n            };\n          });\n        }\n      },\n      () => {\n        // TODO\n      }\n    );\n  };\n\n  loadSourcesAfter = () => {\n    if (!this.state.sources) {\n      return;\n    }\n    const lastSourceLine = this.state.sources[this.state.sources.length - 1];\n    this.setState({ loadingSourcesAfter: true });\n    const fromLine = lastSourceLine.line + 1;\n    // request one additional line to define `hasSourcesAfter`\n    const toLine = lastSourceLine.line + LINES + 1;\n    Promise.all([\n      this.propsLoadSources(this.props.component, fromLine, toLine, this.props.branchLike),\n      this.loadIssues(this.props.component, fromLine, toLine, this.props.branchLike)\n    ]).then(\n      ([sources, issues]) => {\n        if (this.mounted) {\n          this.setState(prevState => {\n            const nextIssues = uniqBy([...(prevState.issues || []), ...issues], issue => issue.key);\n            return {\n              issues: nextIssues,\n              issuesByLine: issuesByLine(nextIssues),\n              issueLocationsByLine: locationsByLine(nextIssues),\n              hasSourcesAfter: sources.length > LINES,\n              loadingSourcesAfter: false,\n              sources: [\n                ...(prevState.sources || []),\n                ...this.computeCoverageStatus(sources.slice(0, LINES))\n              ],\n              symbolsByLine: {\n                ...prevState.symbolsByLine,\n                ...symbolsByLine(sources.slice(0, LINES))\n              }\n            };\n          });\n        }\n      },\n      () => {\n        // TODO\n      }\n    );\n  };\n\n  loadDuplications = () => {\n    getDuplications({\n      key: this.props.component,\n      ...getBranchLikeQuery(this.props.branchLike)\n    }).then(\n      r => {\n        if (this.mounted) {\n          this.setState({\n            duplications: r.duplications,\n            duplicationsByLine: duplicationsByLine(r.duplications),\n            duplicatedFiles: r.files\n          });\n        }\n      },\n      () => {\n        // TODO\n      }\n    );\n  };\n\n  handleIssuePopupToggle = (issue: string, popupName: string, open?: boolean) => {\n    this.setState((state: State) => {\n      const samePopup =\n        state.issuePopup && state.issuePopup.name === popupName && state.issuePopup.issue === issue;\n      if (open !== false && !samePopup) {\n        return { issuePopup: { issue, name: popupName } };\n      } else if (open !== true && samePopup) {\n        return { issuePopup: undefined };\n      }\n      return null;\n    });\n  };\n\n  handleSymbolClick = (symbols: string[]) => {\n    this.setState(state => {\n      const shouldDisable = intersection(state.highlightedSymbols, symbols).length > 0;\n      const highlightedSymbols = shouldDisable ? [] : symbols;\n      return { highlightedSymbols };\n    });\n  };\n\n  handleIssueSelect = (issue: string) => {\n    if (this.props.onIssueSelect) {\n      this.props.onIssueSelect(issue);\n    } else {\n      this.setState({ selectedIssue: issue });\n    }\n  };\n\n  handleIssueUnselect = () => {\n    if (this.props.onIssueUnselect) {\n      this.props.onIssueUnselect();\n    } else {\n      this.setState({ selectedIssue: undefined });\n    }\n  };\n\n  handleOpenIssues = (line: T.SourceLine) => {\n    this.setState(state => ({\n      openIssuesByLine: { ...state.openIssuesByLine, [line.line]: true }\n    }));\n  };\n\n  handleCloseIssues = (line: T.SourceLine) => {\n    this.setState(state => ({\n      openIssuesByLine: { ...state.openIssuesByLine, [line.line]: false }\n    }));\n  };\n\n  handleIssueChange = (issue: T.Issue) => {\n    this.setState(({ issues = [] }) => {\n      const newIssues = issues.map(candidate => (candidate.key === issue.key ? issue : candidate));\n      return { issues: newIssues, issuesByLine: issuesByLine(newIssues) };\n    });\n    if (this.props.onIssueChange) {\n      this.props.onIssueChange(issue);\n    }\n  };\n\n  renderDuplicationPopup = (index: number, line: number) => {\n    const { component, duplicatedFiles, duplications } = this.state;\n\n    if (!component || !duplicatedFiles) {\n      return null;\n    }\n\n    const blocks = getDuplicationBlocksForIndex(duplications, index);\n\n    return (\n      <WorkspaceContext.Consumer>\n        {({ openComponent }) => (\n          <DuplicationPopup\n            blocks={filterDuplicationBlocksByLine(blocks, line)}\n            branchLike={this.props.branchLike}\n            duplicatedFiles={duplicatedFiles}\n            inRemovedComponent={isDuplicationBlockInRemovedComponent(blocks)}\n            openComponent={openComponent}\n            sourceViewerFile={component}\n          />\n        )}\n      </WorkspaceContext.Consumer>\n    );\n  };\n\n  renderCode(sources: T.SourceLine[]) {\n    const hasSourcesBefore = sources.length > 0 && sources[0].line > 1;\n    return (\n      <SourceViewerCode\n        branchLike={this.props.branchLike}\n        componentKey={this.props.component}\n        displayAllIssues={this.props.displayAllIssues}\n        displayIssueLocationsCount={this.props.displayIssueLocationsCount}\n        displayIssueLocationsLink={this.props.displayIssueLocationsLink}\n        displayLocationMarkers={this.props.displayLocationMarkers}\n        duplications={this.state.duplications}\n        duplicationsByLine={this.state.duplicationsByLine}\n        hasSourcesAfter={this.state.hasSourcesAfter}\n        hasSourcesBefore={hasSourcesBefore}\n        highlightedLine={this.props.highlightedLine}\n        highlightedLocationMessage={this.props.highlightedLocationMessage}\n        highlightedLocations={this.props.highlightedLocations}\n        highlightedSymbols={this.state.highlightedSymbols}\n        issueLocationsByLine={this.state.issueLocationsByLine}\n        issuePopup={this.state.issuePopup}\n        issues={this.state.issues}\n        issuesByLine={this.state.issuesByLine}\n        loadDuplications={this.loadDuplications}\n        loadSourcesAfter={this.loadSourcesAfter}\n        loadSourcesBefore={this.loadSourcesBefore}\n        loadingSourcesAfter={this.state.loadingSourcesAfter}\n        loadingSourcesBefore={this.state.loadingSourcesBefore}\n        onIssueChange={this.handleIssueChange}\n        onIssuePopupToggle={this.handleIssuePopupToggle}\n        onIssueSelect={this.handleIssueSelect}\n        onIssueUnselect={this.handleIssueUnselect}\n        onIssuesClose={this.handleCloseIssues}\n        onIssuesOpen={this.handleOpenIssues}\n        onLocationSelect={this.props.onLocationSelect}\n        onSymbolClick={this.handleSymbolClick}\n        openIssuesByLine={this.state.openIssuesByLine}\n        renderDuplicationPopup={this.renderDuplicationPopup}\n        scroll={this.props.scroll}\n        metricKey={this.props.metricKey}\n        selectedIssue={this.state.selectedIssue}\n        sources={sources}\n        symbolsByLine={this.state.symbolsByLine}\n      />\n    );\n  }\n\n  renderHeader(branchLike: BranchLike | undefined, sourceViewerFile: T.SourceViewerFile) {\n    return this.props.slimHeader ? (\n      <SourceViewerHeaderSlim branchLike={branchLike} sourceViewerFile={sourceViewerFile} />\n    ) : (\n      <WorkspaceContext.Consumer>\n        {({ openComponent }) => (\n          <SourceViewerHeader\n            branchLike={this.props.branchLike}\n            componentMeasures={this.props.componentMeasures}\n            openComponent={openComponent}\n            showMeasures={this.props.showMeasures}\n            sourceViewerFile={sourceViewerFile}\n          />\n        )}\n      </WorkspaceContext.Consumer>\n    );\n  }\n\n  render() {\n    const { component, loading, sources, notAccessible, sourceRemoved } = this.state;\n\n    if (loading) {\n      return null;\n    }\n\n    if (this.state.notExist) {\n      return (\n        <Alert className=\"spacer-top\" variant=\"warning\">\n          {translate('component_viewer.no_component')}\n        </Alert>\n      );\n    }\n\n    if (notAccessible) {\n      return (\n        <Alert className=\"spacer-top\" variant=\"warning\">\n          {translate('code_viewer.no_source_code_displayed_due_to_security')}\n        </Alert>\n      );\n    }\n\n    if (!component) {\n      return null;\n    }\n\n    return (\n      <SourceViewerContext.Provider value={{ branchLike: this.props.branchLike, file: component }}>\n        <div className=\"source-viewer\" ref={node => (this.node = node)}>\n          {this.renderHeader(this.props.branchLike, component)}\n          {sourceRemoved && (\n            <Alert className=\"spacer-top\" variant=\"warning\">\n              {translate('code_viewer.no_source_code_displayed_due_to_source_removed')}\n            </Alert>\n          )}\n          {!sourceRemoved && sources !== undefined && this.renderCode(sources)}\n        </div>\n      </SourceViewerContext.Provider>\n    );\n  }\n}\n\nfunction defaultLoadComponent(\n  component: string,\n  branchLike: BranchLike | undefined\n): Promise<T.SourceViewerFile> {\n  return Promise.all([\n    getComponentForSourceViewer({ component, ...getBranchLikeQuery(branchLike) }),\n    getComponentData({ component, ...getBranchLikeQuery(branchLike) })\n  ]).then(([sourceViewerComponent, { component }]) => ({\n    ...sourceViewerComponent,\n    leakPeriodDate: component.leakPeriodDate\n  }));\n}\n\nfunction defaultLoadSources(\n  key: string,\n  from: number | undefined,\n  to: number | undefined,\n  branchLike: BranchLike | undefined\n) {\n  return getSources({ key, from, to, ...getBranchLikeQuery(branchLike) });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../lazyLoadComponent';\n\nconst SourceViewer = lazyLoadComponent(\n  () => import(/* webpackPrefetch: true */ './SourceViewerBase'),\n  'SourceViewer'\n);\nexport default SourceViewer;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nconst SCROLLING_DURATION = 100;\nconst SCROLLING_INTERVAL = 10;\nconst SCROLLING_STEPS = SCROLLING_DURATION / SCROLLING_INTERVAL;\n\nfunction isWindow(element: Element | Window): element is Window {\n  return element === window;\n}\n\nfunction getScroll(element: Element | Window) {\n  return isWindow(element)\n    ? { x: window.pageXOffset, y: window.pageYOffset }\n    : { x: element.scrollLeft, y: element.scrollTop };\n}\n\nfunction scrollElement(element: Element | Window, x: number, y: number): Promise<void> {\n  if (isWindow(element)) {\n    window.scrollTo(x, y);\n  } else {\n    element.scrollLeft = x;\n    element.scrollTop = y;\n  }\n  return Promise.resolve();\n}\n\nfunction smoothScroll(\n  target: number,\n  current: number,\n  scroll: (position: number) => void\n): Promise<void> {\n  const positiveDirection = target > current;\n  const step = Math.ceil(Math.abs(target - current) / SCROLLING_STEPS);\n  let stepsDone = 0;\n\n  return new Promise(resolve => {\n    const interval = setInterval(() => {\n      if (current === target || SCROLLING_STEPS === stepsDone) {\n        clearInterval(interval);\n        resolve();\n      } else {\n        let goal;\n        if (positiveDirection) {\n          goal = Math.min(target, current + step);\n        } else {\n          goal = Math.max(target, current - step);\n        }\n        stepsDone++;\n        current = goal;\n        scroll(goal);\n      }\n    }, SCROLLING_INTERVAL);\n  });\n}\n\nfunction smoothScrollTop(parent: Element | Window, position: number) {\n  const scroll = getScroll(parent);\n  return smoothScroll(position, scroll.y, position => scrollElement(parent, scroll.x, position));\n}\n\nfunction smoothScrollLeft(parent: Element | Window, position: number) {\n  const scroll = getScroll(parent);\n  return smoothScroll(position, scroll.x, position => scrollElement(parent, position, scroll.y));\n}\n\nexport function scrollToElement(\n  element: Element,\n  options: {\n    topOffset?: number;\n    bottomOffset?: number;\n    parent?: Element;\n    smooth?: boolean;\n  }\n): void {\n  const opts = { topOffset: 0, bottomOffset: 0, parent: window, smooth: true, ...options };\n  const { parent } = opts;\n\n  const { top, bottom } = element.getBoundingClientRect();\n\n  const scroll = getScroll(parent);\n\n  const height: number = isWindow(parent)\n    ? window.innerHeight\n    : parent.getBoundingClientRect().height;\n\n  const parentTop = isWindow(parent) ? 0 : parent.getBoundingClientRect().top;\n\n  if (top - parentTop < opts.topOffset) {\n    const goal = scroll.y - opts.topOffset + top - parentTop;\n    if (opts.smooth) {\n      addToScrollQueue(smoothScrollTop, parent, goal);\n    } else {\n      addToScrollQueue(scrollElement, parent, scroll.x, goal);\n    }\n  }\n\n  if (bottom - parentTop > height - opts.bottomOffset) {\n    const goal = scroll.y + bottom - parentTop - height + opts.bottomOffset;\n    if (opts.smooth) {\n      addToScrollQueue(smoothScrollTop, parent, goal);\n    } else {\n      addToScrollQueue(scrollElement, parent, scroll.x, goal);\n    }\n  }\n}\n\nexport function scrollHorizontally(\n  element: Element,\n  options: {\n    leftOffset?: number;\n    rightOffset?: number;\n    parent?: Element;\n    smooth?: boolean;\n  }\n): void {\n  const opts = { leftOffset: 0, rightOffset: 0, parent: window, smooth: true, ...options };\n  const { parent } = opts;\n\n  const { left, right } = element.getBoundingClientRect();\n\n  const scroll = getScroll(parent);\n\n  const { left: parentLeft, width } = isWindow(parent)\n    ? { left: 0, width: window.innerWidth }\n    : parent.getBoundingClientRect();\n\n  if (left - parentLeft < opts.leftOffset) {\n    const goal = scroll.x - opts.leftOffset + left - parentLeft;\n    if (opts.smooth) {\n      addToScrollQueue(smoothScrollLeft, parent, goal);\n    } else {\n      addToScrollQueue(scrollElement, parent, goal, scroll.y);\n    }\n  }\n\n  if (right - parentLeft > width - opts.rightOffset) {\n    const goal = scroll.x + right - parentLeft - width + opts.rightOffset;\n    if (opts.smooth) {\n      addToScrollQueue(smoothScrollLeft, parent, goal);\n    } else {\n      addToScrollQueue(scrollElement, parent, goal, scroll.y);\n    }\n  }\n}\n\ntype ScrollFunction = (element: Element | Window, x: number, y?: number) => Promise<void>;\n\ninterface ScrollQueueItem {\n  element: Element | Window;\n  fn: ScrollFunction;\n  x: number;\n  y?: number;\n}\n\nconst queue: ScrollQueueItem[] = [];\nlet queueRunning: boolean;\n\nfunction addToScrollQueue(\n  fn: ScrollFunction,\n  element: Element | Window,\n  x: number,\n  y?: number\n): void {\n  queue.push({ fn, element, x, y });\n  if (!queueRunning) {\n    processQueue();\n  }\n}\n\nfunction processQueue() {\n  if (queue.length > 0) {\n    queueRunning = true;\n    const { fn, element, x, y } = queue.shift()!;\n    fn(element, x, y)\n      .then(processQueue)\n      .catch(processQueue);\n  } else {\n    queueRunning = false;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport * as React from 'react';\nimport withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation';\nimport SourceViewer from '../../../components/SourceViewer/SourceViewer';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { BranchLike } from '../../../types/branch-like';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: string;\n  componentMeasures: T.Measure[] | undefined;\n  location: Pick<Location, 'query'>;\n  onIssueChange?: (issue: T.Issue) => void;\n}\n\nexport class SourceViewerWrapper extends React.PureComponent<Props> {\n  scrollToLine = () => {\n    const { location } = this.props;\n    const { line } = location.query;\n\n    if (line) {\n      const row = document.querySelector(`.source-line[data-line-number=\"${line}\"]`);\n      if (row) {\n        scrollToElement(row, { smooth: false, bottomOffset: window.innerHeight / 2 - 60 });\n      }\n    }\n  };\n\n  render() {\n    const { branchLike, component, componentMeasures, location } = this.props;\n    const { line } = location.query;\n    const finalLine = line ? Number(line) : undefined;\n\n    return (\n      <SourceViewer\n        aroundLine={finalLine}\n        branchLike={branchLike}\n        component={component}\n        componentMeasures={componentMeasures}\n        highlightedLine={finalLine}\n        onIssueChange={this.props.onIssueChange}\n        onLoaded={this.scrollToLine}\n        showMeasures={true}\n      />\n    );\n  }\n}\n\nexport default withKeyboardNavigation(SourceViewerWrapper);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { Location } from 'history';\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { InjectedRouter } from 'react-router';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport { isPullRequest, isSameBranchLike } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { getCodeUrl, getProjectUrl } from '../../../helpers/urls';\nimport { fetchBranchStatus, fetchMetrics } from '../../../store/rootActions';\nimport { getMetrics } from '../../../store/rootReducer';\nimport { BranchLike } from '../../../types/branch-like';\nimport { addComponent, addComponentBreadcrumbs, clearBucket } from '../bucket';\nimport '../code.css';\nimport { loadMoreChildren, retrieveComponent, retrieveComponentChildren } from '../utils';\nimport Breadcrumbs from './Breadcrumbs';\nimport Components from './Components';\nimport Search from './Search';\nimport SourceViewerWrapper from './SourceViewerWrapper';\n\ninterface StateToProps {\n  metrics: T.Dict<T.Metric>;\n}\n\ninterface DispatchToProps {\n  fetchBranchStatus: (branchLike: BranchLike, projectKey: string) => Promise<void>;\n  fetchMetrics: () => void;\n}\n\ninterface OwnProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  location: Pick<Location, 'query'>;\n  router: Pick<InjectedRouter, 'push'>;\n}\n\ntype Props = StateToProps & DispatchToProps & OwnProps;\n\ninterface State {\n  baseComponent?: T.ComponentMeasure;\n  breadcrumbs: T.Breadcrumb[];\n  components?: T.ComponentMeasure[];\n  highlighted?: T.ComponentMeasure;\n  loading: boolean;\n  page: number;\n  searchResults?: T.ComponentMeasure[];\n  sourceViewer?: T.ComponentMeasure;\n  total: number;\n}\n\nexport class CodeApp extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      breadcrumbs: [],\n      loading: true,\n      page: 0,\n      total: 0\n    };\n    this.refreshBranchStatus = debounce(this.refreshBranchStatus, 1000);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.props.fetchMetrics();\n    this.handleComponentChange();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      prevProps.component !== this.props.component ||\n      !isSameBranchLike(prevProps.branchLike, this.props.branchLike)\n    ) {\n      this.handleComponentChange();\n    } else if (prevProps.location !== this.props.location) {\n      this.handleUpdate();\n    }\n  }\n\n  componentWillUnmount() {\n    clearBucket();\n    this.mounted = false;\n  }\n\n  loadComponent = (componentKey: string) => {\n    this.setState({ loading: true });\n    retrieveComponent(\n      componentKey,\n      this.props.component.qualifier,\n      this,\n      this.props.branchLike\n    ).then(r => {\n      if (this.mounted) {\n        if (['FIL', 'UTS'].includes(r.component.qualifier)) {\n          this.setState({\n            breadcrumbs: r.breadcrumbs,\n            components: r.components,\n            loading: false,\n            page: 0,\n            searchResults: undefined,\n            sourceViewer: r.component,\n            total: 0\n          });\n        } else {\n          this.setState({\n            baseComponent: r.component,\n            breadcrumbs: r.breadcrumbs,\n            components: r.components,\n            loading: false,\n            page: r.page,\n            searchResults: undefined,\n            sourceViewer: undefined,\n            total: r.total\n          });\n        }\n      }\n    }, this.stopLoading);\n  };\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  handleComponentChange = () => {\n    const { branchLike, component } = this.props;\n\n    // we already know component's breadcrumbs,\n    addComponentBreadcrumbs(component.key, component.breadcrumbs);\n\n    this.setState({ loading: true });\n    retrieveComponentChildren(component.key, component.qualifier, this, branchLike).then(() => {\n      addComponent(component);\n      if (this.mounted) {\n        this.handleUpdate();\n      }\n    }, this.stopLoading);\n  };\n\n  handleLoadMore = () => {\n    const { baseComponent, components, page } = this.state;\n    if (!baseComponent || !components) {\n      return;\n    }\n    loadMoreChildren(\n      baseComponent.key,\n      page + 1,\n      this.props.component.qualifier,\n      this,\n      this.props.branchLike\n    ).then(r => {\n      if (this.mounted && r.components.length) {\n        this.setState({\n          components: [...components, ...r.components],\n          page: r.page,\n          total: r.total\n        });\n      }\n    }, this.stopLoading);\n  };\n\n  handleGoToParent = () => {\n    const { branchLike, component } = this.props;\n    const { breadcrumbs = [] } = this.state;\n\n    if (breadcrumbs.length > 1) {\n      const parentComponent = breadcrumbs[breadcrumbs.length - 2];\n      this.props.router.push(getCodeUrl(component.key, branchLike, parentComponent.key));\n      this.setState({ highlighted: breadcrumbs[breadcrumbs.length - 1] });\n    }\n  };\n\n  handleHighlight = (highlighted: T.ComponentMeasure) => {\n    this.setState({ highlighted });\n  };\n\n  handleIssueChange = (_: T.Issue) => {\n    this.refreshBranchStatus();\n  };\n\n  handleSearchClear = () => {\n    this.setState({ searchResults: undefined });\n  };\n\n  handleSearchResults = (searchResults: T.ComponentMeasure[] = []) => {\n    this.setState({ searchResults });\n  };\n\n  handleSelect = (component: T.ComponentMeasure) => {\n    const { branchLike, component: rootComponent } = this.props;\n\n    if (component.refKey) {\n      this.props.router.push(getProjectUrl(component.refKey, component.branch));\n    } else {\n      this.props.router.push(getCodeUrl(rootComponent.key, branchLike, component.key));\n    }\n\n    this.setState({ highlighted: undefined });\n  };\n\n  handleUpdate = () => {\n    const { component, location } = this.props;\n    const { selected } = location.query;\n    const finalKey = selected || component.key;\n\n    this.loadComponent(finalKey);\n  };\n\n  refreshBranchStatus = () => {\n    const { branchLike, component } = this.props;\n    if (branchLike && component && isPullRequest(branchLike)) {\n      this.props.fetchBranchStatus(branchLike, component.key);\n    }\n  };\n\n  render() {\n    const { branchLike, component, location } = this.props;\n    const {\n      baseComponent,\n      breadcrumbs,\n      components = [],\n      highlighted,\n      loading,\n      total,\n      searchResults,\n      sourceViewer\n    } = this.state;\n\n    const showSearch = searchResults !== undefined;\n\n    const hasComponents = components.length === 0 && searchResults === undefined;\n\n    const shouldShowBreadcrumbs = breadcrumbs.length > 1 && !showSearch;\n    const shouldShowComponentList =\n      sourceViewer === undefined && components.length > 0 && !showSearch;\n\n    const componentsClassName = classNames('boxed-group', 'spacer-top', {\n      'new-loading': loading,\n      'search-results': showSearch\n    });\n\n    const defaultTitle =\n      baseComponent && ['APP', 'VW', 'SVW'].includes(baseComponent.qualifier)\n        ? translate('projects.page')\n        : translate('code.page');\n\n    return (\n      <div className=\"page page-limited\">\n        <Suggestions suggestions=\"code\" />\n        <Helmet\n          defer={false}\n          title={sourceViewer !== undefined ? sourceViewer.name : defaultTitle}\n        />\n        <A11ySkipTarget anchor=\"code_main\" />\n\n        {!hasComponents && (\n          <Search\n            branchLike={branchLike}\n            component={component}\n            onSearchClear={this.handleSearchClear}\n            onSearchResults={this.handleSearchResults}\n          />\n        )}\n\n        <div className=\"code-components\">\n          {hasComponents && sourceViewer === undefined && (\n            <div className=\"display-flex-center display-flex-column no-file\">\n              <span className=\"h1 text-muted\">\n                {translate(\n                  'code_viewer.no_source_code_displayed_due_to_empty_analysis',\n                  component.qualifier\n                )}\n              </span>\n            </div>\n          )}\n          {shouldShowBreadcrumbs && (\n            <Breadcrumbs\n              branchLike={branchLike}\n              breadcrumbs={breadcrumbs}\n              rootComponent={component}\n            />\n          )}\n\n          {shouldShowComponentList && (\n            <>\n              <div className={componentsClassName}>\n                <Components\n                  baseComponent={baseComponent}\n                  branchLike={branchLike}\n                  components={components}\n                  cycle={true}\n                  metrics={this.props.metrics}\n                  onEndOfList={this.handleLoadMore}\n                  onGoToParent={this.handleGoToParent}\n                  onHighlight={this.handleHighlight}\n                  onSelect={this.handleSelect}\n                  rootComponent={component}\n                  selected={highlighted}\n                />\n              </div>\n              <ListFooter count={components.length} loadMore={this.handleLoadMore} total={total} />\n            </>\n          )}\n\n          {showSearch && searchResults && (\n            <div className={componentsClassName}>\n              <Components\n                branchLike={this.props.branchLike}\n                components={searchResults}\n                metrics={{}}\n                onHighlight={this.handleHighlight}\n                onSelect={this.handleSelect}\n                rootComponent={component}\n                selected={highlighted}\n              />\n            </div>\n          )}\n\n          {sourceViewer !== undefined && !showSearch && (\n            <div className=\"spacer-top\">\n              <SourceViewerWrapper\n                branchLike={branchLike}\n                component={sourceViewer.key}\n                componentMeasures={sourceViewer.measures}\n                isFile={true}\n                location={location}\n                onGoToParent={this.handleGoToParent}\n                onIssueChange={this.handleIssueChange}\n              />\n            </div>\n          )}\n        </div>\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: any): StateToProps => ({\n  metrics: getMetrics(state)\n});\n\nconst mapDispatchToProps: DispatchToProps = {\n  fetchBranchStatus: fetchBranchStatus as any,\n  fetchMetrics\n};\n\nexport default connect<StateToProps, DispatchToProps, Props>(\n  mapStateToProps,\n  mapDispatchToProps\n)(CodeApp);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/CodeApp')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport {\n  cleanQuery,\n  parseAsArray,\n  parseAsDate,\n  parseAsOptionalBoolean,\n  parseAsOptionalString,\n  parseAsString,\n  queriesEqual,\n  serializeDateShort,\n  serializeOptionalBoolean,\n  serializeString,\n  serializeStringArray\n} from '../../helpers/query';\n\nexport interface Query {\n  activation: boolean | undefined;\n  activationSeverities: string[];\n  availableSince: Date | undefined;\n  compareToProfile: string | undefined;\n  cwe: string[];\n  inheritance: T.RuleInheritance | undefined;\n  languages: string[];\n  owaspTop10: string[];\n  profile: string | undefined;\n  repositories: string[];\n  ruleKey: string | undefined;\n  sansTop25: string[];\n  searchQuery: string | undefined;\n  severities: string[];\n  sonarsourceSecurity: string[];\n  statuses: string[];\n  tags: string[];\n  template: boolean | undefined;\n  types: string[];\n}\n\nexport type FacetKey = keyof Query;\n\nexport interface Facet {\n  [value: string]: number;\n}\n\nexport type Facets = { [F in FacetKey]?: Facet };\n\nexport type OpenFacets = T.Dict<boolean>;\n\nexport interface Activation {\n  inherit: T.RuleInheritance;\n  severity: string;\n}\n\nexport interface Actives {\n  [rule: string]: {\n    [profile: string]: Activation;\n  };\n}\n\nexport function parseQuery(query: T.RawQuery): Query {\n  return {\n    activation: parseAsOptionalBoolean(query.activation),\n    activationSeverities: parseAsArray(query.active_severities, parseAsString),\n    availableSince: parseAsDate(query.available_since),\n    compareToProfile: parseAsOptionalString(query.compareToProfile),\n    cwe: parseAsArray(query.cwe, parseAsString),\n    inheritance: parseAsInheritance(query.inheritance),\n    languages: parseAsArray(query.languages, parseAsString),\n    owaspTop10: parseAsArray(query.owaspTop10, parseAsString),\n    profile: parseAsOptionalString(query.qprofile),\n    repositories: parseAsArray(query.repositories, parseAsString),\n    ruleKey: parseAsOptionalString(query.rule_key),\n    sansTop25: parseAsArray(query.sansTop25, parseAsString),\n    searchQuery: parseAsOptionalString(query.q),\n    severities: parseAsArray(query.severities, parseAsString),\n    sonarsourceSecurity: parseAsArray(query.sonarsourceSecurity, parseAsString),\n    statuses: parseAsArray(query.statuses, parseAsString),\n    tags: parseAsArray(query.tags, parseAsString),\n    template: parseAsOptionalBoolean(query.is_template),\n    types: parseAsArray(query.types, parseAsString)\n  };\n}\n\nexport function serializeQuery(query: Query): T.RawQuery {\n  return cleanQuery({\n    activation: serializeOptionalBoolean(query.activation),\n    active_severities: serializeStringArray(query.activationSeverities),\n    available_since: serializeDateShort(query.availableSince),\n    compareToProfile: serializeString(query.compareToProfile),\n    cwe: serializeStringArray(query.cwe),\n    inheritance: serializeInheritance(query.inheritance),\n    is_template: serializeOptionalBoolean(query.template),\n    languages: serializeStringArray(query.languages),\n    owaspTop10: serializeStringArray(query.owaspTop10),\n    q: serializeString(query.searchQuery),\n    qprofile: serializeString(query.profile),\n    repositories: serializeStringArray(query.repositories),\n    rule_key: serializeString(query.ruleKey),\n    sansTop25: serializeStringArray(query.sansTop25),\n    severities: serializeStringArray(query.severities),\n    sonarsourceSecurity: serializeStringArray(query.sonarsourceSecurity),\n    statuses: serializeStringArray(query.statuses),\n    tags: serializeStringArray(query.tags),\n    types: serializeStringArray(query.types)\n  });\n}\n\nexport function areQueriesEqual(a: T.RawQuery, b: T.RawQuery) {\n  return queriesEqual(parseQuery(a), parseQuery(b));\n}\n\nexport function shouldRequestFacet(facet: string): facet is FacetKey {\n  const facetsToRequest = [\n    'activationSeverities',\n    'cwe',\n    'languages',\n    'owaspTop10',\n    'repositories',\n    'sansTop25',\n    'severities',\n    'sonarsourceSecurity',\n    'standard',\n    'statuses',\n    'tags',\n    'types'\n  ];\n  return facetsToRequest.includes(facet);\n}\n\nexport function getServerFacet(facet: FacetKey) {\n  return facet === 'activationSeverities' ? 'active_severities' : facet;\n}\n\nexport function getAppFacet(serverFacet: string): FacetKey {\n  return serverFacet === 'active_severities' ? 'activationSeverities' : (serverFacet as FacetKey);\n}\n\nexport function getOpen(query: T.RawQuery) {\n  return query.open;\n}\n\nexport function hasRuleKey(query: T.RawQuery) {\n  return Boolean(query.rule_key);\n}\n\nfunction parseAsInheritance(value?: string): T.RuleInheritance | undefined {\n  if (value === 'INHERITED' || value === 'NONE' || value === 'OVERRIDES') {\n    return value;\n  } else {\n    return undefined;\n  }\n}\n\nfunction serializeInheritance(value: T.RuleInheritance | undefined): string | undefined {\n  return value;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function csvEscape(value: string): string {\n  const escaped = value.replace(/\"/g, '\\\\\"');\n  return `\"${escaped}\"`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { map } from 'lodash';\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { Exporter, ProfileChangelogEvent } from '../apps/quality-profiles/types';\nimport { csvEscape } from '../helpers/csv';\nimport { getJSON, post, postJSON, RequestData } from '../helpers/request';\n\nexport interface ProfileActions {\n  associateProjects?: boolean;\n  copy?: boolean;\n  delete?: boolean;\n  edit?: boolean;\n  setAsDefault?: boolean;\n}\n\nexport interface Actions {\n  create?: boolean;\n}\n\nexport interface Profile {\n  actions?: ProfileActions;\n  key: string;\n  name: string;\n  language: string;\n  languageName: string;\n  isInherited?: boolean;\n  parentKey?: string;\n  parentName?: string;\n  isDefault?: boolean;\n  activeRuleCount: number;\n  activeDeprecatedRuleCount: number;\n  rulesUpdatedAt?: string;\n  lastUsed?: string;\n  userUpdatedAt?: string;\n  isBuiltIn?: boolean;\n  projectCount?: number;\n}\n\nexport interface SearchQualityProfilesParameters {\n  defaults?: boolean;\n  language?: string;\n  project?: string;\n  qualityProfile?: string;\n}\n\nexport interface SearchQualityProfilesResponse {\n  actions?: Actions;\n  profiles: Profile[];\n}\n\nexport function searchQualityProfiles(\n  parameters?: SearchQualityProfilesParameters\n): Promise<SearchQualityProfilesResponse> {\n  return getJSON('/api/qualityprofiles/search', parameters).catch(throwGlobalError);\n}\n\nexport function getQualityProfile({\n  compareToSonarWay,\n  profile: { key }\n}: {\n  compareToSonarWay?: boolean;\n  profile: Profile;\n}): Promise<any> {\n  return getJSON('/api/qualityprofiles/show', { compareToSonarWay, key });\n}\n\nexport function createQualityProfile(data: RequestData): Promise<any> {\n  return postJSON('/api/qualityprofiles/create', data).catch(throwGlobalError);\n}\n\nexport function restoreQualityProfile(data: RequestData): Promise<any> {\n  return postJSON('/api/qualityprofiles/restore', data).catch(throwGlobalError);\n}\n\nexport interface ProfileProject {\n  key: string;\n  name: string;\n  selected: boolean;\n}\n\nexport function getProfileProjects(\n  data: RequestData\n): Promise<{ more: boolean; paging: T.Paging; results: ProfileProject[] }> {\n  return getJSON('/api/qualityprofiles/projects', data).catch(throwGlobalError);\n}\n\nexport function getProfileInheritance({\n  language,\n  name: qualityProfile\n}: Profile): Promise<{\n  ancestors: T.ProfileInheritanceDetails[];\n  children: T.ProfileInheritanceDetails[];\n  profile: T.ProfileInheritanceDetails;\n}> {\n  return getJSON('/api/qualityprofiles/inheritance', {\n    language,\n    qualityProfile\n  }).catch(throwGlobalError);\n}\n\nexport function setDefaultProfile({ language, name: qualityProfile }: Profile) {\n  return post('/api/qualityprofiles/set_default', {\n    language,\n    qualityProfile\n  });\n}\n\nexport function renameProfile(key: string, name: string) {\n  return post('/api/qualityprofiles/rename', { key, name }).catch(throwGlobalError);\n}\n\nexport function copyProfile(fromKey: string, toName: string): Promise<any> {\n  return postJSON('/api/qualityprofiles/copy', { fromKey, toName }).catch(throwGlobalError);\n}\n\nexport function deleteProfile({ language, name: qualityProfile }: Profile) {\n  return post('/api/qualityprofiles/delete', { language, qualityProfile }).catch(throwGlobalError);\n}\n\nexport function changeProfileParent(\n  { language, name: qualityProfile }: Profile,\n  parentProfile?: Profile\n) {\n  return post('/api/qualityprofiles/change_parent', {\n    language,\n    qualityProfile,\n    parentQualityProfile: parentProfile ? parentProfile.name : undefined\n  }).catch(throwGlobalError);\n}\n\nexport function getQualityProfileBackupUrl({ language, name: qualityProfile }: Profile) {\n  const queryParams = Object.entries({ language, qualityProfile })\n    .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)\n    .join('&');\n  return `/api/qualityprofiles/backup?${queryParams}`;\n}\n\nexport function getQualityProfileExporterUrl(\n  { key: exporterKey }: Exporter,\n  { language, name: qualityProfile }: Profile\n) {\n  const queryParams = Object.entries({ exporterKey, language, qualityProfile })\n    .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)\n    .join('&');\n  return `/api/qualityprofiles/export?${queryParams}`;\n}\n\nexport function getImporters(): Promise<\n  Array<{ key: string; languages: Array<string>; name: string }>\n> {\n  return getJSON('/api/qualityprofiles/importers').then(r => r.importers, throwGlobalError);\n}\n\nexport function getExporters(): Promise<any> {\n  return getJSON('/api/qualityprofiles/exporters').then(r => r.exporters);\n}\n\nexport function getProfileChangelog(\n  since: any,\n  to: any,\n  { language, name: qualityProfile }: Profile,\n  page?: number\n): Promise<{\n  events: ProfileChangelogEvent[];\n  p: number;\n  ps: number;\n  total: number;\n}> {\n  return getJSON('/api/qualityprofiles/changelog', {\n    since,\n    to,\n    language,\n    qualityProfile,\n    p: page\n  });\n}\n\nexport interface CompareResponse {\n  left: { name: string };\n  right: { name: string };\n  inLeft: Array<{ key: string; name: string; severity: string }>;\n  inRight: Array<{ key: string; name: string; severity: string }>;\n  modified: Array<{\n    key: string;\n    name: string;\n    left: { params: T.Dict<string>; severity: string };\n    right: { params: T.Dict<string>; severity: string };\n  }>;\n}\n\nexport function compareProfiles(leftKey: string, rightKey: string): Promise<CompareResponse> {\n  return getJSON('/api/qualityprofiles/compare', { leftKey, rightKey });\n}\n\nexport function associateProject({ language, name: qualityProfile }: Profile, project: string) {\n  return post('/api/qualityprofiles/add_project', {\n    language,\n    qualityProfile,\n    project\n  }).catch(throwGlobalError);\n}\n\nexport function dissociateProject({ language, name: qualityProfile }: Profile, project: string) {\n  return post('/api/qualityprofiles/remove_project', {\n    language,\n    qualityProfile,\n    project\n  }).catch(throwGlobalError);\n}\n\nexport interface SearchUsersGroupsParameters {\n  language: string;\n  qualityProfile: string;\n  q?: string;\n  selected?: 'all' | 'selected' | 'deselected';\n}\n\ninterface SearchUsersResponse {\n  users: T.UserSelected[];\n  paging: T.Paging;\n}\n\nexport function searchUsers(parameters: SearchUsersGroupsParameters): Promise<SearchUsersResponse> {\n  return getJSON('/api/qualityprofiles/search_users', parameters).catch(throwGlobalError);\n}\n\nexport interface SearchGroupsResponse {\n  groups: Array<{ name: string }>;\n  paging: T.Paging;\n}\n\nexport function searchGroups(\n  parameters: SearchUsersGroupsParameters\n): Promise<SearchGroupsResponse> {\n  return getJSON('/api/qualityprofiles/search_groups', parameters).catch(throwGlobalError);\n}\n\nexport interface AddRemoveUserParameters {\n  language: string;\n  login: string;\n  qualityProfile: string;\n}\n\nexport function addUser(parameters: AddRemoveUserParameters): Promise<void | Response> {\n  return post('/api/qualityprofiles/add_user', parameters).catch(throwGlobalError);\n}\n\nexport function removeUser(parameters: AddRemoveUserParameters): Promise<void | Response> {\n  return post('/api/qualityprofiles/remove_user', parameters).catch(throwGlobalError);\n}\n\nexport interface AddRemoveGroupParameters {\n  group: string;\n  language: string;\n  qualityProfile: string;\n}\n\nexport function addGroup(parameters: AddRemoveGroupParameters): Promise<void | Response> {\n  return post('/api/qualityprofiles/add_group', parameters).catch(throwGlobalError);\n}\n\nexport function removeGroup(parameters: AddRemoveGroupParameters): Promise<void | Response> {\n  return post('/api/qualityprofiles/remove_group', parameters).catch(throwGlobalError);\n}\n\nexport interface BulkActivateParameters {\n  activation?: boolean;\n  active_severities?: string;\n  asc?: boolean;\n  available_since?: string;\n  compareToProfile?: string;\n  inheritance?: string;\n  is_template?: string;\n  languages?: string;\n  q?: string;\n  qprofile?: string;\n  repositories?: string;\n  rule_key?: string;\n  s?: string;\n  severities?: string;\n  statuses?: string;\n  tags?: string;\n  targetKey: string;\n  targetSeverity?: string;\n  template_key?: string;\n  types?: string;\n}\n\nexport function bulkActivateRules(data: BulkActivateParameters) {\n  return postJSON('/api/qualityprofiles/activate_rules', data);\n}\n\nexport function bulkDeactivateRules(data: BulkActivateParameters) {\n  return postJSON('/api/qualityprofiles/deactivate_rules', data);\n}\n\nexport function activateRule(data: {\n  key: string;\n  params?: T.Dict<string>;\n  reset?: boolean;\n  rule: string;\n  severity?: string;\n}) {\n  const params =\n    data.params && map(data.params, (value, key) => `${key}=${csvEscape(value)}`).join(';');\n  return post('/api/qualityprofiles/activate_rule', { ...data, params }).catch(throwGlobalError);\n}\n\nexport function deactivateRule(data: { key: string; rule: string }) {\n  return post('/api/qualityprofiles/deactivate_rule', data).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON } from '../helpers/request';\nimport { GetRulesAppResponse, SearchRulesResponse } from '../types/coding-rules';\n\nexport function getRulesApp(): Promise<GetRulesAppResponse> {\n  return getJSON('/api/rules/app').catch(throwGlobalError);\n}\n\nexport function searchRules(data: {\n  activation?: boolean | string;\n  active_severities?: string;\n  asc?: boolean | string;\n  available_since?: string;\n  cwe?: string;\n  f?: string;\n  facets?: string;\n  include_external?: boolean | string;\n  inheritance?: string;\n  is_template?: boolean | string;\n  languages?: string;\n  owaspTop10?: string;\n  p?: number;\n  ps?: number;\n  q?: string;\n  qprofile?: string;\n  repositories?: string;\n  rule_key?: string;\n  s?: string;\n  sansTop25?: string;\n  severities?: string;\n  sonarsourceSecurity?: string;\n  statuses?: string;\n  tags?: string;\n  template_key?: string;\n  types?: string;\n}): Promise<SearchRulesResponse> {\n  return getJSON('/api/rules/search', data).catch(throwGlobalError);\n}\n\nexport function takeFacet(response: SearchRulesResponse, property: string) {\n  const facet = response.facets?.find(f => f.property === property);\n  return facet ? facet.values : [];\n}\n\nexport function getRuleDetails(parameters: {\n  actives?: boolean;\n  key: string;\n}): Promise<{ actives?: T.RuleActivation[]; rule: T.RuleDetails }> {\n  return getJSON('/api/rules/show', parameters).catch(throwGlobalError);\n}\n\nexport function getRuleTags(parameters: { ps?: number; q: string }): Promise<string[]> {\n  return getJSON('/api/rules/tags', parameters).then(r => r.tags, throwGlobalError);\n}\n\nexport function createRule(data: {\n  custom_key: string;\n  markdown_description: string;\n  name: string;\n  params?: string;\n  prevent_reactivation?: boolean;\n  severity?: string;\n  status?: string;\n  template_key: string;\n  type?: string;\n}): Promise<T.RuleDetails> {\n  return postJSON('/api/rules/create', data).then(\n    r => r.rule,\n    response => {\n      // do not show global error if the status code is 409\n      // this case should be handled inside a component\n      if (response && response.status === 409) {\n        return Promise.reject(response);\n      } else {\n        return throwGlobalError(response);\n      }\n    }\n  );\n}\n\nexport function deleteRule(parameters: { key: string }) {\n  return post('/api/rules/delete', parameters).catch(throwGlobalError);\n}\n\nexport function updateRule(data: {\n  key: string;\n  markdown_description?: string;\n  markdown_note?: string;\n  name?: string;\n  params?: string;\n  remediation_fn_base_effort?: string;\n  remediation_fn_type?: string;\n  remediation_fy_gap_multiplier?: string;\n  severity?: string;\n  status?: string;\n  tags?: string;\n}): Promise<T.RuleDetails> {\n  return postJSON('/api/rules/update', data).then(r => r.rule, throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  displayReset: boolean;\n  onReset: () => void;\n}\n\nexport default function FiltersHeader({ displayReset, onReset }: Props) {\n  return (\n    <div className=\"search-navigator-filters-header\">\n      {displayReset && (\n        <div className=\"pull-right\">\n          <Button className=\"button-red\" id=\"coding-rules-clear-all-filters\" onClick={onReset}>\n            {translate('clear_all_filters')}\n          </Button>\n        </div>\n      )}\n\n      <h2 className=\"h3\">{translate('filters')}</h2>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce } from 'lodash';\nimport * as React from 'react';\n\ninterface Props {\n  className?: string;\n  children: (position: { top: number; left: number }) => React.ReactElement<any>;\n}\n\nexport default class ScreenPositionHelper extends React.PureComponent<Props> {\n  container?: HTMLDivElement;\n  debouncedOnResize: () => void;\n\n  constructor(props: Props) {\n    super(props);\n    this.debouncedOnResize = debounce(() => this.forceUpdate(), 250);\n  }\n\n  componentDidMount() {\n    this.forceUpdate();\n    window.addEventListener('resize', this.debouncedOnResize);\n  }\n\n  componentWillUnmount() {\n    window.removeEventListener('resize', this.debouncedOnResize);\n  }\n\n  getPosition = () => {\n    const containerPos = this.container && this.container.getBoundingClientRect();\n    if (!containerPos) {\n      return { top: 0, left: 0 };\n    }\n    return {\n      top: window.pageYOffset + containerPos.top,\n      left: window.pageXOffset + containerPos.left\n    };\n  };\n\n  render() {\n    return (\n      <div\n        className={this.props.className}\n        ref={container => (this.container = container as HTMLDivElement)}>\n        {this.props.children(this.getPosition())}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function BackIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M3.6 8.69l4.07 4.13.04.04a.7.7 0 01.12.7.69.69 0 01-.86.4.73.73 0 01-.26-.16L1 8l5.71-5.8.04-.03A.73.73 0 017.13 2l.1-.01c.1.01.2.04.3.09a.7.7 0 01.3.82c-.03.1-.09.19-.16.27L3.61 7.3c3.59-.03 7.18-.14 10.77.01.05 0 .06 0 .1.02a.68.68 0 01.52.61.7.7 0 01-.57.74h-.1z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nconst CLASS_SIDEBAR_PAGE = 'sidebar-page';\nconst CLASS_WHITE_PAGE = 'white-page';\nconst CLASS_NO_FOOTER_PAGE = 'no-footer-page';\n\nexport function addSideBarClass() {\n  toggleBodyClass(CLASS_SIDEBAR_PAGE, true);\n}\n\nexport function addWhitePageClass() {\n  toggleBodyClass(CLASS_WHITE_PAGE, true);\n}\n\nexport function addNoFooterPageClass() {\n  /* eslint-disable-next-line no-console */\n  console.warn('DEPRECATED: addNoFooterPageClass() was deprecated.');\n  toggleBodyClass(CLASS_NO_FOOTER_PAGE, true);\n}\n\nexport function removeSideBarClass() {\n  toggleBodyClass(CLASS_SIDEBAR_PAGE, false);\n}\n\nexport function removeWhitePageClass() {\n  toggleBodyClass(CLASS_WHITE_PAGE, false);\n}\n\nexport function removeNoFooterPageClass() {\n  /* eslint-disable-next-line no-console */\n  console.warn('DEPRECATED: removeNoFooterPageClass() was deprecated.');\n  toggleBodyClass(CLASS_NO_FOOTER_PAGE, false);\n}\n\nfunction toggleBodyClass(className: string, force: boolean) {\n  document.body.classList.toggle(className, force);\n  if (document.documentElement) {\n    document.documentElement.classList.toggle(className, force);\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isArray } from 'lodash';\nimport { searchUsers } from '../../api/users';\nimport { formatMeasure } from '../../helpers/measures';\nimport {\n  cleanQuery,\n  parseAsArray,\n  parseAsBoolean,\n  parseAsDate,\n  parseAsString,\n  queriesEqual,\n  serializeDateShort,\n  serializeString,\n  serializeStringArray\n} from '../../helpers/query';\nimport { scrollToElement } from '../../helpers/scrolling';\nimport { get, save } from '../../helpers/storage';\nimport { isDefined } from '../../helpers/types';\nimport { Facet, RawFacet } from '../../types/issues';\nimport { SecurityStandard, StandardType } from '../../types/security';\n\nexport interface Query {\n  assigned: boolean;\n  assignees: string[];\n  author: string[];\n  createdAfter: Date | undefined;\n  createdAt: string;\n  createdBefore: Date | undefined;\n  createdInLast: string;\n  cwe: string[];\n  directories: string[];\n  files: string[];\n  issues: string[];\n  languages: string[];\n  owaspTop10: string[];\n  projects: string[];\n  resolutions: string[];\n  resolved: boolean;\n  rules: string[];\n  sansTop25: string[];\n  scopes: string[];\n  severities: string[];\n  sinceLeakPeriod: boolean;\n  sonarsourceSecurity: string[];\n  sort: string;\n  statuses: string[];\n  tags: string[];\n  types: string[];\n}\n\nexport const STANDARDS = 'standards';\nexport const STANDARD_TYPES: StandardType[] = [\n  SecurityStandard.OWASP_TOP10,\n  SecurityStandard.SANS_TOP25,\n  SecurityStandard.CWE,\n  SecurityStandard.SONARSOURCE\n];\n\n// allow sorting by CREATION_DATE only\nconst parseAsSort = (sort: string) => (sort === 'CREATION_DATE' ? 'CREATION_DATE' : '');\nconst ISSUES_DEFAULT = 'sonarqube.issues.default';\n\nexport function parseQuery(query: T.RawQuery): Query {\n  return {\n    assigned: parseAsBoolean(query.assigned),\n    assignees: parseAsArray(query.assignees, parseAsString),\n    author: isArray(query.author) ? query.author : [query.author].filter(isDefined),\n    createdAfter: parseAsDate(query.createdAfter),\n    createdAt: parseAsString(query.createdAt),\n    createdBefore: parseAsDate(query.createdBefore),\n    createdInLast: parseAsString(query.createdInLast),\n    cwe: parseAsArray(query.cwe, parseAsString),\n    directories: parseAsArray(query.directories, parseAsString),\n    files: parseAsArray(query.files, parseAsString),\n    issues: parseAsArray(query.issues, parseAsString),\n    languages: parseAsArray(query.languages, parseAsString),\n    owaspTop10: parseAsArray(query.owaspTop10, parseAsString),\n    projects: parseAsArray(query.projects, parseAsString),\n    resolutions: parseAsArray(query.resolutions, parseAsString),\n    resolved: parseAsBoolean(query.resolved),\n    rules: parseAsArray(query.rules, parseAsString),\n    sansTop25: parseAsArray(query.sansTop25, parseAsString),\n    scopes: parseAsArray(query.scopes, parseAsString),\n    severities: parseAsArray(query.severities, parseAsString),\n    sinceLeakPeriod: parseAsBoolean(query.sinceLeakPeriod, false),\n    sonarsourceSecurity: parseAsArray(query.sonarsourceSecurity, parseAsString),\n    sort: parseAsSort(query.s),\n    statuses: parseAsArray(query.statuses, parseAsString),\n    tags: parseAsArray(query.tags, parseAsString),\n    types: parseAsArray(query.types, parseAsString)\n  };\n}\n\nexport function getOpen(query: T.RawQuery): string | undefined {\n  return query.open;\n}\n\nexport const areMyIssuesSelected = (query: T.RawQuery) => query.myIssues === 'true';\n\nexport function serializeQuery(query: Query): T.RawQuery {\n  const filter = {\n    assigned: query.assigned ? undefined : 'false',\n    assignees: serializeStringArray(query.assignees),\n    author: serializeStringArray(query.author),\n    createdAfter: serializeDateShort(query.createdAfter),\n    createdAt: serializeString(query.createdAt),\n    createdBefore: serializeDateShort(query.createdBefore),\n    createdInLast: serializeString(query.createdInLast),\n    cwe: serializeStringArray(query.cwe),\n    directories: serializeStringArray(query.directories),\n    files: serializeStringArray(query.files),\n    issues: serializeStringArray(query.issues),\n    languages: serializeStringArray(query.languages),\n    owaspTop10: serializeStringArray(query.owaspTop10),\n    projects: serializeStringArray(query.projects),\n    resolutions: serializeStringArray(query.resolutions),\n    resolved: query.resolved ? undefined : 'false',\n    rules: serializeStringArray(query.rules),\n    s: serializeString(query.sort),\n    sansTop25: serializeStringArray(query.sansTop25),\n    scopes: serializeStringArray(query.scopes),\n    severities: serializeStringArray(query.severities),\n    sinceLeakPeriod: query.sinceLeakPeriod ? 'true' : undefined,\n    sonarsourceSecurity: serializeStringArray(query.sonarsourceSecurity),\n    statuses: serializeStringArray(query.statuses),\n    tags: serializeStringArray(query.tags),\n    types: serializeStringArray(query.types)\n  };\n\n  return cleanQuery(filter);\n}\n\nexport const areQueriesEqual = (a: T.RawQuery, b: T.RawQuery) =>\n  queriesEqual(parseQuery(a), parseQuery(b));\n\nexport function parseFacets(facets: RawFacet[]): T.Dict<Facet> {\n  if (!facets) {\n    return {};\n  }\n\n  const result: T.Dict<Facet> = {};\n  facets.forEach(facet => {\n    const values: Facet = {};\n    facet.values.forEach(value => {\n      values[value.val] = value.count;\n    });\n    result[facet.property] = values;\n  });\n  return result;\n}\n\nexport function formatFacetStat(stat: number | undefined) {\n  return stat && formatMeasure(stat, 'SHORT_INT');\n}\n\nexport const searchAssignees = (\n  query: string,\n  page = 1\n): Promise<{ paging: T.Paging; results: T.UserBase[] }> => {\n  return searchUsers({ p: page, q: query }).then(({ paging, users }) => ({\n    paging,\n    results: users\n  }));\n};\n\nconst LOCALSTORAGE_MY = 'my';\nconst LOCALSTORAGE_ALL = 'all';\n\nexport const isMySet = () => {\n  return get(ISSUES_DEFAULT) === LOCALSTORAGE_MY;\n};\n\nexport const saveMyIssues = (myIssues: boolean) =>\n  save(ISSUES_DEFAULT, myIssues ? LOCALSTORAGE_MY : LOCALSTORAGE_ALL);\n\nexport function getLocations(\n  { flows, secondaryLocations }: Pick<T.Issue, 'flows' | 'secondaryLocations'>,\n  selectedFlowIndex: number | undefined\n) {\n  if (selectedFlowIndex !== undefined) {\n    return flows[selectedFlowIndex] || [];\n  } else {\n    return flows.length > 0 ? flows[0] : secondaryLocations;\n  }\n}\n\nexport function getSelectedLocation(\n  issue: Pick<T.Issue, 'flows' | 'secondaryLocations'>,\n  selectedFlowIndex: number | undefined,\n  selectedLocationIndex: number | undefined\n) {\n  const locations = getLocations(issue, selectedFlowIndex);\n  if (\n    selectedLocationIndex !== undefined &&\n    selectedLocationIndex >= 0 &&\n    locations.length >= selectedLocationIndex\n  ) {\n    return locations[selectedLocationIndex];\n  } else {\n    return undefined;\n  }\n}\n\nexport function allLocationsEmpty(\n  issue: Pick<T.Issue, 'flows' | 'secondaryLocations'>,\n  selectedFlowIndex: number | undefined\n) {\n  return getLocations(issue, selectedFlowIndex).every(location => !location.msg);\n}\n\nexport function scrollToIssue(issue: string, smooth = true) {\n  const element = document.querySelector(`[data-issue=\"${issue}\"]`);\n  if (element) {\n    scrollToElement(element, { topOffset: 250, bottomOffset: 100, smooth });\n  }\n}\n\nexport function shouldOpenStandardsFacet(\n  openFacets: T.Dict<boolean>,\n  query: Partial<Query>\n): boolean {\n  return (\n    openFacets[STANDARDS] ||\n    isFilteredBySecurityIssueTypes(query) ||\n    isOneStandardChildFacetOpen(openFacets, query)\n  );\n}\n\nexport function shouldOpenStandardsChildFacet(\n  openFacets: T.Dict<boolean>,\n  query: Partial<Query>,\n  standardType: SecurityStandard\n): boolean {\n  const filter = query[standardType];\n  return (\n    openFacets[STANDARDS] !== false &&\n    (openFacets[standardType] ||\n      (standardType !== SecurityStandard.CWE && filter !== undefined && filter.length > 0))\n  );\n}\n\nexport function shouldOpenSonarSourceSecurityFacet(\n  openFacets: T.Dict<boolean>,\n  query: Partial<Query>\n): boolean {\n  // Open it by default if the parent is open, and no other standard is open.\n  return (\n    shouldOpenStandardsChildFacet(openFacets, query, SecurityStandard.SONARSOURCE) ||\n    (shouldOpenStandardsFacet(openFacets, query) && !isOneStandardChildFacetOpen(openFacets, query))\n  );\n}\n\nfunction isFilteredBySecurityIssueTypes(query: Partial<Query>): boolean {\n  return query.types !== undefined && query.types.includes('VULNERABILITY');\n}\n\nfunction isOneStandardChildFacetOpen(openFacets: T.Dict<boolean>, query: Partial<Query>): boolean {\n  return STANDARD_TYPES.some(standardType =>\n    shouldOpenStandardsChildFacet(openFacets, query, standardType)\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { bulkActivateRules, bulkDeactivateRules, Profile } from '../../../api/quality-profiles';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport Select from '../../../components/controls/Select';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { Query, serializeQuery } from '../query';\n\ninterface Props {\n  action: string;\n  languages: T.Languages;\n  onClose: () => void;\n  profile?: Profile;\n  query: Query;\n  referencedProfiles: T.Dict<Profile>;\n  total: number;\n}\n\ninterface ActivationResult {\n  failed: number;\n  profile: string;\n  succeeded: number;\n}\n\ninterface State {\n  finished: boolean;\n  results: ActivationResult[];\n  selectedProfiles: any[];\n  submitting: boolean;\n}\n\nexport default class BulkChangeModal extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    // if there is only one possible option for profile, select it immediately\n    const selectedProfiles = [];\n    const availableProfiles = this.getAvailableQualityProfiles(props);\n    if (availableProfiles.length === 1) {\n      selectedProfiles.push(availableProfiles[0].key);\n    }\n\n    this.state = { finished: false, results: [], selectedProfiles, submitting: false };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleProfileSelect = (options: { value: string }[]) => {\n    const selectedProfiles = options.map(option => option.value);\n    this.setState({ selectedProfiles });\n  };\n\n  getAvailableQualityProfiles = ({ query, referencedProfiles } = this.props) => {\n    let profiles = Object.values(referencedProfiles);\n    if (query.languages.length > 0) {\n      profiles = profiles.filter(profile => query.languages.includes(profile.language));\n    }\n    return profiles\n      .filter(profile => profile.actions && profile.actions.edit)\n      .filter(profile => !profile.isBuiltIn);\n  };\n\n  processResponse = (profile: string, response: any) => {\n    if (this.mounted) {\n      const result: ActivationResult = {\n        failed: response.failed || 0,\n        profile,\n        succeeded: response.succeeded || 0\n      };\n      this.setState(state => ({ results: [...state.results, result] }));\n    }\n  };\n\n  sendRequests = () => {\n    let looper = Promise.resolve();\n\n    // serialize the query, but delete the `profile`\n    const data = serializeQuery(this.props.query);\n    delete data.profile;\n\n    const method = this.props.action === 'activate' ? bulkActivateRules : bulkDeactivateRules;\n\n    // if a profile is selected in the facet, pick it\n    // otherwise take all profiles selected in the dropdown\n    const profiles: string[] = this.props.profile\n      ? [this.props.profile.key]\n      : this.state.selectedProfiles;\n\n    for (const profile of profiles) {\n      looper = looper\n        .then(() =>\n          method({\n            ...data,\n            targetKey: profile\n          })\n        )\n        .then(response => this.processResponse(profile, response));\n    }\n    return looper;\n  };\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ submitting: true });\n    this.sendRequests().then(\n      () => {\n        if (this.mounted) {\n          this.setState({ finished: true, submitting: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ submitting: false });\n        }\n      }\n    );\n  };\n\n  renderResult = (result: ActivationResult) => {\n    const { profile: profileKey } = result;\n    const profile = this.props.referencedProfiles[profileKey];\n    if (!profile) {\n      return null;\n    }\n    const { languages } = this.props;\n    const language = languages[profile.language]\n      ? languages[profile.language].name\n      : profile.language;\n    return (\n      <Alert key={result.profile} variant={result.failed === 0 ? 'success' : 'warning'}>\n        {result.failed\n          ? translateWithParameters(\n              'coding_rules.bulk_change.warning',\n              profile.name,\n              language,\n              result.succeeded,\n              result.failed\n            )\n          : translateWithParameters(\n              'coding_rules.bulk_change.success',\n              profile.name,\n              language,\n              result.succeeded\n            )}\n      </Alert>\n    );\n  };\n\n  renderProfileSelect = () => {\n    const profiles = this.getAvailableQualityProfiles();\n    const options = profiles.map(profile => ({\n      label: `${profile.name} - ${profile.languageName}`,\n      value: profile.key\n    }));\n    return (\n      <Select\n        multi={true}\n        onChange={this.handleProfileSelect}\n        options={options}\n        value={this.state.selectedProfiles}\n      />\n    );\n  };\n\n  render() {\n    const { action, profile, total } = this.props;\n    const header =\n      action === 'activate'\n        ? `${translate('coding_rules.activate_in_quality_profile')} (${formatMeasure(\n            total,\n            'INT'\n          )} ${translate('coding_rules._rules')})`\n        : `${translate('coding_rules.deactivate_in_quality_profile')} (${formatMeasure(\n            total,\n            'INT'\n          )} ${translate('coding_rules._rules')})`;\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose} size=\"small\">\n        <form onSubmit={this.handleFormSubmit}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n          </header>\n\n          <div className=\"modal-body\">\n            {this.state.results.map(this.renderResult)}\n\n            {!this.state.finished && !this.state.submitting && (\n              <div className=\"modal-field\">\n                <h3>\n                  <label htmlFor=\"coding-rules-bulk-change-profile\">\n                    {action === 'activate'\n                      ? translate('coding_rules.activate_in')\n                      : translate('coding_rules.deactivate_in')}\n                  </label>\n                </h3>\n                {profile ? (\n                  <span>\n                    {profile.name}\n                    {' \u2014 '}\n                    {translate('are_you_sure')}\n                  </span>\n                ) : (\n                  this.renderProfileSelect()\n                )}\n              </div>\n            )}\n          </div>\n\n          <footer className=\"modal-foot\">\n            {this.state.submitting && <i className=\"spinner spacer-right\" />}\n            {!this.state.finished && (\n              <SubmitButton disabled={this.state.submitting} id=\"coding-rules-submit-bulk-change\">\n                {translate('apply')}\n              </SubmitButton>\n            )}\n            <ResetButtonLink onClick={this.props.onClose}>\n              {this.state.finished ? translate('close') : translate('cancel')}\n            </ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Profile } from '../../../api/quality-profiles';\nimport { Button } from '../../../components/controls/buttons';\nimport Dropdown from '../../../components/controls/Dropdown';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate } from '../../../helpers/l10n';\nimport { Query } from '../query';\nimport BulkChangeModal from './BulkChangeModal';\n\ninterface Props {\n  languages: T.Languages;\n  query: Query;\n  referencedProfiles: T.Dict<Profile>;\n  total: number;\n}\n\ninterface State {\n  action?: string;\n  modal: boolean;\n  profile?: Profile;\n}\n\nexport default class BulkChange extends React.PureComponent<Props, State> {\n  state: State = { modal: false };\n\n  getSelectedProfile = () => {\n    const { profile } = this.props.query;\n    return (profile && this.props.referencedProfiles[profile]) || undefined;\n  };\n\n  closeModal = () => this.setState({ action: undefined, modal: false, profile: undefined });\n\n  handleActivateClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.setState({ action: 'activate', modal: true, profile: undefined });\n  };\n\n  handleActivateInProfileClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.setState({ action: 'activate', modal: true, profile: this.getSelectedProfile() });\n  };\n\n  handleDeactivateClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.setState({ action: 'deactivate', modal: true, profile: undefined });\n  };\n\n  handleDeactivateInProfileClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.setState({ action: 'deactivate', modal: true, profile: this.getSelectedProfile() });\n  };\n\n  render() {\n    // show \"Bulk Change\" button only if user is admin of at least one QP\n    const canBulkChange = Object.values(this.props.referencedProfiles).some(profile =>\n      Boolean(profile.actions && profile.actions.edit)\n    );\n    if (!canBulkChange) {\n      return (\n        <Tooltip overlay={translate('coding_rules.can_not_bulk_change')}>\n          <Button className=\"js-bulk-change\" disabled={true}>\n            {translate('bulk_change')}\n          </Button>\n        </Tooltip>\n      );\n    }\n\n    const { activation } = this.props.query;\n    const profile = this.getSelectedProfile();\n    const canChangeProfile = Boolean(\n      profile && !profile.isBuiltIn && profile.actions && profile.actions.edit\n    );\n    const allowActivateOnProfile = canChangeProfile && activation === false;\n    const allowDeactivateOnProfile = canChangeProfile && activation === true;\n\n    return (\n      <>\n        <Dropdown\n          overlayPlacement={PopupPlacement.BottomLeft}\n          overlay={\n            <ul className=\"menu\">\n              <li>\n                <a href=\"#\" onClick={this.handleActivateClick}>\n                  {translate('coding_rules.activate_in')}\u2026\n                </a>\n              </li>\n              {allowActivateOnProfile && profile && (\n                <li>\n                  <a href=\"#\" onClick={this.handleActivateInProfileClick}>\n                    {translate('coding_rules.activate_in')} <strong>{profile.name}</strong>\n                  </a>\n                </li>\n              )}\n              <li>\n                <a href=\"#\" onClick={this.handleDeactivateClick}>\n                  {translate('coding_rules.deactivate_in')}\u2026\n                </a>\n              </li>\n              {allowDeactivateOnProfile && profile && (\n                <li>\n                  <a href=\"#\" onClick={this.handleDeactivateInProfileClick}>\n                    {translate('coding_rules.deactivate_in')} <strong>{profile.name}</strong>\n                  </a>\n                </li>\n              )}\n            </ul>\n          }>\n          <Button className=\"js-bulk-change\">{translate('bulk_change')}</Button>\n        </Dropdown>\n        {this.state.modal && this.state.action && (\n          <BulkChangeModal\n            action={this.state.action}\n            languages={this.props.languages}\n            onClose={this.closeModal}\n            profile={this.state.profile}\n            query={this.props.query}\n            referencedProfiles={this.props.referencedProfiles}\n            total={this.props.total}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\n\ninterface Props {\n  className?: string;\n  children: React.ReactNode;\n  property: string;\n}\n\nexport default function FacetBox(props: Props) {\n  return (\n    <div\n      className={classNames('search-navigator-facet-box', props.className)}\n      data-property={props.property}>\n      {props.children}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport HelpTooltip from '../../components/controls/HelpTooltip';\nimport OpenCloseIcon from '../../components/icons/OpenCloseIcon';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\n\ninterface Props {\n  children?: React.ReactNode;\n  fetching?: boolean;\n  helper?: string;\n  name: React.ReactNode;\n  onClear?: () => void;\n  onClick?: () => void;\n  open: boolean;\n  values?: string[];\n}\n\nexport default class FacetHeader extends React.PureComponent<Props> {\n  handleClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    if (this.props.onClick) {\n      this.props.onClick();\n    }\n  };\n\n  renderHelper() {\n    if (!this.props.helper) {\n      return null;\n    }\n    return <HelpTooltip className=\"spacer-left\" overlay={this.props.helper} />;\n  }\n\n  renderValueIndicator() {\n    const { values } = this.props;\n    if (!values || !values.length) {\n      return null;\n    }\n    const value =\n      values.length === 1 ? values[0] : translateWithParameters('x_selected', values.length);\n    return (\n      <span className=\"badge text-ellipsis\" title={value}>\n        {value}\n      </span>\n    );\n  }\n\n  render() {\n    const showClearButton =\n      this.props.values != null && this.props.values.length > 0 && this.props.onClear != null;\n\n    return (\n      <div className=\"search-navigator-facet-header-wrapper display-flex-center\">\n        {this.props.onClick ? (\n          <span className=\"search-navigator-facet-header display-flex-center\">\n            <a href=\"#\" onClick={this.handleClick}>\n              <OpenCloseIcon className=\"little-spacer-right\" open={this.props.open} />\n              {this.props.name}\n            </a>\n            {this.renderHelper()}\n          </span>\n        ) : (\n          <span className=\"search-navigator-facet-header display-flex-center\">\n            {this.props.name}\n            {this.renderHelper()}\n          </span>\n        )}\n\n        {this.props.children}\n\n        <span className=\"search-navigator-facet-header-value spacer-left spacer-right \">\n          {this.renderValueIndicator()}\n        </span>\n\n        {this.props.fetching && (\n          <span className=\"little-spacer-right\">\n            <DeferredSpinner />\n          </span>\n        )}\n\n        {showClearButton && (\n          <Button\n            className=\"search-navigator-facet-header-button button-small button-red\"\n            onClick={this.props.onClear}>\n            {translate('clear')}\n          </Button>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nexport interface Props {\n  active?: boolean;\n  className?: string;\n  disabled?: boolean;\n  halfWidth?: boolean;\n  name: React.ReactNode;\n  onClick: (x: string, multiple?: boolean) => void;\n  stat?: React.ReactNode;\n  /** Textual version of `name` */\n  tooltip?: string;\n  value: string;\n}\n\nexport default class FacetItem extends React.PureComponent<Props> {\n  static defaultProps = {\n    disabled: false,\n    halfWidth: false,\n    loading: false\n  };\n\n  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.props.onClick(this.props.value, event.ctrlKey || event.metaKey);\n  };\n\n  renderValue() {\n    if (this.props.stat == null) {\n      return null;\n    }\n\n    return <span className=\"facet-stat\">{this.props.stat}</span>;\n  }\n\n  render() {\n    const { name } = this.props;\n    const className = classNames('search-navigator-facet', this.props.className, {\n      active: this.props.active,\n      'search-navigator-facet-half': this.props.halfWidth\n    });\n\n    return this.props.disabled ? (\n      <span className={className} data-facet={this.props.value} title={this.props.tooltip}>\n        <span className=\"facet-name\">{name}</span>\n        {this.renderValue()}\n      </span>\n    ) : (\n      <a\n        className={className}\n        data-facet={this.props.value}\n        href=\"#\"\n        onClick={this.handleClick}\n        title={this.props.tooltip}>\n        <span className=\"facet-name\">{name}</span>\n        {this.renderValue()}\n      </a>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\ninterface Props {\n  children?: React.ReactNode;\n  title?: string;\n}\n\nexport default function FacetItemsList({ children, title }: Props) {\n  return (\n    <div className=\"search-navigator-facet-list\">\n      {title && <div className=\"search-navigator-facet-list-title\">{title}</div>}\n      {children}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\n\ninterface Props {\n  className?: string;\n  count: number;\n  showMore: () => void;\n  showLess: (() => void) | undefined;\n  total: number;\n}\n\nexport default class ListStyleFacetFooter extends React.PureComponent<Props> {\n  handleShowMoreClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.props.showMore();\n  };\n\n  handleShowLessClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    if (this.props.showLess) {\n      this.props.showLess();\n    }\n  };\n\n  render() {\n    const { count, total } = this.props;\n    const hasMore = total > count;\n    const allShown = Boolean(total && total === count);\n\n    return (\n      <footer className=\"note spacer-top spacer-bottom text-center\">\n        {translateWithParameters('x_show', formatMeasure(count, 'INT', null))}\n\n        {hasMore && (\n          <a className=\"spacer-left text-muted\" href=\"#\" onClick={this.handleShowMoreClick}>\n            {translate('show_more')}\n          </a>\n        )}\n\n        {this.props.showLess && allShown && (\n          <a className=\"spacer-left text-muted\" href=\"#\" onClick={this.handleShowLessClick}>\n            {translate('show_less')}\n          </a>\n        )}\n      </footer>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport './MultipleSelectionHint.css';\n\ninterface Props {\n  options: number;\n  values: number;\n}\n\nexport default function MultipleSelectionHint({ options, values }: Props) {\n  // do not render if nothing is selected or there are less than 2 possible options\n  if (values === 0 || options < 2) {\n    return null;\n  }\n\n  return (\n    <div className=\"multiple-selection-hint\">\n      <div className=\"multiple-selection-hint-inner\">\n        {translate(\n          isOnMac()\n            ? 'shortcuts.section.global.facets.multiselection.mac'\n            : 'shortcuts.section.global.facets.multiselection'\n        )}\n      </div>\n    </div>\n  );\n}\n\nfunction isOnMac() {\n  return navigator.userAgent.indexOf('Mac OS X') !== -1;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { sortBy, without } from 'lodash';\nimport * as React from 'react';\nimport ListFooter from '../../components/controls/ListFooter';\nimport SearchBox from '../../components/controls/SearchBox';\nimport Tooltip from '../../components/controls/Tooltip';\nimport { Alert } from '../../components/ui/Alert';\nimport { translate } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport { queriesEqual } from '../../helpers/query';\nimport FacetBox from './FacetBox';\nimport FacetHeader from './FacetHeader';\nimport FacetItem from './FacetItem';\nimport FacetItemsList from './FacetItemsList';\nimport ListStyleFacetFooter from './ListStyleFacetFooter';\nimport MultipleSelectionHint from './MultipleSelectionHint';\n\ninterface SearchResponse<S> {\n  maxResults?: boolean;\n  results: S[];\n  paging?: T.Paging;\n}\n\nexport interface Props<S> {\n  className?: string;\n  disabled?: boolean;\n  disabledHelper?: string;\n  facetHeader: string;\n  fetching: boolean;\n  getFacetItemText: (item: string) => string;\n  getSearchResultKey: (result: S) => string;\n  getSearchResultText: (result: S) => string;\n  loadSearchResultCount?: (result: S[]) => Promise<T.Dict<number>>;\n  maxInitialItems: number;\n  maxItems: number;\n  minSearchLength: number;\n  onChange: (changes: T.Dict<string | string[]>) => void;\n  onClear?: () => void;\n  onItemClick?: (itemValue: string, multiple: boolean) => void;\n  onSearch: (query: string, page?: number) => Promise<SearchResponse<S>>;\n  onToggle: (property: string) => void;\n  open: boolean;\n  property: string;\n  query?: T.RawQuery;\n  renderFacetItem: (item: string) => React.ReactNode;\n  renderSearchResult: (result: S, query: string) => React.ReactNode;\n  searchPlaceholder: string;\n  getSortedItems?: () => string[];\n  stats: T.Dict<number> | undefined;\n  values: string[];\n}\n\ninterface State<S> {\n  autoFocus: boolean;\n  query: string;\n  searching: boolean;\n  searchMaxResults?: boolean;\n  searchPaging?: T.Paging;\n  searchResults?: S[];\n  searchResultsCounts: T.Dict<number>;\n  showFullList: boolean;\n}\n\nexport default class ListStyleFacet<S> extends React.Component<Props<S>, State<S>> {\n  mounted = false;\n\n  static defaultProps = {\n    maxInitialItems: 15,\n    maxItems: 100,\n    minSearchLength: 2\n  };\n\n  state: State<S> = {\n    autoFocus: false,\n    query: '',\n    searching: false,\n    searchResultsCounts: {},\n    showFullList: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentDidUpdate(prevProps: Props<S>) {\n    if (!prevProps.open && this.props.open) {\n      // focus search field *only* if it was manually open\n      this.setState({ autoFocus: true });\n    } else if (\n      (prevProps.open && !this.props.open) ||\n      !queriesEqual(prevProps.query || {}, this.props.query || {})\n    ) {\n      // reset state when closing the facet, or when query changes\n      this.setState({\n        query: '',\n        searchMaxResults: undefined,\n        searchResults: undefined,\n        searching: false,\n        searchResultsCounts: {},\n        showFullList: false\n      });\n    } else if (\n      prevProps.stats !== this.props.stats &&\n      Object.keys(this.props.stats || {}).length < this.props.maxInitialItems\n    ) {\n      // show limited list if `stats` changed and there are less than 15 items\n      this.setState({ showFullList: false });\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleItemClick = (itemValue: string, multiple: boolean) => {\n    if (this.props.onItemClick) {\n      this.props.onItemClick(itemValue, multiple);\n    } else {\n      const { values } = this.props;\n      if (multiple) {\n        const newValue = sortBy(\n          values.includes(itemValue) ? without(values, itemValue) : [...values, itemValue]\n        );\n        this.props.onChange({ [this.props.property]: newValue });\n      } else {\n        this.props.onChange({\n          [this.props.property]: values.includes(itemValue) && values.length < 2 ? [] : [itemValue]\n        });\n      }\n    }\n  };\n\n  handleHeaderClick = () => {\n    this.props.onToggle(this.props.property);\n  };\n\n  handleClear = () => {\n    if (this.props.onClear) {\n      this.props.onClear();\n    } else {\n      this.props.onChange({ [this.props.property]: [] });\n    }\n  };\n\n  stopSearching = () => {\n    if (this.mounted) {\n      this.setState({ searching: false });\n    }\n  };\n\n  search = (query: string) => {\n    if (query.length >= this.props.minSearchLength) {\n      this.setState({ query, searching: true });\n      this.props\n        .onSearch(query)\n        .then(this.loadCountsForSearchResults)\n        .then(({ maxResults, paging, results, stats }) => {\n          if (this.mounted) {\n            this.setState(state => ({\n              searching: false,\n              searchMaxResults: maxResults,\n              searchResults: results,\n              searchPaging: paging,\n              searchResultsCounts: { ...state.searchResultsCounts, ...stats }\n            }));\n          }\n        })\n        .catch(this.stopSearching);\n    } else {\n      this.setState({ query, searching: false, searchResults: [] });\n    }\n  };\n\n  searchMore = () => {\n    const { query, searchPaging, searchResults } = this.state;\n    if (query && searchResults && searchPaging) {\n      this.setState({ searching: true });\n      this.props\n        .onSearch(query, searchPaging.pageIndex + 1)\n        .then(this.loadCountsForSearchResults)\n        .then(({ paging, results, stats }) => {\n          if (this.mounted) {\n            this.setState(state => ({\n              searching: false,\n              searchResults: [...searchResults, ...results],\n              searchPaging: paging,\n              searchResultsCounts: { ...state.searchResultsCounts, ...stats }\n            }));\n          }\n        })\n        .catch(this.stopSearching);\n    }\n  };\n\n  loadCountsForSearchResults = (response: SearchResponse<S>) => {\n    const { loadSearchResultCount = () => Promise.resolve({}) } = this.props;\n    const resultsToLoad = response.results.filter(result => {\n      const key = this.props.getSearchResultKey(result);\n      return this.getStat(key) === undefined && this.state.searchResultsCounts[key] === undefined;\n    });\n    if (resultsToLoad.length > 0) {\n      return loadSearchResultCount(resultsToLoad).then(stats => ({ ...response, stats }));\n    } else {\n      return { ...response, stats: {} };\n    }\n  };\n\n  getStat(item: string) {\n    const { stats } = this.props;\n    return stats && stats[item] !== undefined ? stats && stats[item] : undefined;\n  }\n\n  showFullList = () => {\n    this.setState({ showFullList: true });\n  };\n\n  hideFullList = () => {\n    this.setState({ showFullList: false });\n  };\n\n  renderList() {\n    const { stats } = this.props;\n\n    if (!stats) {\n      return null;\n    }\n\n    const sortedItems = this.props.getSortedItems\n      ? this.props.getSortedItems()\n      : sortBy(\n          Object.keys(stats),\n          key => -stats[key],\n          key => this.props.getFacetItemText(key)\n        );\n\n    const limitedList = this.state.showFullList\n      ? sortedItems\n      : sortedItems.slice(0, this.props.maxInitialItems);\n\n    // make sure all selected items are displayed\n    const selectedBelowLimit = this.state.showFullList\n      ? []\n      : sortedItems\n          .slice(this.props.maxInitialItems)\n          .filter(item => this.props.values.includes(item));\n\n    const mightHaveMoreResults = sortedItems.length >= this.props.maxItems;\n\n    return (\n      <>\n        <FacetItemsList>\n          {limitedList.map(item => (\n            <FacetItem\n              active={this.props.values.includes(item)}\n              key={item}\n              name={this.props.renderFacetItem(item)}\n              onClick={this.handleItemClick}\n              stat={formatFacetStat(this.getStat(item))}\n              tooltip={this.props.getFacetItemText(item)}\n              value={item}\n            />\n          ))}\n        </FacetItemsList>\n        {selectedBelowLimit.length > 0 && (\n          <>\n            <div className=\"note spacer-bottom text-center\">\u22EF</div>\n            <FacetItemsList>\n              {selectedBelowLimit.map(item => (\n                <FacetItem\n                  active={true}\n                  key={item}\n                  name={this.props.renderFacetItem(item)}\n                  onClick={this.handleItemClick}\n                  stat={formatFacetStat(this.getStat(item))}\n                  tooltip={this.props.getFacetItemText(item)}\n                  value={item}\n                />\n              ))}\n            </FacetItemsList>\n          </>\n        )}\n        <ListStyleFacetFooter\n          count={limitedList.length + selectedBelowLimit.length}\n          showLess={this.state.showFullList ? this.hideFullList : undefined}\n          showMore={this.showFullList}\n          total={sortedItems.length}\n        />\n        {mightHaveMoreResults && this.state.showFullList && (\n          <Alert className=\"spacer-top\" variant=\"warning\">\n            {translate('facet_might_have_more_results')}\n          </Alert>\n        )}\n      </>\n    );\n  }\n\n  renderSearch() {\n    return (\n      <SearchBox\n        autoFocus={this.state.autoFocus}\n        className=\"little-spacer-top spacer-bottom\"\n        loading={this.state.searching}\n        minLength={this.props.minSearchLength}\n        onChange={this.search}\n        placeholder={this.props.searchPlaceholder}\n        value={this.state.query}\n      />\n    );\n  }\n\n  renderSearchResults() {\n    const { searching, searchMaxResults, searchResults, searchPaging } = this.state;\n\n    if (!searching && (!searchResults || !searchResults.length)) {\n      return <div className=\"note spacer-bottom\">{translate('no_results')}</div>;\n    }\n\n    if (!searchResults) {\n      // initial search\n      return null;\n    }\n\n    return (\n      <>\n        <FacetItemsList>\n          {searchResults.map(result => this.renderSearchResult(result))}\n        </FacetItemsList>\n        {searchMaxResults && (\n          <Alert className=\"spacer-top\" variant=\"warning\">\n            {translate('facet_might_have_more_results')}\n          </Alert>\n        )}\n        {searchPaging && (\n          <ListFooter\n            className=\"spacer-bottom\"\n            count={searchResults.length}\n            loadMore={this.searchMore}\n            ready={!searching}\n            total={searchPaging.total}\n          />\n        )}\n      </>\n    );\n  }\n\n  renderSearchResult(result: S) {\n    const key = this.props.getSearchResultKey(result);\n    const active = this.props.values.includes(key);\n    const stat = this.getStat(key) || this.state.searchResultsCounts[key];\n    return (\n      <FacetItem\n        active={active}\n        key={key}\n        name={this.props.renderSearchResult(result, this.state.query)}\n        onClick={this.handleItemClick}\n        stat={formatFacetStat(stat)}\n        tooltip={this.props.getSearchResultText(result)}\n        value={key}\n      />\n    );\n  }\n\n  render() {\n    const { disabled, stats = {} } = this.props;\n    const { query, searching, searchResults } = this.state;\n    const values = this.props.values.map(item => this.props.getFacetItemText(item));\n    const loadingResults =\n      query !== '' && searching && (searchResults === undefined || searchResults.length === 0);\n    const showList = !query || loadingResults;\n    return (\n      <FacetBox\n        className={classNames(this.props.className, {\n          'search-navigator-facet-box-forbidden': disabled\n        })}\n        property={this.props.property}>\n        <FacetHeader\n          fetching={this.props.fetching}\n          name={\n            <Tooltip overlay={disabled ? this.props.disabledHelper : undefined}>\n              <span>{this.props.facetHeader}</span>\n            </Tooltip>\n          }\n          onClear={this.handleClear}\n          onClick={disabled ? undefined : this.handleHeaderClick}\n          open={this.props.open && !disabled}\n          values={values}\n        />\n\n        {this.props.open && !disabled && (\n          <>\n            {this.renderSearch()}\n            {showList ? this.renderList() : this.renderSearchResults()}\n            <MultipleSelectionHint options={Object.keys(stats).length} values={values.length} />\n          </>\n        )}\n      </FacetBox>\n    );\n  }\n}\n\nfunction formatFacetStat(stat: number | undefined) {\n  return stat && formatMeasure(stat, 'SHORT_INT');\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\nexport function highlightTerm(str: string, term: string) {\n  const pos = str.toLowerCase().indexOf(term.toLowerCase());\n  return pos !== -1 ? (\n    <>\n      {pos > 0 && str.substring(0, pos)}\n      <mark>{str.substr(pos, term.length)}</mark>\n      {pos + term.length < str.length && str.substring(pos + term.length)}\n    </>\n  ) : (\n    str\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Standards } from '../types/security';\n\nexport function getStandards(): Promise<Standards> {\n  return import('./standards.json').then(x => x.default);\n}\n\nexport function renderCWECategory(standards: Standards, category: string): string {\n  const record = standards.cwe[category];\n  if (!record) {\n    return `CWE-${category}`;\n  } else if (category === 'unknown') {\n    return record.title;\n  } else {\n    return `CWE-${category} - ${record.title}`;\n  }\n}\n\nexport function renderOwaspTop10Category(\n  standards: Standards,\n  category: string,\n  withPrefix = false\n): string {\n  const record = standards.owaspTop10[category];\n  if (!record) {\n    return addPrefix(category.toUpperCase(), 'OWASP', withPrefix);\n  } else {\n    return addPrefix(`${category.toUpperCase()} - ${record.title}`, 'OWASP', withPrefix);\n  }\n}\n\nexport function renderSansTop25Category(\n  standards: Standards,\n  category: string,\n  withPrefix = false\n): string {\n  const record = standards.sansTop25[category];\n  return addPrefix(record ? record.title : category, 'SANS', withPrefix);\n}\n\nexport function renderSonarSourceSecurityCategory(\n  standards: Standards,\n  category: string,\n  withPrefix = false\n): string {\n  const record = standards.sonarsourceSecurity[category];\n  if (!record) {\n    return addPrefix(category.toUpperCase(), 'SONAR', withPrefix);\n  } else if (category === 'others') {\n    return record.title;\n  } else {\n    return addPrefix(record.title, 'SONAR', withPrefix);\n  }\n}\n\nfunction addPrefix(title: string, prefix: string, withPrefix: boolean) {\n  return withPrefix ? `${prefix} ${title}` : title;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit, sortBy, without } from 'lodash';\nimport * as React from 'react';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint';\nimport { translate } from '../../../helpers/l10n';\nimport { highlightTerm } from '../../../helpers/search';\nimport {\n  getStandards,\n  renderCWECategory,\n  renderOwaspTop10Category,\n  renderSansTop25Category,\n  renderSonarSourceSecurityCategory\n} from '../../../helpers/security-standard';\nimport { Facet } from '../../../types/issues';\nimport { SecurityStandard, Standards, StandardType } from '../../../types/security';\nimport { formatFacetStat, Query, STANDARDS } from '../utils';\n\ninterface Props {\n  cwe: string[];\n  cweOpen: boolean;\n  cweStats: T.Dict<number> | undefined;\n  fetchingCwe: boolean;\n  fetchingOwaspTop10: boolean;\n  fetchingSansTop25: boolean;\n  fetchingSonarSourceSecurity: boolean;\n  loadSearchResultCount?: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  owaspTop10: string[];\n  owaspTop10Open: boolean;\n  owaspTop10Stats: T.Dict<number> | undefined;\n  query: Partial<Query>;\n  sansTop25: string[];\n  sansTop25Open: boolean;\n  sansTop25Stats: T.Dict<number> | undefined;\n  sonarsourceSecurity: string[];\n  sonarsourceSecurityOpen: boolean;\n  sonarsourceSecurityStats: T.Dict<number> | undefined;\n}\n\ninterface State {\n  standards: Standards;\n}\n\ntype StatsProp = 'owaspTop10Stats' | 'cweStats' | 'sansTop25Stats' | 'sonarsourceSecurityStats';\ntype ValuesProp = StandardType;\n\nexport default class StandardFacet extends React.PureComponent<Props, State> {\n  mounted = false;\n  property = STANDARDS;\n  state: State = {\n    standards: { owaspTop10: {}, sansTop25: {}, cwe: {}, sonarsourceSecurity: {} }\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n\n    // load standards.json only if the facet is open, or there is a selected value\n    if (\n      this.props.open ||\n      this.props.owaspTop10.length > 0 ||\n      this.props.cwe.length > 0 ||\n      this.props.sansTop25.length > 0 ||\n      this.props.sonarsourceSecurity.length > 0\n    ) {\n      this.loadStandards();\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (!prevProps.open && this.props.open) {\n      this.loadStandards();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadStandards = () => {\n    getStandards().then(\n      ({ owaspTop10, sansTop25, cwe, sonarsourceSecurity }: Standards) => {\n        if (this.mounted) {\n          this.setState({ standards: { owaspTop10, sansTop25, cwe, sonarsourceSecurity } });\n        }\n      },\n      () => {}\n    );\n  };\n\n  getValues = () => {\n    return [\n      ...this.props.sonarsourceSecurity.map(item =>\n        renderSonarSourceSecurityCategory(this.state.standards, item, true)\n      ),\n      ...this.props.owaspTop10.map(item =>\n        renderOwaspTop10Category(this.state.standards, item, true)\n      ),\n      ...this.props.sansTop25.map(item =>\n        renderSansTop25Category(this.state.standards, item, true)\n      ),\n      ...this.props.cwe.map(item => renderCWECategory(this.state.standards, item))\n    ];\n  };\n\n  handleHeaderClick = () => {\n    this.props.onToggle(this.property);\n  };\n\n  handleOwaspTop10HeaderClick = () => {\n    this.props.onToggle('owaspTop10');\n  };\n\n  handleSansTop25HeaderClick = () => {\n    this.props.onToggle('sansTop25');\n  };\n\n  handleSonarSourceSecurityHeaderClick = () => {\n    this.props.onToggle('sonarsourceSecurity');\n  };\n\n  handleClear = () => {\n    this.props.onChange({\n      [this.property]: [],\n      owaspTop10: [],\n      sansTop25: [],\n      cwe: [],\n      sonarsourceSecurity: []\n    });\n  };\n\n  handleItemClick = (prop: ValuesProp, itemValue: string, multiple: boolean) => {\n    const items = this.props[prop];\n    if (multiple) {\n      const newValue = sortBy(\n        items.includes(itemValue) ? without(items, itemValue) : [...items, itemValue]\n      );\n      this.props.onChange({ [prop]: newValue });\n    } else {\n      this.props.onChange({\n        [prop]: items.includes(itemValue) && items.length < 2 ? [] : [itemValue]\n      });\n    }\n  };\n\n  handleOwaspTop10ItemClick = (itemValue: string, multiple: boolean) => {\n    this.handleItemClick(SecurityStandard.OWASP_TOP10, itemValue, multiple);\n  };\n\n  handleSansTop25ItemClick = (itemValue: string, multiple: boolean) => {\n    this.handleItemClick(SecurityStandard.SANS_TOP25, itemValue, multiple);\n  };\n\n  handleSonarSourceSecurityItemClick = (itemValue: string, multiple: boolean) => {\n    this.handleItemClick(SecurityStandard.SONARSOURCE, itemValue, multiple);\n  };\n\n  handleCWESearch = (query: string) => {\n    return Promise.resolve({\n      results: Object.keys(this.state.standards.cwe).filter(cwe =>\n        renderCWECategory(this.state.standards, cwe)\n          .toLowerCase()\n          .includes(query.toLowerCase())\n      )\n    });\n  };\n\n  loadCWESearchResultCount = (categories: string[]) => {\n    const { loadSearchResultCount } = this.props;\n    return loadSearchResultCount\n      ? loadSearchResultCount('cwe', { cwe: categories })\n      : Promise.resolve({});\n  };\n\n  renderList = (\n    statsProp: StatsProp,\n    valuesProp: ValuesProp,\n    renderName: (standards: Standards, category: string) => string,\n    onClick: (x: string, multiple?: boolean) => void\n  ) => {\n    const stats = this.props[statsProp];\n    const values = this.props[valuesProp];\n    if (!stats) {\n      return null;\n    }\n    const categories = sortBy(Object.keys(stats), key => -stats[key]);\n    return this.renderFacetItemsList(stats, values, categories, renderName, renderName, onClick);\n  };\n\n  // eslint-disable-next-line max-params\n  renderFacetItemsList = (\n    stats: any,\n    values: string[],\n    categories: string[],\n    renderName: (standards: Standards, category: string) => React.ReactNode,\n    renderTooltip: (standards: Standards, category: string) => string,\n    onClick: (x: string, multiple?: boolean) => void\n  ) => {\n    if (!categories.length) {\n      return (\n        <div className=\"search-navigator-facet-empty little-spacer-top\">\n          {translate('no_results')}\n        </div>\n      );\n    }\n\n    const getStat = (category: string) => {\n      return stats ? stats[category] : undefined;\n    };\n\n    return (\n      <FacetItemsList>\n        {categories.map(category => (\n          <FacetItem\n            active={values.includes(category)}\n            key={category}\n            name={renderName(this.state.standards, category)}\n            onClick={onClick}\n            stat={formatFacetStat(getStat(category))}\n            tooltip={renderTooltip(this.state.standards, category)}\n            value={category}\n          />\n        ))}\n      </FacetItemsList>\n    );\n  };\n\n  renderHint = (statsProp: StatsProp, valuesProp: ValuesProp) => {\n    const stats = this.props[statsProp] || {};\n    const values = this.props[valuesProp];\n    return <MultipleSelectionHint options={Object.keys(stats).length} values={values.length} />;\n  };\n\n  renderOwaspTop10List() {\n    return this.renderList(\n      'owaspTop10Stats',\n      SecurityStandard.OWASP_TOP10,\n      renderOwaspTop10Category,\n      this.handleOwaspTop10ItemClick\n    );\n  }\n\n  renderOwaspTop10Hint() {\n    return this.renderHint('owaspTop10Stats', SecurityStandard.OWASP_TOP10);\n  }\n\n  renderSansTop25List() {\n    return this.renderList(\n      'sansTop25Stats',\n      SecurityStandard.SANS_TOP25,\n      renderSansTop25Category,\n      this.handleSansTop25ItemClick\n    );\n  }\n\n  renderSansTop25Hint() {\n    return this.renderHint('sansTop25Stats', SecurityStandard.SANS_TOP25);\n  }\n\n  renderSonarSourceSecurityList() {\n    return this.renderList(\n      'sonarsourceSecurityStats',\n      SecurityStandard.SONARSOURCE,\n      renderSonarSourceSecurityCategory,\n      this.handleSonarSourceSecurityItemClick\n    );\n  }\n\n  renderSonarSourceSecurityHint() {\n    return this.renderHint('sonarsourceSecurityStats', SecurityStandard.SONARSOURCE);\n  }\n\n  renderSubFacets() {\n    return (\n      <>\n        <FacetBox className=\"is-inner\" property={SecurityStandard.SONARSOURCE}>\n          <FacetHeader\n            fetching={this.props.fetchingSonarSourceSecurity}\n            name={translate('issues.facet.sonarsourceSecurity')}\n            onClick={this.handleSonarSourceSecurityHeaderClick}\n            open={this.props.sonarsourceSecurityOpen}\n            values={this.props.sonarsourceSecurity.map(item =>\n              renderSonarSourceSecurityCategory(this.state.standards, item)\n            )}\n          />\n          {this.props.sonarsourceSecurityOpen && (\n            <>\n              {this.renderSonarSourceSecurityList()}\n              {this.renderSonarSourceSecurityHint()}\n            </>\n          )}\n        </FacetBox>\n        <FacetBox className=\"is-inner\" property={SecurityStandard.OWASP_TOP10}>\n          <FacetHeader\n            fetching={this.props.fetchingOwaspTop10}\n            name={translate('issues.facet.owaspTop10')}\n            onClick={this.handleOwaspTop10HeaderClick}\n            open={this.props.owaspTop10Open}\n            values={this.props.owaspTop10.map(item =>\n              renderOwaspTop10Category(this.state.standards, item)\n            )}\n          />\n          {this.props.owaspTop10Open && (\n            <>\n              {this.renderOwaspTop10List()}\n              {this.renderOwaspTop10Hint()}\n            </>\n          )}\n        </FacetBox>\n        <FacetBox className=\"is-inner\" property={SecurityStandard.SANS_TOP25}>\n          <FacetHeader\n            fetching={this.props.fetchingSansTop25}\n            name={translate('issues.facet.sansTop25')}\n            onClick={this.handleSansTop25HeaderClick}\n            open={this.props.sansTop25Open}\n            values={this.props.sansTop25.map(item =>\n              renderSansTop25Category(this.state.standards, item)\n            )}\n          />\n          {this.props.sansTop25Open && (\n            <>\n              {this.renderSansTop25List()}\n              {this.renderSansTop25Hint()}\n            </>\n          )}\n        </FacetBox>\n        <ListStyleFacet<string>\n          className=\"is-inner\"\n          facetHeader={translate('issues.facet.cwe')}\n          fetching={this.props.fetchingCwe}\n          getFacetItemText={item => renderCWECategory(this.state.standards, item)}\n          getSearchResultKey={item => item}\n          getSearchResultText={item => renderCWECategory(this.state.standards, item)}\n          loadSearchResultCount={this.loadCWESearchResultCount}\n          onChange={this.props.onChange}\n          onSearch={this.handleCWESearch}\n          onToggle={this.props.onToggle}\n          open={this.props.cweOpen}\n          property={SecurityStandard.CWE}\n          query={omit(this.props.query, 'cwe')}\n          renderFacetItem={item => renderCWECategory(this.state.standards, item)}\n          renderSearchResult={(item, query) =>\n            highlightTerm(renderCWECategory(this.state.standards, item), query)\n          }\n          searchPlaceholder={translate('search.search_for_cwe')}\n          stats={this.props.cweStats}\n          values={this.props.cwe}\n        />\n      </>\n    );\n  }\n\n  render() {\n    return (\n      <FacetBox property={this.property}>\n        <FacetHeader\n          name={translate('issues.facet', this.property)}\n          onClear={this.handleClear}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={this.getValues()}\n        />\n\n        {this.props.open && this.renderSubFacets()}\n      </FacetBox>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { orderBy, sortBy, without } from 'lodash';\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { FacetKey } from '../query';\n\nexport interface BasicProps {\n  onChange: (changes: T.Dict<string | string[] | undefined>) => void;\n  onToggle: (facet: FacetKey) => void;\n  open: boolean;\n  stats?: T.Dict<number>;\n  values: string[];\n}\n\ninterface Props extends BasicProps {\n  children?: React.ReactNode;\n  disabled?: boolean;\n  disabledHelper?: string;\n  halfWidth?: boolean;\n  options?: string[];\n  property: FacetKey;\n  renderFooter?: () => React.ReactNode;\n  renderName?: (value: string) => React.ReactNode;\n  renderTextName?: (value: string) => string;\n  singleSelection?: boolean;\n}\n\nexport default class Facet extends React.PureComponent<Props> {\n  handleItemClick = (itemValue: string, multiple: boolean) => {\n    const { values } = this.props;\n    let newValue;\n    if (this.props.singleSelection) {\n      const value = values.length ? values[0] : undefined;\n      newValue = itemValue === value ? undefined : itemValue;\n    } else if (multiple) {\n      newValue = orderBy(\n        values.includes(itemValue) ? without(values, itemValue) : [...values, itemValue]\n      );\n    } else {\n      newValue = values.includes(itemValue) && values.length < 2 ? [] : [itemValue];\n    }\n    this.props.onChange({ [this.props.property]: newValue });\n  };\n\n  handleHeaderClick = () => this.props.onToggle(this.props.property);\n\n  handleClear = () => this.props.onChange({ [this.props.property]: [] });\n\n  getStat = (value: string) => this.props.stats && this.props.stats[value];\n\n  renderItem = (value: string) => {\n    const active = this.props.values.includes(value);\n    const stat = this.getStat(value);\n    const { renderName = defaultRenderName, renderTextName = defaultRenderName } = this.props;\n\n    return (\n      <FacetItem\n        active={active}\n        halfWidth={this.props.halfWidth}\n        key={value}\n        name={renderName(value)}\n        onClick={this.handleItemClick}\n        stat={stat && formatMeasure(stat, 'SHORT_INT')}\n        tooltip={renderTextName(value)}\n        value={value}\n      />\n    );\n  };\n\n  render() {\n    const { disabled, renderTextName = defaultRenderName, stats } = this.props;\n    const values = this.props.values.map(renderTextName);\n    const items =\n      this.props.options ||\n      (stats &&\n        sortBy(\n          Object.keys(stats),\n          key => -stats[key],\n          key => renderTextName(key).toLowerCase()\n        ));\n\n    return (\n      <FacetBox\n        className={classNames({ 'search-navigator-facet-box-forbidden': disabled })}\n        property={this.props.property}>\n        <FacetHeader\n          name={\n            <Tooltip overlay={disabled ? this.props.disabledHelper : undefined}>\n              <span>{translate('coding_rules.facet', this.props.property)}</span>\n            </Tooltip>\n          }\n          onClear={this.handleClear}\n          onClick={disabled ? undefined : this.handleHeaderClick}\n          open={this.props.open && !disabled}\n          values={values}>\n          {this.props.children}\n        </FacetHeader>\n\n        {this.props.open && items !== undefined && (\n          <FacetItemsList>{items.map(this.renderItem)}</FacetItemsList>\n        )}\n\n        {this.props.open && this.props.renderFooter !== undefined && this.props.renderFooter()}\n      </FacetBox>\n    );\n  }\n}\n\nfunction defaultRenderName(value: string) {\n  return value;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport { SEVERITIES } from '../../../helpers/constants';\nimport { translate } from '../../../helpers/l10n';\nimport Facet, { BasicProps } from './Facet';\n\ninterface Props extends BasicProps {\n  disabled: boolean;\n}\n\nexport default class ActivationSeverityFacet extends React.PureComponent<Props> {\n  renderName = (severity: string) => <SeverityHelper severity={severity} />;\n\n  renderTextName = (severity: string) => translate('severity', severity);\n\n  render() {\n    return (\n      <Facet\n        {...this.props}\n        disabled={this.props.disabled}\n        disabledHelper={translate('coding_rules.filters.active_severity.inactive')}\n        halfWidth={true}\n        options={SEVERITIES}\n        property=\"activationSeverities\"\n        renderName={this.renderName}\n        renderTextName={this.renderTextName}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { injectIntl, WrappedComponentProps } from 'react-intl';\nimport DateInput from '../../../components/controls/DateInput';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport { longFormatterOption } from '../../../components/intl/DateFormatter';\nimport { translate } from '../../../helpers/l10n';\nimport { Query } from '../query';\n\ninterface Props {\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: keyof Query) => void;\n  open: boolean;\n  value?: Date;\n}\n\nclass AvailableSinceFacet extends React.PureComponent<Props & WrappedComponentProps> {\n  handleHeaderClick = () => {\n    this.props.onToggle('availableSince');\n  };\n\n  handleClear = () => {\n    this.props.onChange({ availableSince: undefined });\n  };\n\n  handlePeriodChange = (date: Date | undefined) => {\n    this.props.onChange({ availableSince: date });\n  };\n\n  getValues = () =>\n    this.props.value\n      ? [this.props.intl.formatDate(this.props.value, longFormatterOption)]\n      : undefined;\n\n  render() {\n    return (\n      <FacetBox property=\"availableSince\">\n        <FacetHeader\n          name={translate('coding_rules.facet.available_since')}\n          onClear={this.handleClear}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={this.getValues()}\n        />\n\n        {this.props.open && (\n          <DateInput\n            name=\"available-since\"\n            onChange={this.handlePeriodChange}\n            placeholder={translate('date')}\n            value={this.props.value}\n          />\n        )}\n      </FacetBox>\n    );\n  }\n}\n\nexport default injectIntl(AvailableSinceFacet);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport { SEVERITIES } from '../../../helpers/constants';\nimport { translate } from '../../../helpers/l10n';\nimport Facet, { BasicProps } from './Facet';\n\nexport default class DefaultSeverityFacet extends React.PureComponent<BasicProps> {\n  renderName = (severity: string) => <SeverityHelper severity={severity} />;\n\n  renderTextName = (severity: string) => translate('severity', severity);\n\n  render() {\n    return (\n      <Facet\n        {...this.props}\n        halfWidth={true}\n        options={SEVERITIES}\n        property=\"severities\"\n        renderName={this.renderName}\n        renderTextName={this.renderTextName}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport Facet, { BasicProps } from './Facet';\n\ninterface Props extends T.Omit<BasicProps, 'values'> {\n  disabled: boolean;\n  value: T.RuleInheritance | undefined;\n}\n\nexport default class InheritanceFacet extends React.PureComponent<Props> {\n  renderName = (value: T.RuleInheritance) =>\n    translate('coding_rules.filters.inheritance', value.toLowerCase());\n\n  render() {\n    const { value, ...props } = this.props;\n\n    return (\n      <Facet\n        {...props}\n        disabled={this.props.disabled}\n        disabledHelper={translate('coding_rules.filters.inheritance.inactive')}\n        options={['NONE', 'INHERITED', 'OVERRIDES']}\n        property=\"inheritance\"\n        renderName={this.renderName}\n        renderTextName={this.renderName}\n        singleSelection={true}\n        values={value ? [value] : []}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniqBy } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport { translate } from '../../../helpers/l10n';\nimport { highlightTerm } from '../../../helpers/search';\nimport { getLanguages, Store } from '../../../store/rootReducer';\nimport { BasicProps } from './Facet';\n\ninterface InstalledLanguage {\n  key: string;\n  name: string;\n}\n\ninterface Props extends BasicProps {\n  disabled?: boolean;\n  installedLanguages: InstalledLanguage[];\n}\n\nclass LanguageFacet extends React.PureComponent<Props> {\n  getLanguageName = (languageKey: string) => {\n    const language = this.props.installedLanguages.find(l => l.key === languageKey);\n    return language ? language.name : languageKey;\n  };\n\n  handleSearch = (query: string) => {\n    const options = this.getAllPossibleOptions();\n    const results = options.filter(language =>\n      language.name.toLowerCase().includes(query.toLowerCase())\n    );\n    const paging = { pageIndex: 1, pageSize: results.length, total: results.length };\n    return Promise.resolve({ paging, results });\n  };\n\n  getAllPossibleOptions = () => {\n    const { installedLanguages, stats = {} } = this.props;\n\n    // add any language that presents in the facet, but might not be installed\n    // for such language we don't know their display name, so let's just use their key\n    // and make sure we reference each language only once\n    return uniqBy(\n      [...installedLanguages, ...Object.keys(stats).map(key => ({ key, name: key }))],\n      language => language.key\n    );\n  };\n\n  renderSearchResult = ({ name }: InstalledLanguage, term: string) => {\n    return highlightTerm(name, term);\n  };\n\n  render() {\n    return (\n      <ListStyleFacet<InstalledLanguage>\n        disabled={this.props.disabled}\n        disabledHelper={translate('coding_rules.filters.language.inactive')}\n        facetHeader={translate('coding_rules.facet.languages')}\n        fetching={false}\n        getFacetItemText={this.getLanguageName}\n        getSearchResultKey={language => language.key}\n        getSearchResultText={language => language.name}\n        minSearchLength={1}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"languages\"\n        renderFacetItem={this.getLanguageName}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_languages')}\n        stats={this.props.stats}\n        values={this.props.values}\n      />\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({\n  installedLanguages: Object.values(getLanguages(state))\n});\n\nexport default connect(mapStateToProps)(LanguageFacet);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Profile } from '../../../api/quality-profiles';\nimport DocumentationTooltip from '../../../components/common/DocumentationTooltip';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport { translate } from '../../../helpers/l10n';\nimport { FacetKey, Query } from '../query';\n\ninterface Props {\n  activation: boolean | undefined;\n  compareToProfile: string | undefined;\n  languages: string[];\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (facet: FacetKey) => void;\n  open: boolean;\n  referencedProfiles: T.Dict<Profile>;\n  value: string | undefined;\n}\n\nexport default class ProfileFacet extends React.PureComponent<Props> {\n  handleItemClick = (selected: string) => {\n    const newValue = this.props.value === selected ? '' : selected;\n    this.props.onChange({\n      activation: this.props.activation === undefined ? true : this.props.activation,\n      compareToProfile: undefined,\n      profile: newValue\n    });\n  };\n\n  handleHeaderClick = () => this.props.onToggle('profile');\n\n  handleClear = () =>\n    this.props.onChange({\n      activation: undefined,\n      activationSeverities: [],\n      compareToProfile: undefined,\n      inheritance: undefined,\n      profile: undefined\n    });\n\n  handleActiveClick = (event: React.SyntheticEvent<HTMLElement>) => {\n    this.stopPropagation(event);\n    this.props.onChange({ activation: true, compareToProfile: undefined });\n  };\n\n  handleInactiveClick = (event: React.SyntheticEvent<HTMLElement>) => {\n    this.stopPropagation(event);\n    this.props.onChange({ activation: false, compareToProfile: undefined });\n  };\n\n  stopPropagation = (event: React.SyntheticEvent<HTMLElement>) => {\n    event.preventDefault();\n    event.stopPropagation();\n    event.currentTarget.blur();\n  };\n\n  getTextValue = () => {\n    const { referencedProfiles, value } = this.props;\n    if (value) {\n      const profile = referencedProfiles[value];\n      const name = (profile && `${profile.name} ${profile.languageName}`) || value;\n      return [name];\n    } else {\n      return [];\n    }\n  };\n\n  getTooltip = (profile: Profile) => {\n    const base = `${profile.name} ${profile.languageName}`;\n    return profile.isBuiltIn ? `${base} (${translate('quality_profiles.built_in')})` : base;\n  };\n\n  renderName = (profile: Profile) => (\n    <>\n      {profile.name}\n      <span className=\"note little-spacer-left\">\n        {profile.languageName}\n        {profile.isBuiltIn && ` (${translate('quality_profiles.built_in')})`}\n      </span>\n    </>\n  );\n\n  renderActivation = (profile: Profile) => {\n    const isCompare = profile.key === this.props.compareToProfile;\n    const activation = isCompare ? true : this.props.activation;\n    return (\n      <>\n        <span\n          aria-checked={activation}\n          className={classNames('js-active', 'facet-toggle', 'facet-toggle-green', {\n            'facet-toggle-active': activation\n          })}\n          onClick={isCompare ? this.stopPropagation : this.handleActiveClick}\n          role=\"radio\"\n          tabIndex={-1}>\n          active\n        </span>\n        <span\n          aria-checked={!activation}\n          className={classNames('js-inactive', 'facet-toggle', 'facet-toggle-red', {\n            'facet-toggle-active': !activation\n          })}\n          onClick={isCompare ? this.stopPropagation : this.handleInactiveClick}\n          role=\"radio\"\n          tabIndex={-1}>\n          inactive\n        </span>\n      </>\n    );\n  };\n\n  renderItem = (profile: Profile) => {\n    const active = [this.props.value, this.props.compareToProfile].includes(profile.key);\n\n    return (\n      <FacetItem\n        active={active}\n        className={this.props.compareToProfile === profile.key ? 'compare' : undefined}\n        key={profile.key}\n        name={this.renderName(profile)}\n        onClick={this.handleItemClick}\n        stat={this.renderActivation(profile)}\n        tooltip={this.getTooltip(profile)}\n        value={profile.key}\n      />\n    );\n  };\n\n  render() {\n    const { languages, referencedProfiles } = this.props;\n    let profiles = Object.values(referencedProfiles);\n    if (languages.length > 0) {\n      profiles = profiles.filter(profile => languages.includes(profile.language));\n    }\n    profiles = sortBy(\n      profiles,\n      profile => profile.name.toLowerCase(),\n      profile => profile.languageName\n    );\n\n    return (\n      <FacetBox property=\"profile\">\n        <FacetHeader\n          name={translate('coding_rules.facet.qprofile')}\n          onClear={this.handleClear}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={this.getTextValue()}>\n          <DocumentationTooltip\n            className=\"spacer-left\"\n            content={translate('coding_rules.facet.qprofile.help')}\n            links={[\n              {\n                href: '/documentation/instance-administration/quality-profiles/',\n                label: translate('coding_rules.facet.qprofile.link')\n              }\n            ]}\n          />\n        </FacetHeader>\n\n        {this.props.open && <FacetItemsList>{profiles.map(this.renderItem)}</FacetItemsList>}\n      </FacetBox>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getLanguages, Store } from '../../../store/rootReducer';\nimport Facet, { BasicProps } from './Facet';\n\ninterface StateProps {\n  referencedLanguages: T.Dict<{ key: string; name: string }>;\n}\n\ninterface Props extends BasicProps, StateProps {\n  referencedRepositories: T.Dict<{ key: string; language: string; name: string }>;\n}\n\nclass RepositoryFacet extends React.PureComponent<Props> {\n  getLanguageName = (languageKey: string) => {\n    const { referencedLanguages } = this.props;\n    const language = referencedLanguages[languageKey];\n    return (language && language.name) || languageKey;\n  };\n\n  renderName = (repositoryKey: string) => {\n    const { referencedRepositories } = this.props;\n    const repository = referencedRepositories[repositoryKey];\n    return repository ? (\n      <>\n        {repository.name}\n        <span className=\"note little-spacer-left\">{this.getLanguageName(repository.language)}</span>\n      </>\n    ) : (\n      repositoryKey\n    );\n  };\n\n  renderTextName = (repositoryKey: string) => {\n    const { referencedRepositories } = this.props;\n    const repository = referencedRepositories[repositoryKey];\n    return (repository && repository.name) || repositoryKey;\n  };\n\n  render() {\n    const { referencedLanguages, referencedRepositories, ...facetProps } = this.props;\n    return (\n      <Facet\n        {...facetProps}\n        property=\"repositories\"\n        renderName={this.renderName}\n        renderTextName={this.renderTextName}\n      />\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store): StateProps => ({\n  referencedLanguages: getLanguages(state)\n});\n\nexport default connect(mapStateToProps)(RepositoryFacet);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { RULE_STATUSES } from '../../../helpers/constants';\nimport { translate } from '../../../helpers/l10n';\nimport Facet, { BasicProps } from './Facet';\n\nexport default class StatusFacet extends React.PureComponent<BasicProps> {\n  renderName = (status: string) => translate('rules.status', status.toLowerCase());\n\n  render() {\n    return (\n      <Facet\n        {...this.props}\n        options={RULE_STATUSES}\n        property=\"statuses\"\n        renderName={this.renderName}\n        renderTextName={this.renderName}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniq } from 'lodash';\nimport * as React from 'react';\nimport { getRuleTags } from '../../../api/rules';\nimport { colors } from '../../../app/theme';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport TagsIcon from '../../../components/icons/TagsIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { highlightTerm } from '../../../helpers/search';\nimport { BasicProps } from './Facet';\n\nexport default class TagFacet extends React.PureComponent<BasicProps> {\n  handleSearch = (query: string) => {\n    return getRuleTags({ ps: 50, q: query }).then(tags => ({\n      paging: { pageIndex: 1, pageSize: tags.length, total: tags.length },\n      results: tags\n    }));\n  };\n\n  handleSelect = (option: { value: string }) => {\n    this.props.onChange({ tags: uniq([...this.props.values, option.value]) });\n  };\n\n  getTagName = (tag: string) => {\n    return tag;\n  };\n\n  renderTag = (tag: string) => (\n    <>\n      <TagsIcon className=\"little-spacer-right\" fill={colors.gray60} />\n      {tag}\n    </>\n  );\n\n  renderSearchResult = (tag: string, term: string) => (\n    <>\n      <TagsIcon className=\"little-spacer-right\" fill={colors.gray60} />\n      {highlightTerm(tag, term)}\n    </>\n  );\n\n  render() {\n    return (\n      <ListStyleFacet<string>\n        facetHeader={translate('coding_rules.facet.tags')}\n        fetching={false}\n        getFacetItemText={this.getTagName}\n        getSearchResultKey={tag => tag}\n        getSearchResultText={tag => tag}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"tags\"\n        renderFacetItem={this.renderTag}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_tags')}\n        stats={this.props.stats}\n        values={this.props.values}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { translate } from '../../../helpers/l10n';\nimport Facet, { BasicProps } from './Facet';\n\ninterface Props extends T.Omit<BasicProps, 'onChange' | 'values'> {\n  onChange: (changes: { template: boolean | undefined }) => void;\n  value: boolean | undefined;\n}\n\nexport default class TemplateFacet extends React.PureComponent<Props> {\n  handleChange = (changes: { template: string | any[] }) => {\n    const template =\n      // empty array is returned when a user cleared the facet\n      // otherwise `\"true\"`, `\"false\"` or `undefined` can be returned\n      Array.isArray(changes.template) || changes.template === undefined\n        ? undefined\n        : changes.template === 'true';\n    this.props.onChange({ ...changes, template });\n  };\n\n  renderName = (template: string) =>\n    template === 'true'\n      ? translate('coding_rules.filters.template.is_template')\n      : translate('coding_rules.filters.template.is_not_template');\n\n  render() {\n    const { onChange, value, ...props } = this.props;\n\n    return (\n      <Facet\n        {...props}\n        onChange={this.handleChange}\n        options={['true', 'false']}\n        property=\"template\"\n        renderName={this.renderName}\n        renderTextName={this.renderName}\n        singleSelection={true}\n        values={value !== undefined ? [String(value)] : []}>\n        <HelpTooltip\n          className=\"spacer-left\"\n          overlay={\n            <div className=\"big-padded-top big-padded-bottom\">\n              {translate('coding_rules.rule_template.help')}\n            </div>\n          }\n        />\n      </Facet>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport { translate } from '../../../helpers/l10n';\nimport Facet, { BasicProps } from './Facet';\n\nexport default class TypeFacet extends React.PureComponent<BasicProps> {\n  renderName = (type: string) => (\n    <>\n      <IssueTypeIcon className=\"little-spacer-right\" query={type} />\n      {translate('issue.type', type)}\n    </>\n  );\n\n  renderTextName = (type: string) => translate('issue.type', type);\n\n  render() {\n    const options = ['BUG', 'VULNERABILITY', 'CODE_SMELL', 'SECURITY_HOTSPOT'];\n\n    return (\n      <Facet\n        {...this.props}\n        options={options}\n        property=\"types\"\n        renderName={this.renderName}\n        renderTextName={this.renderTextName}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Profile } from '../../../api/quality-profiles';\nimport StandardFacet from '../../issues/sidebar/StandardFacet';\nimport { Facets, OpenFacets, Query } from '../query';\nimport ActivationSeverityFacet from './ActivationSeverityFacet';\nimport AvailableSinceFacet from './AvailableSinceFacet';\nimport DefaultSeverityFacet from './DefaultSeverityFacet';\nimport InheritanceFacet from './InheritanceFacet';\nimport LanguageFacet from './LanguageFacet';\nimport ProfileFacet from './ProfileFacet';\nimport RepositoryFacet from './RepositoryFacet';\nimport StatusFacet from './StatusFacet';\nimport TagFacet from './TagFacet';\nimport TemplateFacet from './TemplateFacet';\nimport TypeFacet from './TypeFacet';\n\nexport interface FacetsListProps {\n  facets?: Facets;\n  hideProfileFacet?: boolean;\n  onFacetToggle: (facet: string) => void;\n  onFilterChange: (changes: Partial<Query>) => void;\n  openFacets: OpenFacets;\n  query: Query;\n  referencedProfiles: T.Dict<Profile>;\n  referencedRepositories: T.Dict<{ key: string; language: string; name: string }>;\n  selectedProfile?: Profile;\n}\n\nexport default function FacetsList(props: FacetsListProps) {\n  const languageDisabled = !props.hideProfileFacet && props.query.profile !== undefined;\n\n  const inheritanceDisabled =\n    props.query.compareToProfile !== undefined ||\n    props.selectedProfile === undefined ||\n    !props.selectedProfile.isInherited;\n\n  const activationSeverityDisabled =\n    props.query.compareToProfile !== undefined ||\n    props.selectedProfile === undefined ||\n    !props.query.activation;\n  return (\n    <>\n      <LanguageFacet\n        disabled={languageDisabled}\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.languages}\n        stats={props.facets && props.facets.languages}\n        values={props.query.languages}\n      />\n      <TypeFacet\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.types}\n        stats={props.facets && props.facets.types}\n        values={props.query.types}\n      />\n      <TagFacet\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.tags}\n        stats={props.facets && props.facets.tags}\n        values={props.query.tags}\n      />\n      <RepositoryFacet\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.repositories}\n        referencedRepositories={props.referencedRepositories}\n        stats={props.facets && props.facets.repositories}\n        values={props.query.repositories}\n      />\n      <DefaultSeverityFacet\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.severities}\n        stats={props.facets && props.facets.severities}\n        values={props.query.severities}\n      />\n      <StatusFacet\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.statuses}\n        stats={props.facets && props.facets.statuses}\n        values={props.query.statuses}\n      />\n      <StandardFacet\n        cwe={props.query.cwe}\n        cweOpen={!!props.openFacets.cwe}\n        cweStats={props.facets && props.facets.cwe}\n        fetchingCwe={false}\n        fetchingOwaspTop10={false}\n        fetchingSansTop25={false}\n        fetchingSonarSourceSecurity={false}\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.standards}\n        owaspTop10={props.query.owaspTop10}\n        owaspTop10Open={!!props.openFacets.owaspTop10}\n        owaspTop10Stats={props.facets && props.facets.owaspTop10}\n        query={props.query}\n        sansTop25={props.query.sansTop25}\n        sansTop25Open={!!props.openFacets.sansTop25}\n        sansTop25Stats={props.facets && props.facets.sansTop25}\n        sonarsourceSecurity={props.query.sonarsourceSecurity}\n        sonarsourceSecurityOpen={!!props.openFacets.sonarsourceSecurity}\n        sonarsourceSecurityStats={props.facets && props.facets.sonarsourceSecurity}\n      />\n      <AvailableSinceFacet\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.availableSince}\n        value={props.query.availableSince}\n      />\n      <TemplateFacet\n        onChange={props.onFilterChange}\n        onToggle={props.onFacetToggle}\n        open={!!props.openFacets.template}\n        value={props.query.template}\n      />\n      {!props.hideProfileFacet && (\n        <>\n          <ProfileFacet\n            activation={props.query.activation}\n            compareToProfile={props.query.compareToProfile}\n            languages={props.query.languages}\n            onChange={props.onFilterChange}\n            onToggle={props.onFacetToggle}\n            open={!!props.openFacets.profile}\n            referencedProfiles={props.referencedProfiles}\n            value={props.query.profile}\n          />\n          <InheritanceFacet\n            disabled={inheritanceDisabled}\n            onChange={props.onFilterChange}\n            onToggle={props.onFacetToggle}\n            open={!!props.openFacets.inheritance}\n            value={props.query.inheritance}\n          />\n          <ActivationSeverityFacet\n            disabled={activationSeverityDisabled}\n            onChange={props.onFilterChange}\n            onToggle={props.onFacetToggle}\n            open={!!props.openFacets.activationSeverities}\n            stats={props.facets && props.facets.activationSeverities}\n            values={props.query.activationSeverities}\n          />\n        </>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { formatMeasure } from '../../helpers/measures';\n\nexport interface PageCounterProps {\n  className?: string;\n  current?: number;\n  label: string;\n  total: number;\n}\n\nexport default function PageCounter({ className, current, label, total }: PageCounterProps) {\n  return (\n    <div className={classNames('display-inline-block', className)}>\n      <strong className=\"little-spacer-right\">\n        {current !== undefined && formatMeasure(current + 1, 'INT') + ' / '}\n        <span className=\"it__page-counter-total\">{formatMeasure(total, 'INT')}</span>\n      </strong>\n      {label}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport { translate } from '../../helpers/l10n';\nimport Tooltip from './Tooltip';\n\ninterface Props {\n  className?: string;\n  tooltip?: string;\n  onClick: () => void;\n}\n\nexport default class ReloadButton extends React.PureComponent<Props> {\n  handleClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.props.onClick();\n  };\n\n  render() {\n    const { tooltip = translate('reload') } = this.props;\n    return (\n      <Tooltip overlay={tooltip}>\n        <a\n          className={classNames('link-no-underline', this.props.className)}\n          href=\"#\"\n          onClick={this.handleClick}>\n          {\n            <svg height=\"24\" viewBox=\"0 0 18 24\" width=\"18\">\n              <path\n                d=\"M16.6454 8.1084c-.3-.5-.9-.7-1.4-.4-.5.3-.7.9-.4 1.4.9 1.6 1.1 3.4.6 5.1-.5 1.7-1.7 3.2-3.2 4-3.3 1.8-7.4.6-9.1-2.7-1.8-3.1-.8-6.9 2.1-8.8v3.3h2v-7h-7v2h3.9c-3.7 2.5-5 7.5-2.8 11.4 1.6 3 4.6 4.6 7.7 4.6 1.4 0 2.8-.3 4.2-1.1 2-1.1 3.5-3 4.2-5.2.6-2.2.3-4.6-.8-6.6z\"\n                fill={colors.secondFontColor}\n              />\n            </svg>\n          }\n        </a>\n      </Tooltip>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Tooltip from '../../components/controls/Tooltip';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\n\nexport interface PageShortcutsTooltipProps {\n  className?: string;\n  leftAndRightLabel?: string;\n  leftLabel?: string;\n  upAndDownLabel?: string;\n  metaModifierLabel?: string;\n}\n\nexport default function PageShortcutsTooltip(props: PageShortcutsTooltipProps) {\n  const { className, leftAndRightLabel, leftLabel, upAndDownLabel, metaModifierLabel } = props;\n  return (\n    <Tooltip\n      overlay={\n        <div className=\"small nowrap\">\n          <div>\n            {upAndDownLabel && (\n              <span>\n                <span className=\"shortcut-button little-spacer-right\">\u2191</span>\n                <span className=\"shortcut-button spacer-right\">\u2193</span>\n                {upAndDownLabel}\n              </span>\n            )}\n            {leftAndRightLabel && (\n              <span className={classNames({ 'big-spacer-left': upAndDownLabel })}>\n                <span className=\"shortcut-button little-spacer-right\">\u2190</span>\n                <span className=\"shortcut-button spacer-right\">\u2192</span>\n                {leftAndRightLabel}\n              </span>\n            )}\n            {leftLabel && (\n              <span className={classNames({ 'big-spacer-left': upAndDownLabel })}>\n                <span className=\"shortcut-button spacer-right\">\u2190</span>\n                {leftLabel}\n              </span>\n            )}\n          </div>\n          {metaModifierLabel && (\n            <div className=\"big-spacer-top big-padded-top bordered-top\">\n              <span className=\"shortcut-button little-spacer-right\">alt</span>\n              <span className=\"little-spacer-right\">+</span>\n              <span className=\"shortcut-button little-spacer-right\">\u2191</span>\n              <span className=\"shortcut-button spacer-right\">\u2193</span>\n              <span className=\"shortcut-button little-spacer-right\">\u2190</span>\n              <span className=\"shortcut-button spacer-right\">\u2192</span>\n              {metaModifierLabel}\n            </div>\n          )}\n        </div>\n      }>\n      <div\n        aria-label={`\n        ${translate('shortcuts.on_page.intro')}\n        ${\n          upAndDownLabel\n            ? translateWithParameters('shortcuts.on_page.up_down_x', upAndDownLabel)\n            : ''\n        }\n        ${\n          leftAndRightLabel\n            ? translateWithParameters('shortcuts.on_page.left_right_x', leftAndRightLabel)\n            : ''\n        }\n        ${leftLabel ? translateWithParameters('shortcuts.on_page.left_x', leftLabel) : ''}\n        ${\n          metaModifierLabel\n            ? translateWithParameters('shortcuts.on_page.meta_x', metaModifierLabel)\n            : ''\n        }\n      `}\n        className={classNames(\n          className,\n          'page-shortcuts-tooltip note text-center display-inline-block'\n        )}>\n        <div>\n          <span className=\"shortcut-button shortcut-button-tiny\">\u2191</span>\n        </div>\n        <div>\n          <span className=\"shortcut-button shortcut-button-tiny\">\u2190</span>\n          <span className=\"shortcut-button shortcut-button-tiny\">\u2193</span>\n          <span className=\"shortcut-button shortcut-button-tiny\">\u2192</span>\n        </div>\n      </div>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport PageCounter from '../../../components/common/PageCounter';\nimport ReloadButton from '../../../components/controls/ReloadButton';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport PageShortcutsTooltip from '../../../components/ui/PageShortcutsTooltip';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface PageActionsProps {\n  loading: boolean;\n  onReload: () => void;\n  paging?: T.Paging;\n  selectedIndex?: number;\n}\n\nexport default function PageActions(props: PageActionsProps) {\n  return (\n    <div className=\"display-flex-center\">\n      <PageShortcutsTooltip\n        className=\"big-spacer-right\"\n        leftAndRightLabel={translate('issues.to_navigate')}\n        upAndDownLabel={translate('coding_rules.to_select_rules')}\n      />\n\n      <DeferredSpinner loading={props.loading}>\n        <ReloadButton onClick={props.onReload} />\n      </DeferredSpinner>\n\n      {props.paging && (\n        <PageCounter\n          className=\"spacer-left\"\n          current={props.selectedIndex}\n          label={translate('coding_rules._rules')}\n          total={props.paging.total}\n        />\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport IssueTypeIcon from '../../components/icons/IssueTypeIcon';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  className?: string;\n  type: T.IssueType | T.RuleType;\n}\n\nexport default function TypeHelper(props: Props) {\n  return (\n    <span className={props.className}>\n      <IssueTypeIcon className=\"little-spacer-right\" query={props.type} />\n      {translate('issue.type', props.type)}\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n/*\n * Latinize string by removing all diacritics\n * From http://stackoverflow.com/questions/990904/javascript-remove-accents-in-strings\n */\nconst defaultDiacriticsRemovalap = [\n  {\n    base: 'A',\n    letters:\n      '\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F'\n  },\n  {\n    base: 'AA',\n    letters: '\\uA732'\n  },\n  {\n    base: 'AE',\n    letters: '\\u00C6\\u01FC\\u01E2'\n  },\n  {\n    base: 'AO',\n    letters: '\\uA734'\n  },\n  {\n    base: 'AU',\n    letters: '\\uA736'\n  },\n  {\n    base: 'AV',\n    letters: '\\uA738\\uA73A'\n  },\n  {\n    base: 'AY',\n    letters: '\\uA73C'\n  },\n  {\n    base: 'B',\n    letters: '\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181'\n  },\n  {\n    base: 'C',\n    letters: '\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E'\n  },\n  {\n    base: 'D',\n    letters: '\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779'\n  },\n  {\n    base: 'DZ',\n    letters: '\\u01F1\\u01C4'\n  },\n  {\n    base: 'Dz',\n    letters: '\\u01F2\\u01C5'\n  },\n  {\n    base: 'E',\n    letters:\n      '\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E'\n  },\n  {\n    base: 'F',\n    letters: '\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B'\n  },\n  {\n    base: 'G',\n    letters:\n      '\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E'\n  },\n  {\n    base: 'H',\n    letters: '\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D'\n  },\n  {\n    base: 'I',\n    letters:\n      '\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197'\n  },\n  {\n    base: 'J',\n    letters: '\\u004A\\u24BF\\uFF2A\\u0134\\u0248'\n  },\n  {\n    base: 'K',\n    letters: '\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2'\n  },\n  {\n    base: 'L',\n    letters:\n      '\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780'\n  },\n  {\n    base: 'LJ',\n    letters: '\\u01C7'\n  },\n  {\n    base: 'Lj',\n    letters: '\\u01C8'\n  },\n  {\n    base: 'M',\n    letters: '\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C'\n  },\n  {\n    base: 'N',\n    letters:\n      '\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4'\n  },\n  {\n    base: 'NJ',\n    letters: '\\u01CA'\n  },\n  {\n    base: 'Nj',\n    letters: '\\u01CB'\n  },\n  {\n    base: 'O',\n    letters:\n      '\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C'\n  },\n  {\n    base: 'OI',\n    letters: '\\u01A2'\n  },\n  {\n    base: 'OO',\n    letters: '\\uA74E'\n  },\n  {\n    base: 'OU',\n    letters: '\\u0222'\n  },\n  {\n    base: 'OE',\n    letters: '\\u008C\\u0152'\n  },\n  {\n    base: 'oe',\n    letters: '\\u009C\\u0153'\n  },\n  {\n    base: 'P',\n    letters: '\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754'\n  },\n  {\n    base: 'Q',\n    letters: '\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A'\n  },\n  {\n    base: 'R',\n    letters:\n      '\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782'\n  },\n  {\n    base: 'S',\n    letters:\n      '\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784'\n  },\n  {\n    base: 'T',\n    letters:\n      '\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786'\n  },\n  {\n    base: 'TZ',\n    letters: '\\uA728'\n  },\n  {\n    base: 'U',\n    letters:\n      '\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244'\n  },\n  {\n    base: 'V',\n    letters: '\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245'\n  },\n  {\n    base: 'VY',\n    letters: '\\uA760'\n  },\n  {\n    base: 'W',\n    letters: '\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72'\n  },\n  {\n    base: 'X',\n    letters: '\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C'\n  },\n  {\n    base: 'Y',\n    letters:\n      '\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE'\n  },\n  {\n    base: 'Z',\n    letters: '\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762'\n  },\n  {\n    base: 'a',\n    letters:\n      '\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250'\n  },\n  {\n    base: 'aa',\n    letters: '\\uA733'\n  },\n  {\n    base: 'ae',\n    letters: '\\u00E6\\u01FD\\u01E3'\n  },\n  {\n    base: 'ao',\n    letters: '\\uA735'\n  },\n  {\n    base: 'au',\n    letters: '\\uA737'\n  },\n  {\n    base: 'av',\n    letters: '\\uA739\\uA73B'\n  },\n  {\n    base: 'ay',\n    letters: '\\uA73D'\n  },\n  {\n    base: 'b',\n    letters: '\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253'\n  },\n  {\n    base: 'c',\n    letters: '\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184'\n  },\n  {\n    base: 'd',\n    letters: '\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A'\n  },\n  {\n    base: 'dz',\n    letters: '\\u01F3\\u01C6'\n  },\n  {\n    base: 'e',\n    letters:\n      '\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD'\n  },\n  {\n    base: 'f',\n    letters: '\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C'\n  },\n  {\n    base: 'g',\n    letters:\n      '\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F'\n  },\n  {\n    base: 'h',\n    letters:\n      '\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265'\n  },\n  {\n    base: 'hv',\n    letters: '\\u0195'\n  },\n  {\n    base: 'i',\n    letters:\n      '\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131'\n  },\n  {\n    base: 'j',\n    letters: '\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249'\n  },\n  {\n    base: 'k',\n    letters: '\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3'\n  },\n  {\n    base: 'l',\n    letters:\n      '\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747'\n  },\n  {\n    base: 'lj',\n    letters: '\\u01C9'\n  },\n  {\n    base: 'm',\n    letters: '\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F'\n  },\n  {\n    base: 'n',\n    letters:\n      '\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5'\n  },\n  {\n    base: 'nj',\n    letters: '\\u01CC'\n  },\n  {\n    base: 'o',\n    letters:\n      '\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275'\n  },\n  {\n    base: 'oi',\n    letters: '\\u01A3'\n  },\n  {\n    base: 'ou',\n    letters: '\\u0223'\n  },\n  {\n    base: 'oo',\n    letters: '\\uA74F'\n  },\n  {\n    base: 'p',\n    letters: '\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755'\n  },\n  {\n    base: 'q',\n    letters: '\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759'\n  },\n  {\n    base: 'r',\n    letters:\n      '\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783'\n  },\n  {\n    base: 's',\n    letters:\n      '\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B'\n  },\n  {\n    base: 't',\n    letters:\n      '\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787'\n  },\n  {\n    base: 'tz',\n    letters: '\\uA729'\n  },\n  {\n    base: 'u',\n    letters:\n      '\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289'\n  },\n  {\n    base: 'v',\n    letters: '\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C'\n  },\n  {\n    base: 'vy',\n    letters: '\\uA761'\n  },\n  {\n    base: 'w',\n    letters: '\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73'\n  },\n  {\n    base: 'x',\n    letters: '\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D'\n  },\n  {\n    base: 'y',\n    letters:\n      '\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF'\n  },\n  {\n    base: 'z',\n    letters: '\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763'\n  }\n];\n\nconst diacriticsMap: T.Dict<string> = {};\ndefaultDiacriticsRemovalap.forEach(defaultDiacritic =>\n  defaultDiacritic.letters.split('').forEach(letter => {\n    diacriticsMap[letter] = defaultDiacritic.base;\n  })\n);\n\n// \"what?\" version ... http://jsperf.com/diacritics/12\nexport function latinize(str: string): string {\n  // eslint-disable-next-line no-control-regex\n  return str.replace(/[^\\u0000-\\u007E]/g, a => diacriticsMap[a] || a);\n}\n\n// Inspired from https://github.com/SonarSource/sonar-enterprise/blob/master/sonar-core/src/main/java/org/sonar/core/util/Slug.java\nexport function slugify(text: string) {\n  return latinize(text.trim().toLowerCase())\n    .replace(/&/g, '-and-') // Replace & with 'and'\n    .replace(/[^\\w-]+/g, '-') // Replace all non-word chars with dash\n    .replace(/\\s+/g, '-') // Replace whitespaces with dash\n    .replace(/[\u00B7/_,:;]/g, '-') // Replace special chars with dash\n    .replace(/--+/g, '-') // Replace multiple dash with single dash\n    .replace(/^-+/, '') // Remove heading dash\n    .replace(/-+$/, ''); // Remove trailing dash\n}\n\nexport function decodeJwt(token: string) {\n  const segments = token.split('.');\n  const base64Url = segments.length > 1 ? segments[1] : segments[0];\n  const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\n  return JSON.parse(window.atob(base64));\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { createRule, updateRule } from '../../../api/rules';\nimport FormattingTips from '../../../components/common/FormattingTips';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport Select from '../../../components/controls/Select';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport TypeHelper from '../../../components/shared/TypeHelper';\nimport { Alert } from '../../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { RULE_STATUSES, RULE_TYPES, SEVERITIES } from '../../../helpers/constants';\nimport { csvEscape } from '../../../helpers/csv';\nimport { translate } from '../../../helpers/l10n';\nimport { sanitizeString } from '../../../helpers/sanitize';\nimport { latinize } from '../../../helpers/strings';\n\ninterface Props {\n  customRule?: T.RuleDetails;\n  onClose: () => void;\n  onDone: (newRuleDetails: T.RuleDetails) => void;\n  templateRule: T.RuleDetails;\n}\n\ninterface State {\n  description: string;\n  key: string;\n  keyModifiedByUser: boolean;\n  name: string;\n  params: T.Dict<string>;\n  reactivating: boolean;\n  severity: string;\n  status: string;\n  submitting: boolean;\n  type: string;\n}\n\nexport default class CustomRuleFormModal extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    const params: T.Dict<string> = {};\n    if (props.customRule && props.customRule.params) {\n      for (const param of props.customRule.params) {\n        params[param.key] = param.defaultValue || '';\n      }\n    }\n    this.state = {\n      description: (props.customRule && props.customRule.mdDesc) || '',\n      key: '',\n      keyModifiedByUser: false,\n      name: (props.customRule && props.customRule.name) || '',\n      params,\n      reactivating: false,\n      severity: (props.customRule && props.customRule.severity) || props.templateRule.severity,\n      status: (props.customRule && props.customRule.status) || props.templateRule.status,\n      submitting: false,\n      type: (props.customRule && props.customRule.type) || props.templateRule.type\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  prepareRequest = () => {\n    const { customRule, templateRule } = this.props;\n    const params = Object.keys(this.state.params)\n      .map(key => `${key}=${csvEscape(this.state.params[key])}`)\n      .join(';');\n    const ruleData = {\n      markdown_description: this.state.description,\n      name: this.state.name,\n      params,\n      severity: this.state.severity,\n      status: this.state.status\n    };\n    return customRule\n      ? updateRule({ ...ruleData, key: customRule.key })\n      : createRule({\n          ...ruleData,\n          custom_key: this.state.key,\n          prevent_reactivation: !this.state.reactivating,\n          template_key: templateRule.key,\n          type: this.state.type\n        });\n  };\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ submitting: true });\n    this.prepareRequest().then(\n      newRuleDetails => {\n        if (this.mounted) {\n          this.setState({ submitting: false });\n          this.props.onDone(newRuleDetails);\n        }\n      },\n      (response: Response) => {\n        if (this.mounted) {\n          this.setState({ reactivating: response.status === 409, submitting: false });\n        }\n      }\n    );\n  };\n\n  handleNameChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n    const { value: name } = event.currentTarget;\n    this.setState(state => ({\n      name,\n      key: state.keyModifiedByUser ? state.key : latinize(name).replace(/[^A-Za-z0-9]/g, '_')\n    }));\n  };\n\n  handleKeyChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ key: event.currentTarget.value, keyModifiedByUser: true });\n\n  handleDescriptionChange = (event: React.SyntheticEvent<HTMLTextAreaElement>) =>\n    this.setState({ description: event.currentTarget.value });\n\n  handleTypeChange = ({ value }: { value: string }) => this.setState({ type: value });\n\n  handleSeverityChange = ({ value }: { value: string }) => this.setState({ severity: value });\n\n  handleStatusChange = ({ value }: { value: string }) => this.setState({ status: value });\n\n  handleParameterChange = (event: React.SyntheticEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n    const { name, value } = event.currentTarget;\n    this.setState((state: State) => ({ params: { ...state.params, [name]: value } }));\n  };\n\n  renderNameField = () => (\n    <div className=\"modal-field\">\n      <label htmlFor=\"coding-rules-custom-rule-creation-name\">\n        {translate('name')} <MandatoryFieldMarker />\n      </label>\n      <input\n        autoFocus={true}\n        disabled={this.state.submitting}\n        id=\"coding-rules-custom-rule-creation-name\"\n        onChange={this.handleNameChange}\n        required={true}\n        type=\"text\"\n        value={this.state.name}\n      />\n    </div>\n  );\n\n  renderKeyField = () => (\n    <div className=\"modal-field\">\n      <label htmlFor=\"coding-rules-custom-rule-creation-key\">\n        {translate('key')} {!this.props.customRule && <MandatoryFieldMarker />}\n      </label>\n\n      {this.props.customRule ? (\n        <span className=\"coding-rules-detail-custom-rule-key\" title={this.props.customRule.key}>\n          {this.props.customRule.key}\n        </span>\n      ) : (\n        <input\n          disabled={this.state.submitting}\n          id=\"coding-rules-custom-rule-creation-key\"\n          onChange={this.handleKeyChange}\n          required={true}\n          type=\"text\"\n          value={this.state.key}\n        />\n      )}\n    </div>\n  );\n\n  renderDescriptionField = () => (\n    <div className=\"modal-field\">\n      <label htmlFor=\"coding-rules-custom-rule-creation-html-description\">\n        {translate('description')}\n        <MandatoryFieldMarker />\n      </label>\n      <textarea\n        disabled={this.state.submitting}\n        id=\"coding-rules-custom-rule-creation-html-description\"\n        onChange={this.handleDescriptionChange}\n        required={true}\n        rows={5}\n        value={this.state.description}\n      />\n      <FormattingTips className=\"modal-field-descriptor text-right\" />\n    </div>\n  );\n\n  renderTypeOption = ({ value }: { value: T.RuleType }) => {\n    return <TypeHelper type={value} />;\n  };\n\n  renderTypeField = () => (\n    <div className=\"modal-field flex-1 spacer-right\">\n      <label htmlFor=\"coding-rules-custom-rule-type\">{translate('type')}</label>\n      <Select\n        clearable={false}\n        disabled={this.state.submitting}\n        id=\"coding-rules-custom-rule-type\"\n        onChange={this.handleTypeChange}\n        optionRenderer={this.renderTypeOption}\n        options={RULE_TYPES.map(type => ({\n          label: translate('issue.type', type),\n          value: type\n        }))}\n        searchable={false}\n        value={this.state.type}\n        valueRenderer={this.renderTypeOption}\n      />\n    </div>\n  );\n\n  renderSeverityOption = ({ value }: { value: string }) => <SeverityHelper severity={value} />;\n\n  renderSeverityField = () => (\n    <div className=\"modal-field flex-1 spacer-right\">\n      <label htmlFor=\"coding-rules-custom-rule-severity\">{translate('severity')}</label>\n      <Select\n        clearable={false}\n        disabled={this.state.submitting}\n        id=\"coding-rules-custom-rule-severity\"\n        onChange={this.handleSeverityChange}\n        optionRenderer={this.renderSeverityOption}\n        options={SEVERITIES.map(severity => ({\n          label: translate('severity', severity),\n          value: severity\n        }))}\n        searchable={false}\n        value={this.state.severity}\n        valueRenderer={this.renderSeverityOption}\n      />\n    </div>\n  );\n\n  renderStatusField = () => (\n    <div className=\"modal-field flex-1\">\n      <label htmlFor=\"coding-rules-custom-rule-status\">\n        {translate('coding_rules.filters.status')}\n      </label>\n      <Select\n        clearable={false}\n        disabled={this.state.submitting}\n        id=\"coding-rules-custom-rule-status\"\n        onChange={this.handleStatusChange}\n        options={RULE_STATUSES.map(status => ({\n          label: translate('rules.status', status),\n          value: status\n        }))}\n        searchable={false}\n        value={this.state.status}\n      />\n    </div>\n  );\n\n  renderParameterField = (param: T.RuleParameter) => (\n    <div className=\"modal-field\" key={param.key}>\n      <label className=\"capitalize\" htmlFor={param.key}>\n        {param.key}\n      </label>\n\n      {param.type === 'TEXT' ? (\n        <textarea\n          disabled={this.state.submitting}\n          id={param.key}\n          name={param.key}\n          onChange={this.handleParameterChange}\n          placeholder={param.defaultValue}\n          rows={3}\n          value={this.state.params[param.key] || ''}\n        />\n      ) : (\n        <input\n          disabled={this.state.submitting}\n          id={param.key}\n          name={param.key}\n          onChange={this.handleParameterChange}\n          placeholder={param.defaultValue}\n          type=\"text\"\n          value={this.state.params[param.key] || ''}\n        />\n      )}\n      {param.htmlDesc !== undefined && (\n        <div\n          className=\"modal-field-description\"\n          // eslint-disable-next-line react/no-danger\n          dangerouslySetInnerHTML={{ __html: sanitizeString(param.htmlDesc) }}\n        />\n      )}\n    </div>\n  );\n\n  render() {\n    const { customRule, templateRule } = this.props;\n    const { reactivating, submitting } = this.state;\n    const { params = [] } = templateRule;\n    const header = customRule\n      ? translate('coding_rules.update_custom_rule')\n      : translate('coding_rules.create_custom_rule');\n    let submit = this.props.customRule ? translate('save') : translate('create');\n    if (this.state.reactivating) {\n      submit = translate('coding_rules.reactivate');\n    }\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <form onSubmit={this.handleFormSubmit}>\n          <div className=\"modal-head\">\n            <h2>{header}</h2>\n          </div>\n\n          <div className=\"modal-body modal-container\">\n            {reactivating && (\n              <Alert variant=\"warning\">{translate('coding_rules.reactivate.help')}</Alert>\n            )}\n\n            <MandatoryFieldsExplanation className=\"spacer-bottom\" />\n\n            {this.renderNameField()}\n            {this.renderKeyField()}\n            <div className=\"display-flex-space-between\">\n              {/* do not allow to change the type of existing rule */}\n              {!customRule && this.renderTypeField()}\n              {this.renderSeverityField()}\n              {this.renderStatusField()}\n            </div>\n            {this.renderDescriptionField()}\n            {params.map(this.renderParameterField)}\n          </div>\n\n          <div className=\"modal-foot\">\n            {submitting && <i className=\"spinner spacer-right\" />}\n            <SubmitButton disabled={this.state.submitting}>{submit}</SubmitButton>\n            <ResetButtonLink\n              disabled={submitting}\n              id=\"coding-rules-custom-rule-creation-cancel\"\n              onClick={this.props.onClose}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </div>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CustomRuleFormModal from './CustomRuleFormModal';\n\ninterface Props {\n  children: (props: { onClick: () => void }) => React.ReactNode;\n  customRule?: T.RuleDetails;\n  onDone: (newRuleDetails: T.RuleDetails) => void;\n  templateRule: T.RuleDetails;\n}\n\ninterface State {\n  modal: boolean;\n}\n\nexport default class CustomRuleButton extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { modal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleClick = () => {\n    this.setState({ modal: true });\n  };\n\n  handleModalClose = () => {\n    if (this.mounted) {\n      this.setState({ modal: false });\n    }\n  };\n\n  handleDone = (newRuleDetails: T.RuleDetails) => {\n    this.handleModalClose();\n    this.props.onDone(newRuleDetails);\n  };\n\n  render() {\n    return (\n      <>\n        {this.props.children({ onClick: this.handleClick })}\n        {this.state.modal && (\n          <CustomRuleFormModal\n            customRule={this.props.customRule}\n            onClose={this.handleModalClose}\n            onDone={this.handleDone}\n            templateRule={this.props.templateRule}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { deleteRule, searchRules } from '../../../api/rules';\nimport { Button } from '../../../components/controls/buttons';\nimport ConfirmButton from '../../../components/controls/ConfirmButton';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getRuleUrl } from '../../../helpers/urls';\nimport CustomRuleButton from './CustomRuleButton';\n\ninterface Props {\n  canChange?: boolean;\n  ruleDetails: T.RuleDetails;\n}\n\ninterface State {\n  loading: boolean;\n  rules?: T.Rule[];\n}\n\nexport default class RuleDetailsCustomRules extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchRules();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.ruleDetails.key !== this.props.ruleDetails.key) {\n      this.fetchRules();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchRules = () => {\n    this.setState({ loading: true });\n    searchRules({\n      f: 'name,severity,params',\n      template_key: this.props.ruleDetails.key\n    }).then(\n      ({ rules }) => {\n        if (this.mounted) {\n          this.setState({ rules, loading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleRuleCreate = (newRuleDetails: T.RuleDetails) => {\n    if (this.mounted) {\n      this.setState(({ rules = [] }: State) => ({\n        rules: [...rules, newRuleDetails]\n      }));\n    }\n  };\n\n  handleRuleDelete = (ruleKey: string) => {\n    return deleteRule({ key: ruleKey }).then(() => {\n      if (this.mounted) {\n        this.setState(({ rules = [] }) => ({\n          rules: rules.filter(rule => rule.key !== ruleKey)\n        }));\n      }\n    });\n  };\n\n  renderRule = (rule: T.Rule) => (\n    <tr data-rule={rule.key} key={rule.key}>\n      <td className=\"coding-rules-detail-list-name\">\n        <Link to={getRuleUrl(rule.key)}>{rule.name}</Link>\n      </td>\n\n      <td className=\"coding-rules-detail-list-severity\">\n        <SeverityHelper className=\"display-flex-center\" severity={rule.severity} />\n      </td>\n\n      <td className=\"coding-rules-detail-list-parameters\">\n        {rule.params &&\n          rule.params\n            .filter(param => param.defaultValue)\n            .map(param => (\n              <div className=\"coding-rules-detail-list-parameter\" key={param.key}>\n                <span className=\"key\">{param.key}</span>\n                <span className=\"sep\">:&nbsp;</span>\n                <span className=\"value\" title={param.defaultValue}>\n                  {param.defaultValue}\n                </span>\n              </div>\n            ))}\n      </td>\n\n      {this.props.canChange && (\n        <td className=\"coding-rules-detail-list-actions\">\n          <ConfirmButton\n            confirmButtonText={translate('delete')}\n            confirmData={rule.key}\n            isDestructive={true}\n            modalBody={translateWithParameters('coding_rules.delete.custom.confirm', rule.name)}\n            modalHeader={translate('coding_rules.delete_rule')}\n            onConfirm={this.handleRuleDelete}>\n            {({ onClick }) => (\n              <Button className=\"button-red js-delete-custom-rule\" onClick={onClick}>\n                {translate('delete')}\n              </Button>\n            )}\n          </ConfirmButton>\n        </td>\n      )}\n    </tr>\n  );\n\n  render() {\n    const { loading, rules = [] } = this.state;\n\n    return (\n      <div className=\"js-rule-custom-rules coding-rule-section\">\n        <div className=\"coding-rules-detail-custom-rules-section\">\n          <div className=\"coding-rule-section-separator\" />\n\n          <h3 className=\"coding-rules-detail-title\">{translate('coding_rules.custom_rules')}</h3>\n\n          {this.props.canChange && (\n            <CustomRuleButton onDone={this.handleRuleCreate} templateRule={this.props.ruleDetails}>\n              {({ onClick }) => (\n                <Button className=\"js-create-custom-rule spacer-left\" onClick={onClick}>\n                  {translate('coding_rules.create')}\n                </Button>\n              )}\n            </CustomRuleButton>\n          )}\n\n          <DeferredSpinner className=\"spacer-left\" loading={loading}>\n            {rules.length > 0 && (\n              <table className=\"coding-rules-detail-list\" id=\"coding-rules-detail-custom-rules\">\n                <tbody>{sortBy(rules, rule => rule.name).map(this.renderRule)}</tbody>\n              </table>\n            )}\n          </DeferredSpinner>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onCancel: () => void;\n  onSubmit: () => void;\n}\n\nexport default function RemoveExtendedDescriptionModal({ onCancel, onSubmit }: Props) {\n  const header = translate('coding_rules.remove_extended_description');\n  return (\n    <SimpleModal header={header} onClose={onCancel} onSubmit={onSubmit}>\n      {({ onCloseClick, onFormSubmit, submitting }) => (\n        <form onSubmit={onFormSubmit}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n          </header>\n\n          <div className=\"modal-body\">\n            {translate('coding_rules.remove_extended_description.confirm')}\n          </div>\n\n          <footer className=\"modal-foot\">\n            {submitting && <i className=\"spinner spacer-right\" />}\n            <SubmitButton className=\"button-red\" disabled={submitting}>\n              {translate('remove')}\n            </SubmitButton>\n            <ResetButtonLink onClick={onCloseClick}>{translate('cancel')}</ResetButtonLink>\n          </footer>\n        </form>\n      )}\n    </SimpleModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { updateRule } from '../../../api/rules';\nimport FormattingTips from '../../../components/common/FormattingTips';\nimport { Button, ResetButtonLink } from '../../../components/controls/buttons';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { sanitizeString } from '../../../helpers/sanitize';\nimport RemoveExtendedDescriptionModal from './RemoveExtendedDescriptionModal';\n\ninterface Props {\n  canWrite: boolean | undefined;\n  onChange: (newRuleDetails: T.RuleDetails) => void;\n  ruleDetails: T.RuleDetails;\n}\n\ninterface State {\n  description: string;\n  descriptionForm: boolean;\n  removeDescriptionModal: boolean;\n  submitting: boolean;\n}\n\nexport default class RuleDetailsDescription extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    description: '',\n    descriptionForm: false,\n    submitting: false,\n    removeDescriptionModal: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleDescriptionChange = (event: React.SyntheticEvent<HTMLTextAreaElement>) =>\n    this.setState({ description: event.currentTarget.value });\n\n  handleCancelClick = () => {\n    this.setState({ descriptionForm: false });\n  };\n\n  handleSaveClick = () => {\n    this.updateDescription(this.state.description);\n  };\n\n  handleRemoveDescriptionClick = () => {\n    this.setState({ removeDescriptionModal: true });\n  };\n\n  handleCancelRemoving = () => this.setState({ removeDescriptionModal: false });\n\n  handleConfirmRemoving = () => {\n    this.setState({ removeDescriptionModal: false });\n    this.updateDescription('');\n  };\n\n  updateDescription = (text: string) => {\n    this.setState({ submitting: true });\n\n    updateRule({\n      key: this.props.ruleDetails.key,\n      markdown_note: text\n    }).then(\n      ruleDetails => {\n        this.props.onChange(ruleDetails);\n        if (this.mounted) {\n          this.setState({ submitting: false, descriptionForm: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ submitting: false });\n        }\n      }\n    );\n  };\n\n  handleExtendDescriptionClick = () => {\n    this.setState({\n      // set description` to the current `mdNote` each time the form is open\n      description: this.props.ruleDetails.mdNote || '',\n      descriptionForm: true\n    });\n  };\n\n  renderDescription = () => (\n    <div id=\"coding-rules-detail-description-extra\">\n      {this.props.ruleDetails.htmlNote !== undefined && (\n        <div\n          className=\"rule-desc spacer-bottom markdown\"\n          // eslint-disable-next-line react/no-danger\n          dangerouslySetInnerHTML={{ __html: sanitizeString(this.props.ruleDetails.htmlNote) }}\n        />\n      )}\n      {this.props.canWrite && (\n        <Button\n          id=\"coding-rules-detail-extend-description\"\n          onClick={this.handleExtendDescriptionClick}>\n          {translate('coding_rules.extend_description')}\n        </Button>\n      )}\n    </div>\n  );\n\n  renderForm = () => (\n    <div className=\"coding-rules-detail-extend-description-form\">\n      <table className=\"width-100\">\n        <tbody>\n          <tr>\n            <td colSpan={2}>\n              <textarea\n                autoFocus={true}\n                className=\"width-100 little-spacer-bottom\"\n                id=\"coding-rules-detail-extend-description-text\"\n                onChange={this.handleDescriptionChange}\n                rows={4}\n                value={this.state.description}\n              />\n            </td>\n          </tr>\n          <tr>\n            <td>\n              <Button\n                disabled={this.state.submitting}\n                id=\"coding-rules-detail-extend-description-submit\"\n                onClick={this.handleSaveClick}>\n                {translate('save')}\n              </Button>\n              {this.props.ruleDetails.mdNote !== undefined && (\n                <>\n                  <Button\n                    className=\"button-red spacer-left\"\n                    disabled={this.state.submitting}\n                    id=\"coding-rules-detail-extend-description-remove\"\n                    onClick={this.handleRemoveDescriptionClick}>\n                    {translate('remove')}\n                  </Button>\n                  {this.state.removeDescriptionModal && (\n                    <RemoveExtendedDescriptionModal\n                      onCancel={this.handleCancelRemoving}\n                      onSubmit={this.handleConfirmRemoving}\n                    />\n                  )}\n                </>\n              )}\n              <ResetButtonLink\n                className=\"spacer-left\"\n                disabled={this.state.submitting}\n                id=\"coding-rules-detail-extend-description-cancel\"\n                onClick={this.handleCancelClick}>\n                {translate('cancel')}\n              </ResetButtonLink>\n              {this.state.submitting && <i className=\"spinner spacer-left\" />}\n            </td>\n            <td className=\"text-right\">\n              <FormattingTips />\n            </td>\n          </tr>\n        </tbody>\n      </table>\n    </div>\n  );\n\n  render() {\n    const { ruleDetails } = this.props;\n    const hasDescription = !ruleDetails.isExternal || ruleDetails.type !== 'UNKNOWN';\n\n    return (\n      <div className=\"js-rule-description\">\n        {hasDescription && ruleDetails.htmlDesc !== undefined ? (\n          <div\n            className=\"coding-rules-detail-description rule-desc markdown\"\n            // eslint-disable-next-line react/no-danger\n            dangerouslySetInnerHTML={{ __html: sanitizeString(ruleDetails.htmlDesc) }}\n          />\n        ) : (\n          <div className=\"coding-rules-detail-description rule-desc markdown\">\n            {translateWithParameters('issue.external_issue_description', ruleDetails.name)}\n          </div>\n        )}\n\n        {!ruleDetails.templateKey && (\n          <div className=\"coding-rules-detail-description coding-rules-detail-description-extra\">\n            {!this.state.descriptionForm && this.renderDescription()}\n            {this.state.descriptionForm && this.props.canWrite && this.renderForm()}\n          </div>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getAppState, Store } from '../../store/rootReducer';\nimport { getWrappedDisplayName } from './utils';\n\nexport function withAppState<P>(\n  WrappedComponent: React.ComponentType<P & { appState: Partial<T.AppState> }>\n) {\n  class Wrapper extends React.Component<P & { appState: T.AppState }> {\n    static displayName = getWrappedDisplayName(WrappedComponent, 'withAppState');\n\n    render() {\n      return <WrappedComponent {...this.props} />;\n    }\n  }\n\n  function mapStateToProps(state: Store) {\n    return { appState: getAppState(state) };\n  }\n\n  return connect(mapStateToProps)(Wrapper);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { getFacet } from '../../../api/issues';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { withAppState } from '../../../components/hoc/withAppState';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { getIssuesUrl } from '../../../helpers/urls';\n\ninterface Props {\n  appState: Pick<T.AppState, 'branchesEnabled'>;\n  ruleDetails: Pick<T.RuleDetails, 'key' | 'type'>;\n}\n\ninterface Project {\n  count: number;\n  key: string;\n  name: string;\n}\n\ninterface State {\n  loading: boolean;\n  projects?: Project[];\n  total?: number;\n}\n\nexport class RuleDetailsIssues extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchIssues();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.ruleDetails !== this.props.ruleDetails) {\n      this.fetchIssues();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchIssues = () => {\n    const {\n      ruleDetails: { key }\n    } = this.props;\n\n    this.setState({ loading: true });\n    getFacet(\n      {\n        resolved: 'false',\n        rules: key\n      },\n      'projects'\n    ).then(\n      ({ facet, response }) => {\n        if (this.mounted) {\n          const { components = [], paging } = response;\n          const projects = [];\n          for (const item of facet) {\n            const project = components.find(component => component.key === item.val);\n            if (project) {\n              projects.push({ count: item.count, key: project.key, name: project.name });\n            }\n          }\n          this.setState({ projects, loading: false, total: paging.total });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  renderTotal = () => {\n    const {\n      ruleDetails: { key }\n    } = this.props;\n\n    const { total } = this.state;\n    if (total === undefined) {\n      return null;\n    }\n    const path = getIssuesUrl({ resolved: 'false', rules: key });\n\n    const totalItem = (\n      <span className=\"little-spacer-left\">\n        {'('}\n        <Link to={path}>{total}</Link>\n        {')'}\n      </span>\n    );\n\n    if (!this.props.appState.branchesEnabled) {\n      return totalItem;\n    }\n\n    return (\n      <Tooltip overlay={translate('coding_rules.issues.only_main_branches')}>{totalItem}</Tooltip>\n    );\n  };\n\n  renderProject = (project: Project) => {\n    const {\n      ruleDetails: { key }\n    } = this.props;\n\n    const path = getIssuesUrl({ resolved: 'false', rules: key, projects: project.key });\n    return (\n      <tr key={project.key}>\n        <td className=\"coding-rules-detail-list-name\">{project.name}</td>\n        <td className=\"coding-rules-detail-list-parameters\">\n          <Link to={path}>{formatMeasure(project.count, 'INT')}</Link>\n        </td>\n      </tr>\n    );\n  };\n\n  render() {\n    const { loading, projects = [] } = this.state;\n\n    return (\n      <div className=\"js-rule-issues coding-rule-section\">\n        <div className=\"coding-rule-section-separator\" />\n\n        <DeferredSpinner loading={loading}>\n          <h3 className=\"coding-rules-detail-title\">\n            {translate('coding_rules.issues')}\n            {this.renderTotal()}\n          </h3>\n\n          {projects.length > 0 && (\n            <table className=\"coding-rules-detail-list coding-rules-most-violated-projects\">\n              <tbody>\n                <tr>\n                  <td className=\"coding-rules-detail-list-name\" colSpan={2}>\n                    {translate('coding_rules.most_violating_projects')}\n                  </td>\n                </tr>\n                {projects.map(this.renderProject)}\n              </tbody>\n            </table>\n          )}\n        </DeferredSpinner>\n      </div>\n    );\n  }\n}\n\nexport default withAppState(RuleDetailsIssues);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { difference, uniq, without } from 'lodash';\nimport * as React from 'react';\nimport { getRuleTags } from '../../../api/rules';\nimport TagsSelector from '../../../components/tags/TagsSelector';\n\nexport interface Props {\n  setTags: (tags: string[]) => void;\n  sysTags: string[];\n  tags: string[];\n}\n\ninterface State {\n  searchResult: string[];\n}\n\nconst LIST_SIZE = 10;\n\nexport default class RuleDetailsTagsPopup extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { searchResult: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  onSearch = (query: string) => {\n    return getRuleTags({\n      q: query,\n      ps: Math.min(this.props.tags.length + LIST_SIZE, 100)\n    }).then(\n      tags => {\n        if (this.mounted) {\n          // systems tags can not be unset, don't display them in the results\n          this.setState({ searchResult: without(tags, ...this.props.sysTags) });\n        }\n      },\n      () => {}\n    );\n  };\n\n  onSelect = (tag: string) => {\n    this.props.setTags(uniq([...this.props.tags, tag]));\n  };\n\n  onUnselect = (tag: string) => {\n    this.props.setTags(without(this.props.tags, tag));\n  };\n\n  render() {\n    const availableTags = difference(this.state.searchResult, this.props.tags);\n    return (\n      <TagsSelector\n        listSize={LIST_SIZE}\n        onSearch={this.onSearch}\n        onSelect={this.onSelect}\n        onUnselect={this.onUnselect}\n        selectedTags={this.props.tags}\n        tags={availableTags}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Dropdown from '../../../components/controls/Dropdown';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport FilterIcon from '../../../components/icons/FilterIcon';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport TagsIcon from '../../../components/icons/TagsIcon';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport { translate } from '../../../helpers/l10n';\nimport { Query } from '../query';\n\ninterface Props {\n  onFilterChange: (changes: Partial<Query>) => void;\n  rule: T.Rule;\n}\n\nexport default class SimilarRulesFilter extends React.PureComponent<Props> {\n  handleLanguageClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    if (this.props.rule.lang) {\n      this.props.onFilterChange({ languages: [this.props.rule.lang] });\n    }\n  };\n\n  handleTypeClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.props.onFilterChange({ types: [this.props.rule.type] });\n  };\n\n  handleSeverityClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    if (this.props.rule.severity) {\n      this.props.onFilterChange({ severities: [this.props.rule.severity] });\n    }\n  };\n\n  handleTagClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    const { tag } = event.currentTarget.dataset;\n    if (tag) {\n      this.props.onFilterChange({ tags: [tag] });\n    }\n  };\n\n  render() {\n    const { rule } = this.props;\n    const { tags = [], sysTags = [], severity } = rule;\n    const allTags = [...tags, ...sysTags];\n\n    return (\n      <Dropdown\n        className=\"display-inline-block\"\n        overlay={\n          <>\n            <ul className=\"menu\">\n              <li className=\"menu-header\">{translate('coding_rules.filter_similar_rules')}</li>\n              <li>\n                <a\n                  data-test=\"coding-rules__similar-language\"\n                  href=\"#\"\n                  onClick={this.handleLanguageClick}>\n                  {rule.langName}\n                </a>\n              </li>\n\n              <li>\n                <a\n                  className=\"display-flex-center\"\n                  data-test=\"coding-rules__similar-type\"\n                  href=\"#\"\n                  onClick={this.handleTypeClick}>\n                  <IssueTypeIcon query={rule.type} />\n                  <span className=\"little-spacer-left\">{translate('issue.type', rule.type)}</span>\n                </a>\n              </li>\n\n              {severity && (\n                <li>\n                  <a\n                    data-test=\"coding-rules__similar-severity\"\n                    href=\"#\"\n                    onClick={this.handleSeverityClick}>\n                    <SeverityHelper className=\"display-flex-center\" severity={rule.severity} />\n                  </a>\n                </li>\n              )}\n\n              {allTags.length > 0 && <li className=\"divider\" />}\n              {allTags.map(tag => (\n                <li key={tag}>\n                  <a\n                    data-tag={tag}\n                    data-test=\"coding-rules__similar-tag\"\n                    href=\"#\"\n                    onClick={this.handleTagClick}>\n                    <TagsIcon className=\"icon-half-transparent little-spacer-right text-middle\" />\n                    <span className=\"text-middle\">{tag}</span>\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </>\n        }>\n        <a\n          className=\"js-rule-filter link-no-underline spacer-left dropdown-toggle\"\n          href=\"#\"\n          title={translate('coding_rules.filter_similar_rules')}>\n          <FilterIcon className=\"icon-half-transparent\" />\n          <DropdownIcon className=\"icon-half-transparent\" />\n        </a>\n      </Dropdown>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Dropdown from '../../../components/controls/Dropdown';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport LinkIcon from '../../../components/icons/LinkIcon';\nimport DateFormatter from '../../../components/intl/DateFormatter';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport TagsList from '../../../components/tags/TagsList';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getRuleUrl } from '../../../helpers/urls';\nimport { Query } from '../query';\nimport RuleDetailsTagsPopup from './RuleDetailsTagsPopup';\nimport SimilarRulesFilter from './SimilarRulesFilter';\n\ninterface Props {\n  canWrite: boolean | undefined;\n  hideSimilarRulesFilter?: boolean;\n  onFilterChange: (changes: Partial<Query>) => void;\n  onTagsChange: (tags: string[]) => void;\n  referencedRepositories: T.Dict<{ key: string; language: string; name: string }>;\n  ruleDetails: T.RuleDetails;\n}\n\nconst EXTERNAL_RULE_REPO_PREFIX = 'external_';\n\nexport default class RuleDetailsMeta extends React.PureComponent<Props> {\n  renderType = () => {\n    const { ruleDetails } = this.props;\n    return (\n      <Tooltip overlay={translate('coding_rules.type.tooltip', ruleDetails.type)}>\n        <li className=\"coding-rules-detail-property\" data-meta=\"type\">\n          <IssueTypeIcon className=\"little-spacer-right\" query={ruleDetails.type} />\n          {translate('issue.type', ruleDetails.type)}\n        </li>\n      </Tooltip>\n    );\n  };\n\n  renderSeverity = () => (\n    <Tooltip overlay={translate('default_severity')}>\n      <li className=\"coding-rules-detail-property\" data-meta=\"severity\">\n        <SeverityHelper\n          className=\"display-inline-flex-center\"\n          severity={this.props.ruleDetails.severity}\n        />\n      </li>\n    </Tooltip>\n  );\n\n  renderStatus = () => {\n    const { ruleDetails } = this.props;\n    if (ruleDetails.status === 'READY') {\n      return null;\n    }\n    return (\n      <Tooltip overlay={translate('status')}>\n        <li className=\"coding-rules-detail-property\" data-meta=\"status\">\n          <span className=\"badge badge-error\">{translate('rules.status', ruleDetails.status)}</span>\n        </li>\n      </Tooltip>\n    );\n  };\n\n  renderTags = () => {\n    const { canWrite, ruleDetails } = this.props;\n    const { sysTags = [], tags = [] } = ruleDetails;\n    const allTags = [...sysTags, ...tags];\n\n    return (\n      <li className=\"coding-rules-detail-property\" data-meta=\"tags\">\n        {this.props.canWrite ? (\n          <Dropdown\n            closeOnClick={false}\n            closeOnClickOutside={true}\n            overlay={\n              <RuleDetailsTagsPopup\n                setTags={this.props.onTagsChange}\n                sysTags={sysTags}\n                tags={tags}\n              />\n            }\n            overlayPlacement={PopupPlacement.BottomLeft}>\n            <ButtonLink>\n              <TagsList\n                allowUpdate={canWrite}\n                tags={allTags.length > 0 ? allTags : [translate('coding_rules.no_tags')]}\n              />\n            </ButtonLink>\n          </Dropdown>\n        ) : (\n          <TagsList\n            allowUpdate={canWrite}\n            className=\"display-flex-center\"\n            tags={allTags.length > 0 ? allTags : [translate('coding_rules.no_tags')]}\n          />\n        )}\n      </li>\n    );\n  };\n\n  renderCreationDate = () => (\n    <li className=\"coding-rules-detail-property\" data-meta=\"available-since\">\n      <span className=\"little-spacer-right\">{translate('coding_rules.available_since')}</span>\n      <DateFormatter date={this.props.ruleDetails.createdAt} />\n    </li>\n  );\n\n  renderRepository = () => {\n    const { referencedRepositories, ruleDetails } = this.props;\n    const repository = referencedRepositories[ruleDetails.repo];\n    if (!repository) {\n      return null;\n    }\n    return (\n      <Tooltip overlay={translate('coding_rules.repository_language')}>\n        <li className=\"coding-rules-detail-property\" data-meta=\"repository\">\n          {repository.name} ({ruleDetails.langName})\n        </li>\n      </Tooltip>\n    );\n  };\n\n  renderTemplate = () => {\n    if (!this.props.ruleDetails.isTemplate) {\n      return null;\n    }\n    return (\n      <Tooltip overlay={translate('coding_rules.rule_template.title')}>\n        <li className=\"coding-rules-detail-property\">{translate('coding_rules.rule_template')}</li>\n      </Tooltip>\n    );\n  };\n\n  renderParentTemplate = () => {\n    const { ruleDetails } = this.props;\n    if (!ruleDetails.templateKey) {\n      return null;\n    }\n    return (\n      <li className=\"coding-rules-detail-property\">\n        {translate('coding_rules.custom_rule')}\n        {' ('}\n        <Link to={getRuleUrl(ruleDetails.templateKey)}>\n          {translate('coding_rules.show_template')}\n        </Link>\n        {')'}\n        <HelpTooltip\n          className=\"little-spacer-left\"\n          overlay={translate('coding_rules.custom_rule.help')}\n        />\n      </li>\n    );\n  };\n\n  renderRemediation = () => {\n    const { ruleDetails } = this.props;\n    if (!ruleDetails.debtRemFnType) {\n      return null;\n    }\n    return (\n      <Tooltip overlay={translate('coding_rules.remediation_function')}>\n        <li className=\"coding-rules-detail-property\" data-meta=\"remediation-function\">\n          {translate('coding_rules.remediation_function', ruleDetails.debtRemFnType)}\n          {':'}\n          {ruleDetails.debtRemFnOffset !== undefined && ` ${ruleDetails.debtRemFnOffset}`}\n          {ruleDetails.debtRemFnCoeff !== undefined && ` +${ruleDetails.debtRemFnCoeff}`}\n          {ruleDetails.effortToFixDescription !== undefined &&\n            ` ${ruleDetails.effortToFixDescription}`}\n        </li>\n      </Tooltip>\n    );\n  };\n\n  renderExternalBadge = () => {\n    const { ruleDetails } = this.props;\n    if (!ruleDetails.repo) {\n      return null;\n    }\n    const engine = ruleDetails.repo.replace(new RegExp(`^${EXTERNAL_RULE_REPO_PREFIX}`), '');\n    if (!engine) {\n      return null;\n    }\n    return (\n      <Tooltip overlay={translateWithParameters('coding_rules.external_rule.engine', engine)}>\n        <li className=\"coding-rules-detail-property\">\n          <div className=\"badge spacer-left text-text-top\">{engine}</div>\n        </li>\n      </Tooltip>\n    );\n  };\n\n  renderKey() {\n    const EXTERNAL_PREFIX = 'external_';\n    const { ruleDetails } = this.props;\n    const displayedKey = ruleDetails.key.startsWith(EXTERNAL_PREFIX)\n      ? ruleDetails.key.substr(EXTERNAL_PREFIX.length)\n      : ruleDetails.key;\n    return <span className=\"note text-middle\">{displayedKey}</span>;\n  }\n\n  render() {\n    const { ruleDetails } = this.props;\n    const hasTypeData = !ruleDetails.isExternal || ruleDetails.type !== 'UNKNOWN';\n    return (\n      <div className=\"js-rule-meta\">\n        <header className=\"page-header\">\n          <div className=\"pull-right\">\n            {this.renderKey()}\n            {!ruleDetails.isExternal && (\n              <Link\n                className=\"coding-rules-detail-permalink link-no-underline spacer-left text-middle\"\n                title={translate('permalink')}\n                to={getRuleUrl(ruleDetails.key)}>\n                <LinkIcon />\n              </Link>\n            )}\n            {!this.props.hideSimilarRulesFilter && (\n              <SimilarRulesFilter onFilterChange={this.props.onFilterChange} rule={ruleDetails} />\n            )}\n          </div>\n          <h3 className=\"page-title coding-rules-detail-header\">\n            <big>{ruleDetails.name}</big>\n          </h3>\n        </header>\n\n        {hasTypeData && (\n          <ul className=\"coding-rules-detail-properties\">\n            {this.renderType()}\n            {this.renderSeverity()}\n            {!ruleDetails.isExternal && this.renderStatus()}\n            {this.renderTags()}\n            {!ruleDetails.isExternal && this.renderCreationDate()}\n            {this.renderRepository()}\n            {!ruleDetails.isExternal && (\n              <>\n                {this.renderTemplate()}\n                {this.renderParentTemplate()}\n                {this.renderRemediation()}\n              </>\n            )}\n            {ruleDetails.isExternal && this.renderExternalBadge()}\n          </ul>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { sanitizeString } from '../../../helpers/sanitize';\n\ninterface Props {\n  params: T.RuleParameter[];\n}\n\nexport default class RuleDetailsParameters extends React.PureComponent<Props> {\n  renderParameter = (param: T.RuleParameter) => (\n    <tr className=\"coding-rules-detail-parameter\" key={param.key}>\n      <td className=\"coding-rules-detail-parameter-name\">{param.key}</td>\n      <td className=\"coding-rules-detail-parameter-description\">\n        {param.htmlDesc !== undefined && (\n          <p\n            // eslint-disable-next-line react/no-danger\n            dangerouslySetInnerHTML={{ __html: sanitizeString(param.htmlDesc) }}\n          />\n        )}\n        {param.defaultValue !== undefined && (\n          <div className=\"note spacer-top\">\n            {translate('coding_rules.parameters.default_value')}\n            <br />\n            <span className=\"coding-rules-detail-parameter-value\">{param.defaultValue}</span>\n          </div>\n        )}\n      </td>\n    </tr>\n  );\n\n  render() {\n    return (\n      <div className=\"js-rule-parameters\">\n        <h3 className=\"coding-rules-detail-title\">{translate('coding_rules.parameters')}</h3>\n        <table className=\"coding-rules-detail-parameters\">\n          <tbody>{this.props.params.map(this.renderParameter)}</tbody>\n        </table>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  className?: string;\n  tooltip?: boolean;\n}\n\nexport default function BuiltInQualityProfileBadge({ className, tooltip = true }: Props) {\n  const badge = (\n    <div className={classNames('badge badge-info', className)}>\n      {translate('quality_profiles.built_in')}\n    </div>\n  );\n\n  if (tooltip) {\n    return <Tooltip overlay={translate('quality_profiles.built_in.description')}>{badge}</Tooltip>;\n  }\n\n  return badge;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { activateRule, Profile } from '../../../api/quality-profiles';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport Select from '../../../components/controls/Select';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport { Alert } from '../../../components/ui/Alert';\nimport { SEVERITIES } from '../../../helpers/constants';\nimport { translate } from '../../../helpers/l10n';\nimport { sanitizeString } from '../../../helpers/sanitize';\nimport { sortProfiles } from '../../quality-profiles/utils';\n\ninterface Props {\n  activation?: T.RuleActivation;\n  modalHeader: string;\n  onClose: () => void;\n  onDone: (severity: string) => Promise<void>;\n  profiles: Profile[];\n  rule: T.Rule | T.RuleDetails;\n}\n\ninterface State {\n  params: T.Dict<string>;\n  profile: string;\n  severity: string;\n  submitting: boolean;\n}\n\nexport default class ActivationFormModal extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    const profilesWithDepth = this.getQualityProfilesWithDepth(props);\n    this.state = {\n      params: this.getParams(props),\n      profile: profilesWithDepth.length > 0 ? profilesWithDepth[0].key : '',\n      severity: props.activation ? props.activation.severity : props.rule.severity,\n      submitting: false\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  getParams = ({ activation, rule } = this.props) => {\n    const params: T.Dict<string> = {};\n    if (rule && rule.params) {\n      for (const param of rule.params) {\n        params[param.key] = param.defaultValue || '';\n      }\n      if (activation && activation.params) {\n        for (const param of activation.params) {\n          params[param.key] = param.value;\n        }\n      }\n    }\n    return params;\n  };\n\n  // Choose QP which a user can administrate, which are the same language and which are not built-in\n  getQualityProfilesWithDepth = ({ profiles } = this.props) => {\n    return sortProfiles(\n      profiles.filter(\n        profile =>\n          !profile.isBuiltIn &&\n          profile.actions &&\n          profile.actions.edit &&\n          profile.language === this.props.rule.lang\n      )\n    ).map(profile => ({\n      ...profile,\n      // Decrease depth by 1, so the top level starts at 0\n      depth: profile.depth - 1\n    }));\n  };\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ submitting: true });\n    const data = {\n      key: this.state.profile,\n      params: this.state.params,\n      rule: this.props.rule.key,\n      severity: this.state.severity\n    };\n    activateRule(data)\n      .then(() => this.props.onDone(data.severity))\n      .then(\n        () => {\n          if (this.mounted) {\n            this.setState({ submitting: false });\n            this.props.onClose();\n          }\n        },\n        () => {\n          if (this.mounted) {\n            this.setState({ submitting: false });\n          }\n        }\n      );\n  };\n\n  handleParameterChange = (event: React.SyntheticEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n    const { name, value } = event.currentTarget;\n    this.setState((state: State) => ({ params: { ...state.params, [name]: value } }));\n  };\n\n  handleProfileChange = ({ value }: { value: string }) => {\n    this.setState({ profile: value });\n  };\n\n  handleSeverityChange = ({ value }: { value: string }) => {\n    this.setState({ severity: value });\n  };\n\n  renderSeverityOption = ({ value }: { value: string }) => {\n    return <SeverityHelper severity={value} />;\n  };\n\n  render() {\n    const { activation, rule } = this.props;\n    const { profile, severity, submitting } = this.state;\n    const { params = [] } = rule;\n    const profilesWithDepth = this.getQualityProfilesWithDepth();\n    const isCustomRule = !!(rule as T.RuleDetails).templateKey;\n    const activeInAllProfiles = profilesWithDepth.length <= 0;\n    const isUpdateMode = !!activation;\n\n    return (\n      <Modal contentLabel={this.props.modalHeader} onRequestClose={this.props.onClose} size=\"small\">\n        <form onSubmit={this.handleFormSubmit}>\n          <div className=\"modal-head\">\n            <h2>{this.props.modalHeader}</h2>\n          </div>\n\n          <div className={classNames('modal-body', { 'modal-container': params.length > 0 })}>\n            {!isUpdateMode && activeInAllProfiles && (\n              <Alert variant=\"info\">{translate('coding_rules.active_in_all_profiles')}</Alert>\n            )}\n\n            <div className=\"modal-field\">\n              <label>{translate('coding_rules.quality_profile')}</label>\n              <Select\n                className=\"js-profile\"\n                clearable={false}\n                disabled={submitting || profilesWithDepth.length === 1}\n                onChange={this.handleProfileChange}\n                options={profilesWithDepth.map(profile => ({\n                  label: '   '.repeat(profile.depth) + profile.name,\n                  value: profile.key\n                }))}\n                value={profile}\n              />\n            </div>\n            <div className=\"modal-field\">\n              <label>{translate('severity')}</label>\n              <Select\n                className=\"js-severity\"\n                clearable={false}\n                disabled={submitting}\n                onChange={this.handleSeverityChange}\n                optionRenderer={this.renderSeverityOption}\n                options={SEVERITIES.map(severity => ({\n                  label: translate('severity', severity),\n                  value: severity\n                }))}\n                searchable={false}\n                value={severity}\n                valueRenderer={this.renderSeverityOption}\n              />\n            </div>\n            {isCustomRule ? (\n              <div className=\"modal-field\">\n                <p className=\"note\">{translate('coding_rules.custom_rule.activation_notice')}</p>\n              </div>\n            ) : (\n              params.map(param => (\n                <div className=\"modal-field\" key={param.key}>\n                  <label title={param.key}>{param.key}</label>\n                  {param.type === 'TEXT' ? (\n                    <textarea\n                      disabled={submitting}\n                      name={param.key}\n                      onChange={this.handleParameterChange}\n                      placeholder={param.defaultValue}\n                      rows={3}\n                      value={this.state.params[param.key] || ''}\n                    />\n                  ) : (\n                    <input\n                      disabled={submitting}\n                      name={param.key}\n                      onChange={this.handleParameterChange}\n                      placeholder={param.defaultValue}\n                      type=\"text\"\n                      value={this.state.params[param.key] || ''}\n                    />\n                  )}\n                  {param.htmlDesc !== undefined && (\n                    <div\n                      className=\"note\"\n                      // eslint-disable-next-line react/no-danger\n                      dangerouslySetInnerHTML={{ __html: sanitizeString(param.htmlDesc) }}\n                    />\n                  )}\n                </div>\n              ))\n            )}\n          </div>\n\n          <footer className=\"modal-foot\">\n            {submitting && <i className=\"spinner spacer-right\" />}\n            <SubmitButton disabled={submitting || activeInAllProfiles}>\n              {isUpdateMode ? translate('save') : translate('coding_rules.activate')}\n            </SubmitButton>\n            <ResetButtonLink disabled={submitting} onClick={this.props.onClose}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Profile as BaseProfile } from '../../../api/quality-profiles';\nimport { Button } from '../../../components/controls/buttons';\nimport ActivationFormModal from './ActivationFormModal';\n\ninterface Props {\n  activation?: T.RuleActivation;\n  buttonText: string;\n  className?: string;\n  modalHeader: string;\n  onDone: (severity: string) => Promise<void>;\n  profiles: BaseProfile[];\n  rule: T.Rule | T.RuleDetails;\n}\n\ninterface State {\n  modal: boolean;\n}\n\nexport default class ActivationButton extends React.PureComponent<Props, State> {\n  state: State = { modal: false };\n\n  handleButtonClick = () => {\n    this.setState({ modal: true });\n  };\n\n  handleCloseModal = () => {\n    this.setState({ modal: false });\n  };\n\n  render() {\n    return (\n      <>\n        <Button\n          className={this.props.className}\n          id=\"coding-rules-quality-profile-activate\"\n          onClick={this.handleButtonClick}>\n          {this.props.buttonText}\n        </Button>\n\n        {this.state.modal && (\n          <ActivationFormModal\n            activation={this.props.activation}\n            modalHeader={this.props.modalHeader}\n            onClose={this.handleCloseModal}\n            onDone={this.props.onDone}\n            profiles={this.props.profiles}\n            rule={this.props.rule}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../../app/theme';\n\ninterface Props {\n  className?: string;\n  inheritance: T.RuleInheritance;\n}\n\nexport default function RuleInheritanceIcon({ className, inheritance, ...other }: Props) {\n  const fill = inheritance === 'OVERRIDES' ? colors.red : colors.baseFontColor;\n\n  return (\n    <svg\n      className={className}\n      height={16}\n      version=\"1.1\"\n      viewBox=\"0 0 16 16\"\n      width={16}\n      xmlSpace=\"preserve\"\n      xmlnsXlink=\"https://www.w3.org/1999/xlink\"\n      {...other}>\n      <path\n        d=\"M6.25 12.5a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0zm0-9a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0zm5 1a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0zm.75 0a1.5 1.5 0 0 1-.75 1.297c-.023 2.82-2.023 3.445-3.352 3.867-1.242.39-1.648.578-1.648 1.336v.203A1.5 1.5 0 1 1 4 12.5a1.5 1.5 0 0 1 .75-1.297V4.797A1.5 1.5 0 1 1 7 3.5a1.5 1.5 0 0 1-.75 1.297V8.68c.398-.196.82-.328 1.203-.446 1.453-.46 2.281-.804 2.297-2.437A1.5 1.5 0 1 1 12 4.5z\"\n        style={{ fill, fillRule: 'nonzero' }}\n      />\n    </svg>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { filter } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { activateRule, deactivateRule, Profile } from '../../../api/quality-profiles';\nimport InstanceMessage from '../../../components/common/InstanceMessage';\nimport { Button } from '../../../components/controls/buttons';\nimport ConfirmButton from '../../../components/controls/ConfirmButton';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getQualityProfileUrl } from '../../../helpers/urls';\nimport BuiltInQualityProfileBadge from '../../quality-profiles/components/BuiltInQualityProfileBadge';\nimport ActivationButton from './ActivationButton';\nimport RuleInheritanceIcon from './RuleInheritanceIcon';\n\ninterface Props {\n  activations: T.RuleActivation[] | undefined;\n  canWrite: boolean | undefined;\n  onActivate: () => Promise<void>;\n  onDeactivate: () => Promise<void>;\n  referencedProfiles: T.Dict<Profile>;\n  ruleDetails: T.RuleDetails;\n}\n\nexport default class RuleDetailsProfiles extends React.PureComponent<Props> {\n  handleActivate = () => this.props.onActivate();\n\n  handleDeactivate = (key?: string) => {\n    if (key) {\n      deactivateRule({\n        key,\n        rule: this.props.ruleDetails.key\n      }).then(this.props.onDeactivate, () => {});\n    }\n  };\n\n  handleRevert = (key?: string) => {\n    if (key) {\n      activateRule({\n        key,\n        rule: this.props.ruleDetails.key,\n        reset: true\n      }).then(this.props.onActivate, () => {});\n    }\n  };\n\n  renderInheritedProfile = (activation: T.RuleActivation, profile: Profile) => {\n    if (!profile.parentName) {\n      return null;\n    }\n    const profilePath = getQualityProfileUrl(profile.parentName, profile.language);\n    return (\n      <div className=\"coding-rules-detail-quality-profile-inheritance\">\n        {(activation.inherit === 'OVERRIDES' || activation.inherit === 'INHERITED') && (\n          <>\n            <RuleInheritanceIcon className=\"text-middle\" inheritance={activation.inherit} />\n            <Link className=\"link-base-color little-spacer-left text-middle\" to={profilePath}>\n              {profile.parentName}\n            </Link>\n          </>\n        )}\n      </div>\n    );\n  };\n\n  renderSeverity = (activation: T.RuleActivation, parentActivation?: T.RuleActivation) => (\n    <td className=\"coding-rules-detail-quality-profile-severity\">\n      <Tooltip overlay={translate('coding_rules.activation_severity')}>\n        <span>\n          <SeverityHelper className=\"display-inline-flex-center\" severity={activation.severity} />\n        </span>\n      </Tooltip>\n      {parentActivation !== undefined && activation.severity !== parentActivation.severity && (\n        <div className=\"coding-rules-detail-quality-profile-inheritance\">\n          {translate('coding_rules.original')} {translate('severity', parentActivation.severity)}\n        </div>\n      )}\n    </td>\n  );\n\n  renderParameter = (\n    param: { key: string; value: string },\n    parentActivation?: T.RuleActivation\n  ) => {\n    const originalParam =\n      parentActivation && parentActivation.params.find(p => p.key === param.key);\n    const originalValue = originalParam && originalParam.value;\n\n    return (\n      <div className=\"coding-rules-detail-quality-profile-parameter\" key={param.key}>\n        <span className=\"key\">{param.key}</span>\n        <span className=\"sep\">: </span>\n        <span className=\"value\" title={param.value}>\n          {param.value}\n        </span>\n        {parentActivation && param.value !== originalValue && (\n          <div className=\"coding-rules-detail-quality-profile-inheritance\">\n            {translate('coding_rules.original')} <span className=\"value\">{originalValue}</span>\n          </div>\n        )}\n      </div>\n    );\n  };\n\n  renderParameters = (activation: T.RuleActivation, parentActivation?: T.RuleActivation) => (\n    <td className=\"coding-rules-detail-quality-profile-parameters\">\n      {activation.params.map(param => this.renderParameter(param, parentActivation))}\n    </td>\n  );\n\n  renderActions = (activation: T.RuleActivation, profile: Profile) => {\n    const canEdit = profile.actions && profile.actions.edit && !profile.isBuiltIn;\n    const { ruleDetails } = this.props;\n    const hasParent = activation.inherit !== 'NONE' && profile.parentKey;\n    return (\n      <td className=\"coding-rules-detail-quality-profile-actions\">\n        {canEdit && (\n          <>\n            {!ruleDetails.isTemplate && (\n              <ActivationButton\n                activation={activation}\n                buttonText={translate('change_verb')}\n                className=\"coding-rules-detail-quality-profile-change\"\n                modalHeader={translate('coding_rules.change_details')}\n                onDone={this.handleActivate}\n                profiles={[profile]}\n                rule={ruleDetails}\n              />\n            )}\n            {hasParent ? (\n              activation.inherit === 'OVERRIDES' &&\n              profile.parentName && (\n                <ConfirmButton\n                  confirmButtonText={translate('yes')}\n                  confirmData={profile.key}\n                  modalBody={translateWithParameters(\n                    'coding_rules.revert_to_parent_definition.confirm',\n                    profile.parentName\n                  )}\n                  modalHeader={translate('coding_rules.revert_to_parent_definition')}\n                  onConfirm={this.handleRevert}>\n                  {({ onClick }) => (\n                    <Button\n                      className=\"coding-rules-detail-quality-profile-revert button-red spacer-left\"\n                      onClick={onClick}>\n                      {translate('coding_rules.revert_to_parent_definition')}\n                    </Button>\n                  )}\n                </ConfirmButton>\n              )\n            ) : (\n              <ConfirmButton\n                confirmButtonText={translate('yes')}\n                confirmData={profile.key}\n                modalBody={translate('coding_rules.deactivate.confirm')}\n                modalHeader={translate('coding_rules.deactivate')}\n                onConfirm={this.handleDeactivate}>\n                {({ onClick }) => (\n                  <Button\n                    className=\"coding-rules-detail-quality-profile-deactivate button-red spacer-left\"\n                    onClick={onClick}>\n                    {translate('coding_rules.deactivate')}\n                  </Button>\n                )}\n              </ConfirmButton>\n            )}\n          </>\n        )}\n      </td>\n    );\n  };\n\n  renderActivation = (activation: T.RuleActivation) => {\n    const { activations = [], ruleDetails } = this.props;\n    const profile = this.props.referencedProfiles[activation.qProfile];\n    if (!profile) {\n      return null;\n    }\n\n    const parentActivation = activations.find(x => x.qProfile === profile.parentKey);\n\n    return (\n      <tr data-profile={profile.key} key={profile.key}>\n        <td className=\"coding-rules-detail-quality-profile-name\">\n          <Link to={getQualityProfileUrl(profile.name, profile.language)}>{profile.name}</Link>\n          {profile.isBuiltIn && <BuiltInQualityProfileBadge className=\"spacer-left\" />}\n          {this.renderInheritedProfile(activation, profile)}\n        </td>\n\n        {this.renderSeverity(activation, parentActivation)}\n        {!ruleDetails.templateKey && this.renderParameters(activation, parentActivation)}\n        {this.renderActions(activation, profile)}\n      </tr>\n    );\n  };\n\n  render() {\n    const { activations = [], referencedProfiles, ruleDetails } = this.props;\n    const canActivate = Object.values(referencedProfiles).some(profile =>\n      Boolean(profile.actions && profile.actions.edit && profile.language === ruleDetails.lang)\n    );\n\n    return (\n      <div className=\"js-rule-profiles coding-rule-section\">\n        <div className=\"coding-rules-detail-quality-profiles-section\">\n          <div className=\"coding-rule-section-separator\" />\n\n          <h3 className=\"coding-rules-detail-title\">\n            <InstanceMessage message={translate('coding_rules.quality_profiles')} />\n          </h3>\n\n          {canActivate && (\n            <ActivationButton\n              buttonText={translate('coding_rules.activate')}\n              className=\"coding-rules-quality-profile-activate spacer-left\"\n              modalHeader={translate('coding_rules.activate_in_quality_profile')}\n              onDone={this.handleActivate}\n              profiles={filter(\n                this.props.referencedProfiles,\n                profile => !activations.find(activation => activation.qProfile === profile.key)\n              )}\n              rule={ruleDetails}\n            />\n          )}\n\n          {activations.length > 0 && (\n            <table\n              className=\"coding-rules-detail-quality-profiles width-100\"\n              id=\"coding-rules-detail-quality-profiles\">\n              <tbody>{activations.map(this.renderActivation)}</tbody>\n            </table>\n          )}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Profile } from '../../../api/quality-profiles';\nimport { deleteRule, getRuleDetails, updateRule } from '../../../api/rules';\nimport { Button } from '../../../components/controls/buttons';\nimport ConfirmButton from '../../../components/controls/ConfirmButton';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Activation, Query } from '../query';\nimport CustomRuleButton from './CustomRuleButton';\nimport RuleDetailsCustomRules from './RuleDetailsCustomRules';\nimport RuleDetailsDescription from './RuleDetailsDescription';\nimport RuleDetailsIssues from './RuleDetailsIssues';\nimport RuleDetailsMeta from './RuleDetailsMeta';\nimport RuleDetailsParameters from './RuleDetailsParameters';\nimport RuleDetailsProfiles from './RuleDetailsProfiles';\n\ninterface Props {\n  allowCustomRules?: boolean;\n  canWrite?: boolean;\n  hideQualityProfiles?: boolean;\n  onActivate: (profile: string, rule: string, activation: Activation) => void;\n  onDeactivate: (profile: string, rule: string) => void;\n  onDelete: (rule: string) => void;\n  onFilterChange: (changes: Partial<Query>) => void;\n  referencedProfiles: T.Dict<Profile>;\n  referencedRepositories: T.Dict<{ key: string; language: string; name: string }>;\n  ruleKey: string;\n  selectedProfile?: Profile;\n}\n\ninterface State {\n  actives?: T.RuleActivation[];\n  loading: boolean;\n  ruleDetails?: T.RuleDetails;\n}\n\nexport default class RuleDetails extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.setState({ loading: true });\n    this.fetchRuleDetails();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.ruleKey !== this.props.ruleKey) {\n      this.setState({ loading: true });\n      this.fetchRuleDetails();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchRuleDetails = () => {\n    return getRuleDetails({\n      actives: true,\n      key: this.props.ruleKey\n    }).then(\n      ({ actives, rule }) => {\n        if (this.mounted) {\n          this.setState({ actives, loading: false, ruleDetails: rule });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleRuleChange = (ruleDetails: T.RuleDetails) => {\n    if (this.mounted) {\n      this.setState({ ruleDetails });\n    }\n  };\n\n  handleTagsChange = (tags: string[]) => {\n    // optimistic update\n    const oldTags = this.state.ruleDetails && this.state.ruleDetails.tags;\n    this.setState(state =>\n      state.ruleDetails ? { ruleDetails: { ...state.ruleDetails, tags } } : null\n    );\n    updateRule({\n      key: this.props.ruleKey,\n      tags: tags.join()\n    }).catch(() => {\n      if (this.mounted) {\n        this.setState(state =>\n          state.ruleDetails ? { ruleDetails: { ...state.ruleDetails, tags: oldTags } } : null\n        );\n      }\n    });\n  };\n\n  handleActivate = () => {\n    return this.fetchRuleDetails().then(() => {\n      const { ruleKey, selectedProfile } = this.props;\n      if (selectedProfile && this.state.actives) {\n        const active = this.state.actives.find(active => active.qProfile === selectedProfile.key);\n        if (active) {\n          this.props.onActivate(selectedProfile.key, ruleKey, active);\n        }\n      }\n    });\n  };\n\n  handleDeactivate = () => {\n    return this.fetchRuleDetails().then(() => {\n      const { ruleKey, selectedProfile } = this.props;\n      if (\n        selectedProfile &&\n        this.state.actives &&\n        !this.state.actives.find(active => active.qProfile === selectedProfile.key)\n      ) {\n        this.props.onDeactivate(selectedProfile.key, ruleKey);\n      }\n    });\n  };\n\n  handleDelete = () => {\n    return deleteRule({ key: this.props.ruleKey }).then(() =>\n      this.props.onDelete(this.props.ruleKey)\n    );\n  };\n\n  render() {\n    const { ruleDetails } = this.state;\n\n    if (!ruleDetails) {\n      return <div className=\"coding-rule-details\" />;\n    }\n\n    const { allowCustomRules, canWrite, hideQualityProfiles, referencedProfiles } = this.props;\n    const { params = [] } = ruleDetails;\n\n    const isCustom = !!ruleDetails.templateKey;\n    const isEditable = canWrite && !!this.props.allowCustomRules && isCustom;\n\n    return (\n      <div className=\"coding-rule-details\">\n        <DeferredSpinner loading={this.state.loading}>\n          <RuleDetailsMeta\n            canWrite={canWrite}\n            onFilterChange={this.props.onFilterChange}\n            onTagsChange={this.handleTagsChange}\n            referencedRepositories={this.props.referencedRepositories}\n            ruleDetails={ruleDetails}\n          />\n\n          <RuleDetailsDescription\n            canWrite={canWrite}\n            onChange={this.handleRuleChange}\n            ruleDetails={ruleDetails}\n          />\n\n          {params.length > 0 && <RuleDetailsParameters params={params} />}\n\n          {isEditable && (\n            <div className=\"coding-rules-detail-description display-flex-center\">\n              {/* `templateRule` is used to get rule meta data, `customRule` is used to get parameter values */}\n              {/* it's expected to pass the same rule to both parameters */}\n              <CustomRuleButton\n                customRule={ruleDetails}\n                onDone={this.handleRuleChange}\n                templateRule={ruleDetails}>\n                {({ onClick }) => (\n                  <Button\n                    className=\"js-edit-custom\"\n                    id=\"coding-rules-detail-custom-rule-change\"\n                    onClick={onClick}>\n                    {translate('edit')}\n                  </Button>\n                )}\n              </CustomRuleButton>\n              <ConfirmButton\n                confirmButtonText={translate('delete')}\n                isDestructive={true}\n                modalBody={translateWithParameters(\n                  'coding_rules.delete.custom.confirm',\n                  ruleDetails.name\n                )}\n                modalHeader={translate('coding_rules.delete_rule')}\n                onConfirm={this.handleDelete}>\n                {({ onClick }) => (\n                  <>\n                    <Button\n                      className=\"button-red spacer-left js-delete\"\n                      id=\"coding-rules-detail-rule-delete\"\n                      onClick={onClick}>\n                      {translate('delete')}\n                    </Button>\n                    <HelpTooltip\n                      className=\"spacer-left\"\n                      overlay={\n                        <div className=\"big-padded-top big-padded-bottom\">\n                          {translate('coding_rules.custom_rule.removal')}\n                        </div>\n                      }\n                    />\n                  </>\n                )}\n              </ConfirmButton>\n            </div>\n          )}\n\n          {ruleDetails.isTemplate && (\n            <RuleDetailsCustomRules\n              canChange={allowCustomRules && canWrite}\n              ruleDetails={ruleDetails}\n            />\n          )}\n\n          {!ruleDetails.isTemplate && !hideQualityProfiles && (\n            <RuleDetailsProfiles\n              activations={this.state.actives}\n              canWrite={canWrite}\n              onActivate={this.handleActivate}\n              onDeactivate={this.handleDeactivate}\n              referencedProfiles={referencedProfiles}\n              ruleDetails={ruleDetails}\n            />\n          )}\n\n          {!ruleDetails.isTemplate && ruleDetails.type !== 'SECURITY_HOTSPOT' && (\n            <RuleDetailsIssues ruleDetails={ruleDetails} />\n          )}\n        </DeferredSpinner>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { deactivateRule, Profile } from '../../../api/quality-profiles';\nimport { Button } from '../../../components/controls/buttons';\nimport ConfirmButton from '../../../components/controls/ConfirmButton';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport SeverityIcon from '../../../components/icons/SeverityIcon';\nimport TagsList from '../../../components/tags/TagsList';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getRuleUrl } from '../../../helpers/urls';\nimport { Activation, Query } from '../query';\nimport ActivationButton from './ActivationButton';\nimport RuleInheritanceIcon from './RuleInheritanceIcon';\nimport SimilarRulesFilter from './SimilarRulesFilter';\n\ninterface Props {\n  activation?: Activation;\n  canWrite?: boolean;\n  isLoggedIn: boolean;\n  onActivate: (profile: string, rule: string, activation: Activation) => void;\n  onDeactivate: (profile: string, rule: string) => void;\n  onFilterChange: (changes: Partial<Query>) => void;\n  onOpen: (ruleKey: string) => void;\n  rule: T.Rule;\n  selected: boolean;\n  selectedProfile?: Profile;\n}\n\nexport default class RuleListItem extends React.PureComponent<Props> {\n  handleDeactivate = () => {\n    if (this.props.selectedProfile) {\n      const data = {\n        key: this.props.selectedProfile.key,\n        rule: this.props.rule.key\n      };\n      deactivateRule(data).then(\n        () => this.props.onDeactivate(data.key, data.rule),\n        () => {}\n      );\n    }\n  };\n\n  handleActivate = (severity: string) => {\n    if (this.props.selectedProfile) {\n      this.props.onActivate(this.props.selectedProfile.key, this.props.rule.key, {\n        severity,\n        inherit: 'NONE'\n      });\n    }\n    return Promise.resolve();\n  };\n\n  handleNameClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    // cmd(ctrl) + click should open a rule permalink in a new tab\n    const isLeftClickEvent = event.button === 0;\n    const isModifiedEvent = !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n    if (isModifiedEvent || !isLeftClickEvent) {\n      return;\n    }\n\n    event.preventDefault();\n    this.props.onOpen(this.props.rule.key);\n  };\n\n  renderActivation = () => {\n    const { activation, selectedProfile } = this.props;\n    if (!activation) {\n      return null;\n    }\n\n    return (\n      <td className=\"coding-rule-table-meta-cell coding-rule-activation\">\n        <SeverityIcon severity={activation.severity} />\n        {selectedProfile && selectedProfile.parentName && (\n          <>\n            {activation.inherit === 'OVERRIDES' && (\n              <Tooltip\n                overlay={translateWithParameters(\n                  'coding_rules.overrides',\n                  selectedProfile.name,\n                  selectedProfile.parentName\n                )}>\n                <RuleInheritanceIcon\n                  className=\"little-spacer-left\"\n                  inheritance={activation.inherit}\n                />\n              </Tooltip>\n            )}\n            {activation.inherit === 'INHERITED' && (\n              <Tooltip\n                overlay={translateWithParameters(\n                  'coding_rules.inherits',\n                  selectedProfile.name,\n                  selectedProfile.parentName\n                )}>\n                <RuleInheritanceIcon\n                  className=\"little-spacer-left\"\n                  inheritance={activation.inherit}\n                />\n              </Tooltip>\n            )}\n          </>\n        )}\n      </td>\n    );\n  };\n\n  renderActions = () => {\n    const { activation, isLoggedIn, rule, selectedProfile } = this.props;\n    if (!selectedProfile || !isLoggedIn) {\n      return null;\n    }\n\n    const canCopy = selectedProfile.actions && selectedProfile.actions.copy;\n    if (selectedProfile.isBuiltIn && canCopy) {\n      return (\n        <td className=\"coding-rule-table-meta-cell coding-rule-activation-actions\">\n          <Tooltip overlay={translate('coding_rules.need_extend_or_copy')}>\n            <Button className=\"coding-rules-detail-quality-profile-deactivate button-red disabled\">\n              {translate('coding_rules', activation ? 'deactivate' : 'activate')}\n            </Button>\n          </Tooltip>\n        </td>\n      );\n    }\n\n    const canEdit = selectedProfile.actions && selectedProfile.actions.edit;\n    if (!canEdit) {\n      return null;\n    }\n\n    if (activation) {\n      return (\n        <td className=\"coding-rule-table-meta-cell coding-rule-activation-actions\">\n          {activation.inherit === 'NONE' ? (\n            <ConfirmButton\n              confirmButtonText={translate('yes')}\n              modalBody={translate('coding_rules.deactivate.confirm')}\n              modalHeader={translate('coding_rules.deactivate')}\n              onConfirm={this.handleDeactivate}>\n              {({ onClick }) => (\n                <Button\n                  className=\"coding-rules-detail-quality-profile-deactivate button-red\"\n                  onClick={onClick}>\n                  {translate('coding_rules.deactivate')}\n                </Button>\n              )}\n            </ConfirmButton>\n          ) : (\n            <Tooltip overlay={translate('coding_rules.can_not_deactivate')}>\n              <Button className=\"coding-rules-detail-quality-profile-deactivate button-red disabled\">\n                {translate('coding_rules.deactivate')}\n              </Button>\n            </Tooltip>\n          )}\n        </td>\n      );\n    }\n\n    return (\n      <td className=\"coding-rule-table-meta-cell coding-rule-activation-actions\">\n        {!rule.isTemplate && (\n          <ActivationButton\n            buttonText={translate('coding_rules.activate')}\n            className=\"coding-rules-detail-quality-profile-activate\"\n            modalHeader={translate('coding_rules.activate_in_quality_profile')}\n            onDone={this.handleActivate}\n            profiles={[selectedProfile]}\n            rule={rule}\n          />\n        )}\n      </td>\n    );\n  };\n\n  render() {\n    const { rule, selected } = this.props;\n    const allTags = [...(rule.tags || []), ...(rule.sysTags || [])];\n    return (\n      <div className={classNames('coding-rule', { selected })} data-rule={rule.key}>\n        <table className=\"coding-rule-table\">\n          <tbody>\n            <tr>\n              {this.renderActivation()}\n\n              <td>\n                <div className=\"coding-rule-title\">\n                  <Link\n                    className=\"link-no-underline\"\n                    onClick={this.handleNameClick}\n                    to={getRuleUrl(rule.key)}>\n                    {rule.name}\n                  </Link>\n                  {rule.isTemplate && (\n                    <Tooltip overlay={translate('coding_rules.rule_template.title')}>\n                      <span className=\"badge spacer-left\">\n                        {translate('coding_rules.rule_template')}\n                      </span>\n                    </Tooltip>\n                  )}\n                </div>\n              </td>\n\n              <td className=\"coding-rule-table-meta-cell\">\n                <div className=\"display-flex-center coding-rule-meta\">\n                  {rule.status !== 'READY' && (\n                    <span className=\"spacer-left badge badge-error\">\n                      {translate('rules.status', rule.status)}\n                    </span>\n                  )}\n                  <span className=\"display-inline-flex-center spacer-left note\">\n                    {rule.langName}\n                  </span>\n                  <Tooltip overlay={translate('coding_rules.type.tooltip', rule.type)}>\n                    <span className=\"display-inline-flex-center spacer-left note\">\n                      <IssueTypeIcon query={rule.type} />\n                      <span className=\"little-spacer-left text-middle\">\n                        {translate('issue.type', rule.type)}\n                      </span>\n                    </span>\n                  </Tooltip>\n                  {allTags.length > 0 && (\n                    <TagsList\n                      allowUpdate={false}\n                      className=\"display-inline-flex-center note spacer-left\"\n                      tags={allTags}\n                    />\n                  )}\n                  <SimilarRulesFilter onFilterChange={this.props.onFilterChange} rule={rule} />\n                </div>\n              </td>\n\n              {this.renderActions()}\n            </tr>\n          </tbody>\n        </table>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport key from 'keymaster';\nimport { keyBy } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { withRouter, WithRouterProps } from 'react-router';\nimport { Profile, searchQualityProfiles } from '../../../api/quality-profiles';\nimport { getRulesApp, searchRules } from '../../../api/rules';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport FiltersHeader from '../../../components/common/FiltersHeader';\nimport ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport BackIcon from '../../../components/icons/BackIcon';\nimport '../../../components/search-navigator.css';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  addSideBarClass,\n  addWhitePageClass,\n  removeSideBarClass,\n  removeWhitePageClass\n} from '../../../helpers/pages';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { getCurrentUser, getLanguages, Store } from '../../../store/rootReducer';\nimport { SecurityStandard } from '../../../types/security';\nimport {\n  shouldOpenSonarSourceSecurityFacet,\n  shouldOpenStandardsChildFacet,\n  shouldOpenStandardsFacet,\n  STANDARDS\n} from '../../issues/utils';\nimport {\n  Activation,\n  Actives,\n  areQueriesEqual,\n  FacetKey,\n  Facets,\n  getAppFacet,\n  getOpen,\n  getServerFacet,\n  hasRuleKey,\n  OpenFacets,\n  parseQuery,\n  Query,\n  serializeQuery,\n  shouldRequestFacet\n} from '../query';\nimport '../styles.css';\nimport BulkChange from './BulkChange';\nimport FacetsList from './FacetsList';\nimport PageActions from './PageActions';\nimport RuleDetails from './RuleDetails';\nimport RuleListItem from './RuleListItem';\n\nconst PAGE_SIZE = 100;\nconst MAX_SEARCH_LENGTH = 200;\nconst LIMIT_BEFORE_LOAD_MORE = 5;\n\ninterface Props extends WithRouterProps {\n  currentUser: T.CurrentUser;\n  languages: T.Languages;\n}\n\ninterface State {\n  actives?: Actives;\n  canWrite?: boolean;\n  facets?: Facets;\n  loading: boolean;\n  openFacets: OpenFacets;\n  openRule?: T.Rule;\n  paging?: T.Paging;\n  query: Query;\n  referencedProfiles: T.Dict<Profile>;\n  referencedRepositories: T.Dict<{ key: string; language: string; name: string }>;\n  rules: T.Rule[];\n  selected?: string;\n  usingPermalink?: boolean;\n}\n\nexport class App extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    const query = parseQuery(props.location.query);\n    this.state = {\n      loading: true,\n      openFacets: {\n        languages: true,\n        owaspTop10: shouldOpenStandardsChildFacet({}, query, SecurityStandard.OWASP_TOP10),\n        sansTop25: shouldOpenStandardsChildFacet({}, query, SecurityStandard.SANS_TOP25),\n        sonarsourceSecurity: shouldOpenSonarSourceSecurityFacet({}, query),\n        standards: shouldOpenStandardsFacet({}, query),\n        types: true\n      },\n      query,\n      referencedProfiles: {},\n      referencedRepositories: {},\n      rules: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    addWhitePageClass();\n    addSideBarClass();\n    this.attachShortcuts();\n    this.fetchInitialData();\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    this.setState(({ rules, selected }) => {\n      const openRule = this.getOpenRule(nextProps, rules);\n      return {\n        openRule,\n        usingPermalink: hasRuleKey(nextProps.location.query),\n        query: parseQuery(nextProps.location.query),\n        selected: openRule ? openRule.key : selected\n      };\n    });\n  }\n\n  componentDidUpdate(prevProps: Props, prevState: State) {\n    if (!areQueriesEqual(prevProps.location.query, this.props.location.query)) {\n      this.fetchFirstRules();\n    }\n    if (\n      !this.state.openRule &&\n      (prevState.selected !== this.state.selected || prevState.openRule)\n    ) {\n      // if user simply selected another issue\n      // or if user went from the source code back to the list of issues\n      this.scrollToSelectedRule();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    removeWhitePageClass();\n    removeSideBarClass();\n    this.detachShortcuts();\n  }\n\n  attachShortcuts = () => {\n    key.setScope('coding-rules');\n    key('up', 'coding-rules', () => {\n      this.selectPreviousRule();\n      return false;\n    });\n    key('down', 'coding-rules', () => {\n      this.selectNextRule();\n      return false;\n    });\n    key('right', 'coding-rules', () => {\n      this.openSelectedRule();\n      return false;\n    });\n    key('left', 'coding-rules', () => {\n      this.handleBack();\n      return false;\n    });\n  };\n\n  detachShortcuts = () => key.deleteScope('coding-rules');\n\n  getOpenRule = (props: Props, rules: T.Rule[]) => {\n    const open = getOpen(props.location.query);\n    return open && rules.find(rule => rule.key === open);\n  };\n\n  getFacetsToFetch = () => {\n    const { openFacets } = this.state;\n    return Object.keys(openFacets)\n      .filter((facet: FacetKey) => openFacets[facet])\n      .filter((facet: FacetKey) => shouldRequestFacet(facet))\n      .map((facet: FacetKey) => getServerFacet(facet));\n  };\n\n  getFieldsToFetch = () => {\n    const fields = [\n      'isTemplate',\n      'name',\n      'lang',\n      'langName',\n      'severity',\n      'status',\n      'sysTags',\n      'tags',\n      'templateKey'\n    ];\n    if (this.state.query.profile) {\n      fields.push('actives', 'params');\n    }\n    return fields;\n  };\n\n  getSearchParameters = () => ({\n    f: this.getFieldsToFetch().join(),\n    facets: this.getFacetsToFetch().join(),\n    ps: PAGE_SIZE,\n    s: 'name',\n    ...serializeQuery(this.state.query)\n  });\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  fetchInitialData = () => {\n    this.setState({ loading: true });\n    Promise.all([getRulesApp(), searchQualityProfiles()]).then(\n      ([{ canWrite, repositories }, { profiles }]) => {\n        this.setState({\n          canWrite,\n          referencedProfiles: keyBy(profiles, 'key'),\n          referencedRepositories: keyBy(repositories, 'key')\n        });\n        this.fetchFirstRules();\n      },\n      this.stopLoading\n    );\n  };\n\n  makeFetchRequest = (query?: T.RawQuery) =>\n    searchRules({ ...this.getSearchParameters(), ...query }).then(\n      ({ actives: rawActives, facets: rawFacets, p, ps, rules, total }) => {\n        const actives = rawActives && parseActives(rawActives);\n        const facets = rawFacets && parseFacets(rawFacets);\n        const paging = { pageIndex: p, pageSize: ps, total };\n        return { actives, facets, paging, rules };\n      }\n    );\n\n  fetchFirstRules = (query?: T.RawQuery) => {\n    this.setState({ loading: true });\n    this.makeFetchRequest(query).then(({ actives, facets, paging, rules }) => {\n      if (this.mounted) {\n        const openRule = this.getOpenRule(this.props, rules);\n        const usingPermalink = hasRuleKey(this.props.location.query);\n        const selected = rules.length > 0 ? (openRule && openRule.key) || rules[0].key : undefined;\n        this.setState({\n          actives,\n          facets,\n          loading: false,\n          openRule,\n          paging,\n          rules,\n          selected,\n          usingPermalink\n        });\n      }\n    }, this.stopLoading);\n  };\n\n  fetchMoreRules = () => {\n    const { paging } = this.state;\n    if (paging) {\n      this.setState({ loading: true });\n      const nextPage = paging.pageIndex + 1;\n      this.makeFetchRequest({ p: nextPage, facets: undefined }).then(\n        ({ actives, paging, rules }) => {\n          if (this.mounted) {\n            this.setState((state: State) => ({\n              actives: { ...state.actives, ...actives },\n              loading: false,\n              paging,\n              rules: [...state.rules, ...rules]\n            }));\n          }\n        },\n        this.stopLoading\n      );\n    }\n  };\n\n  fetchFacet = (facet: FacetKey) => {\n    this.makeFetchRequest({ ps: 1, facets: getServerFacet(facet) }).then(({ facets }) => {\n      if (this.mounted) {\n        this.setState(state => ({ facets: { ...state.facets, ...facets }, loading: false }));\n      }\n    }, this.stopLoading);\n  };\n\n  getSelectedIndex = ({ selected, rules } = this.state) => {\n    const index = rules.findIndex(rule => rule.key === selected);\n    return index !== -1 ? index : undefined;\n  };\n\n  selectNextRule = () => {\n    const { rules, loading, paging } = this.state;\n    const selectedIndex = this.getSelectedIndex();\n    if (selectedIndex !== undefined) {\n      if (\n        selectedIndex > rules.length - LIMIT_BEFORE_LOAD_MORE &&\n        !loading &&\n        paging &&\n        rules.length < paging.total\n      ) {\n        this.fetchMoreRules();\n      }\n      if (rules && selectedIndex < rules.length - 1) {\n        if (this.state.openRule) {\n          this.openRule(rules[selectedIndex + 1].key);\n        } else {\n          this.setState({ selected: rules[selectedIndex + 1].key });\n        }\n      }\n    }\n  };\n\n  selectPreviousRule = () => {\n    const { rules } = this.state;\n    const selectedIndex = this.getSelectedIndex();\n    if (rules && selectedIndex !== undefined && selectedIndex > 0) {\n      if (this.state.openRule) {\n        this.openRule(rules[selectedIndex - 1].key);\n      } else {\n        this.setState({ selected: rules[selectedIndex - 1].key });\n      }\n    }\n  };\n\n  getRulePath = (rule: string) => ({\n    pathname: this.props.location.pathname,\n    query: { ...serializeQuery(this.state.query), open: rule }\n  });\n\n  openRule = (rule: string) => {\n    const path = this.getRulePath(rule);\n    if (this.state.openRule) {\n      this.props.router.replace(path);\n    } else {\n      this.props.router.push(path);\n    }\n  };\n\n  openSelectedRule = () => {\n    const { selected } = this.state;\n    if (selected) {\n      this.openRule(selected);\n    }\n  };\n\n  closeRule = () => {\n    this.props.router.push({\n      pathname: this.props.location.pathname,\n      query: {\n        ...serializeQuery(this.state.query),\n        open: undefined\n      }\n    });\n    this.scrollToSelectedRule(false);\n  };\n\n  scrollToSelectedRule = (smooth = true) => {\n    const { selected } = this.state;\n    if (selected) {\n      const element = document.querySelector(`[data-rule=\"${selected}\"]`);\n      if (element) {\n        scrollToElement(element, { topOffset: 150, bottomOffset: 100, smooth });\n      }\n    }\n  };\n\n  getRuleActivation = (rule: string) => {\n    const { actives, query } = this.state;\n    if (actives && actives[rule] && query.profile) {\n      return actives[rule][query.profile];\n    } else {\n      return undefined;\n    }\n  };\n\n  getSelectedProfile = () => {\n    const { query, referencedProfiles } = this.state;\n    if (query.profile) {\n      return referencedProfiles[query.profile];\n    } else {\n      return undefined;\n    }\n  };\n\n  closeFacet = (facet: string) =>\n    this.setState(state => ({\n      openFacets: { ...state.openFacets, [facet]: false }\n    }));\n\n  handleRuleOpen = (ruleKey: string) => {\n    this.props.router.push(this.getRulePath(ruleKey));\n  };\n\n  handleBack = (event?: React.SyntheticEvent<HTMLAnchorElement>) => {\n    const { usingPermalink } = this.state;\n\n    if (event) {\n      event.preventDefault();\n      event.currentTarget.blur();\n    }\n\n    if (usingPermalink) {\n      this.handleReset();\n    } else {\n      this.closeRule();\n    }\n  };\n\n  handleFilterChange = (changes: Partial<Query>) => {\n    this.props.router.push({\n      pathname: this.props.location.pathname,\n      query: serializeQuery({ ...this.state.query, ...changes })\n    });\n\n    this.setState(({ openFacets }) => ({\n      openFacets: {\n        ...openFacets,\n        sonarsourceSecurity: shouldOpenSonarSourceSecurityFacet(openFacets, changes),\n        standards: shouldOpenStandardsFacet(openFacets, changes)\n      }\n    }));\n  };\n\n  handleFacetToggle = (property: string) => {\n    this.setState(state => {\n      const willOpenProperty = !state.openFacets[property];\n      const newState = {\n        loading: state.loading,\n        openFacets: { ...state.openFacets, [property]: willOpenProperty }\n      };\n\n      // Try to open sonarsource security \"subfacet\" by default if the standard facet is open\n      if (willOpenProperty && property === STANDARDS) {\n        newState.openFacets.sonarsourceSecurity = shouldOpenSonarSourceSecurityFacet(\n          newState.openFacets,\n          state.query\n        );\n        // Force loading of sonarsource security facet data\n        property = newState.openFacets.sonarsourceSecurity ? 'sonarsourceSecurity' : property;\n      }\n\n      if (shouldRequestFacet(property) && (!state.facets || !state.facets[property])) {\n        newState.loading = true;\n        this.fetchFacet(property);\n      }\n\n      return newState;\n    });\n  };\n\n  handleReload = () => this.fetchFirstRules();\n\n  handleReset = () => this.props.router.push({ pathname: this.props.location.pathname });\n\n  /** Tries to take rule by index, or takes the last one  */\n  pickRuleAround = (rules: T.Rule[], selectedIndex: number | undefined) => {\n    if (selectedIndex === undefined || rules.length === 0) {\n      return undefined;\n    }\n    if (selectedIndex >= 0 && selectedIndex < rules.length) {\n      return rules[selectedIndex].key;\n    }\n    return rules[rules.length - 1].key;\n  };\n\n  handleRuleDelete = (ruleKey: string) => {\n    if (this.state.query.ruleKey === ruleKey) {\n      this.handleReset();\n    } else {\n      this.setState(state => {\n        const rules = state.rules.filter(rule => rule.key !== ruleKey);\n        const selectedIndex = this.getSelectedIndex(state);\n        const selected = this.pickRuleAround(rules, selectedIndex);\n        return { rules, selected };\n      });\n      this.closeRule();\n    }\n  };\n\n  handleRuleActivate = (profile: string, rule: string, activation: Activation) =>\n    this.setState((state: State) => {\n      const { actives = {} } = state;\n      if (!actives[rule]) {\n        return { actives: { ...actives, [rule]: { [profile]: activation } } };\n      }\n\n      return { actives: { ...actives, [rule]: { ...actives[rule], [profile]: activation } } };\n    });\n\n  handleRuleDeactivate = (profile: string, rule: string) =>\n    this.setState(state => {\n      const { actives } = state;\n      if (actives && actives[rule]) {\n        const newRule = { ...actives[rule] };\n        delete newRule[profile];\n        return { actives: { ...actives, [rule]: newRule } };\n      }\n      return null;\n    });\n\n  handleSearch = (searchQuery: string) => this.handleFilterChange({ searchQuery });\n\n  isFiltered = () => Object.keys(serializeQuery(this.state.query)).length > 0;\n\n  renderBulkButton = () => {\n    const { currentUser, languages } = this.props;\n    const { canWrite, paging, query, referencedProfiles } = this.state;\n    const canUpdate = canWrite || Object.values(referencedProfiles).some(p => p.actions?.edit);\n\n    if (!isLoggedIn(currentUser) || !canUpdate) {\n      return <div />;\n    }\n\n    return (\n      paging && (\n        <BulkChange\n          languages={languages}\n          query={query}\n          referencedProfiles={referencedProfiles}\n          total={paging.total}\n        />\n      )\n    );\n  };\n\n  render() {\n    const { paging, rules } = this.state;\n    const selectedIndex = this.getSelectedIndex();\n\n    return (\n      <>\n        <Suggestions suggestions=\"coding_rules\" />\n        <Helmet defer={false} title={translate('coding_rules.page')}>\n          <meta content=\"noindex\" name=\"robots\" />\n        </Helmet>\n        <div className=\"layout-page\" id=\"coding-rules-page\">\n          <ScreenPositionHelper className=\"layout-page-side-outer\">\n            {({ top }) => (\n              <div className=\"layout-page-side\" style={{ top }}>\n                <div className=\"layout-page-side-inner\">\n                  <div className=\"layout-page-filters\">\n                    <A11ySkipTarget\n                      anchor=\"rules_filters\"\n                      label={translate('coding_rules.skip_to_filters')}\n                      weight={10}\n                    />\n                    <FiltersHeader displayReset={this.isFiltered()} onReset={this.handleReset} />\n                    <SearchBox\n                      className=\"spacer-bottom\"\n                      id=\"coding-rules-search\"\n                      maxLength={MAX_SEARCH_LENGTH}\n                      minLength={2}\n                      onChange={this.handleSearch}\n                      placeholder={translate('search.search_for_rules')}\n                      value={this.state.query.searchQuery || ''}\n                    />\n                    <FacetsList\n                      facets={this.state.facets}\n                      onFacetToggle={this.handleFacetToggle}\n                      onFilterChange={this.handleFilterChange}\n                      openFacets={this.state.openFacets}\n                      query={this.state.query}\n                      referencedProfiles={this.state.referencedProfiles}\n                      referencedRepositories={this.state.referencedRepositories}\n                      selectedProfile={this.getSelectedProfile()}\n                    />\n                  </div>\n                </div>\n              </div>\n            )}\n          </ScreenPositionHelper>\n\n          <div className=\"layout-page-main\">\n            <div className=\"layout-page-header-panel layout-page-main-header\">\n              <div className=\"layout-page-header-panel-inner layout-page-main-header-inner\">\n                <div className=\"layout-page-main-inner\">\n                  <A11ySkipTarget anchor=\"rules_main\" />\n                  <div className=\"display-flex-space-between\">\n                    {this.state.openRule ? (\n                      <a\n                        className=\"js-back display-inline-flex-center link-no-underline\"\n                        href=\"#\"\n                        onClick={this.handleBack}>\n                        <BackIcon className=\"spacer-right\" />\n                        {this.state.usingPermalink\n                          ? translate('coding_rules.see_all')\n                          : translate('coding_rules.return_to_list')}\n                      </a>\n                    ) : (\n                      this.renderBulkButton()\n                    )}\n                    {!this.state.usingPermalink && (\n                      <PageActions\n                        loading={this.state.loading}\n                        onReload={this.handleReload}\n                        paging={paging}\n                        selectedIndex={selectedIndex}\n                      />\n                    )}\n                  </div>\n                </div>\n              </div>\n            </div>\n\n            <div className=\"layout-page-main-inner\">\n              {this.state.openRule ? (\n                <RuleDetails\n                  allowCustomRules={true}\n                  canWrite={this.state.canWrite}\n                  onActivate={this.handleRuleActivate}\n                  onDeactivate={this.handleRuleDeactivate}\n                  onDelete={this.handleRuleDelete}\n                  onFilterChange={this.handleFilterChange}\n                  referencedProfiles={this.state.referencedProfiles}\n                  referencedRepositories={this.state.referencedRepositories}\n                  ruleKey={this.state.openRule.key}\n                  selectedProfile={this.getSelectedProfile()}\n                />\n              ) : (\n                <>\n                  {rules.map(rule => (\n                    <RuleListItem\n                      activation={this.getRuleActivation(rule.key)}\n                      canWrite={this.state.canWrite}\n                      isLoggedIn={isLoggedIn(this.props.currentUser)}\n                      key={rule.key}\n                      onActivate={this.handleRuleActivate}\n                      onDeactivate={this.handleRuleDeactivate}\n                      onFilterChange={this.handleFilterChange}\n                      onOpen={this.handleRuleOpen}\n                      rule={rule}\n                      selected={rule.key === this.state.selected}\n                      selectedProfile={this.getSelectedProfile()}\n                    />\n                  ))}\n                  {paging !== undefined && (\n                    <ListFooter\n                      count={rules.length}\n                      loadMore={this.fetchMoreRules}\n                      ready={!this.state.loading}\n                      total={paging.total}\n                    />\n                  )}\n                </>\n              )}\n            </div>\n          </div>\n        </div>\n      </>\n    );\n  }\n}\n\nfunction parseActives(rawActives: T.Dict<T.RuleActivation[]>) {\n  const actives: Actives = {};\n  for (const [rule, activations] of Object.entries(rawActives)) {\n    actives[rule] = {};\n    for (const { inherit, qProfile, severity } of activations) {\n      actives[rule][qProfile] = { inherit, severity };\n    }\n  }\n  return actives;\n}\n\nfunction parseFacets(rawFacets: { property: string; values: { count: number; val: string }[] }[]) {\n  const facets: Facets = {};\n  for (const rawFacet of rawFacets) {\n    const values: T.Dict<number> = {};\n    for (const rawValue of rawFacet.values) {\n      values[rawValue.val] = rawValue.count;\n    }\n    facets[getAppFacet(rawFacet.property)] = values;\n  }\n  return facets;\n}\n\nconst mapStateToProps = (state: Store) => ({\n  currentUser: getCurrentUser(state),\n  languages: getLanguages(state)\n});\n\nexport default withRouter(connect(mapStateToProps)(App));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { RedirectFunction, RouterState } from 'react-router';\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\nimport { parseQuery, serializeQuery } from './query';\n\nfunction parseHash(hash: string): T.RawQuery {\n  const query: T.RawQuery = {};\n  const parts = hash.split('|');\n  parts.forEach(part => {\n    const tokens = part.split('=');\n    if (tokens.length === 2) {\n      query[decodeURIComponent(tokens[0])] = decodeURIComponent(tokens[1]);\n    }\n  });\n  return query;\n}\n\nconst routes = [\n  {\n    indexRoute: {\n      onEnter: (nextState: RouterState, replace: RedirectFunction) => {\n        const { hash } = window.location;\n        if (hash.length > 1) {\n          const query = parseHash(hash.substr(1));\n          const normalizedQuery = {\n            ...serializeQuery(parseQuery(query)),\n            open: query.open\n          };\n          replace({ pathname: nextState.location.pathname, query: normalizedQuery });\n        }\n      },\n      component: lazyLoadComponent(() => import('./components/App'))\n    }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { MetricKey } from '../../../types/metrics';\n\nexport const bubbles: {\n  [domain: string]: {\n    x: string;\n    y: string;\n    size: string;\n    colors?: string[];\n    yDomain?: [number, number];\n  };\n} = {\n  Reliability: {\n    x: MetricKey.ncloc,\n    y: MetricKey.reliability_remediation_effort,\n    size: MetricKey.bugs,\n    colors: [MetricKey.reliability_rating]\n  },\n  Security: {\n    x: MetricKey.ncloc,\n    y: MetricKey.security_remediation_effort,\n    size: MetricKey.vulnerabilities,\n    colors: [MetricKey.security_rating]\n  },\n  Maintainability: {\n    x: MetricKey.ncloc,\n    y: MetricKey.sqale_index,\n    size: MetricKey.code_smells,\n    colors: [MetricKey.sqale_rating]\n  },\n  Coverage: {\n    x: MetricKey.complexity,\n    y: MetricKey.coverage,\n    size: MetricKey.uncovered_lines,\n    yDomain: [100, 0]\n  },\n  Duplications: {\n    x: MetricKey.ncloc,\n    y: MetricKey.duplicated_lines,\n    size: MetricKey.duplicated_blocks\n  },\n  project_overview: {\n    x: MetricKey.sqale_index,\n    y: MetricKey.coverage,\n    size: MetricKey.ncloc,\n    colors: [MetricKey.reliability_rating, MetricKey.security_rating],\n    yDomain: [100, 0]\n  }\n};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { MetricKey } from '../../../types/metrics';\n\ninterface Domains {\n  [domain: string]: { categories?: string[]; order: string[] };\n}\n\nexport const domains: Domains = {\n  Reliability: {\n    categories: ['new_code_category', 'overall_category'],\n    order: [\n      'new_code_category',\n      MetricKey.new_bugs,\n      MetricKey.new_reliability_rating,\n      MetricKey.new_reliability_remediation_effort,\n\n      'overall_category',\n      MetricKey.bugs,\n      MetricKey.reliability_rating,\n      MetricKey.reliability_remediation_effort\n    ]\n  },\n\n  Security: {\n    categories: ['new_code_category', 'overall_category'],\n    order: [\n      'new_code_category',\n      MetricKey.new_vulnerabilities,\n      MetricKey.new_security_rating,\n      MetricKey.new_security_remediation_effort,\n\n      'overall_category',\n      MetricKey.vulnerabilities,\n      MetricKey.security_rating,\n      MetricKey.security_remediation_effort\n    ]\n  },\n\n  SecurityReview: {\n    categories: ['new_code_category', 'overall_category'],\n    order: [\n      'new_code_category',\n      MetricKey.new_security_hotspots,\n      MetricKey.new_security_review_rating,\n      MetricKey.new_security_hotspots_reviewed,\n\n      'overall_category',\n      MetricKey.security_hotspots,\n      MetricKey.security_review_rating,\n      MetricKey.security_hotspots_reviewed\n    ]\n  },\n\n  Maintainability: {\n    categories: ['new_code_category', 'overall_category'],\n    order: [\n      'new_code_category',\n      MetricKey.new_code_smells,\n      MetricKey.new_technical_debt,\n      MetricKey.new_sqale_debt_ratio,\n      MetricKey.new_maintainability_rating,\n\n      'overall_category',\n      MetricKey.code_smells,\n      MetricKey.sqale_index,\n      MetricKey.sqale_debt_ratio,\n      MetricKey.sqale_rating,\n      MetricKey.effort_to_reach_maintainability_rating_a\n    ]\n  },\n\n  Coverage: {\n    categories: ['new_code_category', 'overall_category', 'tests_category'],\n    order: [\n      'new_code_category',\n      MetricKey.new_coverage,\n      MetricKey.new_lines_to_cover,\n      MetricKey.new_uncovered_lines,\n      MetricKey.new_line_coverage,\n      MetricKey.new_conditions_to_cover,\n      MetricKey.new_uncovered_conditions,\n      MetricKey.new_branch_coverage,\n\n      'overall_category',\n      MetricKey.coverage,\n      MetricKey.lines_to_cover,\n      MetricKey.uncovered_lines,\n      MetricKey.line_coverage,\n      MetricKey.conditions_to_cover,\n      MetricKey.uncovered_conditions,\n      MetricKey.branch_coverage,\n\n      'tests_category',\n      MetricKey.tests,\n      MetricKey.test_errors,\n      MetricKey.test_failures,\n      MetricKey.skipped_tests,\n      MetricKey.test_success_density,\n      MetricKey.test_execution_time\n    ]\n  },\n\n  Duplications: {\n    categories: ['new_code_category', 'overall_category'],\n    order: [\n      'new_code_category',\n      MetricKey.new_duplicated_lines_density,\n      MetricKey.new_duplicated_lines,\n      MetricKey.new_duplicated_blocks,\n\n      'overall_category',\n      MetricKey.duplicated_lines_density,\n      MetricKey.duplicated_lines,\n      MetricKey.duplicated_blocks,\n      MetricKey.duplicated_files\n    ]\n  },\n\n  Size: {\n    order: [\n      MetricKey.new_lines,\n\n      MetricKey.ncloc,\n      MetricKey.lines,\n      MetricKey.statements,\n      MetricKey.functions,\n      MetricKey.classes,\n      MetricKey.files,\n      MetricKey.directories\n    ]\n  },\n\n  Complexity: {\n    order: ['complexity', 'function_complexity', 'file_complexity', 'class_complexity']\n  },\n\n  Releasability: {\n    order: ['releasability_rating', 'releasability_effort', 'alert_status']\n  },\n\n  Issues: {\n    order: [\n      MetricKey.new_violations,\n      MetricKey.new_blocker_violations,\n      MetricKey.new_critical_violations,\n      MetricKey.new_major_violations,\n      MetricKey.new_minor_violations,\n      MetricKey.new_info_violations,\n\n      MetricKey.violations,\n      MetricKey.blocker_violations,\n      MetricKey.critical_violations,\n      MetricKey.major_violations,\n      MetricKey.minor_violations,\n      MetricKey.info_violations,\n      MetricKey.open_issues,\n      MetricKey.reopened_issues,\n      MetricKey.confirmed_issues,\n      MetricKey.false_positive_issues\n    ]\n  }\n};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy, memoize, sortBy, toPairs } from 'lodash';\nimport { enhanceMeasure } from '../../components/measure/utils';\nimport { isBranch, isPullRequest } from '../../helpers/branch-like';\nimport { getLocalizedMetricName } from '../../helpers/l10n';\nimport { getDisplayMetrics, isDiffMetric } from '../../helpers/measures';\nimport { cleanQuery, parseAsString, serializeString } from '../../helpers/query';\nimport { BranchLike } from '../../types/branch-like';\nimport { ComponentQualifier } from '../../types/component';\nimport { MeasurePageView } from '../../types/measures';\nimport { MetricKey } from '../../types/metrics';\nimport { bubbles } from './config/bubbles';\nimport { domains } from './config/domains';\n\nexport const BUBBLES_FETCH_LIMIT = 500;\nexport const PROJECT_OVERVEW = 'project_overview';\nexport const DEFAULT_VIEW: MeasurePageView = 'tree';\nexport const DEFAULT_METRIC = PROJECT_OVERVEW;\nexport const KNOWN_DOMAINS = [\n  'Releasability',\n  'Reliability',\n  'Security',\n  'SecurityReview',\n  'Maintainability',\n  'Coverage',\n  'Duplications',\n  'Size',\n  'Complexity'\n];\nconst BANNED_MEASURES = [\n  'blocker_violations',\n  'new_blocker_violations',\n  'critical_violations',\n  'new_critical_violations',\n  'major_violations',\n  'new_major_violations',\n  'minor_violations',\n  'new_minor_violations',\n  'info_violations',\n  'new_info_violations'\n];\n\nexport function filterMeasures(measures: T.MeasureEnhanced[]): T.MeasureEnhanced[] {\n  return measures.filter(measure => !BANNED_MEASURES.includes(measure.metric.key));\n}\n\nexport function sortMeasures(\n  domainName: string,\n  measures: Array<T.MeasureEnhanced | string>\n): Array<T.MeasureEnhanced | string> {\n  const config = domains[domainName] || {};\n  const configOrder = config.order || [];\n  return sortBy(measures, [\n    (item: T.MeasureEnhanced | string) => {\n      if (typeof item === 'string') {\n        return configOrder.indexOf(item);\n      }\n      const idx = configOrder.indexOf(item.metric.key);\n      return idx >= 0 ? idx : configOrder.length;\n    },\n    (item: T.MeasureEnhanced | string) =>\n      typeof item === 'string' ? item : getLocalizedMetricName(item.metric)\n  ]);\n}\n\nexport function addMeasureCategories(domainName: string, measures: T.MeasureEnhanced[]) {\n  const categories = domains[domainName] && domains[domainName].categories;\n  if (categories && categories.length > 0) {\n    return [...categories, ...measures];\n  }\n  return measures;\n}\n\nexport function enhanceComponent(\n  component: T.ComponentMeasure,\n  metric: Pick<T.Metric, 'key'> | undefined,\n  metrics: T.Dict<T.Metric>\n): T.ComponentMeasureEnhanced {\n  if (!component.measures) {\n    return { ...component, measures: [] };\n  }\n\n  const enhancedMeasures = component.measures.map(measure => enhanceMeasure(measure, metrics));\n  const measure = metric && enhancedMeasures.find(measure => measure.metric.key === metric.key);\n  const value = measure && measure.value;\n  const leak = measure && measure.leak;\n  return { ...component, value, leak, measures: enhancedMeasures };\n}\n\nexport function isSecurityReviewMetric(metricKey: MetricKey | string): boolean {\n  return [\n    MetricKey.security_hotspots,\n    MetricKey.security_hotspots_reviewed,\n    MetricKey.security_review_rating,\n    MetricKey.new_security_hotspots,\n    MetricKey.new_security_hotspots_reviewed,\n    MetricKey.new_security_review_rating\n  ].includes(metricKey as MetricKey);\n}\n\nexport function banQualityGateMeasure({\n  measures = [],\n  qualifier\n}: T.ComponentMeasure): T.Measure[] {\n  const bannedMetrics: string[] = [];\n  if (ComponentQualifier.Portfolio !== qualifier && ComponentQualifier.SubPortfolio !== qualifier) {\n    bannedMetrics.push('alert_status');\n  }\n  if (qualifier === ComponentQualifier.Application) {\n    bannedMetrics.push('releasability_rating', 'releasability_effort');\n  }\n  return measures.filter(measure => !bannedMetrics.includes(measure.metric));\n}\n\nexport const groupByDomains = memoize((measures: T.MeasureEnhanced[]) => {\n  const domains = toPairs(groupBy(measures, measure => measure.metric.domain)).map(r => ({\n    name: r[0],\n    measures: r[1]\n  }));\n\n  return sortBy(domains, [\n    (domain: { name: string; measures: T.MeasureEnhanced[] }) => {\n      const idx = KNOWN_DOMAINS.indexOf(domain.name);\n      return idx >= 0 ? idx : KNOWN_DOMAINS.length;\n    },\n    'name'\n  ]);\n});\n\nexport function hasList(metric: string): boolean {\n  return !['releasability_rating', 'releasability_effort'].includes(metric);\n}\n\nexport function hasTree(metric: string): boolean {\n  return metric !== 'alert_status';\n}\n\nexport function hasTreemap(metric: string, type: string): boolean {\n  return ['PERCENT', 'RATING', 'LEVEL'].includes(type) && hasTree(metric);\n}\n\nexport function hasBubbleChart(domainName: string): boolean {\n  return bubbles[domainName] !== undefined;\n}\n\nexport function hasFacetStat(metric: string): boolean {\n  return metric !== 'alert_status';\n}\n\nexport function hasFullMeasures(branch?: BranchLike) {\n  return !branch || isBranch(branch);\n}\n\nexport function getMeasuresPageMetricKeys(metrics: T.Dict<T.Metric>, branch?: BranchLike) {\n  const metricKeys = getDisplayMetrics(Object.values(metrics)).map(metric => metric.key);\n\n  if (isPullRequest(branch)) {\n    return metricKeys.filter(key => isDiffMetric(key));\n  } else {\n    return metricKeys;\n  }\n}\n\nexport function getBubbleMetrics(domain: string, metrics: T.Dict<T.Metric>) {\n  const conf = bubbles[domain];\n  return {\n    x: metrics[conf.x],\n    y: metrics[conf.y],\n    size: metrics[conf.size],\n    colors: conf.colors && conf.colors.map(color => metrics[color])\n  };\n}\n\nexport function getBubbleYDomain(domain: string) {\n  return bubbles[domain].yDomain;\n}\n\nexport function isProjectOverview(metric: string) {\n  return metric === PROJECT_OVERVEW;\n}\n\nfunction parseView(metric: string, rawView?: string): MeasurePageView {\n  const view = (parseAsString(rawView) || DEFAULT_VIEW) as MeasurePageView;\n  if (!hasTree(metric)) {\n    return 'list';\n  } else if (view === 'list' && !hasList(metric)) {\n    return 'tree';\n  }\n  return view;\n}\n\nexport interface Query {\n  metric: string;\n  selected?: string;\n  view: MeasurePageView;\n}\n\nexport const parseQuery = memoize(\n  (urlQuery: T.RawQuery): Query => {\n    const metric = parseAsString(urlQuery['metric']) || DEFAULT_METRIC;\n    return {\n      metric,\n      selected: parseAsString(urlQuery['selected']),\n      view: parseView(metric, urlQuery['view'])\n    };\n  }\n);\n\nexport const serializeQuery = memoize((query: Query) => {\n  return cleanQuery({\n    metric: query.metric === DEFAULT_METRIC ? undefined : serializeString(query.metric),\n    selected: serializeString(query.selected),\n    view: query.view === DEFAULT_VIEW ? undefined : serializeString(query.view)\n  });\n});\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function BubblesIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon style={{ fillRule: 'nonzero' }} {...iconProps}>\n      <path\n        d=\"M4.1 10.2c1 0 1.9.8 1.9 1.9S5.1 14 4.1 14s-1.9-.8-1.9-1.9.8-1.9 1.9-1.9m0-2C2 8.2.2 9.9.2 12.1S1.9 16 4.1 16 8 14.3 8 12.1 6.2 8.2 4.1 8.2zM10.3 2c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7-3.8-1.6-3.8-3.7S8.2 2 10.3 2m0-2C7.1 0 4.5 2.6 4.5 5.7s2.6 5.7 5.7 5.7S16 8.9 16 5.7 13.4 0 10.3 0z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Measure from '../../../components/measure/Measure';\nimport { isDiffMetric } from '../../../helpers/measures';\n\ninterface Props {\n  displayLeak?: boolean;\n  measure: T.MeasureEnhanced;\n}\n\nexport default function FacetMeasureValue({ measure, displayLeak }: Props) {\n  if (isDiffMetric(measure.metric.key)) {\n    return (\n      <div\n        className={classNames('domain-measures-value', { 'leak-box': displayLeak })}\n        id={`measure-${measure.metric.key}-leak`}>\n        <Measure\n          metricKey={measure.metric.key}\n          metricType={measure.metric.type}\n          value={measure.leak}\n        />\n      </div>\n    );\n  }\n\n  return (\n    <div className=\"domain-measures-value\" id={`measure-${measure.metric.key}-value`}>\n      <Measure\n        metricKey={measure.metric.key}\n        metricType={measure.metric.type}\n        value={measure.value}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport BubblesIcon from '../../../components/icons/BubblesIcon';\nimport {\n  getLocalizedCategoryMetricName,\n  getLocalizedMetricDomain,\n  getLocalizedMetricName,\n  hasMessage,\n  translate\n} from '../../../helpers/l10n';\nimport {\n  addMeasureCategories,\n  filterMeasures,\n  hasBubbleChart,\n  hasFacetStat,\n  sortMeasures\n} from '../utils';\nimport FacetMeasureValue from './FacetMeasureValue';\n\ninterface Props {\n  domain: { name: string; measures: T.MeasureEnhanced[] };\n  onChange: (metric: string) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  selected: string;\n  showFullMeasures: boolean;\n}\n\nexport default class DomainFacet extends React.PureComponent<Props> {\n  getValues = () => {\n    const { domain, selected } = this.props;\n    const measureSelected = domain.measures.find(measure => measure.metric.key === selected);\n    const overviewSelected = domain.name === selected && this.hasOverview(domain.name);\n    if (measureSelected) {\n      return [getLocalizedMetricName(measureSelected.metric)];\n    }\n    return overviewSelected ? [translate('component_measures.domain_overview')] : [];\n  };\n\n  handleHeaderClick = () => {\n    this.props.onToggle(this.props.domain.name);\n  };\n\n  hasFacetSelected = (\n    domain: { name: string },\n    measures: T.MeasureEnhanced[],\n    selected: string\n  ) => {\n    const measureSelected = measures.find(measure => measure.metric.key === selected);\n    const overviewSelected = domain.name === selected && this.hasOverview(domain.name);\n    return measureSelected || overviewSelected;\n  };\n\n  hasOverview = (domain: string) => {\n    return this.props.showFullMeasures && hasBubbleChart(domain);\n  };\n\n  renderItemFacetStat = (item: T.MeasureEnhanced) => {\n    return hasFacetStat(item.metric.key) ? (\n      <FacetMeasureValue displayLeak={this.props.showFullMeasures} measure={item} />\n    ) : null;\n  };\n\n  renderCategoryItem = (item: string) => {\n    return this.props.showFullMeasures || item === 'new_code_category' ? (\n      <span className=\"facet search-navigator-facet facet-category\" key={item}>\n        <span className=\"facet-name\">{translate('component_measures.facet_category', item)}</span>\n      </span>\n    ) : null;\n  };\n\n  renderItemsFacet = () => {\n    const { domain, selected } = this.props;\n    const items = addMeasureCategories(domain.name, filterMeasures(domain.measures));\n    const hasCategories = items.some(item => typeof item === 'string');\n    const translateMetric = hasCategories ? getLocalizedCategoryMetricName : getLocalizedMetricName;\n    let sortedItems = sortMeasures(domain.name, items);\n\n    sortedItems = sortedItems.filter((item, index) => {\n      return (\n        typeof item !== 'string' ||\n        (index + 1 !== sortedItems.length && typeof sortedItems[index + 1] !== 'string')\n      );\n    });\n\n    return sortedItems.map(item =>\n      typeof item === 'string' ? (\n        this.renderCategoryItem(item)\n      ) : (\n        <FacetItem\n          active={item.metric.key === selected}\n          disabled={false}\n          key={item.metric.key}\n          name={\n            <span className=\"big-spacer-left\" id={`measure-${item.metric.key}-name`}>\n              {translateMetric(item.metric)}\n            </span>\n          }\n          onClick={this.props.onChange}\n          stat={this.renderItemFacetStat(item)}\n          tooltip={translateMetric(item.metric)}\n          value={item.metric.key}\n        />\n      )\n    );\n  };\n\n  renderOverviewFacet = () => {\n    const { domain, selected } = this.props;\n    if (!this.hasOverview(domain.name)) {\n      return null;\n    }\n    return (\n      <FacetItem\n        active={domain.name === selected}\n        disabled={false}\n        key={domain.name}\n        name={\n          <span id={`measure-overview-${domain.name}-name`}>\n            {translate('component_measures.domain_overview')}\n          </span>\n        }\n        onClick={this.props.onChange}\n        stat={<BubblesIcon size={14} />}\n        tooltip={translate('component_measures.domain_overview')}\n        value={domain.name}\n      />\n    );\n  };\n\n  render() {\n    const { domain } = this.props;\n    const helperMessageKey = `component_measures.domain_facets.${domain.name}.help`;\n    const helper = hasMessage(helperMessageKey) ? translate(helperMessageKey) : undefined;\n    return (\n      <FacetBox property={domain.name}>\n        <FacetHeader\n          helper={helper}\n          name={getLocalizedMetricDomain(domain.name)}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={this.getValues()}\n        />\n\n        {this.props.open && (\n          <FacetItemsList>\n            {this.renderOverviewFacet()}\n            {this.renderItemsFacet()}\n          </FacetItemsList>\n        )}\n      </FacetBox>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onChange: (metric: string) => void;\n  selected: string;\n  value: string;\n}\n\nexport default function ProjectOverviewFacet({ value, selected, onChange }: Props) {\n  const facetName = translate('component_measures.overview', value, 'facet');\n  return (\n    <FacetBox property={value}>\n      <FacetItemsList>\n        <FacetItem\n          active={value === selected}\n          disabled={false}\n          key={value}\n          name={<strong id={`measure-overview-${value}-name`}>{facetName}</strong>}\n          onClick={onChange}\n          tooltip={facetName}\n          value={value}\n        />\n      </FacetItemsList>\n    </FacetBox>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport { translate } from '../../../helpers/l10n';\nimport { groupByDomains, KNOWN_DOMAINS, PROJECT_OVERVEW, Query } from '../utils';\nimport DomainFacet from './DomainFacet';\nimport ProjectOverviewFacet from './ProjectOverviewFacet';\n\ninterface Props {\n  measures: T.MeasureEnhanced[];\n  selectedMetric: string;\n  showFullMeasures: boolean;\n  updateQuery: (query: Partial<Query>) => void;\n}\n\ninterface State {\n  openFacets: T.Dict<boolean>;\n}\n\nexport default class Sidebar extends React.PureComponent<Props, State> {\n  static getDerivedStateFromProps(props: Props, state: State) {\n    return { openFacets: getOpenFacets(state.openFacets, props) };\n  }\n\n  state: State = {\n    openFacets: {}\n  };\n\n  toggleFacet = (name: string) => {\n    this.setState(({ openFacets }) => ({\n      openFacets: { ...openFacets, [name]: !openFacets[name] }\n    }));\n  };\n\n  changeMetric = (metric: string) => {\n    this.props.updateQuery({ metric });\n  };\n\n  render() {\n    const { showFullMeasures } = this.props;\n    return (\n      <div>\n        <A11ySkipTarget\n          anchor=\"measures_filters\"\n          label={translate('component_measures.skip_to_filters')}\n          weight={10}\n        />\n        <ProjectOverviewFacet\n          onChange={this.changeMetric}\n          selected={this.props.selectedMetric}\n          value={PROJECT_OVERVEW}\n        />\n        {groupByDomains(this.props.measures).map(domain => (\n          <DomainFacet\n            domain={domain}\n            key={domain.name}\n            onChange={this.changeMetric}\n            onToggle={this.toggleFacet}\n            open={this.state.openFacets[domain.name] === true}\n            selected={this.props.selectedMetric}\n            showFullMeasures={showFullMeasures}\n          />\n        ))}\n      </div>\n    );\n  }\n}\n\nfunction getOpenFacets(openFacets: T.Dict<boolean>, { measures, selectedMetric }: Props) {\n  const newOpenFacets = { ...openFacets };\n  const measure = measures.find(measure => measure.metric.key === selectedMetric);\n  if (measure && measure.metric && measure.metric.domain) {\n    newOpenFacets[measure.metric.domain] = true;\n  } else if (KNOWN_DOMAINS.includes(selectedMetric)) {\n    newOpenFacets[selectedMetric] = true;\n  }\n  return newOpenFacets;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const complementary: T.Dict<string[]> = {\n  coverage: ['uncovered_lines', 'uncovered_conditions'],\n  line_coverage: ['uncovered_lines'],\n  branch_coverage: ['uncovered_conditions'],\n  uncovered_lines: ['line_coverage'],\n  uncovered_conditions: ['branch_coverage'],\n\n  new_coverage: ['new_uncovered_lines', 'new_uncovered_conditions'],\n  new_line_coverage: ['new_uncovered_lines'],\n  new_branch_coverage: ['new_uncovered_conditions'],\n  new_uncovered_lines: ['new_line_coverage'],\n  new_uncovered_conditions: ['new_branch_coverage'],\n\n  duplicated_lines_density: ['duplicated_lines'],\n  new_duplicated_lines_density: ['new_duplicated_lines'],\n  duplicated_lines: ['duplicated_lines_density'],\n  new_duplicated_lines: ['new_duplicated_lines_density']\n};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { LocationDescriptor } from 'history';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport BranchIcon from '../../../components/icons/BranchIcon';\nimport LinkIcon from '../../../components/icons/LinkIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { fillBranchLike } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { splitPath } from '../../../helpers/path';\nimport { getComponentDrilldownUrlWithSelection, getProjectUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport {\n  ComponentQualifier,\n  isApplication,\n  isPortfolioLike,\n  isProject\n} from '../../../types/component';\nimport { MeasurePageView } from '../../../types/measures';\nimport { MetricKey } from '../../../types/metrics';\n\nexport interface ComponentCellProps {\n  branchLike?: BranchLike;\n  component: T.ComponentMeasureEnhanced;\n  metric: T.Metric;\n  rootComponent: T.ComponentMeasure;\n  view: MeasurePageView;\n}\n\nexport default function ComponentCell(props: ComponentCellProps) {\n  const { branchLike, component, metric, rootComponent, view } = props;\n\n  let head = '';\n  let tail = component.name;\n\n  if (\n    view === 'list' &&\n    ([\n      ComponentQualifier.File,\n      ComponentQualifier.TestFile,\n      ComponentQualifier.Directory\n    ] as string[]).includes(component.qualifier) &&\n    component.path\n  ) {\n    ({ head, tail } = splitPath(component.path));\n  }\n\n  let path: LocationDescriptor;\n  const targetKey = component.refKey || rootComponent.key;\n  const selectionKey = component.refKey ? '' : component.key;\n\n  // drilldown by default\n  path = getComponentDrilldownUrlWithSelection(\n    targetKey,\n    selectionKey,\n    metric.key,\n    component.branch ? fillBranchLike(component.branch) : branchLike,\n    view\n  );\n\n  // This metric doesn't exist for project\n  if (metric.key === MetricKey.projects && isProject(component.qualifier)) {\n    path = getProjectUrl(targetKey, component.branch);\n  }\n\n  // Those metric doesn't exist for application and project\n  if (\n    ([MetricKey.releasability_rating, MetricKey.alert_status] as string[]).includes(metric.key) &&\n    (isApplication(component.qualifier) || isProject(component.qualifier))\n  ) {\n    path = getProjectUrl(targetKey, component.branch);\n  }\n\n  return (\n    <td className=\"measure-details-component-cell\">\n      <div className=\"text-ellipsis\">\n        <Link\n          className=\"link-no-underline\"\n          to={path}\n          id={'component-measures-component-link-' + component.key}>\n          {component.refKey && (\n            <span className=\"big-spacer-right\">\n              <LinkIcon />\n            </span>\n          )}\n          <span title={component.key}>\n            <QualifierIcon className=\"little-spacer-right\" qualifier={component.qualifier} />\n            {head.length > 0 && <span className=\"note\">{head}/</span>}\n            <span>{tail}</span>\n            {(isApplication(rootComponent.qualifier) || isPortfolioLike(rootComponent.qualifier)) &&\n              (component.branch ? (\n                <>\n                  <BranchIcon className=\"spacer-left little-spacer-right\" />\n                  <span className=\"note\">{component.branch}</span>\n                </>\n              ) : (\n                <span className=\"spacer-left badge\">{translate('branches.main_branch')}</span>\n              ))}\n          </span>\n        </Link>\n      </div>\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Measure from '../../../components/measure/Measure';\nimport { isDiffMetric } from '../../../helpers/measures';\n\ninterface Props {\n  component: T.ComponentMeasureEnhanced;\n  measure?: T.MeasureEnhanced;\n  metric: T.Metric;\n}\n\nexport default function MeasureCell({ component, measure, metric }: Props) {\n  const getValue = (item: { leak?: string; value?: string }) =>\n    isDiffMetric(metric.key) ? item.leak : item.value;\n\n  const value = getValue(measure || component);\n\n  return (\n    <td className=\"thin nowrap text-right\">\n      <span id={`component-measures-component-measure-${component.key}-${metric.key}`}>\n        <Measure metricKey={metric.key} metricType={metric.type} value={value} />\n      </span>\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { BranchLike } from '../../../types/branch-like';\nimport { MeasurePageView } from '../../../types/measures';\nimport ComponentCell from './ComponentCell';\nimport MeasureCell from './MeasureCell';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.ComponentMeasureEnhanced;\n  isSelected: boolean;\n  otherMetrics: T.Metric[];\n  metric: T.Metric;\n  rootComponent: T.ComponentMeasure;\n  view: MeasurePageView;\n}\n\nexport default function ComponentsListRow(props: Props) {\n  const { branchLike, component, rootComponent } = props;\n  const otherMeasures = props.otherMetrics.map(metric => {\n    const measure = component.measures.find(measure => measure.metric.key === metric.key);\n    return { ...measure, metric };\n  });\n  const rowClass = classNames('measure-details-component-row', {\n    selected: props.isSelected\n  });\n  return (\n    <tr className={rowClass}>\n      <ComponentCell\n        branchLike={branchLike}\n        component={component}\n        metric={props.metric}\n        rootComponent={rootComponent}\n        view={props.view}\n      />\n\n      <MeasureCell component={component} metric={props.metric} />\n\n      {otherMeasures.map(measure => (\n        <MeasureCell\n          component={component}\n          key={measure.metric.key}\n          measure={measure}\n          metric={measure.metric}\n        />\n      ))}\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function EmptyResult() {\n  return <div className=\"note\">{translate('no_results')}</div>;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getComponentMeasureUniqueKey } from '../../../helpers/component';\nimport { getLocalizedMetricName } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport { MeasurePageView } from '../../../types/measures';\nimport { complementary } from '../config/complementary';\nimport ComponentsListRow from './ComponentsListRow';\nimport EmptyResult from './EmptyResult';\n\ninterface Props {\n  branchLike?: BranchLike;\n  components: T.ComponentMeasureEnhanced[];\n  metric: T.Metric;\n  metrics: T.Dict<T.Metric>;\n  rootComponent: T.ComponentMeasure;\n  selectedComponent?: T.ComponentMeasureEnhanced;\n  view: MeasurePageView;\n}\n\nexport default function ComponentsList({ components, metric, metrics, ...props }: Props) {\n  if (!components.length) {\n    return <EmptyResult />;\n  }\n\n  const otherMetrics = (complementary[metric.key] || []).map(key => metrics[key]);\n  return (\n    <table className=\"data zebra zebra-hover\">\n      {otherMetrics.length > 0 && (\n        <thead>\n          <tr>\n            <th>&nbsp;</th>\n            <th className=\"text-right\">\n              <span className=\"small\">{getLocalizedMetricName(metric)}</span>\n            </th>\n            {otherMetrics.map(metric => (\n              <th className=\"text-right\" key={metric.key}>\n                <span className=\"small\">{getLocalizedMetricName(metric)}</span>\n              </th>\n            ))}\n          </tr>\n        </thead>\n      )}\n\n      <tbody>\n        {components.map(component => (\n          <ComponentsListRow\n            component={component}\n            isSelected={\n              getComponentMeasureUniqueKey(component) ===\n              getComponentMeasureUniqueKey(props.selectedComponent)\n            }\n            key={getComponentMeasureUniqueKey(component)}\n            metric={metric}\n            otherMetrics={otherMetrics}\n            {...props}\n          />\n        ))}\n      </tbody>\n    </table>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport key from 'keymaster';\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure, isDiffMetric, isPeriodBestValue } from '../../../helpers/measures';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { BranchLike } from '../../../types/branch-like';\nimport { MeasurePageView } from '../../../types/measures';\nimport ComponentsList from './ComponentsList';\n\ninterface Props {\n  branchLike?: BranchLike;\n  components: T.ComponentMeasureEnhanced[];\n  defaultShowBestMeasures: boolean;\n  fetchMore: () => void;\n  handleSelect: (component: T.ComponentMeasureEnhanced) => void;\n  handleOpen: (component: T.ComponentMeasureEnhanced) => void;\n  loadingMore: boolean;\n  metric: T.Metric;\n  metrics: T.Dict<T.Metric>;\n  paging?: T.Paging;\n  rootComponent: T.ComponentMeasure;\n  selectedComponent?: T.ComponentMeasureEnhanced;\n  selectedIdx?: number;\n  view: MeasurePageView;\n}\n\ninterface State {\n  showBestMeasures: boolean;\n}\n\nconst keyScope = 'measures-files';\n\nexport default class FilesView extends React.PureComponent<Props, State> {\n  listContainer?: HTMLElement | null;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = { showBestMeasures: props.defaultShowBestMeasures };\n    this.selectNext = throttle(this.selectNext, 100);\n    this.selectPrevious = throttle(this.selectPrevious, 100);\n  }\n\n  componentDidMount() {\n    this.attachShortcuts();\n    if (this.props.selectedComponent !== undefined) {\n      this.scrollToElement();\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      this.props.selectedComponent &&\n      prevProps.selectedComponent !== this.props.selectedComponent\n    ) {\n      this.scrollToElement();\n    }\n    if (prevProps.metric.key !== this.props.metric.key || prevProps.view !== this.props.view) {\n      this.setState({ showBestMeasures: this.props.defaultShowBestMeasures });\n    }\n  }\n\n  componentWillUnmount() {\n    this.detachShortcuts();\n  }\n\n  attachShortcuts() {\n    key('up', keyScope, () => {\n      this.selectPrevious();\n      return false;\n    });\n    key('down', keyScope, () => {\n      this.selectNext();\n      return false;\n    });\n    key('right', keyScope, () => {\n      this.openSelected();\n      return false;\n    });\n  }\n\n  detachShortcuts() {\n    ['up', 'down', 'right'].forEach(action => key.unbind(action, keyScope));\n  }\n\n  getVisibleComponents = () => {\n    const { components } = this.props;\n    if (this.state.showBestMeasures) {\n      return components;\n    }\n    const filtered = components.filter(component => !this.hasBestValue(component));\n    if (filtered.length === 0) {\n      return components;\n    }\n    return filtered;\n  };\n\n  handleShowBestMeasures = () => {\n    this.setState({ showBestMeasures: true });\n  };\n\n  hasBestValue = (component: T.ComponentMeasureEnhanced) => {\n    const { metric } = this.props;\n    const focusedMeasure = component.measures.find(measure => measure.metric.key === metric.key);\n    if (focusedMeasure && isDiffMetric(metric.key)) {\n      return isPeriodBestValue(focusedMeasure);\n    }\n    return Boolean(focusedMeasure && focusedMeasure.bestValue);\n  };\n\n  openSelected = () => {\n    if (this.props.selectedComponent !== undefined) {\n      this.props.handleOpen(this.props.selectedComponent);\n    }\n  };\n\n  selectPrevious = () => {\n    const { selectedIdx } = this.props;\n    const visibleComponents = this.getVisibleComponents();\n    if (selectedIdx !== undefined && selectedIdx > 0) {\n      this.props.handleSelect(visibleComponents[selectedIdx - 1]);\n    } else {\n      this.props.handleSelect(visibleComponents[visibleComponents.length - 1]);\n    }\n  };\n\n  selectNext = () => {\n    const { selectedIdx } = this.props;\n    const visibleComponents = this.getVisibleComponents();\n    if (selectedIdx !== undefined && selectedIdx < visibleComponents.length - 1) {\n      this.props.handleSelect(visibleComponents[selectedIdx + 1]);\n    } else {\n      this.props.handleSelect(visibleComponents[0]);\n    }\n  };\n\n  scrollToElement = () => {\n    if (this.listContainer) {\n      const elem = this.listContainer.getElementsByClassName('selected')[0];\n      if (elem) {\n        scrollToElement(elem, { topOffset: 215, bottomOffset: 100 });\n      }\n    }\n  };\n\n  render() {\n    const { components } = this.props;\n    const filteredComponents = this.getVisibleComponents();\n    const hidingBestMeasures = filteredComponents.length < components.length;\n    return (\n      <div ref={elem => (this.listContainer = elem)}>\n        <ComponentsList\n          branchLike={this.props.branchLike}\n          components={filteredComponents}\n          metric={this.props.metric}\n          metrics={this.props.metrics}\n          rootComponent={this.props.rootComponent}\n          selectedComponent={this.props.selectedComponent}\n          view={this.props.view}\n        />\n        {hidingBestMeasures && this.props.paging && (\n          <Alert className=\"spacer-top\" variant=\"info\">\n            <div className=\"display-flex-center\">\n              {translateWithParameters(\n                'component_measures.hidden_best_score_metrics',\n                formatMeasure(this.props.paging.total - filteredComponents.length, 'INT'),\n                formatMeasure(this.props.metric.bestValue, this.props.metric.type)\n              )}\n              <Button className=\"button-small spacer-left\" onClick={this.handleShowBestMeasures}>\n                {translate('show_them')}\n              </Button>\n            </div>\n          </Alert>\n        )}\n        {!hidingBestMeasures && this.props.paging && this.props.components.length > 0 && (\n          <ListFooter\n            count={this.props.components.length}\n            loadMore={this.props.fetchMore}\n            loading={this.props.loadingMore}\n            total={this.props.paging.total}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "export default function(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "import ascending from \"./ascending.js\";\n\nexport default function(compare) {\n  if (compare.length === 1) compare = ascendingComparator(compare);\n  return {\n    left: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      }\n      return lo;\n    },\n    right: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) > 0) hi = mid;\n        else lo = mid + 1;\n      }\n      return lo;\n    }\n  };\n}\n\nfunction ascendingComparator(f) {\n  return function(d, x) {\n    return ascending(f(d), x);\n  };\n}\n", "import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\n\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;\n", "export default function(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n}\n", "export default function(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n}\n", "var e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    start = Math.ceil(start / step);\n    stop = Math.floor(stop / step);\n    ticks = new Array(n = Math.ceil(stop - start + 1));\n    while (++i < n) ticks[i] = (start + i) * step;\n  } else {\n    start = Math.floor(start * step);\n    stop = Math.ceil(stop * step);\n    ticks = new Array(n = Math.ceil(start - stop + 1));\n    while (++i < n) ticks[i] = (start - i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n", "export default function max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n", "export default function min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n", "export {default as bisect, bisectRight, bisectLeft} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {default as group, groups, rollup, rollups} from \"./group.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\n", "export function initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: {\n      if (typeof domain === \"function\") this.interpolator(domain);\n      else this.range(domain);\n      break;\n    }\n    default: {\n      this.domain(domain);\n      if (typeof interpolator === \"function\") this.interpolator(interpolator);\n      else this.range(interpolator);\n      break;\n    }\n  }\n  return this;\n}\n", "import {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n  var index = new Map(),\n      domain = [],\n      range = [],\n      unknown = implicit;\n\n  function scale(d) {\n    var key = d + \"\", i = index.get(key);\n    if (!i) {\n      if (unknown !== implicit) return unknown;\n      index.set(key, i = domain.push(d));\n    }\n    return range[(i - 1) % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = new Map();\n    for (const value of _) {\n      const key = value + \"\";\n      if (index.has(key)) continue;\n      index.set(key, domain.push(value));\n    }\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal(domain, range).unknown(unknown);\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n", "import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n  var scale = ordinal().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      r0 = 0,\n      r1 = 1,\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = r1 < r0,\n        start = reverse ? r1 : r0,\n        stop = reverse ? r0 : r1;\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = sequence(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n  };\n\n  scale.rangeRound = function(_) {\n    return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band(domain(), [r0, r1])\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nexport function point() {\n  return pointish(band.apply(null, arguments).paddingInner(1));\n}\n", "export default function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n", "import define, {extend} from \"./define\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex3 = /^#([0-9a-f]{3})$/,\n    reHex6 = /^#([0-9a-f]{6})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  hex: function() {\n    return this.rgb().hex();\n  },\n  toString: function() {\n    return this.rgb() + \"\";\n  }\n});\n\nexport default function color(format) {\n  var m;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00\n      : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format])\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: function() {\n    return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n  },\n  toString: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"rgb(\" : \"rgba(\")\n        + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n", "export var deg2rad = Math.PI / 180;\nexport var rad2deg = 180 / Math.PI;\n", "import define, {extend} from \"./define\";\nimport {Color, rgbConvert, Rgb} from \"./color\";\nimport {deg2rad, rad2deg} from \"./math\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nvar K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n  brighter: function(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new Rgb(\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * rad2deg;\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * deg2rad;\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return hcl2lab(this).rgb();\n  }\n}));\n", "import define, {extend} from \"./define\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color\";\nimport {deg2rad, rad2deg} from \"./math\";\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new Rgb(\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n", "export {default as color, rgb, hsl} from \"./color\";\nexport {default as lab, hcl, lch, gray} from \"./lab\";\nexport {default as cubehelix} from \"./cubehelix\";\n", "export function basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\nexport default function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nexport function hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\n\nexport default function nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = colorRgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n}\n\nexport function isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n", "export default function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nexport default function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: number(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? constant(b)\n      : (t === \"number\" ? number\n      : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n      : b instanceof color ? rgb\n      : b instanceof Date ? date\n      : isNumberArray(b) ? numberArray\n      : Array.isArray(b) ? genericArray\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n      : number)(a, b);\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar cssNode,\n    cssRoot,\n    cssView,\n    svgNode;\n\nexport function parseCss(value) {\n  if (value === \"none\") return identity;\n  if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n  cssNode.style.transform = value;\n  value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n  cssRoot.removeChild(cssNode);\n  value = value.slice(7, -1).split(\",\");\n  return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\n\nexport function parseSvg(value) {\n  if (value == null) return identity;\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n  value = value.matrix;\n  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "var rho = Math.SQRT2,\n    rho2 = 2,\n    rho4 = 4,\n    epsilon2 = 1e-12;\n\nfunction cosh(x) {\n  return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n  return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n  return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n// p0 = [ux0, uy0, w0]\n// p1 = [ux1, uy1, w1]\nexport default function(p0, p1) {\n  var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n      ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n      dx = ux1 - ux0,\n      dy = uy1 - uy0,\n      d2 = dx * dx + dy * dy,\n      i,\n      S;\n\n  // Special case for u0 \u2245 u1.\n  if (d2 < epsilon2) {\n    S = Math.log(w1 / w0) / rho;\n    i = function(t) {\n      return [\n        ux0 + t * dx,\n        uy0 + t * dy,\n        w0 * Math.exp(rho * t * S)\n      ];\n    }\n  }\n\n  // General case.\n  else {\n    var d1 = Math.sqrt(d2),\n        b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n        b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n        r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n        r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n    S = (r1 - r0) / rho;\n    i = function(t) {\n      var s = t * S,\n          coshr0 = cosh(r0),\n          u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n      return [\n        ux0 + u * dx,\n        uy0 + u * dy,\n        w0 * coshr0 / cosh(rho * s + r0)\n      ];\n    }\n  }\n\n  i.duration = S * 1000;\n\n  return i;\n}\n", "export {default as interpolate} from \"./value.js\";\nexport {default as interpolateArray} from \"./array.js\";\nexport {default as interpolateBasis} from \"./basis.js\";\nexport {default as interpolateBasisClosed} from \"./basisClosed.js\";\nexport {default as interpolateDate} from \"./date.js\";\nexport {default as interpolateDiscrete} from \"./discrete.js\";\nexport {default as interpolateHue} from \"./hue.js\";\nexport {default as interpolateNumber} from \"./number.js\";\nexport {default as interpolateNumberArray} from \"./numberArray.js\";\nexport {default as interpolateObject} from \"./object.js\";\nexport {default as interpolateRound} from \"./round.js\";\nexport {default as interpolateString} from \"./string.js\";\nexport {interpolateTransformCss, interpolateTransformSvg} from \"./transform/index.js\";\nexport {default as interpolateZoom} from \"./zoom.js\";\nexport {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from \"./rgb.js\";\nexport {default as interpolateHsl, hslLong as interpolateHslLong} from \"./hsl.js\";\nexport {default as interpolateLab} from \"./lab.js\";\nexport {default as interpolateHcl, hclLong as interpolateHclLong} from \"./hcl.js\";\nexport {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from \"./cubehelix.js\";\nexport {default as piecewise} from \"./piecewise.js\";\nexport {default as quantize} from \"./quantize.js\";\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "export default function(x) {\n  return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n  var t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = bisect(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport function transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate = interpolateValue,\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    var n = Math.min(domain.length, range.length);\n    if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n    piecewise = n > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = Array.from(_), interpolate = interpolateRound, rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nexport default function continuous() {\n  return transformer()(identity, identity);\n}\n", "// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimal(1.23) returns [\"123\", 0].\nexport default function(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n", "import formatDecimal from \"./formatDecimal\";\n\nexport default function(x) {\n  return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}\n", "export default function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n  return new FormatSpecifier(specifier);\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nfunction FormatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  this.fill = match[1] || \" \";\n  this.align = match[2] || \">\";\n  this.sign = match[3] || \"-\";\n  this.symbol = match[4] || \"\";\n  this.zero = !!match[5];\n  this.width = match[6] && +match[6];\n  this.comma = !!match[7];\n  this.precision = match[8] && +match[8].slice(1);\n  this.trim = !!match[9];\n  this.type = match[10] || \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width == null ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision == null ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import formatDecimal from \"./formatDecimal\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n  var d = formatDecimal(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import formatDecimal from \"./formatDecimal\";\n\nexport default function(x, p) {\n  var d = formatDecimal(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatPrefixAuto from \"./formatPrefixAuto\";\nimport formatRounded from \"./formatRounded\";\n\nexport default {\n  \"%\": function(x, p) { return (x * 100).toFixed(p); },\n  \"b\": function(x) { return Math.round(x).toString(2); },\n  \"c\": function(x) { return x + \"\"; },\n  \"d\": function(x) { return Math.round(x).toString(10); },\n  \"e\": function(x, p) { return x.toExponential(p); },\n  \"f\": function(x, p) { return x.toFixed(p); },\n  \"g\": function(x, p) { return x.toPrecision(p); },\n  \"o\": function(x) { return Math.round(x).toString(8); },\n  \"p\": function(x, p) { return formatRounded(x * 100, p); },\n  \"r\": formatRounded,\n  \"s\": formatPrefixAuto,\n  \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n  \"x\": function(x) { return Math.round(x).toString(16); }\n};\n", "export default function(x) {\n  return x;\n}\n", "import exponent from \"./exponent\";\nimport formatGroup from \"./formatGroup\";\nimport formatNumerals from \"./formatNumerals\";\nimport formatSpecifier from \"./formatSpecifier\";\nimport formatTrim from \"./formatTrim\";\nimport formatTypes from \"./formatTypes\";\nimport {prefixExponent} from \"./formatPrefixAuto\";\nimport identity from \"./identity\";\n\nvar prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n  var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity,\n      currency = locale.currency,\n      decimal = locale.decimal,\n      numerals = locale.numerals ? formatNumerals(locale.numerals) : identity,\n      percent = locale.percent || \"%\";\n\n  function newFormat(specifier) {\n    specifier = formatSpecifier(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!formatTypes[type]) precision == null && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currency[0] : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currency[1] : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = formatTypes[type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision == null ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Perform the initial formatting.\n        var valueNegative = value < 0;\n        value = formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = formatTrim(value);\n\n        // If a negative value rounds to zero during formatting, treat as positive.\n        if (valueNegative && +value === 0) valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : \"-\") : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n        // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}\n", "import formatLocale from \"./locale\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n  decimal: \".\",\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n", "import exponent from \"./exponent\";\n\nexport default function(step) {\n  return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent\";\n\nexport default function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent\";\n\nexport default function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "export {default as formatDefaultLocale, format, formatPrefix} from \"./defaultLocale\";\nexport {default as formatLocale} from \"./locale\";\nexport {default as formatSpecifier} from \"./formatSpecifier\";\nexport {default as precisionFixed} from \"./precisionFixed\";\nexport {default as precisionPrefix} from \"./precisionPrefix\";\nexport {default as precisionRound} from \"./precisionRound\";\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function(start, stop, count, specifier) {\n  var step = tickStep(start, stop, count),\n      precision;\n  specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n      return formatPrefix(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain(),\n        i0 = 0,\n        i1 = d.length - 1,\n        start = d[i0],\n        stop = d[i1],\n        step;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n\n    step = tickIncrement(start, stop, count);\n\n    if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n      step = tickIncrement(start, stop, count);\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n      step = tickIncrement(start, stop, count);\n    }\n\n    if (step > 0) {\n      d[i0] = Math.floor(start / step) * step;\n      d[i1] = Math.ceil(stop / step) * step;\n      domain(d);\n    } else if (step < 0) {\n      d[i0] = Math.ceil(start * step) / step;\n      d[i1] = Math.floor(stop * step) / step;\n      domain(d);\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nexport default function linear() {\n  var scale = continuous();\n\n  scale.copy = function() {\n    return copy(scale, linear());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return linearish(scale);\n}\n", "export default function(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n}\n", "var t0 = new Date,\n    t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = new Date(+date)), date;\n  }\n\n  interval.floor = interval;\n\n  interval.ceil = function(date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function(date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function(date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function(start, stop, step) {\n    var range = [], previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = function(test) {\n    return newInterval(function(date) {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, function(date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function(start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function(step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? function(d) { return field(d) % step === 0; }\n              : function(d) { return interval.count(0, d) % step === 0; });\n    };\n  }\n\n  return interval;\n}\n", "import interval from \"./interval\";\n\nvar millisecond = interval(function() {\n  // noop\n}, function(date, step) {\n  date.setTime(+date + step);\n}, function(start, end) {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return interval(function(date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function(date, step) {\n    date.setTime(+date + step * k);\n  }, function(start, end) {\n    return (end - start) / k;\n  });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;\n", "export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;\n", "import interval from \"./interval\";\nimport {durationSecond} from \"./duration\";\n\nvar second = interval(function(date) {\n  date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n  date.setTime(+date + step * durationSecond);\n}, function(start, end) {\n  return (end - start) / durationSecond;\n}, function(date) {\n  return date.getUTCSeconds();\n});\n\nexport default second;\nexport var seconds = second.range;\n", "import interval from \"./interval\";\nimport {durationMinute, durationSecond} from \"./duration\";\n\nvar minute = interval(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function(date, step) {\n  date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n  return (end - start) / durationMinute;\n}, function(date) {\n  return date.getMinutes();\n});\n\nexport default minute;\nexport var minutes = minute.range;\n", "import interval from \"./interval\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration\";\n\nvar hour = interval(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function(date, step) {\n  date.setTime(+date + step * durationHour);\n}, function(start, end) {\n  return (end - start) / durationHour;\n}, function(date) {\n  return date.getHours();\n});\n\nexport default hour;\nexport var hours = hour.range;\n", "import interval from \"./interval\";\nimport {durationDay, durationMinute} from \"./duration\";\n\nvar day = interval(function(date) {\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setDate(date.getDate() + step);\n}, function(start, end) {\n  return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function(date) {\n  return date.getDate() - 1;\n});\n\nexport default day;\nexport var days = day.range;\n", "import interval from \"./interval\";\nimport {durationMinute, durationWeek} from \"./duration\";\n\nfunction weekday(i) {\n  return interval(function(date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function(start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n  });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n", "import interval from \"./interval\";\n\nvar month = interval(function(date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n  return date.getMonth();\n});\n\nexport default month;\nexport var months = month.range;\n", "import interval from \"./interval\";\n\nvar year = interval(function(date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function(date) {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\nexport default year;\nexport var years = year.range;\n", "import interval from \"./interval\";\nimport {durationMinute} from \"./duration\";\n\nvar utcMinute = interval(function(date) {\n  date.setUTCSeconds(0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n  return (end - start) / durationMinute;\n}, function(date) {\n  return date.getUTCMinutes();\n});\n\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;\n", "import interval from \"./interval\";\nimport {durationHour} from \"./duration\";\n\nvar utcHour = interval(function(date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * durationHour);\n}, function(start, end) {\n  return (end - start) / durationHour;\n}, function(date) {\n  return date.getUTCHours();\n});\n\nexport default utcHour;\nexport var utcHours = utcHour.range;\n", "import interval from \"./interval\";\nimport {durationDay} from \"./duration\";\n\nvar utcDay = interval(function(date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n  return (end - start) / durationDay;\n}, function(date) {\n  return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n", "import interval from \"./interval\";\nimport {durationWeek} from \"./duration\";\n\nfunction utcWeekday(i) {\n  return interval(function(date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function(start, end) {\n    return (end - start) / durationWeek;\n  });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n", "import interval from \"./interval\";\n\nvar utcMonth = interval(function(date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n  return date.getUTCMonth();\n});\n\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;\n", "import interval from \"./interval\";\n\nvar utcYear = interval(function(date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n", "export {\n  default as timeInterval\n} from \"./interval\";\n\nexport {\n  default as timeMillisecond,\n  milliseconds as timeMilliseconds,\n  default as utcMillisecond,\n  milliseconds as utcMilliseconds\n} from \"./millisecond\";\n\nexport {\n  default as timeSecond,\n  seconds as timeSeconds,\n  default as utcSecond,\n  seconds as utcSeconds\n} from \"./second\";\n\nexport {\n  default as timeMinute,\n  minutes as timeMinutes\n} from \"./minute\";\n\nexport {\n  default as timeHour,\n  hours as timeHours\n} from \"./hour\";\n\nexport {\n  default as timeDay,\n  days as timeDays\n} from \"./day\";\n\nexport {\n  sunday as timeWeek,\n  sundays as timeWeeks,\n  sunday as timeSunday,\n  sundays as timeSundays,\n  monday as timeMonday,\n  mondays as timeMondays,\n  tuesday as timeTuesday,\n  tuesdays as timeTuesdays,\n  wednesday as timeWednesday,\n  wednesdays as timeWednesdays,\n  thursday as timeThursday,\n  thursdays as timeThursdays,\n  friday as timeFriday,\n  fridays as timeFridays,\n  saturday as timeSaturday,\n  saturdays as timeSaturdays\n} from \"./week\";\n\nexport {\n  default as timeMonth,\n  months as timeMonths\n} from \"./month\";\n\nexport {\n  default as timeYear,\n  years as timeYears\n} from \"./year\";\n\nexport {\n  default as utcMinute,\n  utcMinutes as utcMinutes\n} from \"./utcMinute\";\n\nexport {\n  default as utcHour,\n  utcHours as utcHours\n} from \"./utcHour\";\n\nexport {\n  default as utcDay,\n  utcDays as utcDays\n} from \"./utcDay\";\n\nexport {\n  utcSunday as utcWeek,\n  utcSundays as utcWeeks,\n  utcSunday as utcSunday,\n  utcSundays as utcSundays,\n  utcMonday as utcMonday,\n  utcMondays as utcMondays,\n  utcTuesday as utcTuesday,\n  utcTuesdays as utcTuesdays,\n  utcWednesday as utcWednesday,\n  utcWednesdays as utcWednesdays,\n  utcThursday as utcThursday,\n  utcThursdays as utcThursdays,\n  utcFriday as utcFriday,\n  utcFridays as utcFridays,\n  utcSaturday as utcSaturday,\n  utcSaturdays as utcSaturdays\n} from \"./utcWeek\";\n\nexport {\n  default as utcMonth,\n  utcMonths as utcMonths\n} from \"./utcMonth\";\n\nexport {\n  default as utcYear,\n  utcYears as utcYears\n} from \"./utcYear\";\n", "import {\n  timeDay,\n  timeSunday,\n  timeMonday,\n  timeThursday,\n  timeYear,\n  utcDay,\n  utcSunday,\n  utcMonday,\n  utcThursday,\n  utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newYear(y) {\n  return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, newDate) {\n    return function(string) {\n      var d = newYear(1900),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newYear(d.y)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n          week = utcDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = newDate(newYear(d.y)), day = week.getDay();\n          week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n          week = timeDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return newDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", localDate);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier, utcDate);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  var map = {}, i = -1, n = names.length;\n  while (++i < n) map[names[i].toLowerCase()] = i;\n  return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(timeSunday.count(timeYear(d), d), p, 2);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n  return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(timeMonday.count(timeYear(d), d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(utcSunday.count(utcYear(d), d), p, 2);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n  return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(utcMonday.count(utcYear(d), d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n", "import {utcFormat} from \"./defaultLocale\";\n\nexport var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n  return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n    ? formatIsoNative\n    : utcFormat(isoSpecifier);\n\nexport default formatIso;\n", "import {isoSpecifier} from \"./isoFormat\";\nimport {utcParse} from \"./defaultLocale\";\n\nfunction parseIsoNative(string) {\n  var date = new Date(string);\n  return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n    ? parseIsoNative\n    : utcParse(isoSpecifier);\n\nexport default parseIso;\n", "export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from \"./defaultLocale\";\nexport {default as timeFormatLocale} from \"./locale\";\nexport {default as isoFormat} from \"./isoFormat\";\nexport {default as isoParse} from \"./isoParse\";\n", "import {bisector, tickStep} from \"d3-array\";\nimport {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nvar durationSecond = 1000,\n    durationMinute = durationSecond * 60,\n    durationHour = durationMinute * 60,\n    durationDay = durationHour * 24,\n    durationWeek = durationDay * 7,\n    durationMonth = durationDay * 30,\n    durationYear = durationDay * 365;\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(year, month, week, day, hour, minute, second, millisecond, format) {\n  var scale = continuous(),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  var tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  function tickInterval(interval, start, stop) {\n    if (interval == null) interval = 10;\n\n    // If a desired tick count is specified, pick a reasonable tick interval\n    // based on the extent of the domain and a rough estimate of tick size.\n    // Otherwise, assume interval is already a time interval and use it.\n    if (typeof interval === \"number\") {\n      var target = Math.abs(stop - start) / interval,\n          i = bisector(function(i) { return i[2]; }).right(tickIntervals, target),\n          step;\n      if (i === tickIntervals.length) {\n        step = tickStep(start / durationYear, stop / durationYear, interval);\n        interval = year;\n      } else if (i) {\n        i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n        step = i[1];\n        interval = i[0];\n      } else {\n        step = Math.max(tickStep(start, stop, interval), 1);\n        interval = millisecond;\n      }\n      return interval.every(step);\n    }\n\n    return interval;\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval) {\n    var d = domain(),\n        t0 = d[0],\n        t1 = d[d.length - 1],\n        r = t1 < t0,\n        t;\n    if (r) t = t0, t0 = t1, t1 = t;\n    t = tickInterval(interval, t0, t1);\n    t = t ? t.range(t0, t1 + 1) : []; // inclusive stop\n    return r ? t.reverse() : t;\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval) {\n    var d = domain();\n    return (interval = tickInterval(interval, d[0], d[d.length - 1]))\n        ? domain(nice(d, interval))\n        : scale;\n  };\n\n  scale.copy = function() {\n    return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));\n  };\n\n  return scale;\n}\n\nexport default function() {\n  return initRange.apply(calendar(timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "export {\n  default as scaleBand,\n  point as scalePoint\n} from \"./band.js\";\n\nexport {\n  default as scaleIdentity\n} from \"./identity.js\";\n\nexport {\n  default as scaleLinear\n} from \"./linear.js\";\n\nexport {\n  default as scaleLog\n} from \"./log.js\";\n\nexport {\n  default as scaleSymlog\n} from \"./symlog.js\";\n\nexport {\n  default as scaleOrdinal,\n  implicit as scaleImplicit\n} from \"./ordinal.js\";\n\nexport {\n  default as scalePow,\n  sqrt as scaleSqrt\n} from \"./pow.js\";\n\nexport {\n  default as scaleRadial\n} from \"./radial.js\";\n\nexport {\n  default as scaleQuantile\n} from \"./quantile.js\";\n\nexport {\n  default as scaleQuantize\n} from \"./quantize.js\";\n\nexport {\n  default as scaleThreshold\n} from \"./threshold.js\";\n\nexport {\n  default as scaleTime\n} from \"./time.js\";\n\nexport {\n  default as scaleUtc\n} from \"./utcTime.js\";\n\nexport {\n  default as scaleSequential,\n  sequentialLog as scaleSequentialLog,\n  sequentialPow as scaleSequentialPow,\n  sequentialSqrt as scaleSequentialSqrt,\n  sequentialSymlog as scaleSequentialSymlog\n} from \"./sequential.js\";\n\nexport {\n  default as scaleSequentialQuantile\n} from \"./sequentialQuantile.js\";\n\nexport {\n  default as scaleDiverging,\n  divergingLog as scaleDivergingLog,\n  divergingPow as scaleDivergingPow,\n  divergingSqrt as scaleDivergingSqrt,\n  divergingSymlog as scaleDivergingSymlog\n} from \"./diverging.js\";\n\nexport {\n  default as tickFormat\n} from \"./tickFormat.js\";\n", "// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n  ? window : typeof self != 'undefined' && self.Math == Math ? self\n  // eslint-disable-next-line no-new-func\n  : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n", "var core = module.exports = { version: '2.6.9' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n", "module.exports = function (it) {\n  if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n  return it;\n};\n", "// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n  aFunction(fn);\n  if (that === undefined) return fn;\n  switch (length) {\n    case 1: return function (a) {\n      return fn.call(that, a);\n    };\n    case 2: return function (a, b) {\n      return fn.call(that, a, b);\n    };\n    case 3: return function (a, b, c) {\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function (/* ...args */) {\n    return fn.apply(that, arguments);\n  };\n};\n", "module.exports = function (it) {\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n", "var isObject = require('./_is-object');\nmodule.exports = function (it) {\n  if (!isObject(it)) throw TypeError(it + ' is not an object!');\n  return it;\n};\n", "module.exports = function (exec) {\n  try {\n    return !!exec();\n  } catch (e) {\n    return true;\n  }\n};\n", "// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n", "var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n  return is ? document.createElement(it) : {};\n};\n", "module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n  return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n", "// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n  if (!isObject(it)) return it;\n  var fn, val;\n  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};\n", "var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return dP(O, P, Attributes);\n  } catch (e) { /* empty */ }\n  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};\n", "module.exports = function (bitmap, value) {\n  return {\n    enumerable: !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable: !(bitmap & 4),\n    value: value\n  };\n};\n", "var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n  return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n  object[key] = value;\n  return object;\n};\n", "var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n  return hasOwnProperty.call(it, key);\n};\n", "var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n  var IS_FORCED = type & $export.F;\n  var IS_GLOBAL = type & $export.G;\n  var IS_STATIC = type & $export.S;\n  var IS_PROTO = type & $export.P;\n  var IS_BIND = type & $export.B;\n  var IS_WRAP = type & $export.W;\n  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n  var expProto = exports[PROTOTYPE];\n  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n  var key, own, out;\n  if (IS_GLOBAL) source = name;\n  for (key in source) {\n    // contains in native\n    own = !IS_FORCED && target && target[key] !== undefined;\n    if (own && has(exports, key)) continue;\n    // export native or passed\n    out = own ? target[key] : source[key];\n    // prevent global pollution for namespaces\n    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n    // bind timers to global for call from export context\n    : IS_BIND && own ? ctx(out, global)\n    // wrap global constructors for prevent change them in library\n    : IS_WRAP && target[key] == out ? (function (C) {\n      var F = function (a, b, c) {\n        if (this instanceof C) {\n          switch (arguments.length) {\n            case 0: return new C();\n            case 1: return new C(a);\n            case 2: return new C(a, b);\n          } return new C(a, b, c);\n        } return C.apply(this, arguments);\n      };\n      F[PROTOTYPE] = C[PROTOTYPE];\n      return F;\n    // make static versions for prototype methods\n    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n    if (IS_PROTO) {\n      (exports.virtual || (exports.virtual = {}))[key] = out;\n      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n      if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n    }\n  }\n};\n// type bitmap\n$export.F = 1;   // forced\n$export.G = 2;   // global\n$export.S = 4;   // static\n$export.P = 8;   // proto\n$export.B = 16;  // bind\n$export.W = 32;  // wrap\n$export.U = 64;  // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n", "var toString = {}.toString;\n\nmodule.exports = function (it) {\n  return toString.call(it).slice(8, -1);\n};\n", "// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n  return cof(it) == 'String' ? it.split('') : Object(it);\n};\n", "// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n  if (it == undefined) throw TypeError(\"Can't call method on  \" + it);\n  return it;\n};\n", "// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n  return IObject(defined(it));\n};\n", "// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n", "// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n", "var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n  index = toInteger(index);\n  return index < 0 ? max(index + length, 0) : min(index, length);\n};\n", "// false -> Array#indexOf\n// true  -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n  return function ($this, el, fromIndex) {\n    var O = toIObject($this);\n    var length = toLength(O.length);\n    var index = toAbsoluteIndex(fromIndex, length);\n    var value;\n    // Array#includes uses SameValueZero equality algorithm\n    // eslint-disable-next-line no-self-compare\n    if (IS_INCLUDES && el != el) while (length > index) {\n      value = O[index++];\n      // eslint-disable-next-line no-self-compare\n      if (value != value) return true;\n    // Array#indexOf ignores holes, Array#includes - not\n    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n      if (O[index] === el) return IS_INCLUDES || index || 0;\n    } return !IS_INCLUDES && -1;\n  };\n};\n", "module.exports = true;\n", "var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n  return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n  version: core.version,\n  mode: require('./_library') ? 'pure' : 'global',\n  copyright: '\u00A9 2019 Denis Pushkarev (zloirock.ru)'\n});\n", "var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n", "var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n  return shared[key] || (shared[key] = uid(key));\n};\n", "var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n  var O = toIObject(object);\n  var i = 0;\n  var result = [];\n  var key;\n  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n  // Don't enum bug & hidden keys\n  while (names.length > i) if (has(O, key = names[i++])) {\n    ~arrayIndexOf(result, key) || result.push(key);\n  }\n  return result;\n};\n", "// IE 8- don't enum bug keys\nmodule.exports = (\n  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n", "// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n  return $keys(O, enumBugKeys);\n};\n", "exports.f = Object.getOwnPropertySymbols;\n", "exports.f = {}.propertyIsEnumerable;\n", "// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n  return Object(defined(it));\n};\n", "'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar DESCRIPTORS = require('./_descriptors');\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n  var A = {};\n  var B = {};\n  // eslint-disable-next-line no-undef\n  var S = Symbol();\n  var K = 'abcdefghijklmnopqrst';\n  A[S] = 7;\n  K.split('').forEach(function (k) { B[k] = k; });\n  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n  var T = toObject(target);\n  var aLen = arguments.length;\n  var index = 1;\n  var getSymbols = gOPS.f;\n  var isEnum = pIE.f;\n  while (aLen > index) {\n    var S = IObject(arguments[index++]);\n    var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n    var length = keys.length;\n    var j = 0;\n    var key;\n    while (length > j) {\n      key = keys[j++];\n      if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];\n    }\n  } return T;\n} : $assign;\n", "// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n", "require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n", "module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };", "\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};", "// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n  O = toObject(O);\n  if (has(O, IE_PROTO)) return O[IE_PROTO];\n  if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n    return O.constructor.prototype;\n  } return O instanceof Object ? ObjectProto : null;\n};\n", "// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n  var fn = (core.Object || {})[KEY] || Object[KEY];\n  var exp = {};\n  exp[KEY] = exec(fn);\n  $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n", "// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./_to-object');\nvar $getPrototypeOf = require('./_object-gpo');\n\nrequire('./_object-sap')('getPrototypeOf', function () {\n  return function getPrototypeOf(it) {\n    return $getPrototypeOf(toObject(it));\n  };\n});\n", "require('../../modules/es6.object.get-prototype-of');\nmodule.exports = require('../../modules/_core').Object.getPrototypeOf;\n", "module.exports = { \"default\": require(\"core-js/library/fn/object/get-prototype-of\"), __esModule: true };", "\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};", "var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n", "require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc) {\n  return $Object.defineProperty(it, key, desc);\n};\n", "module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };", "\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n  function defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n    }\n  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();", "var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true  -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n  return function (that, pos) {\n    var s = String(defined(that));\n    var i = toInteger(pos);\n    var l = s.length;\n    var a, b;\n    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n    a = s.charCodeAt(i);\n    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n      ? TO_STRING ? s.charAt(i) : a\n      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n  };\n};\n", "module.exports = require('./_hide');\n", "module.exports = {};\n", "var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n  anObject(O);\n  var keys = getKeys(Properties);\n  var length = keys.length;\n  var i = 0;\n  var P;\n  while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n  return O;\n};\n", "var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n", "// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n  // Thrash, waste and sodomy: IE GC bug\n  var iframe = require('./_dom-create')('iframe');\n  var i = enumBugKeys.length;\n  var lt = '<';\n  var gt = '>';\n  var iframeDocument;\n  iframe.style.display = 'none';\n  require('./_html').appendChild(iframe);\n  iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n  // createDict = iframe.contentWindow.Object;\n  // html.removeChild(iframe);\n  iframeDocument = iframe.contentWindow.document;\n  iframeDocument.open();\n  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n  iframeDocument.close();\n  createDict = iframeDocument.F;\n  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n  return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n  var result;\n  if (O !== null) {\n    Empty[PROTOTYPE] = anObject(O);\n    result = new Empty();\n    Empty[PROTOTYPE] = null;\n    // add \"__proto__\" for Object.getPrototypeOf polyfill\n    result[IE_PROTO] = O;\n  } else result = createDict();\n  return Properties === undefined ? result : dPs(result, Properties);\n};\n", "var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n  return store[name] || (store[name] =\n    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n", "var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n", "'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n  setToStringTag(Constructor, NAME + ' Iterator');\n};\n", "'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n  $iterCreate(Constructor, NAME, next);\n  var getMethod = function (kind) {\n    if (!BUGGY && kind in proto) return proto[kind];\n    switch (kind) {\n      case KEYS: return function keys() { return new Constructor(this, kind); };\n      case VALUES: return function values() { return new Constructor(this, kind); };\n    } return function entries() { return new Constructor(this, kind); };\n  };\n  var TAG = NAME + ' Iterator';\n  var DEF_VALUES = DEFAULT == VALUES;\n  var VALUES_BUG = false;\n  var proto = Base.prototype;\n  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n  var $default = $native || getMethod(DEFAULT);\n  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n  var methods, key, IteratorPrototype;\n  // Fix native\n  if ($anyNative) {\n    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n      // Set @@toStringTag to native iterators\n      setToStringTag(IteratorPrototype, TAG, true);\n      // fix for some old engines\n      if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n    }\n  }\n  // fix Array#{values, @@iterator}.name in V8 / FF\n  if (DEF_VALUES && $native && $native.name !== VALUES) {\n    VALUES_BUG = true;\n    $default = function values() { return $native.call(this); };\n  }\n  // Define iterator\n  if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n    hide(proto, ITERATOR, $default);\n  }\n  // Plug for library\n  Iterators[NAME] = $default;\n  Iterators[TAG] = returnThis;\n  if (DEFAULT) {\n    methods = {\n      values: DEF_VALUES ? $default : getMethod(VALUES),\n      keys: IS_SET ? $default : getMethod(KEYS),\n      entries: $entries\n    };\n    if (FORCED) for (key in methods) {\n      if (!(key in proto)) redefine(proto, key, methods[key]);\n    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n  }\n  return methods;\n};\n", "'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n  this._t = String(iterated); // target\n  this._i = 0;                // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n  var O = this._t;\n  var index = this._i;\n  var point;\n  if (index >= O.length) return { value: undefined, done: true };\n  point = $at(O, index);\n  this._i += point.length;\n  return { value: point, done: false };\n});\n", "module.exports = function () { /* empty */ };\n", "module.exports = function (done, value) {\n  return { value: value, done: !!done };\n};\n", "'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n  this._t = toIObject(iterated); // target\n  this._i = 0;                   // next index\n  this._k = kind;                // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n  var O = this._t;\n  var kind = this._k;\n  var index = this._i++;\n  if (!O || index >= O.length) {\n    this._t = undefined;\n    return step(1);\n  }\n  if (kind == 'keys') return step(0, index);\n  if (kind == 'values') return step(0, O[index]);\n  return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n", "require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n  'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n  'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n  'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n  'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n  var NAME = DOMIterables[i];\n  var Collection = global[NAME];\n  var proto = Collection && Collection.prototype;\n  if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n  Iterators[NAME] = Iterators.Array;\n}\n", "exports.f = require('./_wks');\n", "require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n", "module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };", "var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n  return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n  return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n  setDesc(it, META, { value: {\n    i: 'O' + ++id, // object ID\n    w: {}          // weak collections IDs\n  } });\n};\nvar fastKey = function (it, create) {\n  // return primitive with prefix\n  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n  if (!has(it, META)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return 'F';\n    // not necessary to add metadata\n    if (!create) return 'E';\n    // add missing metadata\n    setMeta(it);\n  // return object ID\n  } return it[META].i;\n};\nvar getWeak = function (it, create) {\n  if (!has(it, META)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return true;\n    // not necessary to add metadata\n    if (!create) return false;\n    // add missing metadata\n    setMeta(it);\n  // return hash weak collections IDs\n  } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n  if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n  return it;\n};\nvar meta = module.exports = {\n  KEY: META,\n  NEED: false,\n  fastKey: fastKey,\n  getWeak: getWeak,\n  onFreeze: onFreeze\n};\n", "var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n  var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n", "// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n  var result = getKeys(it);\n  var getSymbols = gOPS.f;\n  if (getSymbols) {\n    var symbols = getSymbols(it);\n    var isEnum = pIE.f;\n    var i = 0;\n    var key;\n    while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n  } return result;\n};\n", "// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n  return cof(arg) == 'Array';\n};\n", "// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n  return $keys(O, hiddenKeys);\n};\n", "// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n  ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n  try {\n    return gOPN(it);\n  } catch (e) {\n    return windowNames.slice();\n  }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n  return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n", "var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n  O = toIObject(O);\n  P = toPrimitive(P, true);\n  if (IE8_DOM_DEFINE) try {\n    return gOPD(O, P);\n  } catch (e) { /* empty */ }\n  if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n", "'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toObject = require('./_to-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $GOPS = require('./_object-gops');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n  return _create(dP({}, 'a', {\n    get: function () { return dP(this, 'a', { value: 7 }).a; }\n  })).a != 7;\n}) ? function (it, key, D) {\n  var protoDesc = gOPD(ObjectProto, key);\n  if (protoDesc) delete ObjectProto[key];\n  dP(it, key, D);\n  if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n  var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n  sym._k = tag;\n  return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n  return typeof it == 'symbol';\n} : function (it) {\n  return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n  if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n  anObject(it);\n  key = toPrimitive(key, true);\n  anObject(D);\n  if (has(AllSymbols, key)) {\n    if (!D.enumerable) {\n      if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n      it[HIDDEN][key] = true;\n    } else {\n      if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n      D = _create(D, { enumerable: createDesc(0, false) });\n    } return setSymbolDesc(it, key, D);\n  } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n  anObject(it);\n  var keys = enumKeys(P = toIObject(P));\n  var i = 0;\n  var l = keys.length;\n  var key;\n  while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n  return it;\n};\nvar $create = function create(it, P) {\n  return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n  var E = isEnum.call(this, key = toPrimitive(key, true));\n  if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n  return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n  it = toIObject(it);\n  key = toPrimitive(key, true);\n  if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n  var D = gOPD(it, key);\n  if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n  return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n  var names = gOPN(toIObject(it));\n  var result = [];\n  var i = 0;\n  var key;\n  while (names.length > i) {\n    if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n  } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n  var IS_OP = it === ObjectProto;\n  var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n  var result = [];\n  var i = 0;\n  var key;\n  while (names.length > i) {\n    if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n  } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n  $Symbol = function Symbol() {\n    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n    var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n    var $set = function (value) {\n      if (this === ObjectProto) $set.call(OPSymbols, value);\n      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n      setSymbolDesc(this, tag, createDesc(1, value));\n    };\n    if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n    return wrap(tag);\n  };\n  redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n    return this._k;\n  });\n\n  $GOPD.f = $getOwnPropertyDescriptor;\n  $DP.f = $defineProperty;\n  require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n  require('./_object-pie').f = $propertyIsEnumerable;\n  $GOPS.f = $getOwnPropertySymbols;\n\n  if (DESCRIPTORS && !require('./_library')) {\n    redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n  }\n\n  wksExt.f = function (name) {\n    return wrap(wks(name));\n  };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n  // 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\n  'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n  // 19.4.2.1 Symbol.for(key)\n  'for': function (key) {\n    return has(SymbolRegistry, key += '')\n      ? SymbolRegistry[key]\n      : SymbolRegistry[key] = $Symbol(key);\n  },\n  // 19.4.2.5 Symbol.keyFor(sym)\n  keyFor: function keyFor(sym) {\n    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n    for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n  },\n  useSetter: function () { setter = true; },\n  useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n  // 19.1.2.2 Object.create(O [, Properties])\n  create: $create,\n  // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n  defineProperty: $defineProperty,\n  // 19.1.2.3 Object.defineProperties(O, Properties)\n  defineProperties: $defineProperties,\n  // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n  getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n  // 19.1.2.7 Object.getOwnPropertyNames(O)\n  getOwnPropertyNames: $getOwnPropertyNames,\n  // 19.1.2.8 Object.getOwnPropertySymbols(O)\n  getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\nvar FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });\n\n$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {\n  getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n    return $GOPS.f(toObject(it));\n  }\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n  var S = $Symbol();\n  // MS Edge converts symbol values to JSON as {}\n  // WebKit converts symbol values to JSON as null\n  // V8 throws on boxed symbols\n  return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n  stringify: function stringify(it) {\n    var args = [it];\n    var i = 1;\n    var replacer, $replacer;\n    while (arguments.length > i) args.push(arguments[i++]);\n    $replacer = replacer = args[1];\n    if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n    if (!isArray(replacer)) replacer = function (key, value) {\n      if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n      if (!isSymbol(value)) return value;\n    };\n    args[1] = replacer;\n    return _stringify.apply($JSON, args);\n  }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n", "", "require('./_wks-define')('asyncIterator');\n", "require('./_wks-define')('observable');\n", "require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;\n", "module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };", "\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _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; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n  return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n  return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};", "\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};", "// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n  anObject(O);\n  if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n  set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n    function (test, buggy, set) {\n      try {\n        set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n        set(test, []);\n        buggy = !(test instanceof Array);\n      } catch (e) { buggy = true; }\n      return function setPrototypeOf(O, proto) {\n        check(O, proto);\n        if (buggy) O.__proto__ = proto;\n        else set(O, proto);\n        return O;\n      };\n    }({}, false) : undefined),\n  check: check\n};\n", "// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n", "require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n", "module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };", "var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n", "require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n  return $Object.create(P, D);\n};\n", "module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };", "\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n  }\n\n  subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = createDetectElementResize;\n/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1)\u00A0Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2)\u00A0Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n * 5) Added support for injecting custom window object\n **/\n\nfunction createDetectElementResize(nonce, hostWindow) {\n  // Check `document` and `window` in case of server-side rendering\n  var _window;\n  if (typeof hostWindow !== 'undefined') {\n    _window = hostWindow;\n  } else if (typeof window !== 'undefined') {\n    _window = window;\n  } else if (typeof self !== 'undefined') {\n    _window = self;\n  } else {\n    _window = global;\n  }\n\n  var attachEvent = typeof _window.document !== 'undefined' && _window.document.attachEvent;\n\n  if (!attachEvent) {\n    var requestFrame = function () {\n      var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) {\n        return _window.setTimeout(fn, 20);\n      };\n      return function (fn) {\n        return raf(fn);\n      };\n    }();\n\n    var cancelFrame = function () {\n      var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;\n      return function (id) {\n        return cancel(id);\n      };\n    }();\n\n    var resetTriggers = function resetTriggers(element) {\n      var triggers = element.__resizeTriggers__,\n          expand = triggers.firstElementChild,\n          contract = triggers.lastElementChild,\n          expandChild = expand.firstElementChild;\n      contract.scrollLeft = contract.scrollWidth;\n      contract.scrollTop = contract.scrollHeight;\n      expandChild.style.width = expand.offsetWidth + 1 + 'px';\n      expandChild.style.height = expand.offsetHeight + 1 + 'px';\n      expand.scrollLeft = expand.scrollWidth;\n      expand.scrollTop = expand.scrollHeight;\n    };\n\n    var checkTriggers = function checkTriggers(element) {\n      return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height;\n    };\n\n    var scrollListener = function scrollListener(e) {\n      // Don't measure (which forces) reflow for scrolls that happen inside of children!\n      if (e.target.className && typeof e.target.className.indexOf === 'function' && e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {\n        return;\n      }\n\n      var element = this;\n      resetTriggers(this);\n      if (this.__resizeRAF__) {\n        cancelFrame(this.__resizeRAF__);\n      }\n      this.__resizeRAF__ = requestFrame(function () {\n        if (checkTriggers(element)) {\n          element.__resizeLast__.width = element.offsetWidth;\n          element.__resizeLast__.height = element.offsetHeight;\n          element.__resizeListeners__.forEach(function (fn) {\n            fn.call(element, e);\n          });\n        }\n      });\n    };\n\n    /* Detect CSS Animations support to detect element display/re-attach */\n    var animation = false,\n        keyframeprefix = '',\n        animationstartevent = 'animationstart',\n        domPrefixes = 'Webkit Moz O ms'.split(' '),\n        startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),\n        pfx = '';\n    {\n      var elm = _window.document.createElement('fakeelement');\n      if (elm.style.animationName !== undefined) {\n        animation = true;\n      }\n\n      if (animation === false) {\n        for (var i = 0; i < domPrefixes.length; i++) {\n          if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {\n            pfx = domPrefixes[i];\n            keyframeprefix = '-' + pfx.toLowerCase() + '-';\n            animationstartevent = startEvents[i];\n            animation = true;\n            break;\n          }\n        }\n      }\n    }\n\n    var animationName = 'resizeanim';\n    var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';\n    var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';\n  }\n\n  var createStyles = function createStyles(doc) {\n    if (!doc.getElementById('detectElementResize')) {\n      //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n      var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n          head = doc.head || doc.getElementsByTagName('head')[0],\n          style = doc.createElement('style');\n\n      style.id = 'detectElementResize';\n      style.type = 'text/css';\n\n      if (nonce != null) {\n        style.setAttribute('nonce', nonce);\n      }\n\n      if (style.styleSheet) {\n        style.styleSheet.cssText = css;\n      } else {\n        style.appendChild(doc.createTextNode(css));\n      }\n\n      head.appendChild(style);\n    }\n  };\n\n  var addResizeListener = function addResizeListener(element, fn) {\n    if (attachEvent) {\n      element.attachEvent('onresize', fn);\n    } else {\n      if (!element.__resizeTriggers__) {\n        var doc = element.ownerDocument;\n        var elementStyle = _window.getComputedStyle(element);\n        if (elementStyle && elementStyle.position == 'static') {\n          element.style.position = 'relative';\n        }\n        createStyles(doc);\n        element.__resizeLast__ = {};\n        element.__resizeListeners__ = [];\n        (element.__resizeTriggers__ = doc.createElement('div')).className = 'resize-triggers';\n        element.__resizeTriggers__.innerHTML = '<div class=\"expand-trigger\"><div></div></div>' + '<div class=\"contract-trigger\"></div>';\n        element.appendChild(element.__resizeTriggers__);\n        resetTriggers(element);\n        element.addEventListener('scroll', scrollListener, true);\n\n        /* Listen for a css animation to detect element display/re-attach */\n        if (animationstartevent) {\n          element.__resizeTriggers__.__animationListener__ = function animationListener(e) {\n            if (e.animationName == animationName) {\n              resetTriggers(element);\n            }\n          };\n          element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);\n        }\n      }\n      element.__resizeListeners__.push(fn);\n    }\n  };\n\n  var removeResizeListener = function removeResizeListener(element, fn) {\n    if (attachEvent) {\n      element.detachEvent('onresize', fn);\n    } else {\n      element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n      if (!element.__resizeListeners__.length) {\n        element.removeEventListener('scroll', scrollListener, true);\n        if (element.__resizeTriggers__.__animationListener__) {\n          element.__resizeTriggers__.removeEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);\n          element.__resizeTriggers__.__animationListener__ = null;\n        }\n        try {\n          element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\n        } catch (e) {\n          // Preact compat; see developit/preact-compat/issues/228\n        }\n      }\n    }\n  };\n\n  return {\n    addResizeListener: addResizeListener,\n    removeResizeListener: removeResizeListener\n  };\n}", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _detectElementResize = require('../vendor/detectElementResize');\n\nvar _detectElementResize2 = _interopRequireDefault(_detectElementResize);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AutoSizer = function (_React$PureComponent) {\n  (0, _inherits3.default)(AutoSizer, _React$PureComponent);\n\n  function AutoSizer() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    (0, _classCallCheck3.default)(this, AutoSizer);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoSizer.__proto__ || (0, _getPrototypeOf2.default)(AutoSizer)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      height: _this.props.defaultHeight || 0,\n      width: _this.props.defaultWidth || 0\n    }, _this._onResize = function () {\n      var _this$props = _this.props,\n          disableHeight = _this$props.disableHeight,\n          disableWidth = _this$props.disableWidth,\n          onResize = _this$props.onResize;\n\n\n      if (_this._parentNode) {\n        // Guard against AutoSizer component being removed from the DOM immediately after being added.\n        // This can result in invalid style values which can result in NaN values if we don't handle them.\n        // See issue #150 for more context.\n\n        var _height = _this._parentNode.offsetHeight || 0;\n        var _width = _this._parentNode.offsetWidth || 0;\n\n        var win = _this._window || window;\n        var _style = win.getComputedStyle(_this._parentNode) || {};\n        var paddingLeft = parseInt(_style.paddingLeft, 10) || 0;\n        var paddingRight = parseInt(_style.paddingRight, 10) || 0;\n        var paddingTop = parseInt(_style.paddingTop, 10) || 0;\n        var paddingBottom = parseInt(_style.paddingBottom, 10) || 0;\n\n        var newHeight = _height - paddingTop - paddingBottom;\n        var newWidth = _width - paddingLeft - paddingRight;\n\n        if (!disableHeight && _this.state.height !== newHeight || !disableWidth && _this.state.width !== newWidth) {\n          _this.setState({\n            height: _height - paddingTop - paddingBottom,\n            width: _width - paddingLeft - paddingRight\n          });\n\n          onResize({ height: _height, width: _width });\n        }\n      }\n    }, _this._setRef = function (autoSizer) {\n      _this._autoSizer = autoSizer;\n    }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);\n  } // uses any instead of Window because Flow doesn't have window type\n\n\n  (0, _createClass3.default)(AutoSizer, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      var nonce = this.props.nonce;\n\n      if (this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement) {\n        // Delay access of parentNode until mount.\n        // This handles edge-cases where the component has already been unmounted before its ref has been set,\n        // As well as libraries like react-lite which have a slightly different lifecycle.\n        this._parentNode = this._autoSizer.parentNode;\n        this._window = this._autoSizer.parentNode.ownerDocument.defaultView;\n\n        // Defer requiring resize handler in order to support server-side rendering.\n        // See issue #41\n        this._detectElementResize = (0, _detectElementResize2.default)(nonce, this._window);\n        this._detectElementResize.addResizeListener(this._parentNode, this._onResize);\n\n        this._onResize();\n      }\n    }\n  }, {\n    key: 'componentWillUnmount',\n    value: function componentWillUnmount() {\n      if (this._detectElementResize && this._parentNode) {\n        this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          children = _props.children,\n          className = _props.className,\n          disableHeight = _props.disableHeight,\n          disableWidth = _props.disableWidth,\n          style = _props.style;\n      var _state = this.state,\n          height = _state.height,\n          width = _state.width;\n\n      // Outer div should not force width/height since that may prevent containers from shrinking.\n      // Inner component should overflow and use calculated width/height.\n      // See issue #68 for more information.\n\n      var outerStyle = { overflow: 'visible' };\n      var childParams = {};\n\n      if (!disableHeight) {\n        outerStyle.height = 0;\n        childParams.height = height;\n      }\n\n      if (!disableWidth) {\n        outerStyle.width = 0;\n        childParams.width = width;\n      }\n\n      /**\n       * TODO: Avoid rendering children before the initial measurements have been collected.\n       * At best this would just be wasting cycles.\n       * Add this check into version 10 though as it could break too many ref callbacks in version 9.\n       * Note that if default width/height props were provided this would still work with SSR.\n      if (\n        height !== 0 &&\n        width !== 0\n      ) {\n        child = children({ height, width })\n      }\n      */\n\n      return React.createElement(\n        'div',\n        {\n          className: className,\n          ref: this._setRef,\n          style: (0, _extends3.default)({}, outerStyle, style) },\n        children(childParams)\n      );\n    }\n  }]);\n  return AutoSizer;\n}(React.PureComponent);\n\nAutoSizer.defaultProps = {\n  onResize: function onResize() {},\n  disableHeight: false,\n  disableWidth: false,\n  style: {}\n};\nAutoSizer.propTypes = process.env.NODE_ENV === 'production' ? null : {\n  /** Function responsible for rendering children.*/\n  children: _propTypes2.default.func.isRequired,\n\n\n  /** Optional custom CSS class name to attach to root AutoSizer element.  */\n  className: _propTypes2.default.string,\n\n\n  /** Default height to use for initial render; useful for SSR */\n  defaultHeight: _propTypes2.default.number,\n\n\n  /** Default width to use for initial render; useful for SSR */\n  defaultWidth: _propTypes2.default.number,\n\n\n  /** Disable dynamic :height property */\n  disableHeight: _propTypes2.default.bool.isRequired,\n\n\n  /** Disable dynamic :width property */\n  disableWidth: _propTypes2.default.bool.isRequired,\n\n\n  /** Nonce of the inlined stylesheet for Content Security Policy */\n  nonce: _propTypes2.default.string,\n\n\n  /** Callback to be invoked on-resize */\n  onResize: _propTypes2.default.func.isRequired,\n\n\n  /** Optional inline style */\n  style: _propTypes2.default.object\n};\nexports.default = AutoSizer;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _AutoSizer = require('./AutoSizer');\n\nObject.defineProperty(exports, 'default', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_AutoSizer).default;\n  }\n});\nObject.defineProperty(exports, 'AutoSizer', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_AutoSizer).default;\n  }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { ScaleLinear, ScaleOrdinal } from 'd3-scale';\nimport * as React from 'react';\nimport { formatMeasure } from '../../helpers/measures';\nimport './ColorBoxLegend.css';\n\ninterface Props {\n  className?: string;\n  colorNA?: string;\n  colorScale:\n    | ScaleOrdinal<string, string> // used for LEVEL type\n    | ScaleLinear<string, string | number>; // used for RATING or PERCENT type\n  metricType: string;\n}\n\nexport default function ColorBoxLegend({ className, colorScale, colorNA, metricType }: Props) {\n  const colorDomain: Array<number | string> = colorScale.domain();\n  const colorRange = colorScale.range();\n  return (\n    <div className={classNames('color-box-legend', className)}>\n      {colorDomain.map((value, idx) => (\n        <div key={value}>\n          <span className=\"color-box-legend-rect\" style={{ borderColor: colorRange[idx] }}>\n            <span\n              className=\"color-box-legend-rect-inner\"\n              style={{ backgroundColor: colorRange[idx] }}\n            />\n          </span>\n          {formatMeasure(value, metricType)}\n        </div>\n      ))}\n      {colorNA && (\n        <div>\n          <span className=\"color-box-legend-rect\" style={{ borderColor: colorNA }}>\n            <span className=\"color-box-legend-rect-inner\" style={{ backgroundColor: colorNA }} />\n          </span>\n          N/A\n        </div>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { ScaleLinear, ScaleOrdinal } from 'd3-scale';\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport './ColorGradientLegend.css';\n\ninterface Props {\n  className?: string;\n  colorScale:\n    | ScaleOrdinal<string, string> // used for LEVEL type\n    | ScaleLinear<string, string | number>; // used for RATING or PERCENT type\n  height: number;\n  padding?: [number, number, number, number];\n  showColorNA?: boolean;\n  width: number;\n}\n\nconst NA_SPACING = 4;\nconst NA_GRADIENT_LINE_INCREMENTS = [0, 8, 16, 24];\n\nexport default function ColorGradientLegend({\n  className,\n  colorScale,\n  padding = [12, 24, 0, 0],\n  height,\n  showColorNA = false,\n  width\n}: Props) {\n  const colorRange: Array<string | number> = colorScale.range();\n  const colorDomain: Array<string | number> = colorScale.domain();\n  const lastColorIdx = colorRange.length - 1;\n  const lastDomainIdx = colorDomain.length - 1;\n  const widthNoPadding = width - padding[1];\n  const rectHeight = height - padding[0];\n  return (\n    <svg className={className} height={height} width={width}>\n      <defs>\n        <linearGradient id=\"gradient-legend\">\n          {colorRange.map((color, idx) => (\n            // eslint-disable-next-line react/no-array-index-key\n            <stop key={idx} offset={idx / lastColorIdx} stopColor={String(color)} />\n          ))}\n        </linearGradient>\n\n        <pattern\n          id=\"stripes\"\n          width=\"30\"\n          height=\"30\"\n          patternTransform=\"rotate(45 0 0)\"\n          patternUnits=\"userSpaceOnUse\">\n          {NA_GRADIENT_LINE_INCREMENTS.map(i => (\n            <React.Fragment key={i}>\n              <line\n                x1={i}\n                y1=\"0\"\n                x2={i}\n                y2=\"30\"\n                style={{ stroke: colors.gray71, strokeWidth: NA_SPACING }}\n              />\n              <line\n                x1={i + NA_SPACING}\n                y1=\"0\"\n                x2={i + NA_SPACING}\n                y2=\"30\"\n                style={{ stroke: colors.gray60, strokeWidth: NA_SPACING }}\n              />\n            </React.Fragment>\n          ))}\n        </pattern>\n      </defs>\n      <g transform={`translate(${padding[3]}, ${padding[0]})`}>\n        <rect fill=\"url(#gradient-legend)\" height={rectHeight} width={widthNoPadding} x={0} y={0} />\n        {colorDomain.map((d, idx) => (\n          <text\n            className=\"gradient-legend-text\"\n            dy=\"-2px\"\n            // eslint-disable-next-line react/no-array-index-key\n            key={idx}\n            x={widthNoPadding * (idx / lastDomainIdx)}\n            y={0}>\n            {d}\n          </text>\n        ))}\n      </g>\n      {showColorNA && (\n        <g transform={`translate(${widthNoPadding}, ${padding[0]})`}>\n          <rect\n            fill=\"url(#stripes)\"\n            height={rectHeight}\n            width={padding[1] - NA_SPACING}\n            x={NA_SPACING}\n            y={0}\n          />\n          <text\n            className=\"gradient-legend-na\"\n            dy=\"-2px\"\n            x={NA_SPACING + (padding[1] - NA_SPACING) / 2}\n            y={0}>\n            N/A\n          </text>\n        </g>\n      )}\n    </svg>\n  );\n}\n", "function count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;\n  else while (--i >= 0) sum += children[i].value;\n  node.value = sum;\n}\n\nexport default function() {\n  return this.eachAfter(count);\n}\n", "export default function(callback) {\n  var node = this, current, next = [node], children, i, n;\n  do {\n    current = next.reverse(), next = [];\n    while (node = current.pop()) {\n      callback(node), children = node.children;\n      if (children) for (i = 0, n = children.length; i < n; ++i) {\n        next.push(children[i]);\n      }\n    }\n  } while (next.length);\n  return this;\n}\n", "export default function(callback) {\n  var node = this, nodes = [node], children, i;\n  while (node = nodes.pop()) {\n    callback(node), children = node.children;\n    if (children) for (i = children.length - 1; i >= 0; --i) {\n      nodes.push(children[i]);\n    }\n  }\n  return this;\n}\n", "export default function(callback) {\n  var node = this, nodes = [node], next = [], children, i, n;\n  while (node = nodes.pop()) {\n    next.push(node), children = node.children;\n    if (children) for (i = 0, n = children.length; i < n; ++i) {\n      nodes.push(children[i]);\n    }\n  }\n  while (node = next.pop()) {\n    callback(node);\n  }\n  return this;\n}\n", "export default function(value) {\n  return this.eachAfter(function(node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n    while (--i >= 0) sum += children[i].value;\n    node.value = sum;\n  });\n}\n", "export default function(compare) {\n  return this.eachBefore(function(node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n}\n", "export default function(end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n  var k = nodes.length;\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n  return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n  return c;\n}\n", "export default function() {\n  var node = this, nodes = [node];\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n  return nodes;\n}\n", "export default function() {\n  var nodes = [];\n  this.each(function(node) {\n    nodes.push(node);\n  });\n  return nodes;\n}\n", "export default function() {\n  var leaves = [];\n  this.eachBefore(function(node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n}\n", "export default function() {\n  var root = this, links = [];\n  root.each(function(node) {\n    if (node !== root) { // Don\u2019t include the root\u2019s parent, if any.\n      links.push({source: node.parent, target: node});\n    }\n  });\n  return links;\n}\n", "import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\n\nexport default function hierarchy(data, children) {\n  var root = new Node(data),\n      valued = +data.value && (root.value = data.value),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n\n  if (children == null) children = defaultChildren;\n\n  while (node = nodes.pop()) {\n    if (valued) node.value = +node.data.value;\n    if ((childs = children(node.data)) && (n = childs.length)) {\n      node.children = new Array(n);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n  return d.children;\n}\n\nfunction copyData(node) {\n  node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n  var height = 0;\n  do node.height = height;\n  while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n  this.data = data;\n  this.depth =\n  this.height = 0;\n  this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: node_count,\n  each: node_each,\n  eachAfter: node_eachAfter,\n  eachBefore: node_eachBefore,\n  sum: node_sum,\n  sort: node_sort,\n  path: node_path,\n  ancestors: node_ancestors,\n  descendants: node_descendants,\n  leaves: node_leaves,\n  links: node_links,\n  copy: node_copy\n};\n", "export function optional(f) {\n  return f == null ? null : required(f);\n}\n\nexport function required(f) {\n  if (typeof f !== \"function\") throw new Error;\n  return f;\n}\n", "export function constantZero() {\n  return 0;\n}\n\nexport default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "export default function(node) {\n  node.x0 = Math.round(node.x0);\n  node.y0 = Math.round(node.y0);\n  node.x1 = Math.round(node.x1);\n  node.y1 = Math.round(node.y1);\n}\n", "export default function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (x1 - x0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.y0 = y0, node.y1 = y1;\n    node.x0 = x0, node.x1 = x0 += node.value * k;\n  }\n}\n", "export default function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (y1 - y0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.x0 = x0, node.x1 = x1;\n    node.y0 = y0, node.y1 = y0 += node.value * k;\n  }\n}\n", "import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n  var rows = [],\n      nodes = parent.children,\n      row,\n      nodeValue,\n      i0 = 0,\n      i1 = 0,\n      n = nodes.length,\n      dx, dy,\n      value = parent.value,\n      sumValue,\n      minValue,\n      maxValue,\n      newRatio,\n      minRatio,\n      alpha,\n      beta;\n\n  while (i0 < n) {\n    dx = x1 - x0, dy = y1 - y0;\n\n    // Find the next non-empty node.\n    do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n    minValue = maxValue = sumValue;\n    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n    beta = sumValue * sumValue * alpha;\n    minRatio = Math.max(maxValue / beta, beta / minValue);\n\n    // Keep adding nodes while the aspect ratio maintains or improves.\n    for (; i1 < n; ++i1) {\n      sumValue += nodeValue = nodes[i1].value;\n      if (nodeValue < minValue) minValue = nodeValue;\n      if (nodeValue > maxValue) maxValue = nodeValue;\n      beta = sumValue * sumValue * alpha;\n      newRatio = Math.max(maxValue / beta, beta / minValue);\n      if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n      minRatio = newRatio;\n    }\n\n    // Position and record the row orientation.\n    rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n    if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n    else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n    value -= sumValue, i0 = i1;\n  }\n\n  return rows;\n}\n\nexport default (function custom(ratio) {\n\n  function squarify(parent, x0, y0, x1, y1) {\n    squarifyRatio(ratio, parent, x0, y0, x1, y1);\n  }\n\n  squarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return squarify;\n})(phi);\n", "import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n  var tile = squarify,\n      round = false,\n      dx = 1,\n      dy = 1,\n      paddingStack = [0],\n      paddingInner = constantZero,\n      paddingTop = constantZero,\n      paddingRight = constantZero,\n      paddingBottom = constantZero,\n      paddingLeft = constantZero;\n\n  function treemap(root) {\n    root.x0 =\n    root.y0 = 0;\n    root.x1 = dx;\n    root.y1 = dy;\n    root.eachBefore(positionNode);\n    paddingStack = [0];\n    if (round) root.eachBefore(roundNode);\n    return root;\n  }\n\n  function positionNode(node) {\n    var p = paddingStack[node.depth],\n        x0 = node.x0 + p,\n        y0 = node.y0 + p,\n        x1 = node.x1 - p,\n        y1 = node.y1 - p;\n    if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n    if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n    node.x0 = x0;\n    node.y0 = y0;\n    node.x1 = x1;\n    node.y1 = y1;\n    if (node.children) {\n      p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n      x0 += paddingLeft(node) - p;\n      y0 += paddingTop(node) - p;\n      x1 -= paddingRight(node) - p;\n      y1 -= paddingBottom(node) - p;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      tile(node, x0, y0, x1, y1);\n    }\n  }\n\n  treemap.round = function(x) {\n    return arguments.length ? (round = !!x, treemap) : round;\n  };\n\n  treemap.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n  };\n\n  treemap.tile = function(x) {\n    return arguments.length ? (tile = required(x), treemap) : tile;\n  };\n\n  treemap.padding = function(x) {\n    return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n  };\n\n  treemap.paddingInner = function(x) {\n    return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n  };\n\n  treemap.paddingOuter = function(x) {\n    return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n  };\n\n  treemap.paddingTop = function(x) {\n    return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n  };\n\n  treemap.paddingRight = function(x) {\n    return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n  };\n\n  treemap.paddingBottom = function(x) {\n    return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n  };\n\n  treemap.paddingLeft = function(x) {\n    return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n  };\n\n  return treemap;\n}\n", "export {default as cluster} from \"./cluster.js\";\nexport {default as hierarchy} from \"./hierarchy/index.js\";\nexport {default as pack} from \"./pack/index.js\";\nexport {default as packSiblings} from \"./pack/siblings.js\";\nexport {default as packEnclose} from \"./pack/enclose.js\";\nexport {default as partition} from \"./partition.js\";\nexport {default as stratify} from \"./stratify.js\";\nexport {default as tree} from \"./tree.js\";\nexport {default as treemap} from \"./treemap/index.js\";\nexport {default as treemapBinary} from \"./treemap/binary.js\";\nexport {default as treemapDice} from \"./treemap/dice.js\";\nexport {default as treemapSlice} from \"./treemap/slice.js\";\nexport {default as treemapSliceDice} from \"./treemap/sliceDice.js\";\nexport {default as treemapSquarify} from \"./treemap/squarify.js\";\nexport {default as treemapResquarify} from \"./treemap/resquarify.js\";\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { scaleLinear } from 'd3-scale';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { Location } from '../../helpers/urls';\nimport Tooltip, { Placement } from '../controls/Tooltip';\nimport LinkIcon from '../icons/LinkIcon';\n\nconst SIZE_SCALE = scaleLinear()\n  .domain([3, 15])\n  .range([11, 18])\n  .clamp(true);\n\ninterface Props {\n  fill?: string;\n  gradient?: string;\n  height: number;\n  icon?: React.ReactNode;\n  itemKey: string;\n  label: string;\n  link?: string | Location;\n  onClick?: (item: string) => void;\n  placement?: Placement;\n  prefix: string;\n  tooltip?: React.ReactNode;\n  value?: React.ReactNode;\n  width: number;\n  x: number;\n  y: number;\n}\n\nconst TEXT_VISIBLE_AT_WIDTH = 80;\nconst TEXT_VISIBLE_AT_HEIGHT = 50;\nconst ICON_VISIBLE_AT_WIDTH = 60;\nconst ICON_VISIBLE_AT_HEIGHT = 30;\nexport default class TreeMapRect extends React.PureComponent<Props> {\n  handleLinkClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.stopPropagation();\n  };\n\n  handleRectClick = () => {\n    if (this.props.onClick) {\n      this.props.onClick(this.props.itemKey);\n    }\n  };\n\n  renderLink = () => {\n    const { link, height, width } = this.props;\n    const hasMinSize = width >= 24 && height >= 24 && (width >= 48 || height >= 50);\n    if (!hasMinSize || link == null) {\n      return null;\n    }\n    return (\n      <Link className=\"treemap-link\" onClick={this.handleLinkClick} to={link}>\n        <LinkIcon />\n      </Link>\n    );\n  };\n\n  renderCell = () => {\n    const cellStyles = {\n      left: this.props.x,\n      top: this.props.y,\n      width: this.props.width,\n      height: this.props.height,\n      backgroundColor: this.props.fill,\n      backgroundImage: this.props.gradient,\n      backgroundSize: '12px 12px',\n      fontSize: SIZE_SCALE(this.props.width / this.props.label.length),\n      lineHeight: `${this.props.height}px`,\n      cursor: this.props.onClick != null ? 'pointer' : 'default'\n    };\n    const isTextVisible =\n      this.props.width >= TEXT_VISIBLE_AT_WIDTH && this.props.height >= TEXT_VISIBLE_AT_HEIGHT;\n    const isIconVisible =\n      this.props.width >= ICON_VISIBLE_AT_WIDTH && this.props.height >= ICON_VISIBLE_AT_HEIGHT;\n\n    return (\n      <div\n        className=\"treemap-cell\"\n        onClick={this.handleRectClick}\n        role=\"treeitem\"\n        style={cellStyles}\n        tabIndex={0}>\n        {isTextVisible && (\n          <div className=\"treemap-inner\" style={{ maxWidth: this.props.width }}>\n            {this.props.prefix || this.props.value ? (\n              <div className=\"treemap-text\">\n                <div>\n                  {isIconVisible && (\n                    <span className={classNames('treemap-icon', { 'spacer-right': isTextVisible })}>\n                      {this.props.icon}\n                    </span>\n                  )}\n\n                  {this.props.prefix && (\n                    <>\n                      {this.props.prefix}\n                      <br />\n                    </>\n                  )}\n\n                  {this.props.label.substr(this.props.prefix.length)}\n                </div>\n\n                <div className=\"treemap-text-suffix little-spacer-top\">{this.props.value}</div>\n              </div>\n            ) : (\n              <div className=\"treemap-text\">{this.props.label}</div>\n            )}\n          </div>\n        )}\n        {this.renderLink()}\n      </div>\n    );\n  };\n\n  render() {\n    const { placement, tooltip } = this.props;\n    return (\n      <Tooltip overlay={tooltip || undefined} placement={placement || 'left'}>\n        {this.renderCell()}\n      </Tooltip>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { hierarchy as d3Hierarchy, treemap as d3Treemap } from 'd3-hierarchy';\nimport * as React from 'react';\nimport { formatMeasure, localizeMetric } from '../../helpers/measures';\nimport { Location } from '../../helpers/urls';\nimport './TreeMap.css';\nimport TreeMapRect from './TreeMapRect';\n\nexport interface TreeMapItem {\n  color?: string;\n  gradient?: string;\n  icon?: React.ReactNode;\n  key: string;\n  label: string;\n  link?: string | Location;\n  measureValue?: string;\n  metric?: { key: string; type: string };\n  size: number;\n  tooltip?: React.ReactNode;\n  component: T.ComponentMeasureEnhanced;\n}\n\ninterface HierarchicalTreemapItem extends TreeMapItem {\n  children?: TreeMapItem[];\n}\n\ninterface Props {\n  height: number;\n  items: TreeMapItem[];\n  onRectangleClick?: (item: T.ComponentMeasureEnhanced) => void;\n  width: number;\n}\n\nexport default class TreeMap extends React.PureComponent<Props> {\n  mostCommitPrefix = (labels: string[]) => {\n    const sortedLabels = labels.slice(0).sort();\n    const firstLabel = sortedLabels[0];\n    const firstLabelLength = firstLabel.length;\n    const lastLabel = sortedLabels[sortedLabels.length - 1];\n    let i = 0;\n    while (i < firstLabelLength && firstLabel.charAt(i) === lastLabel.charAt(i)) {\n      i++;\n    }\n    const prefix = firstLabel.substr(0, i);\n    const prefixTokens = prefix.split(/[\\s\\\\/]/);\n    const lastPrefixPart = prefixTokens[prefixTokens.length - 1];\n    return prefix.substr(0, prefix.length - lastPrefixPart.length);\n  };\n\n  handleClick = (component: T.ComponentMeasureEnhanced) => {\n    if (this.props.onRectangleClick) {\n      this.props.onRectangleClick(component);\n    }\n  };\n\n  render() {\n    const { items, height, width } = this.props;\n    const hierarchy = d3Hierarchy({ children: items } as HierarchicalTreemapItem)\n      .sum(d => d.size)\n      .sort((a, b) => (b.value || 0) - (a.value || 0));\n\n    const treemap = d3Treemap<TreeMapItem>()\n      .round(true)\n      .size([width, height]);\n\n    const nodes = treemap(hierarchy).leaves();\n    const prefix = this.mostCommitPrefix(items.map(item => item.label));\n    const halfWidth = width / 2;\n    return (\n      <div className=\"sonar-d3\">\n        <div className=\"treemap-container\" style={{ width, height }}>\n          {nodes.map(node => (\n            <TreeMapRect\n              fill={node.data.color}\n              gradient={node.data.gradient}\n              height={node.y1 - node.y0}\n              icon={node.data.icon}\n              itemKey={node.data.key}\n              key={node.data.key}\n              label={node.data.label}\n              link={node.data.link}\n              onClick={() => this.handleClick(node.data.component)}\n              placement={node.x0 === 0 || node.x1 < halfWidth ? 'right' : 'left'}\n              prefix={prefix}\n              value={\n                node.data.metric && (\n                  <>\n                    {formatMeasure(node.data.measureValue, node.data.metric.type)}\n                    <span className=\"little-spacer-left\">\n                      {localizeMetric(node.data.metric.key)}\n                    </span>\n                  </>\n                )\n              }\n              tooltip={node.data.tooltip}\n              width={node.x1 - node.x0}\n              x={node.x0}\n              y={node.y0}\n            />\n          ))}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { scaleLinear, scaleOrdinal } from 'd3-scale';\nimport * as React from 'react';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport { colors } from '../../../app/theme';\nimport ColorBoxLegend from '../../../components/charts/ColorBoxLegend';\nimport ColorGradientLegend from '../../../components/charts/ColorGradientLegend';\nimport TreeMap, { TreeMapItem } from '../../../components/charts/TreeMap';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { getComponentMeasureUniqueKey } from '../../../helpers/component';\nimport { getLocalizedMetricName, translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure, isDiffMetric } from '../../../helpers/measures';\nimport { isDefined } from '../../../helpers/types';\nimport { BranchLike } from '../../../types/branch-like';\nimport { MetricKey } from '../../../types/metrics';\nimport EmptyResult from './EmptyResult';\n\ninterface Props {\n  branchLike?: BranchLike;\n  components: T.ComponentMeasureEnhanced[];\n  handleSelect: (component: T.ComponentMeasureIntern) => void;\n  metric: T.Metric;\n}\n\ninterface State {\n  treemapItems: TreeMapItem[];\n}\n\nconst HEIGHT = 500;\nconst COLORS = [colors.green, colors.lightGreen, colors.yellow, colors.orange, colors.red];\nconst LEVEL_COLORS = [colors.red, colors.orange, colors.green, colors.gray71];\nconst NA_GRADIENT = `linear-gradient(-45deg, ${colors.gray71} 25%, ${colors.gray60} 25%, ${colors.gray60} 50%, ${colors.gray71} 50%, ${colors.gray71} 75%, ${colors.gray60} 75%, ${colors.gray60} 100%)`;\n\nexport default class TreeMapView extends React.PureComponent<Props, State> {\n  state: State;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = { treemapItems: this.getTreemapComponents(props) };\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.components !== this.props.components || prevProps.metric !== this.props.metric) {\n      this.setState({ treemapItems: this.getTreemapComponents(this.props) });\n    }\n  }\n\n  getTreemapComponents = ({ components, metric }: Props) => {\n    const colorScale = this.getColorScale(metric);\n    return components\n      .map(component => {\n        const colorMeasure = component.measures.find(measure => measure.metric.key === metric.key);\n        const sizeMeasure = component.measures.find(measure => measure.metric.key !== metric.key);\n        if (!sizeMeasure) {\n          return undefined;\n        }\n        const colorValue =\n          colorMeasure && (isDiffMetric(metric.key) ? colorMeasure.leak : colorMeasure.value);\n        const rawSizeValue = isDiffMetric(sizeMeasure.metric.key)\n          ? sizeMeasure.leak\n          : sizeMeasure.value;\n        if (rawSizeValue === undefined) {\n          return undefined;\n        }\n\n        const sizeValue = Number(rawSizeValue);\n        if (sizeValue < 1) {\n          return undefined;\n        }\n        return {\n          color: colorValue ? (colorScale as Function)(colorValue) : undefined,\n          gradient: !colorValue ? NA_GRADIENT : undefined,\n          icon: <QualifierIcon fill={colors.baseFontColor} qualifier={component.qualifier} />,\n          key: getComponentMeasureUniqueKey(component) ?? '',\n          label: [component.name, component.branch].filter(s => !!s).join(' / '),\n          size: sizeValue,\n          measureValue: colorValue,\n          metric,\n          tooltip: this.getTooltip({\n            colorMetric: metric,\n            colorValue,\n            component,\n            sizeMetric: sizeMeasure.metric,\n            sizeValue\n          }),\n          component\n        };\n      })\n      .filter(isDefined);\n  };\n\n  getLevelColorScale = () =>\n    scaleOrdinal<string, string>()\n      .domain(['ERROR', 'WARN', 'OK', 'NONE'])\n      .range(LEVEL_COLORS);\n\n  getPercentColorScale = (metric: T.Metric) => {\n    const color = scaleLinear<string, string>().domain([0, 25, 50, 75, 100]);\n    color.range(metric.higherValuesAreBetter ? [...COLORS].reverse() : COLORS);\n    return color;\n  };\n\n  getRatingColorScale = () =>\n    scaleLinear<string, string>()\n      .domain([1, 2, 3, 4, 5])\n      .range(COLORS);\n\n  getColorScale = (metric: T.Metric) => {\n    if (metric.type === 'LEVEL') {\n      return this.getLevelColorScale();\n    }\n    if (metric.type === 'RATING') {\n      return this.getRatingColorScale();\n    }\n    return this.getPercentColorScale(metric);\n  };\n\n  getTooltip = ({\n    colorMetric,\n    colorValue,\n    component,\n    sizeMetric,\n    sizeValue\n  }: {\n    colorMetric: T.Metric;\n    colorValue?: string;\n    component: T.ComponentMeasureEnhanced;\n    sizeMetric: T.Metric;\n    sizeValue: number;\n  }) => {\n    const formatted =\n      colorMetric && colorValue !== undefined ? formatMeasure(colorValue, colorMetric.type) : '\u2014';\n    return (\n      <div className=\"text-left\">\n        {[component.name, component.branch].filter(s => !!s).join(' / ')}\n        <br />\n        {`${getLocalizedMetricName(sizeMetric)}: ${formatMeasure(sizeValue, sizeMetric.type)}`}\n        <br />\n        {`${getLocalizedMetricName(colorMetric)}: ${formatted}`}\n      </div>\n    );\n  };\n\n  renderLegend() {\n    const { metric } = this.props;\n    const colorScale = this.getColorScale(metric);\n    if (['LEVEL', 'RATING'].includes(metric.type)) {\n      return (\n        <ColorBoxLegend\n          className=\"measure-details-treemap-legend color-box-full\"\n          colorScale={colorScale}\n          metricType={metric.type}\n        />\n      );\n    }\n    return (\n      <ColorGradientLegend\n        className=\"measure-details-treemap-legend\"\n        showColorNA={true}\n        colorScale={colorScale}\n        height={30}\n        width={200}\n      />\n    );\n  }\n\n  render() {\n    const { treemapItems } = this.state;\n    if (treemapItems.length <= 0) {\n      return <EmptyResult />;\n    }\n    const { components, metric } = this.props;\n    const sizeMeasure =\n      components.length > 0\n        ? components[0].measures.find(measure => measure.metric.key !== metric.key)\n        : null;\n    return (\n      <div className=\"measure-details-treemap\">\n        <div className=\"display-flex-start note spacer-bottom\">\n          <span>\n            {translateWithParameters(\n              'component_measures.legend.color_x',\n              getLocalizedMetricName(metric)\n            )}\n          </span>\n          <span className=\"spacer-left flex-1\">\n            {translateWithParameters(\n              'component_measures.legend.size_x',\n              translate(\n                'metric',\n                sizeMeasure && sizeMeasure.metric ? sizeMeasure.metric.key : MetricKey.ncloc,\n                'name'\n              )\n            )}\n          </span>\n          <span>{this.renderLegend()}</span>\n        </div>\n        <AutoSizer disableHeight={true}>\n          {({ width }) => (\n            <TreeMap\n              height={HEIGHT}\n              items={treemapItems}\n              onRectangleClick={this.props.handleSelect}\n              width={width}\n            />\n          )}\n        </AutoSizer>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { collapsePath, limitComponentName } from '../../../helpers/path';\n\ninterface Props {\n  canBrowse: boolean;\n  component: T.ComponentMeasure;\n  isLast: boolean;\n  handleSelect: (component: T.ComponentMeasureIntern) => void;\n}\n\nexport default class Breadcrumb extends React.PureComponent<Props> {\n  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.props.handleSelect(this.props.component);\n  };\n\n  render() {\n    const { canBrowse, component, isLast } = this.props;\n    const isPath = component.qualifier === 'DIR';\n    const componentName = isPath\n      ? collapsePath(component.name, 15)\n      : limitComponentName(component.name);\n    const breadcrumbItem = canBrowse ? (\n      <a href=\"#\" onClick={this.handleClick}>\n        {componentName}\n      </a>\n    ) : (\n      <span>{componentName}</span>\n    );\n\n    return (\n      <span>\n        <Tooltip overlay={component.name !== componentName ? component.name : undefined}>\n          {breadcrumbItem}\n        </Tooltip>\n        {!isLast && <span className=\"slash-separator\" />}\n      </span>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport key from 'keymaster';\nimport * as React from 'react';\nimport { getBreadcrumbs } from '../../../api/components';\nimport { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branch-like';\nimport { BranchLike } from '../../../types/branch-like';\nimport Breadcrumb from './Breadcrumb';\n\ninterface Props {\n  backToFirst: boolean;\n  branchLike?: BranchLike;\n  className?: string;\n  component: T.ComponentMeasure;\n  handleSelect: (component: T.ComponentMeasureIntern) => void;\n  rootComponent: T.ComponentMeasure;\n}\n\ninterface State {\n  breadcrumbs: T.ComponentMeasure[];\n}\n\nexport default class Breadcrumbs extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { breadcrumbs: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchBreadcrumbs();\n    this.attachShortcuts();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      this.props.component !== prevProps.component ||\n      !isSameBranchLike(prevProps.branchLike, this.props.branchLike)\n    ) {\n      this.fetchBreadcrumbs();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    this.detachShortcuts();\n  }\n\n  attachShortcuts() {\n    key('left', 'measures-files', () => {\n      const { breadcrumbs } = this.state;\n      if (breadcrumbs.length > 1) {\n        const idx = this.props.backToFirst ? 0 : breadcrumbs.length - 2;\n        this.props.handleSelect(breadcrumbs[idx]);\n      }\n      return false;\n    });\n  }\n\n  detachShortcuts() {\n    key.unbind('left', 'measures-files');\n  }\n\n  fetchBreadcrumbs = () => {\n    const { branchLike, component, rootComponent } = this.props;\n    const isRoot = component.key === rootComponent.key;\n    if (isRoot) {\n      if (this.mounted) {\n        this.setState({ breadcrumbs: [component] });\n      }\n      return;\n    }\n    getBreadcrumbs({ component: component.key, ...getBranchLikeQuery(branchLike) }).then(\n      breadcrumbs => {\n        if (this.mounted) {\n          this.setState({ breadcrumbs });\n        }\n      },\n      () => {}\n    );\n  };\n\n  render() {\n    const { breadcrumbs } = this.state;\n    if (breadcrumbs.length <= 0) {\n      return null;\n    }\n    const lastItem = breadcrumbs[breadcrumbs.length - 1];\n    return (\n      <div className={this.props.className}>\n        {breadcrumbs.map(component => (\n          <Breadcrumb\n            canBrowse={component.key !== lastItem.key}\n            component={component}\n            handleSelect={this.props.handleSelect}\n            isLast={component.key === lastItem.key}\n            key={component.key}\n          />\n        ))}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\ninterface Props {\n  left: React.ReactNode;\n  right: React.ReactNode;\n}\n\nexport default function MeasureContentHeader({ left, right }: Props) {\n  return (\n    <div className=\"measure-content-header\">\n      <div className=\"measure-content-header-left\">{left}</div>\n      <div className=\"measure-content-header-right\">{right}</div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { max } from 'd3-array';\nimport { scaleBand, ScaleBand, scaleLinear, ScaleLinear } from 'd3-scale';\nimport * as React from 'react';\nimport Tooltip from '../controls/Tooltip';\nimport './BarChart.css';\nimport './Histogram.css';\n\ninterface Props {\n  alignTicks?: boolean;\n  bars: number[];\n  height: number;\n  padding?: [number, number, number, number];\n  yTicks?: string[];\n  yTooltips?: string[];\n  yValues?: string[];\n  width: number;\n}\n\nconst BAR_HEIGHT = 10;\nconst DEFAULT_PADDING = [10, 10, 10, 10];\n\ntype XScale = ScaleLinear<number, number>;\ntype YScale = ScaleBand<number>;\n\nexport default class Histogram extends React.PureComponent<Props> {\n  renderBar(d: number, index: number, xScale: XScale, yScale: YScale) {\n    const { alignTicks, padding = DEFAULT_PADDING } = this.props;\n\n    const width = Math.round(xScale(d)) + /* minimum bar width */ 1;\n    const x = xScale.range()[0] + (alignTicks ? padding[3] : 0);\n    const y = Math.round((yScale(index) || 0) + yScale.bandwidth() / 2);\n\n    return <rect className=\"bar-chart-bar\" height={BAR_HEIGHT} width={width} x={x} y={y} />;\n  }\n\n  renderValue(d: number, index: number, xScale: XScale, yScale: YScale) {\n    const { alignTicks, padding = DEFAULT_PADDING, yValues } = this.props;\n\n    const value = yValues && yValues[index];\n\n    if (!value) {\n      return null;\n    }\n\n    const x = xScale(d) + (alignTicks ? padding[3] : 0);\n    const y = Math.round((yScale(index) || 0) + yScale.bandwidth() / 2 + BAR_HEIGHT / 2);\n\n    return (\n      <Tooltip overlay={this.props.yTooltips && this.props.yTooltips[index]}>\n        <text className=\"bar-chart-tick histogram-value\" dx=\"1em\" dy=\"0.3em\" x={x} y={y}>\n          {value}\n        </text>\n      </Tooltip>\n    );\n  }\n\n  renderTick(index: number, xScale: XScale, yScale: YScale) {\n    const { alignTicks, yTicks } = this.props;\n\n    const tick = yTicks && yTicks[index];\n\n    if (!tick) {\n      return null;\n    }\n\n    const x = xScale.range()[0];\n    const y = Math.round((yScale(index) || 0) + yScale.bandwidth() / 2 + BAR_HEIGHT / 2);\n    const historyTickClass = alignTicks ? 'histogram-tick-start' : 'histogram-tick';\n\n    return (\n      <text\n        className={'bar-chart-tick ' + historyTickClass}\n        dx={alignTicks ? 0 : '-1em'}\n        dy=\"0.3em\"\n        x={x}\n        y={y}>\n        {tick}\n      </text>\n    );\n  }\n\n  renderBars(xScale: XScale, yScale: YScale) {\n    return (\n      <g>\n        {this.props.bars.map((d, index) => {\n          return (\n            // eslint-disable-next-line react/no-array-index-key\n            <g key={index}>\n              {this.renderBar(d, index, xScale, yScale)}\n              {this.renderValue(d, index, xScale, yScale)}\n              {this.renderTick(index, xScale, yScale)}\n            </g>\n          );\n        })}\n      </g>\n    );\n  }\n\n  render() {\n    const { bars, width, height, padding = DEFAULT_PADDING } = this.props;\n\n    const availableWidth = width - padding[1] - padding[3];\n    const xScale: XScale = scaleLinear()\n      .domain([0, max(bars)!])\n      .range([0, availableWidth]);\n\n    const availableHeight = height - padding[0] - padding[2];\n    const yScale: YScale = scaleBand<number>()\n      .domain(bars.map((_, index) => index))\n      .rangeRound([0, availableHeight]);\n\n    return (\n      <svg className=\"bar-chart\" height={this.props.height} width={this.props.width}>\n        <g transform={`translate(${this.props.alignTicks ? 4 : padding[3]}, ${padding[0]})`}>\n          {this.renderBars(xScale, yScale)}\n        </g>\n      </svg>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport Histogram from '../../components/charts/Histogram';\nimport { translate } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport { getLanguages, Store } from '../../store/rootReducer';\nimport { MetricType } from '../../types/metrics';\n\ninterface LanguageDistributionProps {\n  distribution: string;\n  languages: T.Languages;\n}\n\nconst NUMBER_FORMAT_THRESHOLD = 1000;\n\nexport function LanguageDistribution(props: LanguageDistributionProps) {\n  let distribution = props.distribution.split(';').map(point => {\n    const tokens = point.split('=');\n    return { language: tokens[0], lines: parseInt(tokens[1], 10) };\n  });\n\n  distribution = sortBy(distribution, d => -d.lines);\n\n  const data = distribution.map(d => d.lines);\n  const yTicks = distribution.map(d => getLanguageName(d.language)).map(cutLanguageName);\n  const yTooltips = distribution.map(d =>\n    d.lines > NUMBER_FORMAT_THRESHOLD ? formatMeasure(d.lines, MetricType.Integer) : ''\n  );\n  const yValues = distribution.map(d => formatMeasure(d.lines, MetricType.ShortInteger));\n\n  return (\n    <Histogram\n      bars={data}\n      height={distribution.length * 25}\n      padding={[0, 60, 0, 80]}\n      width={260}\n      yTicks={yTicks}\n      yTooltips={yTooltips}\n      yValues={yValues}\n    />\n  );\n\n  function getLanguageName(langKey: string) {\n    if (langKey === '<null>') {\n      return translate('unknown');\n    }\n    const lang = props.languages[langKey];\n    return lang ? lang.name : langKey;\n  }\n}\n\nfunction cutLanguageName(name: string) {\n  return name.length > 10 ? `${name.substr(0, 7)}...` : name;\n}\n\nconst mapStateToProps = (state: Store) => ({\n  languages: getLanguages(state)\n});\n\nexport default connect(mapStateToProps)(LanguageDistribution);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function HistoryIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14.7 3.4v3.3c0 .1 0 .2-.1.2s-.2 0-.3-.1l-.9-.9-4.8 4.8c-.1.1-.1.1-.2.1s-.1 0-.2-.1L6.4 9l-3.2 3.2-1.5-1.5 4.5-4.5c.1-.1.1-.1.2-.1s.1 0 .2.1L8.4 8l3.5-3.5-.9-1c-.1-.1-.1-.2-.1-.3s.1-.1.2-.1h3.3c.1 0 .1 0 .2.1.1 0 .1.1.1.2z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { parseDate } from '../helpers/dates';\nimport { translate, translateWithParameters } from '../helpers/l10n';\nimport { ApplicationPeriod } from '../types/application';\n\nexport function getPeriodLabel(\n  period: T.Period | undefined,\n  dateFormatter: (date: string) => string\n) {\n  if (!period) {\n    return undefined;\n  }\n\n  let parameter = period.modeParam || period.parameter || '';\n\n  switch (period.mode) {\n    case 'SPECIFIC_ANALYSIS':\n      parameter = dateFormatter(period.date);\n      break;\n    case 'PREVIOUS_VERSION':\n      parameter = parameter || dateFormatter(period.date);\n      break;\n    /*\n     * Handle legacy period modes, that predate MMF-1579\n     */\n    case 'previous_version':\n      if (!parameter) {\n        return translate('overview.period.previous_version_only_date');\n      }\n      break;\n    case 'date':\n      parameter = parameter && dateFormatter(parameter);\n      break;\n    case 'manual_baseline':\n      parameter = parameter || dateFormatter(period.date);\n      break;\n    default: // No change in the parameter\n  }\n\n  return translateWithParameters(`overview.period.${period.mode.toLowerCase()}`, parameter);\n}\n\nexport function getPeriodDate(period?: { date?: string }): Date | undefined {\n  return period && period.date ? parseDate(period.date) : undefined;\n}\n\nexport function isApplicationPeriod(\n  period: T.Period | ApplicationPeriod\n): period is ApplicationPeriod {\n  return (period as ApplicationPeriod).project !== undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { differenceInDays } from 'date-fns';\nimport * as React from 'react';\nimport { injectIntl, WrappedComponentProps } from 'react-intl';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport DateFormatter, { longFormatterOption } from '../../../components/intl/DateFormatter';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport DateTimeFormatter, { formatterOption } from '../../../components/intl/DateTimeFormatter';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getPeriodDate, getPeriodLabel } from '../../../helpers/periods';\n\ninterface Props {\n  className?: string;\n  component: T.ComponentMeasure;\n  period: T.Period;\n}\n\nexport class LeakPeriodLegend extends React.PureComponent<Props & WrappedComponentProps> {\n  formatDate = (date: string) => {\n    return this.props.intl.formatDate(date, longFormatterOption);\n  };\n\n  formatDateTime = (date: string) => {\n    return this.props.intl.formatTime(date, formatterOption);\n  };\n\n  render() {\n    const { className, component, period } = this.props;\n    const leakClass = classNames('domain-measures-header leak-box', className);\n    if (component.qualifier === 'APP') {\n      return <div className={leakClass}>{translate('issues.new_code_period')}</div>;\n    }\n\n    const leakPeriodLabel = getPeriodLabel(\n      period,\n      period.mode === 'manual_baseline' ? this.formatDateTime : this.formatDate\n    );\n    if (!leakPeriodLabel) {\n      return null;\n    }\n\n    const label = (\n      <div className={leakClass}>\n        {translateWithParameters('overview.new_code_period_x', leakPeriodLabel)}\n      </div>\n    );\n\n    if (period.mode === 'days' || period.mode === 'NUMBER_OF_DAYS') {\n      return label;\n    }\n\n    const date = getPeriodDate(period);\n    const tooltip = date && (\n      <div>\n        <DateFromNow date={date} />\n        {', '}\n        {differenceInDays(new Date(), date) < 1 ? (\n          <DateTimeFormatter date={date} />\n        ) : (\n          <DateFormatter date={date} long={true} />\n        )}\n      </div>\n    );\n\n    return <Tooltip overlay={tooltip}>{label}</Tooltip>;\n  }\n}\n\nexport default injectIntl(LeakPeriodLegend);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport LanguageDistribution from '../../../components/charts/LanguageDistribution';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport HistoryIcon from '../../../components/icons/HistoryIcon';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport Measure from '../../../components/measure/Measure';\nimport { getLocalizedMetricName, translate } from '../../../helpers/l10n';\nimport { isDiffMetric } from '../../../helpers/measures';\nimport { getMeasureHistoryUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport { hasFullMeasures } from '../utils';\nimport LeakPeriodLegend from './LeakPeriodLegend';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.ComponentMeasure;\n  leakPeriod?: T.Period;\n  measureValue?: string;\n  metric: T.Metric;\n  secondaryMeasure?: T.Measure;\n}\n\nexport default function MeasureHeader(props: Props) {\n  const { branchLike, component, leakPeriod, measureValue, metric, secondaryMeasure } = props;\n  const isDiff = isDiffMetric(metric.key);\n  const hasHistory =\n    ['VW', 'SVW', 'APP', 'TRK'].includes(component.qualifier) && hasFullMeasures(branchLike);\n  const displayLeak = hasFullMeasures(branchLike);\n  return (\n    <div className=\"measure-details-header big-spacer-bottom\">\n      <div className=\"measure-details-primary\">\n        <div className=\"measure-details-metric\">\n          <IssueTypeIcon className=\"little-spacer-right text-text-bottom\" query={metric.key} />\n          {getLocalizedMetricName(metric)}\n          <span className=\"measure-details-value spacer-left\">\n            <strong>\n              <Measure\n                className={isDiff && displayLeak ? 'leak-box' : undefined}\n                metricKey={metric.key}\n                metricType={metric.type}\n                value={measureValue}\n              />\n            </strong>\n          </span>\n          {!isDiff && hasHistory && (\n            <Tooltip overlay={translate('component_measures.show_metric_history')}>\n              <Link\n                className=\"js-show-history spacer-left button button-small\"\n                to={getMeasureHistoryUrl(component.key, metric.key, branchLike)}>\n                <HistoryIcon />\n              </Link>\n            </Tooltip>\n          )}\n        </div>\n        <div className=\"measure-details-primary-actions\">\n          {displayLeak && leakPeriod && (\n            <LeakPeriodLegend className=\"spacer-left\" component={component} period={leakPeriod} />\n          )}\n        </div>\n      </div>\n      {secondaryMeasure &&\n        secondaryMeasure.metric === 'ncloc_language_distribution' &&\n        secondaryMeasure.value !== undefined && (\n          <div className=\"measure-details-secondary\">\n            <LanguageDistribution distribution={secondaryMeasure.value} />\n          </div>\n        )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function TreeIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M15.045 2.467c0-0.277-0.225-0.503-0.503-0.503h-13.084c-0.277 0-0.503 0.225-0.503 0.503v1.007c0 0.277 0.225 0.503 0.503 0.503h13.084c0.277 0 0.503-0.225 0.503-0.503v-1.007zM15.045 5.487c0-0.277-0.194-0.503-0.432-0.503h-11.216c-0.238 0-0.432 0.225-0.432 0.503v1.007c0 0.277 0.193 0.503 0.432 0.503h11.216c0.238 0 0.432-0.225 0.432-0.503v-1.007zM15.045 8.506c0-0.277-0.161-0.503-0.359-0.503h-9.346c-0.198 0-0.359 0.225-0.359 0.503v1.007c0 0.277 0.161 0.503 0.359 0.503h9.346c0.198 0 0.359-0.225 0.359-0.503v-1.007zM15.045 11.527c0-0.277-0.129-0.503-0.287-0.503h-7.477c-0.159 0-0.288 0.225-0.288 0.503v1.007c0 0.277 0.129 0.503 0.288 0.503h7.477c0.159 0 0.287-0.225 0.287-0.503v-1.007z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function TreemapIcon({ fill = 'currentColor', size = 14, ...iconProps }: IconProps) {\n  return (\n    <Icon size={size} {...iconProps}>\n      <path\n        d=\"M0 0h8v16h-8zM9.143 0h6.857v9.143h-6.857zM9.143 10.286h6.857v5.714h-6.857z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport ListIcon from '../../../components/icons/ListIcon';\nimport TreeIcon from '../../../components/icons/TreeIcon';\nimport TreemapIcon from '../../../components/icons/TreemapIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { MeasurePageView } from '../../../types/measures';\nimport { hasList, hasTree, hasTreemap } from '../utils';\n\ninterface Props {\n  className?: string;\n  metric: T.Metric;\n  handleViewChange: (view: MeasurePageView) => void;\n  view: MeasurePageView;\n}\n\nexport default class MeasureViewSelect extends React.PureComponent<Props> {\n  getOptions = () => {\n    const { metric } = this.props;\n    const options = [];\n    if (hasTree(metric.key)) {\n      options.push({\n        icon: <TreeIcon />,\n        label: translate('component_measures.tab.tree'),\n        value: 'tree'\n      });\n    }\n    if (hasList(metric.key)) {\n      options.push({\n        icon: <ListIcon />,\n        label: translate('component_measures.tab.list'),\n        value: 'list'\n      });\n    }\n    if (hasTreemap(metric.key, metric.type)) {\n      options.push({\n        icon: <TreemapIcon />,\n        label: translate('component_measures.tab.treemap'),\n        value: 'treemap'\n      });\n    }\n    return options;\n  };\n\n  handleChange = (option: { value: string }) => {\n    return this.props.handleViewChange(option.value as MeasurePageView);\n  };\n\n  renderOption = (option: { icon: JSX.Element; label: string }) => {\n    return (\n      <>\n        {option.icon}\n        <span className=\"little-spacer-left\">{option.label}</span>\n      </>\n    );\n  };\n\n  render() {\n    return (\n      <Select\n        autoBlur={true}\n        className={this.props.className}\n        clearable={false}\n        onChange={this.handleChange}\n        optionRenderer={this.renderOption}\n        options={this.getOptions()}\n        searchable={false}\n        value={this.props.view}\n        valueRenderer={this.renderOption}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { InjectedRouter } from 'react-router';\nimport { getComponentTree } from '../../../api/components';\nimport { getMeasures } from '../../../api/measures';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport SourceViewer from '../../../components/SourceViewer/SourceViewer';\nimport PageActions from '../../../components/ui/PageActions';\nimport { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branch-like';\nimport { getComponentMeasureUniqueKey } from '../../../helpers/component';\nimport { translate } from '../../../helpers/l10n';\nimport { isDiffMetric } from '../../../helpers/measures';\nimport { RequestData } from '../../../helpers/request';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport { isFile, isView } from '../../../types/component';\nimport { MeasurePageView } from '../../../types/measures';\nimport { MetricKey } from '../../../types/metrics';\nimport { complementary } from '../config/complementary';\nimport FilesView from '../drilldown/FilesView';\nimport TreeMapView from '../drilldown/TreeMapView';\nimport { enhanceComponent, Query } from '../utils';\nimport Breadcrumbs from './Breadcrumbs';\nimport MeasureContentHeader from './MeasureContentHeader';\nimport MeasureHeader from './MeasureHeader';\nimport MeasureViewSelect from './MeasureViewSelect';\n\ninterface Props {\n  branchLike?: BranchLike;\n  leakPeriod?: T.Period;\n  requestedMetric: Pick<T.Metric, 'key' | 'direction'>;\n  metrics: T.Dict<T.Metric>;\n  onIssueChange?: (issue: T.Issue) => void;\n  rootComponent: T.ComponentMeasure;\n  router: InjectedRouter;\n  selected?: string;\n  updateQuery: (query: Partial<Query>) => void;\n  view: MeasurePageView;\n}\n\ninterface State {\n  baseComponent?: T.ComponentMeasure;\n  components: T.ComponentMeasureEnhanced[];\n  loadingMoreComponents: boolean;\n  measure?: T.Measure;\n  metric?: T.Metric;\n  paging?: T.Paging;\n  secondaryMeasure?: T.Measure;\n  selectedComponent?: T.ComponentMeasureIntern;\n}\n\nexport default class MeasureContent extends React.PureComponent<Props, State> {\n  container?: HTMLElement | null;\n  mounted = false;\n  state: State = {\n    components: [],\n    loadingMoreComponents: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchComponentTree();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    const prevComponentKey = prevProps.selected || prevProps.rootComponent.key;\n    const componentKey = this.props.selected || this.props.rootComponent.key;\n    if (\n      prevComponentKey !== componentKey ||\n      !isSameBranchLike(prevProps.branchLike, this.props.branchLike) ||\n      prevProps.requestedMetric !== this.props.requestedMetric ||\n      prevProps.view !== this.props.view\n    ) {\n      this.fetchComponentTree();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchComponentTree = () => {\n    const { metricKeys, opts, strategy } = this.getComponentRequestParams(\n      this.props.view,\n      this.props.requestedMetric\n    );\n    const componentKey = this.props.selected || this.props.rootComponent.key;\n    const baseComponentMetrics = [this.props.requestedMetric.key];\n    if (this.props.requestedMetric.key === MetricKey.ncloc) {\n      baseComponentMetrics.push('ncloc_language_distribution');\n    }\n    Promise.all([\n      getComponentTree(strategy, componentKey, metricKeys, opts),\n      getMeasures({\n        component: componentKey,\n        metricKeys: baseComponentMetrics.join(),\n        ...getBranchLikeQuery(this.props.branchLike)\n      })\n    ]).then(([tree, measures]) => {\n      if (this.mounted) {\n        const metric = tree.metrics.find(m => m.key === this.props.requestedMetric.key);\n        const components = tree.components.map(component =>\n          enhanceComponent(component, metric, this.props.metrics)\n        );\n\n        const measure = measures.find(measure => measure.metric === this.props.requestedMetric.key);\n        const secondaryMeasure = measures.find(\n          measure => measure.metric !== this.props.requestedMetric.key\n        );\n\n        this.setState(({ selectedComponent }) => ({\n          baseComponent: tree.baseComponent,\n          components,\n          measure,\n          metric,\n          paging: tree.paging,\n          secondaryMeasure,\n          selectedComponent:\n            components.length > 0 &&\n            components.find(\n              c =>\n                getComponentMeasureUniqueKey(c) === getComponentMeasureUniqueKey(selectedComponent)\n            )\n              ? selectedComponent\n              : undefined\n        }));\n      }\n    });\n  };\n\n  fetchMoreComponents = () => {\n    const { metrics, view } = this.props;\n    const { baseComponent, metric, paging } = this.state;\n    if (!baseComponent || !paging || !metric) {\n      return;\n    }\n    const { metricKeys, opts, strategy } = this.getComponentRequestParams(view, metric, {\n      p: paging.pageIndex + 1\n    });\n    this.setState({ loadingMoreComponents: true });\n    getComponentTree(strategy, baseComponent.key, metricKeys, opts).then(\n      r => {\n        if (this.mounted && metric.key === this.props.requestedMetric.key) {\n          this.setState(state => ({\n            components: [\n              ...state.components,\n              ...r.components.map(component => enhanceComponent(component, metric, metrics))\n            ],\n            loadingMoreComponents: false,\n            paging: r.paging\n          }));\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loadingMoreComponents: false });\n        }\n      }\n    );\n  };\n\n  getComponentRequestParams(\n    view: MeasurePageView,\n    metric: Pick<T.Metric, 'key' | 'direction'>,\n    options: Object = {}\n  ) {\n    const strategy = view === 'list' ? 'leaves' : 'children';\n    const metricKeys = [metric.key];\n    const opts: RequestData = {\n      ...getBranchLikeQuery(this.props.branchLike),\n      additionalFields: 'metrics',\n      ps: 500\n    };\n\n    const setMetricSort = () => {\n      const isDiff = isDiffMetric(metric.key);\n      opts.s = isDiff ? 'metricPeriod' : 'metric';\n      opts.metricSortFilter = 'withMeasuresOnly';\n      if (isDiff) {\n        opts.metricPeriodSort = 1;\n      }\n    };\n\n    const isDiff = isDiffMetric(metric.key);\n    if (view === 'tree') {\n      metricKeys.push(...(complementary[metric.key] || []));\n      opts.asc = true;\n      opts.s = 'qualifier,name';\n    } else if (view === 'list') {\n      metricKeys.push(...(complementary[metric.key] || []));\n      opts.asc = metric.direction === 1;\n      opts.metricSort = metric.key;\n      setMetricSort();\n    } else if (view === 'treemap') {\n      const sizeMetric = isDiff ? 'new_lines' : 'ncloc';\n      metricKeys.push(sizeMetric);\n      opts.asc = false;\n      opts.metricSort = sizeMetric;\n      setMetricSort();\n    }\n\n    return { metricKeys, opts: { ...opts, ...options }, strategy };\n  }\n\n  updateSelected = (component: string) => {\n    this.props.updateQuery({\n      selected: component !== this.props.rootComponent.key ? component : undefined\n    });\n  };\n\n  updateView = (view: MeasurePageView) => {\n    this.props.updateQuery({ view });\n  };\n\n  onOpenComponent = (component: T.ComponentMeasureIntern) => {\n    if (isView(this.props.rootComponent.qualifier)) {\n      const comp = this.state.components.find(\n        c =>\n          c.refKey === component.key ||\n          getComponentMeasureUniqueKey(c) === getComponentMeasureUniqueKey(component)\n      );\n\n      if (comp) {\n        this.props.router.push(getProjectUrl(comp.refKey || comp.key, component.branch));\n      }\n\n      return;\n    }\n\n    this.setState(state => ({ selectedComponent: state.baseComponent }));\n    this.updateSelected(component.key);\n    if (this.container) {\n      this.container.focus();\n    }\n  };\n\n  onSelectComponent = (component: T.ComponentMeasureIntern) => {\n    this.setState({ selectedComponent: component });\n  };\n\n  getSelectedIndex = () => {\n    const componentKey = isFile(this.state.baseComponent?.qualifier)\n      ? getComponentMeasureUniqueKey(this.state.baseComponent)\n      : getComponentMeasureUniqueKey(this.state.selectedComponent);\n    const index = this.state.components.findIndex(\n      component => getComponentMeasureUniqueKey(component) === componentKey\n    );\n    return index !== -1 ? index : undefined;\n  };\n\n  handleScroll = (element: Element) => {\n    const offset = window.innerHeight / 2;\n    scrollToElement(element, { topOffset: offset - 100, bottomOffset: offset, smooth: true });\n  };\n\n  renderMeasure() {\n    const { view } = this.props;\n    const { metric } = this.state;\n    if (!metric) {\n      return null;\n    }\n    if (view === 'tree' || view === 'list') {\n      const selectedIdx = this.getSelectedIndex();\n      return (\n        <FilesView\n          branchLike={this.props.branchLike}\n          components={this.state.components}\n          defaultShowBestMeasures={view === 'tree'}\n          fetchMore={this.fetchMoreComponents}\n          handleOpen={this.onOpenComponent}\n          handleSelect={this.onSelectComponent}\n          loadingMore={this.state.loadingMoreComponents}\n          metric={metric}\n          metrics={this.props.metrics}\n          paging={this.state.paging}\n          rootComponent={this.props.rootComponent}\n          selectedIdx={selectedIdx}\n          selectedComponent={\n            selectedIdx !== undefined\n              ? (this.state.selectedComponent as T.ComponentMeasureEnhanced)\n              : undefined\n          }\n          view={view}\n        />\n      );\n    }\n\n    return (\n      <TreeMapView\n        branchLike={this.props.branchLike}\n        components={this.state.components}\n        handleSelect={this.onOpenComponent}\n        metric={metric}\n      />\n    );\n  }\n\n  render() {\n    const { branchLike, rootComponent, view } = this.props;\n    const { baseComponent, measure, metric, paging, secondaryMeasure } = this.state;\n\n    if (!baseComponent || !metric) {\n      return null;\n    }\n\n    const measureValue =\n      measure && (isDiffMetric(measure.metric) ? measure.period?.value : measure.value);\n    const isFileComponent = isFile(baseComponent.qualifier);\n    const selectedIdx = this.getSelectedIndex();\n\n    return (\n      <div className=\"layout-page-main no-outline\" ref={container => (this.container = container)}>\n        <A11ySkipTarget anchor=\"measures_main\" />\n\n        <div className=\"layout-page-header-panel layout-page-main-header\">\n          <div className=\"layout-page-header-panel-inner layout-page-main-header-inner\">\n            <div className=\"layout-page-main-inner\">\n              <MeasureContentHeader\n                left={\n                  <Breadcrumbs\n                    backToFirst={view === 'list'}\n                    branchLike={branchLike}\n                    className=\"text-ellipsis flex-1\"\n                    component={baseComponent}\n                    handleSelect={this.onOpenComponent}\n                    rootComponent={rootComponent}\n                  />\n                }\n                right={\n                  <div className=\"display-flex-center\">\n                    {!isFileComponent && metric && (\n                      <>\n                        <div>{translate('component_measures.view_as')}</div>\n                        <MeasureViewSelect\n                          className=\"measure-view-select spacer-left big-spacer-right\"\n                          handleViewChange={this.updateView}\n                          metric={metric}\n                          view={view}\n                        />\n\n                        <PageActions\n                          componentQualifier={rootComponent.qualifier}\n                          current={\n                            selectedIdx !== undefined && view !== 'treemap'\n                              ? selectedIdx + 1\n                              : undefined\n                          }\n                          showShortcuts={['list', 'tree'].includes(view)}\n                          total={paging && paging.total}\n                        />\n                      </>\n                    )}\n                  </div>\n                }\n              />\n            </div>\n          </div>\n        </div>\n\n        <div className=\"layout-page-main-inner measure-details-content\">\n          <MeasureHeader\n            branchLike={branchLike}\n            component={baseComponent}\n            leakPeriod={this.props.leakPeriod}\n            measureValue={measureValue}\n            metric={metric}\n            secondaryMeasure={secondaryMeasure}\n          />\n          {isFileComponent ? (\n            <div className=\"measure-details-viewer\">\n              <SourceViewer\n                branchLike={branchLike}\n                component={baseComponent.key}\n                metricKey={this.state.metric?.key}\n                onIssueChange={this.props.onIssueChange}\n                scroll={this.handleScroll}\n              />\n            </div>\n          ) : (\n            this.renderMeasure()\n          )}\n        </div>\n      </div>\n    );\n  }\n}\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n}\n", "import namespace from \"./namespace\";\nimport {xhtml} from \"./namespaces\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport selector from \"../selector\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport selectorAll from \"../selectorAll\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport matcher from \"../matcher\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n  return new Array(update.length);\n}\n", "import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import {Selection} from \"./index\";\nimport {EnterNode} from \"./enter\";\nimport constant from \"../constant\";\n\nvar keyPrefix = \"$\"; // Protect against keys like \u201C__proto__\u201D.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don\u2019t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = {},\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n      if (keyValue in nodeByKeyValue) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue[keyValue] = node;\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = keyPrefix + key.call(parent, data[i], i, data);\n    if (node = nodeByKeyValue[keyValue]) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue[keyValue] = null;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nexport default function(value, key) {\n  if (!value) {\n    data = new Array(this.size()), j = -1;\n    this.each(function(d) { data[++j] = d; });\n    return data;\n  }\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = value.call(parent, parent && parent.__data__, j, parents),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n", "import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n  if (onupdate != null) update = onupdate(update);\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index\";\n\nexport default function(selection) {\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n", "import {Selection} from \"./index\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n", "export default function() {\n  var nodes = new Array(this.size()), i = -1;\n  this.each(function() { nodes[++i] = this; });\n  return nodes;\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n", "export default function() {\n  var size = 0;\n  this.each(function() { ++size; });\n  return size;\n}\n", "export default function() {\n  return !this.node();\n}\n", "export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n", "import namespace from \"../namespace\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n", "function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n", "function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n", "function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n", "function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n", "function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n", "import creator from \"../creator\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n", "import creator from \"../creator\";\nimport selector from \"../selector\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n", "function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n", "function selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n", "var filterEvents = {};\n\nexport var event = null;\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!(\"onmouseenter\" in element)) {\n    filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n  }\n}\n\nfunction filterContextListener(listener, index, group) {\n  listener = contextListener(listener, index, group);\n  return function(event) {\n    var related = event.relatedTarget;\n    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n      listener.call(this, event);\n    }\n  };\n}\n\nfunction contextListener(listener, index, group) {\n  return function(event1) {\n    var event0 = event; // Events can be reentrant (e.g., focus).\n    event = event1;\n    try {\n      listener.call(this, this.__data__, index, group);\n    } finally {\n      event = event0;\n    }\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, capture) {\n  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n  return function(d, i, group) {\n    var on = this.__on, o, listener = wrap(value, i, group);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n        this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, capture);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, capture) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  if (capture == null) capture = false;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n  return this;\n}\n\nexport function customEvent(event1, listener, that, args) {\n  var event0 = event;\n  event1.sourceEvent = event;\n  event = event1;\n  try {\n    return listener.apply(that, args);\n  } finally {\n    event = event0;\n  }\n}\n", "import defaultView from \"../window\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n", "import selection_select from \"./select\";\nimport selection_selectAll from \"./selectAll\";\nimport selection_filter from \"./filter\";\nimport selection_data from \"./data\";\nimport selection_enter from \"./enter\";\nimport selection_exit from \"./exit\";\nimport selection_join from \"./join\";\nimport selection_merge from \"./merge\";\nimport selection_order from \"./order\";\nimport selection_sort from \"./sort\";\nimport selection_call from \"./call\";\nimport selection_nodes from \"./nodes\";\nimport selection_node from \"./node\";\nimport selection_size from \"./size\";\nimport selection_empty from \"./empty\";\nimport selection_each from \"./each\";\nimport selection_attr from \"./attr\";\nimport selection_style from \"./style\";\nimport selection_property from \"./property\";\nimport selection_classed from \"./classed\";\nimport selection_text from \"./text\";\nimport selection_html from \"./html\";\nimport selection_raise from \"./raise\";\nimport selection_lower from \"./lower\";\nimport selection_append from \"./append\";\nimport selection_insert from \"./insert\";\nimport selection_remove from \"./remove\";\nimport selection_clone from \"./clone\";\nimport selection_datum from \"./datum\";\nimport selection_on from \"./on\";\nimport selection_dispatch from \"./dispatch\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  join: selection_join,\n  merge: selection_merge,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index\";\n\nexport default function(selector) {\n  return typeof selector === \"string\"\n      ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n      : new Selection([[selector]], root);\n}\n", "export {default as create} from \"./create\";\nexport {default as creator} from \"./creator\";\nexport {default as local} from \"./local\";\nexport {default as matcher} from \"./matcher\";\nexport {default as mouse} from \"./mouse\";\nexport {default as namespace} from \"./namespace\";\nexport {default as namespaces} from \"./namespaces\";\nexport {default as clientPoint} from \"./point\";\nexport {default as select} from \"./select\";\nexport {default as selectAll} from \"./selectAll\";\nexport {default as selection} from \"./selection/index\";\nexport {default as selector} from \"./selector\";\nexport {default as selectorAll} from \"./selectorAll\";\nexport {styleValue as style} from \"./selection/style\";\nexport {default as touch} from \"./touch\";\nexport {default as touches} from \"./touches\";\nexport {default as window} from \"./window\";\nexport {event, customEvent} from \"./selection/on\";\n", "var noop = {value: function() {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\nexport default dispatch;\n", "export {default as dispatch} from \"./dispatch.js\";\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n}\n", "import namespace from \"./namespace\";\nimport {xhtml} from \"./namespaces\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport selector from \"../selector\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport selectorAll from \"../selectorAll\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport matcher from \"../matcher\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n  return new Array(update.length);\n}\n", "import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import {Selection} from \"./index\";\nimport {EnterNode} from \"./enter\";\nimport constant from \"../constant\";\n\nvar keyPrefix = \"$\"; // Protect against keys like \u201C__proto__\u201D.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don\u2019t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = {},\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n      if (keyValue in nodeByKeyValue) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue[keyValue] = node;\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = keyPrefix + key.call(parent, data[i], i, data);\n    if (node = nodeByKeyValue[keyValue]) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue[keyValue] = null;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nexport default function(value, key) {\n  if (!value) {\n    data = new Array(this.size()), j = -1;\n    this.each(function(d) { data[++j] = d; });\n    return data;\n  }\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = value.call(parent, parent && parent.__data__, j, parents),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n", "import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n  if (onupdate != null) update = onupdate(update);\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index\";\n\nexport default function(selection) {\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n", "import {Selection} from \"./index\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n", "export default function() {\n  var nodes = new Array(this.size()), i = -1;\n  this.each(function() { nodes[++i] = this; });\n  return nodes;\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n", "export default function() {\n  var size = 0;\n  this.each(function() { ++size; });\n  return size;\n}\n", "export default function() {\n  return !this.node();\n}\n", "export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n", "import namespace from \"../namespace\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n", "function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n", "function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n", "function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n", "function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n", "function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n", "import creator from \"../creator\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n", "import creator from \"../creator\";\nimport selector from \"../selector\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n", "function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n", "function selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n", "var filterEvents = {};\n\nexport var event = null;\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!(\"onmouseenter\" in element)) {\n    filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n  }\n}\n\nfunction filterContextListener(listener, index, group) {\n  listener = contextListener(listener, index, group);\n  return function(event) {\n    var related = event.relatedTarget;\n    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n      listener.call(this, event);\n    }\n  };\n}\n\nfunction contextListener(listener, index, group) {\n  return function(event1) {\n    var event0 = event; // Events can be reentrant (e.g., focus).\n    event = event1;\n    try {\n      listener.call(this, this.__data__, index, group);\n    } finally {\n      event = event0;\n    }\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, capture) {\n  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n  return function(d, i, group) {\n    var on = this.__on, o, listener = wrap(value, i, group);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n        this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, capture);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, capture) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  if (capture == null) capture = false;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n  return this;\n}\n\nexport function customEvent(event1, listener, that, args) {\n  var event0 = event;\n  event1.sourceEvent = event;\n  event = event1;\n  try {\n    return listener.apply(that, args);\n  } finally {\n    event = event0;\n  }\n}\n", "import defaultView from \"../window\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n", "import selection_select from \"./select\";\nimport selection_selectAll from \"./selectAll\";\nimport selection_filter from \"./filter\";\nimport selection_data from \"./data\";\nimport selection_enter from \"./enter\";\nimport selection_exit from \"./exit\";\nimport selection_join from \"./join\";\nimport selection_merge from \"./merge\";\nimport selection_order from \"./order\";\nimport selection_sort from \"./sort\";\nimport selection_call from \"./call\";\nimport selection_nodes from \"./nodes\";\nimport selection_node from \"./node\";\nimport selection_size from \"./size\";\nimport selection_empty from \"./empty\";\nimport selection_each from \"./each\";\nimport selection_attr from \"./attr\";\nimport selection_style from \"./style\";\nimport selection_property from \"./property\";\nimport selection_classed from \"./classed\";\nimport selection_text from \"./text\";\nimport selection_html from \"./html\";\nimport selection_raise from \"./raise\";\nimport selection_lower from \"./lower\";\nimport selection_append from \"./append\";\nimport selection_insert from \"./insert\";\nimport selection_remove from \"./remove\";\nimport selection_clone from \"./clone\";\nimport selection_datum from \"./datum\";\nimport selection_on from \"./on\";\nimport selection_dispatch from \"./dispatch\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  join: selection_join,\n  merge: selection_merge,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index\";\n\nexport default function(selector) {\n  return typeof selector === \"string\"\n      ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n      : new Selection([[selector]], root);\n}\n", "export {default as create} from \"./create\";\nexport {default as creator} from \"./creator\";\nexport {default as local} from \"./local\";\nexport {default as matcher} from \"./matcher\";\nexport {default as mouse} from \"./mouse\";\nexport {default as namespace} from \"./namespace\";\nexport {default as namespaces} from \"./namespaces\";\nexport {default as clientPoint} from \"./point\";\nexport {default as select} from \"./select\";\nexport {default as selectAll} from \"./selectAll\";\nexport {default as selection} from \"./selection/index\";\nexport {default as selector} from \"./selector\";\nexport {default as selectorAll} from \"./selectorAll\";\nexport {styleValue as style} from \"./selection/style\";\nexport {default as touch} from \"./touch\";\nexport {default as touches} from \"./touches\";\nexport {default as window} from \"./window\";\nexport {event, customEvent} from \"./selection/on\";\n", "import {event} from \"d3-selection\";\n\nexport function nopropagation() {\n  event.stopImmediatePropagation();\n}\n\nexport default function() {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n}\n", "import {select} from \"d3-selection\";\nimport noevent from \"./noevent.js\";\n\nexport default function(view) {\n  var root = view.document.documentElement,\n      selection = select(view).on(\"dragstart.drag\", noevent, true);\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", noevent, true);\n  } else {\n    root.__noselect = root.style.MozUserSelect;\n    root.style.MozUserSelect = \"none\";\n  }\n}\n\nexport function yesdrag(view, noclick) {\n  var root = view.document.documentElement,\n      selection = select(view).on(\"dragstart.drag\", null);\n  if (noclick) {\n    selection.on(\"click.drag\", noevent, true);\n    setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n  }\n  if (\"onselectstart\" in root) {\n    selection.on(\"selectstart.drag\", null);\n  } else {\n    root.style.MozUserSelect = root.__noselect;\n    delete root.__noselect;\n  }\n}\n", "export {default as drag} from \"./drag.js\";\nexport {default as dragDisable, yesdrag as dragEnable} from \"./nodrag.js\";\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n}\n", "import namespace from \"./namespace\";\nimport {xhtml} from \"./namespaces\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport selector from \"../selector\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport selectorAll from \"../selectorAll\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport matcher from \"../matcher\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n  return new Array(update.length);\n}\n", "import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import {Selection} from \"./index\";\nimport {EnterNode} from \"./enter\";\nimport constant from \"../constant\";\n\nvar keyPrefix = \"$\"; // Protect against keys like \u201C__proto__\u201D.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don\u2019t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = {},\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n      if (keyValue in nodeByKeyValue) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue[keyValue] = node;\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = keyPrefix + key.call(parent, data[i], i, data);\n    if (node = nodeByKeyValue[keyValue]) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue[keyValue] = null;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nexport default function(value, key) {\n  if (!value) {\n    data = new Array(this.size()), j = -1;\n    this.each(function(d) { data[++j] = d; });\n    return data;\n  }\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = value.call(parent, parent && parent.__data__, j, parents),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n", "import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n  if (onupdate != null) update = onupdate(update);\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index\";\n\nexport default function(selection) {\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n", "import {Selection} from \"./index\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n", "export default function() {\n  var nodes = new Array(this.size()), i = -1;\n  this.each(function() { nodes[++i] = this; });\n  return nodes;\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n", "export default function() {\n  var size = 0;\n  this.each(function() { ++size; });\n  return size;\n}\n", "export default function() {\n  return !this.node();\n}\n", "export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n", "import namespace from \"../namespace\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n", "function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n", "function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n", "function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n", "function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n", "function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n", "import creator from \"../creator\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n", "import creator from \"../creator\";\nimport selector from \"../selector\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n", "function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n", "function selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n", "var filterEvents = {};\n\nexport var event = null;\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!(\"onmouseenter\" in element)) {\n    filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n  }\n}\n\nfunction filterContextListener(listener, index, group) {\n  listener = contextListener(listener, index, group);\n  return function(event) {\n    var related = event.relatedTarget;\n    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n      listener.call(this, event);\n    }\n  };\n}\n\nfunction contextListener(listener, index, group) {\n  return function(event1) {\n    var event0 = event; // Events can be reentrant (e.g., focus).\n    event = event1;\n    try {\n      listener.call(this, this.__data__, index, group);\n    } finally {\n      event = event0;\n    }\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, capture) {\n  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n  return function(d, i, group) {\n    var on = this.__on, o, listener = wrap(value, i, group);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n        this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, capture);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, capture) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  if (capture == null) capture = false;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n  return this;\n}\n\nexport function customEvent(event1, listener, that, args) {\n  var event0 = event;\n  event1.sourceEvent = event;\n  event = event1;\n  try {\n    return listener.apply(that, args);\n  } finally {\n    event = event0;\n  }\n}\n", "import defaultView from \"../window\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n", "import selection_select from \"./select\";\nimport selection_selectAll from \"./selectAll\";\nimport selection_filter from \"./filter\";\nimport selection_data from \"./data\";\nimport selection_enter from \"./enter\";\nimport selection_exit from \"./exit\";\nimport selection_join from \"./join\";\nimport selection_merge from \"./merge\";\nimport selection_order from \"./order\";\nimport selection_sort from \"./sort\";\nimport selection_call from \"./call\";\nimport selection_nodes from \"./nodes\";\nimport selection_node from \"./node\";\nimport selection_size from \"./size\";\nimport selection_empty from \"./empty\";\nimport selection_each from \"./each\";\nimport selection_attr from \"./attr\";\nimport selection_style from \"./style\";\nimport selection_property from \"./property\";\nimport selection_classed from \"./classed\";\nimport selection_text from \"./text\";\nimport selection_html from \"./html\";\nimport selection_raise from \"./raise\";\nimport selection_lower from \"./lower\";\nimport selection_append from \"./append\";\nimport selection_insert from \"./insert\";\nimport selection_remove from \"./remove\";\nimport selection_clone from \"./clone\";\nimport selection_datum from \"./datum\";\nimport selection_on from \"./on\";\nimport selection_dispatch from \"./dispatch\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  join: selection_join,\n  merge: selection_merge,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index\";\n\nexport default function(selector) {\n  return typeof selector === \"string\"\n      ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n      : new Selection([[selector]], root);\n}\n", "import {event} from \"./selection/on\";\n\nexport default function() {\n  var current = event, source;\n  while (source = current.sourceEvent) current = source;\n  return current;\n}\n", "export default function(node, event) {\n  var svg = node.ownerSVGElement || node;\n\n  if (svg.createSVGPoint) {\n    var point = svg.createSVGPoint();\n    point.x = event.clientX, point.y = event.clientY;\n    point = point.matrixTransform(node.getScreenCTM().inverse());\n    return [point.x, point.y];\n  }\n\n  var rect = node.getBoundingClientRect();\n  return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n}\n", "import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\n\nexport default function(node) {\n  var event = sourceEvent();\n  if (event.changedTouches) event = event.changedTouches[0];\n  return point(node, event);\n}\n", "import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\n\nexport default function(node, touches, identifier) {\n  if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches;\n\n  for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n    if ((touch = touches[i]).identifier === identifier) {\n      return point(node, touch);\n    }\n  }\n\n  return null;\n}\n", "export {default as create} from \"./create\";\nexport {default as creator} from \"./creator\";\nexport {default as local} from \"./local\";\nexport {default as matcher} from \"./matcher\";\nexport {default as mouse} from \"./mouse\";\nexport {default as namespace} from \"./namespace\";\nexport {default as namespaces} from \"./namespaces\";\nexport {default as clientPoint} from \"./point\";\nexport {default as select} from \"./select\";\nexport {default as selectAll} from \"./selectAll\";\nexport {default as selection} from \"./selection/index\";\nexport {default as selector} from \"./selector\";\nexport {default as selectorAll} from \"./selectorAll\";\nexport {styleValue as style} from \"./selection/style\";\nexport {default as touch} from \"./touch\";\nexport {default as touches} from \"./touches\";\nexport {default as window} from \"./window\";\nexport {event, customEvent} from \"./selection/on\";\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n}\n", "import namespace from \"./namespace\";\nimport {xhtml} from \"./namespaces\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport selector from \"../selector\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport selectorAll from \"../selectorAll\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n}\n", "import {Selection} from \"./index\";\nimport matcher from \"../matcher\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n  return new Array(update.length);\n}\n", "import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import {Selection} from \"./index\";\nimport {EnterNode} from \"./enter\";\nimport constant from \"../constant\";\n\nvar keyPrefix = \"$\"; // Protect against keys like \u201C__proto__\u201D.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don\u2019t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = {},\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n      if (keyValue in nodeByKeyValue) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue[keyValue] = node;\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = keyPrefix + key.call(parent, data[i], i, data);\n    if (node = nodeByKeyValue[keyValue]) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue[keyValue] = null;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nexport default function(value, key) {\n  if (!value) {\n    data = new Array(this.size()), j = -1;\n    this.each(function(d) { data[++j] = d; });\n    return data;\n  }\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = value.call(parent, parent && parent.__data__, j, parents),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n", "import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n  if (onupdate != null) update = onupdate(update);\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index\";\n\nexport default function(selection) {\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n", "import {Selection} from \"./index\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n", "export default function() {\n  var nodes = new Array(this.size()), i = -1;\n  this.each(function() { nodes[++i] = this; });\n  return nodes;\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n", "export default function() {\n  var size = 0;\n  this.each(function() { ++size; });\n  return size;\n}\n", "export default function() {\n  return !this.node();\n}\n", "export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n", "import namespace from \"../namespace\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n", "function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n", "function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n", "function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n", "function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n", "function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n", "import creator from \"../creator\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n", "import creator from \"../creator\";\nimport selector from \"../selector\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n", "function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n", "function selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n", "var filterEvents = {};\n\nexport var event = null;\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!(\"onmouseenter\" in element)) {\n    filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n  }\n}\n\nfunction filterContextListener(listener, index, group) {\n  listener = contextListener(listener, index, group);\n  return function(event) {\n    var related = event.relatedTarget;\n    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n      listener.call(this, event);\n    }\n  };\n}\n\nfunction contextListener(listener, index, group) {\n  return function(event1) {\n    var event0 = event; // Events can be reentrant (e.g., focus).\n    event = event1;\n    try {\n      listener.call(this, this.__data__, index, group);\n    } finally {\n      event = event0;\n    }\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, capture) {\n  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n  return function(d, i, group) {\n    var on = this.__on, o, listener = wrap(value, i, group);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n        this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, capture);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, capture) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  if (capture == null) capture = false;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n  return this;\n}\n\nexport function customEvent(event1, listener, that, args) {\n  var event0 = event;\n  event1.sourceEvent = event;\n  event = event1;\n  try {\n    return listener.apply(that, args);\n  } finally {\n    event = event0;\n  }\n}\n", "import defaultView from \"../window\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n", "import selection_select from \"./select\";\nimport selection_selectAll from \"./selectAll\";\nimport selection_filter from \"./filter\";\nimport selection_data from \"./data\";\nimport selection_enter from \"./enter\";\nimport selection_exit from \"./exit\";\nimport selection_join from \"./join\";\nimport selection_merge from \"./merge\";\nimport selection_order from \"./order\";\nimport selection_sort from \"./sort\";\nimport selection_call from \"./call\";\nimport selection_nodes from \"./nodes\";\nimport selection_node from \"./node\";\nimport selection_size from \"./size\";\nimport selection_empty from \"./empty\";\nimport selection_each from \"./each\";\nimport selection_attr from \"./attr\";\nimport selection_style from \"./style\";\nimport selection_property from \"./property\";\nimport selection_classed from \"./classed\";\nimport selection_text from \"./text\";\nimport selection_html from \"./html\";\nimport selection_raise from \"./raise\";\nimport selection_lower from \"./lower\";\nimport selection_append from \"./append\";\nimport selection_insert from \"./insert\";\nimport selection_remove from \"./remove\";\nimport selection_clone from \"./clone\";\nimport selection_datum from \"./datum\";\nimport selection_on from \"./on\";\nimport selection_dispatch from \"./dispatch\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  join: selection_join,\n  merge: selection_merge,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch\n};\n\nexport default selection;\n", "export {default as create} from \"./create\";\nexport {default as creator} from \"./creator\";\nexport {default as local} from \"./local\";\nexport {default as matcher} from \"./matcher\";\nexport {default as mouse} from \"./mouse\";\nexport {default as namespace} from \"./namespace\";\nexport {default as namespaces} from \"./namespaces\";\nexport {default as clientPoint} from \"./point\";\nexport {default as select} from \"./select\";\nexport {default as selectAll} from \"./selectAll\";\nexport {default as selection} from \"./selection/index\";\nexport {default as selector} from \"./selector\";\nexport {default as selectorAll} from \"./selectorAll\";\nexport {styleValue as style} from \"./selection/style\";\nexport {default as touch} from \"./touch\";\nexport {default as touches} from \"./touches\";\nexport {default as window} from \"./window\";\nexport {event, customEvent} from \"./selection/on\";\n", "var frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nexport function Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nexport function timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nexport function timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we\u2019ve set an alarm, if we haven\u2019t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n  var t = new Timer;\n  delay = delay == null ? 0 : +delay;\n  t.restart(function(elapsed) {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n}\n", "export {\n  now,\n  timer,\n  timerFlush\n} from \"./timer.js\";\n\nexport {\n  default as timeout\n} from \"./timeout.js\";\n\nexport {\n  default as interval\n} from \"./interval.js\";\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n}\n\nexport function init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nexport function set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nexport function get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = timer(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return timeout(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    timeout(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > STARTING && schedule.state < ENDING;\n    schedule.state = ENDED;\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n  return this.each(function() {\n    interrupt(this, name);\n  });\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nexport default function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = get(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = set(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return get(node, id).value[name];\n  };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? interpolateNumber\n      : b instanceof color ? interpolateRgb\n      : (c = color(b)) ? (b = c, interpolateRgb)\n      : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = namespace(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n  return function() {\n    init(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    init(this, id).delay = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n  return function() {\n    set(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    set(this, id).duration = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    set(this, id).ease = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : get(this.node(), id).ease;\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? init : set;\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? get(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\nexport default function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            schedule(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n  return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        string1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = style(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = set(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\nexport default function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(tweenValue(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = newId();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = get(node, id0);\n        schedule(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = set(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we\u2019re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n  });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nexport default function transition(name) {\n  return selection().transition(name);\n}\n\nexport function newId() {\n  return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: transition_select,\n  selectAll: transition_selectAll,\n  filter: transition_filter,\n  merge: transition_merge,\n  selection: transition_selection,\n  transition: transition_transition,\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: transition_on,\n  attr: transition_attr,\n  attrTween: transition_attrTween,\n  style: transition_style,\n  styleTween: transition_styleTween,\n  text: transition_text,\n  textTween: transition_textTween,\n  remove: transition_remove,\n  tween: transition_tween,\n  delay: transition_delay,\n  duration: transition_duration,\n  ease: transition_ease,\n  end: transition_end\n};\n", "export function cubicIn(t) {\n  return t * t * t;\n}\n\nexport function cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "export {\n  linear as easeLinear\n} from \"./linear.js\";\n\nexport {\n  quadInOut as easeQuad,\n  quadIn as easeQuadIn,\n  quadOut as easeQuadOut,\n  quadInOut as easeQuadInOut\n} from \"./quad.js\";\n\nexport {\n  cubicInOut as easeCubic,\n  cubicIn as easeCubicIn,\n  cubicOut as easeCubicOut,\n  cubicInOut as easeCubicInOut\n} from \"./cubic.js\";\n\nexport {\n  polyInOut as easePoly,\n  polyIn as easePolyIn,\n  polyOut as easePolyOut,\n  polyInOut as easePolyInOut\n} from \"./poly.js\";\n\nexport {\n  sinInOut as easeSin,\n  sinIn as easeSinIn,\n  sinOut as easeSinOut,\n  sinInOut as easeSinInOut\n} from \"./sin.js\";\n\nexport {\n  expInOut as easeExp,\n  expIn as easeExpIn,\n  expOut as easeExpOut,\n  expInOut as easeExpInOut\n} from \"./exp.js\";\n\nexport {\n  circleInOut as easeCircle,\n  circleIn as easeCircleIn,\n  circleOut as easeCircleOut,\n  circleInOut as easeCircleInOut\n} from \"./circle.js\";\n\nexport {\n  bounceOut as easeBounce,\n  bounceIn as easeBounceIn,\n  bounceOut as easeBounceOut,\n  bounceInOut as easeBounceInOut\n} from \"./bounce.js\";\n\nexport {\n  backInOut as easeBack,\n  backIn as easeBackIn,\n  backOut as easeBackOut,\n  backInOut as easeBackInOut\n} from \"./back.js\";\n\nexport {\n  elasticOut as easeElastic,\n  elasticIn as easeElasticIn,\n  elasticOut as easeElasticOut,\n  elasticInOut as easeElasticInOut\n} from \"./elastic.js\";\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      return defaultTiming.time = now(), defaultTiming;\n    }\n  }\n  return timing;\n}\n\nexport default function(name) {\n  var id,\n      timing;\n\n  if (name instanceof Transition) {\n    id = name._id, name = name._name;\n  } else {\n    id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        schedule(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "import {Transition} from \"./transition/index.js\";\nimport {SCHEDULED} from \"./transition/schedule.js\";\n\nvar root = [null];\n\nexport default function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      i;\n\n  if (schedules) {\n    name = name == null ? null : name + \"\";\n    for (i in schedules) {\n      if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) {\n        return new Transition([[node]], root, name, +i);\n      }\n    }\n  }\n\n  return null;\n}\n", "import \"./selection/index.js\";\nexport {default as transition} from \"./transition/index.js\";\nexport {default as active} from \"./active.js\";\nexport {default as interrupt} from \"./interrupt.js\";\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "export default function ZoomEvent(target, type, transform) {\n  this.target = target;\n  this.type = type;\n  this.transform = transform;\n}\n", "export function Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n  while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n  return node.__zoom;\n}\n", "import {event} from \"d3-selection\";\n\nexport function nopropagation() {\n  event.stopImmediatePropagation();\n}\n\nexport default function() {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {event, customEvent, select, mouse, touch} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n  var e = this;\n  if (e instanceof SVGElement) {\n    e = e.ownerSVGElement || e;\n    if (e.hasAttribute(\"viewBox\")) {\n      e = e.viewBox.baseVal;\n      return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n    }\n    return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n  }\n  return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n  return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta() {\n  return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002);\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n  var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n      dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n      dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n      dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n  return transform.translate(\n    dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n    dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n  );\n}\n\nexport default function() {\n  var filter = defaultFilter,\n      extent = defaultExtent,\n      constrain = defaultConstrain,\n      wheelDelta = defaultWheelDelta,\n      touchable = defaultTouchable,\n      scaleExtent = [0, Infinity],\n      translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n      duration = 250,\n      interpolate = interpolateZoom,\n      listeners = dispatch(\"start\", \"zoom\", \"end\"),\n      touchstarting,\n      touchending,\n      touchDelay = 500,\n      wheelDelay = 150,\n      clickDistance2 = 0;\n\n  function zoom(selection) {\n    selection\n        .property(\"__zoom\", defaultTransform)\n        .on(\"wheel.zoom\", wheeled)\n        .on(\"mousedown.zoom\", mousedowned)\n        .on(\"dblclick.zoom\", dblclicked)\n      .filter(touchable)\n        .on(\"touchstart.zoom\", touchstarted)\n        .on(\"touchmove.zoom\", touchmoved)\n        .on(\"touchend.zoom touchcancel.zoom\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  zoom.transform = function(collection, transform, point) {\n    var selection = collection.selection ? collection.selection() : collection;\n    selection.property(\"__zoom\", defaultTransform);\n    if (collection !== selection) {\n      schedule(collection, transform, point);\n    } else {\n      selection.interrupt().each(function() {\n        gesture(this, arguments)\n            .start()\n            .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n            .end();\n      });\n    }\n  };\n\n  zoom.scaleBy = function(selection, k, p) {\n    zoom.scaleTo(selection, function() {\n      var k0 = this.__zoom.k,\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return k0 * k1;\n    }, p);\n  };\n\n  zoom.scaleTo = function(selection, k, p) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t0 = this.__zoom,\n          p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n          p1 = t0.invert(p0),\n          k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n      return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n    }, p);\n  };\n\n  zoom.translateBy = function(selection, x, y) {\n    zoom.transform(selection, function() {\n      return constrain(this.__zoom.translate(\n        typeof x === \"function\" ? x.apply(this, arguments) : x,\n        typeof y === \"function\" ? y.apply(this, arguments) : y\n      ), extent.apply(this, arguments), translateExtent);\n    });\n  };\n\n  zoom.translateTo = function(selection, x, y, p) {\n    zoom.transform(selection, function() {\n      var e = extent.apply(this, arguments),\n          t = this.__zoom,\n          p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n      return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n        typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n        typeof y === \"function\" ? -y.apply(this, arguments) : -y\n      ), e, translateExtent);\n    }, p);\n  };\n\n  function scale(transform, k) {\n    k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n    return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n  }\n\n  function translate(transform, p0, p1) {\n    var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n    return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n  }\n\n  function centroid(extent) {\n    return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n  }\n\n  function schedule(transition, transform, point) {\n    transition\n        .on(\"start.zoom\", function() { gesture(this, arguments).start(); })\n        .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).end(); })\n        .tween(\"zoom\", function() {\n          var that = this,\n              args = arguments,\n              g = gesture(that, args),\n              e = extent.apply(that, args),\n              p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n              w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n              a = that.__zoom,\n              b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n              i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n          return function(t) {\n            if (t === 1) t = b; // Avoid rounding error on end.\n            else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n            g.zoom(null, t);\n          };\n        });\n  }\n\n  function gesture(that, args, clean) {\n    return (!clean && that.__zooming) || new Gesture(that, args);\n  }\n\n  function Gesture(that, args) {\n    this.that = that;\n    this.args = args;\n    this.active = 0;\n    this.extent = extent.apply(that, args);\n    this.taps = 0;\n  }\n\n  Gesture.prototype = {\n    start: function() {\n      if (++this.active === 1) {\n        this.that.__zooming = this;\n        this.emit(\"start\");\n      }\n      return this;\n    },\n    zoom: function(key, transform) {\n      if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n      if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n      if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n      this.that.__zoom = transform;\n      this.emit(\"zoom\");\n      return this;\n    },\n    end: function() {\n      if (--this.active === 0) {\n        delete this.that.__zooming;\n        this.emit(\"end\");\n      }\n      return this;\n    },\n    emit: function(type) {\n      customEvent(new ZoomEvent(zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);\n    }\n  };\n\n  function wheeled() {\n    if (!filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments),\n        t = this.__zoom,\n        k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n        p = mouse(this);\n\n    // If the mouse is in the same location as before, reuse it.\n    // If there were recent wheel events, reset the wheel idle timeout.\n    if (g.wheel) {\n      if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n        g.mouse[1] = t.invert(g.mouse[0] = p);\n      }\n      clearTimeout(g.wheel);\n    }\n\n    // If this wheel event won\u2019t trigger a transform change, ignore it.\n    else if (t.k === k) return;\n\n    // Otherwise, capture the mouse point and location at the start.\n    else {\n      g.mouse = [p, t.invert(p)];\n      interrupt(this);\n      g.start();\n    }\n\n    noevent();\n    g.wheel = setTimeout(wheelidled, wheelDelay);\n    g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n    function wheelidled() {\n      g.wheel = null;\n      g.end();\n    }\n  }\n\n  function mousedowned() {\n    if (touchending || !filter.apply(this, arguments)) return;\n    var g = gesture(this, arguments, true),\n        v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n        p = mouse(this),\n        x0 = event.clientX,\n        y0 = event.clientY;\n\n    dragDisable(event.view);\n    nopropagation();\n    g.mouse = [p, this.__zoom.invert(p)];\n    interrupt(this);\n    g.start();\n\n    function mousemoved() {\n      noevent();\n      if (!g.moved) {\n        var dx = event.clientX - x0, dy = event.clientY - y0;\n        g.moved = dx * dx + dy * dy > clickDistance2;\n      }\n      g.zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = mouse(g.that), g.mouse[1]), g.extent, translateExtent));\n    }\n\n    function mouseupped() {\n      v.on(\"mousemove.zoom mouseup.zoom\", null);\n      dragEnable(event.view, g.moved);\n      noevent();\n      g.end();\n    }\n  }\n\n  function dblclicked() {\n    if (!filter.apply(this, arguments)) return;\n    var t0 = this.__zoom,\n        p0 = mouse(this),\n        p1 = t0.invert(p0),\n        k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n        t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);\n\n    noevent();\n    if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0);\n    else select(this).call(zoom.transform, t1);\n  }\n\n  function touchstarted() {\n    if (!filter.apply(this, arguments)) return;\n    var touches = event.touches,\n        n = touches.length,\n        g = gesture(this, arguments, event.changedTouches.length === n),\n        started, i, t, p;\n\n    nopropagation();\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = touch(this, touches, t.identifier);\n      p = [p, this.__zoom.invert(p), t.identifier];\n      if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n      else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n    }\n\n    if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n    if (started) {\n      if (g.taps < 2) touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n      interrupt(this);\n      g.start();\n    }\n  }\n\n  function touchmoved() {\n    if (!this.__zooming) return;\n    var g = gesture(this, arguments),\n        touches = event.changedTouches,\n        n = touches.length, i, t, p, l;\n\n    noevent();\n    if (touchstarting) touchstarting = clearTimeout(touchstarting);\n    g.taps = 0;\n    for (i = 0; i < n; ++i) {\n      t = touches[i], p = touch(this, touches, t.identifier);\n      if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n      else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n    }\n    t = g.that.__zoom;\n    if (g.touch1) {\n      var p0 = g.touch0[0], l0 = g.touch0[1],\n          p1 = g.touch1[0], l1 = g.touch1[1],\n          dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n          dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n      t = scale(t, Math.sqrt(dp / dl));\n      p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n      l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n    }\n    else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n    else return;\n    g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n  }\n\n  function touchended() {\n    if (!this.__zooming) return;\n    var g = gesture(this, arguments),\n        touches = event.changedTouches,\n        n = touches.length, i, t;\n\n    nopropagation();\n    if (touchending) clearTimeout(touchending);\n    touchending = setTimeout(function() { touchending = null; }, touchDelay);\n    for (i = 0; i < n; ++i) {\n      t = touches[i];\n      if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n      else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n    }\n    if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n    if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n    else {\n      g.end();\n      // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n      if (g.taps === 2) {\n        var p = select(this).on(\"dblclick.zoom\");\n        if (p) p.apply(this, arguments);\n      }\n    }\n  }\n\n  zoom.wheelDelta = function(_) {\n    return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n  };\n\n  zoom.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n  };\n\n  zoom.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n  };\n\n  zoom.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n  };\n\n  zoom.scaleExtent = function(_) {\n    return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n  };\n\n  zoom.translateExtent = function(_) {\n    return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n  };\n\n  zoom.constrain = function(_) {\n    return arguments.length ? (constrain = _, zoom) : constrain;\n  };\n\n  zoom.duration = function(_) {\n    return arguments.length ? (duration = +_, zoom) : duration;\n  };\n\n  zoom.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, zoom) : interpolate;\n  };\n\n  zoom.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? zoom : value;\n  };\n\n  zoom.clickDistance = function(_) {\n    return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n  };\n\n  return zoom;\n}\n", "export {default as zoom} from \"./zoom.js\";\nexport {default as zoomTransform, identity as zoomIdentity} from \"./transform.js\";\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { max, min } from 'd3-array';\nimport { scaleLinear, ScaleLinear } from 'd3-scale';\nimport { event, select } from 'd3-selection';\nimport { zoom, ZoomBehavior, zoomIdentity } from 'd3-zoom';\nimport { sortBy, uniq } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport { translate } from '../../helpers/l10n';\nimport { Location } from '../../helpers/urls';\nimport Tooltip from '../controls/Tooltip';\nimport './BubbleChart.css';\n\nconst TICKS_COUNT = 5;\n\ninterface BubbleItem<T> {\n  color?: string;\n  key?: string;\n  link?: string | Location;\n  data?: T;\n  size: number;\n  tooltip?: React.ReactNode;\n  x: number;\n  y: number;\n}\n\ninterface Props<T> {\n  displayXGrid?: boolean;\n  displayXTicks?: boolean;\n  displayYGrid?: boolean;\n  displayYTicks?: boolean;\n  formatXTick: (tick: number) => string;\n  formatYTick: (tick: number) => string;\n  height: number;\n  items: BubbleItem<T>[];\n  onBubbleClick?: (ref?: T) => void;\n  padding: [number, number, number, number];\n  sizeDomain?: [number, number];\n  sizeRange?: [number, number];\n  xDomain?: [number, number];\n  yDomain?: [number, number];\n}\n\ninterface State {\n  transform: { x: number; y: number; k: number };\n}\n\ntype Scale = ScaleLinear<number, number>;\n\nexport default class BubbleChart<T> extends React.PureComponent<Props<T>, State> {\n  private node?: Element;\n  private zoom?: ZoomBehavior<Element, unknown>;\n\n  static defaultProps = {\n    displayXGrid: true,\n    displayXTicks: true,\n    displayYGrid: true,\n    displayYTicks: true,\n    formatXTick: (d: number) => String(d),\n    formatYTick: (d: number) => String(d),\n    padding: [10, 10, 10, 10],\n    sizeRange: [5, 45]\n  };\n\n  constructor(props: Props<T>) {\n    super(props);\n    this.state = { transform: { x: 0, y: 0, k: 1 } };\n  }\n\n  componentDidUpdate() {\n    if (this.zoom && this.node) {\n      const rect = this.node.getBoundingClientRect();\n      this.zoom.translateExtent([\n        [0, 0],\n        [rect.width, rect.height]\n      ]);\n    }\n  }\n\n  boundNode = (node: SVGSVGElement) => {\n    this.node = node;\n    this.zoom = zoom()\n      .scaleExtent([1, 10])\n      .on('zoom', this.zoomed);\n    select(this.node).call(this.zoom as any);\n  };\n\n  zoomed = () => {\n    const { padding } = this.props;\n    const { x, y, k } = event.transform as { x: number; y: number; k: number };\n    this.setState({\n      transform: {\n        x: x + padding[3] * (k - 1),\n        y: y + padding[0] * (k - 1),\n        k\n      }\n    });\n  };\n\n  resetZoom = (e: React.MouseEvent<Link>) => {\n    e.stopPropagation();\n    e.preventDefault();\n    if (this.zoom && this.node) {\n      select(this.node).call(this.zoom.transform as any, zoomIdentity);\n    }\n  };\n\n  getXRange(xScale: Scale, sizeScale: Scale, availableWidth: number) {\n    const minX = min(this.props.items, d => xScale(d.x) - sizeScale(d.size)) || 0;\n    const maxX = max(this.props.items, d => xScale(d.x) + sizeScale(d.size)) || 0;\n    const dMinX = minX < 0 ? xScale.range()[0] - minX : xScale.range()[0];\n    const dMaxX = maxX > xScale.range()[1] ? maxX - xScale.range()[1] : 0;\n    return [dMinX, availableWidth - dMaxX];\n  }\n\n  getYRange(yScale: Scale, sizeScale: Scale, availableHeight: number) {\n    const minY = min(this.props.items, d => yScale(d.y) - sizeScale(d.size)) || 0;\n    const maxY = max(this.props.items, d => yScale(d.y) + sizeScale(d.size)) || 0;\n    const dMinY = minY < 0 ? yScale.range()[1] - minY : yScale.range()[1];\n    const dMaxY = maxY > yScale.range()[0] ? maxY - yScale.range()[0] : 0;\n    return [availableHeight - dMaxY, dMinY];\n  }\n\n  getTicks(scale: Scale, format: (d: number) => string) {\n    const zoomAmount = Math.ceil(this.state.transform.k);\n    const ticks = scale.ticks(TICKS_COUNT * zoomAmount).map(tick => format(tick));\n    const uniqueTicksCount = uniq(ticks).length;\n    const ticksCount =\n      uniqueTicksCount < TICKS_COUNT * zoomAmount ? uniqueTicksCount - 1 : TICKS_COUNT * zoomAmount;\n    return scale.ticks(ticksCount);\n  }\n\n  getZoomLevelLabel = () => Math.floor(this.state.transform.k * 100) + '%';\n\n  renderXGrid = (ticks: number[], xScale: Scale, yScale: Scale) => {\n    if (!this.props.displayXGrid) {\n      return null;\n    }\n\n    const { transform } = this.state;\n    const lines = ticks.map((tick, index) => {\n      const x = xScale(tick);\n      const y1 = yScale.range()[0];\n      const y2 = yScale.range()[1];\n      return (\n        <line\n          className=\"bubble-chart-grid\"\n          // eslint-disable-next-line react/no-array-index-key\n          key={index}\n          x1={x * transform.k + transform.x}\n          x2={x * transform.k + transform.x}\n          y1={y1 * transform.k}\n          y2={transform.k > 1 ? 0 : y2}\n        />\n      );\n    });\n\n    return <g>{lines}</g>;\n  };\n\n  renderYGrid = (ticks: number[], xScale: Scale, yScale: Scale) => {\n    if (!this.props.displayYGrid) {\n      return null;\n    }\n\n    const { transform } = this.state;\n    const lines = ticks.map((tick, index) => {\n      const y = yScale(tick);\n      const x1 = xScale.range()[0];\n      const x2 = xScale.range()[1];\n      return (\n        <line\n          className=\"bubble-chart-grid\"\n          // eslint-disable-next-line react/no-array-index-key\n          key={index}\n          x1={transform.k > 1 ? 0 : x1}\n          x2={x2 * transform.k}\n          y1={y * transform.k + transform.y}\n          y2={y * transform.k + transform.y}\n        />\n      );\n    });\n\n    return <g>{lines}</g>;\n  };\n\n  renderXTicks = (xTicks: number[], xScale: Scale, yScale: Scale) => {\n    if (!this.props.displayXTicks) {\n      return null;\n    }\n\n    const { transform } = this.state;\n    const ticks = xTicks.map((tick, index) => {\n      const x = xScale(tick) * transform.k + transform.x;\n      const y = yScale.range()[0];\n      const innerText = this.props.formatXTick(tick);\n      // as we modified the `x` using `transform`, check that it is inside the range again\n      return x > 0 && x < xScale.range()[1] ? (\n        // eslint-disable-next-line react/no-array-index-key\n        <text className=\"bubble-chart-tick\" dy=\"1.5em\" key={index} x={x} y={y}>\n          {innerText}\n        </text>\n      ) : null;\n    });\n\n    return <g>{ticks}</g>;\n  };\n\n  renderYTicks = (yTicks: number[], xScale: Scale, yScale: Scale) => {\n    if (!this.props.displayYTicks) {\n      return null;\n    }\n\n    const { transform } = this.state;\n    const ticks = yTicks.map((tick, index) => {\n      const x = xScale.range()[0];\n      const y = yScale(tick) * transform.k + transform.y;\n      const innerText = this.props.formatYTick(tick);\n      // as we modified the `y` using `transform`, check that it is inside the range again\n      return y > 0 && y < yScale.range()[0] ? (\n        <text\n          className=\"bubble-chart-tick bubble-chart-tick-y\"\n          dx=\"-0.5em\"\n          dy=\"0.3em\"\n          // eslint-disable-next-line react/no-array-index-key\n          key={index}\n          x={x}\n          y={y}>\n          {innerText}\n        </text>\n      ) : null;\n    });\n\n    return <g>{ticks}</g>;\n  };\n\n  renderChart = (width: number) => {\n    const { transform } = this.state;\n    const availableWidth = width - this.props.padding[1] - this.props.padding[3];\n    const availableHeight = this.props.height - this.props.padding[0] - this.props.padding[2];\n\n    const xScale = scaleLinear()\n      .domain(this.props.xDomain || [0, max(this.props.items, d => d.x) || 0])\n      .range([0, availableWidth])\n      .nice();\n    const yScale = scaleLinear()\n      .domain(this.props.yDomain || [0, max(this.props.items, d => d.y) || 0])\n      .range([availableHeight, 0])\n      .nice();\n    const sizeScale = scaleLinear()\n      .domain(this.props.sizeDomain || [0, max(this.props.items, d => d.size) || 0])\n      .range(this.props.sizeRange || []);\n\n    const xScaleOriginal = xScale.copy();\n    const yScaleOriginal = yScale.copy();\n\n    xScale.range(this.getXRange(xScale, sizeScale, availableWidth));\n    yScale.range(this.getYRange(yScale, sizeScale, availableHeight));\n\n    const bubbles = sortBy(this.props.items, b => -b.size).map((item, index) => {\n      return (\n        <Bubble\n          color={item.color}\n          data={item.data}\n          key={item.key || index}\n          link={item.link}\n          onClick={this.props.onBubbleClick}\n          r={sizeScale(item.size)}\n          scale={1 / transform.k}\n          tooltip={item.tooltip}\n          x={xScale(item.x)}\n          y={yScale(item.y)}\n        />\n      );\n    });\n\n    const xTicks = this.getTicks(xScale, this.props.formatXTick);\n    const yTicks = this.getTicks(yScale, this.props.formatYTick);\n\n    return (\n      <svg\n        className={classNames('bubble-chart')}\n        height={this.props.height}\n        ref={this.boundNode}\n        width={width}>\n        <defs>\n          <clipPath id=\"graph-region\">\n            <rect\n              // Extend clip by 2 pixels: one for clipRect border, and one for Bubble borders\n              height={availableHeight + 4}\n              width={availableWidth + 4}\n              x={-2}\n              y={-2}\n            />\n          </clipPath>\n        </defs>\n        <g transform={`translate(${this.props.padding[3]}, ${this.props.padding[0]})`}>\n          <g clipPath=\"url(#graph-region)\">\n            {this.renderXGrid(xTicks, xScale, yScale)}\n            {this.renderYGrid(yTicks, xScale, yScale)}\n            <g transform={`translate(${transform.x}, ${transform.y}) scale(${transform.k})`}>\n              {bubbles}\n            </g>\n          </g>\n          {this.renderXTicks(xTicks, xScale, yScaleOriginal)}\n          {this.renderYTicks(yTicks, xScaleOriginal, yScale)}\n        </g>\n      </svg>\n    );\n  };\n\n  render() {\n    return (\n      <div>\n        <div className=\"bubble-chart-zoom\">\n          <Tooltip overlay={translate('component_measures.bubble_chart.zoom_level')}>\n            <Link onClick={this.resetZoom} to=\"#\">\n              {this.getZoomLevelLabel()}\n            </Link>\n          </Tooltip>\n        </div>\n        <AutoSizer disableHeight={true}>{size => this.renderChart(size.width)}</AutoSizer>\n      </div>\n    );\n  }\n}\n\ninterface BubbleProps<T> {\n  color?: string;\n  link?: string | Location;\n  onClick?: (ref?: T) => void;\n  data?: T;\n  r: number;\n  scale: number;\n  tooltip?: string | React.ReactNode;\n  x: number;\n  y: number;\n}\n\nfunction Bubble<T>(props: BubbleProps<T>) {\n  const handleClick = (e: React.MouseEvent<SVGCircleElement>) => {\n    if (props.onClick) {\n      e.stopPropagation();\n      e.preventDefault();\n      props.onClick(props.data);\n    }\n  };\n\n  let circle = (\n    <circle\n      className=\"bubble-chart-bubble\"\n      onClick={props.onClick ? handleClick : undefined}\n      r={props.r}\n      style={{ fill: props.color, stroke: props.color }}\n      transform={`translate(${props.x}, ${props.y}) scale(${props.scale})`}\n    />\n  );\n\n  if (props.link && !props.onClick) {\n    circle = <Link to={props.link}>{circle}</Link>;\n  }\n\n  return (\n    <Tooltip overlay={props.tooltip || undefined}>\n      <g>{circle}</g>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ButtonLink } from '../../components/controls/buttons';\nimport Tooltip from '../../components/controls/Tooltip';\nimport { RATING_COLORS } from '../../helpers/constants';\nimport { translate } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport './ColorBoxLegend.css';\n\nexport interface ColorRatingsLegendProps {\n  className?: string;\n  filters: { [rating: number]: boolean };\n  onRatingClick: (selection: number) => void;\n}\n\nconst RATINGS = [1, 2, 3, 4, 5];\n\nexport default function ColorRatingsLegend(props: ColorRatingsLegendProps) {\n  const { className, filters } = props;\n  return (\n    <div className={classNames('color-box-legend', className)}>\n      {RATINGS.map(rating => (\n        <Tooltip key={rating} overlay={translate('component_measures.legend.help')}>\n          <ButtonLink\n            className={classNames('little-padded-bottom', {\n              filtered: filters[rating]\n            })}\n            onClick={() => props.onRatingClick(rating)}\n            type=\"button\">\n            <span\n              className=\"color-box-legend-rect\"\n              style={{ borderColor: RATING_COLORS[rating - 1] }}>\n              <span\n                className=\"color-box-legend-rect-inner\"\n                style={{ backgroundColor: RATING_COLORS[rating - 1] }}\n              />\n            </span>\n            {formatMeasure(rating, 'RATING')}\n          </ButtonLink>\n        </Tooltip>\n      ))}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport OriginalBubbleChart from '../../../components/charts/BubbleChart';\nimport ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { RATING_COLORS } from '../../../helpers/constants';\nimport {\n  getLocalizedMetricDomain,\n  getLocalizedMetricName,\n  translate,\n  translateWithParameters\n} from '../../../helpers/l10n';\nimport { formatMeasure, isDiffMetric } from '../../../helpers/measures';\nimport { isDefined } from '../../../helpers/types';\nimport { isProject } from '../../../types/component';\nimport {\n  BUBBLES_FETCH_LIMIT,\n  getBubbleMetrics,\n  getBubbleYDomain,\n  isProjectOverview\n} from '../utils';\nimport EmptyResult from './EmptyResult';\n\nconst HEIGHT = 500;\n\ninterface Props {\n  component: T.ComponentMeasure;\n  components: T.ComponentMeasureEnhanced[];\n  domain: string;\n  metrics: T.Dict<T.Metric>;\n  paging?: T.Paging;\n  updateSelected: (component: T.ComponentMeasureIntern) => void;\n}\n\ninterface State {\n  ratingFilters: { [rating: number]: boolean };\n}\n\nexport default class BubbleChart extends React.PureComponent<Props, State> {\n  state: State = {\n    ratingFilters: {}\n  };\n\n  getMeasureVal = (component: T.ComponentMeasureEnhanced, metric: T.Metric) => {\n    const measure = component.measures.find(measure => measure.metric.key === metric.key);\n    if (!measure) {\n      return undefined;\n    }\n    return Number(isDiffMetric(metric.key) ? measure.leak : measure.value);\n  };\n\n  getTooltip(\n    component: T.ComponentMeasureEnhanced,\n    values: { x: number; y: number; size: number; colors?: Array<number | undefined> },\n    metrics: { x: T.Metric; y: T.Metric; size: T.Metric; colors?: T.Metric[] }\n  ) {\n    const inner = [\n      [component.name, isProject(component.qualifier) ? component.branch : undefined]\n        .filter(s => !!s)\n        .join(' / '),\n      `${metrics.x.name}: ${formatMeasure(values.x, metrics.x.type)}`,\n      `${metrics.y.name}: ${formatMeasure(values.y, metrics.y.type)}`,\n      `${metrics.size.name}: ${formatMeasure(values.size, metrics.size.type)}`\n    ].filter(s => !!s);\n    const { colors: valuesColors } = values;\n    const { colors: metricColors } = metrics;\n    if (valuesColors && metricColors) {\n      metricColors.forEach((metric, idx) => {\n        const colorValue = valuesColors[idx];\n        if (colorValue || colorValue === 0) {\n          inner.push(`${metric.name}: ${formatMeasure(colorValue, metric.type)}`);\n        }\n      });\n    }\n    return (\n      <div className=\"text-left\">\n        {inner.map((line, index) => (\n          <React.Fragment key={index}>\n            {line}\n            {index < inner.length - 1 && <br />}\n          </React.Fragment>\n        ))}\n      </div>\n    );\n  }\n\n  handleRatingFilterClick = (selection: number) => {\n    this.setState(({ ratingFilters }) => {\n      return { ratingFilters: { ...ratingFilters, [selection]: !ratingFilters[selection] } };\n    });\n  };\n\n  handleBubbleClick = (component: T.ComponentMeasureEnhanced) =>\n    this.props.updateSelected(component);\n\n  getDescription(domain: string) {\n    const description = `component_measures.overview.${domain}.description`;\n    const translatedDescription = translate(description);\n    if (description === translatedDescription) {\n      return null;\n    }\n    return translatedDescription;\n  }\n\n  renderBubbleChart(metrics: { x: T.Metric; y: T.Metric; size: T.Metric; colors?: T.Metric[] }) {\n    const { ratingFilters } = this.state;\n\n    const items = this.props.components\n      .map(component => {\n        const x = this.getMeasureVal(component, metrics.x);\n        const y = this.getMeasureVal(component, metrics.y);\n        const size = this.getMeasureVal(component, metrics.size);\n        const colors =\n          metrics.colors && metrics.colors.map(metric => this.getMeasureVal(component, metric));\n        if ((!x && x !== 0) || (!y && y !== 0) || (!size && size !== 0)) {\n          return undefined;\n        }\n\n        const colorRating = colors && Math.max(...colors.filter(isDefined));\n\n        // Filter out items that match ratingFilters\n        if (colorRating !== undefined && ratingFilters[colorRating]) {\n          return undefined;\n        }\n\n        return {\n          x,\n          y,\n          size,\n          color: colorRating !== undefined ? RATING_COLORS[colorRating - 1] : undefined,\n          data: component,\n          tooltip: this.getTooltip(component, { x, y, size, colors }, metrics)\n        };\n      })\n      .filter(isDefined);\n\n    const formatXTick = (tick: string | number | undefined) => formatMeasure(tick, metrics.x.type);\n    const formatYTick = (tick: string | number | undefined) => formatMeasure(tick, metrics.y.type);\n\n    let xDomain: [number, number] | undefined;\n    if (items.reduce((acc, item) => acc + item.x, 0) === 0) {\n      // All items are on the 0 axis. This won't display the grid on the X axis,\n      // which can make the graph a little hard to read. Force the display of\n      // the X grid.\n      xDomain = [0, 100];\n    }\n\n    return (\n      <OriginalBubbleChart<T.ComponentMeasureEnhanced>\n        formatXTick={formatXTick}\n        formatYTick={formatYTick}\n        height={HEIGHT}\n        items={items}\n        onBubbleClick={this.handleBubbleClick}\n        padding={[25, 60, 50, 60]}\n        yDomain={getBubbleYDomain(this.props.domain)}\n        xDomain={xDomain}\n      />\n    );\n  }\n\n  renderChartHeader(domain: string, sizeMetric: T.Metric, colorsMetric?: T.Metric[]) {\n    const { ratingFilters } = this.state;\n    const { paging } = this.props;\n\n    const title = isProjectOverview(domain)\n      ? translate('component_measures.overview', domain, 'title')\n      : translateWithParameters(\n          'component_measures.domain_x_overview',\n          getLocalizedMetricDomain(domain)\n        );\n    return (\n      <div className=\"measure-overview-bubble-chart-header\">\n        <span className=\"measure-overview-bubble-chart-title\">\n          <div className=\"display-flex-center\">\n            {title}\n            <HelpTooltip className=\"spacer-left\" overlay={this.getDescription(domain)} />\n          </div>\n\n          {paging?.total && paging?.total > BUBBLES_FETCH_LIMIT && (\n            <div className=\"note spacer-top\">\n              ({translate('component_measures.legend.only_first_500_files')})\n            </div>\n          )}\n        </span>\n        <span className=\"measure-overview-bubble-chart-legend\">\n          <span className=\"note\">\n            {colorsMetric && (\n              <span className=\"spacer-right\">\n                {translateWithParameters(\n                  'component_measures.legend.color_x',\n                  colorsMetric.length > 1\n                    ? translateWithParameters(\n                        'component_measures.legend.worse_of_x_y',\n                        ...colorsMetric.map(metric => getLocalizedMetricName(metric))\n                      )\n                    : getLocalizedMetricName(colorsMetric[0])\n                )}\n              </span>\n            )}\n            {translateWithParameters(\n              'component_measures.legend.size_x',\n              getLocalizedMetricName(sizeMetric)\n            )}\n          </span>\n          {colorsMetric && (\n            <ColorRatingsLegend\n              className=\"spacer-top\"\n              filters={ratingFilters}\n              onRatingClick={this.handleRatingFilterClick}\n            />\n          )}\n        </span>\n      </div>\n    );\n  }\n\n  render() {\n    if (this.props.components.length <= 0) {\n      return <EmptyResult />;\n    }\n    const { domain } = this.props;\n    const metrics = getBubbleMetrics(domain, this.props.metrics);\n\n    return (\n      <div className=\"measure-overview-bubble-chart\">\n        {this.renderChartHeader(domain, metrics.size, metrics.colors)}\n        <div className=\"measure-overview-bubble-chart-content\">\n          {this.renderBubbleChart(metrics)}\n        </div>\n        <div className=\"measure-overview-bubble-chart-axis x\">\n          {getLocalizedMetricName(metrics.x)}\n        </div>\n        <div className=\"measure-overview-bubble-chart-axis y\">\n          {getLocalizedMetricName(metrics.y)}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getComponentLeaves } from '../../../api/components';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport SourceViewer from '../../../components/SourceViewer/SourceViewer';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport PageActions from '../../../components/ui/PageActions';\nimport { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branch-like';\nimport { BranchLike } from '../../../types/branch-like';\nimport { isFile } from '../../../types/component';\nimport BubbleChart from '../drilldown/BubbleChart';\nimport { BUBBLES_FETCH_LIMIT, enhanceComponent, getBubbleMetrics, hasFullMeasures } from '../utils';\nimport Breadcrumbs from './Breadcrumbs';\nimport LeakPeriodLegend from './LeakPeriodLegend';\nimport MeasureContentHeader from './MeasureContentHeader';\n\ninterface Props {\n  branchLike?: BranchLike;\n  className?: string;\n  component: T.ComponentMeasure;\n  domain: string;\n  leakPeriod?: T.Period;\n  loading: boolean;\n  metrics: T.Dict<T.Metric>;\n  onIssueChange?: (issue: T.Issue) => void;\n  rootComponent: T.ComponentMeasure;\n  updateLoading: (param: T.Dict<boolean>) => void;\n  updateSelected: (component: T.ComponentMeasureIntern) => void;\n}\n\ninterface State {\n  components: T.ComponentMeasureEnhanced[];\n  paging?: T.Paging;\n}\n\nexport default class MeasureOverview extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { components: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchComponents();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      prevProps.component !== this.props.component ||\n      !isSameBranchLike(prevProps.branchLike, this.props.branchLike) ||\n      prevProps.metrics !== this.props.metrics ||\n      prevProps.domain !== this.props.domain\n    ) {\n      this.fetchComponents();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchComponents = () => {\n    const { branchLike, component, domain, metrics } = this.props;\n    if (isFile(component.qualifier)) {\n      this.setState({ components: [], paging: undefined });\n      return;\n    }\n    const { x, y, size, colors } = getBubbleMetrics(domain, metrics);\n    const metricsKey = [x.key, y.key, size.key];\n    if (colors) {\n      metricsKey.push(...colors.map(metric => metric.key));\n    }\n    const options = {\n      ...getBranchLikeQuery(branchLike),\n      s: 'metric',\n      metricSort: size.key,\n      asc: false,\n      ps: BUBBLES_FETCH_LIMIT\n    };\n\n    this.props.updateLoading({ bubbles: true });\n    getComponentLeaves(component.key, metricsKey, options).then(\n      r => {\n        if (domain === this.props.domain) {\n          if (this.mounted) {\n            this.setState({\n              components: r.components.map(c => enhanceComponent(c, undefined, metrics)),\n              paging: r.paging\n            });\n          }\n          this.props.updateLoading({ bubbles: false });\n        }\n      },\n      () => this.props.updateLoading({ bubbles: false })\n    );\n  };\n\n  renderContent() {\n    const { branchLike, component, domain, metrics } = this.props;\n    const { paging } = this.state;\n\n    if (isFile(component.qualifier)) {\n      return (\n        <div className=\"measure-details-viewer\">\n          <SourceViewer\n            branchLike={branchLike}\n            component={component.key}\n            onIssueChange={this.props.onIssueChange}\n          />\n        </div>\n      );\n    }\n\n    return (\n      <BubbleChart\n        component={component}\n        components={this.state.components}\n        domain={domain}\n        metrics={metrics}\n        paging={paging}\n        updateSelected={this.props.updateSelected}\n      />\n    );\n  }\n\n  render() {\n    const { branchLike, className, component, leakPeriod, loading, rootComponent } = this.props;\n    const displayLeak = hasFullMeasures(branchLike);\n    return (\n      <div className={className}>\n        <div className=\"layout-page-header-panel layout-page-main-header\">\n          <A11ySkipTarget anchor=\"measures_main\" />\n\n          <div className=\"layout-page-header-panel-inner layout-page-main-header-inner\">\n            <div className=\"layout-page-main-inner\">\n              <MeasureContentHeader\n                left={\n                  <Breadcrumbs\n                    backToFirst={true}\n                    branchLike={branchLike}\n                    className=\"text-ellipsis\"\n                    component={component}\n                    handleSelect={this.props.updateSelected}\n                    rootComponent={rootComponent}\n                  />\n                }\n                right={\n                  <PageActions\n                    componentQualifier={rootComponent.qualifier}\n                    current={this.state.components.length}\n                  />\n                }\n              />\n            </div>\n          </div>\n        </div>\n        <div className=\"layout-page-main-inner measure-details-content\">\n          <div className=\"clearfix big-spacer-bottom\">\n            {leakPeriod && displayLeak && (\n              <LeakPeriodLegend className=\"pull-right\" component={component} period={leakPeriod} />\n            )}\n          </div>\n          <DeferredSpinner loading={loading} />\n          {!loading && this.renderContent()}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { InjectedRouter } from 'react-router';\nimport { getComponentShow } from '../../../api/components';\nimport { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branch-like';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport { isView } from '../../../types/component';\nimport { Query } from '../utils';\nimport MeasureOverview from './MeasureOverview';\n\ninterface Props {\n  branchLike?: BranchLike;\n  className?: string;\n  domain: string;\n  leakPeriod?: T.Period;\n  metrics: T.Dict<T.Metric>;\n  onIssueChange?: (issue: T.Issue) => void;\n  rootComponent: T.ComponentMeasure;\n  router: InjectedRouter;\n  selected?: string;\n  updateQuery: (query: Partial<Query>) => void;\n}\n\ninterface LoadingState {\n  bubbles: boolean;\n  component: boolean;\n}\n\ninterface State {\n  component?: T.ComponentMeasure;\n  loading: LoadingState;\n}\n\nexport default class MeasureOverviewContainer extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state: State = {\n    loading: { bubbles: false, component: false }\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchComponent();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    const prevComponentKey = prevProps.selected || prevProps.rootComponent.key;\n    const componentKey = this.props.selected || this.props.rootComponent.key;\n    if (\n      prevComponentKey !== componentKey ||\n      !isSameBranchLike(prevProps.branchLike, this.props.branchLike) ||\n      prevProps.domain !== this.props.domain\n    ) {\n      this.fetchComponent();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchComponent = () => {\n    const { branchLike, rootComponent, selected } = this.props;\n    if (!selected || rootComponent.key === selected) {\n      this.setState({ component: rootComponent });\n      this.updateLoading({ component: false });\n      return;\n    }\n    this.updateLoading({ component: true });\n    getComponentShow({ component: selected, ...getBranchLikeQuery(branchLike) }).then(\n      ({ component }) => {\n        if (this.mounted) {\n          this.setState({ component });\n          this.updateLoading({ component: false });\n        }\n      },\n      () => this.updateLoading({ component: false })\n    );\n  };\n\n  updateLoading = (loading: Partial<LoadingState>) => {\n    if (this.mounted) {\n      this.setState(state => ({ loading: { ...state.loading, ...loading } }));\n    }\n  };\n\n  updateSelected = (component: T.ComponentMeasureIntern) => {\n    if (this.state.component && isView(this.state.component.qualifier)) {\n      this.props.router.push(getProjectUrl(component.refKey || component.key, component.branch));\n    } else {\n      this.props.updateQuery({\n        selected: component.key !== this.props.rootComponent.key ? component.key : undefined\n      });\n    }\n  };\n\n  render() {\n    if (!this.state.component) {\n      return null;\n    }\n\n    return (\n      <MeasureOverview\n        branchLike={this.props.branchLike}\n        className={this.props.className}\n        component={this.state.component}\n        domain={this.props.domain}\n        leakPeriod={this.props.leakPeriod}\n        loading={this.state.loading.component || this.state.loading.bubbles}\n        metrics={this.props.metrics}\n        onIssueChange={this.props.onIssueChange}\n        rootComponent={this.props.rootComponent}\n        updateLoading={this.updateLoading}\n        updateSelected={this.updateSelected}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function MeasuresEmpty() {\n  return (\n    <div className=\"page page-limited\">\n      <div className=\"note\">{translate('component_measures.empty')}</div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport key from 'keymaster';\nimport { debounce, keyBy } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { withRouter, WithRouterProps } from 'react-router';\nimport { getMeasuresWithPeriod } from '../../../api/measures';\nimport { getAllMetrics } from '../../../api/metrics';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';\nimport { enhanceMeasure } from '../../../components/measure/utils';\nimport '../../../components/search-navigator.css';\nimport { getBranchLikeQuery, isPullRequest, isSameBranchLike } from '../../../helpers/branch-like';\nimport {\n  getLocalizedMetricDomain,\n  translate,\n  translateWithParameters\n} from '../../../helpers/l10n';\nimport {\n  addSideBarClass,\n  addWhitePageClass,\n  removeSideBarClass,\n  removeWhitePageClass\n} from '../../../helpers/pages';\nimport { fetchBranchStatus } from '../../../store/rootActions';\nimport { BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport Sidebar from '../sidebar/Sidebar';\nimport '../style.css';\nimport {\n  banQualityGateMeasure,\n  getMeasuresPageMetricKeys,\n  groupByDomains,\n  hasBubbleChart,\n  hasFullMeasures,\n  hasTree,\n  hasTreemap,\n  isProjectOverview,\n  parseQuery,\n  Query,\n  serializeQuery,\n  sortMeasures\n} from '../utils';\nimport MeasureContent from './MeasureContent';\nimport MeasureOverviewContainer from './MeasureOverviewContainer';\nimport MeasuresEmpty from './MeasuresEmpty';\n\ninterface Props extends WithRouterProps {\n  branchLike?: BranchLike;\n  component: T.ComponentMeasure;\n  fetchBranchStatus: (branchLike: BranchLike, projectKey: string) => Promise<void>;\n}\n\ninterface State {\n  leakPeriod?: T.Period;\n  loading: boolean;\n  measures: T.MeasureEnhanced[];\n  metrics: T.Dict<T.Metric>;\n}\n\nexport class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      loading: true,\n      measures: [],\n      metrics: {}\n    };\n    this.refreshBranchStatus = debounce(this.refreshBranchStatus, 1000);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n\n    key.setScope('measures-files');\n    getAllMetrics().then(\n      metrics => {\n        const byKey = keyBy(metrics, 'key');\n        this.setState({ metrics: byKey });\n        this.fetchMeasures(byKey);\n      },\n      () => {}\n    );\n  }\n\n  componentDidUpdate(prevProps: Props, prevState: State) {\n    const prevQuery = parseQuery(prevProps.location.query);\n    const query = parseQuery(this.props.location.query);\n\n    if (\n      !isSameBranchLike(prevProps.branchLike, this.props.branchLike) ||\n      prevProps.component.key !== this.props.component.key ||\n      prevQuery.selected !== query.selected\n    ) {\n      this.fetchMeasures(this.state.metrics);\n    }\n\n    if (prevState.measures.length === 0 && this.state.measures.length > 0) {\n      addWhitePageClass();\n      addSideBarClass();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    removeWhitePageClass();\n    removeSideBarClass();\n    key.deleteScope('measures-files');\n  }\n\n  fetchMeasures(metrics: State['metrics']) {\n    const { branchLike } = this.props;\n    const query = parseQuery(this.props.location.query);\n    const componentKey = query.selected || this.props.component.key;\n\n    const filteredKeys = getMeasuresPageMetricKeys(metrics, branchLike);\n\n    getMeasuresWithPeriod(componentKey, filteredKeys, getBranchLikeQuery(branchLike)).then(\n      ({ component, period }) => {\n        if (this.mounted) {\n          const measures = banQualityGateMeasure(component).map(measure =>\n            enhanceMeasure(measure, metrics)\n          );\n\n          const leakPeriod =\n            component.qualifier === ComponentQualifier.Project ? period : undefined;\n\n          this.setState({\n            loading: false,\n            leakPeriod,\n            measures: measures.filter(\n              measure => measure.value !== undefined || measure.leak !== undefined\n            )\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  }\n\n  getHelmetTitle = (query: Query, displayOverview: boolean, metric?: T.Metric) => {\n    if (displayOverview && query.metric) {\n      return isProjectOverview(query.metric)\n        ? translate('component_measures.overview.project_overview.facet')\n        : translateWithParameters(\n            'component_measures.domain_x_overview',\n            getLocalizedMetricDomain(query.metric)\n          );\n    }\n    return metric ? metric.name : translate('layout.measures');\n  };\n\n  getSelectedMetric = (query: Query, displayOverview: boolean) => {\n    if (displayOverview) {\n      return undefined;\n    }\n    const metric = this.state.metrics[query.metric];\n    if (!metric) {\n      const domainMeasures = groupByDomains(this.state.measures);\n      const firstMeasure =\n        domainMeasures[0] && sortMeasures(domainMeasures[0].name, domainMeasures[0].measures)[0];\n      if (firstMeasure && typeof firstMeasure !== 'string') {\n        return firstMeasure.metric;\n      }\n    }\n    return metric;\n  };\n\n  handleIssueChange = (_: T.Issue) => {\n    this.refreshBranchStatus();\n  };\n\n  updateQuery = (newQuery: Partial<Query>) => {\n    const query: Query = { ...parseQuery(this.props.location.query), ...newQuery };\n\n    const metric = this.getSelectedMetric(query, false);\n    if (metric) {\n      if (query.view === 'treemap' && !hasTreemap(metric.key, metric.type)) {\n        query.view = 'tree';\n      } else if (query.view === 'tree' && !hasTree(metric.key)) {\n        query.view = 'list';\n      }\n    }\n\n    this.props.router.push({\n      pathname: this.props.location.pathname,\n      query: {\n        ...serializeQuery(query),\n        ...getBranchLikeQuery(this.props.branchLike),\n        id: this.props.component.key\n      }\n    });\n  };\n\n  refreshBranchStatus = () => {\n    const { branchLike, component } = this.props;\n    if (branchLike && component && isPullRequest(branchLike)) {\n      this.props.fetchBranchStatus(branchLike, component.key);\n    }\n  };\n\n  renderContent = (displayOverview: boolean, query: Query, metric?: T.Metric) => {\n    const { branchLike, component } = this.props;\n    const { leakPeriod } = this.state;\n    if (displayOverview) {\n      return (\n        <MeasureOverviewContainer\n          branchLike={branchLike}\n          className=\"layout-page-main\"\n          domain={query.metric}\n          leakPeriod={leakPeriod}\n          metrics={this.state.metrics}\n          onIssueChange={this.handleIssueChange}\n          rootComponent={component}\n          router={this.props.router}\n          selected={query.selected}\n          updateQuery={this.updateQuery}\n        />\n      );\n    }\n\n    if (!metric) {\n      return <MeasuresEmpty />;\n    }\n\n    const hideDrilldown =\n      isPullRequest(branchLike) &&\n      (metric.key === 'coverage' || metric.key === 'duplicated_lines_density');\n\n    if (hideDrilldown) {\n      return (\n        <div className=\"layout-page-main\">\n          <div className=\"layout-page-main-inner\">\n            <div className=\"note\">{translate('component_measures.details_are_not_available')}</div>\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <MeasureContent\n        branchLike={branchLike}\n        leakPeriod={leakPeriod}\n        metrics={this.state.metrics}\n        onIssueChange={this.handleIssueChange}\n        requestedMetric={metric}\n        rootComponent={component}\n        router={this.props.router}\n        selected={query.selected}\n        updateQuery={this.updateQuery}\n        view={query.view}\n      />\n    );\n  };\n\n  render() {\n    if (this.state.loading) {\n      return <i className=\"spinner spacer\" />;\n    }\n\n    const { branchLike } = this.props;\n    const { measures } = this.state;\n    const query = parseQuery(this.props.location.query);\n    const showFullMeasures = hasFullMeasures(branchLike);\n    const displayOverview = hasBubbleChart(query.metric);\n    const metric = this.getSelectedMetric(query, displayOverview);\n\n    return (\n      <div id=\"component-measures\">\n        <Suggestions suggestions=\"component_measures\" />\n        <Helmet defer={false} title={this.getHelmetTitle(query, displayOverview, metric)} />\n\n        {measures.length > 0 ? (\n          <div className=\"layout-page\">\n            <ScreenPositionHelper className=\"layout-page-side-outer\">\n              {({ top }) => (\n                <div className=\"layout-page-side\" style={{ top }}>\n                  <div className=\"layout-page-side-inner\">\n                    <div className=\"layout-page-filters\">\n                      <Sidebar\n                        measures={measures}\n                        selectedMetric={metric ? metric.key : query.metric}\n                        showFullMeasures={showFullMeasures}\n                        updateQuery={this.updateQuery}\n                      />\n                    </div>\n                  </div>\n                </div>\n              )}\n            </ScreenPositionHelper>\n            {this.renderContent(displayOverview, query, metric)}\n          </div>\n        ) : (\n          <MeasuresEmpty />\n        )}\n      </div>\n    );\n  }\n}\n\nconst mapDispatchToProps = { fetchBranchStatus: fetchBranchStatus as any };\n\nexport default withRouter(connect(null, mapDispatchToProps)(App));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { RedirectFunction, RouterState } from 'react-router';\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/App')) }\n  },\n  {\n    path: 'domain/:domainName',\n    onEnter(nextState: RouterState, replace: RedirectFunction) {\n      replace({\n        pathname: '/component_measures',\n        query: {\n          ...nextState.location.query,\n          metric: nextState.params.domainName\n        }\n      });\n    }\n  },\n  {\n    path: 'metric/:metricKey(/:view)',\n    onEnter(nextState: RouterState, replace: RedirectFunction) {\n      if (nextState.params.view === 'history') {\n        replace({\n          pathname: '/project/activity',\n          query: {\n            id: nextState.location.query.id,\n            graph: 'custom',\n            custom_metrics: nextState.params.metricKey\n          }\n        });\n      } else {\n        replace({\n          pathname: '/component_measures',\n          query: {\n            ...nextState.location.query,\n            metric: nextState.params.metricKey,\n            view: nextState.params.view\n          }\n        });\n      }\n    }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport interface Plugin {\n  key: string;\n  name: string;\n  category?: string;\n  description?: string;\n  editionBundled?: boolean;\n  license?: string;\n  organizationName?: string;\n  homepageUrl?: string;\n  organizationUrl?: string;\n  issueTrackerUrl?: string;\n  termsAndConditionsUrl?: string;\n}\n\nexport interface PendingPluginResult {\n  installing: PendingPlugin[];\n  updating: PendingPlugin[];\n  removing: PendingPlugin[];\n}\n\nexport interface AvailablePlugin extends Plugin {\n  release: Release;\n  update: Update;\n}\n\nexport interface PendingPlugin extends Plugin {\n  version: string;\n  implementationBuild: string;\n}\n\nexport interface InstalledPlugin extends PendingPlugin {\n  documentationPath?: string;\n  issueTrackerUrl?: string;\n  filename: string;\n  hash: string;\n  sonarLintSupported: boolean;\n  updatedAt: number;\n  updates?: Update[];\n}\n\nexport interface Release {\n  version: string;\n  date: string;\n  description?: string;\n  changeLogUrl?: string;\n}\n\nexport interface Update {\n  status: string;\n  release?: Release;\n  requires: Plugin[];\n  previousUpdates?: Update[];\n}\n\nexport enum PluginType {\n  Bundled = 'BUNDLED',\n  External = 'EXTERNAL'\n}\n\nexport enum RiskConsent {\n  Accepted = 'ACCEPTED',\n  NotAccepted = 'NOT_ACCEPTED',\n  Required = 'REQUIRED'\n}\n\nexport function isAvailablePlugin(plugin: Plugin): plugin is AvailablePlugin {\n  return (plugin as any).release !== undefined;\n}\n\nexport function isInstalledPlugin(plugin: Plugin): plugin is InstalledPlugin {\n  return isPendingPlugin(plugin) && (plugin as any).updatedAt !== undefined;\n}\n\nexport function isPendingPlugin(plugin: Plugin): plugin is PendingPlugin {\n  return (plugin as any).version !== undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { findLastIndex } from 'lodash';\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post } from '../helpers/request';\nimport { isDefined } from '../helpers/types';\nimport {\n  AvailablePlugin,\n  InstalledPlugin,\n  PendingPluginResult,\n  PluginType,\n  Update\n} from '../types/plugins';\n\nexport function getAvailablePlugins(): Promise<{\n  plugins: AvailablePlugin[];\n  updateCenterRefresh: string;\n}> {\n  return getJSON('/api/plugins/available').catch(throwGlobalError);\n}\n\nexport function getPendingPlugins(): Promise<PendingPluginResult> {\n  return getJSON('/api/plugins/pending').catch(throwGlobalError);\n}\n\nfunction getLastUpdates(updates: undefined | Update[]): Update[] {\n  if (!updates) {\n    return [];\n  }\n  const lastUpdate = ['COMPATIBLE', 'REQUIRES_SYSTEM_UPGRADE', 'DEPS_REQUIRE_SYSTEM_UPGRADE'].map(\n    status => {\n      const index = findLastIndex(updates, update => update.status === status);\n      return index > -1 ? updates[index] : undefined;\n    }\n  );\n  return lastUpdate.filter(isDefined);\n}\n\nfunction addChangelog(update: Update, updates?: Update[]) {\n  if (!updates) {\n    return update;\n  }\n  const index = updates.indexOf(update);\n  const previousUpdates = index > 0 ? updates.slice(0, index) : [];\n  return { ...update, previousUpdates };\n}\n\nfunction getInstalledPluginApi(type = PluginType.External) {\n  return getJSON('/api/plugins/installed', { f: 'category', type });\n}\n\nfunction getUpdatesPluginApi() {\n  return getJSON('/api/plugins/updates');\n}\n\nexport function getInstalledPlugins(\n  type: PluginType = PluginType.External\n): Promise<InstalledPlugin[]> {\n  return getInstalledPluginApi(type).then(({ plugins }) => plugins, throwGlobalError);\n}\n\nexport function getInstalledPluginsWithUpdates(): Promise<InstalledPlugin[]> {\n  return Promise.all([getInstalledPluginApi(), getUpdatesPluginApi()])\n    .then(([installed, updates]) =>\n      installed.plugins.map((plugin: InstalledPlugin) => {\n        const updatePlugin: InstalledPlugin = updates.plugins.find(\n          (p: InstalledPlugin) => p.key === plugin.key\n        );\n        if (updatePlugin) {\n          return {\n            ...updatePlugin,\n            ...plugin,\n            updates: getLastUpdates(updatePlugin.updates).map(update =>\n              addChangelog(update, updatePlugin.updates)\n            )\n          };\n        }\n        return plugin;\n      })\n    )\n    .catch(throwGlobalError);\n}\n\nexport function getPluginUpdates(): Promise<InstalledPlugin[]> {\n  return Promise.all([getUpdatesPluginApi(), getInstalledPluginApi()])\n    .then(([updates, installed]) =>\n      updates.plugins.map((updatePlugin: InstalledPlugin) => {\n        const updates = getLastUpdates(updatePlugin.updates).map(update =>\n          addChangelog(update, updatePlugin.updates)\n        );\n        const plugin = installed.plugins.find((p: InstalledPlugin) => p.key === updatePlugin.key);\n        if (plugin) {\n          return {\n            ...plugin,\n            ...updatePlugin,\n            updates\n          };\n        }\n        return { ...updatePlugin, updates };\n      })\n    )\n    .catch(throwGlobalError);\n}\n\nexport function installPlugin(data: { key: string }): Promise<void | Response> {\n  return post('/api/plugins/install', data).catch(throwGlobalError);\n}\n\nexport function uninstallPlugin(data: { key: string }): Promise<void | Response> {\n  return post('/api/plugins/uninstall', data).catch(throwGlobalError);\n}\n\nexport function updatePlugin(data: { key: string }): Promise<void | Response> {\n  return post('/api/plugins/update', data).catch(throwGlobalError);\n}\n\nexport function cancelPendingPlugins(): Promise<void | Response> {\n  return post('/api/plugins/cancel_all').catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { checkStatus, request } from '../helpers/request';\n\nexport function getPluginStaticFileContent(pluginKey: string, staticFilePath: string) {\n  return request(`/static/${pluginKey}/${staticFilePath}`)\n    .submit()\n    .then(checkStatus)\n    .then(response => response.text());\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport './NavBar.css';\n\nexport interface NavBarProps {\n  children?: React.ReactNode;\n  className?: string;\n  height: number;\n  limited?: boolean;\n  top?: number;\n  notif?: React.ReactNode;\n}\n\ninterface State {\n  left: number;\n}\n\nexport default class NavBar extends React.PureComponent<\n  NavBarProps & React.HTMLProps<HTMLDivElement>,\n  State\n> {\n  throttledFollowHorizontalScroll: () => void;\n\n  constructor(props: NavBarProps) {\n    super(props);\n    this.state = { left: 0 };\n    this.throttledFollowHorizontalScroll = throttle(this.followHorizontalScroll, 10);\n  }\n\n  componentDidMount() {\n    document.addEventListener('scroll', this.throttledFollowHorizontalScroll);\n  }\n\n  componentWillUnmount() {\n    document.removeEventListener('scroll', this.throttledFollowHorizontalScroll);\n  }\n\n  followHorizontalScroll = () => {\n    if (document.documentElement) {\n      this.setState({ left: -document.documentElement.scrollLeft });\n    }\n  };\n\n  render() {\n    const { children, className, height, limited = true, top, notif, ...other } = this.props;\n    return (\n      <nav {...other} className={classNames('navbar', className)} style={{ height, top }}>\n        <div\n          className={classNames('navbar-inner', { 'navbar-inner-with-notif': notif != null })}\n          style={{ height, left: this.state.left }}>\n          <div className={classNames('clearfix', { 'navbar-limited': limited })}>{children}</div>\n          {notif}\n        </div>\n      </nav>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { SystemUpgradeDownloadUrls } from './system';\n\nexport enum EditionKey {\n  community = 'community',\n  developer = 'developer',\n  enterprise = 'enterprise',\n  datacenter = 'datacenter'\n}\n\nexport interface Edition {\n  downloadProperty: keyof SystemUpgradeDownloadUrls;\n  homeUrl: string;\n  key: EditionKey;\n  name: string;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omitNil } from '../helpers/request';\nimport { Edition, EditionKey } from '../types/editions';\nimport { SystemUpgrade } from '../types/system';\n\nconst EDITIONS: { [x in EditionKey]: Edition } = {\n  community: {\n    key: EditionKey.community,\n    name: 'Community Edition',\n    homeUrl: 'https://redirect.sonarsource.com/editions/community.html',\n    downloadProperty: 'downloadUrl'\n  },\n  developer: {\n    key: EditionKey.developer,\n    name: 'Developer Edition',\n    homeUrl: 'https://redirect.sonarsource.com/editions/developer.html',\n    downloadProperty: 'downloadDeveloperUrl'\n  },\n  enterprise: {\n    key: EditionKey.enterprise,\n    name: 'Enterprise Edition',\n    homeUrl: 'https://redirect.sonarsource.com/editions/enterprise.html',\n    downloadProperty: 'downloadEnterpriseUrl'\n  },\n  datacenter: {\n    key: EditionKey.datacenter,\n    name: 'Data Center Edition',\n    homeUrl: 'https://redirect.sonarsource.com/editions/datacenter.html',\n    downloadProperty: 'downloadDatacenterUrl'\n  }\n};\n\nexport function getEdition(editionKey: EditionKey) {\n  return EDITIONS[editionKey];\n}\n\nexport function getAllEditionsAbove(currentEdition?: EditionKey) {\n  const editions = Object.values(EDITIONS);\n  const currentEditionIdx = editions.findIndex(edition => edition.key === currentEdition);\n  return editions.slice(currentEditionIdx + 1);\n}\n\nexport function getEditionUrl(\n  edition: Edition,\n  data: { serverId?: string; ncloc?: number; sourceEdition?: EditionKey }\n) {\n  let url = edition.homeUrl;\n  const query = new URLSearchParams(omitNil(data)).toString();\n  if (query) {\n    url += '?' + query;\n  }\n  return url;\n}\n\nexport function getEditionDownloadUrl(edition: Edition, lastUpgrade: SystemUpgrade) {\n  return lastUpgrade[edition.downloadProperty] || lastUpgrade.downloadUrl;\n}\n\nexport function getEditionDownloadFilename(url: string) {\n  return url.replace(/^.+\\/(sonarqube-[\\w\\-.]+\\.zip)$/, '$1');\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { isOfficial } from '../../helpers/system';\n\nexport default function GlobalFooterBranding() {\n  const official = isOfficial();\n\n  return official ? (\n    <div>\n      SonarQube&trade; technology is powered by{' '}\n      <a href=\"https://www.sonarsource.com\" rel=\"noopener noreferrer\" target=\"_blank\">\n        SonarSource SA\n      </a>\n    </div>\n  ) : (\n    <div>\n      This application is based on{' '}\n      <a\n        href=\"https://www.sonarqube.org/?referrer=sonarqube\"\n        rel=\"noopener noreferrer\"\n        target=\"_blank\"\n        title=\"SonarQube\u2122\">\n        SonarQube\u2122\n      </a>{' '}\n      but is <strong>not</strong> an official version provided by{' '}\n      <a\n        href=\"https://www.sonarsource.com\"\n        rel=\"noopener noreferrer\"\n        target=\"_blank\"\n        title=\"SonarSource SA\">\n        SonarSource SA\n      </a>\n      .\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport InstanceMessage from '../../components/common/InstanceMessage';\nimport { Alert } from '../../components/ui/Alert';\nimport { getEdition } from '../../helpers/editions';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { EditionKey } from '../../types/editions';\nimport GlobalFooterBranding from './GlobalFooterBranding';\n\ninterface Props {\n  hideLoggedInInfo?: boolean;\n  productionDatabase: boolean;\n  sonarqubeEdition?: EditionKey;\n  sonarqubeVersion?: string;\n}\n\nexport default function GlobalFooter({\n  hideLoggedInInfo,\n  productionDatabase,\n  sonarqubeEdition,\n  sonarqubeVersion\n}: Props) {\n  const currentEdition = sonarqubeEdition && getEdition(sonarqubeEdition);\n\n  return (\n    <div className=\"page-footer page-container\" id=\"footer\">\n      {productionDatabase === false && (\n        <Alert display=\"inline\" id=\"evaluation_warning\" variant=\"warning\">\n          <p className=\"big\">{translate('footer.production_database_warning')}</p>\n          <p>\n            <InstanceMessage message={translate('footer.production_database_explanation')} />\n          </p>\n        </Alert>\n      )}\n\n      <GlobalFooterBranding />\n\n      <ul className=\"page-footer-menu\">\n        {!hideLoggedInInfo && currentEdition && (\n          <li className=\"page-footer-menu-item\">{currentEdition.name}</li>\n        )}\n        {!hideLoggedInInfo && sonarqubeVersion && (\n          <li className=\"page-footer-menu-item\">\n            {translateWithParameters('footer.version_x', sonarqubeVersion)}\n          </li>\n        )}\n        <li className=\"page-footer-menu-item\">\n          <a\n            href=\"https://www.gnu.org/licenses/lgpl-3.0.txt\"\n            rel=\"noopener noreferrer\"\n            target=\"_blank\">\n            {translate('footer.license')}\n          </a>\n        </li>\n        <li className=\"page-footer-menu-item\">\n          <a\n            href=\"https://community.sonarsource.com/c/help/sq\"\n            rel=\"noopener noreferrer\"\n            target=\"_blank\">\n            {translate('footer.community')}\n          </a>\n        </li>\n        <li className=\"page-footer-menu-item\">\n          <Link to=\"/documentation\">{translate('footer.documentation')}</Link>\n        </li>\n        <li className=\"page-footer-menu-item\">\n          <a\n            href=\"https://redirect.sonarsource.com/doc/plugin-library.html\"\n            rel=\"noopener noreferrer\"\n            target=\"_blank\">\n            {translate('footer.plugins')}\n          </a>\n        </li>\n        {!hideLoggedInInfo && (\n          <li className=\"page-footer-menu-item\">\n            <Link to=\"/web_api\">{translate('footer.web_api')}</Link>\n          </li>\n        )}\n      </ul>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { getAppState, Store } from '../../store/rootReducer';\nimport { EditionKey } from '../../types/editions';\nimport GlobalFooter from './GlobalFooter';\n\ninterface StateProps {\n  productionDatabase: boolean;\n  sonarqubeEdition?: EditionKey;\n  sonarqubeVersion?: string;\n}\n\nconst mapStateToProps = (state: Store): StateProps => ({\n  productionDatabase: getAppState(state).productionDatabase,\n  sonarqubeEdition: getAppState(state).edition as EditionKey, // TODO: Fix once AppState is no longer ambiant.\n  sonarqubeVersion: getAppState(state).version\n});\n\nexport default connect(mapStateToProps)(GlobalFooter);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport NavBar from '../../components/ui/NavBar';\nimport { rawSizes } from '../theme';\nimport GlobalFooterContainer from './GlobalFooterContainer';\n\ninterface Props {\n  children?: React.ReactNode;\n}\n\nexport default function SimpleContainer({ children }: Props) {\n  return (\n    <div className=\"global-container\">\n      <div className=\"page-wrapper\" id=\"container\">\n        <NavBar className=\"navbar-global\" height={rawSizes.globalNavHeightRaw} />\n        {children}\n      </div>\n      <GlobalFooterContainer />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router';\nimport { translate } from '../../helpers/l10n';\nimport SimpleContainer from './SimpleContainer';\n\ninterface Props {\n  withContainer?: boolean;\n}\n\nexport default function NotFound({ withContainer = true }: Props) {\n  const Container = withContainer ? SimpleContainer : React.Fragment;\n  return (\n    <Container>\n      <Helmet defaultTitle={translate('404_not_found')} defer={false} />\n      <div className=\"page-wrapper-simple\" id=\"bd\">\n        <div className=\"page-simple\" id=\"nonav\">\n          <h2 className=\"big-spacer-bottom\">{translate('page_not_found')}</h2>\n          <p className=\"spacer-bottom\">{translate('address_mistyped_or_page_moved')}</p>\n          <p>\n            <Link to=\"/\">{translate('go_back_to_homepage')}</Link>\n          </p>\n        </div>\n      </div>\n    </Container>\n  );\n}\n", "'use strict';\n\nconst UNDEFINED_CODE_POINTS = [\n    0xfffe,\n    0xffff,\n    0x1fffe,\n    0x1ffff,\n    0x2fffe,\n    0x2ffff,\n    0x3fffe,\n    0x3ffff,\n    0x4fffe,\n    0x4ffff,\n    0x5fffe,\n    0x5ffff,\n    0x6fffe,\n    0x6ffff,\n    0x7fffe,\n    0x7ffff,\n    0x8fffe,\n    0x8ffff,\n    0x9fffe,\n    0x9ffff,\n    0xafffe,\n    0xaffff,\n    0xbfffe,\n    0xbffff,\n    0xcfffe,\n    0xcffff,\n    0xdfffe,\n    0xdffff,\n    0xefffe,\n    0xeffff,\n    0xffffe,\n    0xfffff,\n    0x10fffe,\n    0x10ffff\n];\n\nexports.REPLACEMENT_CHARACTER = '\\uFFFD';\n\nexports.CODE_POINTS = {\n    EOF: -1,\n    NULL: 0x00,\n    TABULATION: 0x09,\n    CARRIAGE_RETURN: 0x0d,\n    LINE_FEED: 0x0a,\n    FORM_FEED: 0x0c,\n    SPACE: 0x20,\n    EXCLAMATION_MARK: 0x21,\n    QUOTATION_MARK: 0x22,\n    NUMBER_SIGN: 0x23,\n    AMPERSAND: 0x26,\n    APOSTROPHE: 0x27,\n    HYPHEN_MINUS: 0x2d,\n    SOLIDUS: 0x2f,\n    DIGIT_0: 0x30,\n    DIGIT_9: 0x39,\n    SEMICOLON: 0x3b,\n    LESS_THAN_SIGN: 0x3c,\n    EQUALS_SIGN: 0x3d,\n    GREATER_THAN_SIGN: 0x3e,\n    QUESTION_MARK: 0x3f,\n    LATIN_CAPITAL_A: 0x41,\n    LATIN_CAPITAL_F: 0x46,\n    LATIN_CAPITAL_X: 0x58,\n    LATIN_CAPITAL_Z: 0x5a,\n    RIGHT_SQUARE_BRACKET: 0x5d,\n    GRAVE_ACCENT: 0x60,\n    LATIN_SMALL_A: 0x61,\n    LATIN_SMALL_F: 0x66,\n    LATIN_SMALL_X: 0x78,\n    LATIN_SMALL_Z: 0x7a,\n    REPLACEMENT_CHARACTER: 0xfffd\n};\n\nexports.CODE_POINT_SEQUENCES = {\n    DASH_DASH_STRING: [0x2d, 0x2d], //--\n    DOCTYPE_STRING: [0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45], //DOCTYPE\n    CDATA_START_STRING: [0x5b, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5b], //[CDATA[\n    SCRIPT_STRING: [0x73, 0x63, 0x72, 0x69, 0x70, 0x74], //script\n    PUBLIC_STRING: [0x50, 0x55, 0x42, 0x4c, 0x49, 0x43], //PUBLIC\n    SYSTEM_STRING: [0x53, 0x59, 0x53, 0x54, 0x45, 0x4d] //SYSTEM\n};\n\n//Surrogates\nexports.isSurrogate = function(cp) {\n    return cp >= 0xd800 && cp <= 0xdfff;\n};\n\nexports.isSurrogatePair = function(cp) {\n    return cp >= 0xdc00 && cp <= 0xdfff;\n};\n\nexports.getSurrogatePairCodePoint = function(cp1, cp2) {\n    return (cp1 - 0xd800) * 0x400 + 0x2400 + cp2;\n};\n\n//NOTE: excluding NULL and ASCII whitespace\nexports.isControlCodePoint = function(cp) {\n    return (\n        (cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||\n        (cp >= 0x7f && cp <= 0x9f)\n    );\n};\n\nexports.isUndefinedCodePoint = function(cp) {\n    return (cp >= 0xfdd0 && cp <= 0xfdef) || UNDEFINED_CODE_POINTS.indexOf(cp) > -1;\n};\n", "'use strict';\n\nmodule.exports = {\n    controlCharacterInInputStream: 'control-character-in-input-stream',\n    noncharacterInInputStream: 'noncharacter-in-input-stream',\n    surrogateInInputStream: 'surrogate-in-input-stream',\n    nonVoidHtmlElementStartTagWithTrailingSolidus: 'non-void-html-element-start-tag-with-trailing-solidus',\n    endTagWithAttributes: 'end-tag-with-attributes',\n    endTagWithTrailingSolidus: 'end-tag-with-trailing-solidus',\n    unexpectedSolidusInTag: 'unexpected-solidus-in-tag',\n    unexpectedNullCharacter: 'unexpected-null-character',\n    unexpectedQuestionMarkInsteadOfTagName: 'unexpected-question-mark-instead-of-tag-name',\n    invalidFirstCharacterOfTagName: 'invalid-first-character-of-tag-name',\n    unexpectedEqualsSignBeforeAttributeName: 'unexpected-equals-sign-before-attribute-name',\n    missingEndTagName: 'missing-end-tag-name',\n    unexpectedCharacterInAttributeName: 'unexpected-character-in-attribute-name',\n    unknownNamedCharacterReference: 'unknown-named-character-reference',\n    missingSemicolonAfterCharacterReference: 'missing-semicolon-after-character-reference',\n    unexpectedCharacterAfterDoctypeSystemIdentifier: 'unexpected-character-after-doctype-system-identifier',\n    unexpectedCharacterInUnquotedAttributeValue: 'unexpected-character-in-unquoted-attribute-value',\n    eofBeforeTagName: 'eof-before-tag-name',\n    eofInTag: 'eof-in-tag',\n    missingAttributeValue: 'missing-attribute-value',\n    missingWhitespaceBetweenAttributes: 'missing-whitespace-between-attributes',\n    missingWhitespaceAfterDoctypePublicKeyword: 'missing-whitespace-after-doctype-public-keyword',\n    missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:\n        'missing-whitespace-between-doctype-public-and-system-identifiers',\n    missingWhitespaceAfterDoctypeSystemKeyword: 'missing-whitespace-after-doctype-system-keyword',\n    missingQuoteBeforeDoctypePublicIdentifier: 'missing-quote-before-doctype-public-identifier',\n    missingQuoteBeforeDoctypeSystemIdentifier: 'missing-quote-before-doctype-system-identifier',\n    missingDoctypePublicIdentifier: 'missing-doctype-public-identifier',\n    missingDoctypeSystemIdentifier: 'missing-doctype-system-identifier',\n    abruptDoctypePublicIdentifier: 'abrupt-doctype-public-identifier',\n    abruptDoctypeSystemIdentifier: 'abrupt-doctype-system-identifier',\n    cdataInHtmlContent: 'cdata-in-html-content',\n    incorrectlyOpenedComment: 'incorrectly-opened-comment',\n    eofInScriptHtmlCommentLikeText: 'eof-in-script-html-comment-like-text',\n    eofInDoctype: 'eof-in-doctype',\n    nestedComment: 'nested-comment',\n    abruptClosingOfEmptyComment: 'abrupt-closing-of-empty-comment',\n    eofInComment: 'eof-in-comment',\n    incorrectlyClosedComment: 'incorrectly-closed-comment',\n    eofInCdata: 'eof-in-cdata',\n    absenceOfDigitsInNumericCharacterReference: 'absence-of-digits-in-numeric-character-reference',\n    nullCharacterReference: 'null-character-reference',\n    surrogateCharacterReference: 'surrogate-character-reference',\n    characterReferenceOutsideUnicodeRange: 'character-reference-outside-unicode-range',\n    controlCharacterReference: 'control-character-reference',\n    noncharacterCharacterReference: 'noncharacter-character-reference',\n    missingWhitespaceBeforeDoctypeName: 'missing-whitespace-before-doctype-name',\n    missingDoctypeName: 'missing-doctype-name',\n    invalidCharacterSequenceAfterDoctypeName: 'invalid-character-sequence-after-doctype-name',\n    duplicateAttribute: 'duplicate-attribute',\n    nonConformingDoctype: 'non-conforming-doctype',\n    missingDoctype: 'missing-doctype',\n    misplacedDoctype: 'misplaced-doctype',\n    endTagWithoutMatchingOpenElement: 'end-tag-without-matching-open-element',\n    closingOfElementWithOpenChildElements: 'closing-of-element-with-open-child-elements',\n    disallowedContentInNoscriptInHead: 'disallowed-content-in-noscript-in-head',\n    openElementsLeftAfterEof: 'open-elements-left-after-eof',\n    abandonedHeadElementChild: 'abandoned-head-element-child',\n    misplacedStartTagForHeadElement: 'misplaced-start-tag-for-head-element',\n    nestedNoscriptInHead: 'nested-noscript-in-head',\n    eofInElementThatCanContainOnlyText: 'eof-in-element-that-can-contain-only-text'\n};\n", "'use strict';\n\nconst unicode = require('../common/unicode');\nconst ERR = require('../common/error-codes');\n\n//Aliases\nconst $ = unicode.CODE_POINTS;\n\n//Const\nconst DEFAULT_BUFFER_WATERLINE = 1 << 16;\n\n//Preprocessor\n//NOTE: HTML input preprocessing\n//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream)\nclass Preprocessor {\n    constructor() {\n        this.html = null;\n\n        this.pos = -1;\n        this.lastGapPos = -1;\n        this.lastCharPos = -1;\n\n        this.gapStack = [];\n\n        this.skipNextNewLine = false;\n\n        this.lastChunkWritten = false;\n        this.endOfChunkHit = false;\n        this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;\n    }\n\n    _err() {\n        // NOTE: err reporting is noop by default. Enabled by mixin.\n    }\n\n    _addGap() {\n        this.gapStack.push(this.lastGapPos);\n        this.lastGapPos = this.pos;\n    }\n\n    _processSurrogate(cp) {\n        //NOTE: try to peek a surrogate pair\n        if (this.pos !== this.lastCharPos) {\n            const nextCp = this.html.charCodeAt(this.pos + 1);\n\n            if (unicode.isSurrogatePair(nextCp)) {\n                //NOTE: we have a surrogate pair. Peek pair character and recalculate code point.\n                this.pos++;\n\n                //NOTE: add gap that should be avoided during retreat\n                this._addGap();\n\n                return unicode.getSurrogatePairCodePoint(cp, nextCp);\n            }\n        }\n\n        //NOTE: we are at the end of a chunk, therefore we can't infer surrogate pair yet.\n        else if (!this.lastChunkWritten) {\n            this.endOfChunkHit = true;\n            return $.EOF;\n        }\n\n        //NOTE: isolated surrogate\n        this._err(ERR.surrogateInInputStream);\n\n        return cp;\n    }\n\n    dropParsedChunk() {\n        if (this.pos > this.bufferWaterline) {\n            this.lastCharPos -= this.pos;\n            this.html = this.html.substring(this.pos);\n            this.pos = 0;\n            this.lastGapPos = -1;\n            this.gapStack = [];\n        }\n    }\n\n    write(chunk, isLastChunk) {\n        if (this.html) {\n            this.html += chunk;\n        } else {\n            this.html = chunk;\n        }\n\n        this.lastCharPos = this.html.length - 1;\n        this.endOfChunkHit = false;\n        this.lastChunkWritten = isLastChunk;\n    }\n\n    insertHtmlAtCurrentPos(chunk) {\n        this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1, this.html.length);\n\n        this.lastCharPos = this.html.length - 1;\n        this.endOfChunkHit = false;\n    }\n\n    advance() {\n        this.pos++;\n\n        if (this.pos > this.lastCharPos) {\n            this.endOfChunkHit = !this.lastChunkWritten;\n            return $.EOF;\n        }\n\n        let cp = this.html.charCodeAt(this.pos);\n\n        //NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character\n        //must be ignored.\n        if (this.skipNextNewLine && cp === $.LINE_FEED) {\n            this.skipNextNewLine = false;\n            this._addGap();\n            return this.advance();\n        }\n\n        //NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters\n        if (cp === $.CARRIAGE_RETURN) {\n            this.skipNextNewLine = true;\n            return $.LINE_FEED;\n        }\n\n        this.skipNextNewLine = false;\n\n        if (unicode.isSurrogate(cp)) {\n            cp = this._processSurrogate(cp);\n        }\n\n        //OPTIMIZATION: first check if code point is in the common allowed\n        //range (ASCII alphanumeric, whitespaces, big chunk of BMP)\n        //before going into detailed performance cost validation.\n        const isCommonValidRange =\n            (cp > 0x1f && cp < 0x7f) || cp === $.LINE_FEED || cp === $.CARRIAGE_RETURN || (cp > 0x9f && cp < 0xfdd0);\n\n        if (!isCommonValidRange) {\n            this._checkForProblematicCharacters(cp);\n        }\n\n        return cp;\n    }\n\n    _checkForProblematicCharacters(cp) {\n        if (unicode.isControlCodePoint(cp)) {\n            this._err(ERR.controlCharacterInInputStream);\n        } else if (unicode.isUndefinedCodePoint(cp)) {\n            this._err(ERR.noncharacterInInputStream);\n        }\n    }\n\n    retreat() {\n        if (this.pos === this.lastGapPos) {\n            this.lastGapPos = this.gapStack.pop();\n            this.pos--;\n        }\n\n        this.pos--;\n    }\n}\n\nmodule.exports = Preprocessor;\n", "'use strict';\n\n//NOTE: this file contains auto-generated array mapped radix tree that is used for the named entity references consumption\n//(details: https://github.com/inikulin/parse5/tree/master/scripts/generate-named-entity-data/README.md)\nmodule.exports = new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4000,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,10000,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13000,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]);", "'use strict';\n\nconst Preprocessor = require('./preprocessor');\nconst unicode = require('../common/unicode');\nconst neTree = require('./named-entity-data');\nconst ERR = require('../common/error-codes');\n\n//Aliases\nconst $ = unicode.CODE_POINTS;\nconst $$ = unicode.CODE_POINT_SEQUENCES;\n\n//C1 Unicode control character reference replacements\nconst C1_CONTROLS_REFERENCE_REPLACEMENTS = {\n    0x80: 0x20ac,\n    0x82: 0x201a,\n    0x83: 0x0192,\n    0x84: 0x201e,\n    0x85: 0x2026,\n    0x86: 0x2020,\n    0x87: 0x2021,\n    0x88: 0x02c6,\n    0x89: 0x2030,\n    0x8a: 0x0160,\n    0x8b: 0x2039,\n    0x8c: 0x0152,\n    0x8e: 0x017d,\n    0x91: 0x2018,\n    0x92: 0x2019,\n    0x93: 0x201c,\n    0x94: 0x201d,\n    0x95: 0x2022,\n    0x96: 0x2013,\n    0x97: 0x2014,\n    0x98: 0x02dc,\n    0x99: 0x2122,\n    0x9a: 0x0161,\n    0x9b: 0x203a,\n    0x9c: 0x0153,\n    0x9e: 0x017e,\n    0x9f: 0x0178\n};\n\n// Named entity tree flags\nconst HAS_DATA_FLAG = 1 << 0;\nconst DATA_DUPLET_FLAG = 1 << 1;\nconst HAS_BRANCHES_FLAG = 1 << 2;\nconst MAX_BRANCH_MARKER_VALUE = HAS_DATA_FLAG | DATA_DUPLET_FLAG | HAS_BRANCHES_FLAG;\n\n//States\nconst DATA_STATE = 'DATA_STATE';\nconst RCDATA_STATE = 'RCDATA_STATE';\nconst RAWTEXT_STATE = 'RAWTEXT_STATE';\nconst SCRIPT_DATA_STATE = 'SCRIPT_DATA_STATE';\nconst PLAINTEXT_STATE = 'PLAINTEXT_STATE';\nconst TAG_OPEN_STATE = 'TAG_OPEN_STATE';\nconst END_TAG_OPEN_STATE = 'END_TAG_OPEN_STATE';\nconst TAG_NAME_STATE = 'TAG_NAME_STATE';\nconst RCDATA_LESS_THAN_SIGN_STATE = 'RCDATA_LESS_THAN_SIGN_STATE';\nconst RCDATA_END_TAG_OPEN_STATE = 'RCDATA_END_TAG_OPEN_STATE';\nconst RCDATA_END_TAG_NAME_STATE = 'RCDATA_END_TAG_NAME_STATE';\nconst RAWTEXT_LESS_THAN_SIGN_STATE = 'RAWTEXT_LESS_THAN_SIGN_STATE';\nconst RAWTEXT_END_TAG_OPEN_STATE = 'RAWTEXT_END_TAG_OPEN_STATE';\nconst RAWTEXT_END_TAG_NAME_STATE = 'RAWTEXT_END_TAG_NAME_STATE';\nconst SCRIPT_DATA_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_LESS_THAN_SIGN_STATE';\nconst SCRIPT_DATA_END_TAG_OPEN_STATE = 'SCRIPT_DATA_END_TAG_OPEN_STATE';\nconst SCRIPT_DATA_END_TAG_NAME_STATE = 'SCRIPT_DATA_END_TAG_NAME_STATE';\nconst SCRIPT_DATA_ESCAPE_START_STATE = 'SCRIPT_DATA_ESCAPE_START_STATE';\nconst SCRIPT_DATA_ESCAPE_START_DASH_STATE = 'SCRIPT_DATA_ESCAPE_START_DASH_STATE';\nconst SCRIPT_DATA_ESCAPED_STATE = 'SCRIPT_DATA_ESCAPED_STATE';\nconst SCRIPT_DATA_ESCAPED_DASH_STATE = 'SCRIPT_DATA_ESCAPED_DASH_STATE';\nconst SCRIPT_DATA_ESCAPED_DASH_DASH_STATE = 'SCRIPT_DATA_ESCAPED_DASH_DASH_STATE';\nconst SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE';\nconst SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE = 'SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE';\nconst SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE = 'SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPED_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE';\nconst BEFORE_ATTRIBUTE_NAME_STATE = 'BEFORE_ATTRIBUTE_NAME_STATE';\nconst ATTRIBUTE_NAME_STATE = 'ATTRIBUTE_NAME_STATE';\nconst AFTER_ATTRIBUTE_NAME_STATE = 'AFTER_ATTRIBUTE_NAME_STATE';\nconst BEFORE_ATTRIBUTE_VALUE_STATE = 'BEFORE_ATTRIBUTE_VALUE_STATE';\nconst ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE = 'ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE';\nconst ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE = 'ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE';\nconst ATTRIBUTE_VALUE_UNQUOTED_STATE = 'ATTRIBUTE_VALUE_UNQUOTED_STATE';\nconst AFTER_ATTRIBUTE_VALUE_QUOTED_STATE = 'AFTER_ATTRIBUTE_VALUE_QUOTED_STATE';\nconst SELF_CLOSING_START_TAG_STATE = 'SELF_CLOSING_START_TAG_STATE';\nconst BOGUS_COMMENT_STATE = 'BOGUS_COMMENT_STATE';\nconst MARKUP_DECLARATION_OPEN_STATE = 'MARKUP_DECLARATION_OPEN_STATE';\nconst COMMENT_START_STATE = 'COMMENT_START_STATE';\nconst COMMENT_START_DASH_STATE = 'COMMENT_START_DASH_STATE';\nconst COMMENT_STATE = 'COMMENT_STATE';\nconst COMMENT_LESS_THAN_SIGN_STATE = 'COMMENT_LESS_THAN_SIGN_STATE';\nconst COMMENT_LESS_THAN_SIGN_BANG_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_STATE';\nconst COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE';\nconst COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE';\nconst COMMENT_END_DASH_STATE = 'COMMENT_END_DASH_STATE';\nconst COMMENT_END_STATE = 'COMMENT_END_STATE';\nconst COMMENT_END_BANG_STATE = 'COMMENT_END_BANG_STATE';\nconst DOCTYPE_STATE = 'DOCTYPE_STATE';\nconst BEFORE_DOCTYPE_NAME_STATE = 'BEFORE_DOCTYPE_NAME_STATE';\nconst DOCTYPE_NAME_STATE = 'DOCTYPE_NAME_STATE';\nconst AFTER_DOCTYPE_NAME_STATE = 'AFTER_DOCTYPE_NAME_STATE';\nconst AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE = 'AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE';\nconst BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE = 'BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE';\nconst DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE = 'DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE';\nconst DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE = 'DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE';\nconst AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE = 'AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE';\nconst BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE = 'BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE';\nconst AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE = 'AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE';\nconst BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE = 'BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE';\nconst DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE = 'DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE';\nconst DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE = 'DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE';\nconst AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE = 'AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE';\nconst BOGUS_DOCTYPE_STATE = 'BOGUS_DOCTYPE_STATE';\nconst CDATA_SECTION_STATE = 'CDATA_SECTION_STATE';\nconst CDATA_SECTION_BRACKET_STATE = 'CDATA_SECTION_BRACKET_STATE';\nconst CDATA_SECTION_END_STATE = 'CDATA_SECTION_END_STATE';\nconst CHARACTER_REFERENCE_STATE = 'CHARACTER_REFERENCE_STATE';\nconst NAMED_CHARACTER_REFERENCE_STATE = 'NAMED_CHARACTER_REFERENCE_STATE';\nconst AMBIGUOUS_AMPERSAND_STATE = 'AMBIGUOS_AMPERSAND_STATE';\nconst NUMERIC_CHARACTER_REFERENCE_STATE = 'NUMERIC_CHARACTER_REFERENCE_STATE';\nconst HEXADEMICAL_CHARACTER_REFERENCE_START_STATE = 'HEXADEMICAL_CHARACTER_REFERENCE_START_STATE';\nconst DECIMAL_CHARACTER_REFERENCE_START_STATE = 'DECIMAL_CHARACTER_REFERENCE_START_STATE';\nconst HEXADEMICAL_CHARACTER_REFERENCE_STATE = 'HEXADEMICAL_CHARACTER_REFERENCE_STATE';\nconst DECIMAL_CHARACTER_REFERENCE_STATE = 'DECIMAL_CHARACTER_REFERENCE_STATE';\nconst NUMERIC_CHARACTER_REFERENCE_END_STATE = 'NUMERIC_CHARACTER_REFERENCE_END_STATE';\n\n//Utils\n\n//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline\n//this functions if they will be situated in another module due to context switch.\n//Always perform inlining check before modifying this functions ('node --trace-inlining').\nfunction isWhitespace(cp) {\n    return cp === $.SPACE || cp === $.LINE_FEED || cp === $.TABULATION || cp === $.FORM_FEED;\n}\n\nfunction isAsciiDigit(cp) {\n    return cp >= $.DIGIT_0 && cp <= $.DIGIT_9;\n}\n\nfunction isAsciiUpper(cp) {\n    return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_Z;\n}\n\nfunction isAsciiLower(cp) {\n    return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_Z;\n}\n\nfunction isAsciiLetter(cp) {\n    return isAsciiLower(cp) || isAsciiUpper(cp);\n}\n\nfunction isAsciiAlphaNumeric(cp) {\n    return isAsciiLetter(cp) || isAsciiDigit(cp);\n}\n\nfunction isAsciiUpperHexDigit(cp) {\n    return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_F;\n}\n\nfunction isAsciiLowerHexDigit(cp) {\n    return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_F;\n}\n\nfunction isAsciiHexDigit(cp) {\n    return isAsciiDigit(cp) || isAsciiUpperHexDigit(cp) || isAsciiLowerHexDigit(cp);\n}\n\nfunction toAsciiLowerCodePoint(cp) {\n    return cp + 0x0020;\n}\n\n//NOTE: String.fromCharCode() function can handle only characters from BMP subset.\n//So, we need to workaround this manually.\n//(see: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/fromCharCode#Getting_it_to_work_with_higher_values)\nfunction toChar(cp) {\n    if (cp <= 0xffff) {\n        return String.fromCharCode(cp);\n    }\n\n    cp -= 0x10000;\n    return String.fromCharCode(((cp >>> 10) & 0x3ff) | 0xd800) + String.fromCharCode(0xdc00 | (cp & 0x3ff));\n}\n\nfunction toAsciiLowerChar(cp) {\n    return String.fromCharCode(toAsciiLowerCodePoint(cp));\n}\n\nfunction findNamedEntityTreeBranch(nodeIx, cp) {\n    const branchCount = neTree[++nodeIx];\n    let lo = ++nodeIx;\n    let hi = lo + branchCount - 1;\n\n    while (lo <= hi) {\n        const mid = (lo + hi) >>> 1;\n        const midCp = neTree[mid];\n\n        if (midCp < cp) {\n            lo = mid + 1;\n        } else if (midCp > cp) {\n            hi = mid - 1;\n        } else {\n            return neTree[mid + branchCount];\n        }\n    }\n\n    return -1;\n}\n\n//Tokenizer\nclass Tokenizer {\n    constructor() {\n        this.preprocessor = new Preprocessor();\n\n        this.tokenQueue = [];\n\n        this.allowCDATA = false;\n\n        this.state = DATA_STATE;\n        this.returnState = '';\n\n        this.charRefCode = -1;\n        this.tempBuff = [];\n        this.lastStartTagName = '';\n\n        this.consumedAfterSnapshot = -1;\n        this.active = false;\n\n        this.currentCharacterToken = null;\n        this.currentToken = null;\n        this.currentAttr = null;\n    }\n\n    //Errors\n    _err() {\n        // NOTE: err reporting is noop by default. Enabled by mixin.\n    }\n\n    _errOnNextCodePoint(err) {\n        this._consume();\n        this._err(err);\n        this._unconsume();\n    }\n\n    //API\n    getNextToken() {\n        while (!this.tokenQueue.length && this.active) {\n            this.consumedAfterSnapshot = 0;\n\n            const cp = this._consume();\n\n            if (!this._ensureHibernation()) {\n                this[this.state](cp);\n            }\n        }\n\n        return this.tokenQueue.shift();\n    }\n\n    write(chunk, isLastChunk) {\n        this.active = true;\n        this.preprocessor.write(chunk, isLastChunk);\n    }\n\n    insertHtmlAtCurrentPos(chunk) {\n        this.active = true;\n        this.preprocessor.insertHtmlAtCurrentPos(chunk);\n    }\n\n    //Hibernation\n    _ensureHibernation() {\n        if (this.preprocessor.endOfChunkHit) {\n            for (; this.consumedAfterSnapshot > 0; this.consumedAfterSnapshot--) {\n                this.preprocessor.retreat();\n            }\n\n            this.active = false;\n            this.tokenQueue.push({ type: Tokenizer.HIBERNATION_TOKEN });\n\n            return true;\n        }\n\n        return false;\n    }\n\n    //Consumption\n    _consume() {\n        this.consumedAfterSnapshot++;\n        return this.preprocessor.advance();\n    }\n\n    _unconsume() {\n        this.consumedAfterSnapshot--;\n        this.preprocessor.retreat();\n    }\n\n    _reconsumeInState(state) {\n        this.state = state;\n        this._unconsume();\n    }\n\n    _consumeSequenceIfMatch(pattern, startCp, caseSensitive) {\n        let consumedCount = 0;\n        let isMatch = true;\n        const patternLength = pattern.length;\n        let patternPos = 0;\n        let cp = startCp;\n        let patternCp = void 0;\n\n        for (; patternPos < patternLength; patternPos++) {\n            if (patternPos > 0) {\n                cp = this._consume();\n                consumedCount++;\n            }\n\n            if (cp === $.EOF) {\n                isMatch = false;\n                break;\n            }\n\n            patternCp = pattern[patternPos];\n\n            if (cp !== patternCp && (caseSensitive || cp !== toAsciiLowerCodePoint(patternCp))) {\n                isMatch = false;\n                break;\n            }\n        }\n\n        if (!isMatch) {\n            while (consumedCount--) {\n                this._unconsume();\n            }\n        }\n\n        return isMatch;\n    }\n\n    //Temp buffer\n    _isTempBufferEqualToScriptString() {\n        if (this.tempBuff.length !== $$.SCRIPT_STRING.length) {\n            return false;\n        }\n\n        for (let i = 0; i < this.tempBuff.length; i++) {\n            if (this.tempBuff[i] !== $$.SCRIPT_STRING[i]) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    //Token creation\n    _createStartTagToken() {\n        this.currentToken = {\n            type: Tokenizer.START_TAG_TOKEN,\n            tagName: '',\n            selfClosing: false,\n            ackSelfClosing: false,\n            attrs: []\n        };\n    }\n\n    _createEndTagToken() {\n        this.currentToken = {\n            type: Tokenizer.END_TAG_TOKEN,\n            tagName: '',\n            selfClosing: false,\n            attrs: []\n        };\n    }\n\n    _createCommentToken() {\n        this.currentToken = {\n            type: Tokenizer.COMMENT_TOKEN,\n            data: ''\n        };\n    }\n\n    _createDoctypeToken(initialName) {\n        this.currentToken = {\n            type: Tokenizer.DOCTYPE_TOKEN,\n            name: initialName,\n            forceQuirks: false,\n            publicId: null,\n            systemId: null\n        };\n    }\n\n    _createCharacterToken(type, ch) {\n        this.currentCharacterToken = {\n            type: type,\n            chars: ch\n        };\n    }\n\n    _createEOFToken() {\n        this.currentToken = { type: Tokenizer.EOF_TOKEN };\n    }\n\n    //Tag attributes\n    _createAttr(attrNameFirstCh) {\n        this.currentAttr = {\n            name: attrNameFirstCh,\n            value: ''\n        };\n    }\n\n    _leaveAttrName(toState) {\n        if (Tokenizer.getTokenAttr(this.currentToken, this.currentAttr.name) === null) {\n            this.currentToken.attrs.push(this.currentAttr);\n        } else {\n            this._err(ERR.duplicateAttribute);\n        }\n\n        this.state = toState;\n    }\n\n    _leaveAttrValue(toState) {\n        this.state = toState;\n    }\n\n    //Token emission\n    _emitCurrentToken() {\n        this._emitCurrentCharacterToken();\n\n        const ct = this.currentToken;\n\n        this.currentToken = null;\n\n        //NOTE: store emited start tag's tagName to determine is the following end tag token is appropriate.\n        if (ct.type === Tokenizer.START_TAG_TOKEN) {\n            this.lastStartTagName = ct.tagName;\n        } else if (ct.type === Tokenizer.END_TAG_TOKEN) {\n            if (ct.attrs.length > 0) {\n                this._err(ERR.endTagWithAttributes);\n            }\n\n            if (ct.selfClosing) {\n                this._err(ERR.endTagWithTrailingSolidus);\n            }\n        }\n\n        this.tokenQueue.push(ct);\n    }\n\n    _emitCurrentCharacterToken() {\n        if (this.currentCharacterToken) {\n            this.tokenQueue.push(this.currentCharacterToken);\n            this.currentCharacterToken = null;\n        }\n    }\n\n    _emitEOFToken() {\n        this._createEOFToken();\n        this._emitCurrentToken();\n    }\n\n    //Characters emission\n\n    //OPTIMIZATION: specification uses only one type of character tokens (one token per character).\n    //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.\n    //If we have a sequence of characters that belong to the same group, parser can process it\n    //as a single solid character token.\n    //So, there are 3 types of character tokens in parse5:\n    //1)NULL_CHARACTER_TOKEN - \\u0000-character sequences (e.g. '\\u0000\\u0000\\u0000')\n    //2)WHITESPACE_CHARACTER_TOKEN - any whitespace/new-line character sequences (e.g. '\\n  \\r\\t   \\f')\n    //3)CHARACTER_TOKEN - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')\n    _appendCharToCurrentCharacterToken(type, ch) {\n        if (this.currentCharacterToken && this.currentCharacterToken.type !== type) {\n            this._emitCurrentCharacterToken();\n        }\n\n        if (this.currentCharacterToken) {\n            this.currentCharacterToken.chars += ch;\n        } else {\n            this._createCharacterToken(type, ch);\n        }\n    }\n\n    _emitCodePoint(cp) {\n        let type = Tokenizer.CHARACTER_TOKEN;\n\n        if (isWhitespace(cp)) {\n            type = Tokenizer.WHITESPACE_CHARACTER_TOKEN;\n        } else if (cp === $.NULL) {\n            type = Tokenizer.NULL_CHARACTER_TOKEN;\n        }\n\n        this._appendCharToCurrentCharacterToken(type, toChar(cp));\n    }\n\n    _emitSeveralCodePoints(codePoints) {\n        for (let i = 0; i < codePoints.length; i++) {\n            this._emitCodePoint(codePoints[i]);\n        }\n    }\n\n    //NOTE: used then we emit character explicitly. This is always a non-whitespace and a non-null character.\n    //So we can avoid additional checks here.\n    _emitChars(ch) {\n        this._appendCharToCurrentCharacterToken(Tokenizer.CHARACTER_TOKEN, ch);\n    }\n\n    // Character reference helpers\n    _matchNamedCharacterReference(startCp) {\n        let result = null;\n        let excess = 1;\n        let i = findNamedEntityTreeBranch(0, startCp);\n\n        this.tempBuff.push(startCp);\n\n        while (i > -1) {\n            const current = neTree[i];\n            const inNode = current < MAX_BRANCH_MARKER_VALUE;\n            const nodeWithData = inNode && current & HAS_DATA_FLAG;\n\n            if (nodeWithData) {\n                //NOTE: we use greedy search, so we continue lookup at this point\n                result = current & DATA_DUPLET_FLAG ? [neTree[++i], neTree[++i]] : [neTree[++i]];\n                excess = 0;\n            }\n\n            const cp = this._consume();\n\n            this.tempBuff.push(cp);\n            excess++;\n\n            if (cp === $.EOF) {\n                break;\n            }\n\n            if (inNode) {\n                i = current & HAS_BRANCHES_FLAG ? findNamedEntityTreeBranch(i, cp) : -1;\n            } else {\n                i = cp === current ? ++i : -1;\n            }\n        }\n\n        while (excess--) {\n            this.tempBuff.pop();\n            this._unconsume();\n        }\n\n        return result;\n    }\n\n    _isCharacterReferenceInAttribute() {\n        return (\n            this.returnState === ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE ||\n            this.returnState === ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE ||\n            this.returnState === ATTRIBUTE_VALUE_UNQUOTED_STATE\n        );\n    }\n\n    _isCharacterReferenceAttributeQuirk(withSemicolon) {\n        if (!withSemicolon && this._isCharacterReferenceInAttribute()) {\n            const nextCp = this._consume();\n\n            this._unconsume();\n\n            return nextCp === $.EQUALS_SIGN || isAsciiAlphaNumeric(nextCp);\n        }\n\n        return false;\n    }\n\n    _flushCodePointsConsumedAsCharacterReference() {\n        if (this._isCharacterReferenceInAttribute()) {\n            for (let i = 0; i < this.tempBuff.length; i++) {\n                this.currentAttr.value += toChar(this.tempBuff[i]);\n            }\n        } else {\n            this._emitSeveralCodePoints(this.tempBuff);\n        }\n\n        this.tempBuff = [];\n    }\n\n    // State machine\n\n    // Data state\n    //------------------------------------------------------------------\n    [DATA_STATE](cp) {\n        this.preprocessor.dropParsedChunk();\n\n        if (cp === $.LESS_THAN_SIGN) {\n            this.state = TAG_OPEN_STATE;\n        } else if (cp === $.AMPERSAND) {\n            this.returnState = DATA_STATE;\n            this.state = CHARACTER_REFERENCE_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this._emitCodePoint(cp);\n        } else if (cp === $.EOF) {\n            this._emitEOFToken();\n        } else {\n            this._emitCodePoint(cp);\n        }\n    }\n\n    //  RCDATA state\n    //------------------------------------------------------------------\n    [RCDATA_STATE](cp) {\n        this.preprocessor.dropParsedChunk();\n\n        if (cp === $.AMPERSAND) {\n            this.returnState = RCDATA_STATE;\n            this.state = CHARACTER_REFERENCE_STATE;\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.state = RCDATA_LESS_THAN_SIGN_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._emitEOFToken();\n        } else {\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // RAWTEXT state\n    //------------------------------------------------------------------\n    [RAWTEXT_STATE](cp) {\n        this.preprocessor.dropParsedChunk();\n\n        if (cp === $.LESS_THAN_SIGN) {\n            this.state = RAWTEXT_LESS_THAN_SIGN_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._emitEOFToken();\n        } else {\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // Script data state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_STATE](cp) {\n        this.preprocessor.dropParsedChunk();\n\n        if (cp === $.LESS_THAN_SIGN) {\n            this.state = SCRIPT_DATA_LESS_THAN_SIGN_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._emitEOFToken();\n        } else {\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // PLAINTEXT state\n    //------------------------------------------------------------------\n    [PLAINTEXT_STATE](cp) {\n        this.preprocessor.dropParsedChunk();\n\n        if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._emitEOFToken();\n        } else {\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // Tag open state\n    //------------------------------------------------------------------\n    [TAG_OPEN_STATE](cp) {\n        if (cp === $.EXCLAMATION_MARK) {\n            this.state = MARKUP_DECLARATION_OPEN_STATE;\n        } else if (cp === $.SOLIDUS) {\n            this.state = END_TAG_OPEN_STATE;\n        } else if (isAsciiLetter(cp)) {\n            this._createStartTagToken();\n            this._reconsumeInState(TAG_NAME_STATE);\n        } else if (cp === $.QUESTION_MARK) {\n            this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);\n            this._createCommentToken();\n            this._reconsumeInState(BOGUS_COMMENT_STATE);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofBeforeTagName);\n            this._emitChars('<');\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.invalidFirstCharacterOfTagName);\n            this._emitChars('<');\n            this._reconsumeInState(DATA_STATE);\n        }\n    }\n\n    // End tag open state\n    //------------------------------------------------------------------\n    [END_TAG_OPEN_STATE](cp) {\n        if (isAsciiLetter(cp)) {\n            this._createEndTagToken();\n            this._reconsumeInState(TAG_NAME_STATE);\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.missingEndTagName);\n            this.state = DATA_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofBeforeTagName);\n            this._emitChars('</');\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.invalidFirstCharacterOfTagName);\n            this._createCommentToken();\n            this._reconsumeInState(BOGUS_COMMENT_STATE);\n        }\n    }\n\n    // Tag name state\n    //------------------------------------------------------------------\n    [TAG_NAME_STATE](cp) {\n        if (isWhitespace(cp)) {\n            this.state = BEFORE_ATTRIBUTE_NAME_STATE;\n        } else if (cp === $.SOLIDUS) {\n            this.state = SELF_CLOSING_START_TAG_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (isAsciiUpper(cp)) {\n            this.currentToken.tagName += toAsciiLowerChar(cp);\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentToken.tagName += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInTag);\n            this._emitEOFToken();\n        } else {\n            this.currentToken.tagName += toChar(cp);\n        }\n    }\n\n    // RCDATA less-than sign state\n    //------------------------------------------------------------------\n    [RCDATA_LESS_THAN_SIGN_STATE](cp) {\n        if (cp === $.SOLIDUS) {\n            this.tempBuff = [];\n            this.state = RCDATA_END_TAG_OPEN_STATE;\n        } else {\n            this._emitChars('<');\n            this._reconsumeInState(RCDATA_STATE);\n        }\n    }\n\n    // RCDATA end tag open state\n    //------------------------------------------------------------------\n    [RCDATA_END_TAG_OPEN_STATE](cp) {\n        if (isAsciiLetter(cp)) {\n            this._createEndTagToken();\n            this._reconsumeInState(RCDATA_END_TAG_NAME_STATE);\n        } else {\n            this._emitChars('</');\n            this._reconsumeInState(RCDATA_STATE);\n        }\n    }\n\n    // RCDATA end tag name state\n    //------------------------------------------------------------------\n    [RCDATA_END_TAG_NAME_STATE](cp) {\n        if (isAsciiUpper(cp)) {\n            this.currentToken.tagName += toAsciiLowerChar(cp);\n            this.tempBuff.push(cp);\n        } else if (isAsciiLower(cp)) {\n            this.currentToken.tagName += toChar(cp);\n            this.tempBuff.push(cp);\n        } else {\n            if (this.lastStartTagName === this.currentToken.tagName) {\n                if (isWhitespace(cp)) {\n                    this.state = BEFORE_ATTRIBUTE_NAME_STATE;\n                    return;\n                }\n\n                if (cp === $.SOLIDUS) {\n                    this.state = SELF_CLOSING_START_TAG_STATE;\n                    return;\n                }\n\n                if (cp === $.GREATER_THAN_SIGN) {\n                    this.state = DATA_STATE;\n                    this._emitCurrentToken();\n                    return;\n                }\n            }\n\n            this._emitChars('</');\n            this._emitSeveralCodePoints(this.tempBuff);\n            this._reconsumeInState(RCDATA_STATE);\n        }\n    }\n\n    // RAWTEXT less-than sign state\n    //------------------------------------------------------------------\n    [RAWTEXT_LESS_THAN_SIGN_STATE](cp) {\n        if (cp === $.SOLIDUS) {\n            this.tempBuff = [];\n            this.state = RAWTEXT_END_TAG_OPEN_STATE;\n        } else {\n            this._emitChars('<');\n            this._reconsumeInState(RAWTEXT_STATE);\n        }\n    }\n\n    // RAWTEXT end tag open state\n    //------------------------------------------------------------------\n    [RAWTEXT_END_TAG_OPEN_STATE](cp) {\n        if (isAsciiLetter(cp)) {\n            this._createEndTagToken();\n            this._reconsumeInState(RAWTEXT_END_TAG_NAME_STATE);\n        } else {\n            this._emitChars('</');\n            this._reconsumeInState(RAWTEXT_STATE);\n        }\n    }\n\n    // RAWTEXT end tag name state\n    //------------------------------------------------------------------\n    [RAWTEXT_END_TAG_NAME_STATE](cp) {\n        if (isAsciiUpper(cp)) {\n            this.currentToken.tagName += toAsciiLowerChar(cp);\n            this.tempBuff.push(cp);\n        } else if (isAsciiLower(cp)) {\n            this.currentToken.tagName += toChar(cp);\n            this.tempBuff.push(cp);\n        } else {\n            if (this.lastStartTagName === this.currentToken.tagName) {\n                if (isWhitespace(cp)) {\n                    this.state = BEFORE_ATTRIBUTE_NAME_STATE;\n                    return;\n                }\n\n                if (cp === $.SOLIDUS) {\n                    this.state = SELF_CLOSING_START_TAG_STATE;\n                    return;\n                }\n\n                if (cp === $.GREATER_THAN_SIGN) {\n                    this._emitCurrentToken();\n                    this.state = DATA_STATE;\n                    return;\n                }\n            }\n\n            this._emitChars('</');\n            this._emitSeveralCodePoints(this.tempBuff);\n            this._reconsumeInState(RAWTEXT_STATE);\n        }\n    }\n\n    // Script data less-than sign state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_LESS_THAN_SIGN_STATE](cp) {\n        if (cp === $.SOLIDUS) {\n            this.tempBuff = [];\n            this.state = SCRIPT_DATA_END_TAG_OPEN_STATE;\n        } else if (cp === $.EXCLAMATION_MARK) {\n            this.state = SCRIPT_DATA_ESCAPE_START_STATE;\n            this._emitChars('<!');\n        } else {\n            this._emitChars('<');\n            this._reconsumeInState(SCRIPT_DATA_STATE);\n        }\n    }\n\n    // Script data end tag open state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_END_TAG_OPEN_STATE](cp) {\n        if (isAsciiLetter(cp)) {\n            this._createEndTagToken();\n            this._reconsumeInState(SCRIPT_DATA_END_TAG_NAME_STATE);\n        } else {\n            this._emitChars('</');\n            this._reconsumeInState(SCRIPT_DATA_STATE);\n        }\n    }\n\n    // Script data end tag name state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_END_TAG_NAME_STATE](cp) {\n        if (isAsciiUpper(cp)) {\n            this.currentToken.tagName += toAsciiLowerChar(cp);\n            this.tempBuff.push(cp);\n        } else if (isAsciiLower(cp)) {\n            this.currentToken.tagName += toChar(cp);\n            this.tempBuff.push(cp);\n        } else {\n            if (this.lastStartTagName === this.currentToken.tagName) {\n                if (isWhitespace(cp)) {\n                    this.state = BEFORE_ATTRIBUTE_NAME_STATE;\n                    return;\n                } else if (cp === $.SOLIDUS) {\n                    this.state = SELF_CLOSING_START_TAG_STATE;\n                    return;\n                } else if (cp === $.GREATER_THAN_SIGN) {\n                    this._emitCurrentToken();\n                    this.state = DATA_STATE;\n                    return;\n                }\n            }\n\n            this._emitChars('</');\n            this._emitSeveralCodePoints(this.tempBuff);\n            this._reconsumeInState(SCRIPT_DATA_STATE);\n        }\n    }\n\n    // Script data escape start state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_ESCAPE_START_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = SCRIPT_DATA_ESCAPE_START_DASH_STATE;\n            this._emitChars('-');\n        } else {\n            this._reconsumeInState(SCRIPT_DATA_STATE);\n        }\n    }\n\n    // Script data escape start dash state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_ESCAPE_START_DASH_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = SCRIPT_DATA_ESCAPED_DASH_DASH_STATE;\n            this._emitChars('-');\n        } else {\n            this._reconsumeInState(SCRIPT_DATA_STATE);\n        }\n    }\n\n    // Script data escaped state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_ESCAPED_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = SCRIPT_DATA_ESCAPED_DASH_STATE;\n            this._emitChars('-');\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInScriptHtmlCommentLikeText);\n            this._emitEOFToken();\n        } else {\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // Script data escaped dash state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_ESCAPED_DASH_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = SCRIPT_DATA_ESCAPED_DASH_DASH_STATE;\n            this._emitChars('-');\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.state = SCRIPT_DATA_ESCAPED_STATE;\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInScriptHtmlCommentLikeText);\n            this._emitEOFToken();\n        } else {\n            this.state = SCRIPT_DATA_ESCAPED_STATE;\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // Script data escaped dash dash state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_ESCAPED_DASH_DASH_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this._emitChars('-');\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this.state = SCRIPT_DATA_STATE;\n            this._emitChars('>');\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.state = SCRIPT_DATA_ESCAPED_STATE;\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInScriptHtmlCommentLikeText);\n            this._emitEOFToken();\n        } else {\n            this.state = SCRIPT_DATA_ESCAPED_STATE;\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // Script data escaped less-than sign state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE](cp) {\n        if (cp === $.SOLIDUS) {\n            this.tempBuff = [];\n            this.state = SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE;\n        } else if (isAsciiLetter(cp)) {\n            this.tempBuff = [];\n            this._emitChars('<');\n            this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE);\n        } else {\n            this._emitChars('<');\n            this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);\n        }\n    }\n\n    // Script data escaped end tag open state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE](cp) {\n        if (isAsciiLetter(cp)) {\n            this._createEndTagToken();\n            this._reconsumeInState(SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE);\n        } else {\n            this._emitChars('</');\n            this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);\n        }\n    }\n\n    // Script data escaped end tag name state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE](cp) {\n        if (isAsciiUpper(cp)) {\n            this.currentToken.tagName += toAsciiLowerChar(cp);\n            this.tempBuff.push(cp);\n        } else if (isAsciiLower(cp)) {\n            this.currentToken.tagName += toChar(cp);\n            this.tempBuff.push(cp);\n        } else {\n            if (this.lastStartTagName === this.currentToken.tagName) {\n                if (isWhitespace(cp)) {\n                    this.state = BEFORE_ATTRIBUTE_NAME_STATE;\n                    return;\n                }\n\n                if (cp === $.SOLIDUS) {\n                    this.state = SELF_CLOSING_START_TAG_STATE;\n                    return;\n                }\n\n                if (cp === $.GREATER_THAN_SIGN) {\n                    this._emitCurrentToken();\n                    this.state = DATA_STATE;\n                    return;\n                }\n            }\n\n            this._emitChars('</');\n            this._emitSeveralCodePoints(this.tempBuff);\n            this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);\n        }\n    }\n\n    // Script data double escape start state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE](cp) {\n        if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN) {\n            this.state = this._isTempBufferEqualToScriptString()\n                ? SCRIPT_DATA_DOUBLE_ESCAPED_STATE\n                : SCRIPT_DATA_ESCAPED_STATE;\n            this._emitCodePoint(cp);\n        } else if (isAsciiUpper(cp)) {\n            this.tempBuff.push(toAsciiLowerCodePoint(cp));\n            this._emitCodePoint(cp);\n        } else if (isAsciiLower(cp)) {\n            this.tempBuff.push(cp);\n            this._emitCodePoint(cp);\n        } else {\n            this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);\n        }\n    }\n\n    // Script data double escaped state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_DOUBLE_ESCAPED_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE;\n            this._emitChars('-');\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;\n            this._emitChars('<');\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInScriptHtmlCommentLikeText);\n            this._emitEOFToken();\n        } else {\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // Script data double escaped dash state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE;\n            this._emitChars('-');\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;\n            this._emitChars('<');\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInScriptHtmlCommentLikeText);\n            this._emitEOFToken();\n        } else {\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // Script data double escaped dash dash state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this._emitChars('-');\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;\n            this._emitChars('<');\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this.state = SCRIPT_DATA_STATE;\n            this._emitChars('>');\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;\n            this._emitChars(unicode.REPLACEMENT_CHARACTER);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInScriptHtmlCommentLikeText);\n            this._emitEOFToken();\n        } else {\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // Script data double escaped less-than sign state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE](cp) {\n        if (cp === $.SOLIDUS) {\n            this.tempBuff = [];\n            this.state = SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE;\n            this._emitChars('/');\n        } else {\n            this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE);\n        }\n    }\n\n    // Script data double escape end state\n    //------------------------------------------------------------------\n    [SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE](cp) {\n        if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN) {\n            this.state = this._isTempBufferEqualToScriptString()\n                ? SCRIPT_DATA_ESCAPED_STATE\n                : SCRIPT_DATA_DOUBLE_ESCAPED_STATE;\n\n            this._emitCodePoint(cp);\n        } else if (isAsciiUpper(cp)) {\n            this.tempBuff.push(toAsciiLowerCodePoint(cp));\n            this._emitCodePoint(cp);\n        } else if (isAsciiLower(cp)) {\n            this.tempBuff.push(cp);\n            this._emitCodePoint(cp);\n        } else {\n            this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE);\n        }\n    }\n\n    // Before attribute name state\n    //------------------------------------------------------------------\n    [BEFORE_ATTRIBUTE_NAME_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n            this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);\n        } else if (cp === $.EQUALS_SIGN) {\n            this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n            this._createAttr('=');\n            this.state = ATTRIBUTE_NAME_STATE;\n        } else {\n            this._createAttr('');\n            this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n        }\n    }\n\n    // Attribute name state\n    //------------------------------------------------------------------\n    [ATTRIBUTE_NAME_STATE](cp) {\n        if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n            this._leaveAttrName(AFTER_ATTRIBUTE_NAME_STATE);\n            this._unconsume();\n        } else if (cp === $.EQUALS_SIGN) {\n            this._leaveAttrName(BEFORE_ATTRIBUTE_VALUE_STATE);\n        } else if (isAsciiUpper(cp)) {\n            this.currentAttr.name += toAsciiLowerChar(cp);\n        } else if (cp === $.QUOTATION_MARK || cp === $.APOSTROPHE || cp === $.LESS_THAN_SIGN) {\n            this._err(ERR.unexpectedCharacterInAttributeName);\n            this.currentAttr.name += toChar(cp);\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentAttr.name += unicode.REPLACEMENT_CHARACTER;\n        } else {\n            this.currentAttr.name += toChar(cp);\n        }\n    }\n\n    // After attribute name state\n    //------------------------------------------------------------------\n    [AFTER_ATTRIBUTE_NAME_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (cp === $.SOLIDUS) {\n            this.state = SELF_CLOSING_START_TAG_STATE;\n        } else if (cp === $.EQUALS_SIGN) {\n            this.state = BEFORE_ATTRIBUTE_VALUE_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInTag);\n            this._emitEOFToken();\n        } else {\n            this._createAttr('');\n            this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n        }\n    }\n\n    // Before attribute value state\n    //------------------------------------------------------------------\n    [BEFORE_ATTRIBUTE_VALUE_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (cp === $.QUOTATION_MARK) {\n            this.state = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n        } else if (cp === $.APOSTROPHE) {\n            this.state = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.missingAttributeValue);\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else {\n            this._reconsumeInState(ATTRIBUTE_VALUE_UNQUOTED_STATE);\n        }\n    }\n\n    // Attribute value (double-quoted) state\n    //------------------------------------------------------------------\n    [ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](cp) {\n        if (cp === $.QUOTATION_MARK) {\n            this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n        } else if (cp === $.AMPERSAND) {\n            this.returnState = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n            this.state = CHARACTER_REFERENCE_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInTag);\n            this._emitEOFToken();\n        } else {\n            this.currentAttr.value += toChar(cp);\n        }\n    }\n\n    // Attribute value (single-quoted) state\n    //------------------------------------------------------------------\n    [ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](cp) {\n        if (cp === $.APOSTROPHE) {\n            this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n        } else if (cp === $.AMPERSAND) {\n            this.returnState = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n            this.state = CHARACTER_REFERENCE_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInTag);\n            this._emitEOFToken();\n        } else {\n            this.currentAttr.value += toChar(cp);\n        }\n    }\n\n    // Attribute value (unquoted) state\n    //------------------------------------------------------------------\n    [ATTRIBUTE_VALUE_UNQUOTED_STATE](cp) {\n        if (isWhitespace(cp)) {\n            this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n        } else if (cp === $.AMPERSAND) {\n            this.returnState = ATTRIBUTE_VALUE_UNQUOTED_STATE;\n            this.state = CHARACTER_REFERENCE_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._leaveAttrValue(DATA_STATE);\n            this._emitCurrentToken();\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n        } else if (\n            cp === $.QUOTATION_MARK ||\n            cp === $.APOSTROPHE ||\n            cp === $.LESS_THAN_SIGN ||\n            cp === $.EQUALS_SIGN ||\n            cp === $.GRAVE_ACCENT\n        ) {\n            this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n            this.currentAttr.value += toChar(cp);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInTag);\n            this._emitEOFToken();\n        } else {\n            this.currentAttr.value += toChar(cp);\n        }\n    }\n\n    // After attribute value (quoted) state\n    //------------------------------------------------------------------\n    [AFTER_ATTRIBUTE_VALUE_QUOTED_STATE](cp) {\n        if (isWhitespace(cp)) {\n            this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n        } else if (cp === $.SOLIDUS) {\n            this._leaveAttrValue(SELF_CLOSING_START_TAG_STATE);\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._leaveAttrValue(DATA_STATE);\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInTag);\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.missingWhitespaceBetweenAttributes);\n            this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);\n        }\n    }\n\n    // Self-closing start tag state\n    //------------------------------------------------------------------\n    [SELF_CLOSING_START_TAG_STATE](cp) {\n        if (cp === $.GREATER_THAN_SIGN) {\n            this.currentToken.selfClosing = true;\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInTag);\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.unexpectedSolidusInTag);\n            this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);\n        }\n    }\n\n    // Bogus comment state\n    //------------------------------------------------------------------\n    [BOGUS_COMMENT_STATE](cp) {\n        if (cp === $.GREATER_THAN_SIGN) {\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentToken.data += unicode.REPLACEMENT_CHARACTER;\n        } else {\n            this.currentToken.data += toChar(cp);\n        }\n    }\n\n    // Markup declaration open state\n    //------------------------------------------------------------------\n    [MARKUP_DECLARATION_OPEN_STATE](cp) {\n        if (this._consumeSequenceIfMatch($$.DASH_DASH_STRING, cp, true)) {\n            this._createCommentToken();\n            this.state = COMMENT_START_STATE;\n        } else if (this._consumeSequenceIfMatch($$.DOCTYPE_STRING, cp, false)) {\n            this.state = DOCTYPE_STATE;\n        } else if (this._consumeSequenceIfMatch($$.CDATA_START_STRING, cp, true)) {\n            if (this.allowCDATA) {\n                this.state = CDATA_SECTION_STATE;\n            } else {\n                this._err(ERR.cdataInHtmlContent);\n                this._createCommentToken();\n                this.currentToken.data = '[CDATA[';\n                this.state = BOGUS_COMMENT_STATE;\n            }\n        }\n\n        //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup\n        //results are no longer valid and we will need to start over.\n        else if (!this._ensureHibernation()) {\n            this._err(ERR.incorrectlyOpenedComment);\n            this._createCommentToken();\n            this._reconsumeInState(BOGUS_COMMENT_STATE);\n        }\n    }\n\n    // Comment start state\n    //------------------------------------------------------------------\n    [COMMENT_START_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = COMMENT_START_DASH_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.abruptClosingOfEmptyComment);\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else {\n            this._reconsumeInState(COMMENT_STATE);\n        }\n    }\n\n    // Comment start dash state\n    //------------------------------------------------------------------\n    [COMMENT_START_DASH_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = COMMENT_END_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.abruptClosingOfEmptyComment);\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInComment);\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.data += '-';\n            this._reconsumeInState(COMMENT_STATE);\n        }\n    }\n\n    // Comment state\n    //------------------------------------------------------------------\n    [COMMENT_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = COMMENT_END_DASH_STATE;\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.currentToken.data += '<';\n            this.state = COMMENT_LESS_THAN_SIGN_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentToken.data += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInComment);\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.data += toChar(cp);\n        }\n    }\n\n    // Comment less-than sign state\n    //------------------------------------------------------------------\n    [COMMENT_LESS_THAN_SIGN_STATE](cp) {\n        if (cp === $.EXCLAMATION_MARK) {\n            this.currentToken.data += '!';\n            this.state = COMMENT_LESS_THAN_SIGN_BANG_STATE;\n        } else if (cp === $.LESS_THAN_SIGN) {\n            this.currentToken.data += '!';\n        } else {\n            this._reconsumeInState(COMMENT_STATE);\n        }\n    }\n\n    // Comment less-than sign bang state\n    //------------------------------------------------------------------\n    [COMMENT_LESS_THAN_SIGN_BANG_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE;\n        } else {\n            this._reconsumeInState(COMMENT_STATE);\n        }\n    }\n\n    // Comment less-than sign bang dash state\n    //------------------------------------------------------------------\n    [COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE;\n        } else {\n            this._reconsumeInState(COMMENT_END_DASH_STATE);\n        }\n    }\n\n    // Comment less-than sign bang dash dash state\n    //------------------------------------------------------------------\n    [COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE](cp) {\n        if (cp !== $.GREATER_THAN_SIGN && cp !== $.EOF) {\n            this._err(ERR.nestedComment);\n        }\n\n        this._reconsumeInState(COMMENT_END_STATE);\n    }\n\n    // Comment end dash state\n    //------------------------------------------------------------------\n    [COMMENT_END_DASH_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.state = COMMENT_END_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInComment);\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.data += '-';\n            this._reconsumeInState(COMMENT_STATE);\n        }\n    }\n\n    // Comment end state\n    //------------------------------------------------------------------\n    [COMMENT_END_STATE](cp) {\n        if (cp === $.GREATER_THAN_SIGN) {\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EXCLAMATION_MARK) {\n            this.state = COMMENT_END_BANG_STATE;\n        } else if (cp === $.HYPHEN_MINUS) {\n            this.currentToken.data += '-';\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInComment);\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.data += '--';\n            this._reconsumeInState(COMMENT_STATE);\n        }\n    }\n\n    // Comment end bang state\n    //------------------------------------------------------------------\n    [COMMENT_END_BANG_STATE](cp) {\n        if (cp === $.HYPHEN_MINUS) {\n            this.currentToken.data += '--!';\n            this.state = COMMENT_END_DASH_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.incorrectlyClosedComment);\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInComment);\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.data += '--!';\n            this._reconsumeInState(COMMENT_STATE);\n        }\n    }\n\n    // DOCTYPE state\n    //------------------------------------------------------------------\n    [DOCTYPE_STATE](cp) {\n        if (isWhitespace(cp)) {\n            this.state = BEFORE_DOCTYPE_NAME_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE);\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this._createDoctypeToken(null);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.missingWhitespaceBeforeDoctypeName);\n            this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE);\n        }\n    }\n\n    // Before DOCTYPE name state\n    //------------------------------------------------------------------\n    [BEFORE_DOCTYPE_NAME_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (isAsciiUpper(cp)) {\n            this._createDoctypeToken(toAsciiLowerChar(cp));\n            this.state = DOCTYPE_NAME_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this._createDoctypeToken(unicode.REPLACEMENT_CHARACTER);\n            this.state = DOCTYPE_NAME_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.missingDoctypeName);\n            this._createDoctypeToken(null);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this.state = DATA_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this._createDoctypeToken(null);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._createDoctypeToken(toChar(cp));\n            this.state = DOCTYPE_NAME_STATE;\n        }\n    }\n\n    // DOCTYPE name state\n    //------------------------------------------------------------------\n    [DOCTYPE_NAME_STATE](cp) {\n        if (isWhitespace(cp)) {\n            this.state = AFTER_DOCTYPE_NAME_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (isAsciiUpper(cp)) {\n            this.currentToken.name += toAsciiLowerChar(cp);\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentToken.name += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.name += toChar(cp);\n        }\n    }\n\n    // After DOCTYPE name state\n    //------------------------------------------------------------------\n    [AFTER_DOCTYPE_NAME_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (cp === $.GREATER_THAN_SIGN) {\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else if (this._consumeSequenceIfMatch($$.PUBLIC_STRING, cp, false)) {\n            this.state = AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE;\n        } else if (this._consumeSequenceIfMatch($$.SYSTEM_STRING, cp, false)) {\n            this.state = AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE;\n        }\n        //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup\n        //results are no longer valid and we will need to start over.\n        else if (!this._ensureHibernation()) {\n            this._err(ERR.invalidCharacterSequenceAfterDoctypeName);\n            this.currentToken.forceQuirks = true;\n            this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n        }\n    }\n\n    // After DOCTYPE public keyword state\n    //------------------------------------------------------------------\n    [AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE](cp) {\n        if (isWhitespace(cp)) {\n            this.state = BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n        } else if (cp === $.QUOTATION_MARK) {\n            this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n            this.currentToken.publicId = '';\n            this.state = DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE;\n        } else if (cp === $.APOSTROPHE) {\n            this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n            this.currentToken.publicId = '';\n            this.state = DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.missingDoctypePublicIdentifier);\n            this.currentToken.forceQuirks = true;\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n        }\n    }\n\n    // Before DOCTYPE public identifier state\n    //------------------------------------------------------------------\n    [BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (cp === $.QUOTATION_MARK) {\n            this.currentToken.publicId = '';\n            this.state = DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE;\n        } else if (cp === $.APOSTROPHE) {\n            this.currentToken.publicId = '';\n            this.state = DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.missingDoctypePublicIdentifier);\n            this.currentToken.forceQuirks = true;\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n        }\n    }\n\n    // DOCTYPE public identifier (double-quoted) state\n    //------------------------------------------------------------------\n    [DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE](cp) {\n        if (cp === $.QUOTATION_MARK) {\n            this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.abruptDoctypePublicIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this.state = DATA_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.publicId += toChar(cp);\n        }\n    }\n\n    // DOCTYPE public identifier (single-quoted) state\n    //------------------------------------------------------------------\n    [DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n        if (cp === $.APOSTROPHE) {\n            this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.abruptDoctypePublicIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this.state = DATA_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.publicId += toChar(cp);\n        }\n    }\n\n    // After DOCTYPE public identifier state\n    //------------------------------------------------------------------\n    [AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE](cp) {\n        if (isWhitespace(cp)) {\n            this.state = BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.QUOTATION_MARK) {\n            this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n            this.currentToken.systemId = '';\n            this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;\n        } else if (cp === $.APOSTROPHE) {\n            this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n            this.currentToken.systemId = '';\n            this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n        }\n    }\n\n    // Between DOCTYPE public and system identifiers state\n    //------------------------------------------------------------------\n    [BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (cp === $.GREATER_THAN_SIGN) {\n            this._emitCurrentToken();\n            this.state = DATA_STATE;\n        } else if (cp === $.QUOTATION_MARK) {\n            this.currentToken.systemId = '';\n            this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;\n        } else if (cp === $.APOSTROPHE) {\n            this.currentToken.systemId = '';\n            this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n        }\n    }\n\n    // After DOCTYPE system keyword state\n    //------------------------------------------------------------------\n    [AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE](cp) {\n        if (isWhitespace(cp)) {\n            this.state = BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE;\n        } else if (cp === $.QUOTATION_MARK) {\n            this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n            this.currentToken.systemId = '';\n            this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;\n        } else if (cp === $.APOSTROPHE) {\n            this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n            this.currentToken.systemId = '';\n            this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.missingDoctypeSystemIdentifier);\n            this.currentToken.forceQuirks = true;\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n        }\n    }\n\n    // Before DOCTYPE system identifier state\n    //------------------------------------------------------------------\n    [BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (cp === $.QUOTATION_MARK) {\n            this.currentToken.systemId = '';\n            this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;\n        } else if (cp === $.APOSTROPHE) {\n            this.currentToken.systemId = '';\n            this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.missingDoctypeSystemIdentifier);\n            this.currentToken.forceQuirks = true;\n            this.state = DATA_STATE;\n            this._emitCurrentToken();\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n        }\n    }\n\n    // DOCTYPE system identifier (double-quoted) state\n    //------------------------------------------------------------------\n    [DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE](cp) {\n        if (cp === $.QUOTATION_MARK) {\n            this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentToken.systemId += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.abruptDoctypeSystemIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this.state = DATA_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.systemId += toChar(cp);\n        }\n    }\n\n    // DOCTYPE system identifier (single-quoted) state\n    //------------------------------------------------------------------\n    [DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n        if (cp === $.APOSTROPHE) {\n            this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n            this.currentToken.systemId += unicode.REPLACEMENT_CHARACTER;\n        } else if (cp === $.GREATER_THAN_SIGN) {\n            this._err(ERR.abruptDoctypeSystemIdentifier);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this.state = DATA_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this.currentToken.systemId += toChar(cp);\n        }\n    }\n\n    // After DOCTYPE system identifier state\n    //------------------------------------------------------------------\n    [AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE](cp) {\n        if (isWhitespace(cp)) {\n            return;\n        }\n\n        if (cp === $.GREATER_THAN_SIGN) {\n            this._emitCurrentToken();\n            this.state = DATA_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInDoctype);\n            this.currentToken.forceQuirks = true;\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        } else {\n            this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);\n            this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n        }\n    }\n\n    // Bogus DOCTYPE state\n    //------------------------------------------------------------------\n    [BOGUS_DOCTYPE_STATE](cp) {\n        if (cp === $.GREATER_THAN_SIGN) {\n            this._emitCurrentToken();\n            this.state = DATA_STATE;\n        } else if (cp === $.NULL) {\n            this._err(ERR.unexpectedNullCharacter);\n        } else if (cp === $.EOF) {\n            this._emitCurrentToken();\n            this._emitEOFToken();\n        }\n    }\n\n    // CDATA section state\n    //------------------------------------------------------------------\n    [CDATA_SECTION_STATE](cp) {\n        if (cp === $.RIGHT_SQUARE_BRACKET) {\n            this.state = CDATA_SECTION_BRACKET_STATE;\n        } else if (cp === $.EOF) {\n            this._err(ERR.eofInCdata);\n            this._emitEOFToken();\n        } else {\n            this._emitCodePoint(cp);\n        }\n    }\n\n    // CDATA section bracket state\n    //------------------------------------------------------------------\n    [CDATA_SECTION_BRACKET_STATE](cp) {\n        if (cp === $.RIGHT_SQUARE_BRACKET) {\n            this.state = CDATA_SECTION_END_STATE;\n        } else {\n            this._emitChars(']');\n            this._reconsumeInState(CDATA_SECTION_STATE);\n        }\n    }\n\n    // CDATA section end state\n    //------------------------------------------------------------------\n    [CDATA_SECTION_END_STATE](cp) {\n        if (cp === $.GREATER_THAN_SIGN) {\n            this.state = DATA_STATE;\n        } else if (cp === $.RIGHT_SQUARE_BRACKET) {\n            this._emitChars(']');\n        } else {\n            this._emitChars(']]');\n            this._reconsumeInState(CDATA_SECTION_STATE);\n        }\n    }\n\n    // Character reference state\n    //------------------------------------------------------------------\n    [CHARACTER_REFERENCE_STATE](cp) {\n        this.tempBuff = [$.AMPERSAND];\n\n        if (cp === $.NUMBER_SIGN) {\n            this.tempBuff.push(cp);\n            this.state = NUMERIC_CHARACTER_REFERENCE_STATE;\n        } else if (isAsciiAlphaNumeric(cp)) {\n            this._reconsumeInState(NAMED_CHARACTER_REFERENCE_STATE);\n        } else {\n            this._flushCodePointsConsumedAsCharacterReference();\n            this._reconsumeInState(this.returnState);\n        }\n    }\n\n    // Named character reference state\n    //------------------------------------------------------------------\n    [NAMED_CHARACTER_REFERENCE_STATE](cp) {\n        const matchResult = this._matchNamedCharacterReference(cp);\n\n        //NOTE: matching can be abrupted by hibernation. In that case match\n        //results are no longer valid and we will need to start over.\n        if (this._ensureHibernation()) {\n            this.tempBuff = [$.AMPERSAND];\n        } else if (matchResult) {\n            const withSemicolon = this.tempBuff[this.tempBuff.length - 1] === $.SEMICOLON;\n\n            if (!this._isCharacterReferenceAttributeQuirk(withSemicolon)) {\n                if (!withSemicolon) {\n                    this._errOnNextCodePoint(ERR.missingSemicolonAfterCharacterReference);\n                }\n\n                this.tempBuff = matchResult;\n            }\n\n            this._flushCodePointsConsumedAsCharacterReference();\n            this.state = this.returnState;\n        } else {\n            this._flushCodePointsConsumedAsCharacterReference();\n            this.state = AMBIGUOUS_AMPERSAND_STATE;\n        }\n    }\n\n    // Ambiguos ampersand state\n    //------------------------------------------------------------------\n    [AMBIGUOUS_AMPERSAND_STATE](cp) {\n        if (isAsciiAlphaNumeric(cp)) {\n            if (this._isCharacterReferenceInAttribute()) {\n                this.currentAttr.value += toChar(cp);\n            } else {\n                this._emitCodePoint(cp);\n            }\n        } else {\n            if (cp === $.SEMICOLON) {\n                this._err(ERR.unknownNamedCharacterReference);\n            }\n\n            this._reconsumeInState(this.returnState);\n        }\n    }\n\n    // Numeric character reference state\n    //------------------------------------------------------------------\n    [NUMERIC_CHARACTER_REFERENCE_STATE](cp) {\n        this.charRefCode = 0;\n\n        if (cp === $.LATIN_SMALL_X || cp === $.LATIN_CAPITAL_X) {\n            this.tempBuff.push(cp);\n            this.state = HEXADEMICAL_CHARACTER_REFERENCE_START_STATE;\n        } else {\n            this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_START_STATE);\n        }\n    }\n\n    // Hexademical character reference start state\n    //------------------------------------------------------------------\n    [HEXADEMICAL_CHARACTER_REFERENCE_START_STATE](cp) {\n        if (isAsciiHexDigit(cp)) {\n            this._reconsumeInState(HEXADEMICAL_CHARACTER_REFERENCE_STATE);\n        } else {\n            this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n            this._flushCodePointsConsumedAsCharacterReference();\n            this._reconsumeInState(this.returnState);\n        }\n    }\n\n    // Decimal character reference start state\n    //------------------------------------------------------------------\n    [DECIMAL_CHARACTER_REFERENCE_START_STATE](cp) {\n        if (isAsciiDigit(cp)) {\n            this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_STATE);\n        } else {\n            this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n            this._flushCodePointsConsumedAsCharacterReference();\n            this._reconsumeInState(this.returnState);\n        }\n    }\n\n    // Hexademical character reference state\n    //------------------------------------------------------------------\n    [HEXADEMICAL_CHARACTER_REFERENCE_STATE](cp) {\n        if (isAsciiUpperHexDigit(cp)) {\n            this.charRefCode = this.charRefCode * 16 + cp - 0x37;\n        } else if (isAsciiLowerHexDigit(cp)) {\n            this.charRefCode = this.charRefCode * 16 + cp - 0x57;\n        } else if (isAsciiDigit(cp)) {\n            this.charRefCode = this.charRefCode * 16 + cp - 0x30;\n        } else if (cp === $.SEMICOLON) {\n            this.state = NUMERIC_CHARACTER_REFERENCE_END_STATE;\n        } else {\n            this._err(ERR.missingSemicolonAfterCharacterReference);\n            this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE);\n        }\n    }\n\n    // Decimal character reference state\n    //------------------------------------------------------------------\n    [DECIMAL_CHARACTER_REFERENCE_STATE](cp) {\n        if (isAsciiDigit(cp)) {\n            this.charRefCode = this.charRefCode * 10 + cp - 0x30;\n        } else if (cp === $.SEMICOLON) {\n            this.state = NUMERIC_CHARACTER_REFERENCE_END_STATE;\n        } else {\n            this._err(ERR.missingSemicolonAfterCharacterReference);\n            this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE);\n        }\n    }\n\n    // Numeric character reference end state\n    //------------------------------------------------------------------\n    [NUMERIC_CHARACTER_REFERENCE_END_STATE]() {\n        if (this.charRefCode === $.NULL) {\n            this._err(ERR.nullCharacterReference);\n            this.charRefCode = $.REPLACEMENT_CHARACTER;\n        } else if (this.charRefCode > 0x10ffff) {\n            this._err(ERR.characterReferenceOutsideUnicodeRange);\n            this.charRefCode = $.REPLACEMENT_CHARACTER;\n        } else if (unicode.isSurrogate(this.charRefCode)) {\n            this._err(ERR.surrogateCharacterReference);\n            this.charRefCode = $.REPLACEMENT_CHARACTER;\n        } else if (unicode.isUndefinedCodePoint(this.charRefCode)) {\n            this._err(ERR.noncharacterCharacterReference);\n        } else if (unicode.isControlCodePoint(this.charRefCode) || this.charRefCode === $.CARRIAGE_RETURN) {\n            this._err(ERR.controlCharacterReference);\n\n            const replacement = C1_CONTROLS_REFERENCE_REPLACEMENTS[this.charRefCode];\n\n            if (replacement) {\n                this.charRefCode = replacement;\n            }\n        }\n\n        this.tempBuff = [this.charRefCode];\n\n        this._flushCodePointsConsumedAsCharacterReference();\n        this._reconsumeInState(this.returnState);\n    }\n}\n\n//Token types\nTokenizer.CHARACTER_TOKEN = 'CHARACTER_TOKEN';\nTokenizer.NULL_CHARACTER_TOKEN = 'NULL_CHARACTER_TOKEN';\nTokenizer.WHITESPACE_CHARACTER_TOKEN = 'WHITESPACE_CHARACTER_TOKEN';\nTokenizer.START_TAG_TOKEN = 'START_TAG_TOKEN';\nTokenizer.END_TAG_TOKEN = 'END_TAG_TOKEN';\nTokenizer.COMMENT_TOKEN = 'COMMENT_TOKEN';\nTokenizer.DOCTYPE_TOKEN = 'DOCTYPE_TOKEN';\nTokenizer.EOF_TOKEN = 'EOF_TOKEN';\nTokenizer.HIBERNATION_TOKEN = 'HIBERNATION_TOKEN';\n\n//Tokenizer initial states for different modes\nTokenizer.MODE = {\n    DATA: DATA_STATE,\n    RCDATA: RCDATA_STATE,\n    RAWTEXT: RAWTEXT_STATE,\n    SCRIPT_DATA: SCRIPT_DATA_STATE,\n    PLAINTEXT: PLAINTEXT_STATE\n};\n\n//Static\nTokenizer.getTokenAttr = function(token, attrName) {\n    for (let i = token.attrs.length - 1; i >= 0; i--) {\n        if (token.attrs[i].name === attrName) {\n            return token.attrs[i].value;\n        }\n    }\n\n    return null;\n};\n\nmodule.exports = Tokenizer;\n", "'use strict';\n\nconst NS = (exports.NAMESPACES = {\n    HTML: 'http://www.w3.org/1999/xhtml',\n    MATHML: 'http://www.w3.org/1998/Math/MathML',\n    SVG: 'http://www.w3.org/2000/svg',\n    XLINK: 'http://www.w3.org/1999/xlink',\n    XML: 'http://www.w3.org/XML/1998/namespace',\n    XMLNS: 'http://www.w3.org/2000/xmlns/'\n});\n\nexports.ATTRS = {\n    TYPE: 'type',\n    ACTION: 'action',\n    ENCODING: 'encoding',\n    PROMPT: 'prompt',\n    NAME: 'name',\n    COLOR: 'color',\n    FACE: 'face',\n    SIZE: 'size'\n};\n\nexports.DOCUMENT_MODE = {\n    NO_QUIRKS: 'no-quirks',\n    QUIRKS: 'quirks',\n    LIMITED_QUIRKS: 'limited-quirks'\n};\n\nconst $ = (exports.TAG_NAMES = {\n    A: 'a',\n    ADDRESS: 'address',\n    ANNOTATION_XML: 'annotation-xml',\n    APPLET: 'applet',\n    AREA: 'area',\n    ARTICLE: 'article',\n    ASIDE: 'aside',\n\n    B: 'b',\n    BASE: 'base',\n    BASEFONT: 'basefont',\n    BGSOUND: 'bgsound',\n    BIG: 'big',\n    BLOCKQUOTE: 'blockquote',\n    BODY: 'body',\n    BR: 'br',\n    BUTTON: 'button',\n\n    CAPTION: 'caption',\n    CENTER: 'center',\n    CODE: 'code',\n    COL: 'col',\n    COLGROUP: 'colgroup',\n\n    DD: 'dd',\n    DESC: 'desc',\n    DETAILS: 'details',\n    DIALOG: 'dialog',\n    DIR: 'dir',\n    DIV: 'div',\n    DL: 'dl',\n    DT: 'dt',\n\n    EM: 'em',\n    EMBED: 'embed',\n\n    FIELDSET: 'fieldset',\n    FIGCAPTION: 'figcaption',\n    FIGURE: 'figure',\n    FONT: 'font',\n    FOOTER: 'footer',\n    FOREIGN_OBJECT: 'foreignObject',\n    FORM: 'form',\n    FRAME: 'frame',\n    FRAMESET: 'frameset',\n\n    H1: 'h1',\n    H2: 'h2',\n    H3: 'h3',\n    H4: 'h4',\n    H5: 'h5',\n    H6: 'h6',\n    HEAD: 'head',\n    HEADER: 'header',\n    HGROUP: 'hgroup',\n    HR: 'hr',\n    HTML: 'html',\n\n    I: 'i',\n    IMG: 'img',\n    IMAGE: 'image',\n    INPUT: 'input',\n    IFRAME: 'iframe',\n\n    KEYGEN: 'keygen',\n\n    LABEL: 'label',\n    LI: 'li',\n    LINK: 'link',\n    LISTING: 'listing',\n\n    MAIN: 'main',\n    MALIGNMARK: 'malignmark',\n    MARQUEE: 'marquee',\n    MATH: 'math',\n    MENU: 'menu',\n    META: 'meta',\n    MGLYPH: 'mglyph',\n    MI: 'mi',\n    MO: 'mo',\n    MN: 'mn',\n    MS: 'ms',\n    MTEXT: 'mtext',\n\n    NAV: 'nav',\n    NOBR: 'nobr',\n    NOFRAMES: 'noframes',\n    NOEMBED: 'noembed',\n    NOSCRIPT: 'noscript',\n\n    OBJECT: 'object',\n    OL: 'ol',\n    OPTGROUP: 'optgroup',\n    OPTION: 'option',\n\n    P: 'p',\n    PARAM: 'param',\n    PLAINTEXT: 'plaintext',\n    PRE: 'pre',\n\n    RB: 'rb',\n    RP: 'rp',\n    RT: 'rt',\n    RTC: 'rtc',\n    RUBY: 'ruby',\n\n    S: 's',\n    SCRIPT: 'script',\n    SECTION: 'section',\n    SELECT: 'select',\n    SOURCE: 'source',\n    SMALL: 'small',\n    SPAN: 'span',\n    STRIKE: 'strike',\n    STRONG: 'strong',\n    STYLE: 'style',\n    SUB: 'sub',\n    SUMMARY: 'summary',\n    SUP: 'sup',\n\n    TABLE: 'table',\n    TBODY: 'tbody',\n    TEMPLATE: 'template',\n    TEXTAREA: 'textarea',\n    TFOOT: 'tfoot',\n    TD: 'td',\n    TH: 'th',\n    THEAD: 'thead',\n    TITLE: 'title',\n    TR: 'tr',\n    TRACK: 'track',\n    TT: 'tt',\n\n    U: 'u',\n    UL: 'ul',\n\n    SVG: 'svg',\n\n    VAR: 'var',\n\n    WBR: 'wbr',\n\n    XMP: 'xmp'\n});\n\nexports.SPECIAL_ELEMENTS = {\n    [NS.HTML]: {\n        [$.ADDRESS]: true,\n        [$.APPLET]: true,\n        [$.AREA]: true,\n        [$.ARTICLE]: true,\n        [$.ASIDE]: true,\n        [$.BASE]: true,\n        [$.BASEFONT]: true,\n        [$.BGSOUND]: true,\n        [$.BLOCKQUOTE]: true,\n        [$.BODY]: true,\n        [$.BR]: true,\n        [$.BUTTON]: true,\n        [$.CAPTION]: true,\n        [$.CENTER]: true,\n        [$.COL]: true,\n        [$.COLGROUP]: true,\n        [$.DD]: true,\n        [$.DETAILS]: true,\n        [$.DIR]: true,\n        [$.DIV]: true,\n        [$.DL]: true,\n        [$.DT]: true,\n        [$.EMBED]: true,\n        [$.FIELDSET]: true,\n        [$.FIGCAPTION]: true,\n        [$.FIGURE]: true,\n        [$.FOOTER]: true,\n        [$.FORM]: true,\n        [$.FRAME]: true,\n        [$.FRAMESET]: true,\n        [$.H1]: true,\n        [$.H2]: true,\n        [$.H3]: true,\n        [$.H4]: true,\n        [$.H5]: true,\n        [$.H6]: true,\n        [$.HEAD]: true,\n        [$.HEADER]: true,\n        [$.HGROUP]: true,\n        [$.HR]: true,\n        [$.HTML]: true,\n        [$.IFRAME]: true,\n        [$.IMG]: true,\n        [$.INPUT]: true,\n        [$.LI]: true,\n        [$.LINK]: true,\n        [$.LISTING]: true,\n        [$.MAIN]: true,\n        [$.MARQUEE]: true,\n        [$.MENU]: true,\n        [$.META]: true,\n        [$.NAV]: true,\n        [$.NOEMBED]: true,\n        [$.NOFRAMES]: true,\n        [$.NOSCRIPT]: true,\n        [$.OBJECT]: true,\n        [$.OL]: true,\n        [$.P]: true,\n        [$.PARAM]: true,\n        [$.PLAINTEXT]: true,\n        [$.PRE]: true,\n        [$.SCRIPT]: true,\n        [$.SECTION]: true,\n        [$.SELECT]: true,\n        [$.SOURCE]: true,\n        [$.STYLE]: true,\n        [$.SUMMARY]: true,\n        [$.TABLE]: true,\n        [$.TBODY]: true,\n        [$.TD]: true,\n        [$.TEMPLATE]: true,\n        [$.TEXTAREA]: true,\n        [$.TFOOT]: true,\n        [$.TH]: true,\n        [$.THEAD]: true,\n        [$.TITLE]: true,\n        [$.TR]: true,\n        [$.TRACK]: true,\n        [$.UL]: true,\n        [$.WBR]: true,\n        [$.XMP]: true\n    },\n    [NS.MATHML]: {\n        [$.MI]: true,\n        [$.MO]: true,\n        [$.MN]: true,\n        [$.MS]: true,\n        [$.MTEXT]: true,\n        [$.ANNOTATION_XML]: true\n    },\n    [NS.SVG]: {\n        [$.TITLE]: true,\n        [$.FOREIGN_OBJECT]: true,\n        [$.DESC]: true\n    }\n};\n", "'use strict';\n\nconst HTML = require('../common/html');\n\n//Aliases\nconst $ = HTML.TAG_NAMES;\nconst NS = HTML.NAMESPACES;\n\n//Element utils\n\n//OPTIMIZATION: Integer comparisons are low-cost, so we can use very fast tag name length filters here.\n//It's faster than using dictionary.\nfunction isImpliedEndTagRequired(tn) {\n    switch (tn.length) {\n        case 1:\n            return tn === $.P;\n\n        case 2:\n            return tn === $.RB || tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;\n\n        case 3:\n            return tn === $.RTC;\n\n        case 6:\n            return tn === $.OPTION;\n\n        case 8:\n            return tn === $.OPTGROUP;\n    }\n\n    return false;\n}\n\nfunction isImpliedEndTagRequiredThoroughly(tn) {\n    switch (tn.length) {\n        case 1:\n            return tn === $.P;\n\n        case 2:\n            return (\n                tn === $.RB ||\n                tn === $.RP ||\n                tn === $.RT ||\n                tn === $.DD ||\n                tn === $.DT ||\n                tn === $.LI ||\n                tn === $.TD ||\n                tn === $.TH ||\n                tn === $.TR\n            );\n\n        case 3:\n            return tn === $.RTC;\n\n        case 5:\n            return tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD;\n\n        case 6:\n            return tn === $.OPTION;\n\n        case 7:\n            return tn === $.CAPTION;\n\n        case 8:\n            return tn === $.OPTGROUP || tn === $.COLGROUP;\n    }\n\n    return false;\n}\n\nfunction isScopingElement(tn, ns) {\n    switch (tn.length) {\n        case 2:\n            if (tn === $.TD || tn === $.TH) {\n                return ns === NS.HTML;\n            } else if (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS) {\n                return ns === NS.MATHML;\n            }\n\n            break;\n\n        case 4:\n            if (tn === $.HTML) {\n                return ns === NS.HTML;\n            } else if (tn === $.DESC) {\n                return ns === NS.SVG;\n            }\n\n            break;\n\n        case 5:\n            if (tn === $.TABLE) {\n                return ns === NS.HTML;\n            } else if (tn === $.MTEXT) {\n                return ns === NS.MATHML;\n            } else if (tn === $.TITLE) {\n                return ns === NS.SVG;\n            }\n\n            break;\n\n        case 6:\n            return (tn === $.APPLET || tn === $.OBJECT) && ns === NS.HTML;\n\n        case 7:\n            return (tn === $.CAPTION || tn === $.MARQUEE) && ns === NS.HTML;\n\n        case 8:\n            return tn === $.TEMPLATE && ns === NS.HTML;\n\n        case 13:\n            return tn === $.FOREIGN_OBJECT && ns === NS.SVG;\n\n        case 14:\n            return tn === $.ANNOTATION_XML && ns === NS.MATHML;\n    }\n\n    return false;\n}\n\n//Stack of open elements\nclass OpenElementStack {\n    constructor(document, treeAdapter) {\n        this.stackTop = -1;\n        this.items = [];\n        this.current = document;\n        this.currentTagName = null;\n        this.currentTmplContent = null;\n        this.tmplCount = 0;\n        this.treeAdapter = treeAdapter;\n    }\n\n    //Index of element\n    _indexOf(element) {\n        let idx = -1;\n\n        for (let i = this.stackTop; i >= 0; i--) {\n            if (this.items[i] === element) {\n                idx = i;\n                break;\n            }\n        }\n        return idx;\n    }\n\n    //Update current element\n    _isInTemplate() {\n        return this.currentTagName === $.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;\n    }\n\n    _updateCurrentElement() {\n        this.current = this.items[this.stackTop];\n        this.currentTagName = this.current && this.treeAdapter.getTagName(this.current);\n\n        this.currentTmplContent = this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : null;\n    }\n\n    //Mutations\n    push(element) {\n        this.items[++this.stackTop] = element;\n        this._updateCurrentElement();\n\n        if (this._isInTemplate()) {\n            this.tmplCount++;\n        }\n    }\n\n    pop() {\n        this.stackTop--;\n\n        if (this.tmplCount > 0 && this._isInTemplate()) {\n            this.tmplCount--;\n        }\n\n        this._updateCurrentElement();\n    }\n\n    replace(oldElement, newElement) {\n        const idx = this._indexOf(oldElement);\n\n        this.items[idx] = newElement;\n\n        if (idx === this.stackTop) {\n            this._updateCurrentElement();\n        }\n    }\n\n    insertAfter(referenceElement, newElement) {\n        const insertionIdx = this._indexOf(referenceElement) + 1;\n\n        this.items.splice(insertionIdx, 0, newElement);\n\n        if (insertionIdx === ++this.stackTop) {\n            this._updateCurrentElement();\n        }\n    }\n\n    popUntilTagNamePopped(tagName) {\n        while (this.stackTop > -1) {\n            const tn = this.currentTagName;\n            const ns = this.treeAdapter.getNamespaceURI(this.current);\n\n            this.pop();\n\n            if (tn === tagName && ns === NS.HTML) {\n                break;\n            }\n        }\n    }\n\n    popUntilElementPopped(element) {\n        while (this.stackTop > -1) {\n            const poppedElement = this.current;\n\n            this.pop();\n\n            if (poppedElement === element) {\n                break;\n            }\n        }\n    }\n\n    popUntilNumberedHeaderPopped() {\n        while (this.stackTop > -1) {\n            const tn = this.currentTagName;\n            const ns = this.treeAdapter.getNamespaceURI(this.current);\n\n            this.pop();\n\n            if (\n                tn === $.H1 ||\n                tn === $.H2 ||\n                tn === $.H3 ||\n                tn === $.H4 ||\n                tn === $.H5 ||\n                (tn === $.H6 && ns === NS.HTML)\n            ) {\n                break;\n            }\n        }\n    }\n\n    popUntilTableCellPopped() {\n        while (this.stackTop > -1) {\n            const tn = this.currentTagName;\n            const ns = this.treeAdapter.getNamespaceURI(this.current);\n\n            this.pop();\n\n            if (tn === $.TD || (tn === $.TH && ns === NS.HTML)) {\n                break;\n            }\n        }\n    }\n\n    popAllUpToHtmlElement() {\n        //NOTE: here we assume that root <html> element is always first in the open element stack, so\n        //we perform this fast stack clean up.\n        this.stackTop = 0;\n        this._updateCurrentElement();\n    }\n\n    clearBackToTableContext() {\n        while (\n            (this.currentTagName !== $.TABLE && this.currentTagName !== $.TEMPLATE && this.currentTagName !== $.HTML) ||\n            this.treeAdapter.getNamespaceURI(this.current) !== NS.HTML\n        ) {\n            this.pop();\n        }\n    }\n\n    clearBackToTableBodyContext() {\n        while (\n            (this.currentTagName !== $.TBODY &&\n                this.currentTagName !== $.TFOOT &&\n                this.currentTagName !== $.THEAD &&\n                this.currentTagName !== $.TEMPLATE &&\n                this.currentTagName !== $.HTML) ||\n            this.treeAdapter.getNamespaceURI(this.current) !== NS.HTML\n        ) {\n            this.pop();\n        }\n    }\n\n    clearBackToTableRowContext() {\n        while (\n            (this.currentTagName !== $.TR && this.currentTagName !== $.TEMPLATE && this.currentTagName !== $.HTML) ||\n            this.treeAdapter.getNamespaceURI(this.current) !== NS.HTML\n        ) {\n            this.pop();\n        }\n    }\n\n    remove(element) {\n        for (let i = this.stackTop; i >= 0; i--) {\n            if (this.items[i] === element) {\n                this.items.splice(i, 1);\n                this.stackTop--;\n                this._updateCurrentElement();\n                break;\n            }\n        }\n    }\n\n    //Search\n    tryPeekProperlyNestedBodyElement() {\n        //Properly nested <body> element (should be second element in stack).\n        const element = this.items[1];\n\n        return element && this.treeAdapter.getTagName(element) === $.BODY ? element : null;\n    }\n\n    contains(element) {\n        return this._indexOf(element) > -1;\n    }\n\n    getCommonAncestor(element) {\n        let elementIdx = this._indexOf(element);\n\n        return --elementIdx >= 0 ? this.items[elementIdx] : null;\n    }\n\n    isRootHtmlElementCurrent() {\n        return this.stackTop === 0 && this.currentTagName === $.HTML;\n    }\n\n    //Element in scope\n    hasInScope(tagName) {\n        for (let i = this.stackTop; i >= 0; i--) {\n            const tn = this.treeAdapter.getTagName(this.items[i]);\n            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\n            if (tn === tagName && ns === NS.HTML) {\n                return true;\n            }\n\n            if (isScopingElement(tn, ns)) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    hasNumberedHeaderInScope() {\n        for (let i = this.stackTop; i >= 0; i--) {\n            const tn = this.treeAdapter.getTagName(this.items[i]);\n            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\n            if (\n                (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6) &&\n                ns === NS.HTML\n            ) {\n                return true;\n            }\n\n            if (isScopingElement(tn, ns)) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    hasInListItemScope(tagName) {\n        for (let i = this.stackTop; i >= 0; i--) {\n            const tn = this.treeAdapter.getTagName(this.items[i]);\n            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\n            if (tn === tagName && ns === NS.HTML) {\n                return true;\n            }\n\n            if (((tn === $.UL || tn === $.OL) && ns === NS.HTML) || isScopingElement(tn, ns)) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    hasInButtonScope(tagName) {\n        for (let i = this.stackTop; i >= 0; i--) {\n            const tn = this.treeAdapter.getTagName(this.items[i]);\n            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\n            if (tn === tagName && ns === NS.HTML) {\n                return true;\n            }\n\n            if ((tn === $.BUTTON && ns === NS.HTML) || isScopingElement(tn, ns)) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    hasInTableScope(tagName) {\n        for (let i = this.stackTop; i >= 0; i--) {\n            const tn = this.treeAdapter.getTagName(this.items[i]);\n            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\n            if (ns !== NS.HTML) {\n                continue;\n            }\n\n            if (tn === tagName) {\n                return true;\n            }\n\n            if (tn === $.TABLE || tn === $.TEMPLATE || tn === $.HTML) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    hasTableBodyContextInTableScope() {\n        for (let i = this.stackTop; i >= 0; i--) {\n            const tn = this.treeAdapter.getTagName(this.items[i]);\n            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\n            if (ns !== NS.HTML) {\n                continue;\n            }\n\n            if (tn === $.TBODY || tn === $.THEAD || tn === $.TFOOT) {\n                return true;\n            }\n\n            if (tn === $.TABLE || tn === $.HTML) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    hasInSelectScope(tagName) {\n        for (let i = this.stackTop; i >= 0; i--) {\n            const tn = this.treeAdapter.getTagName(this.items[i]);\n            const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n\n            if (ns !== NS.HTML) {\n                continue;\n            }\n\n            if (tn === tagName) {\n                return true;\n            }\n\n            if (tn !== $.OPTION && tn !== $.OPTGROUP) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    //Implied end tags\n    generateImpliedEndTags() {\n        while (isImpliedEndTagRequired(this.currentTagName)) {\n            this.pop();\n        }\n    }\n\n    generateImpliedEndTagsThoroughly() {\n        while (isImpliedEndTagRequiredThoroughly(this.currentTagName)) {\n            this.pop();\n        }\n    }\n\n    generateImpliedEndTagsWithExclusion(exclusionTagName) {\n        while (isImpliedEndTagRequired(this.currentTagName) && this.currentTagName !== exclusionTagName) {\n            this.pop();\n        }\n    }\n}\n\nmodule.exports = OpenElementStack;\n", "'use strict';\n\n//Const\nconst NOAH_ARK_CAPACITY = 3;\n\n//List of formatting elements\nclass FormattingElementList {\n    constructor(treeAdapter) {\n        this.length = 0;\n        this.entries = [];\n        this.treeAdapter = treeAdapter;\n        this.bookmark = null;\n    }\n\n    //Noah Ark's condition\n    //OPTIMIZATION: at first we try to find possible candidates for exclusion using\n    //lightweight heuristics without thorough attributes check.\n    _getNoahArkConditionCandidates(newElement) {\n        const candidates = [];\n\n        if (this.length >= NOAH_ARK_CAPACITY) {\n            const neAttrsLength = this.treeAdapter.getAttrList(newElement).length;\n            const neTagName = this.treeAdapter.getTagName(newElement);\n            const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);\n\n            for (let i = this.length - 1; i >= 0; i--) {\n                const entry = this.entries[i];\n\n                if (entry.type === FormattingElementList.MARKER_ENTRY) {\n                    break;\n                }\n\n                const element = entry.element;\n                const elementAttrs = this.treeAdapter.getAttrList(element);\n\n                const isCandidate =\n                    this.treeAdapter.getTagName(element) === neTagName &&\n                    this.treeAdapter.getNamespaceURI(element) === neNamespaceURI &&\n                    elementAttrs.length === neAttrsLength;\n\n                if (isCandidate) {\n                    candidates.push({ idx: i, attrs: elementAttrs });\n                }\n            }\n        }\n\n        return candidates.length < NOAH_ARK_CAPACITY ? [] : candidates;\n    }\n\n    _ensureNoahArkCondition(newElement) {\n        const candidates = this._getNoahArkConditionCandidates(newElement);\n        let cLength = candidates.length;\n\n        if (cLength) {\n            const neAttrs = this.treeAdapter.getAttrList(newElement);\n            const neAttrsLength = neAttrs.length;\n            const neAttrsMap = Object.create(null);\n\n            //NOTE: build attrs map for the new element so we can perform fast lookups\n            for (let i = 0; i < neAttrsLength; i++) {\n                const neAttr = neAttrs[i];\n\n                neAttrsMap[neAttr.name] = neAttr.value;\n            }\n\n            for (let i = 0; i < neAttrsLength; i++) {\n                for (let j = 0; j < cLength; j++) {\n                    const cAttr = candidates[j].attrs[i];\n\n                    if (neAttrsMap[cAttr.name] !== cAttr.value) {\n                        candidates.splice(j, 1);\n                        cLength--;\n                    }\n\n                    if (candidates.length < NOAH_ARK_CAPACITY) {\n                        return;\n                    }\n                }\n            }\n\n            //NOTE: remove bottommost candidates until Noah's Ark condition will not be met\n            for (let i = cLength - 1; i >= NOAH_ARK_CAPACITY - 1; i--) {\n                this.entries.splice(candidates[i].idx, 1);\n                this.length--;\n            }\n        }\n    }\n\n    //Mutations\n    insertMarker() {\n        this.entries.push({ type: FormattingElementList.MARKER_ENTRY });\n        this.length++;\n    }\n\n    pushElement(element, token) {\n        this._ensureNoahArkCondition(element);\n\n        this.entries.push({\n            type: FormattingElementList.ELEMENT_ENTRY,\n            element: element,\n            token: token\n        });\n\n        this.length++;\n    }\n\n    insertElementAfterBookmark(element, token) {\n        let bookmarkIdx = this.length - 1;\n\n        for (; bookmarkIdx >= 0; bookmarkIdx--) {\n            if (this.entries[bookmarkIdx] === this.bookmark) {\n                break;\n            }\n        }\n\n        this.entries.splice(bookmarkIdx + 1, 0, {\n            type: FormattingElementList.ELEMENT_ENTRY,\n            element: element,\n            token: token\n        });\n\n        this.length++;\n    }\n\n    removeEntry(entry) {\n        for (let i = this.length - 1; i >= 0; i--) {\n            if (this.entries[i] === entry) {\n                this.entries.splice(i, 1);\n                this.length--;\n                break;\n            }\n        }\n    }\n\n    clearToLastMarker() {\n        while (this.length) {\n            const entry = this.entries.pop();\n\n            this.length--;\n\n            if (entry.type === FormattingElementList.MARKER_ENTRY) {\n                break;\n            }\n        }\n    }\n\n    //Search\n    getElementEntryInScopeWithTagName(tagName) {\n        for (let i = this.length - 1; i >= 0; i--) {\n            const entry = this.entries[i];\n\n            if (entry.type === FormattingElementList.MARKER_ENTRY) {\n                return null;\n            }\n\n            if (this.treeAdapter.getTagName(entry.element) === tagName) {\n                return entry;\n            }\n        }\n\n        return null;\n    }\n\n    getElementEntry(element) {\n        for (let i = this.length - 1; i >= 0; i--) {\n            const entry = this.entries[i];\n\n            if (entry.type === FormattingElementList.ELEMENT_ENTRY && entry.element === element) {\n                return entry;\n            }\n        }\n\n        return null;\n    }\n}\n\n//Entry types\nFormattingElementList.MARKER_ENTRY = 'MARKER_ENTRY';\nFormattingElementList.ELEMENT_ENTRY = 'ELEMENT_ENTRY';\n\nmodule.exports = FormattingElementList;\n", "'use strict';\n\nclass Mixin {\n    constructor(host) {\n        const originalMethods = {};\n        const overriddenMethods = this._getOverriddenMethods(this, originalMethods);\n\n        for (const key of Object.keys(overriddenMethods)) {\n            if (typeof overriddenMethods[key] === 'function') {\n                originalMethods[key] = host[key];\n                host[key] = overriddenMethods[key];\n            }\n        }\n    }\n\n    _getOverriddenMethods() {\n        throw new Error('Not implemented');\n    }\n}\n\nMixin.install = function(host, Ctor, opts) {\n    if (!host.__mixins) {\n        host.__mixins = [];\n    }\n\n    for (let i = 0; i < host.__mixins.length; i++) {\n        if (host.__mixins[i].constructor === Ctor) {\n            return host.__mixins[i];\n        }\n    }\n\n    const mixin = new Ctor(host, opts);\n\n    host.__mixins.push(mixin);\n\n    return mixin;\n};\n\nmodule.exports = Mixin;\n", "'use strict';\n\nconst Mixin = require('../../utils/mixin');\n\nclass PositionTrackingPreprocessorMixin extends Mixin {\n    constructor(preprocessor) {\n        super(preprocessor);\n\n        this.preprocessor = preprocessor;\n        this.isEol = false;\n        this.lineStartPos = 0;\n        this.droppedBufferSize = 0;\n\n        this.offset = 0;\n        this.col = 0;\n        this.line = 1;\n    }\n\n    _getOverriddenMethods(mxn, orig) {\n        return {\n            advance() {\n                const pos = this.pos + 1;\n                const ch = this.html[pos];\n\n                //NOTE: LF should be in the last column of the line\n                if (mxn.isEol) {\n                    mxn.isEol = false;\n                    mxn.line++;\n                    mxn.lineStartPos = pos;\n                }\n\n                if (ch === '\\n' || (ch === '\\r' && this.html[pos + 1] !== '\\n')) {\n                    mxn.isEol = true;\n                }\n\n                mxn.col = pos - mxn.lineStartPos + 1;\n                mxn.offset = mxn.droppedBufferSize + pos;\n\n                return orig.advance.call(this);\n            },\n\n            retreat() {\n                orig.retreat.call(this);\n\n                mxn.isEol = false;\n                mxn.col = this.pos - mxn.lineStartPos + 1;\n            },\n\n            dropParsedChunk() {\n                const prevPos = this.pos;\n\n                orig.dropParsedChunk.call(this);\n\n                const reduction = prevPos - this.pos;\n\n                mxn.lineStartPos -= reduction;\n                mxn.droppedBufferSize += reduction;\n                mxn.offset = mxn.droppedBufferSize + this.pos;\n            }\n        };\n    }\n}\n\nmodule.exports = PositionTrackingPreprocessorMixin;\n", "'use strict';\n\nconst Mixin = require('../../utils/mixin');\nconst Tokenizer = require('../../tokenizer');\nconst PositionTrackingPreprocessorMixin = require('../position-tracking/preprocessor-mixin');\n\nclass LocationInfoTokenizerMixin extends Mixin {\n    constructor(tokenizer) {\n        super(tokenizer);\n\n        this.tokenizer = tokenizer;\n        this.posTracker = Mixin.install(tokenizer.preprocessor, PositionTrackingPreprocessorMixin);\n        this.currentAttrLocation = null;\n        this.ctLoc = null;\n    }\n\n    _getCurrentLocation() {\n        return {\n            startLine: this.posTracker.line,\n            startCol: this.posTracker.col,\n            startOffset: this.posTracker.offset,\n            endLine: -1,\n            endCol: -1,\n            endOffset: -1\n        };\n    }\n\n    _attachCurrentAttrLocationInfo() {\n        this.currentAttrLocation.endLine = this.posTracker.line;\n        this.currentAttrLocation.endCol = this.posTracker.col;\n        this.currentAttrLocation.endOffset = this.posTracker.offset;\n\n        const currentToken = this.tokenizer.currentToken;\n        const currentAttr = this.tokenizer.currentAttr;\n\n        if (!currentToken.location.attrs) {\n            currentToken.location.attrs = Object.create(null);\n        }\n\n        currentToken.location.attrs[currentAttr.name] = this.currentAttrLocation;\n    }\n\n    _getOverriddenMethods(mxn, orig) {\n        const methods = {\n            _createStartTagToken() {\n                orig._createStartTagToken.call(this);\n                this.currentToken.location = mxn.ctLoc;\n            },\n\n            _createEndTagToken() {\n                orig._createEndTagToken.call(this);\n                this.currentToken.location = mxn.ctLoc;\n            },\n\n            _createCommentToken() {\n                orig._createCommentToken.call(this);\n                this.currentToken.location = mxn.ctLoc;\n            },\n\n            _createDoctypeToken(initialName) {\n                orig._createDoctypeToken.call(this, initialName);\n                this.currentToken.location = mxn.ctLoc;\n            },\n\n            _createCharacterToken(type, ch) {\n                orig._createCharacterToken.call(this, type, ch);\n                this.currentCharacterToken.location = mxn.ctLoc;\n            },\n\n            _createEOFToken() {\n                orig._createEOFToken.call(this);\n                this.currentToken.location = mxn._getCurrentLocation();\n            },\n\n            _createAttr(attrNameFirstCh) {\n                orig._createAttr.call(this, attrNameFirstCh);\n                mxn.currentAttrLocation = mxn._getCurrentLocation();\n            },\n\n            _leaveAttrName(toState) {\n                orig._leaveAttrName.call(this, toState);\n                mxn._attachCurrentAttrLocationInfo();\n            },\n\n            _leaveAttrValue(toState) {\n                orig._leaveAttrValue.call(this, toState);\n                mxn._attachCurrentAttrLocationInfo();\n            },\n\n            _emitCurrentToken() {\n                const ctLoc = this.currentToken.location;\n\n                //NOTE: if we have pending character token make it's end location equal to the\n                //current token's start location.\n                if (this.currentCharacterToken) {\n                    this.currentCharacterToken.location.endLine = ctLoc.startLine;\n                    this.currentCharacterToken.location.endCol = ctLoc.startCol;\n                    this.currentCharacterToken.location.endOffset = ctLoc.startOffset;\n                }\n\n                if (this.currentToken.type === Tokenizer.EOF_TOKEN) {\n                    ctLoc.endLine = ctLoc.startLine;\n                    ctLoc.endCol = ctLoc.startCol;\n                    ctLoc.endOffset = ctLoc.startOffset;\n                } else {\n                    ctLoc.endLine = mxn.posTracker.line;\n                    ctLoc.endCol = mxn.posTracker.col + 1;\n                    ctLoc.endOffset = mxn.posTracker.offset + 1;\n                }\n\n                orig._emitCurrentToken.call(this);\n            },\n\n            _emitCurrentCharacterToken() {\n                const ctLoc = this.currentCharacterToken && this.currentCharacterToken.location;\n\n                //NOTE: if we have character token and it's location wasn't set in the _emitCurrentToken(),\n                //then set it's location at the current preprocessor position.\n                //We don't need to increment preprocessor position, since character token\n                //emission is always forced by the start of the next character token here.\n                //So, we already have advanced position.\n                if (ctLoc && ctLoc.endOffset === -1) {\n                    ctLoc.endLine = mxn.posTracker.line;\n                    ctLoc.endCol = mxn.posTracker.col;\n                    ctLoc.endOffset = mxn.posTracker.offset;\n                }\n\n                orig._emitCurrentCharacterToken.call(this);\n            }\n        };\n\n        //NOTE: patch initial states for each mode to obtain token start position\n        Object.keys(Tokenizer.MODE).forEach(modeName => {\n            const state = Tokenizer.MODE[modeName];\n\n            methods[state] = function(cp) {\n                mxn.ctLoc = mxn._getCurrentLocation();\n                orig[state].call(this, cp);\n            };\n        });\n\n        return methods;\n    }\n}\n\nmodule.exports = LocationInfoTokenizerMixin;\n", "'use strict';\n\nconst Mixin = require('../../utils/mixin');\n\nclass LocationInfoOpenElementStackMixin extends Mixin {\n    constructor(stack, opts) {\n        super(stack);\n\n        this.onItemPop = opts.onItemPop;\n    }\n\n    _getOverriddenMethods(mxn, orig) {\n        return {\n            pop() {\n                mxn.onItemPop(this.current);\n                orig.pop.call(this);\n            },\n\n            popAllUpToHtmlElement() {\n                for (let i = this.stackTop; i > 0; i--) {\n                    mxn.onItemPop(this.items[i]);\n                }\n\n                orig.popAllUpToHtmlElement.call(this);\n            },\n\n            remove(element) {\n                mxn.onItemPop(this.current);\n                orig.remove.call(this, element);\n            }\n        };\n    }\n}\n\nmodule.exports = LocationInfoOpenElementStackMixin;\n", "'use strict';\n\nconst Mixin = require('../../utils/mixin');\nconst Tokenizer = require('../../tokenizer');\nconst LocationInfoTokenizerMixin = require('./tokenizer-mixin');\nconst LocationInfoOpenElementStackMixin = require('./open-element-stack-mixin');\nconst HTML = require('../../common/html');\n\n//Aliases\nconst $ = HTML.TAG_NAMES;\n\nclass LocationInfoParserMixin extends Mixin {\n    constructor(parser) {\n        super(parser);\n\n        this.parser = parser;\n        this.treeAdapter = this.parser.treeAdapter;\n        this.posTracker = null;\n        this.lastStartTagToken = null;\n        this.lastFosterParentingLocation = null;\n        this.currentToken = null;\n    }\n\n    _setStartLocation(element) {\n        let loc = null;\n\n        if (this.lastStartTagToken) {\n            loc = Object.assign({}, this.lastStartTagToken.location);\n            loc.startTag = this.lastStartTagToken.location;\n        }\n\n        this.treeAdapter.setNodeSourceCodeLocation(element, loc);\n    }\n\n    _setEndLocation(element, closingToken) {\n        const loc = this.treeAdapter.getNodeSourceCodeLocation(element);\n\n        if (loc) {\n            if (closingToken.location) {\n                const ctLoc = closingToken.location;\n                const tn = this.treeAdapter.getTagName(element);\n\n                // NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing\n                // tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.\n                const isClosingEndTag = closingToken.type === Tokenizer.END_TAG_TOKEN && tn === closingToken.tagName;\n\n                if (isClosingEndTag) {\n                    loc.endTag = Object.assign({}, ctLoc);\n                    loc.endLine = ctLoc.endLine;\n                    loc.endCol = ctLoc.endCol;\n                    loc.endOffset = ctLoc.endOffset;\n                } else {\n                    loc.endLine = ctLoc.startLine;\n                    loc.endCol = ctLoc.startCol;\n                    loc.endOffset = ctLoc.startOffset;\n                }\n            }\n        }\n    }\n\n    _getOverriddenMethods(mxn, orig) {\n        return {\n            _bootstrap(document, fragmentContext) {\n                orig._bootstrap.call(this, document, fragmentContext);\n\n                mxn.lastStartTagToken = null;\n                mxn.lastFosterParentingLocation = null;\n                mxn.currentToken = null;\n\n                const tokenizerMixin = Mixin.install(this.tokenizer, LocationInfoTokenizerMixin);\n\n                mxn.posTracker = tokenizerMixin.posTracker;\n\n                Mixin.install(this.openElements, LocationInfoOpenElementStackMixin, {\n                    onItemPop: function(element) {\n                        mxn._setEndLocation(element, mxn.currentToken);\n                    }\n                });\n            },\n\n            _runParsingLoop(scriptHandler) {\n                orig._runParsingLoop.call(this, scriptHandler);\n\n                // NOTE: generate location info for elements\n                // that remains on open element stack\n                for (let i = this.openElements.stackTop; i >= 0; i--) {\n                    mxn._setEndLocation(this.openElements.items[i], mxn.currentToken);\n                }\n            },\n\n            //Token processing\n            _processTokenInForeignContent(token) {\n                mxn.currentToken = token;\n                orig._processTokenInForeignContent.call(this, token);\n            },\n\n            _processToken(token) {\n                mxn.currentToken = token;\n                orig._processToken.call(this, token);\n\n                //NOTE: <body> and <html> are never popped from the stack, so we need to updated\n                //their end location explicitly.\n                const requireExplicitUpdate =\n                    token.type === Tokenizer.END_TAG_TOKEN &&\n                    (token.tagName === $.HTML || (token.tagName === $.BODY && this.openElements.hasInScope($.BODY)));\n\n                if (requireExplicitUpdate) {\n                    for (let i = this.openElements.stackTop; i >= 0; i--) {\n                        const element = this.openElements.items[i];\n\n                        if (this.treeAdapter.getTagName(element) === token.tagName) {\n                            mxn._setEndLocation(element, token);\n                            break;\n                        }\n                    }\n                }\n            },\n\n            //Doctype\n            _setDocumentType(token) {\n                orig._setDocumentType.call(this, token);\n\n                const documentChildren = this.treeAdapter.getChildNodes(this.document);\n                const cnLength = documentChildren.length;\n\n                for (let i = 0; i < cnLength; i++) {\n                    const node = documentChildren[i];\n\n                    if (this.treeAdapter.isDocumentTypeNode(node)) {\n                        this.treeAdapter.setNodeSourceCodeLocation(node, token.location);\n                        break;\n                    }\n                }\n            },\n\n            //Elements\n            _attachElementToTree(element) {\n                //NOTE: _attachElementToTree is called from _appendElement, _insertElement and _insertTemplate methods.\n                //So we will use token location stored in this methods for the element.\n                mxn._setStartLocation(element);\n                mxn.lastStartTagToken = null;\n                orig._attachElementToTree.call(this, element);\n            },\n\n            _appendElement(token, namespaceURI) {\n                mxn.lastStartTagToken = token;\n                orig._appendElement.call(this, token, namespaceURI);\n            },\n\n            _insertElement(token, namespaceURI) {\n                mxn.lastStartTagToken = token;\n                orig._insertElement.call(this, token, namespaceURI);\n            },\n\n            _insertTemplate(token) {\n                mxn.lastStartTagToken = token;\n                orig._insertTemplate.call(this, token);\n\n                const tmplContent = this.treeAdapter.getTemplateContent(this.openElements.current);\n\n                this.treeAdapter.setNodeSourceCodeLocation(tmplContent, null);\n            },\n\n            _insertFakeRootElement() {\n                orig._insertFakeRootElement.call(this);\n                this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current, null);\n            },\n\n            //Comments\n            _appendCommentNode(token, parent) {\n                orig._appendCommentNode.call(this, token, parent);\n\n                const children = this.treeAdapter.getChildNodes(parent);\n                const commentNode = children[children.length - 1];\n\n                this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location);\n            },\n\n            //Text\n            _findFosterParentingLocation() {\n                //NOTE: store last foster parenting location, so we will be able to find inserted text\n                //in case of foster parenting\n                mxn.lastFosterParentingLocation = orig._findFosterParentingLocation.call(this);\n\n                return mxn.lastFosterParentingLocation;\n            },\n\n            _insertCharacters(token) {\n                orig._insertCharacters.call(this, token);\n\n                const hasFosterParent = this._shouldFosterParentOnInsertion();\n\n                const parent =\n                    (hasFosterParent && mxn.lastFosterParentingLocation.parent) ||\n                    this.openElements.currentTmplContent ||\n                    this.openElements.current;\n\n                const siblings = this.treeAdapter.getChildNodes(parent);\n\n                const textNodeIdx =\n                    hasFosterParent && mxn.lastFosterParentingLocation.beforeElement\n                        ? siblings.indexOf(mxn.lastFosterParentingLocation.beforeElement) - 1\n                        : siblings.length - 1;\n\n                const textNode = siblings[textNodeIdx];\n\n                //NOTE: if we have location assigned by another token, then just update end position\n                const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode);\n\n                if (tnLoc) {\n                    tnLoc.endLine = token.location.endLine;\n                    tnLoc.endCol = token.location.endCol;\n                    tnLoc.endOffset = token.location.endOffset;\n                } else {\n                    this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location);\n                }\n            }\n        };\n    }\n}\n\nmodule.exports = LocationInfoParserMixin;\n", "'use strict';\n\nconst Mixin = require('../../utils/mixin');\n\nclass ErrorReportingMixinBase extends Mixin {\n    constructor(host, opts) {\n        super(host);\n\n        this.posTracker = null;\n        this.onParseError = opts.onParseError;\n    }\n\n    _setErrorLocation(err) {\n        err.startLine = err.endLine = this.posTracker.line;\n        err.startCol = err.endCol = this.posTracker.col;\n        err.startOffset = err.endOffset = this.posTracker.offset;\n    }\n\n    _reportError(code) {\n        const err = {\n            code: code,\n            startLine: -1,\n            startCol: -1,\n            startOffset: -1,\n            endLine: -1,\n            endCol: -1,\n            endOffset: -1\n        };\n\n        this._setErrorLocation(err);\n        this.onParseError(err);\n    }\n\n    _getOverriddenMethods(mxn) {\n        return {\n            _err(code) {\n                mxn._reportError(code);\n            }\n        };\n    }\n}\n\nmodule.exports = ErrorReportingMixinBase;\n", "'use strict';\n\nconst ErrorReportingMixinBase = require('./mixin-base');\nconst PositionTrackingPreprocessorMixin = require('../position-tracking/preprocessor-mixin');\nconst Mixin = require('../../utils/mixin');\n\nclass ErrorReportingPreprocessorMixin extends ErrorReportingMixinBase {\n    constructor(preprocessor, opts) {\n        super(preprocessor, opts);\n\n        this.posTracker = Mixin.install(preprocessor, PositionTrackingPreprocessorMixin);\n        this.lastErrOffset = -1;\n    }\n\n    _reportError(code) {\n        //NOTE: avoid reporting error twice on advance/retreat\n        if (this.lastErrOffset !== this.posTracker.offset) {\n            this.lastErrOffset = this.posTracker.offset;\n            super._reportError(code);\n        }\n    }\n}\n\nmodule.exports = ErrorReportingPreprocessorMixin;\n", "'use strict';\n\nconst ErrorReportingMixinBase = require('./mixin-base');\nconst ErrorReportingPreprocessorMixin = require('./preprocessor-mixin');\nconst Mixin = require('../../utils/mixin');\n\nclass ErrorReportingTokenizerMixin extends ErrorReportingMixinBase {\n    constructor(tokenizer, opts) {\n        super(tokenizer, opts);\n\n        const preprocessorMixin = Mixin.install(tokenizer.preprocessor, ErrorReportingPreprocessorMixin, opts);\n\n        this.posTracker = preprocessorMixin.posTracker;\n    }\n}\n\nmodule.exports = ErrorReportingTokenizerMixin;\n", "'use strict';\n\nconst ErrorReportingMixinBase = require('./mixin-base');\nconst ErrorReportingTokenizerMixin = require('./tokenizer-mixin');\nconst LocationInfoTokenizerMixin = require('../location-info/tokenizer-mixin');\nconst Mixin = require('../../utils/mixin');\n\nclass ErrorReportingParserMixin extends ErrorReportingMixinBase {\n    constructor(parser, opts) {\n        super(parser, opts);\n\n        this.opts = opts;\n        this.ctLoc = null;\n        this.locBeforeToken = false;\n    }\n\n    _setErrorLocation(err) {\n        if (this.ctLoc) {\n            err.startLine = this.ctLoc.startLine;\n            err.startCol = this.ctLoc.startCol;\n            err.startOffset = this.ctLoc.startOffset;\n\n            err.endLine = this.locBeforeToken ? this.ctLoc.startLine : this.ctLoc.endLine;\n            err.endCol = this.locBeforeToken ? this.ctLoc.startCol : this.ctLoc.endCol;\n            err.endOffset = this.locBeforeToken ? this.ctLoc.startOffset : this.ctLoc.endOffset;\n        }\n    }\n\n    _getOverriddenMethods(mxn, orig) {\n        return {\n            _bootstrap(document, fragmentContext) {\n                orig._bootstrap.call(this, document, fragmentContext);\n\n                Mixin.install(this.tokenizer, ErrorReportingTokenizerMixin, mxn.opts);\n                Mixin.install(this.tokenizer, LocationInfoTokenizerMixin);\n            },\n\n            _processInputToken(token) {\n                mxn.ctLoc = token.location;\n\n                orig._processInputToken.call(this, token);\n            },\n\n            _err(code, options) {\n                mxn.locBeforeToken = options && options.beforeToken;\n                mxn._reportError(code);\n            }\n        };\n    }\n}\n\nmodule.exports = ErrorReportingParserMixin;\n", "'use strict';\n\nconst { DOCUMENT_MODE } = require('../common/html');\n\n//Node construction\nexports.createDocument = function() {\n    return {\n        nodeName: '#document',\n        mode: DOCUMENT_MODE.NO_QUIRKS,\n        childNodes: []\n    };\n};\n\nexports.createDocumentFragment = function() {\n    return {\n        nodeName: '#document-fragment',\n        childNodes: []\n    };\n};\n\nexports.createElement = function(tagName, namespaceURI, attrs) {\n    return {\n        nodeName: tagName,\n        tagName: tagName,\n        attrs: attrs,\n        namespaceURI: namespaceURI,\n        childNodes: [],\n        parentNode: null\n    };\n};\n\nexports.createCommentNode = function(data) {\n    return {\n        nodeName: '#comment',\n        data: data,\n        parentNode: null\n    };\n};\n\nconst createTextNode = function(value) {\n    return {\n        nodeName: '#text',\n        value: value,\n        parentNode: null\n    };\n};\n\n//Tree mutation\nconst appendChild = (exports.appendChild = function(parentNode, newNode) {\n    parentNode.childNodes.push(newNode);\n    newNode.parentNode = parentNode;\n});\n\nconst insertBefore = (exports.insertBefore = function(parentNode, newNode, referenceNode) {\n    const insertionIdx = parentNode.childNodes.indexOf(referenceNode);\n\n    parentNode.childNodes.splice(insertionIdx, 0, newNode);\n    newNode.parentNode = parentNode;\n});\n\nexports.setTemplateContent = function(templateElement, contentElement) {\n    templateElement.content = contentElement;\n};\n\nexports.getTemplateContent = function(templateElement) {\n    return templateElement.content;\n};\n\nexports.setDocumentType = function(document, name, publicId, systemId) {\n    let doctypeNode = null;\n\n    for (let i = 0; i < document.childNodes.length; i++) {\n        if (document.childNodes[i].nodeName === '#documentType') {\n            doctypeNode = document.childNodes[i];\n            break;\n        }\n    }\n\n    if (doctypeNode) {\n        doctypeNode.name = name;\n        doctypeNode.publicId = publicId;\n        doctypeNode.systemId = systemId;\n    } else {\n        appendChild(document, {\n            nodeName: '#documentType',\n            name: name,\n            publicId: publicId,\n            systemId: systemId\n        });\n    }\n};\n\nexports.setDocumentMode = function(document, mode) {\n    document.mode = mode;\n};\n\nexports.getDocumentMode = function(document) {\n    return document.mode;\n};\n\nexports.detachNode = function(node) {\n    if (node.parentNode) {\n        const idx = node.parentNode.childNodes.indexOf(node);\n\n        node.parentNode.childNodes.splice(idx, 1);\n        node.parentNode = null;\n    }\n};\n\nexports.insertText = function(parentNode, text) {\n    if (parentNode.childNodes.length) {\n        const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];\n\n        if (prevNode.nodeName === '#text') {\n            prevNode.value += text;\n            return;\n        }\n    }\n\n    appendChild(parentNode, createTextNode(text));\n};\n\nexports.insertTextBefore = function(parentNode, text, referenceNode) {\n    const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];\n\n    if (prevNode && prevNode.nodeName === '#text') {\n        prevNode.value += text;\n    } else {\n        insertBefore(parentNode, createTextNode(text), referenceNode);\n    }\n};\n\nexports.adoptAttributes = function(recipient, attrs) {\n    const recipientAttrsMap = [];\n\n    for (let i = 0; i < recipient.attrs.length; i++) {\n        recipientAttrsMap.push(recipient.attrs[i].name);\n    }\n\n    for (let j = 0; j < attrs.length; j++) {\n        if (recipientAttrsMap.indexOf(attrs[j].name) === -1) {\n            recipient.attrs.push(attrs[j]);\n        }\n    }\n};\n\n//Tree traversing\nexports.getFirstChild = function(node) {\n    return node.childNodes[0];\n};\n\nexports.getChildNodes = function(node) {\n    return node.childNodes;\n};\n\nexports.getParentNode = function(node) {\n    return node.parentNode;\n};\n\nexports.getAttrList = function(element) {\n    return element.attrs;\n};\n\n//Node data\nexports.getTagName = function(element) {\n    return element.tagName;\n};\n\nexports.getNamespaceURI = function(element) {\n    return element.namespaceURI;\n};\n\nexports.getTextNodeContent = function(textNode) {\n    return textNode.value;\n};\n\nexports.getCommentNodeContent = function(commentNode) {\n    return commentNode.data;\n};\n\nexports.getDocumentTypeNodeName = function(doctypeNode) {\n    return doctypeNode.name;\n};\n\nexports.getDocumentTypeNodePublicId = function(doctypeNode) {\n    return doctypeNode.publicId;\n};\n\nexports.getDocumentTypeNodeSystemId = function(doctypeNode) {\n    return doctypeNode.systemId;\n};\n\n//Node types\nexports.isTextNode = function(node) {\n    return node.nodeName === '#text';\n};\n\nexports.isCommentNode = function(node) {\n    return node.nodeName === '#comment';\n};\n\nexports.isDocumentTypeNode = function(node) {\n    return node.nodeName === '#documentType';\n};\n\nexports.isElementNode = function(node) {\n    return !!node.tagName;\n};\n\n// Source code location\nexports.setNodeSourceCodeLocation = function(node, location) {\n    node.sourceCodeLocation = location;\n};\n\nexports.getNodeSourceCodeLocation = function(node) {\n    return node.sourceCodeLocation;\n};\n", "'use strict';\n\nmodule.exports = function mergeOptions(defaults, options) {\n    options = options || Object.create(null);\n\n    return [defaults, options].reduce((merged, optObj) => {\n        Object.keys(optObj).forEach(key => {\n            merged[key] = optObj[key];\n        });\n\n        return merged;\n    }, Object.create(null));\n};\n", "'use strict';\n\nconst { DOCUMENT_MODE } = require('./html');\n\n//Const\nconst VALID_DOCTYPE_NAME = 'html';\nconst VALID_SYSTEM_ID = 'about:legacy-compat';\nconst QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd';\n\nconst QUIRKS_MODE_PUBLIC_ID_PREFIXES = [\n    '+//silmaril//dtd html pro v0r11 19970101//',\n    '-//as//dtd html 3.0 aswedit + extensions//',\n    '-//advasoft ltd//dtd html 3.0 aswedit + extensions//',\n    '-//ietf//dtd html 2.0 level 1//',\n    '-//ietf//dtd html 2.0 level 2//',\n    '-//ietf//dtd html 2.0 strict level 1//',\n    '-//ietf//dtd html 2.0 strict level 2//',\n    '-//ietf//dtd html 2.0 strict//',\n    '-//ietf//dtd html 2.0//',\n    '-//ietf//dtd html 2.1e//',\n    '-//ietf//dtd html 3.0//',\n    '-//ietf//dtd html 3.2 final//',\n    '-//ietf//dtd html 3.2//',\n    '-//ietf//dtd html 3//',\n    '-//ietf//dtd html level 0//',\n    '-//ietf//dtd html level 1//',\n    '-//ietf//dtd html level 2//',\n    '-//ietf//dtd html level 3//',\n    '-//ietf//dtd html strict level 0//',\n    '-//ietf//dtd html strict level 1//',\n    '-//ietf//dtd html strict level 2//',\n    '-//ietf//dtd html strict level 3//',\n    '-//ietf//dtd html strict//',\n    '-//ietf//dtd html//',\n    '-//metrius//dtd metrius presentational//',\n    '-//microsoft//dtd internet explorer 2.0 html strict//',\n    '-//microsoft//dtd internet explorer 2.0 html//',\n    '-//microsoft//dtd internet explorer 2.0 tables//',\n    '-//microsoft//dtd internet explorer 3.0 html strict//',\n    '-//microsoft//dtd internet explorer 3.0 html//',\n    '-//microsoft//dtd internet explorer 3.0 tables//',\n    '-//netscape comm. corp.//dtd html//',\n    '-//netscape comm. corp.//dtd strict html//',\n    \"-//o'reilly and associates//dtd html 2.0//\",\n    \"-//o'reilly and associates//dtd html extended 1.0//\",\n    \"-//o'reilly and associates//dtd html extended relaxed 1.0//\",\n    '-//sq//dtd html 2.0 hotmetal + extensions//',\n    '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//',\n    '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//',\n    '-//spyglass//dtd html 2.0 extended//',\n    '-//sun microsystems corp.//dtd hotjava html//',\n    '-//sun microsystems corp.//dtd hotjava strict html//',\n    '-//w3c//dtd html 3 1995-03-24//',\n    '-//w3c//dtd html 3.2 draft//',\n    '-//w3c//dtd html 3.2 final//',\n    '-//w3c//dtd html 3.2//',\n    '-//w3c//dtd html 3.2s draft//',\n    '-//w3c//dtd html 4.0 frameset//',\n    '-//w3c//dtd html 4.0 transitional//',\n    '-//w3c//dtd html experimental 19960712//',\n    '-//w3c//dtd html experimental 970421//',\n    '-//w3c//dtd w3 html//',\n    '-//w3o//dtd w3 html 3.0//',\n    '-//webtechs//dtd mozilla html 2.0//',\n    '-//webtechs//dtd mozilla html//'\n];\n\nconst QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat([\n    '-//w3c//dtd html 4.01 frameset//',\n    '-//w3c//dtd html 4.01 transitional//'\n]);\n\nconst QUIRKS_MODE_PUBLIC_IDS = ['-//w3o//dtd w3 html strict 3.0//en//', '-/w3c/dtd html 4.0 transitional/en', 'html'];\nconst LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//'];\n\nconst LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat([\n    '-//w3c//dtd html 4.01 frameset//',\n    '-//w3c//dtd html 4.01 transitional//'\n]);\n\n//Utils\nfunction enquoteDoctypeId(id) {\n    const quote = id.indexOf('\"') !== -1 ? \"'\" : '\"';\n\n    return quote + id + quote;\n}\n\nfunction hasPrefix(publicId, prefixes) {\n    for (let i = 0; i < prefixes.length; i++) {\n        if (publicId.indexOf(prefixes[i]) === 0) {\n            return true;\n        }\n    }\n\n    return false;\n}\n\n//API\nexports.isConforming = function(token) {\n    return (\n        token.name === VALID_DOCTYPE_NAME &&\n        token.publicId === null &&\n        (token.systemId === null || token.systemId === VALID_SYSTEM_ID)\n    );\n};\n\nexports.getDocumentMode = function(token) {\n    if (token.name !== VALID_DOCTYPE_NAME) {\n        return DOCUMENT_MODE.QUIRKS;\n    }\n\n    const systemId = token.systemId;\n\n    if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {\n        return DOCUMENT_MODE.QUIRKS;\n    }\n\n    let publicId = token.publicId;\n\n    if (publicId !== null) {\n        publicId = publicId.toLowerCase();\n\n        if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1) {\n            return DOCUMENT_MODE.QUIRKS;\n        }\n\n        let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;\n\n        if (hasPrefix(publicId, prefixes)) {\n            return DOCUMENT_MODE.QUIRKS;\n        }\n\n        prefixes =\n            systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;\n\n        if (hasPrefix(publicId, prefixes)) {\n            return DOCUMENT_MODE.LIMITED_QUIRKS;\n        }\n    }\n\n    return DOCUMENT_MODE.NO_QUIRKS;\n};\n\nexports.serializeContent = function(name, publicId, systemId) {\n    let str = '!DOCTYPE ';\n\n    if (name) {\n        str += name;\n    }\n\n    if (publicId) {\n        str += ' PUBLIC ' + enquoteDoctypeId(publicId);\n    } else if (systemId) {\n        str += ' SYSTEM';\n    }\n\n    if (systemId !== null) {\n        str += ' ' + enquoteDoctypeId(systemId);\n    }\n\n    return str;\n};\n", "'use strict';\n\nconst Tokenizer = require('../tokenizer');\nconst HTML = require('./html');\n\n//Aliases\nconst $ = HTML.TAG_NAMES;\nconst NS = HTML.NAMESPACES;\nconst ATTRS = HTML.ATTRS;\n\n//MIME types\nconst MIME_TYPES = {\n    TEXT_HTML: 'text/html',\n    APPLICATION_XML: 'application/xhtml+xml'\n};\n\n//Attributes\nconst DEFINITION_URL_ATTR = 'definitionurl';\nconst ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL';\nconst SVG_ATTRS_ADJUSTMENT_MAP = {\n    attributename: 'attributeName',\n    attributetype: 'attributeType',\n    basefrequency: 'baseFrequency',\n    baseprofile: 'baseProfile',\n    calcmode: 'calcMode',\n    clippathunits: 'clipPathUnits',\n    diffuseconstant: 'diffuseConstant',\n    edgemode: 'edgeMode',\n    filterunits: 'filterUnits',\n    glyphref: 'glyphRef',\n    gradienttransform: 'gradientTransform',\n    gradientunits: 'gradientUnits',\n    kernelmatrix: 'kernelMatrix',\n    kernelunitlength: 'kernelUnitLength',\n    keypoints: 'keyPoints',\n    keysplines: 'keySplines',\n    keytimes: 'keyTimes',\n    lengthadjust: 'lengthAdjust',\n    limitingconeangle: 'limitingConeAngle',\n    markerheight: 'markerHeight',\n    markerunits: 'markerUnits',\n    markerwidth: 'markerWidth',\n    maskcontentunits: 'maskContentUnits',\n    maskunits: 'maskUnits',\n    numoctaves: 'numOctaves',\n    pathlength: 'pathLength',\n    patterncontentunits: 'patternContentUnits',\n    patterntransform: 'patternTransform',\n    patternunits: 'patternUnits',\n    pointsatx: 'pointsAtX',\n    pointsaty: 'pointsAtY',\n    pointsatz: 'pointsAtZ',\n    preservealpha: 'preserveAlpha',\n    preserveaspectratio: 'preserveAspectRatio',\n    primitiveunits: 'primitiveUnits',\n    refx: 'refX',\n    refy: 'refY',\n    repeatcount: 'repeatCount',\n    repeatdur: 'repeatDur',\n    requiredextensions: 'requiredExtensions',\n    requiredfeatures: 'requiredFeatures',\n    specularconstant: 'specularConstant',\n    specularexponent: 'specularExponent',\n    spreadmethod: 'spreadMethod',\n    startoffset: 'startOffset',\n    stddeviation: 'stdDeviation',\n    stitchtiles: 'stitchTiles',\n    surfacescale: 'surfaceScale',\n    systemlanguage: 'systemLanguage',\n    tablevalues: 'tableValues',\n    targetx: 'targetX',\n    targety: 'targetY',\n    textlength: 'textLength',\n    viewbox: 'viewBox',\n    viewtarget: 'viewTarget',\n    xchannelselector: 'xChannelSelector',\n    ychannelselector: 'yChannelSelector',\n    zoomandpan: 'zoomAndPan'\n};\n\nconst XML_ATTRS_ADJUSTMENT_MAP = {\n    'xlink:actuate': { prefix: 'xlink', name: 'actuate', namespace: NS.XLINK },\n    'xlink:arcrole': { prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK },\n    'xlink:href': { prefix: 'xlink', name: 'href', namespace: NS.XLINK },\n    'xlink:role': { prefix: 'xlink', name: 'role', namespace: NS.XLINK },\n    'xlink:show': { prefix: 'xlink', name: 'show', namespace: NS.XLINK },\n    'xlink:title': { prefix: 'xlink', name: 'title', namespace: NS.XLINK },\n    'xlink:type': { prefix: 'xlink', name: 'type', namespace: NS.XLINK },\n    'xml:base': { prefix: 'xml', name: 'base', namespace: NS.XML },\n    'xml:lang': { prefix: 'xml', name: 'lang', namespace: NS.XML },\n    'xml:space': { prefix: 'xml', name: 'space', namespace: NS.XML },\n    xmlns: { prefix: '', name: 'xmlns', namespace: NS.XMLNS },\n    'xmlns:xlink': { prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS }\n};\n\n//SVG tag names adjustment map\nconst SVG_TAG_NAMES_ADJUSTMENT_MAP = (exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = {\n    altglyph: 'altGlyph',\n    altglyphdef: 'altGlyphDef',\n    altglyphitem: 'altGlyphItem',\n    animatecolor: 'animateColor',\n    animatemotion: 'animateMotion',\n    animatetransform: 'animateTransform',\n    clippath: 'clipPath',\n    feblend: 'feBlend',\n    fecolormatrix: 'feColorMatrix',\n    fecomponenttransfer: 'feComponentTransfer',\n    fecomposite: 'feComposite',\n    feconvolvematrix: 'feConvolveMatrix',\n    fediffuselighting: 'feDiffuseLighting',\n    fedisplacementmap: 'feDisplacementMap',\n    fedistantlight: 'feDistantLight',\n    feflood: 'feFlood',\n    fefunca: 'feFuncA',\n    fefuncb: 'feFuncB',\n    fefuncg: 'feFuncG',\n    fefuncr: 'feFuncR',\n    fegaussianblur: 'feGaussianBlur',\n    feimage: 'feImage',\n    femerge: 'feMerge',\n    femergenode: 'feMergeNode',\n    femorphology: 'feMorphology',\n    feoffset: 'feOffset',\n    fepointlight: 'fePointLight',\n    fespecularlighting: 'feSpecularLighting',\n    fespotlight: 'feSpotLight',\n    fetile: 'feTile',\n    feturbulence: 'feTurbulence',\n    foreignobject: 'foreignObject',\n    glyphref: 'glyphRef',\n    lineargradient: 'linearGradient',\n    radialgradient: 'radialGradient',\n    textpath: 'textPath'\n});\n\n//Tags that causes exit from foreign content\nconst EXITS_FOREIGN_CONTENT = {\n    [$.B]: true,\n    [$.BIG]: true,\n    [$.BLOCKQUOTE]: true,\n    [$.BODY]: true,\n    [$.BR]: true,\n    [$.CENTER]: true,\n    [$.CODE]: true,\n    [$.DD]: true,\n    [$.DIV]: true,\n    [$.DL]: true,\n    [$.DT]: true,\n    [$.EM]: true,\n    [$.EMBED]: true,\n    [$.H1]: true,\n    [$.H2]: true,\n    [$.H3]: true,\n    [$.H4]: true,\n    [$.H5]: true,\n    [$.H6]: true,\n    [$.HEAD]: true,\n    [$.HR]: true,\n    [$.I]: true,\n    [$.IMG]: true,\n    [$.LI]: true,\n    [$.LISTING]: true,\n    [$.MENU]: true,\n    [$.META]: true,\n    [$.NOBR]: true,\n    [$.OL]: true,\n    [$.P]: true,\n    [$.PRE]: true,\n    [$.RUBY]: true,\n    [$.S]: true,\n    [$.SMALL]: true,\n    [$.SPAN]: true,\n    [$.STRONG]: true,\n    [$.STRIKE]: true,\n    [$.SUB]: true,\n    [$.SUP]: true,\n    [$.TABLE]: true,\n    [$.TT]: true,\n    [$.U]: true,\n    [$.UL]: true,\n    [$.VAR]: true\n};\n\n//Check exit from foreign content\nexports.causesExit = function(startTagToken) {\n    const tn = startTagToken.tagName;\n    const isFontWithAttrs =\n        tn === $.FONT &&\n        (Tokenizer.getTokenAttr(startTagToken, ATTRS.COLOR) !== null ||\n            Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null ||\n            Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null);\n\n    return isFontWithAttrs ? true : EXITS_FOREIGN_CONTENT[tn];\n};\n\n//Token adjustments\nexports.adjustTokenMathMLAttrs = function(token) {\n    for (let i = 0; i < token.attrs.length; i++) {\n        if (token.attrs[i].name === DEFINITION_URL_ATTR) {\n            token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;\n            break;\n        }\n    }\n};\n\nexports.adjustTokenSVGAttrs = function(token) {\n    for (let i = 0; i < token.attrs.length; i++) {\n        const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name];\n\n        if (adjustedAttrName) {\n            token.attrs[i].name = adjustedAttrName;\n        }\n    }\n};\n\nexports.adjustTokenXMLAttrs = function(token) {\n    for (let i = 0; i < token.attrs.length; i++) {\n        const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name];\n\n        if (adjustedAttrEntry) {\n            token.attrs[i].prefix = adjustedAttrEntry.prefix;\n            token.attrs[i].name = adjustedAttrEntry.name;\n            token.attrs[i].namespace = adjustedAttrEntry.namespace;\n        }\n    }\n};\n\nexports.adjustTokenSVGTagName = function(token) {\n    const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP[token.tagName];\n\n    if (adjustedTagName) {\n        token.tagName = adjustedTagName;\n    }\n};\n\n//Integration points\nfunction isMathMLTextIntegrationPoint(tn, ns) {\n    return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT);\n}\n\nfunction isHtmlIntegrationPoint(tn, ns, attrs) {\n    if (ns === NS.MATHML && tn === $.ANNOTATION_XML) {\n        for (let i = 0; i < attrs.length; i++) {\n            if (attrs[i].name === ATTRS.ENCODING) {\n                const value = attrs[i].value.toLowerCase();\n\n                return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;\n            }\n        }\n    }\n\n    return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE);\n}\n\nexports.isIntegrationPoint = function(tn, ns, attrs, foreignNS) {\n    if ((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) {\n        return true;\n    }\n\n    if ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)) {\n        return true;\n    }\n\n    return false;\n};\n", "'use strict';\n\nconst Tokenizer = require('../tokenizer');\nconst OpenElementStack = require('./open-element-stack');\nconst FormattingElementList = require('./formatting-element-list');\nconst LocationInfoParserMixin = require('../extensions/location-info/parser-mixin');\nconst ErrorReportingParserMixin = require('../extensions/error-reporting/parser-mixin');\nconst Mixin = require('../utils/mixin');\nconst defaultTreeAdapter = require('../tree-adapters/default');\nconst mergeOptions = require('../utils/merge-options');\nconst doctype = require('../common/doctype');\nconst foreignContent = require('../common/foreign-content');\nconst ERR = require('../common/error-codes');\nconst unicode = require('../common/unicode');\nconst HTML = require('../common/html');\n\n//Aliases\nconst $ = HTML.TAG_NAMES;\nconst NS = HTML.NAMESPACES;\nconst ATTRS = HTML.ATTRS;\n\nconst DEFAULT_OPTIONS = {\n    scriptingEnabled: true,\n    sourceCodeLocationInfo: false,\n    onParseError: null,\n    treeAdapter: defaultTreeAdapter\n};\n\n//Misc constants\nconst HIDDEN_INPUT_TYPE = 'hidden';\n\n//Adoption agency loops iteration count\nconst AA_OUTER_LOOP_ITER = 8;\nconst AA_INNER_LOOP_ITER = 3;\n\n//Insertion modes\nconst INITIAL_MODE = 'INITIAL_MODE';\nconst BEFORE_HTML_MODE = 'BEFORE_HTML_MODE';\nconst BEFORE_HEAD_MODE = 'BEFORE_HEAD_MODE';\nconst IN_HEAD_MODE = 'IN_HEAD_MODE';\nconst IN_HEAD_NO_SCRIPT_MODE = 'IN_HEAD_NO_SCRIPT_MODE';\nconst AFTER_HEAD_MODE = 'AFTER_HEAD_MODE';\nconst IN_BODY_MODE = 'IN_BODY_MODE';\nconst TEXT_MODE = 'TEXT_MODE';\nconst IN_TABLE_MODE = 'IN_TABLE_MODE';\nconst IN_TABLE_TEXT_MODE = 'IN_TABLE_TEXT_MODE';\nconst IN_CAPTION_MODE = 'IN_CAPTION_MODE';\nconst IN_COLUMN_GROUP_MODE = 'IN_COLUMN_GROUP_MODE';\nconst IN_TABLE_BODY_MODE = 'IN_TABLE_BODY_MODE';\nconst IN_ROW_MODE = 'IN_ROW_MODE';\nconst IN_CELL_MODE = 'IN_CELL_MODE';\nconst IN_SELECT_MODE = 'IN_SELECT_MODE';\nconst IN_SELECT_IN_TABLE_MODE = 'IN_SELECT_IN_TABLE_MODE';\nconst IN_TEMPLATE_MODE = 'IN_TEMPLATE_MODE';\nconst AFTER_BODY_MODE = 'AFTER_BODY_MODE';\nconst IN_FRAMESET_MODE = 'IN_FRAMESET_MODE';\nconst AFTER_FRAMESET_MODE = 'AFTER_FRAMESET_MODE';\nconst AFTER_AFTER_BODY_MODE = 'AFTER_AFTER_BODY_MODE';\nconst AFTER_AFTER_FRAMESET_MODE = 'AFTER_AFTER_FRAMESET_MODE';\n\n//Insertion mode reset map\nconst INSERTION_MODE_RESET_MAP = {\n    [$.TR]: IN_ROW_MODE,\n    [$.TBODY]: IN_TABLE_BODY_MODE,\n    [$.THEAD]: IN_TABLE_BODY_MODE,\n    [$.TFOOT]: IN_TABLE_BODY_MODE,\n    [$.CAPTION]: IN_CAPTION_MODE,\n    [$.COLGROUP]: IN_COLUMN_GROUP_MODE,\n    [$.TABLE]: IN_TABLE_MODE,\n    [$.BODY]: IN_BODY_MODE,\n    [$.FRAMESET]: IN_FRAMESET_MODE\n};\n\n//Template insertion mode switch map\nconst TEMPLATE_INSERTION_MODE_SWITCH_MAP = {\n    [$.CAPTION]: IN_TABLE_MODE,\n    [$.COLGROUP]: IN_TABLE_MODE,\n    [$.TBODY]: IN_TABLE_MODE,\n    [$.TFOOT]: IN_TABLE_MODE,\n    [$.THEAD]: IN_TABLE_MODE,\n    [$.COL]: IN_COLUMN_GROUP_MODE,\n    [$.TR]: IN_TABLE_BODY_MODE,\n    [$.TD]: IN_ROW_MODE,\n    [$.TH]: IN_ROW_MODE\n};\n\n//Token handlers map for insertion modes\nconst TOKEN_HANDLERS = {\n    [INITIAL_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenInInitialMode,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenInInitialMode,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: doctypeInInitialMode,\n        [Tokenizer.START_TAG_TOKEN]: tokenInInitialMode,\n        [Tokenizer.END_TAG_TOKEN]: tokenInInitialMode,\n        [Tokenizer.EOF_TOKEN]: tokenInInitialMode\n    },\n    [BEFORE_HTML_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenBeforeHtml,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenBeforeHtml,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagBeforeHtml,\n        [Tokenizer.END_TAG_TOKEN]: endTagBeforeHtml,\n        [Tokenizer.EOF_TOKEN]: tokenBeforeHtml\n    },\n    [BEFORE_HEAD_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenBeforeHead,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenBeforeHead,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: misplacedDoctype,\n        [Tokenizer.START_TAG_TOKEN]: startTagBeforeHead,\n        [Tokenizer.END_TAG_TOKEN]: endTagBeforeHead,\n        [Tokenizer.EOF_TOKEN]: tokenBeforeHead\n    },\n    [IN_HEAD_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenInHead,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenInHead,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: misplacedDoctype,\n        [Tokenizer.START_TAG_TOKEN]: startTagInHead,\n        [Tokenizer.END_TAG_TOKEN]: endTagInHead,\n        [Tokenizer.EOF_TOKEN]: tokenInHead\n    },\n    [IN_HEAD_NO_SCRIPT_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenInHeadNoScript,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenInHeadNoScript,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: misplacedDoctype,\n        [Tokenizer.START_TAG_TOKEN]: startTagInHeadNoScript,\n        [Tokenizer.END_TAG_TOKEN]: endTagInHeadNoScript,\n        [Tokenizer.EOF_TOKEN]: tokenInHeadNoScript\n    },\n    [AFTER_HEAD_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenAfterHead,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenAfterHead,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: misplacedDoctype,\n        [Tokenizer.START_TAG_TOKEN]: startTagAfterHead,\n        [Tokenizer.END_TAG_TOKEN]: endTagAfterHead,\n        [Tokenizer.EOF_TOKEN]: tokenAfterHead\n    },\n    [IN_BODY_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: characterInBody,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInBody,\n        [Tokenizer.END_TAG_TOKEN]: endTagInBody,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [TEXT_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: ignoreToken,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: ignoreToken,\n        [Tokenizer.END_TAG_TOKEN]: endTagInText,\n        [Tokenizer.EOF_TOKEN]: eofInText\n    },\n    [IN_TABLE_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInTable,\n        [Tokenizer.END_TAG_TOKEN]: endTagInTable,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [IN_TABLE_TEXT_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: characterInTableText,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInTableText,\n        [Tokenizer.COMMENT_TOKEN]: tokenInTableText,\n        [Tokenizer.DOCTYPE_TOKEN]: tokenInTableText,\n        [Tokenizer.START_TAG_TOKEN]: tokenInTableText,\n        [Tokenizer.END_TAG_TOKEN]: tokenInTableText,\n        [Tokenizer.EOF_TOKEN]: tokenInTableText\n    },\n    [IN_CAPTION_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: characterInBody,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInCaption,\n        [Tokenizer.END_TAG_TOKEN]: endTagInCaption,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [IN_COLUMN_GROUP_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenInColumnGroup,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenInColumnGroup,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInColumnGroup,\n        [Tokenizer.END_TAG_TOKEN]: endTagInColumnGroup,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [IN_TABLE_BODY_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInTableBody,\n        [Tokenizer.END_TAG_TOKEN]: endTagInTableBody,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [IN_ROW_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: characterInTable,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInRow,\n        [Tokenizer.END_TAG_TOKEN]: endTagInRow,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [IN_CELL_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: characterInBody,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInCell,\n        [Tokenizer.END_TAG_TOKEN]: endTagInCell,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [IN_SELECT_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInSelect,\n        [Tokenizer.END_TAG_TOKEN]: endTagInSelect,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [IN_SELECT_IN_TABLE_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInSelectInTable,\n        [Tokenizer.END_TAG_TOKEN]: endTagInSelectInTable,\n        [Tokenizer.EOF_TOKEN]: eofInBody\n    },\n    [IN_TEMPLATE_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: characterInBody,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInTemplate,\n        [Tokenizer.END_TAG_TOKEN]: endTagInTemplate,\n        [Tokenizer.EOF_TOKEN]: eofInTemplate\n    },\n    [AFTER_BODY_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenAfterBody,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenAfterBody,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n        [Tokenizer.COMMENT_TOKEN]: appendCommentToRootHtmlElement,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagAfterBody,\n        [Tokenizer.END_TAG_TOKEN]: endTagAfterBody,\n        [Tokenizer.EOF_TOKEN]: stopParsing\n    },\n    [IN_FRAMESET_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagInFrameset,\n        [Tokenizer.END_TAG_TOKEN]: endTagInFrameset,\n        [Tokenizer.EOF_TOKEN]: stopParsing\n    },\n    [AFTER_FRAMESET_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n        [Tokenizer.COMMENT_TOKEN]: appendComment,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagAfterFrameset,\n        [Tokenizer.END_TAG_TOKEN]: endTagAfterFrameset,\n        [Tokenizer.EOF_TOKEN]: stopParsing\n    },\n    [AFTER_AFTER_BODY_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: tokenAfterAfterBody,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: tokenAfterAfterBody,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n        [Tokenizer.COMMENT_TOKEN]: appendCommentToDocument,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagAfterAfterBody,\n        [Tokenizer.END_TAG_TOKEN]: tokenAfterAfterBody,\n        [Tokenizer.EOF_TOKEN]: stopParsing\n    },\n    [AFTER_AFTER_FRAMESET_MODE]: {\n        [Tokenizer.CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n        [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n        [Tokenizer.COMMENT_TOKEN]: appendCommentToDocument,\n        [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n        [Tokenizer.START_TAG_TOKEN]: startTagAfterAfterFrameset,\n        [Tokenizer.END_TAG_TOKEN]: ignoreToken,\n        [Tokenizer.EOF_TOKEN]: stopParsing\n    }\n};\n\n//Parser\nclass Parser {\n    constructor(options) {\n        this.options = mergeOptions(DEFAULT_OPTIONS, options);\n\n        this.treeAdapter = this.options.treeAdapter;\n        this.pendingScript = null;\n\n        if (this.options.sourceCodeLocationInfo) {\n            Mixin.install(this, LocationInfoParserMixin);\n        }\n\n        if (this.options.onParseError) {\n            Mixin.install(this, ErrorReportingParserMixin, { onParseError: this.options.onParseError });\n        }\n    }\n\n    // API\n    parse(html) {\n        const document = this.treeAdapter.createDocument();\n\n        this._bootstrap(document, null);\n        this.tokenizer.write(html, true);\n        this._runParsingLoop(null);\n\n        return document;\n    }\n\n    parseFragment(html, fragmentContext) {\n        //NOTE: use <template> element as a fragment context if context element was not provided,\n        //so we will parse in \"forgiving\" manner\n        if (!fragmentContext) {\n            fragmentContext = this.treeAdapter.createElement($.TEMPLATE, NS.HTML, []);\n        }\n\n        //NOTE: create fake element which will be used as 'document' for fragment parsing.\n        //This is important for jsdom there 'document' can't be recreated, therefore\n        //fragment parsing causes messing of the main `document`.\n        const documentMock = this.treeAdapter.createElement('documentmock', NS.HTML, []);\n\n        this._bootstrap(documentMock, fragmentContext);\n\n        if (this.treeAdapter.getTagName(fragmentContext) === $.TEMPLATE) {\n            this._pushTmplInsertionMode(IN_TEMPLATE_MODE);\n        }\n\n        this._initTokenizerForFragmentParsing();\n        this._insertFakeRootElement();\n        this._resetInsertionMode();\n        this._findFormInFragmentContext();\n        this.tokenizer.write(html, true);\n        this._runParsingLoop(null);\n\n        const rootElement = this.treeAdapter.getFirstChild(documentMock);\n        const fragment = this.treeAdapter.createDocumentFragment();\n\n        this._adoptNodes(rootElement, fragment);\n\n        return fragment;\n    }\n\n    //Bootstrap parser\n    _bootstrap(document, fragmentContext) {\n        this.tokenizer = new Tokenizer(this.options);\n\n        this.stopped = false;\n\n        this.insertionMode = INITIAL_MODE;\n        this.originalInsertionMode = '';\n\n        this.document = document;\n        this.fragmentContext = fragmentContext;\n\n        this.headElement = null;\n        this.formElement = null;\n\n        this.openElements = new OpenElementStack(this.document, this.treeAdapter);\n        this.activeFormattingElements = new FormattingElementList(this.treeAdapter);\n\n        this.tmplInsertionModeStack = [];\n        this.tmplInsertionModeStackTop = -1;\n        this.currentTmplInsertionMode = null;\n\n        this.pendingCharacterTokens = [];\n        this.hasNonWhitespacePendingCharacterToken = false;\n\n        this.framesetOk = true;\n        this.skipNextNewLine = false;\n        this.fosterParentingEnabled = false;\n    }\n\n    //Errors\n    _err() {\n        // NOTE: err reporting is noop by default. Enabled by mixin.\n    }\n\n    //Parsing loop\n    _runParsingLoop(scriptHandler) {\n        while (!this.stopped) {\n            this._setupTokenizerCDATAMode();\n\n            const token = this.tokenizer.getNextToken();\n\n            if (token.type === Tokenizer.HIBERNATION_TOKEN) {\n                break;\n            }\n\n            if (this.skipNextNewLine) {\n                this.skipNextNewLine = false;\n\n                if (token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN && token.chars[0] === '\\n') {\n                    if (token.chars.length === 1) {\n                        continue;\n                    }\n\n                    token.chars = token.chars.substr(1);\n                }\n            }\n\n            this._processInputToken(token);\n\n            if (scriptHandler && this.pendingScript) {\n                break;\n            }\n        }\n    }\n\n    runParsingLoopForCurrentChunk(writeCallback, scriptHandler) {\n        this._runParsingLoop(scriptHandler);\n\n        if (scriptHandler && this.pendingScript) {\n            const script = this.pendingScript;\n\n            this.pendingScript = null;\n\n            scriptHandler(script);\n\n            return;\n        }\n\n        if (writeCallback) {\n            writeCallback();\n        }\n    }\n\n    //Text parsing\n    _setupTokenizerCDATAMode() {\n        const current = this._getAdjustedCurrentElement();\n\n        this.tokenizer.allowCDATA =\n            current &&\n            current !== this.document &&\n            this.treeAdapter.getNamespaceURI(current) !== NS.HTML &&\n            !this._isIntegrationPoint(current);\n    }\n\n    _switchToTextParsing(currentToken, nextTokenizerState) {\n        this._insertElement(currentToken, NS.HTML);\n        this.tokenizer.state = nextTokenizerState;\n        this.originalInsertionMode = this.insertionMode;\n        this.insertionMode = TEXT_MODE;\n    }\n\n    switchToPlaintextParsing() {\n        this.insertionMode = TEXT_MODE;\n        this.originalInsertionMode = IN_BODY_MODE;\n        this.tokenizer.state = Tokenizer.MODE.PLAINTEXT;\n    }\n\n    //Fragment parsing\n    _getAdjustedCurrentElement() {\n        return this.openElements.stackTop === 0 && this.fragmentContext\n            ? this.fragmentContext\n            : this.openElements.current;\n    }\n\n    _findFormInFragmentContext() {\n        let node = this.fragmentContext;\n\n        do {\n            if (this.treeAdapter.getTagName(node) === $.FORM) {\n                this.formElement = node;\n                break;\n            }\n\n            node = this.treeAdapter.getParentNode(node);\n        } while (node);\n    }\n\n    _initTokenizerForFragmentParsing() {\n        if (this.treeAdapter.getNamespaceURI(this.fragmentContext) === NS.HTML) {\n            const tn = this.treeAdapter.getTagName(this.fragmentContext);\n\n            if (tn === $.TITLE || tn === $.TEXTAREA) {\n                this.tokenizer.state = Tokenizer.MODE.RCDATA;\n            } else if (\n                tn === $.STYLE ||\n                tn === $.XMP ||\n                tn === $.IFRAME ||\n                tn === $.NOEMBED ||\n                tn === $.NOFRAMES ||\n                tn === $.NOSCRIPT\n            ) {\n                this.tokenizer.state = Tokenizer.MODE.RAWTEXT;\n            } else if (tn === $.SCRIPT) {\n                this.tokenizer.state = Tokenizer.MODE.SCRIPT_DATA;\n            } else if (tn === $.PLAINTEXT) {\n                this.tokenizer.state = Tokenizer.MODE.PLAINTEXT;\n            }\n        }\n    }\n\n    //Tree mutation\n    _setDocumentType(token) {\n        const name = token.name || '';\n        const publicId = token.publicId || '';\n        const systemId = token.systemId || '';\n\n        this.treeAdapter.setDocumentType(this.document, name, publicId, systemId);\n    }\n\n    _attachElementToTree(element) {\n        if (this._shouldFosterParentOnInsertion()) {\n            this._fosterParentElement(element);\n        } else {\n            const parent = this.openElements.currentTmplContent || this.openElements.current;\n\n            this.treeAdapter.appendChild(parent, element);\n        }\n    }\n\n    _appendElement(token, namespaceURI) {\n        const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);\n\n        this._attachElementToTree(element);\n    }\n\n    _insertElement(token, namespaceURI) {\n        const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);\n\n        this._attachElementToTree(element);\n        this.openElements.push(element);\n    }\n\n    _insertFakeElement(tagName) {\n        const element = this.treeAdapter.createElement(tagName, NS.HTML, []);\n\n        this._attachElementToTree(element);\n        this.openElements.push(element);\n    }\n\n    _insertTemplate(token) {\n        const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);\n        const content = this.treeAdapter.createDocumentFragment();\n\n        this.treeAdapter.setTemplateContent(tmpl, content);\n        this._attachElementToTree(tmpl);\n        this.openElements.push(tmpl);\n    }\n\n    _insertFakeRootElement() {\n        const element = this.treeAdapter.createElement($.HTML, NS.HTML, []);\n\n        this.treeAdapter.appendChild(this.openElements.current, element);\n        this.openElements.push(element);\n    }\n\n    _appendCommentNode(token, parent) {\n        const commentNode = this.treeAdapter.createCommentNode(token.data);\n\n        this.treeAdapter.appendChild(parent, commentNode);\n    }\n\n    _insertCharacters(token) {\n        if (this._shouldFosterParentOnInsertion()) {\n            this._fosterParentText(token.chars);\n        } else {\n            const parent = this.openElements.currentTmplContent || this.openElements.current;\n\n            this.treeAdapter.insertText(parent, token.chars);\n        }\n    }\n\n    _adoptNodes(donor, recipient) {\n        for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) {\n            this.treeAdapter.detachNode(child);\n            this.treeAdapter.appendChild(recipient, child);\n        }\n    }\n\n    //Token processing\n    _shouldProcessTokenInForeignContent(token) {\n        const current = this._getAdjustedCurrentElement();\n\n        if (!current || current === this.document) {\n            return false;\n        }\n\n        const ns = this.treeAdapter.getNamespaceURI(current);\n\n        if (ns === NS.HTML) {\n            return false;\n        }\n\n        if (\n            this.treeAdapter.getTagName(current) === $.ANNOTATION_XML &&\n            ns === NS.MATHML &&\n            token.type === Tokenizer.START_TAG_TOKEN &&\n            token.tagName === $.SVG\n        ) {\n            return false;\n        }\n\n        const isCharacterToken =\n            token.type === Tokenizer.CHARACTER_TOKEN ||\n            token.type === Tokenizer.NULL_CHARACTER_TOKEN ||\n            token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN;\n\n        const isMathMLTextStartTag =\n            token.type === Tokenizer.START_TAG_TOKEN && token.tagName !== $.MGLYPH && token.tagName !== $.MALIGNMARK;\n\n        if ((isMathMLTextStartTag || isCharacterToken) && this._isIntegrationPoint(current, NS.MATHML)) {\n            return false;\n        }\n\n        if (\n            (token.type === Tokenizer.START_TAG_TOKEN || isCharacterToken) &&\n            this._isIntegrationPoint(current, NS.HTML)\n        ) {\n            return false;\n        }\n\n        return token.type !== Tokenizer.EOF_TOKEN;\n    }\n\n    _processToken(token) {\n        TOKEN_HANDLERS[this.insertionMode][token.type](this, token);\n    }\n\n    _processTokenInBodyMode(token) {\n        TOKEN_HANDLERS[IN_BODY_MODE][token.type](this, token);\n    }\n\n    _processTokenInForeignContent(token) {\n        if (token.type === Tokenizer.CHARACTER_TOKEN) {\n            characterInForeignContent(this, token);\n        } else if (token.type === Tokenizer.NULL_CHARACTER_TOKEN) {\n            nullCharacterInForeignContent(this, token);\n        } else if (token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN) {\n            insertCharacters(this, token);\n        } else if (token.type === Tokenizer.COMMENT_TOKEN) {\n            appendComment(this, token);\n        } else if (token.type === Tokenizer.START_TAG_TOKEN) {\n            startTagInForeignContent(this, token);\n        } else if (token.type === Tokenizer.END_TAG_TOKEN) {\n            endTagInForeignContent(this, token);\n        }\n    }\n\n    _processInputToken(token) {\n        if (this._shouldProcessTokenInForeignContent(token)) {\n            this._processTokenInForeignContent(token);\n        } else {\n            this._processToken(token);\n        }\n\n        if (token.type === Tokenizer.START_TAG_TOKEN && token.selfClosing && !token.ackSelfClosing) {\n            this._err(ERR.nonVoidHtmlElementStartTagWithTrailingSolidus);\n        }\n    }\n\n    //Integration points\n    _isIntegrationPoint(element, foreignNS) {\n        const tn = this.treeAdapter.getTagName(element);\n        const ns = this.treeAdapter.getNamespaceURI(element);\n        const attrs = this.treeAdapter.getAttrList(element);\n\n        return foreignContent.isIntegrationPoint(tn, ns, attrs, foreignNS);\n    }\n\n    //Active formatting elements reconstruction\n    _reconstructActiveFormattingElements() {\n        const listLength = this.activeFormattingElements.length;\n\n        if (listLength) {\n            let unopenIdx = listLength;\n            let entry = null;\n\n            do {\n                unopenIdx--;\n                entry = this.activeFormattingElements.entries[unopenIdx];\n\n                if (entry.type === FormattingElementList.MARKER_ENTRY || this.openElements.contains(entry.element)) {\n                    unopenIdx++;\n                    break;\n                }\n            } while (unopenIdx > 0);\n\n            for (let i = unopenIdx; i < listLength; i++) {\n                entry = this.activeFormattingElements.entries[i];\n                this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));\n                entry.element = this.openElements.current;\n            }\n        }\n    }\n\n    //Close elements\n    _closeTableCell() {\n        this.openElements.generateImpliedEndTags();\n        this.openElements.popUntilTableCellPopped();\n        this.activeFormattingElements.clearToLastMarker();\n        this.insertionMode = IN_ROW_MODE;\n    }\n\n    _closePElement() {\n        this.openElements.generateImpliedEndTagsWithExclusion($.P);\n        this.openElements.popUntilTagNamePopped($.P);\n    }\n\n    //Insertion modes\n    _resetInsertionMode() {\n        for (let i = this.openElements.stackTop, last = false; i >= 0; i--) {\n            let element = this.openElements.items[i];\n\n            if (i === 0) {\n                last = true;\n\n                if (this.fragmentContext) {\n                    element = this.fragmentContext;\n                }\n            }\n\n            const tn = this.treeAdapter.getTagName(element);\n            const newInsertionMode = INSERTION_MODE_RESET_MAP[tn];\n\n            if (newInsertionMode) {\n                this.insertionMode = newInsertionMode;\n                break;\n            } else if (!last && (tn === $.TD || tn === $.TH)) {\n                this.insertionMode = IN_CELL_MODE;\n                break;\n            } else if (!last && tn === $.HEAD) {\n                this.insertionMode = IN_HEAD_MODE;\n                break;\n            } else if (tn === $.SELECT) {\n                this._resetInsertionModeForSelect(i);\n                break;\n            } else if (tn === $.TEMPLATE) {\n                this.insertionMode = this.currentTmplInsertionMode;\n                break;\n            } else if (tn === $.HTML) {\n                this.insertionMode = this.headElement ? AFTER_HEAD_MODE : BEFORE_HEAD_MODE;\n                break;\n            } else if (last) {\n                this.insertionMode = IN_BODY_MODE;\n                break;\n            }\n        }\n    }\n\n    _resetInsertionModeForSelect(selectIdx) {\n        if (selectIdx > 0) {\n            for (let i = selectIdx - 1; i > 0; i--) {\n                const ancestor = this.openElements.items[i];\n                const tn = this.treeAdapter.getTagName(ancestor);\n\n                if (tn === $.TEMPLATE) {\n                    break;\n                } else if (tn === $.TABLE) {\n                    this.insertionMode = IN_SELECT_IN_TABLE_MODE;\n                    return;\n                }\n            }\n        }\n\n        this.insertionMode = IN_SELECT_MODE;\n    }\n\n    _pushTmplInsertionMode(mode) {\n        this.tmplInsertionModeStack.push(mode);\n        this.tmplInsertionModeStackTop++;\n        this.currentTmplInsertionMode = mode;\n    }\n\n    _popTmplInsertionMode() {\n        this.tmplInsertionModeStack.pop();\n        this.tmplInsertionModeStackTop--;\n        this.currentTmplInsertionMode = this.tmplInsertionModeStack[this.tmplInsertionModeStackTop];\n    }\n\n    //Foster parenting\n    _isElementCausesFosterParenting(element) {\n        const tn = this.treeAdapter.getTagName(element);\n\n        return tn === $.TABLE || tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD || tn === $.TR;\n    }\n\n    _shouldFosterParentOnInsertion() {\n        return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.current);\n    }\n\n    _findFosterParentingLocation() {\n        const location = {\n            parent: null,\n            beforeElement: null\n        };\n\n        for (let i = this.openElements.stackTop; i >= 0; i--) {\n            const openElement = this.openElements.items[i];\n            const tn = this.treeAdapter.getTagName(openElement);\n            const ns = this.treeAdapter.getNamespaceURI(openElement);\n\n            if (tn === $.TEMPLATE && ns === NS.HTML) {\n                location.parent = this.treeAdapter.getTemplateContent(openElement);\n                break;\n            } else if (tn === $.TABLE) {\n                location.parent = this.treeAdapter.getParentNode(openElement);\n\n                if (location.parent) {\n                    location.beforeElement = openElement;\n                } else {\n                    location.parent = this.openElements.items[i - 1];\n                }\n\n                break;\n            }\n        }\n\n        if (!location.parent) {\n            location.parent = this.openElements.items[0];\n        }\n\n        return location;\n    }\n\n    _fosterParentElement(element) {\n        const location = this._findFosterParentingLocation();\n\n        if (location.beforeElement) {\n            this.treeAdapter.insertBefore(location.parent, element, location.beforeElement);\n        } else {\n            this.treeAdapter.appendChild(location.parent, element);\n        }\n    }\n\n    _fosterParentText(chars) {\n        const location = this._findFosterParentingLocation();\n\n        if (location.beforeElement) {\n            this.treeAdapter.insertTextBefore(location.parent, chars, location.beforeElement);\n        } else {\n            this.treeAdapter.insertText(location.parent, chars);\n        }\n    }\n\n    //Special elements\n    _isSpecialElement(element) {\n        const tn = this.treeAdapter.getTagName(element);\n        const ns = this.treeAdapter.getNamespaceURI(element);\n\n        return HTML.SPECIAL_ELEMENTS[ns][tn];\n    }\n}\n\nmodule.exports = Parser;\n\n//Adoption agency algorithm\n//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adoptionAgency)\n//------------------------------------------------------------------\n\n//Steps 5-8 of the algorithm\nfunction aaObtainFormattingElementEntry(p, token) {\n    let formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);\n\n    if (formattingElementEntry) {\n        if (!p.openElements.contains(formattingElementEntry.element)) {\n            p.activeFormattingElements.removeEntry(formattingElementEntry);\n            formattingElementEntry = null;\n        } else if (!p.openElements.hasInScope(token.tagName)) {\n            formattingElementEntry = null;\n        }\n    } else {\n        genericEndTagInBody(p, token);\n    }\n\n    return formattingElementEntry;\n}\n\n//Steps 9 and 10 of the algorithm\nfunction aaObtainFurthestBlock(p, formattingElementEntry) {\n    let furthestBlock = null;\n\n    for (let i = p.openElements.stackTop; i >= 0; i--) {\n        const element = p.openElements.items[i];\n\n        if (element === formattingElementEntry.element) {\n            break;\n        }\n\n        if (p._isSpecialElement(element)) {\n            furthestBlock = element;\n        }\n    }\n\n    if (!furthestBlock) {\n        p.openElements.popUntilElementPopped(formattingElementEntry.element);\n        p.activeFormattingElements.removeEntry(formattingElementEntry);\n    }\n\n    return furthestBlock;\n}\n\n//Step 13 of the algorithm\nfunction aaInnerLoop(p, furthestBlock, formattingElement) {\n    let lastElement = furthestBlock;\n    let nextElement = p.openElements.getCommonAncestor(furthestBlock);\n\n    for (let i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) {\n        //NOTE: store next element for the next loop iteration (it may be deleted from the stack by step 9.5)\n        nextElement = p.openElements.getCommonAncestor(element);\n\n        const elementEntry = p.activeFormattingElements.getElementEntry(element);\n        const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;\n        const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;\n\n        if (shouldRemoveFromOpenElements) {\n            if (counterOverflow) {\n                p.activeFormattingElements.removeEntry(elementEntry);\n            }\n\n            p.openElements.remove(element);\n        } else {\n            element = aaRecreateElementFromEntry(p, elementEntry);\n\n            if (lastElement === furthestBlock) {\n                p.activeFormattingElements.bookmark = elementEntry;\n            }\n\n            p.treeAdapter.detachNode(lastElement);\n            p.treeAdapter.appendChild(element, lastElement);\n            lastElement = element;\n        }\n    }\n\n    return lastElement;\n}\n\n//Step 13.7 of the algorithm\nfunction aaRecreateElementFromEntry(p, elementEntry) {\n    const ns = p.treeAdapter.getNamespaceURI(elementEntry.element);\n    const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);\n\n    p.openElements.replace(elementEntry.element, newElement);\n    elementEntry.element = newElement;\n\n    return newElement;\n}\n\n//Step 14 of the algorithm\nfunction aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {\n    if (p._isElementCausesFosterParenting(commonAncestor)) {\n        p._fosterParentElement(lastElement);\n    } else {\n        const tn = p.treeAdapter.getTagName(commonAncestor);\n        const ns = p.treeAdapter.getNamespaceURI(commonAncestor);\n\n        if (tn === $.TEMPLATE && ns === NS.HTML) {\n            commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor);\n        }\n\n        p.treeAdapter.appendChild(commonAncestor, lastElement);\n    }\n}\n\n//Steps 15-19 of the algorithm\nfunction aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {\n    const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);\n    const token = formattingElementEntry.token;\n    const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);\n\n    p._adoptNodes(furthestBlock, newElement);\n    p.treeAdapter.appendChild(furthestBlock, newElement);\n\n    p.activeFormattingElements.insertElementAfterBookmark(newElement, formattingElementEntry.token);\n    p.activeFormattingElements.removeEntry(formattingElementEntry);\n\n    p.openElements.remove(formattingElementEntry.element);\n    p.openElements.insertAfter(furthestBlock, newElement);\n}\n\n//Algorithm entry point\nfunction callAdoptionAgency(p, token) {\n    let formattingElementEntry;\n\n    for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) {\n        formattingElementEntry = aaObtainFormattingElementEntry(p, token, formattingElementEntry);\n\n        if (!formattingElementEntry) {\n            break;\n        }\n\n        const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);\n\n        if (!furthestBlock) {\n            break;\n        }\n\n        p.activeFormattingElements.bookmark = formattingElementEntry;\n\n        const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element);\n        const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);\n\n        p.treeAdapter.detachNode(lastElement);\n        aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement);\n        aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry);\n    }\n}\n\n//Generic token handlers\n//------------------------------------------------------------------\nfunction ignoreToken() {\n    //NOTE: do nothing =)\n}\n\nfunction misplacedDoctype(p) {\n    p._err(ERR.misplacedDoctype);\n}\n\nfunction appendComment(p, token) {\n    p._appendCommentNode(token, p.openElements.currentTmplContent || p.openElements.current);\n}\n\nfunction appendCommentToRootHtmlElement(p, token) {\n    p._appendCommentNode(token, p.openElements.items[0]);\n}\n\nfunction appendCommentToDocument(p, token) {\n    p._appendCommentNode(token, p.document);\n}\n\nfunction insertCharacters(p, token) {\n    p._insertCharacters(token);\n}\n\nfunction stopParsing(p) {\n    p.stopped = true;\n}\n\n// The \"initial\" insertion mode\n//------------------------------------------------------------------\nfunction doctypeInInitialMode(p, token) {\n    p._setDocumentType(token);\n\n    const mode = token.forceQuirks ? HTML.DOCUMENT_MODE.QUIRKS : doctype.getDocumentMode(token);\n\n    if (!doctype.isConforming(token)) {\n        p._err(ERR.nonConformingDoctype);\n    }\n\n    p.treeAdapter.setDocumentMode(p.document, mode);\n\n    p.insertionMode = BEFORE_HTML_MODE;\n}\n\nfunction tokenInInitialMode(p, token) {\n    p._err(ERR.missingDoctype, { beforeToken: true });\n    p.treeAdapter.setDocumentMode(p.document, HTML.DOCUMENT_MODE.QUIRKS);\n    p.insertionMode = BEFORE_HTML_MODE;\n    p._processToken(token);\n}\n\n// The \"before html\" insertion mode\n//------------------------------------------------------------------\nfunction startTagBeforeHtml(p, token) {\n    if (token.tagName === $.HTML) {\n        p._insertElement(token, NS.HTML);\n        p.insertionMode = BEFORE_HEAD_MODE;\n    } else {\n        tokenBeforeHtml(p, token);\n    }\n}\n\nfunction endTagBeforeHtml(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML || tn === $.HEAD || tn === $.BODY || tn === $.BR) {\n        tokenBeforeHtml(p, token);\n    }\n}\n\nfunction tokenBeforeHtml(p, token) {\n    p._insertFakeRootElement();\n    p.insertionMode = BEFORE_HEAD_MODE;\n    p._processToken(token);\n}\n\n// The \"before head\" insertion mode\n//------------------------------------------------------------------\nfunction startTagBeforeHead(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (tn === $.HEAD) {\n        p._insertElement(token, NS.HTML);\n        p.headElement = p.openElements.current;\n        p.insertionMode = IN_HEAD_MODE;\n    } else {\n        tokenBeforeHead(p, token);\n    }\n}\n\nfunction endTagBeforeHead(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HEAD || tn === $.BODY || tn === $.HTML || tn === $.BR) {\n        tokenBeforeHead(p, token);\n    } else {\n        p._err(ERR.endTagWithoutMatchingOpenElement);\n    }\n}\n\nfunction tokenBeforeHead(p, token) {\n    p._insertFakeElement($.HEAD);\n    p.headElement = p.openElements.current;\n    p.insertionMode = IN_HEAD_MODE;\n    p._processToken(token);\n}\n\n// The \"in head\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInHead(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (tn === $.BASE || tn === $.BASEFONT || tn === $.BGSOUND || tn === $.LINK || tn === $.META) {\n        p._appendElement(token, NS.HTML);\n        token.ackSelfClosing = true;\n    } else if (tn === $.TITLE) {\n        p._switchToTextParsing(token, Tokenizer.MODE.RCDATA);\n    } else if (tn === $.NOSCRIPT) {\n        if (p.options.scriptingEnabled) {\n            p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);\n        } else {\n            p._insertElement(token, NS.HTML);\n            p.insertionMode = IN_HEAD_NO_SCRIPT_MODE;\n        }\n    } else if (tn === $.NOFRAMES || tn === $.STYLE) {\n        p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);\n    } else if (tn === $.SCRIPT) {\n        p._switchToTextParsing(token, Tokenizer.MODE.SCRIPT_DATA);\n    } else if (tn === $.TEMPLATE) {\n        p._insertTemplate(token, NS.HTML);\n        p.activeFormattingElements.insertMarker();\n        p.framesetOk = false;\n        p.insertionMode = IN_TEMPLATE_MODE;\n        p._pushTmplInsertionMode(IN_TEMPLATE_MODE);\n    } else if (tn === $.HEAD) {\n        p._err(ERR.misplacedStartTagForHeadElement);\n    } else {\n        tokenInHead(p, token);\n    }\n}\n\nfunction endTagInHead(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HEAD) {\n        p.openElements.pop();\n        p.insertionMode = AFTER_HEAD_MODE;\n    } else if (tn === $.BODY || tn === $.BR || tn === $.HTML) {\n        tokenInHead(p, token);\n    } else if (tn === $.TEMPLATE) {\n        if (p.openElements.tmplCount > 0) {\n            p.openElements.generateImpliedEndTagsThoroughly();\n\n            if (p.openElements.currentTagName !== $.TEMPLATE) {\n                p._err(ERR.closingOfElementWithOpenChildElements);\n            }\n\n            p.openElements.popUntilTagNamePopped($.TEMPLATE);\n            p.activeFormattingElements.clearToLastMarker();\n            p._popTmplInsertionMode();\n            p._resetInsertionMode();\n        } else {\n            p._err(ERR.endTagWithoutMatchingOpenElement);\n        }\n    } else {\n        p._err(ERR.endTagWithoutMatchingOpenElement);\n    }\n}\n\nfunction tokenInHead(p, token) {\n    p.openElements.pop();\n    p.insertionMode = AFTER_HEAD_MODE;\n    p._processToken(token);\n}\n\n// The \"in head no script\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInHeadNoScript(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (\n        tn === $.BASEFONT ||\n        tn === $.BGSOUND ||\n        tn === $.HEAD ||\n        tn === $.LINK ||\n        tn === $.META ||\n        tn === $.NOFRAMES ||\n        tn === $.STYLE\n    ) {\n        startTagInHead(p, token);\n    } else if (tn === $.NOSCRIPT) {\n        p._err(ERR.nestedNoscriptInHead);\n    } else {\n        tokenInHeadNoScript(p, token);\n    }\n}\n\nfunction endTagInHeadNoScript(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.NOSCRIPT) {\n        p.openElements.pop();\n        p.insertionMode = IN_HEAD_MODE;\n    } else if (tn === $.BR) {\n        tokenInHeadNoScript(p, token);\n    } else {\n        p._err(ERR.endTagWithoutMatchingOpenElement);\n    }\n}\n\nfunction tokenInHeadNoScript(p, token) {\n    const errCode =\n        token.type === Tokenizer.EOF_TOKEN ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead;\n\n    p._err(errCode);\n    p.openElements.pop();\n    p.insertionMode = IN_HEAD_MODE;\n    p._processToken(token);\n}\n\n// The \"after head\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterHead(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (tn === $.BODY) {\n        p._insertElement(token, NS.HTML);\n        p.framesetOk = false;\n        p.insertionMode = IN_BODY_MODE;\n    } else if (tn === $.FRAMESET) {\n        p._insertElement(token, NS.HTML);\n        p.insertionMode = IN_FRAMESET_MODE;\n    } else if (\n        tn === $.BASE ||\n        tn === $.BASEFONT ||\n        tn === $.BGSOUND ||\n        tn === $.LINK ||\n        tn === $.META ||\n        tn === $.NOFRAMES ||\n        tn === $.SCRIPT ||\n        tn === $.STYLE ||\n        tn === $.TEMPLATE ||\n        tn === $.TITLE\n    ) {\n        p._err(ERR.abandonedHeadElementChild);\n        p.openElements.push(p.headElement);\n        startTagInHead(p, token);\n        p.openElements.remove(p.headElement);\n    } else if (tn === $.HEAD) {\n        p._err(ERR.misplacedStartTagForHeadElement);\n    } else {\n        tokenAfterHead(p, token);\n    }\n}\n\nfunction endTagAfterHead(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.BODY || tn === $.HTML || tn === $.BR) {\n        tokenAfterHead(p, token);\n    } else if (tn === $.TEMPLATE) {\n        endTagInHead(p, token);\n    } else {\n        p._err(ERR.endTagWithoutMatchingOpenElement);\n    }\n}\n\nfunction tokenAfterHead(p, token) {\n    p._insertFakeElement($.BODY);\n    p.insertionMode = IN_BODY_MODE;\n    p._processToken(token);\n}\n\n// The \"in body\" insertion mode\n//------------------------------------------------------------------\nfunction whitespaceCharacterInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n    p._insertCharacters(token);\n}\n\nfunction characterInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n    p._insertCharacters(token);\n    p.framesetOk = false;\n}\n\nfunction htmlStartTagInBody(p, token) {\n    if (p.openElements.tmplCount === 0) {\n        p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs);\n    }\n}\n\nfunction bodyStartTagInBody(p, token) {\n    const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();\n\n    if (bodyElement && p.openElements.tmplCount === 0) {\n        p.framesetOk = false;\n        p.treeAdapter.adoptAttributes(bodyElement, token.attrs);\n    }\n}\n\nfunction framesetStartTagInBody(p, token) {\n    const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();\n\n    if (p.framesetOk && bodyElement) {\n        p.treeAdapter.detachNode(bodyElement);\n        p.openElements.popAllUpToHtmlElement();\n        p._insertElement(token, NS.HTML);\n        p.insertionMode = IN_FRAMESET_MODE;\n    }\n}\n\nfunction addressStartTagInBody(p, token) {\n    if (p.openElements.hasInButtonScope($.P)) {\n        p._closePElement();\n    }\n\n    p._insertElement(token, NS.HTML);\n}\n\nfunction numberedHeaderStartTagInBody(p, token) {\n    if (p.openElements.hasInButtonScope($.P)) {\n        p._closePElement();\n    }\n\n    const tn = p.openElements.currentTagName;\n\n    if (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6) {\n        p.openElements.pop();\n    }\n\n    p._insertElement(token, NS.HTML);\n}\n\nfunction preStartTagInBody(p, token) {\n    if (p.openElements.hasInButtonScope($.P)) {\n        p._closePElement();\n    }\n\n    p._insertElement(token, NS.HTML);\n    //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move\n    //on to the next one. (Newlines at the start of pre blocks are ignored as an authoring convenience.)\n    p.skipNextNewLine = true;\n    p.framesetOk = false;\n}\n\nfunction formStartTagInBody(p, token) {\n    const inTemplate = p.openElements.tmplCount > 0;\n\n    if (!p.formElement || inTemplate) {\n        if (p.openElements.hasInButtonScope($.P)) {\n            p._closePElement();\n        }\n\n        p._insertElement(token, NS.HTML);\n\n        if (!inTemplate) {\n            p.formElement = p.openElements.current;\n        }\n    }\n}\n\nfunction listItemStartTagInBody(p, token) {\n    p.framesetOk = false;\n\n    const tn = token.tagName;\n\n    for (let i = p.openElements.stackTop; i >= 0; i--) {\n        const element = p.openElements.items[i];\n        const elementTn = p.treeAdapter.getTagName(element);\n        let closeTn = null;\n\n        if (tn === $.LI && elementTn === $.LI) {\n            closeTn = $.LI;\n        } else if ((tn === $.DD || tn === $.DT) && (elementTn === $.DD || elementTn === $.DT)) {\n            closeTn = elementTn;\n        }\n\n        if (closeTn) {\n            p.openElements.generateImpliedEndTagsWithExclusion(closeTn);\n            p.openElements.popUntilTagNamePopped(closeTn);\n            break;\n        }\n\n        if (elementTn !== $.ADDRESS && elementTn !== $.DIV && elementTn !== $.P && p._isSpecialElement(element)) {\n            break;\n        }\n    }\n\n    if (p.openElements.hasInButtonScope($.P)) {\n        p._closePElement();\n    }\n\n    p._insertElement(token, NS.HTML);\n}\n\nfunction plaintextStartTagInBody(p, token) {\n    if (p.openElements.hasInButtonScope($.P)) {\n        p._closePElement();\n    }\n\n    p._insertElement(token, NS.HTML);\n    p.tokenizer.state = Tokenizer.MODE.PLAINTEXT;\n}\n\nfunction buttonStartTagInBody(p, token) {\n    if (p.openElements.hasInScope($.BUTTON)) {\n        p.openElements.generateImpliedEndTags();\n        p.openElements.popUntilTagNamePopped($.BUTTON);\n    }\n\n    p._reconstructActiveFormattingElements();\n    p._insertElement(token, NS.HTML);\n    p.framesetOk = false;\n}\n\nfunction aStartTagInBody(p, token) {\n    const activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName($.A);\n\n    if (activeElementEntry) {\n        callAdoptionAgency(p, token);\n        p.openElements.remove(activeElementEntry.element);\n        p.activeFormattingElements.removeEntry(activeElementEntry);\n    }\n\n    p._reconstructActiveFormattingElements();\n    p._insertElement(token, NS.HTML);\n    p.activeFormattingElements.pushElement(p.openElements.current, token);\n}\n\nfunction bStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n    p._insertElement(token, NS.HTML);\n    p.activeFormattingElements.pushElement(p.openElements.current, token);\n}\n\nfunction nobrStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n\n    if (p.openElements.hasInScope($.NOBR)) {\n        callAdoptionAgency(p, token);\n        p._reconstructActiveFormattingElements();\n    }\n\n    p._insertElement(token, NS.HTML);\n    p.activeFormattingElements.pushElement(p.openElements.current, token);\n}\n\nfunction appletStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n    p._insertElement(token, NS.HTML);\n    p.activeFormattingElements.insertMarker();\n    p.framesetOk = false;\n}\n\nfunction tableStartTagInBody(p, token) {\n    if (\n        p.treeAdapter.getDocumentMode(p.document) !== HTML.DOCUMENT_MODE.QUIRKS &&\n        p.openElements.hasInButtonScope($.P)\n    ) {\n        p._closePElement();\n    }\n\n    p._insertElement(token, NS.HTML);\n    p.framesetOk = false;\n    p.insertionMode = IN_TABLE_MODE;\n}\n\nfunction areaStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n    p._appendElement(token, NS.HTML);\n    p.framesetOk = false;\n    token.ackSelfClosing = true;\n}\n\nfunction inputStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n    p._appendElement(token, NS.HTML);\n\n    const inputType = Tokenizer.getTokenAttr(token, ATTRS.TYPE);\n\n    if (!inputType || inputType.toLowerCase() !== HIDDEN_INPUT_TYPE) {\n        p.framesetOk = false;\n    }\n\n    token.ackSelfClosing = true;\n}\n\nfunction paramStartTagInBody(p, token) {\n    p._appendElement(token, NS.HTML);\n    token.ackSelfClosing = true;\n}\n\nfunction hrStartTagInBody(p, token) {\n    if (p.openElements.hasInButtonScope($.P)) {\n        p._closePElement();\n    }\n\n    p._appendElement(token, NS.HTML);\n    p.framesetOk = false;\n    p.ackSelfClosing = true;\n}\n\nfunction imageStartTagInBody(p, token) {\n    token.tagName = $.IMG;\n    areaStartTagInBody(p, token);\n}\n\nfunction textareaStartTagInBody(p, token) {\n    p._insertElement(token, NS.HTML);\n    //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move\n    //on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)\n    p.skipNextNewLine = true;\n    p.tokenizer.state = Tokenizer.MODE.RCDATA;\n    p.originalInsertionMode = p.insertionMode;\n    p.framesetOk = false;\n    p.insertionMode = TEXT_MODE;\n}\n\nfunction xmpStartTagInBody(p, token) {\n    if (p.openElements.hasInButtonScope($.P)) {\n        p._closePElement();\n    }\n\n    p._reconstructActiveFormattingElements();\n    p.framesetOk = false;\n    p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);\n}\n\nfunction iframeStartTagInBody(p, token) {\n    p.framesetOk = false;\n    p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);\n}\n\n//NOTE: here we assume that we always act as an user agent with enabled plugins, so we parse\n//<noembed> as a rawtext.\nfunction noembedStartTagInBody(p, token) {\n    p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);\n}\n\nfunction selectStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n    p._insertElement(token, NS.HTML);\n    p.framesetOk = false;\n\n    if (\n        p.insertionMode === IN_TABLE_MODE ||\n        p.insertionMode === IN_CAPTION_MODE ||\n        p.insertionMode === IN_TABLE_BODY_MODE ||\n        p.insertionMode === IN_ROW_MODE ||\n        p.insertionMode === IN_CELL_MODE\n    ) {\n        p.insertionMode = IN_SELECT_IN_TABLE_MODE;\n    } else {\n        p.insertionMode = IN_SELECT_MODE;\n    }\n}\n\nfunction optgroupStartTagInBody(p, token) {\n    if (p.openElements.currentTagName === $.OPTION) {\n        p.openElements.pop();\n    }\n\n    p._reconstructActiveFormattingElements();\n    p._insertElement(token, NS.HTML);\n}\n\nfunction rbStartTagInBody(p, token) {\n    if (p.openElements.hasInScope($.RUBY)) {\n        p.openElements.generateImpliedEndTags();\n    }\n\n    p._insertElement(token, NS.HTML);\n}\n\nfunction rtStartTagInBody(p, token) {\n    if (p.openElements.hasInScope($.RUBY)) {\n        p.openElements.generateImpliedEndTagsWithExclusion($.RTC);\n    }\n\n    p._insertElement(token, NS.HTML);\n}\n\nfunction menuStartTagInBody(p, token) {\n    if (p.openElements.hasInButtonScope($.P)) {\n        p._closePElement();\n    }\n\n    p._insertElement(token, NS.HTML);\n}\n\nfunction mathStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n\n    foreignContent.adjustTokenMathMLAttrs(token);\n    foreignContent.adjustTokenXMLAttrs(token);\n\n    if (token.selfClosing) {\n        p._appendElement(token, NS.MATHML);\n    } else {\n        p._insertElement(token, NS.MATHML);\n    }\n\n    token.ackSelfClosing = true;\n}\n\nfunction svgStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n\n    foreignContent.adjustTokenSVGAttrs(token);\n    foreignContent.adjustTokenXMLAttrs(token);\n\n    if (token.selfClosing) {\n        p._appendElement(token, NS.SVG);\n    } else {\n        p._insertElement(token, NS.SVG);\n    }\n\n    token.ackSelfClosing = true;\n}\n\nfunction genericStartTagInBody(p, token) {\n    p._reconstructActiveFormattingElements();\n    p._insertElement(token, NS.HTML);\n}\n\n//OPTIMIZATION: Integer comparisons are low-cost, so we can use very fast tag name length filters here.\n//It's faster than using dictionary.\nfunction startTagInBody(p, token) {\n    const tn = token.tagName;\n\n    switch (tn.length) {\n        case 1:\n            if (tn === $.I || tn === $.S || tn === $.B || tn === $.U) {\n                bStartTagInBody(p, token);\n            } else if (tn === $.P) {\n                addressStartTagInBody(p, token);\n            } else if (tn === $.A) {\n                aStartTagInBody(p, token);\n            } else {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 2:\n            if (tn === $.DL || tn === $.OL || tn === $.UL) {\n                addressStartTagInBody(p, token);\n            } else if (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6) {\n                numberedHeaderStartTagInBody(p, token);\n            } else if (tn === $.LI || tn === $.DD || tn === $.DT) {\n                listItemStartTagInBody(p, token);\n            } else if (tn === $.EM || tn === $.TT) {\n                bStartTagInBody(p, token);\n            } else if (tn === $.BR) {\n                areaStartTagInBody(p, token);\n            } else if (tn === $.HR) {\n                hrStartTagInBody(p, token);\n            } else if (tn === $.RB) {\n                rbStartTagInBody(p, token);\n            } else if (tn === $.RT || tn === $.RP) {\n                rtStartTagInBody(p, token);\n            } else if (tn !== $.TH && tn !== $.TD && tn !== $.TR) {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 3:\n            if (tn === $.DIV || tn === $.DIR || tn === $.NAV) {\n                addressStartTagInBody(p, token);\n            } else if (tn === $.PRE) {\n                preStartTagInBody(p, token);\n            } else if (tn === $.BIG) {\n                bStartTagInBody(p, token);\n            } else if (tn === $.IMG || tn === $.WBR) {\n                areaStartTagInBody(p, token);\n            } else if (tn === $.XMP) {\n                xmpStartTagInBody(p, token);\n            } else if (tn === $.SVG) {\n                svgStartTagInBody(p, token);\n            } else if (tn === $.RTC) {\n                rbStartTagInBody(p, token);\n            } else if (tn !== $.COL) {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 4:\n            if (tn === $.HTML) {\n                htmlStartTagInBody(p, token);\n            } else if (tn === $.BASE || tn === $.LINK || tn === $.META) {\n                startTagInHead(p, token);\n            } else if (tn === $.BODY) {\n                bodyStartTagInBody(p, token);\n            } else if (tn === $.MAIN || tn === $.MENU) {\n                addressStartTagInBody(p, token);\n            } else if (tn === $.FORM) {\n                formStartTagInBody(p, token);\n            } else if (tn === $.CODE || tn === $.FONT) {\n                bStartTagInBody(p, token);\n            } else if (tn === $.NOBR) {\n                nobrStartTagInBody(p, token);\n            } else if (tn === $.AREA) {\n                areaStartTagInBody(p, token);\n            } else if (tn === $.MATH) {\n                mathStartTagInBody(p, token);\n            } else if (tn === $.MENU) {\n                menuStartTagInBody(p, token);\n            } else if (tn !== $.HEAD) {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 5:\n            if (tn === $.STYLE || tn === $.TITLE) {\n                startTagInHead(p, token);\n            } else if (tn === $.ASIDE) {\n                addressStartTagInBody(p, token);\n            } else if (tn === $.SMALL) {\n                bStartTagInBody(p, token);\n            } else if (tn === $.TABLE) {\n                tableStartTagInBody(p, token);\n            } else if (tn === $.EMBED) {\n                areaStartTagInBody(p, token);\n            } else if (tn === $.INPUT) {\n                inputStartTagInBody(p, token);\n            } else if (tn === $.PARAM || tn === $.TRACK) {\n                paramStartTagInBody(p, token);\n            } else if (tn === $.IMAGE) {\n                imageStartTagInBody(p, token);\n            } else if (tn !== $.FRAME && tn !== $.TBODY && tn !== $.TFOOT && tn !== $.THEAD) {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 6:\n            if (tn === $.SCRIPT) {\n                startTagInHead(p, token);\n            } else if (\n                tn === $.CENTER ||\n                tn === $.FIGURE ||\n                tn === $.FOOTER ||\n                tn === $.HEADER ||\n                tn === $.HGROUP ||\n                tn === $.DIALOG\n            ) {\n                addressStartTagInBody(p, token);\n            } else if (tn === $.BUTTON) {\n                buttonStartTagInBody(p, token);\n            } else if (tn === $.STRIKE || tn === $.STRONG) {\n                bStartTagInBody(p, token);\n            } else if (tn === $.APPLET || tn === $.OBJECT) {\n                appletStartTagInBody(p, token);\n            } else if (tn === $.KEYGEN) {\n                areaStartTagInBody(p, token);\n            } else if (tn === $.SOURCE) {\n                paramStartTagInBody(p, token);\n            } else if (tn === $.IFRAME) {\n                iframeStartTagInBody(p, token);\n            } else if (tn === $.SELECT) {\n                selectStartTagInBody(p, token);\n            } else if (tn === $.OPTION) {\n                optgroupStartTagInBody(p, token);\n            } else {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 7:\n            if (tn === $.BGSOUND) {\n                startTagInHead(p, token);\n            } else if (\n                tn === $.DETAILS ||\n                tn === $.ADDRESS ||\n                tn === $.ARTICLE ||\n                tn === $.SECTION ||\n                tn === $.SUMMARY\n            ) {\n                addressStartTagInBody(p, token);\n            } else if (tn === $.LISTING) {\n                preStartTagInBody(p, token);\n            } else if (tn === $.MARQUEE) {\n                appletStartTagInBody(p, token);\n            } else if (tn === $.NOEMBED) {\n                noembedStartTagInBody(p, token);\n            } else if (tn !== $.CAPTION) {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 8:\n            if (tn === $.BASEFONT) {\n                startTagInHead(p, token);\n            } else if (tn === $.FRAMESET) {\n                framesetStartTagInBody(p, token);\n            } else if (tn === $.FIELDSET) {\n                addressStartTagInBody(p, token);\n            } else if (tn === $.TEXTAREA) {\n                textareaStartTagInBody(p, token);\n            } else if (tn === $.TEMPLATE) {\n                startTagInHead(p, token);\n            } else if (tn === $.NOSCRIPT) {\n                if (p.options.scriptingEnabled) {\n                    noembedStartTagInBody(p, token);\n                } else {\n                    genericStartTagInBody(p, token);\n                }\n            } else if (tn === $.OPTGROUP) {\n                optgroupStartTagInBody(p, token);\n            } else if (tn !== $.COLGROUP) {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 9:\n            if (tn === $.PLAINTEXT) {\n                plaintextStartTagInBody(p, token);\n            } else {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        case 10:\n            if (tn === $.BLOCKQUOTE || tn === $.FIGCAPTION) {\n                addressStartTagInBody(p, token);\n            } else {\n                genericStartTagInBody(p, token);\n            }\n\n            break;\n\n        default:\n            genericStartTagInBody(p, token);\n    }\n}\n\nfunction bodyEndTagInBody(p) {\n    if (p.openElements.hasInScope($.BODY)) {\n        p.insertionMode = AFTER_BODY_MODE;\n    }\n}\n\nfunction htmlEndTagInBody(p, token) {\n    if (p.openElements.hasInScope($.BODY)) {\n        p.insertionMode = AFTER_BODY_MODE;\n        p._processToken(token);\n    }\n}\n\nfunction addressEndTagInBody(p, token) {\n    const tn = token.tagName;\n\n    if (p.openElements.hasInScope(tn)) {\n        p.openElements.generateImpliedEndTags();\n        p.openElements.popUntilTagNamePopped(tn);\n    }\n}\n\nfunction formEndTagInBody(p) {\n    const inTemplate = p.openElements.tmplCount > 0;\n    const formElement = p.formElement;\n\n    if (!inTemplate) {\n        p.formElement = null;\n    }\n\n    if ((formElement || inTemplate) && p.openElements.hasInScope($.FORM)) {\n        p.openElements.generateImpliedEndTags();\n\n        if (inTemplate) {\n            p.openElements.popUntilTagNamePopped($.FORM);\n        } else {\n            p.openElements.remove(formElement);\n        }\n    }\n}\n\nfunction pEndTagInBody(p) {\n    if (!p.openElements.hasInButtonScope($.P)) {\n        p._insertFakeElement($.P);\n    }\n\n    p._closePElement();\n}\n\nfunction liEndTagInBody(p) {\n    if (p.openElements.hasInListItemScope($.LI)) {\n        p.openElements.generateImpliedEndTagsWithExclusion($.LI);\n        p.openElements.popUntilTagNamePopped($.LI);\n    }\n}\n\nfunction ddEndTagInBody(p, token) {\n    const tn = token.tagName;\n\n    if (p.openElements.hasInScope(tn)) {\n        p.openElements.generateImpliedEndTagsWithExclusion(tn);\n        p.openElements.popUntilTagNamePopped(tn);\n    }\n}\n\nfunction numberedHeaderEndTagInBody(p) {\n    if (p.openElements.hasNumberedHeaderInScope()) {\n        p.openElements.generateImpliedEndTags();\n        p.openElements.popUntilNumberedHeaderPopped();\n    }\n}\n\nfunction appletEndTagInBody(p, token) {\n    const tn = token.tagName;\n\n    if (p.openElements.hasInScope(tn)) {\n        p.openElements.generateImpliedEndTags();\n        p.openElements.popUntilTagNamePopped(tn);\n        p.activeFormattingElements.clearToLastMarker();\n    }\n}\n\nfunction brEndTagInBody(p) {\n    p._reconstructActiveFormattingElements();\n    p._insertFakeElement($.BR);\n    p.openElements.pop();\n    p.framesetOk = false;\n}\n\nfunction genericEndTagInBody(p, token) {\n    const tn = token.tagName;\n\n    for (let i = p.openElements.stackTop; i > 0; i--) {\n        const element = p.openElements.items[i];\n\n        if (p.treeAdapter.getTagName(element) === tn) {\n            p.openElements.generateImpliedEndTagsWithExclusion(tn);\n            p.openElements.popUntilElementPopped(element);\n            break;\n        }\n\n        if (p._isSpecialElement(element)) {\n            break;\n        }\n    }\n}\n\n//OPTIMIZATION: Integer comparisons are low-cost, so we can use very fast tag name length filters here.\n//It's faster than using dictionary.\nfunction endTagInBody(p, token) {\n    const tn = token.tagName;\n\n    switch (tn.length) {\n        case 1:\n            if (tn === $.A || tn === $.B || tn === $.I || tn === $.S || tn === $.U) {\n                callAdoptionAgency(p, token);\n            } else if (tn === $.P) {\n                pEndTagInBody(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        case 2:\n            if (tn === $.DL || tn === $.UL || tn === $.OL) {\n                addressEndTagInBody(p, token);\n            } else if (tn === $.LI) {\n                liEndTagInBody(p, token);\n            } else if (tn === $.DD || tn === $.DT) {\n                ddEndTagInBody(p, token);\n            } else if (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6) {\n                numberedHeaderEndTagInBody(p, token);\n            } else if (tn === $.BR) {\n                brEndTagInBody(p, token);\n            } else if (tn === $.EM || tn === $.TT) {\n                callAdoptionAgency(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        case 3:\n            if (tn === $.BIG) {\n                callAdoptionAgency(p, token);\n            } else if (tn === $.DIR || tn === $.DIV || tn === $.NAV || tn === $.PRE) {\n                addressEndTagInBody(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        case 4:\n            if (tn === $.BODY) {\n                bodyEndTagInBody(p, token);\n            } else if (tn === $.HTML) {\n                htmlEndTagInBody(p, token);\n            } else if (tn === $.FORM) {\n                formEndTagInBody(p, token);\n            } else if (tn === $.CODE || tn === $.FONT || tn === $.NOBR) {\n                callAdoptionAgency(p, token);\n            } else if (tn === $.MAIN || tn === $.MENU) {\n                addressEndTagInBody(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        case 5:\n            if (tn === $.ASIDE) {\n                addressEndTagInBody(p, token);\n            } else if (tn === $.SMALL) {\n                callAdoptionAgency(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        case 6:\n            if (\n                tn === $.CENTER ||\n                tn === $.FIGURE ||\n                tn === $.FOOTER ||\n                tn === $.HEADER ||\n                tn === $.HGROUP ||\n                tn === $.DIALOG\n            ) {\n                addressEndTagInBody(p, token);\n            } else if (tn === $.APPLET || tn === $.OBJECT) {\n                appletEndTagInBody(p, token);\n            } else if (tn === $.STRIKE || tn === $.STRONG) {\n                callAdoptionAgency(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        case 7:\n            if (\n                tn === $.ADDRESS ||\n                tn === $.ARTICLE ||\n                tn === $.DETAILS ||\n                tn === $.SECTION ||\n                tn === $.SUMMARY ||\n                tn === $.LISTING\n            ) {\n                addressEndTagInBody(p, token);\n            } else if (tn === $.MARQUEE) {\n                appletEndTagInBody(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        case 8:\n            if (tn === $.FIELDSET) {\n                addressEndTagInBody(p, token);\n            } else if (tn === $.TEMPLATE) {\n                endTagInHead(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        case 10:\n            if (tn === $.BLOCKQUOTE || tn === $.FIGCAPTION) {\n                addressEndTagInBody(p, token);\n            } else {\n                genericEndTagInBody(p, token);\n            }\n\n            break;\n\n        default:\n            genericEndTagInBody(p, token);\n    }\n}\n\nfunction eofInBody(p, token) {\n    if (p.tmplInsertionModeStackTop > -1) {\n        eofInTemplate(p, token);\n    } else {\n        p.stopped = true;\n    }\n}\n\n// The \"text\" insertion mode\n//------------------------------------------------------------------\nfunction endTagInText(p, token) {\n    if (token.tagName === $.SCRIPT) {\n        p.pendingScript = p.openElements.current;\n    }\n\n    p.openElements.pop();\n    p.insertionMode = p.originalInsertionMode;\n}\n\nfunction eofInText(p, token) {\n    p._err(ERR.eofInElementThatCanContainOnlyText);\n    p.openElements.pop();\n    p.insertionMode = p.originalInsertionMode;\n    p._processToken(token);\n}\n\n// The \"in table\" insertion mode\n//------------------------------------------------------------------\nfunction characterInTable(p, token) {\n    const curTn = p.openElements.currentTagName;\n\n    if (curTn === $.TABLE || curTn === $.TBODY || curTn === $.TFOOT || curTn === $.THEAD || curTn === $.TR) {\n        p.pendingCharacterTokens = [];\n        p.hasNonWhitespacePendingCharacterToken = false;\n        p.originalInsertionMode = p.insertionMode;\n        p.insertionMode = IN_TABLE_TEXT_MODE;\n        p._processToken(token);\n    } else {\n        tokenInTable(p, token);\n    }\n}\n\nfunction captionStartTagInTable(p, token) {\n    p.openElements.clearBackToTableContext();\n    p.activeFormattingElements.insertMarker();\n    p._insertElement(token, NS.HTML);\n    p.insertionMode = IN_CAPTION_MODE;\n}\n\nfunction colgroupStartTagInTable(p, token) {\n    p.openElements.clearBackToTableContext();\n    p._insertElement(token, NS.HTML);\n    p.insertionMode = IN_COLUMN_GROUP_MODE;\n}\n\nfunction colStartTagInTable(p, token) {\n    p.openElements.clearBackToTableContext();\n    p._insertFakeElement($.COLGROUP);\n    p.insertionMode = IN_COLUMN_GROUP_MODE;\n    p._processToken(token);\n}\n\nfunction tbodyStartTagInTable(p, token) {\n    p.openElements.clearBackToTableContext();\n    p._insertElement(token, NS.HTML);\n    p.insertionMode = IN_TABLE_BODY_MODE;\n}\n\nfunction tdStartTagInTable(p, token) {\n    p.openElements.clearBackToTableContext();\n    p._insertFakeElement($.TBODY);\n    p.insertionMode = IN_TABLE_BODY_MODE;\n    p._processToken(token);\n}\n\nfunction tableStartTagInTable(p, token) {\n    if (p.openElements.hasInTableScope($.TABLE)) {\n        p.openElements.popUntilTagNamePopped($.TABLE);\n        p._resetInsertionMode();\n        p._processToken(token);\n    }\n}\n\nfunction inputStartTagInTable(p, token) {\n    const inputType = Tokenizer.getTokenAttr(token, ATTRS.TYPE);\n\n    if (inputType && inputType.toLowerCase() === HIDDEN_INPUT_TYPE) {\n        p._appendElement(token, NS.HTML);\n    } else {\n        tokenInTable(p, token);\n    }\n\n    token.ackSelfClosing = true;\n}\n\nfunction formStartTagInTable(p, token) {\n    if (!p.formElement && p.openElements.tmplCount === 0) {\n        p._insertElement(token, NS.HTML);\n        p.formElement = p.openElements.current;\n        p.openElements.pop();\n    }\n}\n\nfunction startTagInTable(p, token) {\n    const tn = token.tagName;\n\n    switch (tn.length) {\n        case 2:\n            if (tn === $.TD || tn === $.TH || tn === $.TR) {\n                tdStartTagInTable(p, token);\n            } else {\n                tokenInTable(p, token);\n            }\n\n            break;\n\n        case 3:\n            if (tn === $.COL) {\n                colStartTagInTable(p, token);\n            } else {\n                tokenInTable(p, token);\n            }\n\n            break;\n\n        case 4:\n            if (tn === $.FORM) {\n                formStartTagInTable(p, token);\n            } else {\n                tokenInTable(p, token);\n            }\n\n            break;\n\n        case 5:\n            if (tn === $.TABLE) {\n                tableStartTagInTable(p, token);\n            } else if (tn === $.STYLE) {\n                startTagInHead(p, token);\n            } else if (tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD) {\n                tbodyStartTagInTable(p, token);\n            } else if (tn === $.INPUT) {\n                inputStartTagInTable(p, token);\n            } else {\n                tokenInTable(p, token);\n            }\n\n            break;\n\n        case 6:\n            if (tn === $.SCRIPT) {\n                startTagInHead(p, token);\n            } else {\n                tokenInTable(p, token);\n            }\n\n            break;\n\n        case 7:\n            if (tn === $.CAPTION) {\n                captionStartTagInTable(p, token);\n            } else {\n                tokenInTable(p, token);\n            }\n\n            break;\n\n        case 8:\n            if (tn === $.COLGROUP) {\n                colgroupStartTagInTable(p, token);\n            } else if (tn === $.TEMPLATE) {\n                startTagInHead(p, token);\n            } else {\n                tokenInTable(p, token);\n            }\n\n            break;\n\n        default:\n            tokenInTable(p, token);\n    }\n}\n\nfunction endTagInTable(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.TABLE) {\n        if (p.openElements.hasInTableScope($.TABLE)) {\n            p.openElements.popUntilTagNamePopped($.TABLE);\n            p._resetInsertionMode();\n        }\n    } else if (tn === $.TEMPLATE) {\n        endTagInHead(p, token);\n    } else if (\n        tn !== $.BODY &&\n        tn !== $.CAPTION &&\n        tn !== $.COL &&\n        tn !== $.COLGROUP &&\n        tn !== $.HTML &&\n        tn !== $.TBODY &&\n        tn !== $.TD &&\n        tn !== $.TFOOT &&\n        tn !== $.TH &&\n        tn !== $.THEAD &&\n        tn !== $.TR\n    ) {\n        tokenInTable(p, token);\n    }\n}\n\nfunction tokenInTable(p, token) {\n    const savedFosterParentingState = p.fosterParentingEnabled;\n\n    p.fosterParentingEnabled = true;\n    p._processTokenInBodyMode(token);\n    p.fosterParentingEnabled = savedFosterParentingState;\n}\n\n// The \"in table text\" insertion mode\n//------------------------------------------------------------------\nfunction whitespaceCharacterInTableText(p, token) {\n    p.pendingCharacterTokens.push(token);\n}\n\nfunction characterInTableText(p, token) {\n    p.pendingCharacterTokens.push(token);\n    p.hasNonWhitespacePendingCharacterToken = true;\n}\n\nfunction tokenInTableText(p, token) {\n    let i = 0;\n\n    if (p.hasNonWhitespacePendingCharacterToken) {\n        for (; i < p.pendingCharacterTokens.length; i++) {\n            tokenInTable(p, p.pendingCharacterTokens[i]);\n        }\n    } else {\n        for (; i < p.pendingCharacterTokens.length; i++) {\n            p._insertCharacters(p.pendingCharacterTokens[i]);\n        }\n    }\n\n    p.insertionMode = p.originalInsertionMode;\n    p._processToken(token);\n}\n\n// The \"in caption\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInCaption(p, token) {\n    const tn = token.tagName;\n\n    if (\n        tn === $.CAPTION ||\n        tn === $.COL ||\n        tn === $.COLGROUP ||\n        tn === $.TBODY ||\n        tn === $.TD ||\n        tn === $.TFOOT ||\n        tn === $.TH ||\n        tn === $.THEAD ||\n        tn === $.TR\n    ) {\n        if (p.openElements.hasInTableScope($.CAPTION)) {\n            p.openElements.generateImpliedEndTags();\n            p.openElements.popUntilTagNamePopped($.CAPTION);\n            p.activeFormattingElements.clearToLastMarker();\n            p.insertionMode = IN_TABLE_MODE;\n            p._processToken(token);\n        }\n    } else {\n        startTagInBody(p, token);\n    }\n}\n\nfunction endTagInCaption(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.CAPTION || tn === $.TABLE) {\n        if (p.openElements.hasInTableScope($.CAPTION)) {\n            p.openElements.generateImpliedEndTags();\n            p.openElements.popUntilTagNamePopped($.CAPTION);\n            p.activeFormattingElements.clearToLastMarker();\n            p.insertionMode = IN_TABLE_MODE;\n\n            if (tn === $.TABLE) {\n                p._processToken(token);\n            }\n        }\n    } else if (\n        tn !== $.BODY &&\n        tn !== $.COL &&\n        tn !== $.COLGROUP &&\n        tn !== $.HTML &&\n        tn !== $.TBODY &&\n        tn !== $.TD &&\n        tn !== $.TFOOT &&\n        tn !== $.TH &&\n        tn !== $.THEAD &&\n        tn !== $.TR\n    ) {\n        endTagInBody(p, token);\n    }\n}\n\n// The \"in column group\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInColumnGroup(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (tn === $.COL) {\n        p._appendElement(token, NS.HTML);\n        token.ackSelfClosing = true;\n    } else if (tn === $.TEMPLATE) {\n        startTagInHead(p, token);\n    } else {\n        tokenInColumnGroup(p, token);\n    }\n}\n\nfunction endTagInColumnGroup(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.COLGROUP) {\n        if (p.openElements.currentTagName === $.COLGROUP) {\n            p.openElements.pop();\n            p.insertionMode = IN_TABLE_MODE;\n        }\n    } else if (tn === $.TEMPLATE) {\n        endTagInHead(p, token);\n    } else if (tn !== $.COL) {\n        tokenInColumnGroup(p, token);\n    }\n}\n\nfunction tokenInColumnGroup(p, token) {\n    if (p.openElements.currentTagName === $.COLGROUP) {\n        p.openElements.pop();\n        p.insertionMode = IN_TABLE_MODE;\n        p._processToken(token);\n    }\n}\n\n// The \"in table body\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInTableBody(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.TR) {\n        p.openElements.clearBackToTableBodyContext();\n        p._insertElement(token, NS.HTML);\n        p.insertionMode = IN_ROW_MODE;\n    } else if (tn === $.TH || tn === $.TD) {\n        p.openElements.clearBackToTableBodyContext();\n        p._insertFakeElement($.TR);\n        p.insertionMode = IN_ROW_MODE;\n        p._processToken(token);\n    } else if (\n        tn === $.CAPTION ||\n        tn === $.COL ||\n        tn === $.COLGROUP ||\n        tn === $.TBODY ||\n        tn === $.TFOOT ||\n        tn === $.THEAD\n    ) {\n        if (p.openElements.hasTableBodyContextInTableScope()) {\n            p.openElements.clearBackToTableBodyContext();\n            p.openElements.pop();\n            p.insertionMode = IN_TABLE_MODE;\n            p._processToken(token);\n        }\n    } else {\n        startTagInTable(p, token);\n    }\n}\n\nfunction endTagInTableBody(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD) {\n        if (p.openElements.hasInTableScope(tn)) {\n            p.openElements.clearBackToTableBodyContext();\n            p.openElements.pop();\n            p.insertionMode = IN_TABLE_MODE;\n        }\n    } else if (tn === $.TABLE) {\n        if (p.openElements.hasTableBodyContextInTableScope()) {\n            p.openElements.clearBackToTableBodyContext();\n            p.openElements.pop();\n            p.insertionMode = IN_TABLE_MODE;\n            p._processToken(token);\n        }\n    } else if (\n        (tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP) ||\n        (tn !== $.HTML && tn !== $.TD && tn !== $.TH && tn !== $.TR)\n    ) {\n        endTagInTable(p, token);\n    }\n}\n\n// The \"in row\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInRow(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.TH || tn === $.TD) {\n        p.openElements.clearBackToTableRowContext();\n        p._insertElement(token, NS.HTML);\n        p.insertionMode = IN_CELL_MODE;\n        p.activeFormattingElements.insertMarker();\n    } else if (\n        tn === $.CAPTION ||\n        tn === $.COL ||\n        tn === $.COLGROUP ||\n        tn === $.TBODY ||\n        tn === $.TFOOT ||\n        tn === $.THEAD ||\n        tn === $.TR\n    ) {\n        if (p.openElements.hasInTableScope($.TR)) {\n            p.openElements.clearBackToTableRowContext();\n            p.openElements.pop();\n            p.insertionMode = IN_TABLE_BODY_MODE;\n            p._processToken(token);\n        }\n    } else {\n        startTagInTable(p, token);\n    }\n}\n\nfunction endTagInRow(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.TR) {\n        if (p.openElements.hasInTableScope($.TR)) {\n            p.openElements.clearBackToTableRowContext();\n            p.openElements.pop();\n            p.insertionMode = IN_TABLE_BODY_MODE;\n        }\n    } else if (tn === $.TABLE) {\n        if (p.openElements.hasInTableScope($.TR)) {\n            p.openElements.clearBackToTableRowContext();\n            p.openElements.pop();\n            p.insertionMode = IN_TABLE_BODY_MODE;\n            p._processToken(token);\n        }\n    } else if (tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD) {\n        if (p.openElements.hasInTableScope(tn) || p.openElements.hasInTableScope($.TR)) {\n            p.openElements.clearBackToTableRowContext();\n            p.openElements.pop();\n            p.insertionMode = IN_TABLE_BODY_MODE;\n            p._processToken(token);\n        }\n    } else if (\n        (tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP) ||\n        (tn !== $.HTML && tn !== $.TD && tn !== $.TH)\n    ) {\n        endTagInTable(p, token);\n    }\n}\n\n// The \"in cell\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInCell(p, token) {\n    const tn = token.tagName;\n\n    if (\n        tn === $.CAPTION ||\n        tn === $.COL ||\n        tn === $.COLGROUP ||\n        tn === $.TBODY ||\n        tn === $.TD ||\n        tn === $.TFOOT ||\n        tn === $.TH ||\n        tn === $.THEAD ||\n        tn === $.TR\n    ) {\n        if (p.openElements.hasInTableScope($.TD) || p.openElements.hasInTableScope($.TH)) {\n            p._closeTableCell();\n            p._processToken(token);\n        }\n    } else {\n        startTagInBody(p, token);\n    }\n}\n\nfunction endTagInCell(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.TD || tn === $.TH) {\n        if (p.openElements.hasInTableScope(tn)) {\n            p.openElements.generateImpliedEndTags();\n            p.openElements.popUntilTagNamePopped(tn);\n            p.activeFormattingElements.clearToLastMarker();\n            p.insertionMode = IN_ROW_MODE;\n        }\n    } else if (tn === $.TABLE || tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD || tn === $.TR) {\n        if (p.openElements.hasInTableScope(tn)) {\n            p._closeTableCell();\n            p._processToken(token);\n        }\n    } else if (tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP && tn !== $.HTML) {\n        endTagInBody(p, token);\n    }\n}\n\n// The \"in select\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInSelect(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (tn === $.OPTION) {\n        if (p.openElements.currentTagName === $.OPTION) {\n            p.openElements.pop();\n        }\n\n        p._insertElement(token, NS.HTML);\n    } else if (tn === $.OPTGROUP) {\n        if (p.openElements.currentTagName === $.OPTION) {\n            p.openElements.pop();\n        }\n\n        if (p.openElements.currentTagName === $.OPTGROUP) {\n            p.openElements.pop();\n        }\n\n        p._insertElement(token, NS.HTML);\n    } else if (tn === $.INPUT || tn === $.KEYGEN || tn === $.TEXTAREA || tn === $.SELECT) {\n        if (p.openElements.hasInSelectScope($.SELECT)) {\n            p.openElements.popUntilTagNamePopped($.SELECT);\n            p._resetInsertionMode();\n\n            if (tn !== $.SELECT) {\n                p._processToken(token);\n            }\n        }\n    } else if (tn === $.SCRIPT || tn === $.TEMPLATE) {\n        startTagInHead(p, token);\n    }\n}\n\nfunction endTagInSelect(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.OPTGROUP) {\n        const prevOpenElement = p.openElements.items[p.openElements.stackTop - 1];\n        const prevOpenElementTn = prevOpenElement && p.treeAdapter.getTagName(prevOpenElement);\n\n        if (p.openElements.currentTagName === $.OPTION && prevOpenElementTn === $.OPTGROUP) {\n            p.openElements.pop();\n        }\n\n        if (p.openElements.currentTagName === $.OPTGROUP) {\n            p.openElements.pop();\n        }\n    } else if (tn === $.OPTION) {\n        if (p.openElements.currentTagName === $.OPTION) {\n            p.openElements.pop();\n        }\n    } else if (tn === $.SELECT && p.openElements.hasInSelectScope($.SELECT)) {\n        p.openElements.popUntilTagNamePopped($.SELECT);\n        p._resetInsertionMode();\n    } else if (tn === $.TEMPLATE) {\n        endTagInHead(p, token);\n    }\n}\n\n//12.2.5.4.17 The \"in select in table\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInSelectInTable(p, token) {\n    const tn = token.tagName;\n\n    if (\n        tn === $.CAPTION ||\n        tn === $.TABLE ||\n        tn === $.TBODY ||\n        tn === $.TFOOT ||\n        tn === $.THEAD ||\n        tn === $.TR ||\n        tn === $.TD ||\n        tn === $.TH\n    ) {\n        p.openElements.popUntilTagNamePopped($.SELECT);\n        p._resetInsertionMode();\n        p._processToken(token);\n    } else {\n        startTagInSelect(p, token);\n    }\n}\n\nfunction endTagInSelectInTable(p, token) {\n    const tn = token.tagName;\n\n    if (\n        tn === $.CAPTION ||\n        tn === $.TABLE ||\n        tn === $.TBODY ||\n        tn === $.TFOOT ||\n        tn === $.THEAD ||\n        tn === $.TR ||\n        tn === $.TD ||\n        tn === $.TH\n    ) {\n        if (p.openElements.hasInTableScope(tn)) {\n            p.openElements.popUntilTagNamePopped($.SELECT);\n            p._resetInsertionMode();\n            p._processToken(token);\n        }\n    } else {\n        endTagInSelect(p, token);\n    }\n}\n\n// The \"in template\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInTemplate(p, token) {\n    const tn = token.tagName;\n\n    if (\n        tn === $.BASE ||\n        tn === $.BASEFONT ||\n        tn === $.BGSOUND ||\n        tn === $.LINK ||\n        tn === $.META ||\n        tn === $.NOFRAMES ||\n        tn === $.SCRIPT ||\n        tn === $.STYLE ||\n        tn === $.TEMPLATE ||\n        tn === $.TITLE\n    ) {\n        startTagInHead(p, token);\n    } else {\n        const newInsertionMode = TEMPLATE_INSERTION_MODE_SWITCH_MAP[tn] || IN_BODY_MODE;\n\n        p._popTmplInsertionMode();\n        p._pushTmplInsertionMode(newInsertionMode);\n        p.insertionMode = newInsertionMode;\n        p._processToken(token);\n    }\n}\n\nfunction endTagInTemplate(p, token) {\n    if (token.tagName === $.TEMPLATE) {\n        endTagInHead(p, token);\n    }\n}\n\nfunction eofInTemplate(p, token) {\n    if (p.openElements.tmplCount > 0) {\n        p.openElements.popUntilTagNamePopped($.TEMPLATE);\n        p.activeFormattingElements.clearToLastMarker();\n        p._popTmplInsertionMode();\n        p._resetInsertionMode();\n        p._processToken(token);\n    } else {\n        p.stopped = true;\n    }\n}\n\n// The \"after body\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterBody(p, token) {\n    if (token.tagName === $.HTML) {\n        startTagInBody(p, token);\n    } else {\n        tokenAfterBody(p, token);\n    }\n}\n\nfunction endTagAfterBody(p, token) {\n    if (token.tagName === $.HTML) {\n        if (!p.fragmentContext) {\n            p.insertionMode = AFTER_AFTER_BODY_MODE;\n        }\n    } else {\n        tokenAfterBody(p, token);\n    }\n}\n\nfunction tokenAfterBody(p, token) {\n    p.insertionMode = IN_BODY_MODE;\n    p._processToken(token);\n}\n\n// The \"in frameset\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInFrameset(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (tn === $.FRAMESET) {\n        p._insertElement(token, NS.HTML);\n    } else if (tn === $.FRAME) {\n        p._appendElement(token, NS.HTML);\n        token.ackSelfClosing = true;\n    } else if (tn === $.NOFRAMES) {\n        startTagInHead(p, token);\n    }\n}\n\nfunction endTagInFrameset(p, token) {\n    if (token.tagName === $.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) {\n        p.openElements.pop();\n\n        if (!p.fragmentContext && p.openElements.currentTagName !== $.FRAMESET) {\n            p.insertionMode = AFTER_FRAMESET_MODE;\n        }\n    }\n}\n\n// The \"after frameset\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterFrameset(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (tn === $.NOFRAMES) {\n        startTagInHead(p, token);\n    }\n}\n\nfunction endTagAfterFrameset(p, token) {\n    if (token.tagName === $.HTML) {\n        p.insertionMode = AFTER_AFTER_FRAMESET_MODE;\n    }\n}\n\n// The \"after after body\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterAfterBody(p, token) {\n    if (token.tagName === $.HTML) {\n        startTagInBody(p, token);\n    } else {\n        tokenAfterAfterBody(p, token);\n    }\n}\n\nfunction tokenAfterAfterBody(p, token) {\n    p.insertionMode = IN_BODY_MODE;\n    p._processToken(token);\n}\n\n// The \"after after frameset\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterAfterFrameset(p, token) {\n    const tn = token.tagName;\n\n    if (tn === $.HTML) {\n        startTagInBody(p, token);\n    } else if (tn === $.NOFRAMES) {\n        startTagInHead(p, token);\n    }\n}\n\n// The rules for parsing tokens in foreign content\n//------------------------------------------------------------------\nfunction nullCharacterInForeignContent(p, token) {\n    token.chars = unicode.REPLACEMENT_CHARACTER;\n    p._insertCharacters(token);\n}\n\nfunction characterInForeignContent(p, token) {\n    p._insertCharacters(token);\n    p.framesetOk = false;\n}\n\nfunction startTagInForeignContent(p, token) {\n    if (foreignContent.causesExit(token) && !p.fragmentContext) {\n        while (\n            p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML &&\n            !p._isIntegrationPoint(p.openElements.current)\n        ) {\n            p.openElements.pop();\n        }\n\n        p._processToken(token);\n    } else {\n        const current = p._getAdjustedCurrentElement();\n        const currentNs = p.treeAdapter.getNamespaceURI(current);\n\n        if (currentNs === NS.MATHML) {\n            foreignContent.adjustTokenMathMLAttrs(token);\n        } else if (currentNs === NS.SVG) {\n            foreignContent.adjustTokenSVGTagName(token);\n            foreignContent.adjustTokenSVGAttrs(token);\n        }\n\n        foreignContent.adjustTokenXMLAttrs(token);\n\n        if (token.selfClosing) {\n            p._appendElement(token, currentNs);\n        } else {\n            p._insertElement(token, currentNs);\n        }\n\n        token.ackSelfClosing = true;\n    }\n}\n\nfunction endTagInForeignContent(p, token) {\n    for (let i = p.openElements.stackTop; i > 0; i--) {\n        const element = p.openElements.items[i];\n\n        if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) {\n            p._processToken(token);\n            break;\n        }\n\n        if (p.treeAdapter.getTagName(element).toLowerCase() === token.tagName) {\n            p.openElements.popUntilElementPopped(element);\n            break;\n        }\n    }\n}\n", "'use strict'\n\nvar position = exports\n\nposition.start = factory('start')\nposition.end = factory('end')\n\nfunction factory(type) {\n  point.displayName = type\n\n  return point\n\n  function point(node) {\n    var point = (node && node.position && node.position[type]) || {}\n\n    return {\n      line: point.line || null,\n      column: point.column || null,\n      offset: isNaN(point.offset) ? null : point.offset\n    }\n  }\n}\n", "module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n    var target = {}\n\n    for (var i = 0; i < arguments.length; i++) {\n        var source = arguments[i]\n\n        for (var key in source) {\n            if (hasOwnProperty.call(source, key)) {\n                target[key] = source[key]\n            }\n        }\n    }\n\n    return target\n}\n", "'use strict'\n\nmodule.exports = Schema\n\nvar proto = Schema.prototype\n\nproto.space = null\nproto.normal = {}\nproto.property = {}\n\nfunction Schema(property, normal, space) {\n  this.property = property\n  this.normal = normal\n\n  if (space) {\n    this.space = space\n  }\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar Schema = require('./schema')\n\nmodule.exports = merge\n\nfunction merge(definitions) {\n  var length = definitions.length\n  var property = []\n  var normal = []\n  var index = -1\n  var info\n  var space\n\n  while (++index < length) {\n    info = definitions[index]\n    property.push(info.property)\n    normal.push(info.normal)\n    space = info.space\n  }\n\n  return new Schema(\n    xtend.apply(null, property),\n    xtend.apply(null, normal),\n    space\n  )\n}\n", "'use strict'\n\nmodule.exports = normalize\n\nfunction normalize(value) {\n  return value.toLowerCase()\n}\n", "'use strict'\n\nmodule.exports = Info\n\nvar proto = Info.prototype\n\nproto.space = null\nproto.attribute = null\nproto.property = null\nproto.boolean = false\nproto.booleanish = false\nproto.overloadedBoolean = false\nproto.number = false\nproto.commaSeparated = false\nproto.spaceSeparated = false\nproto.commaOrSpaceSeparated = false\nproto.mustUseProperty = false\nproto.defined = false\n\nfunction Info(property, attribute) {\n  this.property = property\n  this.attribute = attribute\n}\n", "'use strict'\n\nvar powers = 0\n\nexports.boolean = increment()\nexports.booleanish = increment()\nexports.overloadedBoolean = increment()\nexports.number = increment()\nexports.spaceSeparated = increment()\nexports.commaSeparated = increment()\nexports.commaOrSpaceSeparated = increment()\n\nfunction increment() {\n  return Math.pow(2, ++powers)\n}\n", "'use strict'\n\nvar Info = require('./info')\nvar types = require('./types')\n\nmodule.exports = DefinedInfo\n\nDefinedInfo.prototype = new Info()\nDefinedInfo.prototype.defined = true\n\nvar checks = [\n  'boolean',\n  'booleanish',\n  'overloadedBoolean',\n  'number',\n  'commaSeparated',\n  'spaceSeparated',\n  'commaOrSpaceSeparated'\n]\nvar checksLength = checks.length\n\nfunction DefinedInfo(property, attribute, mask, space) {\n  var index = -1\n  var check\n\n  mark(this, 'space', space)\n\n  Info.call(this, property, attribute)\n\n  while (++index < checksLength) {\n    check = checks[index]\n    mark(this, check, (mask & types[check]) === types[check])\n  }\n}\n\nfunction mark(values, key, value) {\n  if (value) {\n    values[key] = value\n  }\n}\n", "'use strict'\n\nvar normalize = require('../../normalize')\nvar Schema = require('./schema')\nvar DefinedInfo = require('./defined-info')\n\nmodule.exports = create\n\nfunction create(definition) {\n  var space = definition.space\n  var mustUseProperty = definition.mustUseProperty || []\n  var attributes = definition.attributes || {}\n  var props = definition.properties\n  var transform = definition.transform\n  var property = {}\n  var normal = {}\n  var prop\n  var info\n\n  for (prop in props) {\n    info = new DefinedInfo(\n      prop,\n      transform(attributes, prop),\n      props[prop],\n      space\n    )\n\n    if (mustUseProperty.indexOf(prop) !== -1) {\n      info.mustUseProperty = true\n    }\n\n    property[prop] = info\n\n    normal[normalize(prop)] = prop\n    normal[normalize(info.attribute)] = prop\n  }\n\n  return new Schema(property, normal, space)\n}\n", "'use strict'\n\nvar create = require('./util/create')\n\nmodule.exports = create({\n  space: 'xlink',\n  transform: xlinkTransform,\n  properties: {\n    xLinkActuate: null,\n    xLinkArcRole: null,\n    xLinkHref: null,\n    xLinkRole: null,\n    xLinkShow: null,\n    xLinkTitle: null,\n    xLinkType: null\n  }\n})\n\nfunction xlinkTransform(_, prop) {\n  return 'xlink:' + prop.slice(5).toLowerCase()\n}\n", "'use strict'\n\nvar create = require('./util/create')\n\nmodule.exports = create({\n  space: 'xml',\n  transform: xmlTransform,\n  properties: {\n    xmlLang: null,\n    xmlBase: null,\n    xmlSpace: null\n  }\n})\n\nfunction xmlTransform(_, prop) {\n  return 'xml:' + prop.slice(3).toLowerCase()\n}\n", "'use strict'\n\nmodule.exports = caseSensitiveTransform\n\nfunction caseSensitiveTransform(attributes, attribute) {\n  return attribute in attributes ? attributes[attribute] : attribute\n}\n", "'use strict'\n\nvar caseSensitiveTransform = require('./case-sensitive-transform')\n\nmodule.exports = caseInsensitiveTransform\n\nfunction caseInsensitiveTransform(attributes, property) {\n  return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n", "'use strict'\n\nvar create = require('./util/create')\nvar caseInsensitiveTransform = require('./util/case-insensitive-transform')\n\nmodule.exports = create({\n  space: 'xmlns',\n  attributes: {\n    xmlnsxlink: 'xmlns:xlink'\n  },\n  transform: caseInsensitiveTransform,\n  properties: {\n    xmlns: null,\n    xmlnsXLink: null\n  }\n})\n", "'use strict'\n\nvar types = require('./util/types')\nvar create = require('./util/create')\n\nvar booleanish = types.booleanish\nvar number = types.number\nvar spaceSeparated = types.spaceSeparated\n\nmodule.exports = create({\n  transform: ariaTransform,\n  properties: {\n    ariaActiveDescendant: null,\n    ariaAtomic: booleanish,\n    ariaAutoComplete: null,\n    ariaBusy: booleanish,\n    ariaChecked: booleanish,\n    ariaColCount: number,\n    ariaColIndex: number,\n    ariaColSpan: number,\n    ariaControls: spaceSeparated,\n    ariaCurrent: null,\n    ariaDescribedBy: spaceSeparated,\n    ariaDetails: null,\n    ariaDisabled: booleanish,\n    ariaDropEffect: spaceSeparated,\n    ariaErrorMessage: null,\n    ariaExpanded: booleanish,\n    ariaFlowTo: spaceSeparated,\n    ariaGrabbed: booleanish,\n    ariaHasPopup: null,\n    ariaHidden: booleanish,\n    ariaInvalid: null,\n    ariaKeyShortcuts: null,\n    ariaLabel: null,\n    ariaLabelledBy: spaceSeparated,\n    ariaLevel: number,\n    ariaLive: null,\n    ariaModal: booleanish,\n    ariaMultiLine: booleanish,\n    ariaMultiSelectable: booleanish,\n    ariaOrientation: null,\n    ariaOwns: spaceSeparated,\n    ariaPlaceholder: null,\n    ariaPosInSet: number,\n    ariaPressed: booleanish,\n    ariaReadOnly: booleanish,\n    ariaRelevant: null,\n    ariaRequired: booleanish,\n    ariaRoleDescription: spaceSeparated,\n    ariaRowCount: number,\n    ariaRowIndex: number,\n    ariaRowSpan: number,\n    ariaSelected: booleanish,\n    ariaSetSize: number,\n    ariaSort: null,\n    ariaValueMax: number,\n    ariaValueMin: number,\n    ariaValueNow: number,\n    ariaValueText: null,\n    role: null\n  }\n})\n\nfunction ariaTransform(_, prop) {\n  return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()\n}\n", "'use strict'\n\nvar types = require('./util/types')\nvar create = require('./util/create')\nvar caseInsensitiveTransform = require('./util/case-insensitive-transform')\n\nvar boolean = types.boolean\nvar overloadedBoolean = types.overloadedBoolean\nvar booleanish = types.booleanish\nvar number = types.number\nvar spaceSeparated = types.spaceSeparated\nvar commaSeparated = types.commaSeparated\n\nmodule.exports = create({\n  space: 'html',\n  attributes: {\n    acceptcharset: 'accept-charset',\n    classname: 'class',\n    htmlfor: 'for',\n    httpequiv: 'http-equiv'\n  },\n  transform: caseInsensitiveTransform,\n  mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],\n  properties: {\n    // Standard Properties.\n    abbr: null,\n    accept: commaSeparated,\n    acceptCharset: spaceSeparated,\n    accessKey: spaceSeparated,\n    action: null,\n    allow: null,\n    allowFullScreen: boolean,\n    allowPaymentRequest: boolean,\n    allowUserMedia: boolean,\n    alt: null,\n    as: null,\n    async: boolean,\n    autoCapitalize: null,\n    autoComplete: spaceSeparated,\n    autoFocus: boolean,\n    autoPlay: boolean,\n    capture: boolean,\n    charSet: null,\n    checked: boolean,\n    cite: null,\n    className: spaceSeparated,\n    cols: number,\n    colSpan: null,\n    content: null,\n    contentEditable: booleanish,\n    controls: boolean,\n    controlsList: spaceSeparated,\n    coords: number | commaSeparated,\n    crossOrigin: null,\n    data: null,\n    dateTime: null,\n    decoding: null,\n    default: boolean,\n    defer: boolean,\n    dir: null,\n    dirName: null,\n    disabled: boolean,\n    download: overloadedBoolean,\n    draggable: booleanish,\n    encType: null,\n    enterKeyHint: null,\n    form: null,\n    formAction: null,\n    formEncType: null,\n    formMethod: null,\n    formNoValidate: boolean,\n    formTarget: null,\n    headers: spaceSeparated,\n    height: number,\n    hidden: boolean,\n    high: number,\n    href: null,\n    hrefLang: null,\n    htmlFor: spaceSeparated,\n    httpEquiv: spaceSeparated,\n    id: null,\n    imageSizes: null,\n    imageSrcSet: commaSeparated,\n    inputMode: null,\n    integrity: null,\n    is: null,\n    isMap: boolean,\n    itemId: null,\n    itemProp: spaceSeparated,\n    itemRef: spaceSeparated,\n    itemScope: boolean,\n    itemType: spaceSeparated,\n    kind: null,\n    label: null,\n    lang: null,\n    language: null,\n    list: null,\n    loop: boolean,\n    low: number,\n    manifest: null,\n    max: null,\n    maxLength: number,\n    media: null,\n    method: null,\n    min: null,\n    minLength: number,\n    multiple: boolean,\n    muted: boolean,\n    name: null,\n    nonce: null,\n    noModule: boolean,\n    noValidate: boolean,\n    onAbort: null,\n    onAfterPrint: null,\n    onAuxClick: null,\n    onBeforePrint: null,\n    onBeforeUnload: null,\n    onBlur: null,\n    onCancel: null,\n    onCanPlay: null,\n    onCanPlayThrough: null,\n    onChange: null,\n    onClick: null,\n    onClose: null,\n    onContextMenu: null,\n    onCopy: null,\n    onCueChange: null,\n    onCut: null,\n    onDblClick: null,\n    onDrag: null,\n    onDragEnd: null,\n    onDragEnter: null,\n    onDragExit: null,\n    onDragLeave: null,\n    onDragOver: null,\n    onDragStart: null,\n    onDrop: null,\n    onDurationChange: null,\n    onEmptied: null,\n    onEnded: null,\n    onError: null,\n    onFocus: null,\n    onFormData: null,\n    onHashChange: null,\n    onInput: null,\n    onInvalid: null,\n    onKeyDown: null,\n    onKeyPress: null,\n    onKeyUp: null,\n    onLanguageChange: null,\n    onLoad: null,\n    onLoadedData: null,\n    onLoadedMetadata: null,\n    onLoadEnd: null,\n    onLoadStart: null,\n    onMessage: null,\n    onMessageError: null,\n    onMouseDown: null,\n    onMouseEnter: null,\n    onMouseLeave: null,\n    onMouseMove: null,\n    onMouseOut: null,\n    onMouseOver: null,\n    onMouseUp: null,\n    onOffline: null,\n    onOnline: null,\n    onPageHide: null,\n    onPageShow: null,\n    onPaste: null,\n    onPause: null,\n    onPlay: null,\n    onPlaying: null,\n    onPopState: null,\n    onProgress: null,\n    onRateChange: null,\n    onRejectionHandled: null,\n    onReset: null,\n    onResize: null,\n    onScroll: null,\n    onSecurityPolicyViolation: null,\n    onSeeked: null,\n    onSeeking: null,\n    onSelect: null,\n    onSlotChange: null,\n    onStalled: null,\n    onStorage: null,\n    onSubmit: null,\n    onSuspend: null,\n    onTimeUpdate: null,\n    onToggle: null,\n    onUnhandledRejection: null,\n    onUnload: null,\n    onVolumeChange: null,\n    onWaiting: null,\n    onWheel: null,\n    open: boolean,\n    optimum: number,\n    pattern: null,\n    ping: spaceSeparated,\n    placeholder: null,\n    playsInline: boolean,\n    poster: null,\n    preload: null,\n    readOnly: boolean,\n    referrerPolicy: null,\n    rel: spaceSeparated,\n    required: boolean,\n    reversed: boolean,\n    rows: number,\n    rowSpan: number,\n    sandbox: spaceSeparated,\n    scope: null,\n    scoped: boolean,\n    seamless: boolean,\n    selected: boolean,\n    shape: null,\n    size: number,\n    sizes: null,\n    slot: null,\n    span: number,\n    spellCheck: booleanish,\n    src: null,\n    srcDoc: null,\n    srcLang: null,\n    srcSet: commaSeparated,\n    start: number,\n    step: null,\n    style: null,\n    tabIndex: number,\n    target: null,\n    title: null,\n    translate: null,\n    type: null,\n    typeMustMatch: boolean,\n    useMap: null,\n    value: booleanish,\n    width: number,\n    wrap: null,\n\n    // Legacy.\n    // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\n    align: null, // Several. Use CSS `text-align` instead,\n    aLink: null, // `<body>`. Use CSS `a:active {color}` instead\n    archive: spaceSeparated, // `<object>`. List of URIs to archives\n    axis: null, // `<td>` and `<th>`. Use `scope` on `<th>`\n    background: null, // `<body>`. Use CSS `background-image` instead\n    bgColor: null, // `<body>` and table elements. Use CSS `background-color` instead\n    border: number, // `<table>`. Use CSS `border-width` instead,\n    borderColor: null, // `<table>`. Use CSS `border-color` instead,\n    bottomMargin: number, // `<body>`\n    cellPadding: null, // `<table>`\n    cellSpacing: null, // `<table>`\n    char: null, // Several table elements. When `align=char`, sets the character to align on\n    charOff: null, // Several table elements. When `char`, offsets the alignment\n    classId: null, // `<object>`\n    clear: null, // `<br>`. Use CSS `clear` instead\n    code: null, // `<object>`\n    codeBase: null, // `<object>`\n    codeType: null, // `<object>`\n    color: null, // `<font>` and `<hr>`. Use CSS instead\n    compact: boolean, // Lists. Use CSS to reduce space between items instead\n    declare: boolean, // `<object>`\n    event: null, // `<script>`\n    face: null, // `<font>`. Use CSS instead\n    frame: null, // `<table>`\n    frameBorder: null, // `<iframe>`. Use CSS `border` instead\n    hSpace: number, // `<img>` and `<object>`\n    leftMargin: number, // `<body>`\n    link: null, // `<body>`. Use CSS `a:link {color: *}` instead\n    longDesc: null, // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`\n    lowSrc: null, // `<img>`. Use a `<picture>`\n    marginHeight: number, // `<body>`\n    marginWidth: number, // `<body>`\n    noResize: boolean, // `<frame>`\n    noHref: boolean, // `<area>`. Use no href instead of an explicit `nohref`\n    noShade: boolean, // `<hr>`. Use background-color and height instead of borders\n    noWrap: boolean, // `<td>` and `<th>`\n    object: null, // `<applet>`\n    profile: null, // `<head>`\n    prompt: null, // `<isindex>`\n    rev: null, // `<link>`\n    rightMargin: number, // `<body>`\n    rules: null, // `<table>`\n    scheme: null, // `<meta>`\n    scrolling: booleanish, // `<frame>`. Use overflow in the child context\n    standby: null, // `<object>`\n    summary: null, // `<table>`\n    text: null, // `<body>`. Use CSS `color` instead\n    topMargin: number, // `<body>`\n    valueType: null, // `<param>`\n    version: null, // `<html>`. Use a doctype.\n    vAlign: null, // Several. Use CSS `vertical-align` instead\n    vLink: null, // `<body>`. Use CSS `a:visited {color}` instead\n    vSpace: number, // `<img>` and `<object>`\n\n    // Non-standard Properties.\n    allowTransparency: null,\n    autoCorrect: null,\n    autoSave: null,\n    disablePictureInPicture: boolean,\n    prefix: null,\n    property: null,\n    results: number,\n    security: null,\n    unselectable: null\n  }\n})\n", "'use strict'\n\nvar merge = require('./lib/util/merge')\nvar xlink = require('./lib/xlink')\nvar xml = require('./lib/xml')\nvar xmlns = require('./lib/xmlns')\nvar aria = require('./lib/aria')\nvar html = require('./lib/html')\n\nmodule.exports = merge([xml, xlink, xmlns, aria, html])\n", "'use strict'\n\nvar types = require('./util/types')\nvar create = require('./util/create')\nvar caseSensitiveTransform = require('./util/case-sensitive-transform')\n\nvar boolean = types.boolean\nvar number = types.number\nvar spaceSeparated = types.spaceSeparated\nvar commaSeparated = types.commaSeparated\nvar commaOrSpaceSeparated = types.commaOrSpaceSeparated\n\nmodule.exports = create({\n  space: 'svg',\n  attributes: {\n    accentHeight: 'accent-height',\n    alignmentBaseline: 'alignment-baseline',\n    arabicForm: 'arabic-form',\n    baselineShift: 'baseline-shift',\n    capHeight: 'cap-height',\n    className: 'class',\n    clipPath: 'clip-path',\n    clipRule: 'clip-rule',\n    colorInterpolation: 'color-interpolation',\n    colorInterpolationFilters: 'color-interpolation-filters',\n    colorProfile: 'color-profile',\n    colorRendering: 'color-rendering',\n    crossOrigin: 'crossorigin',\n    dataType: 'datatype',\n    dominantBaseline: 'dominant-baseline',\n    enableBackground: 'enable-background',\n    fillOpacity: 'fill-opacity',\n    fillRule: 'fill-rule',\n    floodColor: 'flood-color',\n    floodOpacity: 'flood-opacity',\n    fontFamily: 'font-family',\n    fontSize: 'font-size',\n    fontSizeAdjust: 'font-size-adjust',\n    fontStretch: 'font-stretch',\n    fontStyle: 'font-style',\n    fontVariant: 'font-variant',\n    fontWeight: 'font-weight',\n    glyphName: 'glyph-name',\n    glyphOrientationHorizontal: 'glyph-orientation-horizontal',\n    glyphOrientationVertical: 'glyph-orientation-vertical',\n    hrefLang: 'hreflang',\n    horizAdvX: 'horiz-adv-x',\n    horizOriginX: 'horiz-origin-x',\n    horizOriginY: 'horiz-origin-y',\n    imageRendering: 'image-rendering',\n    letterSpacing: 'letter-spacing',\n    lightingColor: 'lighting-color',\n    markerEnd: 'marker-end',\n    markerMid: 'marker-mid',\n    markerStart: 'marker-start',\n    navDown: 'nav-down',\n    navDownLeft: 'nav-down-left',\n    navDownRight: 'nav-down-right',\n    navLeft: 'nav-left',\n    navNext: 'nav-next',\n    navPrev: 'nav-prev',\n    navRight: 'nav-right',\n    navUp: 'nav-up',\n    navUpLeft: 'nav-up-left',\n    navUpRight: 'nav-up-right',\n    onAbort: 'onabort',\n    onActivate: 'onactivate',\n    onAfterPrint: 'onafterprint',\n    onBeforePrint: 'onbeforeprint',\n    onBegin: 'onbegin',\n    onCancel: 'oncancel',\n    onCanPlay: 'oncanplay',\n    onCanPlayThrough: 'oncanplaythrough',\n    onChange: 'onchange',\n    onClick: 'onclick',\n    onClose: 'onclose',\n    onCopy: 'oncopy',\n    onCueChange: 'oncuechange',\n    onCut: 'oncut',\n    onDblClick: 'ondblclick',\n    onDrag: 'ondrag',\n    onDragEnd: 'ondragend',\n    onDragEnter: 'ondragenter',\n    onDragExit: 'ondragexit',\n    onDragLeave: 'ondragleave',\n    onDragOver: 'ondragover',\n    onDragStart: 'ondragstart',\n    onDrop: 'ondrop',\n    onDurationChange: 'ondurationchange',\n    onEmptied: 'onemptied',\n    onEnd: 'onend',\n    onEnded: 'onended',\n    onError: 'onerror',\n    onFocus: 'onfocus',\n    onFocusIn: 'onfocusin',\n    onFocusOut: 'onfocusout',\n    onHashChange: 'onhashchange',\n    onInput: 'oninput',\n    onInvalid: 'oninvalid',\n    onKeyDown: 'onkeydown',\n    onKeyPress: 'onkeypress',\n    onKeyUp: 'onkeyup',\n    onLoad: 'onload',\n    onLoadedData: 'onloadeddata',\n    onLoadedMetadata: 'onloadedmetadata',\n    onLoadStart: 'onloadstart',\n    onMessage: 'onmessage',\n    onMouseDown: 'onmousedown',\n    onMouseEnter: 'onmouseenter',\n    onMouseLeave: 'onmouseleave',\n    onMouseMove: 'onmousemove',\n    onMouseOut: 'onmouseout',\n    onMouseOver: 'onmouseover',\n    onMouseUp: 'onmouseup',\n    onMouseWheel: 'onmousewheel',\n    onOffline: 'onoffline',\n    onOnline: 'ononline',\n    onPageHide: 'onpagehide',\n    onPageShow: 'onpageshow',\n    onPaste: 'onpaste',\n    onPause: 'onpause',\n    onPlay: 'onplay',\n    onPlaying: 'onplaying',\n    onPopState: 'onpopstate',\n    onProgress: 'onprogress',\n    onRateChange: 'onratechange',\n    onRepeat: 'onrepeat',\n    onReset: 'onreset',\n    onResize: 'onresize',\n    onScroll: 'onscroll',\n    onSeeked: 'onseeked',\n    onSeeking: 'onseeking',\n    onSelect: 'onselect',\n    onShow: 'onshow',\n    onStalled: 'onstalled',\n    onStorage: 'onstorage',\n    onSubmit: 'onsubmit',\n    onSuspend: 'onsuspend',\n    onTimeUpdate: 'ontimeupdate',\n    onToggle: 'ontoggle',\n    onUnload: 'onunload',\n    onVolumeChange: 'onvolumechange',\n    onWaiting: 'onwaiting',\n    onZoom: 'onzoom',\n    overlinePosition: 'overline-position',\n    overlineThickness: 'overline-thickness',\n    paintOrder: 'paint-order',\n    panose1: 'panose-1',\n    pointerEvents: 'pointer-events',\n    referrerPolicy: 'referrerpolicy',\n    renderingIntent: 'rendering-intent',\n    shapeRendering: 'shape-rendering',\n    stopColor: 'stop-color',\n    stopOpacity: 'stop-opacity',\n    strikethroughPosition: 'strikethrough-position',\n    strikethroughThickness: 'strikethrough-thickness',\n    strokeDashArray: 'stroke-dasharray',\n    strokeDashOffset: 'stroke-dashoffset',\n    strokeLineCap: 'stroke-linecap',\n    strokeLineJoin: 'stroke-linejoin',\n    strokeMiterLimit: 'stroke-miterlimit',\n    strokeOpacity: 'stroke-opacity',\n    strokeWidth: 'stroke-width',\n    tabIndex: 'tabindex',\n    textAnchor: 'text-anchor',\n    textDecoration: 'text-decoration',\n    textRendering: 'text-rendering',\n    typeOf: 'typeof',\n    underlinePosition: 'underline-position',\n    underlineThickness: 'underline-thickness',\n    unicodeBidi: 'unicode-bidi',\n    unicodeRange: 'unicode-range',\n    unitsPerEm: 'units-per-em',\n    vAlphabetic: 'v-alphabetic',\n    vHanging: 'v-hanging',\n    vIdeographic: 'v-ideographic',\n    vMathematical: 'v-mathematical',\n    vectorEffect: 'vector-effect',\n    vertAdvY: 'vert-adv-y',\n    vertOriginX: 'vert-origin-x',\n    vertOriginY: 'vert-origin-y',\n    wordSpacing: 'word-spacing',\n    writingMode: 'writing-mode',\n    xHeight: 'x-height',\n    // These were camelcased in Tiny. Now lowercased in SVG 2\n    playbackOrder: 'playbackorder',\n    timelineBegin: 'timelinebegin'\n  },\n  transform: caseSensitiveTransform,\n  properties: {\n    about: commaOrSpaceSeparated,\n    accentHeight: number,\n    accumulate: null,\n    additive: null,\n    alignmentBaseline: null,\n    alphabetic: number,\n    amplitude: number,\n    arabicForm: null,\n    ascent: number,\n    attributeName: null,\n    attributeType: null,\n    azimuth: number,\n    bandwidth: null,\n    baselineShift: null,\n    baseFrequency: null,\n    baseProfile: null,\n    bbox: null,\n    begin: null,\n    bias: number,\n    by: null,\n    calcMode: null,\n    capHeight: number,\n    className: spaceSeparated,\n    clip: null,\n    clipPath: null,\n    clipPathUnits: null,\n    clipRule: null,\n    color: null,\n    colorInterpolation: null,\n    colorInterpolationFilters: null,\n    colorProfile: null,\n    colorRendering: null,\n    content: null,\n    contentScriptType: null,\n    contentStyleType: null,\n    crossOrigin: null,\n    cursor: null,\n    cx: null,\n    cy: null,\n    d: null,\n    dataType: null,\n    defaultAction: null,\n    descent: number,\n    diffuseConstant: number,\n    direction: null,\n    display: null,\n    dur: null,\n    divisor: number,\n    dominantBaseline: null,\n    download: boolean,\n    dx: null,\n    dy: null,\n    edgeMode: null,\n    editable: null,\n    elevation: number,\n    enableBackground: null,\n    end: null,\n    event: null,\n    exponent: number,\n    externalResourcesRequired: null,\n    fill: null,\n    fillOpacity: number,\n    fillRule: null,\n    filter: null,\n    filterRes: null,\n    filterUnits: null,\n    floodColor: null,\n    floodOpacity: null,\n    focusable: null,\n    focusHighlight: null,\n    fontFamily: null,\n    fontSize: null,\n    fontSizeAdjust: null,\n    fontStretch: null,\n    fontStyle: null,\n    fontVariant: null,\n    fontWeight: null,\n    format: null,\n    fr: null,\n    from: null,\n    fx: null,\n    fy: null,\n    g1: commaSeparated,\n    g2: commaSeparated,\n    glyphName: commaSeparated,\n    glyphOrientationHorizontal: null,\n    glyphOrientationVertical: null,\n    glyphRef: null,\n    gradientTransform: null,\n    gradientUnits: null,\n    handler: null,\n    hanging: number,\n    hatchContentUnits: null,\n    hatchUnits: null,\n    height: null,\n    href: null,\n    hrefLang: null,\n    horizAdvX: number,\n    horizOriginX: number,\n    horizOriginY: number,\n    id: null,\n    ideographic: number,\n    imageRendering: null,\n    initialVisibility: null,\n    in: null,\n    in2: null,\n    intercept: number,\n    k: number,\n    k1: number,\n    k2: number,\n    k3: number,\n    k4: number,\n    kernelMatrix: commaOrSpaceSeparated,\n    kernelUnitLength: null,\n    keyPoints: null, // SEMI_COLON_SEPARATED\n    keySplines: null, // SEMI_COLON_SEPARATED\n    keyTimes: null, // SEMI_COLON_SEPARATED\n    kerning: null,\n    lang: null,\n    lengthAdjust: null,\n    letterSpacing: null,\n    lightingColor: null,\n    limitingConeAngle: number,\n    local: null,\n    markerEnd: null,\n    markerMid: null,\n    markerStart: null,\n    markerHeight: null,\n    markerUnits: null,\n    markerWidth: null,\n    mask: null,\n    maskContentUnits: null,\n    maskUnits: null,\n    mathematical: null,\n    max: null,\n    media: null,\n    mediaCharacterEncoding: null,\n    mediaContentEncodings: null,\n    mediaSize: number,\n    mediaTime: null,\n    method: null,\n    min: null,\n    mode: null,\n    name: null,\n    navDown: null,\n    navDownLeft: null,\n    navDownRight: null,\n    navLeft: null,\n    navNext: null,\n    navPrev: null,\n    navRight: null,\n    navUp: null,\n    navUpLeft: null,\n    navUpRight: null,\n    numOctaves: null,\n    observer: null,\n    offset: null,\n    onAbort: null,\n    onActivate: null,\n    onAfterPrint: null,\n    onBeforePrint: null,\n    onBegin: null,\n    onCancel: null,\n    onCanPlay: null,\n    onCanPlayThrough: null,\n    onChange: null,\n    onClick: null,\n    onClose: null,\n    onCopy: null,\n    onCueChange: null,\n    onCut: null,\n    onDblClick: null,\n    onDrag: null,\n    onDragEnd: null,\n    onDragEnter: null,\n    onDragExit: null,\n    onDragLeave: null,\n    onDragOver: null,\n    onDragStart: null,\n    onDrop: null,\n    onDurationChange: null,\n    onEmptied: null,\n    onEnd: null,\n    onEnded: null,\n    onError: null,\n    onFocus: null,\n    onFocusIn: null,\n    onFocusOut: null,\n    onHashChange: null,\n    onInput: null,\n    onInvalid: null,\n    onKeyDown: null,\n    onKeyPress: null,\n    onKeyUp: null,\n    onLoad: null,\n    onLoadedData: null,\n    onLoadedMetadata: null,\n    onLoadStart: null,\n    onMessage: null,\n    onMouseDown: null,\n    onMouseEnter: null,\n    onMouseLeave: null,\n    onMouseMove: null,\n    onMouseOut: null,\n    onMouseOver: null,\n    onMouseUp: null,\n    onMouseWheel: null,\n    onOffline: null,\n    onOnline: null,\n    onPageHide: null,\n    onPageShow: null,\n    onPaste: null,\n    onPause: null,\n    onPlay: null,\n    onPlaying: null,\n    onPopState: null,\n    onProgress: null,\n    onRateChange: null,\n    onRepeat: null,\n    onReset: null,\n    onResize: null,\n    onScroll: null,\n    onSeeked: null,\n    onSeeking: null,\n    onSelect: null,\n    onShow: null,\n    onStalled: null,\n    onStorage: null,\n    onSubmit: null,\n    onSuspend: null,\n    onTimeUpdate: null,\n    onToggle: null,\n    onUnload: null,\n    onVolumeChange: null,\n    onWaiting: null,\n    onZoom: null,\n    opacity: null,\n    operator: null,\n    order: null,\n    orient: null,\n    orientation: null,\n    origin: null,\n    overflow: null,\n    overlay: null,\n    overlinePosition: number,\n    overlineThickness: number,\n    paintOrder: null,\n    panose1: null,\n    path: null,\n    pathLength: number,\n    patternContentUnits: null,\n    patternTransform: null,\n    patternUnits: null,\n    phase: null,\n    ping: spaceSeparated,\n    pitch: null,\n    playbackOrder: null,\n    pointerEvents: null,\n    points: null,\n    pointsAtX: number,\n    pointsAtY: number,\n    pointsAtZ: number,\n    preserveAlpha: null,\n    preserveAspectRatio: null,\n    primitiveUnits: null,\n    propagate: null,\n    property: commaOrSpaceSeparated,\n    r: null,\n    radius: null,\n    referrerPolicy: null,\n    refX: null,\n    refY: null,\n    rel: commaOrSpaceSeparated,\n    rev: commaOrSpaceSeparated,\n    renderingIntent: null,\n    repeatCount: null,\n    repeatDur: null,\n    requiredExtensions: commaOrSpaceSeparated,\n    requiredFeatures: commaOrSpaceSeparated,\n    requiredFonts: commaOrSpaceSeparated,\n    requiredFormats: commaOrSpaceSeparated,\n    resource: null,\n    restart: null,\n    result: null,\n    rotate: null,\n    rx: null,\n    ry: null,\n    scale: null,\n    seed: null,\n    shapeRendering: null,\n    side: null,\n    slope: null,\n    snapshotTime: null,\n    specularConstant: number,\n    specularExponent: number,\n    spreadMethod: null,\n    spacing: null,\n    startOffset: null,\n    stdDeviation: null,\n    stemh: null,\n    stemv: null,\n    stitchTiles: null,\n    stopColor: null,\n    stopOpacity: null,\n    strikethroughPosition: number,\n    strikethroughThickness: number,\n    string: null,\n    stroke: null,\n    strokeDashArray: commaOrSpaceSeparated,\n    strokeDashOffset: null,\n    strokeLineCap: null,\n    strokeLineJoin: null,\n    strokeMiterLimit: number,\n    strokeOpacity: number,\n    strokeWidth: null,\n    style: null,\n    surfaceScale: number,\n    syncBehavior: null,\n    syncBehaviorDefault: null,\n    syncMaster: null,\n    syncTolerance: null,\n    syncToleranceDefault: null,\n    systemLanguage: commaOrSpaceSeparated,\n    tabIndex: number,\n    tableValues: null,\n    target: null,\n    targetX: number,\n    targetY: number,\n    textAnchor: null,\n    textDecoration: null,\n    textRendering: null,\n    textLength: null,\n    timelineBegin: null,\n    title: null,\n    transformBehavior: null,\n    type: null,\n    typeOf: commaOrSpaceSeparated,\n    to: null,\n    transform: null,\n    u1: null,\n    u2: null,\n    underlinePosition: number,\n    underlineThickness: number,\n    unicode: null,\n    unicodeBidi: null,\n    unicodeRange: null,\n    unitsPerEm: number,\n    values: null,\n    vAlphabetic: number,\n    vMathematical: number,\n    vectorEffect: null,\n    vHanging: number,\n    vIdeographic: number,\n    version: null,\n    vertAdvY: number,\n    vertOriginX: number,\n    vertOriginY: number,\n    viewBox: null,\n    viewTarget: null,\n    visibility: null,\n    width: null,\n    widths: null,\n    wordSpacing: null,\n    writingMode: null,\n    x: null,\n    x1: null,\n    x2: null,\n    xChannelSelector: null,\n    xHeight: number,\n    y: null,\n    y1: null,\n    y2: null,\n    yChannelSelector: null,\n    z: null,\n    zoomAndPan: null\n  }\n})\n", "'use strict'\n\nvar merge = require('./lib/util/merge')\nvar xlink = require('./lib/xlink')\nvar xml = require('./lib/xml')\nvar xmlns = require('./lib/xmlns')\nvar aria = require('./lib/aria')\nvar svg = require('./lib/svg')\n\nmodule.exports = merge([xml, xlink, xmlns, aria, svg])\n", "'use strict'\n\nvar normalize = require('./normalize')\nvar DefinedInfo = require('./lib/util/defined-info')\nvar Info = require('./lib/util/info')\n\nvar data = 'data'\n\nmodule.exports = find\n\nvar valid = /^data[-a-z0-9.:_]+$/i\nvar dash = /-[a-z]/g\nvar cap = /[A-Z]/g\n\nfunction find(schema, value) {\n  var normal = normalize(value)\n  var prop = value\n  var Type = Info\n\n  if (normal in schema.normal) {\n    return schema.property[schema.normal[normal]]\n  }\n\n  if (normal.length > 4 && normal.slice(0, 4) === data && valid.test(value)) {\n    // Attribute or property.\n    if (value.charAt(4) === '-') {\n      prop = datasetToProperty(value)\n    } else {\n      value = datasetToAttribute(value)\n    }\n\n    Type = DefinedInfo\n  }\n\n  return new Type(prop, value)\n}\n\nfunction datasetToProperty(attribute) {\n  var value = attribute.slice(5).replace(dash, camelcase)\n  return data + value.charAt(0).toUpperCase() + value.slice(1)\n}\n\nfunction datasetToAttribute(property) {\n  var value = property.slice(4)\n\n  if (dash.test(value)) {\n    return property\n  }\n\n  value = value.replace(cap, kebab)\n\n  if (value.charAt(0) !== '-') {\n    value = '-' + value\n  }\n\n  return data + value\n}\n\nfunction kebab($0) {\n  return '-' + $0.toLowerCase()\n}\n\nfunction camelcase($0) {\n  return $0.charAt(1).toUpperCase()\n}\n", "'use strict'\n\nmodule.exports = parse\n\nvar numberSign = 35 //  '#'\nvar dot = 46 //  '.'\n\n// Create a hast element from a simple CSS selector.\nfunction parse(selector, defaultTagName) {\n  var value = selector || ''\n  var name = defaultTagName || 'div'\n  var props = {}\n  var index = -1\n  var length = value.length\n  var className\n  var type\n  var code\n  var subvalue\n  var lastIndex\n\n  while (++index <= length) {\n    code = value.charCodeAt(index)\n\n    if (!code || code === dot || code === numberSign) {\n      subvalue = value.slice(lastIndex, index)\n\n      if (subvalue) {\n        if (type === dot) {\n          // eslint-disable-next-line max-depth\n          if (className) {\n            className.push(subvalue)\n          } else {\n            className = [subvalue]\n            props.className = className\n          }\n        } else if (type === numberSign) {\n          props.id = subvalue\n        } else {\n          name = subvalue\n        }\n      }\n\n      lastIndex = index + 1\n      type = code\n    }\n  }\n\n  return {\n    type: 'element',\n    tagName: name,\n    properties: props,\n    children: []\n  }\n}\n", "'use strict'\n\nexports.parse = parse\nexports.stringify = stringify\n\nvar empty = ''\nvar space = ' '\nvar whiteSpace = /[ \\t\\n\\r\\f]+/g\n\nfunction parse(value) {\n  var input = String(value || empty).trim()\n  return input === empty ? [] : input.split(whiteSpace)\n}\n\nfunction stringify(values) {\n  return values.join(space).trim()\n}\n", "'use strict'\n\nexports.parse = parse\nexports.stringify = stringify\n\nvar comma = ','\nvar space = ' '\nvar empty = ''\n\n// Parse comma-separated tokens to an array.\nfunction parse(value) {\n  var values = []\n  var input = String(value || empty)\n  var index = input.indexOf(comma)\n  var lastIndex = 0\n  var end = false\n  var val\n\n  while (!end) {\n    if (index === -1) {\n      index = input.length\n      end = true\n    }\n\n    val = input.slice(lastIndex, index).trim()\n\n    if (val || !end) {\n      values.push(val)\n    }\n\n    lastIndex = index + 1\n    index = input.indexOf(comma, lastIndex)\n  }\n\n  return values\n}\n\n// Compile an array to comma-separated tokens.\n// `options.padLeft` (default: `true`) pads a space left of each token, and\n// `options.padRight` (default: `false`) pads a space to the right of each token.\nfunction stringify(values, options) {\n  var settings = options || {}\n  var left = settings.padLeft === false ? empty : space\n  var right = settings.padRight ? space : empty\n\n  // Ensure the last empty entry is seen.\n  if (values[values.length - 1] === empty) {\n    values = values.concat(empty)\n  }\n\n  return values.join(right + comma + left).trim()\n}\n", "'use strict'\n\nvar find = require('property-information/find')\nvar normalize = require('property-information/normalize')\nvar parseSelector = require('hast-util-parse-selector')\nvar spaces = require('space-separated-tokens').parse\nvar commas = require('comma-separated-tokens').parse\n\nmodule.exports = factory\n\nvar own = {}.hasOwnProperty\n\nfunction factory(schema, defaultTagName, caseSensitive) {\n  var adjust = caseSensitive ? createAdjustMap(caseSensitive) : null\n\n  return h\n\n  // Hyperscript compatible DSL for creating virtual hast trees.\n  function h(selector, properties) {\n    var node = parseSelector(selector, defaultTagName)\n    var children = Array.prototype.slice.call(arguments, 2)\n    var name = node.tagName.toLowerCase()\n    var property\n\n    node.tagName = adjust && own.call(adjust, name) ? adjust[name] : name\n\n    if (properties && isChildren(properties, node)) {\n      children.unshift(properties)\n      properties = null\n    }\n\n    if (properties) {\n      for (property in properties) {\n        addProperty(node.properties, property, properties[property])\n      }\n    }\n\n    addChild(node.children, children)\n\n    if (node.tagName === 'template') {\n      node.content = {type: 'root', children: node.children}\n      node.children = []\n    }\n\n    return node\n  }\n\n  function addProperty(properties, key, value) {\n    var info\n    var property\n    var result\n\n    // Ignore nully and NaN values.\n    if (value === null || value === undefined || value !== value) {\n      return\n    }\n\n    info = find(schema, key)\n    property = info.property\n    result = value\n\n    // Handle list values.\n    if (typeof result === 'string') {\n      if (info.spaceSeparated) {\n        result = spaces(result)\n      } else if (info.commaSeparated) {\n        result = commas(result)\n      } else if (info.commaOrSpaceSeparated) {\n        result = spaces(commas(result).join(' '))\n      }\n    }\n\n    // Accept `object` on style.\n    if (property === 'style' && typeof value !== 'string') {\n      result = style(result)\n    }\n\n    // Class-names (which can be added both on the `selector` and here).\n    if (property === 'className' && properties.className) {\n      result = properties.className.concat(result)\n    }\n\n    properties[property] = parsePrimitives(info, property, result)\n  }\n}\n\nfunction isChildren(value, node) {\n  return (\n    typeof value === 'string' ||\n    'length' in value ||\n    isNode(node.tagName, value)\n  )\n}\n\nfunction isNode(tagName, value) {\n  var type = value.type\n\n  if (tagName === 'input' || !type || typeof type !== 'string') {\n    return false\n  }\n\n  if (typeof value.children === 'object' && 'length' in value.children) {\n    return true\n  }\n\n  type = type.toLowerCase()\n\n  if (tagName === 'button') {\n    return (\n      type !== 'menu' &&\n      type !== 'submit' &&\n      type !== 'reset' &&\n      type !== 'button'\n    )\n  }\n\n  return 'value' in value\n}\n\nfunction addChild(nodes, value) {\n  var index\n  var length\n\n  if (typeof value === 'string' || typeof value === 'number') {\n    nodes.push({type: 'text', value: String(value)})\n    return\n  }\n\n  if (typeof value === 'object' && 'length' in value) {\n    index = -1\n    length = value.length\n\n    while (++index < length) {\n      addChild(nodes, value[index])\n    }\n\n    return\n  }\n\n  if (typeof value !== 'object' || !('type' in value)) {\n    throw new Error('Expected node, nodes, or string, got `' + value + '`')\n  }\n\n  nodes.push(value)\n}\n\n// Parse a (list of) primitives.\nfunction parsePrimitives(info, name, value) {\n  var index\n  var length\n  var result\n\n  if (typeof value !== 'object' || !('length' in value)) {\n    return parsePrimitive(info, name, value)\n  }\n\n  length = value.length\n  index = -1\n  result = []\n\n  while (++index < length) {\n    result[index] = parsePrimitive(info, name, value[index])\n  }\n\n  return result\n}\n\n// Parse a single primitives.\nfunction parsePrimitive(info, name, value) {\n  var result = value\n\n  if (info.number || info.positiveNumber) {\n    if (!isNaN(result) && result !== '') {\n      result = Number(result)\n    }\n  } else if (info.boolean || info.overloadedBoolean) {\n    // Accept `boolean` and `string`.\n    if (\n      typeof result === 'string' &&\n      (result === '' || normalize(value) === normalize(name))\n    ) {\n      result = true\n    }\n  }\n\n  return result\n}\n\nfunction style(value) {\n  var result = []\n  var key\n\n  for (key in value) {\n    result.push([key, value[key]].join(': '))\n  }\n\n  return result.join('; ')\n}\n\nfunction createAdjustMap(values) {\n  var length = values.length\n  var index = -1\n  var result = {}\n  var value\n\n  while (++index < length) {\n    value = values[index]\n    result[value.toLowerCase()] = value\n  }\n\n  return result\n}\n", "'use strict'\n\nvar schema = require('property-information/svg')\nvar caseSensitive = require('./svg-case-sensitive-tag-names.json')\nvar factory = require('./factory')\n\nvar svg = factory(schema, 'g', caseSensitive)\nsvg.displayName = 'svg'\n\nmodule.exports = svg\n", "'use strict'\n\nvar schema = require('property-information/html')\nvar factory = require('./factory')\n\nvar html = factory(schema, 'div')\nhtml.displayName = 'html'\n\nmodule.exports = html\n", "'use strict'\n\nmodule.exports = require('./html')\n", "'use strict'\n\nmodule.exports = ccount\n\nfunction ccount(value, character) {\n  var val = String(value)\n  var count = 0\n  var index\n\n  if (typeof character !== 'string' || character.length !== 1) {\n    throw new Error('Expected character')\n  }\n\n  index = val.indexOf(character)\n\n  while (index !== -1) {\n    count++\n    index = val.indexOf(character, index + 1)\n  }\n\n  return count\n}\n", "'use strict'\n\nvar html = require('property-information/html')\nvar svg = require('property-information/svg')\nvar find = require('property-information/find')\nvar ns = require('web-namespaces')\nvar s = require('hastscript/svg')\nvar h = require('hastscript')\nvar xtend = require('xtend')\nvar count = require('ccount')\n\nmodule.exports = wrapper\n\nvar own = {}.hasOwnProperty\n\n// Handlers.\nvar map = {\n  '#document': root,\n  '#document-fragment': root,\n  '#text': text,\n  '#comment': comment,\n  '#documentType': doctype\n}\n\n// Wrapper to normalise options.\nfunction wrapper(ast, options) {\n  var settings = options || {}\n  var file\n\n  if (settings.messages) {\n    file = settings\n    settings = {}\n  } else {\n    file = settings.file\n  }\n\n  return transform(ast, {\n    schema: settings.space === 'svg' ? svg : html,\n    file: file,\n    verbose: settings.verbose,\n    location: false\n  })\n}\n\n// Transform a node.\nfunction transform(ast, config) {\n  var schema = config.schema\n  var fn = own.call(map, ast.nodeName) ? map[ast.nodeName] : element\n  var children\n  var node\n  var pos\n\n  if (fn === element) {\n    config.schema = ast.namespaceURI === ns.svg ? svg : html\n  }\n\n  if (ast.childNodes) {\n    children = nodes(ast.childNodes, config)\n  }\n\n  node = fn(ast, children, config)\n\n  if (ast.sourceCodeLocation && config.file) {\n    pos = location(node, ast.sourceCodeLocation, config)\n\n    if (pos) {\n      config.location = true\n      node.position = pos\n    }\n  }\n\n  config.schema = schema\n\n  return node\n}\n\n// Transform children.\nfunction nodes(children, config) {\n  var length = children.length\n  var index = -1\n  var result = []\n\n  while (++index < length) {\n    result[index] = transform(children[index], config)\n  }\n\n  return result\n}\n\n// Transform a document.\n// Stores `ast.quirksMode` in `node.data.quirksMode`.\nfunction root(ast, children, config) {\n  var node = {type: 'root', children: children, data: {}}\n  var doc\n\n  node.data.quirksMode = ast.mode === 'quirks' || ast.mode === 'limited-quirks'\n\n  if (config.file && config.location) {\n    doc = String(config.file)\n\n    node.position = {\n      start: {line: 1, column: 1, offset: 0},\n      end: {\n        line: count(doc, '\\n') + 1,\n        column: doc.length - doc.lastIndexOf('\\n'),\n        offset: doc.length\n      }\n    }\n  }\n\n  return node\n}\n\n// Transform a doctype.\nfunction doctype(ast) {\n  return {\n    type: 'doctype',\n    name: ast.name || '',\n    public: ast.publicId || null,\n    system: ast.systemId || null\n  }\n}\n\n// Transform a text.\nfunction text(ast) {\n  return {type: 'text', value: ast.value}\n}\n\n// Transform a comment.\nfunction comment(ast) {\n  return {type: 'comment', value: ast.data}\n}\n\n// Transform an element.\nfunction element(ast, children, config) {\n  var fn = config.schema.space === 'svg' ? s : h\n  var name = ast.tagName\n  var attributes = ast.attrs\n  var length = attributes.length\n  var props = {}\n  var index = -1\n  var attribute\n  var prop\n  var node\n  var pos\n  var start\n  var end\n\n  while (++index < length) {\n    attribute = attributes[index]\n    prop = (attribute.prefix ? attribute.prefix + ':' : '') + attribute.name\n    props[prop] = attribute.value\n  }\n\n  node = fn(name, props, children)\n\n  if (name === 'template' && 'content' in ast) {\n    pos = ast.sourceCodeLocation\n    start = pos && pos.startTag && position(pos.startTag).end\n    end = pos && pos.endTag && position(pos.endTag).start\n\n    node.content = transform(ast.content, config)\n\n    if ((start || end) && config.file) {\n      node.content.position = {start: start, end: end}\n    }\n  }\n\n  return node\n}\n\n// Create clean positional information.\nfunction location(node, location, config) {\n  var schema = config.schema\n  var verbose = config.verbose\n  var pos = position(location)\n  var reference\n  var attributes\n  var attribute\n  var props\n  var prop\n\n  if (node.type === 'element') {\n    reference = node.children[node.children.length - 1]\n\n    // Bug for unclosed with children.\n    // See: <https://github.com/inikulin/parse5/issues/109>.\n    if (\n      !location.endTag &&\n      reference &&\n      reference.position &&\n      reference.position.end\n    ) {\n      pos.end = xtend(reference.position.end)\n    }\n\n    if (verbose) {\n      attributes = location.attrs\n      props = {}\n\n      for (attribute in attributes) {\n        prop = find(schema, attribute).property\n        props[prop] = position(attributes[attribute])\n      }\n\n      node.data = {\n        position: {\n          opening: position(location.startTag),\n          closing: location.endTag ? position(location.endTag) : null,\n          properties: props\n        }\n      }\n    }\n  }\n\n  return pos\n}\n\nfunction position(loc) {\n  var start = point({\n    line: loc.startLine,\n    column: loc.startCol,\n    offset: loc.startOffset\n  })\n  var end = point({\n    line: loc.endLine,\n    column: loc.endCol,\n    offset: loc.endOffset\n  })\n  return start || end ? {start: start, end: end} : null\n}\n\nfunction point(point) {\n  return point.line && point.column ? point : null\n}\n", "// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nmodule.exports = function(style, options) {\n  if (typeof style !== 'string') {\n    throw new TypeError('First argument must be a string');\n  }\n\n  if (!style) return [];\n\n  options = options || {};\n\n  /**\n   * Positional.\n   */\n  var lineno = 1;\n  var column = 1;\n\n  /**\n   * Update lineno and column based on `str`.\n   *\n   * @param {String} str\n   */\n  function updatePosition(str) {\n    var lines = str.match(NEWLINE_REGEX);\n    if (lines) lineno += lines.length;\n    var i = str.lastIndexOf(NEWLINE);\n    column = ~i ? str.length - i : column + str.length;\n  }\n\n  /**\n   * Mark position and patch `node.position`.\n   *\n   * @return {Function}\n   */\n  function position() {\n    var start = { line: lineno, column: column };\n    return function(node) {\n      node.position = new Position(start);\n      whitespace();\n      return node;\n    };\n  }\n\n  /**\n   * Store position information for a node.\n   *\n   * @constructor\n   * @property {Object} start\n   * @property {Object} end\n   * @property {undefined|String} source\n   */\n  function Position(start) {\n    this.start = start;\n    this.end = { line: lineno, column: column };\n    this.source = options.source;\n  }\n\n  /**\n   * Non-enumerable source string.\n   */\n  Position.prototype.content = style;\n\n  var errorsList = [];\n\n  /**\n   * Error `msg`.\n   *\n   * @param {String} msg\n   * @throws {Error}\n   */\n  function error(msg) {\n    var err = new Error(\n      options.source + ':' + lineno + ':' + column + ': ' + msg\n    );\n    err.reason = msg;\n    err.filename = options.source;\n    err.line = lineno;\n    err.column = column;\n    err.source = style;\n\n    if (options.silent) {\n      errorsList.push(err);\n    } else {\n      throw err;\n    }\n  }\n\n  /**\n   * Match `re` and return captures.\n   *\n   * @param {RegExp} re\n   * @return {undefined|Array}\n   */\n  function match(re) {\n    var m = re.exec(style);\n    if (!m) return;\n    var str = m[0];\n    updatePosition(str);\n    style = style.slice(str.length);\n    return m;\n  }\n\n  /**\n   * Parse whitespace.\n   */\n  function whitespace() {\n    match(WHITESPACE_REGEX);\n  }\n\n  /**\n   * Parse comments.\n   *\n   * @param {Object[]} [rules]\n   * @return {Object[]}\n   */\n  function comments(rules) {\n    var c;\n    rules = rules || [];\n    while ((c = comment())) {\n      if (c !== false) {\n        rules.push(c);\n      }\n    }\n    return rules;\n  }\n\n  /**\n   * Parse comment.\n   *\n   * @return {Object}\n   * @throws {Error}\n   */\n  function comment() {\n    var pos = position();\n    if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n    var i = 2;\n    while (\n      EMPTY_STRING != style.charAt(i) &&\n      (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n    ) {\n      ++i;\n    }\n    i += 2;\n\n    if (EMPTY_STRING === style.charAt(i - 1)) {\n      return error('End of comment missing');\n    }\n\n    var str = style.slice(2, i - 2);\n    column += 2;\n    updatePosition(str);\n    style = style.slice(i);\n    column += 2;\n\n    return pos({\n      type: TYPE_COMMENT,\n      comment: str\n    });\n  }\n\n  /**\n   * Parse declaration.\n   *\n   * @return {Object}\n   * @throws {Error}\n   */\n  function declaration() {\n    var pos = position();\n\n    // prop\n    var prop = match(PROPERTY_REGEX);\n    if (!prop) return;\n    comment();\n\n    // :\n    if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n    // val\n    var val = match(VALUE_REGEX);\n\n    var ret = pos({\n      type: TYPE_DECLARATION,\n      property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n      value: val\n        ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n        : EMPTY_STRING\n    });\n\n    // ;\n    match(SEMICOLON_REGEX);\n\n    return ret;\n  }\n\n  /**\n   * Parse declarations.\n   *\n   * @return {Object[]}\n   */\n  function declarations() {\n    var decls = [];\n\n    comments(decls);\n\n    // declarations\n    var decl;\n    while ((decl = declaration())) {\n      if (decl !== false) {\n        decls.push(decl);\n        comments(decls);\n      }\n    }\n\n    return decls;\n  }\n\n  whitespace();\n  return declarations();\n};\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n  return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n", "var parse = require('inline-style-parser');\n\n/**\n * Parses inline style to object.\n *\n * @example\n * // returns { 'line-height': '42' }\n * StyleToObject('line-height: 42;');\n *\n * @param  {String}      style      - The inline style.\n * @param  {Function}    [iterator] - The iterator function.\n * @return {null|Object}\n */\nfunction StyleToObject(style, iterator) {\n  var output = null;\n  if (!style || typeof style !== 'string') {\n    return output;\n  }\n\n  var declaration;\n  var declarations = parse(style);\n  var hasIterator = typeof iterator === 'function';\n  var property;\n  var value;\n\n  for (var i = 0, len = declarations.length; i < len; i++) {\n    declaration = declarations[i];\n    property = declaration.property;\n    value = declaration.value;\n\n    if (hasIterator) {\n      iterator(property, value, declaration);\n    } else if (value) {\n      output || (output = {});\n      output[property] = value;\n    }\n  }\n\n  return output;\n}\n\nmodule.exports = StyleToObject;\n", "'use strict'\n\nmodule.exports = convert\n\nfunction convert(test) {\n  if (typeof test === 'string') {\n    return typeFactory(test)\n  }\n\n  if (test === null || test === undefined) {\n    return ok\n  }\n\n  if (typeof test === 'object') {\n    return ('length' in test ? anyFactory : matchesFactory)(test)\n  }\n\n  if (typeof test === 'function') {\n    return test\n  }\n\n  throw new Error('Expected function, string, or object as test')\n}\n\nfunction convertAll(tests) {\n  var results = []\n  var length = tests.length\n  var index = -1\n\n  while (++index < length) {\n    results[index] = convert(tests[index])\n  }\n\n  return results\n}\n\n// Utility assert each property in `test` is represented in `node`, and each\n// values are strictly equal.\nfunction matchesFactory(test) {\n  return matches\n\n  function matches(node) {\n    var key\n\n    for (key in test) {\n      if (node[key] !== test[key]) {\n        return false\n      }\n    }\n\n    return true\n  }\n}\n\nfunction anyFactory(tests) {\n  var checks = convertAll(tests)\n  var length = checks.length\n\n  return matches\n\n  function matches() {\n    var index = -1\n\n    while (++index < length) {\n      if (checks[index].apply(this, arguments)) {\n        return true\n      }\n    }\n\n    return false\n  }\n}\n\n// Utility to convert a string into a function which checks a given node\u2019s type\n// for said string.\nfunction typeFactory(test) {\n  return type\n\n  function type(node) {\n    return Boolean(node && node.type === test)\n  }\n}\n\n// Utility to return true.\nfunction ok() {\n  return true\n}\n", "'use strict'\n\nvar html = require('property-information/html')\nvar svg = require('property-information/svg')\nvar find = require('property-information/find')\nvar hastToReact = require('property-information/hast-to-react.json')\nvar spaces = require('space-separated-tokens')\nvar commas = require('comma-separated-tokens')\nvar style = require('style-to-object')\nvar ns = require('web-namespaces')\nvar convert = require('unist-util-is/convert')\n\nvar root = convert('root')\nvar element = convert('element')\nvar text = convert('text')\n\nvar dashes = /-([a-z])/g\n\nmodule.exports = wrapper\n\nfunction wrapper(h, node, options) {\n  var settings = options || {}\n  var prefix\n  var r\n  var v\n  var vd\n\n  if (typeof h !== 'function') {\n    throw new Error('h is not a function')\n  }\n\n  if (typeof settings === 'string' || typeof settings === 'boolean') {\n    prefix = settings\n    settings = {}\n  } else {\n    prefix = settings.prefix\n  }\n\n  r = react(h)\n  v = vue(h)\n  vd = vdom(h)\n\n  if (prefix === null || prefix === undefined) {\n    prefix = r === true || v === true || vd === true ? 'h-' : false\n  }\n\n  if (root(node)) {\n    if (node.children.length === 1 && element(node.children[0])) {\n      node = node.children[0]\n    } else {\n      node = {\n        type: 'element',\n        tagName: 'div',\n        properties: {},\n        children: node.children\n      }\n    }\n  } else if (!element(node)) {\n    throw new Error(\n      'Expected root or element, not `' + ((node && node.type) || node) + '`'\n    )\n  }\n\n  return toH(h, node, {\n    schema: settings.space === 'svg' ? svg : html,\n    prefix: prefix,\n    key: 0,\n    react: r,\n    vue: v,\n    vdom: vd,\n    hyperscript: hyperscript(h)\n  })\n}\n\n// Transform a hast node through a hyperscript interface to *anything*!\nfunction toH(h, node, ctx) {\n  var parentSchema = ctx.schema\n  var schema = parentSchema\n  var name = node.tagName\n  var properties\n  var attributes\n  var children\n  var property\n  var elements\n  var length\n  var index\n  var value\n  var result\n\n  if (parentSchema.space === 'html' && name.toLowerCase() === 'svg') {\n    schema = svg\n    ctx.schema = schema\n  }\n\n  if (ctx.vdom === true && schema.space === 'html') {\n    name = name.toUpperCase()\n  }\n\n  properties = node.properties\n  attributes = {}\n\n  for (property in properties) {\n    addAttribute(attributes, property, properties[property], ctx)\n  }\n\n  if (\n    typeof attributes.style === 'string' &&\n    (ctx.vdom === true || ctx.vue === true || ctx.react === true)\n  ) {\n    // VDOM, Vue, and React accept `style` as object.\n    attributes.style = parseStyle(attributes.style, name)\n  }\n\n  if (ctx.prefix) {\n    ctx.key++\n    attributes.key = ctx.prefix + ctx.key\n  }\n\n  if (ctx.vdom && schema.space !== 'html') {\n    attributes.namespace = ns[schema.space]\n  }\n\n  elements = []\n  children = node.children\n  length = children ? children.length : 0\n  index = -1\n\n  while (++index < length) {\n    value = children[index]\n\n    if (element(value)) {\n      elements.push(toH(h, value, ctx))\n    } else if (text(value)) {\n      elements.push(value.value)\n    }\n  }\n\n  // Ensure no React warnings are triggered for void elements having children\n  // passed in.\n  result =\n    elements.length === 0 ? h(name, attributes) : h(name, attributes, elements)\n\n  // Restore parent schema.\n  ctx.schema = parentSchema\n\n  return result\n}\n\nfunction addAttribute(props, prop, value, ctx) {\n  var hyperlike = ctx.hyperscript || ctx.vdom || ctx.vue\n  var schema = ctx.schema\n  var info = find(schema, prop)\n  var subprop\n\n  // Ignore nully and `NaN` values.\n  // Ignore `false` and falsey known booleans for hyperlike DSLs.\n  if (\n    value === null ||\n    value === undefined ||\n    value !== value ||\n    (hyperlike && value === false) ||\n    (hyperlike && info.boolean && !value)\n  ) {\n    return\n  }\n\n  if (value !== null && typeof value === 'object' && 'length' in value) {\n    // Accept `array`.\n    // Most props are space-separated.\n    value = (info.commaSeparated ? commas : spaces).stringify(value)\n  }\n\n  // Treat `true` and truthy known booleans.\n  if (info.boolean && ctx.hyperscript === true) {\n    value = ''\n  }\n\n  if (ctx.vue) {\n    if (prop !== 'style') {\n      subprop = 'attrs'\n    }\n  } else if (!info.mustUseProperty) {\n    if (ctx.vdom === true) {\n      subprop = 'attributes'\n    } else if (ctx.hyperscript === true) {\n      subprop = 'attrs'\n    }\n  }\n\n  if (subprop) {\n    if (props[subprop] === undefined) {\n      props[subprop] = {}\n    }\n\n    props[subprop][info.attribute] = value\n  } else if (ctx.react && info.space) {\n    props[hastToReact[info.property] || info.property] = value\n  } else {\n    props[info.attribute] = value\n  }\n}\n\n// Check if `h` is `react.createElement`.\nfunction react(h) {\n  var node = h && h('div')\n  return Boolean(\n    node && ('_owner' in node || '_store' in node) && node.key === null\n  )\n}\n\n// Check if `h` is `hyperscript`.\nfunction hyperscript(h) {\n  return Boolean(h && h.context && h.cleanup)\n}\n\n// Check if `h` is `virtual-dom/h`.\nfunction vdom(h) {\n  return h && h('div').type === 'VirtualNode'\n}\n\nfunction vue(h) {\n  var node = h && h('div')\n  return Boolean(node && node.context && node.context._isVue)\n}\n\nfunction parseStyle(value, tagName) {\n  var result = {}\n\n  try {\n    style(value, iterator)\n  } catch (error) {\n    error.message =\n      tagName + '[style]' + error.message.slice('undefined'.length)\n    throw error\n  }\n\n  return result\n\n  function iterator(name, value) {\n    result[styleCase(name)] = value\n  }\n}\n\nfunction styleCase(val) {\n  if (val.slice(0, 4) === '-ms-') {\n    val = 'ms-' + val.slice(4)\n  }\n\n  return val.replace(dashes, styleReplacer)\n}\n\nfunction styleReplacer($0, $1) {\n  return $1.toUpperCase()\n}\n", "'use strict'\n\nmodule.exports = factory\n\nvar noop = Function.prototype\nvar own = {}.hasOwnProperty\n\n// Handle values based on a property.\nfunction factory(key, options) {\n  var settings = options || {}\n\n  function one(value) {\n    var fn = one.invalid\n    var handlers = one.handlers\n\n    if (value && own.call(value, key)) {\n      fn = own.call(handlers, value[key]) ? handlers[value[key]] : one.unknown\n    }\n\n    return (fn || noop).apply(this, arguments)\n  }\n\n  one.handlers = settings.handlers || {}\n  one.invalid = settings.invalid\n  one.unknown = settings.unknown\n\n  return one\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar html = require('property-information/html')\nvar svg = require('property-information/svg')\nvar find = require('property-information/find')\nvar toH = require('hast-to-hyperscript')\nvar ns = require('web-namespaces')\nvar zwitch = require('zwitch')\n\nmodule.exports = transform\n\nvar ignoredSpaces = ['svg', 'html']\n\nvar one = zwitch('type')\n\none.handlers.root = root\none.handlers.element = element\none.handlers.text = text\none.handlers.comment = comment\none.handlers.doctype = doctype\n\n// Transform a tree from hast to Parse5\u2019s AST.\nfunction transform(tree, space) {\n  return one(tree, space === 'svg' ? svg : html)\n}\n\nfunction root(node, schema) {\n  var data = node.data || {}\n  var mode = data.quirksMode ? 'quirks' : 'no-quirks'\n\n  return patch(node, {nodeName: '#document', mode: mode}, schema)\n}\n\nfunction fragment(node, schema) {\n  return patch(node, {nodeName: '#document-fragment'}, schema)\n}\n\nfunction doctype(node, schema) {\n  return patch(\n    node,\n    {\n      nodeName: '#documentType',\n      name: node.name,\n      publicId: node.public || '',\n      systemId: node.system || ''\n    },\n    schema\n  )\n}\n\nfunction text(node, schema) {\n  return patch(node, {nodeName: '#text', value: node.value}, schema)\n}\n\nfunction comment(node, schema) {\n  return patch(node, {nodeName: '#comment', data: node.value}, schema)\n}\n\nfunction element(node, schema) {\n  var space = schema.space\n  var shallow = xtend(node, {children: []})\n\n  return toH(h, shallow, {space: space})\n\n  function h(name, attrs) {\n    var values = []\n    var p5\n    var attr\n    var value\n    var key\n    var info\n    var pos\n\n    for (key in attrs) {\n      info = find(schema, key)\n      attr = attrs[key]\n\n      if (attr === false || (info.boolean && !attr)) {\n        continue\n      }\n\n      value = {name: key, value: attr === true ? '' : String(attr)}\n\n      if (info.space && ignoredSpaces.indexOf(info.space) === -1) {\n        pos = key.indexOf(':')\n\n        if (pos === -1) {\n          value.prefix = ''\n        } else {\n          value.name = key.slice(pos + 1)\n          value.prefix = key.slice(0, pos)\n        }\n\n        value.namespace = ns[info.space]\n      }\n\n      values.push(value)\n    }\n\n    p5 = patch(node, {nodeName: name, tagName: name, attrs: values}, schema)\n\n    if (name === 'template') {\n      p5.content = fragment(shallow.content, schema)\n    }\n\n    return p5\n  }\n}\n\n// Patch specific properties.\nfunction patch(node, p5, parentSchema) {\n  var schema = parentSchema\n  var position = node.position\n  var children = node.children\n  var childNodes = []\n  var length = children ? children.length : 0\n  var index = -1\n  var child\n\n  if (node.type === 'element') {\n    if (schema.space === 'html' && node.tagName === 'svg') {\n      schema = svg\n    }\n\n    p5.namespaceURI = ns[schema.space]\n  }\n\n  while (++index < length) {\n    child = one(children[index], schema)\n    child.parentNode = p5\n    childNodes[index] = child\n  }\n\n  if (node.type === 'element' || node.type === 'root') {\n    p5.childNodes = childNodes\n  }\n\n  if (position && position.start && position.end) {\n    p5.sourceCodeLocation = {\n      startLine: position.start.line,\n      startCol: position.start.column,\n      startOffset: position.start.offset,\n      endLine: position.end.line,\n      endCol: position.end.column,\n      endOffset: position.end.offset\n    }\n  }\n\n  return p5\n}\n", "'use strict'\n\nvar Parser = require('parse5/lib/parser')\nvar pos = require('unist-util-position')\nvar fromParse5 = require('hast-util-from-parse5')\nvar toParse5 = require('hast-util-to-parse5')\nvar voids = require('html-void-elements')\nvar ns = require('web-namespaces')\nvar zwitch = require('zwitch')\nvar xtend = require('xtend')\n\nmodule.exports = wrap\n\nvar inTemplateMode = 'IN_TEMPLATE_MODE'\nvar dataState = 'DATA_STATE'\nvar characterToken = 'CHARACTER_TOKEN'\nvar startTagToken = 'START_TAG_TOKEN'\nvar endTagToken = 'END_TAG_TOKEN'\nvar commentToken = 'COMMENT_TOKEN'\nvar doctypeToken = 'DOCTYPE_TOKEN'\n\nvar parseOptions = {\n  sourceCodeLocationInfo: true,\n  scriptingEnabled: false\n}\n\nfunction wrap(tree, file) {\n  var parser = new Parser(parseOptions)\n  var one = zwitch('type')\n  var tokenizer\n  var preprocessor\n  var posTracker\n  var locationTracker\n  var result\n\n  one.handlers.root = root\n  one.handlers.element = element\n  one.handlers.text = text\n  one.handlers.comment = comment\n  one.handlers.doctype = doctype\n  one.handlers.raw = raw\n  one.unknown = unknown\n\n  result = fromParse5(documentMode(tree) ? document() : fragment(), file)\n\n  // Unpack if possible and when not given a `root`.\n  if (tree.type !== 'root' && result.children.length === 1) {\n    return result.children[0]\n  }\n\n  return result\n\n  function fragment() {\n    var context\n    var mock\n    var doc\n\n    context = {\n      nodeName: 'template',\n      tagName: 'template',\n      attrs: [],\n      namespaceURI: ns.html,\n      childNodes: []\n    }\n\n    mock = {\n      nodeName: 'documentmock',\n      tagName: 'documentmock',\n      attrs: [],\n      namespaceURI: ns.html,\n      childNodes: []\n    }\n\n    doc = {\n      nodeName: '#document-fragment',\n      childNodes: []\n    }\n\n    parser._bootstrap(mock, context)\n    parser._pushTmplInsertionMode(inTemplateMode)\n    parser._initTokenizerForFragmentParsing()\n    parser._insertFakeRootElement()\n    parser._resetInsertionMode()\n    parser._findFormInFragmentContext()\n\n    tokenizer = parser.tokenizer\n    preprocessor = tokenizer.preprocessor\n    locationTracker = tokenizer.__mixins[0]\n    posTracker = locationTracker.posTracker\n\n    one(tree)\n\n    parser._adoptNodes(mock.childNodes[0], doc)\n\n    return doc\n  }\n\n  function document() {\n    var doc = parser.treeAdapter.createDocument()\n\n    parser._bootstrap(doc, null)\n    tokenizer = parser.tokenizer\n    preprocessor = tokenizer.preprocessor\n    locationTracker = tokenizer.__mixins[0]\n    posTracker = locationTracker.posTracker\n\n    one(tree)\n\n    return doc\n  }\n\n  function all(nodes) {\n    var length = 0\n    var index = -1\n\n    /* istanbul ignore else - invalid nodes, see rehypejs/rehype-raw#7. */\n    if (nodes) {\n      length = nodes.length\n    }\n\n    while (++index < length) {\n      one(nodes[index])\n    }\n  }\n\n  function root(node) {\n    all(node.children)\n  }\n\n  function element(node) {\n    var empty = voids.indexOf(node.tagName) !== -1\n\n    parser._processToken(startTag(node), ns.html)\n\n    all(node.children)\n\n    if (!empty) {\n      parser._processToken(endTag(node))\n\n      // Put the parser back in the data state: some elements, like textareas\n      // and iframes, change the state.\n      // See <syntax-tree/hast-util-raw#7>.\n      // See <https://github.com/inikulin/parse5/blob/2528196/packages/parse5/lib/tokenizer/index.js#L222>.\n      tokenizer.state = dataState\n    }\n  }\n\n  function text(node) {\n    parser._processToken({\n      type: characterToken,\n      chars: node.value,\n      location: createParse5Location(node)\n    })\n  }\n\n  function doctype(node) {\n    var p5 = toParse5(node)\n\n    parser._processToken({\n      type: doctypeToken,\n      name: p5.name,\n      forceQuirks: false,\n      publicId: p5.publicId,\n      systemId: p5.systemId,\n      location: createParse5Location(node)\n    })\n  }\n\n  function comment(node) {\n    parser._processToken({\n      type: commentToken,\n      data: node.value,\n      location: createParse5Location(node)\n    })\n  }\n\n  function raw(node) {\n    var start = pos.start(node)\n    var token\n\n    // Reset preprocessor:\n    // See: <https://github.com/inikulin/parse5/blob/0491902/packages/parse5/lib/tokenizer/preprocessor.js>.\n    preprocessor.html = null\n    preprocessor.endOfChunkHit = false\n    preprocessor.lastChunkWritten = false\n    preprocessor.lastCharPos = -1\n    preprocessor.pos = -1\n\n    // Reset preprocessor mixin:\n    // See: <https://github.com/inikulin/parse5/blob/0491902/packages/parse5/lib/extensions/position-tracking/preprocessor-mixin.js>.\n    posTracker.droppedBufferSize = 0\n    posTracker.line = start.line\n    posTracker.col = 1\n    posTracker.offset = 0\n    posTracker.lineStartPos = -start.column + 1\n    posTracker.droppedBufferSize = start.offset\n\n    // Reset location tracker:\n    // See: <https://github.com/inikulin/parse5/blob/0491902/packages/parse5/lib/extensions/location-info/tokenizer-mixin.js>.\n    locationTracker.currentAttrLocation = null\n    locationTracker.ctLoc = createParse5Location(node)\n\n    // See the code for `parse` and `parseFragment`:\n    // See: <https://github.com/inikulin/parse5/blob/0491902/packages/parse5/lib/parser/index.js#L371>.\n    tokenizer.write(node.value)\n    parser._runParsingLoop(null)\n\n    // Process final characters if they\u2019re still there after hibernating.\n    // Similar to:\n    // See: <https://github.com/inikulin/parse5/blob/3bfa7d9/packages/parse5/lib/extensions/location-info/tokenizer-mixin.js#L95>.\n    token = tokenizer.currentCharacterToken\n\n    if (token) {\n      token.location.endLine = posTracker.line\n      token.location.endCol = posTracker.col + 1\n      token.location.endOffset = posTracker.offset + 1\n      parser._processToken(token)\n    }\n\n    // Reset tokenizer:\n    // See: <https://github.com/inikulin/parse5/blob/8b0048e/packages/parse5/lib/tokenizer/index.js#L215>.\n    tokenizer.currentToken = null\n    tokenizer.currentCharacterToken = null\n    tokenizer.currentAttr = null\n  }\n}\n\nfunction startTag(node) {\n  var location = createParse5Location(node)\n\n  location.startTag = xtend(location)\n\n  return {\n    type: startTagToken,\n    tagName: node.tagName,\n    selfClosing: false,\n    attrs: attributes(node),\n    location: location\n  }\n}\n\nfunction attributes(node) {\n  return toParse5({\n    tagName: node.tagName,\n    type: 'element',\n    properties: node.properties\n  }).attrs\n}\n\nfunction endTag(node) {\n  var location = createParse5Location(node)\n\n  location.endTag = xtend(location)\n\n  return {\n    type: endTagToken,\n    tagName: node.tagName,\n    attrs: [],\n    location: location\n  }\n}\n\nfunction unknown(node) {\n  throw new Error('Cannot compile `' + node.type + '` node')\n}\n\nfunction documentMode(node) {\n  var head = node.type === 'root' ? node.children[0] : node\n\n  return head && (head.type === 'doctype' || head.tagName === 'html')\n}\n\nfunction createParse5Location(node) {\n  var start = pos.start(node)\n  var end = pos.end(node)\n\n  return {\n    startLine: start.line,\n    startCol: start.column,\n    startOffset: start.offset,\n    endLine: end.line,\n    endCol: end.column,\n    endOffset: end.offset\n  }\n}\n", "'use strict'\n\nvar util = require('hast-util-raw')\n\nmodule.exports = raw\n\nfunction raw() {\n  return util\n}\n", "var parse = require('inline-style-parser');\n\n/**\n * Parses inline style to object.\n *\n * @example\n * // returns { 'line-height': '42' }\n * StyleToObject('line-height: 42;');\n *\n * @param  {String}      style      - The inline style.\n * @param  {Function}    [iterator] - The iterator function.\n * @return {null|Object}\n */\nfunction StyleToObject(style, iterator) {\n  var output = null;\n  if (!style || typeof style !== 'string') {\n    return output;\n  }\n\n  var declaration;\n  var declarations = parse(style);\n  var hasIterator = typeof iterator === 'function';\n  var property;\n  var value;\n\n  for (var i = 0, len = declarations.length; i < len; i++) {\n    declaration = declarations[i];\n    property = declaration.property;\n    value = declaration.value;\n\n    if (hasIterator) {\n      iterator(property, value, declaration);\n    } else if (value) {\n      output || (output = {});\n      output[property] = value;\n    }\n  }\n\n  return output;\n}\n\nmodule.exports = StyleToObject;\n", "'use strict'\n\nmodule.exports = convert\n\nfunction convert(test) {\n  if (typeof test === 'string') {\n    return typeFactory(test)\n  }\n\n  if (test === null || test === undefined) {\n    return ok\n  }\n\n  if (typeof test === 'object') {\n    return ('length' in test ? anyFactory : matchesFactory)(test)\n  }\n\n  if (typeof test === 'function') {\n    return test\n  }\n\n  throw new Error('Expected function, string, or object as test')\n}\n\nfunction convertAll(tests) {\n  var results = []\n  var length = tests.length\n  var index = -1\n\n  while (++index < length) {\n    results[index] = convert(tests[index])\n  }\n\n  return results\n}\n\n// Utility assert each property in `test` is represented in `node`, and each\n// values are strictly equal.\nfunction matchesFactory(test) {\n  return matches\n\n  function matches(node) {\n    var key\n\n    for (key in test) {\n      if (node[key] !== test[key]) {\n        return false\n      }\n    }\n\n    return true\n  }\n}\n\nfunction anyFactory(tests) {\n  var checks = convertAll(tests)\n  var length = checks.length\n\n  return matches\n\n  function matches() {\n    var index = -1\n\n    while (++index < length) {\n      if (checks[index].apply(this, arguments)) {\n        return true\n      }\n    }\n\n    return false\n  }\n}\n\n// Utility to convert a string into a function which checks a given node\u2019s type\n// for said string.\nfunction typeFactory(test) {\n  return type\n\n  function type(node) {\n    return Boolean(node && node.type === test)\n  }\n}\n\n// Utility to return true.\nfunction ok() {\n  return true\n}\n", "'use strict'\n\nvar html = require('property-information/html')\nvar svg = require('property-information/svg')\nvar find = require('property-information/find')\nvar hastToReact = require('property-information/hast-to-react.json')\nvar spaces = require('space-separated-tokens')\nvar commas = require('comma-separated-tokens')\nvar style = require('style-to-object')\nvar ns = require('web-namespaces')\nvar convert = require('unist-util-is/convert')\n\nvar root = convert('root')\nvar element = convert('element')\nvar text = convert('text')\n\nvar dashes = /-([a-z])/g\n\nmodule.exports = wrapper\n\nfunction wrapper(h, node, options) {\n  var settings = options || {}\n  var prefix\n  var r\n  var v\n  var vd\n\n  if (typeof h !== 'function') {\n    throw new Error('h is not a function')\n  }\n\n  if (typeof settings === 'string' || typeof settings === 'boolean') {\n    prefix = settings\n    settings = {}\n  } else {\n    prefix = settings.prefix\n  }\n\n  r = react(h)\n  v = vue(h)\n  vd = vdom(h)\n\n  if (prefix === null || prefix === undefined) {\n    prefix = r === true || v === true || vd === true ? 'h-' : false\n  }\n\n  if (root(node)) {\n    if (node.children.length === 1 && element(node.children[0])) {\n      node = node.children[0]\n    } else {\n      node = {\n        type: 'element',\n        tagName: 'div',\n        properties: {},\n        children: node.children\n      }\n    }\n  } else if (!element(node)) {\n    throw new Error(\n      'Expected root or element, not `' + ((node && node.type) || node) + '`'\n    )\n  }\n\n  return toH(h, node, {\n    schema: settings.space === 'svg' ? svg : html,\n    prefix: prefix,\n    key: 0,\n    react: r,\n    vue: v,\n    vdom: vd,\n    hyperscript: hyperscript(h)\n  })\n}\n\n// Transform a hast node through a hyperscript interface to *anything*!\nfunction toH(h, node, ctx) {\n  var parentSchema = ctx.schema\n  var schema = parentSchema\n  var name = node.tagName\n  var properties\n  var attributes\n  var children\n  var property\n  var elements\n  var length\n  var index\n  var value\n  var result\n\n  if (parentSchema.space === 'html' && name.toLowerCase() === 'svg') {\n    schema = svg\n    ctx.schema = schema\n  }\n\n  if (ctx.vdom === true && schema.space === 'html') {\n    name = name.toUpperCase()\n  }\n\n  properties = node.properties\n  attributes = {}\n\n  for (property in properties) {\n    addAttribute(attributes, property, properties[property], ctx)\n  }\n\n  if (\n    typeof attributes.style === 'string' &&\n    (ctx.vdom === true || ctx.vue === true || ctx.react === true)\n  ) {\n    // VDOM, Vue, and React accept `style` as object.\n    attributes.style = parseStyle(attributes.style, name)\n  }\n\n  if (ctx.prefix) {\n    ctx.key++\n    attributes.key = ctx.prefix + ctx.key\n  }\n\n  if (ctx.vdom && schema.space !== 'html') {\n    attributes.namespace = ns[schema.space]\n  }\n\n  elements = []\n  children = node.children\n  length = children ? children.length : 0\n  index = -1\n\n  while (++index < length) {\n    value = children[index]\n\n    if (element(value)) {\n      elements.push(toH(h, value, ctx))\n    } else if (text(value)) {\n      elements.push(value.value)\n    }\n  }\n\n  // Ensure no React warnings are triggered for void elements having children\n  // passed in.\n  result =\n    elements.length === 0 ? h(name, attributes) : h(name, attributes, elements)\n\n  // Restore parent schema.\n  ctx.schema = parentSchema\n\n  return result\n}\n\nfunction addAttribute(props, prop, value, ctx) {\n  var hyperlike = ctx.hyperscript || ctx.vdom || ctx.vue\n  var schema = ctx.schema\n  var info = find(schema, prop)\n  var subprop\n\n  // Ignore nully and `NaN` values.\n  // Ignore `false` and falsey known booleans for hyperlike DSLs.\n  if (\n    value === null ||\n    value === undefined ||\n    value !== value ||\n    (hyperlike && value === false) ||\n    (hyperlike && info.boolean && !value)\n  ) {\n    return\n  }\n\n  if (value !== null && typeof value === 'object' && 'length' in value) {\n    // Accept `array`.\n    // Most props are space-separated.\n    value = (info.commaSeparated ? commas : spaces).stringify(value)\n  }\n\n  // Treat `true` and truthy known booleans.\n  if (info.boolean && ctx.hyperscript === true) {\n    value = ''\n  }\n\n  if (ctx.vue) {\n    if (prop !== 'style') {\n      subprop = 'attrs'\n    }\n  } else if (!info.mustUseProperty) {\n    if (ctx.vdom === true) {\n      subprop = 'attributes'\n    } else if (ctx.hyperscript === true) {\n      subprop = 'attrs'\n    }\n  }\n\n  if (subprop) {\n    if (props[subprop] === undefined) {\n      props[subprop] = {}\n    }\n\n    props[subprop][info.attribute] = value\n  } else if (ctx.react && info.space) {\n    props[hastToReact[info.property] || info.property] = value\n  } else {\n    props[info.attribute] = value\n  }\n}\n\n// Check if `h` is `react.createElement`.\nfunction react(h) {\n  var node = h && h('div')\n  return Boolean(\n    node && ('_owner' in node || '_store' in node) && node.key === null\n  )\n}\n\n// Check if `h` is `hyperscript`.\nfunction hyperscript(h) {\n  return Boolean(h && h.context && h.cleanup)\n}\n\n// Check if `h` is `virtual-dom/h`.\nfunction vdom(h) {\n  return h && h('div').type === 'VirtualNode'\n}\n\nfunction vue(h) {\n  var node = h && h('div')\n  return Boolean(node && node.context && node.context._isVue)\n}\n\nfunction parseStyle(value, tagName) {\n  var result = {}\n\n  try {\n    style(value, iterator)\n  } catch (error) {\n    error.message =\n      tagName + '[style]' + error.message.slice('undefined'.length)\n    throw error\n  }\n\n  return result\n\n  function iterator(name, value) {\n    result[styleCase(name)] = value\n  }\n}\n\nfunction styleCase(val) {\n  if (val.slice(0, 4) === '-ms-') {\n    val = 'ms-' + val.slice(4)\n  }\n\n  return val.replace(dashes, styleReplacer)\n}\n\nfunction styleReplacer($0, $1) {\n  return $1.toUpperCase()\n}\n", "'use strict'\n\nmodule.exports = convert\n\nfunction convert(test) {\n  if (typeof test === 'string') {\n    return typeFactory(test)\n  }\n\n  if (test === null || test === undefined) {\n    return ok\n  }\n\n  if (typeof test === 'object') {\n    return ('length' in test ? anyFactory : matchesFactory)(test)\n  }\n\n  if (typeof test === 'function') {\n    return test\n  }\n\n  throw new Error('Expected function, string, or object as test')\n}\n\nfunction convertAll(tests) {\n  var results = []\n  var length = tests.length\n  var index = -1\n\n  while (++index < length) {\n    results[index] = convert(tests[index])\n  }\n\n  return results\n}\n\n// Utility assert each property in `test` is represented in `node`, and each\n// values are strictly equal.\nfunction matchesFactory(test) {\n  return matches\n\n  function matches(node) {\n    var key\n\n    for (key in test) {\n      if (node[key] !== test[key]) {\n        return false\n      }\n    }\n\n    return true\n  }\n}\n\nfunction anyFactory(tests) {\n  var checks = convertAll(tests)\n  var length = checks.length\n\n  return matches\n\n  function matches() {\n    var index = -1\n\n    while (++index < length) {\n      if (checks[index].apply(this, arguments)) {\n        return true\n      }\n    }\n\n    return false\n  }\n}\n\n// Utility to convert a string into a function which checks a given node\u2019s type\n// for said string.\nfunction typeFactory(test) {\n  return type\n\n  function type(node) {\n    return Boolean(node && node.type === test)\n  }\n}\n\n// Utility to return true.\nfunction ok() {\n  return true\n}\n", "'use strict'\n\nmodule.exports = visitParents\n\nvar convert = require('unist-util-is/convert')\n\nvar CONTINUE = true\nvar SKIP = 'skip'\nvar EXIT = false\n\nvisitParents.CONTINUE = CONTINUE\nvisitParents.SKIP = SKIP\nvisitParents.EXIT = EXIT\n\nfunction visitParents(tree, test, visitor, reverse) {\n  var is\n\n  if (typeof test === 'function' && typeof visitor !== 'function') {\n    reverse = visitor\n    visitor = test\n    test = null\n  }\n\n  is = convert(test)\n\n  one(tree, null, [])\n\n  // Visit a single node.\n  function one(node, index, parents) {\n    var result = []\n    var subresult\n\n    if (!test || is(node, index, parents[parents.length - 1] || null)) {\n      result = toResult(visitor(node, parents))\n\n      if (result[0] === EXIT) {\n        return result\n      }\n    }\n\n    if (node.children && result[0] !== SKIP) {\n      subresult = toResult(all(node.children, parents.concat(node)))\n      return subresult[0] === EXIT ? subresult : result\n    }\n\n    return result\n  }\n\n  // Visit children in `parent`.\n  function all(children, parents) {\n    var min = -1\n    var step = reverse ? -1 : 1\n    var index = (reverse ? children.length : min) + step\n    var result\n\n    while (index > min && index < children.length) {\n      result = one(children[index], index, parents)\n\n      if (result[0] === EXIT) {\n        return result\n      }\n\n      index = typeof result[1] === 'number' ? result[1] : index + step\n    }\n  }\n}\n\nfunction toResult(value) {\n  if (value !== null && typeof value === 'object' && 'length' in value) {\n    return value\n  }\n\n  if (typeof value === 'number') {\n    return [CONTINUE, value]\n  }\n\n  return [value]\n}\n", "'use strict'\n\nmodule.exports = visit\n\nvar visitParents = require('unist-util-visit-parents')\n\nvar CONTINUE = visitParents.CONTINUE\nvar SKIP = visitParents.SKIP\nvar EXIT = visitParents.EXIT\n\nvisit.CONTINUE = CONTINUE\nvisit.SKIP = SKIP\nvisit.EXIT = EXIT\n\nfunction visit(tree, test, visitor, reverse) {\n  if (typeof test === 'function' && typeof visitor !== 'function') {\n    reverse = visitor\n    visitor = test\n    test = null\n  }\n\n  visitParents(tree, test, overload, reverse)\n\n  function overload(node, parents) {\n    var parent = parents[parents.length - 1]\n    var index = parent ? parent.children.indexOf(node) : null\n    return visitor(node, index, parent)\n  }\n}\n", "'use strict';\n\nvar visit = require('unist-util-visit');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar hastCssPropertyMap = {\n  align: 'text-align',\n  valign: 'vertical-align',\n  height: 'height',\n  width: 'width'\n};\n\nmodule.exports = function tableCellStyle(node) {\n  visit(node, 'element', visitor);\n  return node;\n};\n\nfunction visitor(node) {\n  if (node.tagName !== 'tr' && node.tagName !== 'td' && node.tagName !== 'th') {\n    return;\n  }\n\n  var hastName;\n  var cssName;\n  for (hastName in hastCssPropertyMap) {\n    if (\n      !hasOwnProperty.call(hastCssPropertyMap, hastName) ||\n      node.properties[hastName] === undefined\n    ) {\n      continue;\n    }\n    cssName = hastCssPropertyMap[hastName];\n    appendStyle(node, cssName, node.properties[hastName]);\n    delete node.properties[hastName];\n  }\n}\n\nfunction appendStyle(node, property, value) {\n  var prevStyle = (node.properties.style || '').trim();\n  if (prevStyle && !/;\\s*/.test(prevStyle)) {\n    prevStyle += ';';\n  }\n  if (prevStyle) {\n    prevStyle += ' ';\n  }\n  var nextStyle = prevStyle + property + ': ' + value + ';';\n  node.properties.style = nextStyle;\n}\n", "'use strict'\n\nvar toH = require('hast-to-hyperscript')\nvar tableCellStyle = require('@mapbox/hast-util-table-cell-style')\n\nmodule.exports = rehypeReact\n\nvar has = {}.hasOwnProperty\n\n// Add a React compiler.\nfunction rehypeReact(options) {\n  var settings = options || {}\n  var createElement = settings.createElement\n  var Fragment = settings.Fragment\n  var components = settings.components || {}\n\n  this.Compiler = compiler\n\n  function compiler(node) {\n    var result = toH(h, tableCellStyle(node), settings.prefix)\n\n    if (node.type === 'root') {\n      // Invert <https://github.com/syntax-tree/hast-to-hyperscript/blob/d227372/index.js#L46-L56>.\n      if (\n        result.type === 'div' &&\n        (node.children.length !== 1 || node.children[0].type !== 'element')\n      ) {\n        result = result.props.children\n      } else {\n        result = [result]\n      }\n\n      return createElement(Fragment || 'div', {}, result)\n    }\n\n    return result\n  }\n\n  // Wrap `createElement` to pass components in.\n  function h(name, props, children) {\n    var component = has.call(components, name) ? components[name] : name\n    return createElement(component, props, children)\n  }\n}\n", "module.exports = function() {\n\treturn /[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2648-\\u2653\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267F\\u2692-\\u2694\\u2696\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\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DE8\\uDDEA\\uDDEC\\uDDED\\uDDF7-\\uDDFA]|\\uD83C\\uDDE9\\uD83C[\\uDDEA\\uDDEC\\uDDEF\\uDDF0\\uDDF2\\uDDF4\\uDDFF]|\\uD83C\\uDDE8\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDEE\\uDDF0-\\uDDF5\\uDDF7\\uDDFA-\\uDDFF]|\\uD83C\\uDDE7\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEF\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9\\uDDFB\\uDDFC\\uDDFE\\uDDFF]|\\uD83C\\uDDE6\\uD83C[\\uDDE8-\\uDDEC\\uDDEE\\uDDF1\\uDDF2\\uDDF4\\uDDF6-\\uDDFA\\uDDFC\\uDDFD\\uDDFF]|[#\\*0-9]\\u20E3/g;\n};\n", "var emoji = require('emoji-regex')\r\n\r\nmodule.exports = BananaSlug\r\n\r\nvar own = Object.hasOwnProperty\r\nvar whitespace = /\\s/g\r\nvar specials = /[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~\u2019]/g\r\n\r\nfunction BananaSlug () {\r\n  var self = this\r\n\r\n  if (!(self instanceof BananaSlug)) return new BananaSlug()\r\n\r\n  self.reset()\r\n}\r\n\r\n/**\r\n * Generate a unique slug.\r\n * @param  {string} value String of text to slugify\r\n * @param  {boolean} [false] Keep the current case, otherwise make all lowercase\r\n * @return {string}       A unique slug string\r\n */\r\nBananaSlug.prototype.slug = function (value, maintainCase) {\r\n  var self = this\r\n  var slug = slugger(value, maintainCase === true)\r\n  var originalSlug = slug\r\n\r\n  while (own.call(self.occurrences, slug)) {\r\n    self.occurrences[originalSlug]++\r\n    slug = originalSlug + '-' + self.occurrences[originalSlug]\r\n  }\r\n\r\n  self.occurrences[slug] = 0\r\n\r\n  return slug\r\n}\r\n\r\n/**\r\n * Reset - Forget all previous slugs\r\n * @return void\r\n */\r\nBananaSlug.prototype.reset = function () {\r\n  this.occurrences = Object.create(null)\r\n}\r\n\r\nfunction slugger (string, maintainCase) {\r\n  if (typeof string !== 'string') return ''\r\n  if (!maintainCase) string = string.toLowerCase()\r\n\r\n  return string.trim()\r\n    .replace(specials, '')\r\n    .replace(emoji(), '')\r\n    .replace(whitespace, '-')\r\n}\r\n\r\nBananaSlug.slug = slugger\r\n", "'use strict'\n\nmodule.exports = visitParents\n\nvar convert = require('unist-util-is/convert')\n\nvar CONTINUE = true\nvar SKIP = 'skip'\nvar EXIT = false\n\nvisitParents.CONTINUE = CONTINUE\nvisitParents.SKIP = SKIP\nvisitParents.EXIT = EXIT\n\nfunction visitParents(tree, test, visitor, reverse) {\n  var is\n\n  if (typeof test === 'function' && typeof visitor !== 'function') {\n    reverse = visitor\n    visitor = test\n    test = null\n  }\n\n  is = convert(test)\n\n  one(tree, null, [])\n\n  // Visit a single node.\n  function one(node, index, parents) {\n    var result = []\n    var subresult\n\n    if (!test || is(node, index, parents[parents.length - 1] || null)) {\n      result = toResult(visitor(node, parents))\n\n      if (result[0] === EXIT) {\n        return result\n      }\n    }\n\n    if (node.children && result[0] !== SKIP) {\n      subresult = toResult(all(node.children, parents.concat(node)))\n      return subresult[0] === EXIT ? subresult : result\n    }\n\n    return result\n  }\n\n  // Visit children in `parent`.\n  function all(children, parents) {\n    var min = -1\n    var step = reverse ? -1 : 1\n    var index = (reverse ? children.length : min) + step\n    var result\n\n    while (index > min && index < children.length) {\n      result = one(children[index], index, parents)\n\n      if (result[0] === EXIT) {\n        return result\n      }\n\n      index = typeof result[1] === 'number' ? result[1] : index + step\n    }\n  }\n}\n\nfunction toResult(value) {\n  if (value !== null && typeof value === 'object' && 'length' in value) {\n    return value\n  }\n\n  if (typeof value === 'number') {\n    return [CONTINUE, value]\n  }\n\n  return [value]\n}\n", "'use strict'\n\nmodule.exports = visit\n\nvar visitParents = require('unist-util-visit-parents')\n\nvar CONTINUE = visitParents.CONTINUE\nvar SKIP = visitParents.SKIP\nvar EXIT = visitParents.EXIT\n\nvisit.CONTINUE = CONTINUE\nvisit.SKIP = SKIP\nvisit.EXIT = EXIT\n\nfunction visit(tree, test, visitor, reverse) {\n  if (typeof test === 'function' && typeof visitor !== 'function') {\n    reverse = visitor\n    visitor = test\n    test = null\n  }\n\n  visitParents(tree, test, overload, reverse)\n\n  function overload(node, parents) {\n    var parent = parents[parents.length - 1]\n    var index = parent ? parent.children.indexOf(node) : null\n    return visitor(node, index, parent)\n  }\n}\n", "/**\n * @fileoverview\n *   Get the plain-text value of a hast node.\n * @longdescription\n *   ## Use\n *\n *   ```js\n *   var h = require('hastscript')\n *   var toString = require('hast-util-to-string')\n *\n *   toString(h('p', 'Alpha'))\n *   //=> 'Alpha'\n *   toString(h('div', [h('b', 'Bold'), ' and ', h('i', 'italic'), '.']))\n *   //=> 'Bold and italic.'\n *   ```\n *\n *   ## API\n *\n *   ### `toString(node)`\n *\n *   Transform a node to a string.\n */\n\n'use strict'\n\nmodule.exports = toString\n\nfunction toString(node) {\n  // \u201CThe concatenation of data of all the Text node descendants of the context\n  // object, in tree order.\u201D\n  if ('children' in node) {\n    return all(node)\n  }\n\n  // \u201CContext object\u2019s data.\u201D\n  return 'value' in node ? node.value : ''\n}\n\nfunction one(node) {\n  if (node.type === 'text') {\n    return node.value\n  }\n\n  return node.children ? all(node) : ''\n}\n\nfunction all(node) {\n  var children = node.children\n  var length = children.length\n  var index = -1\n  var result = []\n\n  while (++index < length) {\n    result[index] = one(children[index])\n  }\n\n  return result.join('')\n}\n", "'use strict'\n\nmodule.exports = isElement\n\n// Check if if `node` is an `element` and, if `tagNames` is given, `node`\n// matches them `tagNames`.\nfunction isElement(node, tagNames) {\n  var name\n\n  if (\n    !(\n      tagNames === null ||\n      tagNames === undefined ||\n      typeof tagNames === 'string' ||\n      (typeof tagNames === 'object' && tagNames.length !== 0)\n    )\n  ) {\n    throw new Error(\n      'Expected `string` or `Array.<string>` for `tagNames`, not `' +\n        tagNames +\n        '`'\n    )\n  }\n\n  if (\n    !node ||\n    typeof node !== 'object' ||\n    node.type !== 'element' ||\n    typeof node.tagName !== 'string'\n  ) {\n    return false\n  }\n\n  if (tagNames === null || tagNames === undefined) {\n    return true\n  }\n\n  name = node.tagName\n\n  if (typeof tagNames === 'string') {\n    return name === tagNames\n  }\n\n  return tagNames.indexOf(name) !== -1\n}\n", "'use strict'\n\nvar own = {}.hasOwnProperty\n\nmodule.exports = hasProperty\n\n// Check if `node` has a set `name` property.\nfunction hasProperty(node, name) {\n  var props\n  var value\n\n  if (!node || !name || typeof node !== 'object' || node.type !== 'element') {\n    return false\n  }\n\n  props = node.properties\n  value = props && own.call(props, name) && props[name]\n\n  return value !== null && value !== undefined && value !== false\n}\n", "'use strict'\n\nvar slugs = require('github-slugger')()\nvar visit = require('unist-util-visit')\nvar toString = require('hast-util-to-string')\nvar is = require('hast-util-is-element')\nvar has = require('hast-util-has-property')\n\nmodule.exports = slug\n\nvar headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']\n\nfunction slug() {\n  return transformer\n}\n\nfunction transformer(tree) {\n  slugs.reset()\n\n  visit(tree, 'element', function(node) {\n    if (is(node, headings) && !has(node, 'id')) {\n      node.properties.id = slugs.slug(toString(node))\n    }\n  })\n}\n", "'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n", "'use strict'\n\nmodule.exports = bail\n\nfunction bail(err) {\n  if (err) {\n    throw err\n  }\n}\n", "'use strict'\n\nvar own = {}.hasOwnProperty\n\nmodule.exports = stringify\n\nfunction stringify(value) {\n  // Nothing.\n  if (!value || typeof value !== 'object') {\n    return ''\n  }\n\n  // Node.\n  if (own.call(value, 'position') || own.call(value, 'type')) {\n    return position(value.position)\n  }\n\n  // Position.\n  if (own.call(value, 'start') || own.call(value, 'end')) {\n    return position(value)\n  }\n\n  // Point.\n  if (own.call(value, 'line') || own.call(value, 'column')) {\n    return point(value)\n  }\n\n  // ?\n  return ''\n}\n\nfunction point(point) {\n  if (!point || typeof point !== 'object') {\n    point = {}\n  }\n\n  return index(point.line) + ':' + index(point.column)\n}\n\nfunction position(pos) {\n  if (!pos || typeof pos !== 'object') {\n    pos = {}\n  }\n\n  return point(pos.start) + '-' + point(pos.end)\n}\n\nfunction index(value) {\n  return value && typeof value === 'number' ? value : 1\n}\n", "'use strict'\n\nvar stringify = require('unist-util-stringify-position')\n\nmodule.exports = VMessage\n\n// Inherit from `Error#`.\nfunction VMessagePrototype() {}\nVMessagePrototype.prototype = Error.prototype\nVMessage.prototype = new VMessagePrototype()\n\n// Message properties.\nvar proto = VMessage.prototype\n\nproto.file = ''\nproto.name = ''\nproto.reason = ''\nproto.message = ''\nproto.stack = ''\nproto.fatal = null\nproto.column = null\nproto.line = null\n\n// Construct a new VMessage.\n//\n// Note: We cannot invoke `Error` on the created context, as that adds readonly\n// `line` and `column` attributes on Safari 9, thus throwing and failing the\n// data.\nfunction VMessage(reason, position, origin) {\n  var parts\n  var range\n  var location\n\n  if (typeof position === 'string') {\n    origin = position\n    position = null\n  }\n\n  parts = parseOrigin(origin)\n  range = stringify(position) || '1:1'\n\n  location = {\n    start: {line: null, column: null},\n    end: {line: null, column: null}\n  }\n\n  // Node.\n  if (position && position.position) {\n    position = position.position\n  }\n\n  if (position) {\n    // Position.\n    if (position.start) {\n      location = position\n      position = position.start\n    } else {\n      // Point.\n      location.start = position\n    }\n  }\n\n  if (reason.stack) {\n    this.stack = reason.stack\n    reason = reason.message\n  }\n\n  this.message = reason\n  this.name = range\n  this.reason = reason\n  this.line = position ? position.line : null\n  this.column = position ? position.column : null\n  this.location = location\n  this.source = parts[0]\n  this.ruleId = parts[1]\n}\n\nfunction parseOrigin(origin) {\n  var result = [null, null]\n  var index\n\n  if (typeof origin === 'string') {\n    index = origin.indexOf(':')\n\n    if (index === -1) {\n      result[1] = origin\n    } else {\n      result[0] = origin.slice(0, index)\n      result[1] = origin.slice(index + 1)\n    }\n  }\n\n  return result\n}\n", "// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n  if (typeof path !== 'string') {\n    throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n  }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n  var res = '';\n  var lastSegmentLength = 0;\n  var lastSlash = -1;\n  var dots = 0;\n  var code;\n  for (var i = 0; i <= path.length; ++i) {\n    if (i < path.length)\n      code = path.charCodeAt(i);\n    else if (code === 47 /*/*/)\n      break;\n    else\n      code = 47 /*/*/;\n    if (code === 47 /*/*/) {\n      if (lastSlash === i - 1 || dots === 1) {\n        // NOOP\n      } else if (lastSlash !== i - 1 && dots === 2) {\n        if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n          if (res.length > 2) {\n            var lastSlashIndex = res.lastIndexOf('/');\n            if (lastSlashIndex !== res.length - 1) {\n              if (lastSlashIndex === -1) {\n                res = '';\n                lastSegmentLength = 0;\n              } else {\n                res = res.slice(0, lastSlashIndex);\n                lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n              }\n              lastSlash = i;\n              dots = 0;\n              continue;\n            }\n          } else if (res.length === 2 || res.length === 1) {\n            res = '';\n            lastSegmentLength = 0;\n            lastSlash = i;\n            dots = 0;\n            continue;\n          }\n        }\n        if (allowAboveRoot) {\n          if (res.length > 0)\n            res += '/..';\n          else\n            res = '..';\n          lastSegmentLength = 2;\n        }\n      } else {\n        if (res.length > 0)\n          res += '/' + path.slice(lastSlash + 1, i);\n        else\n          res = path.slice(lastSlash + 1, i);\n        lastSegmentLength = i - lastSlash - 1;\n      }\n      lastSlash = i;\n      dots = 0;\n    } else if (code === 46 /*.*/ && dots !== -1) {\n      ++dots;\n    } else {\n      dots = -1;\n    }\n  }\n  return res;\n}\n\nfunction _format(sep, pathObject) {\n  var dir = pathObject.dir || pathObject.root;\n  var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n  if (!dir) {\n    return base;\n  }\n  if (dir === pathObject.root) {\n    return dir + base;\n  }\n  return dir + sep + base;\n}\n\nvar posix = {\n  // path.resolve([from ...], to)\n  resolve: function resolve() {\n    var resolvedPath = '';\n    var resolvedAbsolute = false;\n    var cwd;\n\n    for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n      var path;\n      if (i >= 0)\n        path = arguments[i];\n      else {\n        if (cwd === undefined)\n          cwd = process.cwd();\n        path = cwd;\n      }\n\n      assertPath(path);\n\n      // Skip empty entries\n      if (path.length === 0) {\n        continue;\n      }\n\n      resolvedPath = path + '/' + resolvedPath;\n      resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n    }\n\n    // At this point the path should be resolved to a full absolute path, but\n    // handle relative paths to be safe (might happen when process.cwd() fails)\n\n    // Normalize the path\n    resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n    if (resolvedAbsolute) {\n      if (resolvedPath.length > 0)\n        return '/' + resolvedPath;\n      else\n        return '/';\n    } else if (resolvedPath.length > 0) {\n      return resolvedPath;\n    } else {\n      return '.';\n    }\n  },\n\n  normalize: function normalize(path) {\n    assertPath(path);\n\n    if (path.length === 0) return '.';\n\n    var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n    var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n    // Normalize the path\n    path = normalizeStringPosix(path, !isAbsolute);\n\n    if (path.length === 0 && !isAbsolute) path = '.';\n    if (path.length > 0 && trailingSeparator) path += '/';\n\n    if (isAbsolute) return '/' + path;\n    return path;\n  },\n\n  isAbsolute: function isAbsolute(path) {\n    assertPath(path);\n    return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n  },\n\n  join: function join() {\n    if (arguments.length === 0)\n      return '.';\n    var joined;\n    for (var i = 0; i < arguments.length; ++i) {\n      var arg = arguments[i];\n      assertPath(arg);\n      if (arg.length > 0) {\n        if (joined === undefined)\n          joined = arg;\n        else\n          joined += '/' + arg;\n      }\n    }\n    if (joined === undefined)\n      return '.';\n    return posix.normalize(joined);\n  },\n\n  relative: function relative(from, to) {\n    assertPath(from);\n    assertPath(to);\n\n    if (from === to) return '';\n\n    from = posix.resolve(from);\n    to = posix.resolve(to);\n\n    if (from === to) return '';\n\n    // Trim any leading backslashes\n    var fromStart = 1;\n    for (; fromStart < from.length; ++fromStart) {\n      if (from.charCodeAt(fromStart) !== 47 /*/*/)\n        break;\n    }\n    var fromEnd = from.length;\n    var fromLen = fromEnd - fromStart;\n\n    // Trim any leading backslashes\n    var toStart = 1;\n    for (; toStart < to.length; ++toStart) {\n      if (to.charCodeAt(toStart) !== 47 /*/*/)\n        break;\n    }\n    var toEnd = to.length;\n    var toLen = toEnd - toStart;\n\n    // Compare paths to find the longest common path from root\n    var length = fromLen < toLen ? fromLen : toLen;\n    var lastCommonSep = -1;\n    var i = 0;\n    for (; i <= length; ++i) {\n      if (i === length) {\n        if (toLen > length) {\n          if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n            // We get here if `from` is the exact base path for `to`.\n            // For example: from='/foo/bar'; to='/foo/bar/baz'\n            return to.slice(toStart + i + 1);\n          } else if (i === 0) {\n            // We get here if `from` is the root\n            // For example: from='/'; to='/foo'\n            return to.slice(toStart + i);\n          }\n        } else if (fromLen > length) {\n          if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n            // We get here if `to` is the exact base path for `from`.\n            // For example: from='/foo/bar/baz'; to='/foo/bar'\n            lastCommonSep = i;\n          } else if (i === 0) {\n            // We get here if `to` is the root.\n            // For example: from='/foo'; to='/'\n            lastCommonSep = 0;\n          }\n        }\n        break;\n      }\n      var fromCode = from.charCodeAt(fromStart + i);\n      var toCode = to.charCodeAt(toStart + i);\n      if (fromCode !== toCode)\n        break;\n      else if (fromCode === 47 /*/*/)\n        lastCommonSep = i;\n    }\n\n    var out = '';\n    // Generate the relative path based on the path difference between `to`\n    // and `from`\n    for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n      if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n        if (out.length === 0)\n          out += '..';\n        else\n          out += '/..';\n      }\n    }\n\n    // Lastly, append the rest of the destination (`to`) path that comes after\n    // the common path parts\n    if (out.length > 0)\n      return out + to.slice(toStart + lastCommonSep);\n    else {\n      toStart += lastCommonSep;\n      if (to.charCodeAt(toStart) === 47 /*/*/)\n        ++toStart;\n      return to.slice(toStart);\n    }\n  },\n\n  _makeLong: function _makeLong(path) {\n    return path;\n  },\n\n  dirname: function dirname(path) {\n    assertPath(path);\n    if (path.length === 0) return '.';\n    var code = path.charCodeAt(0);\n    var hasRoot = code === 47 /*/*/;\n    var end = -1;\n    var matchedSlash = true;\n    for (var i = path.length - 1; i >= 1; --i) {\n      code = path.charCodeAt(i);\n      if (code === 47 /*/*/) {\n          if (!matchedSlash) {\n            end = i;\n            break;\n          }\n        } else {\n        // We saw the first non-path separator\n        matchedSlash = false;\n      }\n    }\n\n    if (end === -1) return hasRoot ? '/' : '.';\n    if (hasRoot && end === 1) return '//';\n    return path.slice(0, end);\n  },\n\n  basename: function basename(path, ext) {\n    if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n    assertPath(path);\n\n    var start = 0;\n    var end = -1;\n    var matchedSlash = true;\n    var i;\n\n    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n      if (ext.length === path.length && ext === path) return '';\n      var extIdx = ext.length - 1;\n      var firstNonSlashEnd = -1;\n      for (i = path.length - 1; i >= 0; --i) {\n        var code = path.charCodeAt(i);\n        if (code === 47 /*/*/) {\n            // If we reached a path separator that was not part of a set of path\n            // separators at the end of the string, stop now\n            if (!matchedSlash) {\n              start = i + 1;\n              break;\n            }\n          } else {\n          if (firstNonSlashEnd === -1) {\n            // We saw the first non-path separator, remember this index in case\n            // we need it if the extension ends up not matching\n            matchedSlash = false;\n            firstNonSlashEnd = i + 1;\n          }\n          if (extIdx >= 0) {\n            // Try to match the explicit extension\n            if (code === ext.charCodeAt(extIdx)) {\n              if (--extIdx === -1) {\n                // We matched the extension, so mark this as the end of our path\n                // component\n                end = i;\n              }\n            } else {\n              // Extension does not match, so our result is the entire path\n              // component\n              extIdx = -1;\n              end = firstNonSlashEnd;\n            }\n          }\n        }\n      }\n\n      if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n      return path.slice(start, end);\n    } else {\n      for (i = path.length - 1; i >= 0; --i) {\n        if (path.charCodeAt(i) === 47 /*/*/) {\n            // If we reached a path separator that was not part of a set of path\n            // separators at the end of the string, stop now\n            if (!matchedSlash) {\n              start = i + 1;\n              break;\n            }\n          } else if (end === -1) {\n          // We saw the first non-path separator, mark this as the end of our\n          // path component\n          matchedSlash = false;\n          end = i + 1;\n        }\n      }\n\n      if (end === -1) return '';\n      return path.slice(start, end);\n    }\n  },\n\n  extname: function extname(path) {\n    assertPath(path);\n    var startDot = -1;\n    var startPart = 0;\n    var end = -1;\n    var matchedSlash = true;\n    // Track the state of characters (if any) we see before our first dot and\n    // after any path separator we find\n    var preDotState = 0;\n    for (var i = path.length - 1; i >= 0; --i) {\n      var code = path.charCodeAt(i);\n      if (code === 47 /*/*/) {\n          // If we reached a path separator that was not part of a set of path\n          // separators at the end of the string, stop now\n          if (!matchedSlash) {\n            startPart = i + 1;\n            break;\n          }\n          continue;\n        }\n      if (end === -1) {\n        // We saw the first non-path separator, mark this as the end of our\n        // extension\n        matchedSlash = false;\n        end = i + 1;\n      }\n      if (code === 46 /*.*/) {\n          // If this is our first dot, mark it as the start of our extension\n          if (startDot === -1)\n            startDot = i;\n          else if (preDotState !== 1)\n            preDotState = 1;\n      } else if (startDot !== -1) {\n        // We saw a non-dot and non-path separator before our dot, so we should\n        // have a good chance at having a non-empty extension\n        preDotState = -1;\n      }\n    }\n\n    if (startDot === -1 || end === -1 ||\n        // We saw a non-dot character immediately before the dot\n        preDotState === 0 ||\n        // The (right-most) trimmed path component is exactly '..'\n        preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n      return '';\n    }\n    return path.slice(startDot, end);\n  },\n\n  format: function format(pathObject) {\n    if (pathObject === null || typeof pathObject !== 'object') {\n      throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n    }\n    return _format('/', pathObject);\n  },\n\n  parse: function parse(path) {\n    assertPath(path);\n\n    var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n    if (path.length === 0) return ret;\n    var code = path.charCodeAt(0);\n    var isAbsolute = code === 47 /*/*/;\n    var start;\n    if (isAbsolute) {\n      ret.root = '/';\n      start = 1;\n    } else {\n      start = 0;\n    }\n    var startDot = -1;\n    var startPart = 0;\n    var end = -1;\n    var matchedSlash = true;\n    var i = path.length - 1;\n\n    // Track the state of characters (if any) we see before our first dot and\n    // after any path separator we find\n    var preDotState = 0;\n\n    // Get non-dir info\n    for (; i >= start; --i) {\n      code = path.charCodeAt(i);\n      if (code === 47 /*/*/) {\n          // If we reached a path separator that was not part of a set of path\n          // separators at the end of the string, stop now\n          if (!matchedSlash) {\n            startPart = i + 1;\n            break;\n          }\n          continue;\n        }\n      if (end === -1) {\n        // We saw the first non-path separator, mark this as the end of our\n        // extension\n        matchedSlash = false;\n        end = i + 1;\n      }\n      if (code === 46 /*.*/) {\n          // If this is our first dot, mark it as the start of our extension\n          if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n        } else if (startDot !== -1) {\n        // We saw a non-dot and non-path separator before our dot, so we should\n        // have a good chance at having a non-empty extension\n        preDotState = -1;\n      }\n    }\n\n    if (startDot === -1 || end === -1 ||\n    // We saw a non-dot character immediately before the dot\n    preDotState === 0 ||\n    // The (right-most) trimmed path component is exactly '..'\n    preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n      if (end !== -1) {\n        if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n      }\n    } else {\n      if (startPart === 0 && isAbsolute) {\n        ret.name = path.slice(1, startDot);\n        ret.base = path.slice(1, end);\n      } else {\n        ret.name = path.slice(startPart, startDot);\n        ret.base = path.slice(startPart, end);\n      }\n      ret.ext = path.slice(startDot, end);\n    }\n\n    if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n    return ret;\n  },\n\n  sep: '/',\n  delimiter: ':',\n  win32: null,\n  posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n", "'use strict';\n\nvar path = require('path');\n\nfunction replaceExt(npath, ext) {\n  if (typeof npath !== 'string') {\n    return npath;\n  }\n\n  if (npath.length === 0) {\n    return npath;\n  }\n\n  var nFileName = path.basename(npath, path.extname(npath)) + ext;\n  return path.join(path.dirname(npath), nFileName);\n}\n\nmodule.exports = replaceExt;\n", "/*!\n * Determine if an object is a Buffer\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n  return obj != null && obj.constructor != null &&\n    typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n", "'use strict'\n\nvar path = require('path')\nvar replace = require('replace-ext')\nvar buffer = require('is-buffer')\n\nmodule.exports = VFile\n\nvar own = {}.hasOwnProperty\nvar proto = VFile.prototype\n\n// Order of setting (least specific to most), we need this because otherwise\n// `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n// stem can be set.\nvar order = ['history', 'path', 'basename', 'stem', 'extname', 'dirname']\n\nproto.toString = toString\n\n// Access full path (`~/index.min.js`).\nObject.defineProperty(proto, 'path', {get: getPath, set: setPath})\n\n// Access parent path (`~`).\nObject.defineProperty(proto, 'dirname', {get: getDirname, set: setDirname})\n\n// Access basename (`index.min.js`).\nObject.defineProperty(proto, 'basename', {get: getBasename, set: setBasename})\n\n// Access extname (`.js`).\nObject.defineProperty(proto, 'extname', {get: getExtname, set: setExtname})\n\n// Access stem (`index.min`).\nObject.defineProperty(proto, 'stem', {get: getStem, set: setStem})\n\n// Construct a new file.\nfunction VFile(options) {\n  var prop\n  var index\n  var length\n\n  if (!options) {\n    options = {}\n  } else if (typeof options === 'string' || buffer(options)) {\n    options = {contents: options}\n  } else if ('message' in options && 'messages' in options) {\n    return options\n  }\n\n  if (!(this instanceof VFile)) {\n    return new VFile(options)\n  }\n\n  this.data = {}\n  this.messages = []\n  this.history = []\n  this.cwd = process.cwd()\n\n  // Set path related properties in the correct order.\n  index = -1\n  length = order.length\n\n  while (++index < length) {\n    prop = order[index]\n\n    if (own.call(options, prop)) {\n      this[prop] = options[prop]\n    }\n  }\n\n  // Set non-path related properties.\n  for (prop in options) {\n    if (order.indexOf(prop) === -1) {\n      this[prop] = options[prop]\n    }\n  }\n}\n\nfunction getPath() {\n  return this.history[this.history.length - 1]\n}\n\nfunction setPath(path) {\n  assertNonEmpty(path, 'path')\n\n  if (path !== this.path) {\n    this.history.push(path)\n  }\n}\n\nfunction getDirname() {\n  return typeof this.path === 'string' ? path.dirname(this.path) : undefined\n}\n\nfunction setDirname(dirname) {\n  assertPath(this.path, 'dirname')\n  this.path = path.join(dirname || '', this.basename)\n}\n\nfunction getBasename() {\n  return typeof this.path === 'string' ? path.basename(this.path) : undefined\n}\n\nfunction setBasename(basename) {\n  assertNonEmpty(basename, 'basename')\n  assertPart(basename, 'basename')\n  this.path = path.join(this.dirname || '', basename)\n}\n\nfunction getExtname() {\n  return typeof this.path === 'string' ? path.extname(this.path) : undefined\n}\n\nfunction setExtname(extname) {\n  var ext = extname || ''\n\n  assertPart(ext, 'extname')\n  assertPath(this.path, 'extname')\n\n  if (ext) {\n    if (ext.charAt(0) !== '.') {\n      throw new Error('`extname` must start with `.`')\n    }\n\n    if (ext.indexOf('.', 1) !== -1) {\n      throw new Error('`extname` cannot contain multiple dots')\n    }\n  }\n\n  this.path = replace(this.path, ext)\n}\n\nfunction getStem() {\n  return typeof this.path === 'string'\n    ? path.basename(this.path, this.extname)\n    : undefined\n}\n\nfunction setStem(stem) {\n  assertNonEmpty(stem, 'stem')\n  assertPart(stem, 'stem')\n  this.path = path.join(this.dirname || '', stem + (this.extname || ''))\n}\n\n// Get the value of the file.\nfunction toString(encoding) {\n  var value = this.contents || ''\n  return buffer(value) ? value.toString(encoding) : String(value)\n}\n\n// Assert that `part` is not a path (i.e., does not contain `path.sep`).\nfunction assertPart(part, name) {\n  if (part.indexOf(path.sep) !== -1) {\n    throw new Error(\n      '`' + name + '` cannot be a path: did not expect `' + path.sep + '`'\n    )\n  }\n}\n\n// Assert that `part` is not empty.\nfunction assertNonEmpty(part, name) {\n  if (!part) {\n    throw new Error('`' + name + '` cannot be empty')\n  }\n}\n\n// Assert `path` exists.\nfunction assertPath(path, name) {\n  if (!path) {\n    throw new Error('Setting `' + name + '` requires `path` to be set too')\n  }\n}\n", "'use strict'\n\nvar VMessage = require('vfile-message')\nvar VFile = require('./core.js')\n\nmodule.exports = VFile\n\nvar proto = VFile.prototype\n\nproto.message = message\nproto.info = info\nproto.fail = fail\n\n// Create a message with `reason` at `position`.\n// When an error is passed in as `reason`, copies the stack.\nfunction message(reason, position, origin) {\n  var filePath = this.path\n  var message = new VMessage(reason, position, origin)\n\n  if (filePath) {\n    message.name = filePath + ':' + message.name\n    message.file = filePath\n  }\n\n  message.fatal = false\n\n  this.messages.push(message)\n\n  return message\n}\n\n// Fail: creates a vmessage, associates it with the file, and throws it.\nfunction fail() {\n  var message = this.message.apply(this, arguments)\n\n  message.fatal = true\n\n  throw message\n}\n\n// Info: creates a vmessage, associates it with the file, and marks the fatality\n// as null.\nfunction info() {\n  var message = this.message.apply(this, arguments)\n\n  message.fatal = null\n\n  return message\n}\n", "'use strict'\n\nvar slice = [].slice\n\nmodule.exports = wrap\n\n// Wrap `fn`.\n// Can be sync or async; return a promise, receive a completion handler, return\n// new values and errors.\nfunction wrap(fn, callback) {\n  var invoked\n\n  return wrapped\n\n  function wrapped() {\n    var params = slice.call(arguments, 0)\n    var callback = fn.length > params.length\n    var result\n\n    if (callback) {\n      params.push(done)\n    }\n\n    try {\n      result = fn.apply(null, params)\n    } catch (error) {\n      // Well, this is quite the pickle.\n      // `fn` received a callback and invoked it (thus continuing the pipeline),\n      // but later also threw an error.\n      // We\u2019re not about to restart the pipeline again, so the only thing left\n      // to do is to throw the thing instead.\n      if (callback && invoked) {\n        throw error\n      }\n\n      return done(error)\n    }\n\n    if (!callback) {\n      if (result && typeof result.then === 'function') {\n        result.then(then, done)\n      } else if (result instanceof Error) {\n        done(result)\n      } else {\n        then(result)\n      }\n    }\n  }\n\n  // Invoke `next`, only once.\n  function done() {\n    if (!invoked) {\n      invoked = true\n\n      callback.apply(null, arguments)\n    }\n  }\n\n  // Invoke `done` with one value.\n  // Tracks if an error is passed, too.\n  function then(value) {\n    done(null, value)\n  }\n}\n", "'use strict'\n\nvar wrap = require('./wrap.js')\n\nmodule.exports = trough\n\ntrough.wrap = wrap\n\nvar slice = [].slice\n\n// Create new middleware.\nfunction trough() {\n  var fns = []\n  var middleware = {}\n\n  middleware.run = run\n  middleware.use = use\n\n  return middleware\n\n  // Run `fns`.  Last argument must be a completion handler.\n  function run() {\n    var index = -1\n    var input = slice.call(arguments, 0, -1)\n    var done = arguments[arguments.length - 1]\n\n    if (typeof done !== 'function') {\n      throw new Error('Expected function as last argument, not ' + done)\n    }\n\n    next.apply(null, [null].concat(input))\n\n    // Run the next `fn`, if any.\n    function next(err) {\n      var fn = fns[++index]\n      var params = slice.call(arguments, 0)\n      var values = params.slice(1)\n      var length = input.length\n      var pos = -1\n\n      if (err) {\n        done(err)\n        return\n      }\n\n      // Copy non-nully input into values.\n      while (++pos < length) {\n        if (values[pos] === null || values[pos] === undefined) {\n          values[pos] = input[pos]\n        }\n      }\n\n      input = values\n\n      // Next or done.\n      if (fn) {\n        wrap(fn, next).apply(null, input)\n      } else {\n        done.apply(null, [null].concat(input))\n      }\n    }\n  }\n\n  // Add `fn` to the list.\n  function use(fn) {\n    if (typeof fn !== 'function') {\n      throw new Error('Expected `fn` to be a function, not ' + fn)\n    }\n\n    fns.push(fn)\n\n    return middleware\n  }\n}\n", "'use strict';\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n", "'use strict'\n\nvar extend = require('extend')\nvar bail = require('bail')\nvar vfile = require('vfile')\nvar trough = require('trough')\nvar plain = require('is-plain-obj')\n\n// Expose a frozen processor.\nmodule.exports = unified().freeze()\n\nvar slice = [].slice\nvar own = {}.hasOwnProperty\n\n// Process pipeline.\nvar pipeline = trough()\n  .use(pipelineParse)\n  .use(pipelineRun)\n  .use(pipelineStringify)\n\nfunction pipelineParse(p, ctx) {\n  ctx.tree = p.parse(ctx.file)\n}\n\nfunction pipelineRun(p, ctx, next) {\n  p.run(ctx.tree, ctx.file, done)\n\n  function done(err, tree, file) {\n    if (err) {\n      next(err)\n    } else {\n      ctx.tree = tree\n      ctx.file = file\n      next()\n    }\n  }\n}\n\nfunction pipelineStringify(p, ctx) {\n  ctx.file.contents = p.stringify(ctx.tree, ctx.file)\n}\n\n// Function to create the first processor.\nfunction unified() {\n  var attachers = []\n  var transformers = trough()\n  var namespace = {}\n  var frozen = false\n  var freezeIndex = -1\n\n  // Data management.\n  processor.data = data\n\n  // Lock.\n  processor.freeze = freeze\n\n  // Plugins.\n  processor.attachers = attachers\n  processor.use = use\n\n  // API.\n  processor.parse = parse\n  processor.stringify = stringify\n  processor.run = run\n  processor.runSync = runSync\n  processor.process = process\n  processor.processSync = processSync\n\n  // Expose.\n  return processor\n\n  // Create a new processor based on the processor in the current scope.\n  function processor() {\n    var destination = unified()\n    var length = attachers.length\n    var index = -1\n\n    while (++index < length) {\n      destination.use.apply(null, attachers[index])\n    }\n\n    destination.data(extend(true, {}, namespace))\n\n    return destination\n  }\n\n  // Freeze: used to signal a processor that has finished configuration.\n  //\n  // For example, take unified itself: it\u2019s frozen.\n  // Plugins should not be added to it.\n  // Rather, it should be extended, by invoking it, before modifying it.\n  //\n  // In essence, always invoke this when exporting a processor.\n  function freeze() {\n    var values\n    var plugin\n    var options\n    var transformer\n\n    if (frozen) {\n      return processor\n    }\n\n    while (++freezeIndex < attachers.length) {\n      values = attachers[freezeIndex]\n      plugin = values[0]\n      options = values[1]\n      transformer = null\n\n      if (options === false) {\n        continue\n      }\n\n      if (options === true) {\n        values[1] = undefined\n      }\n\n      transformer = plugin.apply(processor, values.slice(1))\n\n      if (typeof transformer === 'function') {\n        transformers.use(transformer)\n      }\n    }\n\n    frozen = true\n    freezeIndex = Infinity\n\n    return processor\n  }\n\n  // Data management.\n  // Getter / setter for processor-specific informtion.\n  function data(key, value) {\n    if (typeof key === 'string') {\n      // Set `key`.\n      if (arguments.length === 2) {\n        assertUnfrozen('data', frozen)\n\n        namespace[key] = value\n\n        return processor\n      }\n\n      // Get `key`.\n      return (own.call(namespace, key) && namespace[key]) || null\n    }\n\n    // Set space.\n    if (key) {\n      assertUnfrozen('data', frozen)\n      namespace = key\n      return processor\n    }\n\n    // Get space.\n    return namespace\n  }\n\n  // Plugin management.\n  //\n  // Pass it:\n  // *   an attacher and options,\n  // *   a preset,\n  // *   a list of presets, attachers, and arguments (list of attachers and\n  //     options).\n  function use(value) {\n    var settings\n\n    assertUnfrozen('use', frozen)\n\n    if (value === null || value === undefined) {\n      // Empty.\n    } else if (typeof value === 'function') {\n      addPlugin.apply(null, arguments)\n    } else if (typeof value === 'object') {\n      if ('length' in value) {\n        addList(value)\n      } else {\n        addPreset(value)\n      }\n    } else {\n      throw new Error('Expected usable value, not `' + value + '`')\n    }\n\n    if (settings) {\n      namespace.settings = extend(namespace.settings || {}, settings)\n    }\n\n    return processor\n\n    function addPreset(result) {\n      addList(result.plugins)\n\n      if (result.settings) {\n        settings = extend(settings || {}, result.settings)\n      }\n    }\n\n    function add(value) {\n      if (typeof value === 'function') {\n        addPlugin(value)\n      } else if (typeof value === 'object') {\n        if ('length' in value) {\n          addPlugin.apply(null, value)\n        } else {\n          addPreset(value)\n        }\n      } else {\n        throw new Error('Expected usable value, not `' + value + '`')\n      }\n    }\n\n    function addList(plugins) {\n      var length\n      var index\n\n      if (plugins === null || plugins === undefined) {\n        // Empty.\n      } else if (typeof plugins === 'object' && 'length' in plugins) {\n        length = plugins.length\n        index = -1\n\n        while (++index < length) {\n          add(plugins[index])\n        }\n      } else {\n        throw new Error('Expected a list of plugins, not `' + plugins + '`')\n      }\n    }\n\n    function addPlugin(plugin, value) {\n      var entry = find(plugin)\n\n      if (entry) {\n        if (plain(entry[1]) && plain(value)) {\n          value = extend(entry[1], value)\n        }\n\n        entry[1] = value\n      } else {\n        attachers.push(slice.call(arguments))\n      }\n    }\n  }\n\n  function find(plugin) {\n    var length = attachers.length\n    var index = -1\n    var entry\n\n    while (++index < length) {\n      entry = attachers[index]\n\n      if (entry[0] === plugin) {\n        return entry\n      }\n    }\n  }\n\n  // Parse a file (in string or vfile representation) into a unist node using\n  // the `Parser` on the processor.\n  function parse(doc) {\n    var file = vfile(doc)\n    var Parser\n\n    freeze()\n    Parser = processor.Parser\n    assertParser('parse', Parser)\n\n    if (newable(Parser, 'parse')) {\n      return new Parser(String(file), file).parse()\n    }\n\n    return Parser(String(file), file) // eslint-disable-line new-cap\n  }\n\n  // Run transforms on a unist node representation of a file (in string or\n  // vfile representation), async.\n  function run(node, file, cb) {\n    assertNode(node)\n    freeze()\n\n    if (!cb && typeof file === 'function') {\n      cb = file\n      file = null\n    }\n\n    if (!cb) {\n      return new Promise(executor)\n    }\n\n    executor(null, cb)\n\n    function executor(resolve, reject) {\n      transformers.run(node, vfile(file), done)\n\n      function done(err, tree, file) {\n        tree = tree || node\n        if (err) {\n          reject(err)\n        } else if (resolve) {\n          resolve(tree)\n        } else {\n          cb(null, tree, file)\n        }\n      }\n    }\n  }\n\n  // Run transforms on a unist node representation of a file (in string or\n  // vfile representation), sync.\n  function runSync(node, file) {\n    var complete = false\n    var result\n\n    run(node, file, done)\n\n    assertDone('runSync', 'run', complete)\n\n    return result\n\n    function done(err, tree) {\n      complete = true\n      bail(err)\n      result = tree\n    }\n  }\n\n  // Stringify a unist node representation of a file (in string or vfile\n  // representation) into a string using the `Compiler` on the processor.\n  function stringify(node, doc) {\n    var file = vfile(doc)\n    var Compiler\n\n    freeze()\n    Compiler = processor.Compiler\n    assertCompiler('stringify', Compiler)\n    assertNode(node)\n\n    if (newable(Compiler, 'compile')) {\n      return new Compiler(node, file).compile()\n    }\n\n    return Compiler(node, file) // eslint-disable-line new-cap\n  }\n\n  // Parse a file (in string or vfile representation) into a unist node using\n  // the `Parser` on the processor, then run transforms on that node, and\n  // compile the resulting node using the `Compiler` on the processor, and\n  // store that result on the vfile.\n  function process(doc, cb) {\n    freeze()\n    assertParser('process', processor.Parser)\n    assertCompiler('process', processor.Compiler)\n\n    if (!cb) {\n      return new Promise(executor)\n    }\n\n    executor(null, cb)\n\n    function executor(resolve, reject) {\n      var file = vfile(doc)\n\n      pipeline.run(processor, {file: file}, done)\n\n      function done(err) {\n        if (err) {\n          reject(err)\n        } else if (resolve) {\n          resolve(file)\n        } else {\n          cb(null, file)\n        }\n      }\n    }\n  }\n\n  // Process the given document (in string or vfile representation), sync.\n  function processSync(doc) {\n    var complete = false\n    var file\n\n    freeze()\n    assertParser('processSync', processor.Parser)\n    assertCompiler('processSync', processor.Compiler)\n    file = vfile(doc)\n\n    process(file, done)\n\n    assertDone('processSync', 'process', complete)\n\n    return file\n\n    function done(err) {\n      complete = true\n      bail(err)\n    }\n  }\n}\n\n// Check if `value` is a constructor.\nfunction newable(value, name) {\n  return (\n    typeof value === 'function' &&\n    value.prototype &&\n    // A function with keys in its prototype is probably a constructor.\n    // Classes\u2019 prototype methods are not enumerable, so we check if some value\n    // exists in the prototype.\n    (keys(value.prototype) || name in value.prototype)\n  )\n}\n\n// Check if `value` is an object with keys.\nfunction keys(value) {\n  var key\n  for (key in value) {\n    return true\n  }\n\n  return false\n}\n\n// Assert a parser is available.\nfunction assertParser(name, Parser) {\n  if (typeof Parser !== 'function') {\n    throw new Error('Cannot `' + name + '` without `Parser`')\n  }\n}\n\n// Assert a compiler is available.\nfunction assertCompiler(name, Compiler) {\n  if (typeof Compiler !== 'function') {\n    throw new Error('Cannot `' + name + '` without `Compiler`')\n  }\n}\n\n// Assert the processor is not frozen.\nfunction assertUnfrozen(name, frozen) {\n  if (frozen) {\n    throw new Error(\n      'Cannot invoke `' +\n        name +\n        '` on a frozen processor.\\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.'\n    )\n  }\n}\n\n// Assert `node` is a unist node.\nfunction assertNode(node) {\n  if (!node || typeof node.type !== 'string') {\n    throw new Error('Expected node, got `' + node + '`')\n  }\n}\n\n// Assert that `complete` is `true`.\nfunction assertDone(name, asyncName, complete) {\n  if (!complete) {\n    throw new Error(\n      '`' + name + '` finished async. Use `' + asyncName + '` instead'\n    )\n  }\n}\n", "if (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    if (superCtor) {\n      ctor.super_ = superCtor\n      ctor.prototype = Object.create(superCtor.prototype, {\n        constructor: {\n          value: ctor,\n          enumerable: false,\n          writable: true,\n          configurable: true\n        }\n      })\n    }\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    if (superCtor) {\n      ctor.super_ = superCtor\n      var TempCtor = function () {}\n      TempCtor.prototype = superCtor.prototype\n      ctor.prototype = new TempCtor()\n      ctor.prototype.constructor = ctor\n    }\n  }\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar inherits = require('inherits')\n\nmodule.exports = unherit\n\n// Create a custom constructor which can be modified without affecting the\n// original class.\nfunction unherit(Super) {\n  var result\n  var key\n  var value\n\n  inherits(Of, Super)\n  inherits(From, Of)\n\n  // Clone values.\n  result = Of.prototype\n\n  for (key in result) {\n    value = result[key]\n\n    if (value && typeof value === 'object') {\n      result[key] = 'concat' in value ? value.concat() : xtend(value)\n    }\n  }\n\n  return Of\n\n  // Constructor accepting a single argument, which itself is an `arguments`\n  // object.\n  function From(parameters) {\n    return Super.apply(this, parameters)\n  }\n\n  // Constructor accepting variadic arguments.\n  function Of() {\n    if (!(this instanceof Of)) {\n      return new From(arguments)\n    }\n\n    return Super.apply(this, arguments)\n  }\n}\n", "'use strict'\n\nmodule.exports = factory\n\n// Construct a state `toggler`: a function which inverses `property` in context\n// based on its current value.\n// The by `toggler` returned function restores that value.\nfunction factory(key, state, ctx) {\n  return enter\n\n  function enter() {\n    var context = ctx || this\n    var current = context[key]\n\n    context[key] = !state\n\n    return exit\n\n    function exit() {\n      context[key] = current\n    }\n  }\n}\n", "'use strict'\n\nmodule.exports = factory\n\nfunction factory(file) {\n  var contents = indices(String(file))\n\n  return {\n    toPosition: offsetToPositionFactory(contents),\n    toOffset: positionToOffsetFactory(contents)\n  }\n}\n\n// Factory to get the line and column-based `position` for `offset` in the bound\n// indices.\nfunction offsetToPositionFactory(indices) {\n  return offsetToPosition\n\n  // Get the line and column-based `position` for `offset` in the bound indices.\n  function offsetToPosition(offset) {\n    var index = -1\n    var length = indices.length\n\n    if (offset < 0) {\n      return {}\n    }\n\n    while (++index < length) {\n      if (indices[index] > offset) {\n        return {\n          line: index + 1,\n          column: offset - (indices[index - 1] || 0) + 1,\n          offset: offset\n        }\n      }\n    }\n\n    return {}\n  }\n}\n\n// Factory to get the `offset` for a line and column-based `position` in the\n// bound indices.\nfunction positionToOffsetFactory(indices) {\n  return positionToOffset\n\n  // Get the `offset` for a line and column-based `position` in the bound\n  // indices.\n  function positionToOffset(position) {\n    var line = position && position.line\n    var column = position && position.column\n\n    if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {\n      return (indices[line - 2] || 0) + column - 1 || 0\n    }\n\n    return -1\n  }\n}\n\n// Get indices of line-breaks in `value`.\nfunction indices(value) {\n  var result = []\n  var index = value.indexOf('\\n')\n\n  while (index !== -1) {\n    result.push(index + 1)\n    index = value.indexOf('\\n', index + 1)\n  }\n\n  result.push(value.length + 1)\n\n  return result\n}\n", "'use strict'\n\nmodule.exports = factory\n\nvar backslash = '\\\\'\n\n// Factory to de-escape a value, based on a list at `key` in `ctx`.\nfunction factory(ctx, key) {\n  return unescape\n\n  // De-escape a string using the expression at `key` in `ctx`.\n  function unescape(value) {\n    var prev = 0\n    var index = value.indexOf(backslash)\n    var escape = ctx[key]\n    var queue = []\n    var character\n\n    while (index !== -1) {\n      queue.push(value.slice(prev, index))\n      prev = index + 1\n      character = value.charAt(prev)\n\n      // If the following character is not a valid escape, add the slash.\n      if (!character || escape.indexOf(character) === -1) {\n        queue.push(backslash)\n      }\n\n      index = value.indexOf(backslash, prev + 1)\n    }\n\n    queue.push(value.slice(prev))\n\n    return queue.join('')\n  }\n}\n", "'use strict'\n\nmodule.exports = decimal\n\n// Check if the given character code, or the character code at the first\n// character, is decimal.\nfunction decimal(character) {\n  var code = typeof character === 'string' ? character.charCodeAt(0) : character\n\n  return code >= 48 && code <= 57 /* 0-9 */\n}\n", "'use strict'\n\nmodule.exports = hexadecimal\n\n// Check if the given character code, or the character code at the first\n// character, is hexadecimal.\nfunction hexadecimal(character) {\n  var code = typeof character === 'string' ? character.charCodeAt(0) : character\n\n  return (\n    (code >= 97 /* a */ && code <= 102) /* z */ ||\n    (code >= 65 /* A */ && code <= 70) /* Z */ ||\n    (code >= 48 /* A */ && code <= 57) /* Z */\n  )\n}\n", "'use strict'\n\nmodule.exports = alphabetical\n\n// Check if the given character code, or the character code at the first\n// character, is alphabetical.\nfunction alphabetical(character) {\n  var code = typeof character === 'string' ? character.charCodeAt(0) : character\n\n  return (\n    (code >= 97 && code <= 122) /* a-z */ ||\n    (code >= 65 && code <= 90) /* A-Z */\n  )\n}\n", "'use strict'\n\nvar alphabetical = require('is-alphabetical')\nvar decimal = require('is-decimal')\n\nmodule.exports = alphanumerical\n\n// Check if the given character code, or the character code at the first\n// character, is alphanumerical.\nfunction alphanumerical(character) {\n  return alphabetical(character) || decimal(character)\n}\n", "'use strict'\n\n/* eslint-env browser */\n\nvar el\n\nvar semicolon = 59 //  ';'\n\nmodule.exports = decodeEntity\n\nfunction decodeEntity(characters) {\n  var entity = '&' + characters + ';'\n  var char\n\n  el = el || document.createElement('i')\n  el.innerHTML = entity\n  char = el.textContent\n\n  // Some entities do not require the closing semicolon (`&not` - for instance),\n  // which leads to situations where parsing the assumed entity of &notit; will\n  // result in the string `\u00ACit;`.  When we encounter a trailing semicolon after\n  // parsing and the entity to decode was not a semicolon (`&semi;`), we can\n  // assume that the matching was incomplete\n  if (char.charCodeAt(char.length - 1) === semicolon && characters !== 'semi') {\n    return false\n  }\n\n  // If the decoded string is equal to the input, the entity was not valid\n  return char === entity ? false : char\n}\n", "'use strict'\n\nvar legacy = require('character-entities-legacy')\nvar invalid = require('character-reference-invalid')\nvar decimal = require('is-decimal')\nvar hexadecimal = require('is-hexadecimal')\nvar alphanumerical = require('is-alphanumerical')\nvar decodeEntity = require('./decode-entity')\n\nmodule.exports = parseEntities\n\nvar own = {}.hasOwnProperty\nvar fromCharCode = String.fromCharCode\nvar noop = Function.prototype\n\n// Default settings.\nvar defaults = {\n  warning: null,\n  reference: null,\n  text: null,\n  warningContext: null,\n  referenceContext: null,\n  textContext: null,\n  position: {},\n  additional: null,\n  attribute: false,\n  nonTerminated: true\n}\n\n// Characters.\nvar tab = 9 // '\\t'\nvar lineFeed = 10 // '\\n'\nvar formFeed = 12 //  '\\f'\nvar space = 32 // ' '\nvar ampersand = 38 //  '&'\nvar semicolon = 59 //  ';'\nvar lessThan = 60 //  '<'\nvar equalsTo = 61 //  '='\nvar numberSign = 35 //  '#'\nvar uppercaseX = 88 //  'X'\nvar lowercaseX = 120 //  'x'\nvar replacementCharacter = 65533 // '\uFFFD'\n\n// Reference types.\nvar name = 'named'\nvar hexa = 'hexadecimal'\nvar deci = 'decimal'\n\n// Map of bases.\nvar bases = {}\n\nbases[hexa] = 16\nbases[deci] = 10\n\n// Map of types to tests.\n// Each type of character reference accepts different characters.\n// This test is used to detect whether a reference has ended (as the semicolon\n// is not strictly needed).\nvar tests = {}\n\ntests[name] = alphanumerical\ntests[deci] = decimal\ntests[hexa] = hexadecimal\n\n// Warning types.\nvar namedNotTerminated = 1\nvar numericNotTerminated = 2\nvar namedEmpty = 3\nvar numericEmpty = 4\nvar namedUnknown = 5\nvar numericDisallowed = 6\nvar numericProhibited = 7\n\n// Warning messages.\nvar messages = {}\n\nmessages[namedNotTerminated] =\n  'Named character references must be terminated by a semicolon'\nmessages[numericNotTerminated] =\n  'Numeric character references must be terminated by a semicolon'\nmessages[namedEmpty] = 'Named character references cannot be empty'\nmessages[numericEmpty] = 'Numeric character references cannot be empty'\nmessages[namedUnknown] = 'Named character references must be known'\nmessages[numericDisallowed] =\n  'Numeric character references cannot be disallowed'\nmessages[numericProhibited] =\n  'Numeric character references cannot be outside the permissible Unicode range'\n\n// Wrap to ensure clean parameters are given to `parse`.\nfunction parseEntities(value, options) {\n  var settings = {}\n  var option\n  var key\n\n  if (!options) {\n    options = {}\n  }\n\n  for (key in defaults) {\n    option = options[key]\n    settings[key] =\n      option === null || option === undefined ? defaults[key] : option\n  }\n\n  if (settings.position.indent || settings.position.start) {\n    settings.indent = settings.position.indent || []\n    settings.position = settings.position.start\n  }\n\n  return parse(value, settings)\n}\n\n// Parse entities.\n// eslint-disable-next-line complexity\nfunction parse(value, settings) {\n  var additional = settings.additional\n  var nonTerminated = settings.nonTerminated\n  var handleText = settings.text\n  var handleReference = settings.reference\n  var handleWarning = settings.warning\n  var textContext = settings.textContext\n  var referenceContext = settings.referenceContext\n  var warningContext = settings.warningContext\n  var pos = settings.position\n  var indent = settings.indent || []\n  var length = value.length\n  var index = 0\n  var lines = -1\n  var column = pos.column || 1\n  var line = pos.line || 1\n  var queue = ''\n  var result = []\n  var entityCharacters\n  var namedEntity\n  var terminated\n  var characters\n  var character\n  var reference\n  var following\n  var warning\n  var reason\n  var output\n  var entity\n  var begin\n  var start\n  var type\n  var test\n  var prev\n  var next\n  var diff\n  var end\n\n  if (typeof additional === 'string') {\n    additional = additional.charCodeAt(0)\n  }\n\n  // Cache the current point.\n  prev = now()\n\n  // Wrap `handleWarning`.\n  warning = handleWarning ? parseError : noop\n\n  // Ensure the algorithm walks over the first character and the end (inclusive).\n  index--\n  length++\n\n  while (++index < length) {\n    // If the previous character was a newline.\n    if (character === lineFeed) {\n      column = indent[lines] || 1\n    }\n\n    character = value.charCodeAt(index)\n\n    if (character === ampersand) {\n      following = value.charCodeAt(index + 1)\n\n      // The behaviour depends on the identity of the next character.\n      if (\n        following === tab ||\n        following === lineFeed ||\n        following === formFeed ||\n        following === space ||\n        following === ampersand ||\n        following === lessThan ||\n        following !== following ||\n        (additional && following === additional)\n      ) {\n        // Not a character reference.\n        // No characters are consumed, and nothing is returned.\n        // This is not an error, either.\n        queue += fromCharCode(character)\n        column++\n\n        continue\n      }\n\n      start = index + 1\n      begin = start\n      end = start\n\n      if (following === numberSign) {\n        // Numerical entity.\n        end = ++begin\n\n        // The behaviour further depends on the next character.\n        following = value.charCodeAt(end)\n\n        if (following === uppercaseX || following === lowercaseX) {\n          // ASCII hex digits.\n          type = hexa\n          end = ++begin\n        } else {\n          // ASCII digits.\n          type = deci\n        }\n      } else {\n        // Named entity.\n        type = name\n      }\n\n      entityCharacters = ''\n      entity = ''\n      characters = ''\n      test = tests[type]\n      end--\n\n      while (++end < length) {\n        following = value.charCodeAt(end)\n\n        if (!test(following)) {\n          break\n        }\n\n        characters += fromCharCode(following)\n\n        // Check if we can match a legacy named reference.\n        // If so, we cache that as the last viable named reference.\n        // This ensures we do not need to walk backwards later.\n        if (type === name && own.call(legacy, characters)) {\n          entityCharacters = characters\n          entity = legacy[characters]\n        }\n      }\n\n      terminated = value.charCodeAt(end) === semicolon\n\n      if (terminated) {\n        end++\n\n        namedEntity = type === name ? decodeEntity(characters) : false\n\n        if (namedEntity) {\n          entityCharacters = characters\n          entity = namedEntity\n        }\n      }\n\n      diff = 1 + end - start\n\n      if (!terminated && !nonTerminated) {\n        // Empty.\n      } else if (!characters) {\n        // An empty (possible) entity is valid, unless it\u2019s numeric (thus an\n        // ampersand followed by an octothorp).\n        if (type !== name) {\n          warning(numericEmpty, diff)\n        }\n      } else if (type === name) {\n        // An ampersand followed by anything unknown, and not terminated, is\n        // invalid.\n        if (terminated && !entity) {\n          warning(namedUnknown, 1)\n        } else {\n          // If theres something after an entity name which is not known, cap\n          // the reference.\n          if (entityCharacters !== characters) {\n            end = begin + entityCharacters.length\n            diff = 1 + end - begin\n            terminated = false\n          }\n\n          // If the reference is not terminated, warn.\n          if (!terminated) {\n            reason = entityCharacters ? namedNotTerminated : namedEmpty\n\n            if (settings.attribute) {\n              following = value.charCodeAt(end)\n\n              if (following === equalsTo) {\n                warning(reason, diff)\n                entity = null\n              } else if (alphanumerical(following)) {\n                entity = null\n              } else {\n                warning(reason, diff)\n              }\n            } else {\n              warning(reason, diff)\n            }\n          }\n        }\n\n        reference = entity\n      } else {\n        if (!terminated) {\n          // All non-terminated numeric entities are not rendered, and trigger a\n          // warning.\n          warning(numericNotTerminated, diff)\n        }\n\n        // When terminated and number, parse as either hexadecimal or decimal.\n        reference = parseInt(characters, bases[type])\n\n        // Trigger a warning when the parsed number is prohibited, and replace\n        // with replacement character.\n        if (prohibited(reference)) {\n          warning(numericProhibited, diff)\n          reference = fromCharCode(replacementCharacter)\n        } else if (reference in invalid) {\n          // Trigger a warning when the parsed number is disallowed, and replace\n          // by an alternative.\n          warning(numericDisallowed, diff)\n          reference = invalid[reference]\n        } else {\n          // Parse the number.\n          output = ''\n\n          // Trigger a warning when the parsed number should not be used.\n          if (disallowed(reference)) {\n            warning(numericDisallowed, diff)\n          }\n\n          // Stringify the number.\n          if (reference > 0xffff) {\n            reference -= 0x10000\n            output += fromCharCode((reference >>> (10 & 0x3ff)) | 0xd800)\n            reference = 0xdc00 | (reference & 0x3ff)\n          }\n\n          reference = output + fromCharCode(reference)\n        }\n      }\n\n      // Found it!\n      // First eat the queued characters as normal text, then eat an entity.\n      if (reference) {\n        flush()\n\n        prev = now()\n        index = end - 1\n        column += end - start + 1\n        result.push(reference)\n        next = now()\n        next.offset++\n\n        if (handleReference) {\n          handleReference.call(\n            referenceContext,\n            reference,\n            {start: prev, end: next},\n            value.slice(start - 1, end)\n          )\n        }\n\n        prev = next\n      } else {\n        // If we could not find a reference, queue the checked characters (as\n        // normal characters), and move the pointer to their end.\n        // This is possible because we can be certain neither newlines nor\n        // ampersands are included.\n        characters = value.slice(start - 1, end)\n        queue += characters\n        column += characters.length\n        index = end - 1\n      }\n    } else {\n      // Handle anything other than an ampersand, including newlines and EOF.\n      if (\n        character === 10 // Line feed\n      ) {\n        line++\n        lines++\n        column = 0\n      }\n\n      if (character === character) {\n        queue += fromCharCode(character)\n        column++\n      } else {\n        flush()\n      }\n    }\n  }\n\n  // Return the reduced nodes, and any possible warnings.\n  return result.join('')\n\n  // Get current position.\n  function now() {\n    return {\n      line: line,\n      column: column,\n      offset: index + (pos.offset || 0)\n    }\n  }\n\n  // \u201CThrow\u201D a parse-error: a warning.\n  function parseError(code, offset) {\n    var position = now()\n\n    position.column += offset\n    position.offset += offset\n\n    handleWarning.call(warningContext, messages[code], position, code)\n  }\n\n  // Flush `queue` (normal text).\n  // Macro invoked before each entity and at the end of `value`.\n  // Does nothing when `queue` is empty.\n  function flush() {\n    if (queue) {\n      result.push(queue)\n\n      if (handleText) {\n        handleText.call(textContext, queue, {start: prev, end: now()})\n      }\n\n      queue = ''\n    }\n  }\n}\n\n// Check if `character` is outside the permissible unicode range.\nfunction prohibited(code) {\n  return (code >= 0xd800 && code <= 0xdfff) || code > 0x10ffff\n}\n\n// Check if `character` is disallowed.\nfunction disallowed(code) {\n  return (\n    (code >= 0x0001 && code <= 0x0008) ||\n    code === 0x000b ||\n    (code >= 0x000d && code <= 0x001f) ||\n    (code >= 0x007f && code <= 0x009f) ||\n    (code >= 0xfdd0 && code <= 0xfdef) ||\n    (code & 0xffff) === 0xffff ||\n    (code & 0xffff) === 0xfffe\n  )\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar entities = require('parse-entities')\n\nmodule.exports = factory\n\n// Factory to create an entity decoder.\nfunction factory(ctx) {\n  decoder.raw = decodeRaw\n\n  return decoder\n\n  // Normalize `position` to add an `indent`.\n  function normalize(position) {\n    var offsets = ctx.offset\n    var line = position.line\n    var result = []\n\n    while (++line) {\n      if (!(line in offsets)) {\n        break\n      }\n\n      result.push((offsets[line] || 0) + 1)\n    }\n\n    return {start: position, indent: result}\n  }\n\n  // Decode `value` (at `position`) into text-nodes.\n  function decoder(value, position, handler) {\n    entities(value, {\n      position: normalize(position),\n      warning: handleWarning,\n      text: handler,\n      reference: handler,\n      textContext: ctx,\n      referenceContext: ctx\n    })\n  }\n\n  // Decode `value` (at `position`) into a string.\n  function decodeRaw(value, position, options) {\n    return entities(\n      value,\n      xtend(options, {position: normalize(position), warning: handleWarning})\n    )\n  }\n\n  // Handle a warning.\n  // See <https://github.com/wooorm/parse-entities> for the warnings.\n  function handleWarning(reason, position, code) {\n    if (code !== 3) {\n      ctx.file.message(reason, position)\n    }\n  }\n}\n", "'use strict'\n\nmodule.exports = factory\n\n// Construct a tokenizer.  This creates both `tokenizeInline` and `tokenizeBlock`.\nfunction factory(type) {\n  return tokenize\n\n  // Tokenizer for a bound `type`.\n  function tokenize(value, location) {\n    var self = this\n    var offset = self.offset\n    var tokens = []\n    var methods = self[type + 'Methods']\n    var tokenizers = self[type + 'Tokenizers']\n    var line = location.line\n    var column = location.column\n    var index\n    var length\n    var method\n    var name\n    var matched\n    var valueLength\n\n    // Trim white space only lines.\n    if (!value) {\n      return tokens\n    }\n\n    // Expose on `eat`.\n    eat.now = now\n    eat.file = self.file\n\n    // Sync initial offset.\n    updatePosition('')\n\n    // Iterate over `value`, and iterate over all tokenizers.  When one eats\n    // something, re-iterate with the remaining value.  If no tokenizer eats,\n    // something failed (should not happen) and an exception is thrown.\n    while (value) {\n      index = -1\n      length = methods.length\n      matched = false\n\n      while (++index < length) {\n        name = methods[index]\n        method = tokenizers[name]\n\n        if (\n          method &&\n          /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&\n          (!method.notInList || !self.inList) &&\n          (!method.notInBlock || !self.inBlock) &&\n          (!method.notInLink || !self.inLink)\n        ) {\n          valueLength = value.length\n\n          method.apply(self, [eat, value])\n\n          matched = valueLength !== value.length\n\n          if (matched) {\n            break\n          }\n        }\n      }\n\n      /* istanbul ignore if */\n      if (!matched) {\n        self.file.fail(new Error('Infinite loop'), eat.now())\n      }\n    }\n\n    self.eof = now()\n\n    return tokens\n\n    // Update line, column, and offset based on `value`.\n    function updatePosition(subvalue) {\n      var lastIndex = -1\n      var index = subvalue.indexOf('\\n')\n\n      while (index !== -1) {\n        line++\n        lastIndex = index\n        index = subvalue.indexOf('\\n', index + 1)\n      }\n\n      if (lastIndex === -1) {\n        column += subvalue.length\n      } else {\n        column = subvalue.length - lastIndex\n      }\n\n      if (line in offset) {\n        if (lastIndex !== -1) {\n          column += offset[line]\n        } else if (column <= offset[line]) {\n          column = offset[line] + 1\n        }\n      }\n    }\n\n    // Get offset.  Called before the first character is eaten to retrieve the\n    // range\u2019s offsets.\n    function getOffset() {\n      var indentation = []\n      var pos = line + 1\n\n      // Done.  Called when the last character is eaten to retrieve the range\u2019s\n      // offsets.\n      return function() {\n        var last = line + 1\n\n        while (pos < last) {\n          indentation.push((offset[pos] || 0) + 1)\n\n          pos++\n        }\n\n        return indentation\n      }\n    }\n\n    // Get the current position.\n    function now() {\n      var pos = {line: line, column: column}\n\n      pos.offset = self.toOffset(pos)\n\n      return pos\n    }\n\n    // Store position information for a node.\n    function Position(start) {\n      this.start = start\n      this.end = now()\n    }\n\n    // Throw when a value is incorrectly eaten.  This shouldn\u2019t happen but will\n    // throw on new, incorrect rules.\n    function validateEat(subvalue) {\n      /* istanbul ignore if */\n      if (value.slice(0, subvalue.length) !== subvalue) {\n        // Capture stack-trace.\n        self.file.fail(\n          new Error(\n            'Incorrectly eaten value: please report this warning on https://git.io/vg5Ft'\n          ),\n          now()\n        )\n      }\n    }\n\n    // Mark position and patch `node.position`.\n    function position() {\n      var before = now()\n\n      return update\n\n      // Add the position to a node.\n      function update(node, indent) {\n        var prev = node.position\n        var start = prev ? prev.start : before\n        var combined = []\n        var n = prev && prev.end.line\n        var l = before.line\n\n        node.position = new Position(start)\n\n        // If there was already a `position`, this node was merged.  Fixing\n        // `start` wasn\u2019t hard, but the indent is different.  Especially\n        // because some information, the indent between `n` and `l` wasn\u2019t\n        // tracked.  Luckily, that space is (should be?) empty, so we can\n        // safely check for it now.\n        if (prev && indent && prev.indent) {\n          combined = prev.indent\n\n          if (n < l) {\n            while (++n < l) {\n              combined.push((offset[n] || 0) + 1)\n            }\n\n            combined.push(before.column)\n          }\n\n          indent = combined.concat(indent)\n        }\n\n        node.position.indent = indent || []\n\n        return node\n      }\n    }\n\n    // Add `node` to `parent`s children or to `tokens`.  Performs merges where\n    // possible.\n    function add(node, parent) {\n      var children = parent ? parent.children : tokens\n      var prev = children[children.length - 1]\n      var fn\n\n      if (\n        prev &&\n        node.type === prev.type &&\n        (node.type === 'text' || node.type === 'blockquote') &&\n        mergeable(prev) &&\n        mergeable(node)\n      ) {\n        fn = node.type === 'text' ? mergeText : mergeBlockquote\n        node = fn.call(self, prev, node)\n      }\n\n      if (node !== prev) {\n        children.push(node)\n      }\n\n      if (self.atStart && tokens.length !== 0) {\n        self.exitStart()\n      }\n\n      return node\n    }\n\n    // Remove `subvalue` from `value`.  `subvalue` must be at the start of\n    // `value`.\n    function eat(subvalue) {\n      var indent = getOffset()\n      var pos = position()\n      var current = now()\n\n      validateEat(subvalue)\n\n      apply.reset = reset\n      reset.test = test\n      apply.test = test\n\n      value = value.slice(subvalue.length)\n\n      updatePosition(subvalue)\n\n      indent = indent()\n\n      return apply\n\n      // Add the given arguments, add `position` to the returned node, and\n      // return the node.\n      function apply(node, parent) {\n        return pos(add(pos(node), parent), indent)\n      }\n\n      // Functions just like apply, but resets the content: the line and\n      // column are reversed, and the eaten value is re-added.   This is\n      // useful for nodes with a single type of content, such as lists and\n      // tables.  See `apply` above for what parameters are expected.\n      function reset() {\n        var node = apply.apply(null, arguments)\n\n        line = current.line\n        column = current.column\n        value = subvalue + value\n\n        return node\n      }\n\n      // Test the position, after eating, and reverse to a not-eaten state.\n      function test() {\n        var result = pos({})\n\n        line = current.line\n        column = current.column\n        value = subvalue + value\n\n        return result.position\n      }\n    }\n  }\n}\n\n// Check whether a node is mergeable with adjacent nodes.\nfunction mergeable(node) {\n  var start\n  var end\n\n  if (node.type !== 'text' || !node.position) {\n    return true\n  }\n\n  start = node.position.start\n  end = node.position.end\n\n  // Only merge nodes which occupy the same size as their `value`.\n  return (\n    start.line !== end.line || end.column - start.column === node.value.length\n  )\n}\n\n// Merge two text nodes: `node` into `prev`.\nfunction mergeText(prev, node) {\n  prev.value += node.value\n\n  return prev\n}\n\n// Merge two blockquotes: `node` into `prev`, unless in CommonMark or gfm modes.\nfunction mergeBlockquote(prev, node) {\n  if (this.options.commonmark || this.options.gfm) {\n    return node\n  }\n\n  prev.children = prev.children.concat(node.children)\n\n  return prev\n}\n", "'use strict'\n\nmodule.exports = escapes\n\nvar defaults = [\n  '\\\\',\n  '`',\n  '*',\n  '{',\n  '}',\n  '[',\n  ']',\n  '(',\n  ')',\n  '#',\n  '+',\n  '-',\n  '.',\n  '!',\n  '_',\n  '>'\n]\n\nvar gfm = defaults.concat(['~', '|'])\n\nvar commonmark = gfm.concat([\n  '\\n',\n  '\"',\n  '$',\n  '%',\n  '&',\n  \"'\",\n  ',',\n  '/',\n  ':',\n  ';',\n  '<',\n  '=',\n  '?',\n  '@',\n  '^'\n])\n\nescapes.default = defaults\nescapes.gfm = gfm\nescapes.commonmark = commonmark\n\n// Get markdown escapes.\nfunction escapes(options) {\n  var settings = options || {}\n\n  if (settings.commonmark) {\n    return commonmark\n  }\n\n  return settings.gfm ? gfm : defaults\n}\n", "'use strict'\n\nmodule.exports = [\n  'address',\n  'article',\n  'aside',\n  'base',\n  'basefont',\n  'blockquote',\n  'body',\n  'caption',\n  'center',\n  'col',\n  'colgroup',\n  'dd',\n  'details',\n  'dialog',\n  'dir',\n  'div',\n  'dl',\n  'dt',\n  'fieldset',\n  'figcaption',\n  'figure',\n  'footer',\n  'form',\n  'frame',\n  'frameset',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n  'head',\n  'header',\n  'hgroup',\n  'hr',\n  'html',\n  'iframe',\n  'legend',\n  'li',\n  'link',\n  'main',\n  'menu',\n  'menuitem',\n  'meta',\n  'nav',\n  'noframes',\n  'ol',\n  'optgroup',\n  'option',\n  'p',\n  'param',\n  'pre',\n  'section',\n  'source',\n  'title',\n  'summary',\n  'table',\n  'tbody',\n  'td',\n  'tfoot',\n  'th',\n  'thead',\n  'title',\n  'tr',\n  'track',\n  'ul'\n]\n", "'use strict'\n\nmodule.exports = {\n  position: true,\n  gfm: true,\n  commonmark: false,\n  footnotes: false,\n  pedantic: false,\n  blocks: require('./block-elements')\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar escapes = require('markdown-escapes')\nvar defaults = require('./defaults')\n\nmodule.exports = setOptions\n\nfunction setOptions(options) {\n  var self = this\n  var current = self.options\n  var key\n  var value\n\n  if (options == null) {\n    options = {}\n  } else if (typeof options === 'object') {\n    options = xtend(options)\n  } else {\n    throw new Error('Invalid value `' + options + '` for setting `options`')\n  }\n\n  for (key in defaults) {\n    value = options[key]\n\n    if (value == null) {\n      value = current[key]\n    }\n\n    if (\n      (key !== 'blocks' && typeof value !== 'boolean') ||\n      (key === 'blocks' && typeof value !== 'object')\n    ) {\n      throw new Error(\n        'Invalid value `' + value + '` for setting `options.' + key + '`'\n      )\n    }\n\n    options[key] = value\n  }\n\n  self.options = options\n  self.escape = escapes(options)\n\n  return self\n}\n", "'use strict'\n\nmodule.exports = convert\n\nfunction convert(test) {\n  if (typeof test === 'string') {\n    return typeFactory(test)\n  }\n\n  if (test === null || test === undefined) {\n    return ok\n  }\n\n  if (typeof test === 'object') {\n    return ('length' in test ? anyFactory : matchesFactory)(test)\n  }\n\n  if (typeof test === 'function') {\n    return test\n  }\n\n  throw new Error('Expected function, string, or object as test')\n}\n\nfunction convertAll(tests) {\n  var results = []\n  var length = tests.length\n  var index = -1\n\n  while (++index < length) {\n    results[index] = convert(tests[index])\n  }\n\n  return results\n}\n\n// Utility assert each property in `test` is represented in `node`, and each\n// values are strictly equal.\nfunction matchesFactory(test) {\n  return matches\n\n  function matches(node) {\n    var key\n\n    for (key in test) {\n      if (node[key] !== test[key]) {\n        return false\n      }\n    }\n\n    return true\n  }\n}\n\nfunction anyFactory(tests) {\n  var checks = convertAll(tests)\n  var length = checks.length\n\n  return matches\n\n  function matches() {\n    var index = -1\n\n    while (++index < length) {\n      if (checks[index].apply(this, arguments)) {\n        return true\n      }\n    }\n\n    return false\n  }\n}\n\n// Utility to convert a string into a function which checks a given node\u2019s type\n// for said string.\nfunction typeFactory(test) {\n  return type\n\n  function type(node) {\n    return Boolean(node && node.type === test)\n  }\n}\n\n// Utility to return true.\nfunction ok() {\n  return true\n}\n", "'use strict'\n\nmodule.exports = visitParents\n\nvar convert = require('unist-util-is/convert')\n\nvar CONTINUE = true\nvar SKIP = 'skip'\nvar EXIT = false\n\nvisitParents.CONTINUE = CONTINUE\nvisitParents.SKIP = SKIP\nvisitParents.EXIT = EXIT\n\nfunction visitParents(tree, test, visitor, reverse) {\n  var is\n\n  if (typeof test === 'function' && typeof visitor !== 'function') {\n    reverse = visitor\n    visitor = test\n    test = null\n  }\n\n  is = convert(test)\n\n  one(tree, null, [])\n\n  // Visit a single node.\n  function one(node, index, parents) {\n    var result = []\n    var subresult\n\n    if (!test || is(node, index, parents[parents.length - 1] || null)) {\n      result = toResult(visitor(node, parents))\n\n      if (result[0] === EXIT) {\n        return result\n      }\n    }\n\n    if (node.children && result[0] !== SKIP) {\n      subresult = toResult(all(node.children, parents.concat(node)))\n      return subresult[0] === EXIT ? subresult : result\n    }\n\n    return result\n  }\n\n  // Visit children in `parent`.\n  function all(children, parents) {\n    var min = -1\n    var step = reverse ? -1 : 1\n    var index = (reverse ? children.length : min) + step\n    var result\n\n    while (index > min && index < children.length) {\n      result = one(children[index], index, parents)\n\n      if (result[0] === EXIT) {\n        return result\n      }\n\n      index = typeof result[1] === 'number' ? result[1] : index + step\n    }\n  }\n}\n\nfunction toResult(value) {\n  if (value !== null && typeof value === 'object' && 'length' in value) {\n    return value\n  }\n\n  if (typeof value === 'number') {\n    return [CONTINUE, value]\n  }\n\n  return [value]\n}\n", "'use strict'\n\nmodule.exports = visit\n\nvar visitParents = require('unist-util-visit-parents')\n\nvar CONTINUE = visitParents.CONTINUE\nvar SKIP = visitParents.SKIP\nvar EXIT = visitParents.EXIT\n\nvisit.CONTINUE = CONTINUE\nvisit.SKIP = SKIP\nvisit.EXIT = EXIT\n\nfunction visit(tree, test, visitor, reverse) {\n  if (typeof test === 'function' && typeof visitor !== 'function') {\n    reverse = visitor\n    visitor = test\n    test = null\n  }\n\n  visitParents(tree, test, overload, reverse)\n\n  function overload(node, parents) {\n    var parent = parents[parents.length - 1]\n    var index = parent ? parent.children.indexOf(node) : null\n    return visitor(node, index, parent)\n  }\n}\n", "'use strict'\n\nvar visit = require('unist-util-visit')\n\nmodule.exports = removePosition\n\nfunction removePosition(node, force) {\n  visit(node, force ? hard : soft)\n  return node\n}\n\nfunction hard(node) {\n  delete node.position\n}\n\nfunction soft(node) {\n  node.position = undefined\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar removePosition = require('unist-util-remove-position')\n\nmodule.exports = parse\n\nvar lineFeed = '\\n'\nvar lineBreaksExpression = /\\r\\n|\\r/g\n\n// Parse the bound file.\nfunction parse() {\n  var self = this\n  var value = String(self.file)\n  var start = {line: 1, column: 1, offset: 0}\n  var content = xtend(start)\n  var node\n\n  // Clean non-unix newlines: `\\r\\n` and `\\r` are all changed to `\\n`.\n  // This should not affect positional information.\n  value = value.replace(lineBreaksExpression, lineFeed)\n\n  // BOM.\n  if (value.charCodeAt(0) === 0xfeff) {\n    value = value.slice(1)\n\n    content.column++\n    content.offset++\n  }\n\n  node = {\n    type: 'root',\n    children: self.tokenizeBlock(value, content),\n    position: {start: start, end: self.eof || xtend(start)}\n  }\n\n  if (!self.options.position) {\n    removePosition(node, true)\n  }\n\n  return node\n}\n", "'use strict'\n\nmodule.exports = whitespace\n\nvar fromCode = String.fromCharCode\nvar re = /\\s/\n\n// Check if the given character code, or the character code at the first\n// character, is a whitespace character.\nfunction whitespace(character) {\n  return re.test(\n    typeof character === 'number' ? fromCode(character) : character.charAt(0)\n  )\n}\n", "'use strict'\n\nvar whitespace = require('is-whitespace-character')\n\nmodule.exports = newline\n\nvar lineFeed = '\\n'\n\nfunction newline(eat, value, silent) {\n  var character = value.charAt(0)\n  var length\n  var subvalue\n  var queue\n  var index\n\n  if (character !== lineFeed) {\n    return\n  }\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  index = 1\n  length = value.length\n  subvalue = character\n  queue = ''\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (!whitespace(character)) {\n      break\n    }\n\n    queue += character\n\n    if (character === lineFeed) {\n      subvalue += queue\n      queue = ''\n    }\n\n    index++\n  }\n\n  eat(subvalue)\n}\n", "/*!\n * repeat-string <https://github.com/jonschlinkert/repeat-string>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\n/**\n * Results cache\n */\n\nvar res = '';\nvar cache;\n\n/**\n * Expose `repeat`\n */\n\nmodule.exports = repeat;\n\n/**\n * Repeat the given `string` the specified `number`\n * of times.\n *\n * **Example:**\n *\n * ```js\n * var repeat = require('repeat-string');\n * repeat('A', 5);\n * //=> AAAAA\n * ```\n *\n * @param {String} `string` The string to repeat\n * @param {Number} `number` The number of times to repeat the string\n * @return {String} Repeated string\n * @api public\n */\n\nfunction repeat(str, num) {\n  if (typeof str !== 'string') {\n    throw new TypeError('expected a string');\n  }\n\n  // cover common, quick use cases\n  if (num === 1) return str;\n  if (num === 2) return str + str;\n\n  var max = str.length * num;\n  if (cache !== str || typeof cache === 'undefined') {\n    cache = str;\n    res = '';\n  } else if (res.length >= max) {\n    return res.substr(0, max);\n  }\n\n  while (max > res.length && num > 1) {\n    if (num & 1) {\n      res += str;\n    }\n\n    num >>= 1;\n    str += str;\n  }\n\n  res += str;\n  res = res.substr(0, max);\n  return res;\n}\n", "'use strict'\n\nmodule.exports = trimTrailingLines\n\nvar line = '\\n'\n\n// Remove final newline characters from `value`.\nfunction trimTrailingLines(value) {\n  var val = String(value)\n  var index = val.length\n\n  while (val.charAt(--index) === line) {\n    // Empty\n  }\n\n  return val.slice(0, index + 1)\n}\n", "'use strict'\n\nvar repeat = require('repeat-string')\nvar trim = require('trim-trailing-lines')\n\nmodule.exports = indentedCode\n\nvar lineFeed = '\\n'\nvar tab = '\\t'\nvar space = ' '\n\nvar tabSize = 4\nvar codeIndent = repeat(space, tabSize)\n\nfunction indentedCode(eat, value, silent) {\n  var index = -1\n  var length = value.length\n  var subvalue = ''\n  var content = ''\n  var subvalueQueue = ''\n  var contentQueue = ''\n  var character\n  var blankQueue\n  var indent\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (indent) {\n      indent = false\n\n      subvalue += subvalueQueue\n      content += contentQueue\n      subvalueQueue = ''\n      contentQueue = ''\n\n      if (character === lineFeed) {\n        subvalueQueue = character\n        contentQueue = character\n      } else {\n        subvalue += character\n        content += character\n\n        while (++index < length) {\n          character = value.charAt(index)\n\n          if (!character || character === lineFeed) {\n            contentQueue = character\n            subvalueQueue = character\n            break\n          }\n\n          subvalue += character\n          content += character\n        }\n      }\n    } else if (\n      character === space &&\n      value.charAt(index + 1) === character &&\n      value.charAt(index + 2) === character &&\n      value.charAt(index + 3) === character\n    ) {\n      subvalueQueue += codeIndent\n      index += 3\n      indent = true\n    } else if (character === tab) {\n      subvalueQueue += character\n      indent = true\n    } else {\n      blankQueue = ''\n\n      while (character === tab || character === space) {\n        blankQueue += character\n        character = value.charAt(++index)\n      }\n\n      if (character !== lineFeed) {\n        break\n      }\n\n      subvalueQueue += blankQueue + character\n      contentQueue += character\n    }\n  }\n\n  if (content) {\n    if (silent) {\n      return true\n    }\n\n    return eat(subvalue)({\n      type: 'code',\n      lang: null,\n      meta: null,\n      value: trim(content)\n    })\n  }\n}\n", "'use strict'\n\nmodule.exports = fencedCode\n\nvar lineFeed = '\\n'\nvar tab = '\\t'\nvar space = ' '\nvar tilde = '~'\nvar graveAccent = '`'\n\nvar minFenceCount = 3\nvar tabSize = 4\n\nfunction fencedCode(eat, value, silent) {\n  var self = this\n  var gfm = self.options.gfm\n  var length = value.length + 1\n  var index = 0\n  var subvalue = ''\n  var fenceCount\n  var marker\n  var character\n  var flag\n  var lang\n  var meta\n  var queue\n  var content\n  var exdentedContent\n  var closing\n  var exdentedClosing\n  var indent\n  var now\n\n  if (!gfm) {\n    return\n  }\n\n  // Eat initial spacing.\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== space && character !== tab) {\n      break\n    }\n\n    subvalue += character\n    index++\n  }\n\n  indent = index\n\n  // Eat the fence.\n  character = value.charAt(index)\n\n  if (character !== tilde && character !== graveAccent) {\n    return\n  }\n\n  index++\n  marker = character\n  fenceCount = 1\n  subvalue += character\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== marker) {\n      break\n    }\n\n    subvalue += character\n    fenceCount++\n    index++\n  }\n\n  if (fenceCount < minFenceCount) {\n    return\n  }\n\n  // Eat spacing before flag.\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== space && character !== tab) {\n      break\n    }\n\n    subvalue += character\n    index++\n  }\n\n  // Eat flag.\n  flag = ''\n  queue = ''\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (\n      character === lineFeed ||\n      (marker === graveAccent && character === marker)\n    ) {\n      break\n    }\n\n    if (character === space || character === tab) {\n      queue += character\n    } else {\n      flag += queue + character\n      queue = ''\n    }\n\n    index++\n  }\n\n  character = value.charAt(index)\n\n  if (character && character !== lineFeed) {\n    return\n  }\n\n  if (silent) {\n    return true\n  }\n\n  now = eat.now()\n  now.column += subvalue.length\n  now.offset += subvalue.length\n\n  subvalue += flag\n  flag = self.decode.raw(self.unescape(flag), now)\n\n  if (queue) {\n    subvalue += queue\n  }\n\n  queue = ''\n  closing = ''\n  exdentedClosing = ''\n  content = ''\n  exdentedContent = ''\n  var skip = true\n\n  // Eat content.\n  while (index < length) {\n    character = value.charAt(index)\n    content += closing\n    exdentedContent += exdentedClosing\n    closing = ''\n    exdentedClosing = ''\n\n    if (character !== lineFeed) {\n      content += character\n      exdentedClosing += character\n      index++\n      continue\n    }\n\n    // The first line feed is ignored. Others aren\u2019t.\n    if (skip) {\n      subvalue += character\n      skip = false\n    } else {\n      closing += character\n      exdentedClosing += character\n    }\n\n    queue = ''\n    index++\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (character !== space) {\n        break\n      }\n\n      queue += character\n      index++\n    }\n\n    closing += queue\n    exdentedClosing += queue.slice(indent)\n\n    if (queue.length >= tabSize) {\n      continue\n    }\n\n    queue = ''\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (character !== marker) {\n        break\n      }\n\n      queue += character\n      index++\n    }\n\n    closing += queue\n    exdentedClosing += queue\n\n    if (queue.length < fenceCount) {\n      continue\n    }\n\n    queue = ''\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (character !== space && character !== tab) {\n        break\n      }\n\n      closing += character\n      exdentedClosing += character\n      index++\n    }\n\n    if (!character || character === lineFeed) {\n      break\n    }\n  }\n\n  subvalue += content + closing\n\n  // Get lang and meta from the flag.\n  index = -1\n  length = flag.length\n\n  while (++index < length) {\n    character = flag.charAt(index)\n\n    if (character === space || character === tab) {\n      if (!lang) {\n        lang = flag.slice(0, index)\n      }\n    } else if (lang) {\n      meta = flag.slice(index)\n      break\n    }\n  }\n\n  return eat(subvalue)({\n    type: 'code',\n    lang: lang || flag || null,\n    meta: meta || null,\n    value: exdentedContent\n  })\n}\n", "\nexports = module.exports = trim;\n\nfunction trim(str){\n  return str.replace(/^\\s*|\\s*$/g, '');\n}\n\nexports.left = function(str){\n  return str.replace(/^\\s*/, '');\n};\n\nexports.right = function(str){\n  return str.replace(/\\s*$/, '');\n};\n", "'use strict'\n\nmodule.exports = interrupt\n\nfunction interrupt(interruptors, tokenizers, ctx, params) {\n  var length = interruptors.length\n  var index = -1\n  var interruptor\n  var config\n\n  while (++index < length) {\n    interruptor = interruptors[index]\n    config = interruptor[1] || {}\n\n    if (\n      config.pedantic !== undefined &&\n      config.pedantic !== ctx.options.pedantic\n    ) {\n      continue\n    }\n\n    if (\n      config.commonmark !== undefined &&\n      config.commonmark !== ctx.options.commonmark\n    ) {\n      continue\n    }\n\n    if (tokenizers[interruptor[0]].apply(ctx, params)) {\n      return true\n    }\n  }\n\n  return false\n}\n", "'use strict'\n\nvar trim = require('trim')\nvar interrupt = require('../util/interrupt')\n\nmodule.exports = blockquote\n\nvar lineFeed = '\\n'\nvar tab = '\\t'\nvar space = ' '\nvar greaterThan = '>'\n\nfunction blockquote(eat, value, silent) {\n  var self = this\n  var offsets = self.offset\n  var tokenizers = self.blockTokenizers\n  var interruptors = self.interruptBlockquote\n  var now = eat.now()\n  var currentLine = now.line\n  var length = value.length\n  var values = []\n  var contents = []\n  var indents = []\n  var add\n  var index = 0\n  var character\n  var rest\n  var nextIndex\n  var content\n  var line\n  var startIndex\n  var prefixed\n  var exit\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== space && character !== tab) {\n      break\n    }\n\n    index++\n  }\n\n  if (value.charAt(index) !== greaterThan) {\n    return\n  }\n\n  if (silent) {\n    return true\n  }\n\n  index = 0\n\n  while (index < length) {\n    nextIndex = value.indexOf(lineFeed, index)\n    startIndex = index\n    prefixed = false\n\n    if (nextIndex === -1) {\n      nextIndex = length\n    }\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (character !== space && character !== tab) {\n        break\n      }\n\n      index++\n    }\n\n    if (value.charAt(index) === greaterThan) {\n      index++\n      prefixed = true\n\n      if (value.charAt(index) === space) {\n        index++\n      }\n    } else {\n      index = startIndex\n    }\n\n    content = value.slice(index, nextIndex)\n\n    if (!prefixed && !trim(content)) {\n      index = startIndex\n      break\n    }\n\n    if (!prefixed) {\n      rest = value.slice(index)\n\n      // Check if the following code contains a possible block.\n      if (interrupt(interruptors, tokenizers, self, [eat, rest, true])) {\n        break\n      }\n    }\n\n    line = startIndex === index ? content : value.slice(startIndex, nextIndex)\n\n    indents.push(index - startIndex)\n    values.push(line)\n    contents.push(content)\n\n    index = nextIndex + 1\n  }\n\n  index = -1\n  length = indents.length\n  add = eat(values.join(lineFeed))\n\n  while (++index < length) {\n    offsets[currentLine] = (offsets[currentLine] || 0) + indents[index]\n    currentLine++\n  }\n\n  exit = self.enterBlock()\n  contents = self.tokenizeBlock(contents.join(lineFeed), now)\n  exit()\n\n  return add({type: 'blockquote', children: contents})\n}\n", "'use strict'\n\nmodule.exports = atxHeading\n\nvar lineFeed = '\\n'\nvar tab = '\\t'\nvar space = ' '\nvar numberSign = '#'\n\nvar maxFenceCount = 6\n\nfunction atxHeading(eat, value, silent) {\n  var self = this\n  var pedantic = self.options.pedantic\n  var length = value.length + 1\n  var index = -1\n  var now = eat.now()\n  var subvalue = ''\n  var content = ''\n  var character\n  var queue\n  var depth\n\n  // Eat initial spacing.\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (character !== space && character !== tab) {\n      index--\n      break\n    }\n\n    subvalue += character\n  }\n\n  // Eat hashes.\n  depth = 0\n\n  while (++index <= length) {\n    character = value.charAt(index)\n\n    if (character !== numberSign) {\n      index--\n      break\n    }\n\n    subvalue += character\n    depth++\n  }\n\n  if (depth > maxFenceCount) {\n    return\n  }\n\n  if (!depth || (!pedantic && value.charAt(index + 1) === numberSign)) {\n    return\n  }\n\n  length = value.length + 1\n\n  // Eat intermediate white-space.\n  queue = ''\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (character !== space && character !== tab) {\n      index--\n      break\n    }\n\n    queue += character\n  }\n\n  // Exit when not in pedantic mode without spacing.\n  if (!pedantic && queue.length === 0 && character && character !== lineFeed) {\n    return\n  }\n\n  if (silent) {\n    return true\n  }\n\n  // Eat content.\n  subvalue += queue\n  queue = ''\n  content = ''\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (!character || character === lineFeed) {\n      break\n    }\n\n    if (character !== space && character !== tab && character !== numberSign) {\n      content += queue + character\n      queue = ''\n      continue\n    }\n\n    while (character === space || character === tab) {\n      queue += character\n      character = value.charAt(++index)\n    }\n\n    // `#` without a queue is part of the content.\n    if (!pedantic && content && !queue && character === numberSign) {\n      content += character\n      continue\n    }\n\n    while (character === numberSign) {\n      queue += character\n      character = value.charAt(++index)\n    }\n\n    while (character === space || character === tab) {\n      queue += character\n      character = value.charAt(++index)\n    }\n\n    index--\n  }\n\n  now.column += subvalue.length\n  now.offset += subvalue.length\n  subvalue += content + queue\n\n  return eat(subvalue)({\n    type: 'heading',\n    depth: depth,\n    children: self.tokenizeInline(content, now)\n  })\n}\n", "'use strict'\n\nmodule.exports = thematicBreak\n\nvar tab = '\\t'\nvar lineFeed = '\\n'\nvar space = ' '\nvar asterisk = '*'\nvar dash = '-'\nvar underscore = '_'\n\nvar maxCount = 3\n\nfunction thematicBreak(eat, value, silent) {\n  var index = -1\n  var length = value.length + 1\n  var subvalue = ''\n  var character\n  var marker\n  var markerCount\n  var queue\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (character !== tab && character !== space) {\n      break\n    }\n\n    subvalue += character\n  }\n\n  if (\n    character !== asterisk &&\n    character !== dash &&\n    character !== underscore\n  ) {\n    return\n  }\n\n  marker = character\n  subvalue += character\n  markerCount = 1\n  queue = ''\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (character === marker) {\n      markerCount++\n      subvalue += queue + marker\n      queue = ''\n    } else if (character === space) {\n      queue += character\n    } else if (\n      markerCount >= maxCount &&\n      (!character || character === lineFeed)\n    ) {\n      subvalue += queue\n\n      if (silent) {\n        return true\n      }\n\n      return eat(subvalue)({type: 'thematicBreak'})\n    } else {\n      return\n    }\n  }\n}\n", "'use strict'\n\nmodule.exports = indentation\n\nvar tab = '\\t'\nvar space = ' '\n\nvar spaceSize = 1\nvar tabSize = 4\n\n// Gets indentation information for a line.\nfunction indentation(value) {\n  var index = 0\n  var indent = 0\n  var character = value.charAt(index)\n  var stops = {}\n  var size\n\n  while (character === tab || character === space) {\n    size = character === tab ? tabSize : spaceSize\n\n    indent += size\n\n    if (size > 1) {\n      indent = Math.floor(indent / size) * size\n    }\n\n    stops[indent] = index\n    character = value.charAt(++index)\n  }\n\n  return {indent: indent, stops: stops}\n}\n", "'use strict'\n\nvar trim = require('trim')\nvar repeat = require('repeat-string')\nvar getIndent = require('./get-indentation')\n\nmodule.exports = indentation\n\nvar tab = '\\t'\nvar lineFeed = '\\n'\nvar space = ' '\nvar exclamationMark = '!'\n\n// Remove the minimum indent from every line in `value`.  Supports both tab,\n// spaced, and mixed indentation (as well as possible).\nfunction indentation(value, maximum) {\n  var values = value.split(lineFeed)\n  var position = values.length + 1\n  var minIndent = Infinity\n  var matrix = []\n  var index\n  var indentation\n  var stops\n  var padding\n\n  values.unshift(repeat(space, maximum) + exclamationMark)\n\n  while (position--) {\n    indentation = getIndent(values[position])\n\n    matrix[position] = indentation.stops\n\n    if (trim(values[position]).length === 0) {\n      continue\n    }\n\n    if (indentation.indent) {\n      if (indentation.indent > 0 && indentation.indent < minIndent) {\n        minIndent = indentation.indent\n      }\n    } else {\n      minIndent = Infinity\n\n      break\n    }\n  }\n\n  if (minIndent !== Infinity) {\n    position = values.length\n\n    while (position--) {\n      stops = matrix[position]\n      index = minIndent\n\n      while (index && !(index in stops)) {\n        index--\n      }\n\n      if (\n        trim(values[position]).length !== 0 &&\n        minIndent &&\n        index !== minIndent\n      ) {\n        padding = tab\n      } else {\n        padding = ''\n      }\n\n      values[position] =\n        padding + values[position].slice(index in stops ? stops[index] + 1 : 0)\n    }\n  }\n\n  values.shift()\n\n  return values.join(lineFeed)\n}\n", "'use strict'\n\nvar trim = require('trim')\nvar repeat = require('repeat-string')\nvar decimal = require('is-decimal')\nvar getIndent = require('../util/get-indentation')\nvar removeIndent = require('../util/remove-indentation')\nvar interrupt = require('../util/interrupt')\n\nmodule.exports = list\n\nvar asterisk = '*'\nvar underscore = '_'\nvar plusSign = '+'\nvar dash = '-'\nvar dot = '.'\nvar space = ' '\nvar lineFeed = '\\n'\nvar tab = '\\t'\nvar rightParenthesis = ')'\nvar lowercaseX = 'x'\n\nvar tabSize = 4\nvar looseListItemExpression = /\\n\\n(?!\\s*$)/\nvar taskItemExpression = /^\\[([ \\t]|x|X)][ \\t]/\nvar bulletExpression = /^([ \\t]*)([*+-]|\\d+[.)])( {1,4}(?! )| |\\t|$|(?=\\n))([^\\n]*)/\nvar pedanticBulletExpression = /^([ \\t]*)([*+-]|\\d+[.)])([ \\t]+)/\nvar initialIndentExpression = /^( {1,4}|\\t)?/gm\n\nfunction list(eat, value, silent) {\n  var self = this\n  var commonmark = self.options.commonmark\n  var pedantic = self.options.pedantic\n  var tokenizers = self.blockTokenizers\n  var interuptors = self.interruptList\n  var index = 0\n  var length = value.length\n  var start = null\n  var size = 0\n  var queue\n  var ordered\n  var character\n  var marker\n  var nextIndex\n  var startIndex\n  var prefixed\n  var currentMarker\n  var content\n  var line\n  var prevEmpty\n  var empty\n  var items\n  var allLines\n  var emptyLines\n  var item\n  var enterTop\n  var exitBlockquote\n  var spread = false\n  var node\n  var now\n  var end\n  var indented\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character === tab) {\n      size += tabSize - (size % tabSize)\n    } else if (character === space) {\n      size++\n    } else {\n      break\n    }\n\n    index++\n  }\n\n  if (size >= tabSize) {\n    return\n  }\n\n  character = value.charAt(index)\n\n  if (character === asterisk || character === plusSign || character === dash) {\n    marker = character\n    ordered = false\n  } else {\n    ordered = true\n    queue = ''\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (!decimal(character)) {\n        break\n      }\n\n      queue += character\n      index++\n    }\n\n    character = value.charAt(index)\n\n    if (\n      !queue ||\n      !(character === dot || (commonmark && character === rightParenthesis))\n    ) {\n      return\n    }\n\n    start = parseInt(queue, 10)\n    marker = character\n  }\n\n  character = value.charAt(++index)\n\n  if (\n    character !== space &&\n    character !== tab &&\n    (pedantic || (character !== lineFeed && character !== ''))\n  ) {\n    return\n  }\n\n  if (silent) {\n    return true\n  }\n\n  index = 0\n  items = []\n  allLines = []\n  emptyLines = []\n\n  while (index < length) {\n    nextIndex = value.indexOf(lineFeed, index)\n    startIndex = index\n    prefixed = false\n    indented = false\n\n    if (nextIndex === -1) {\n      nextIndex = length\n    }\n\n    end = index + tabSize\n    size = 0\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (character === tab) {\n        size += tabSize - (size % tabSize)\n      } else if (character === space) {\n        size++\n      } else {\n        break\n      }\n\n      index++\n    }\n\n    if (size >= tabSize) {\n      indented = true\n    }\n\n    if (item && size >= item.indent) {\n      indented = true\n    }\n\n    character = value.charAt(index)\n    currentMarker = null\n\n    if (!indented) {\n      if (\n        character === asterisk ||\n        character === plusSign ||\n        character === dash\n      ) {\n        currentMarker = character\n        index++\n        size++\n      } else {\n        queue = ''\n\n        while (index < length) {\n          character = value.charAt(index)\n\n          if (!decimal(character)) {\n            break\n          }\n\n          queue += character\n          index++\n        }\n\n        character = value.charAt(index)\n        index++\n\n        if (\n          queue &&\n          (character === dot || (commonmark && character === rightParenthesis))\n        ) {\n          currentMarker = character\n          size += queue.length + 1\n        }\n      }\n\n      if (currentMarker) {\n        character = value.charAt(index)\n\n        if (character === tab) {\n          size += tabSize - (size % tabSize)\n          index++\n        } else if (character === space) {\n          end = index + tabSize\n\n          while (index < end) {\n            if (value.charAt(index) !== space) {\n              break\n            }\n\n            index++\n            size++\n          }\n\n          if (index === end && value.charAt(index) === space) {\n            index -= tabSize - 1\n            size -= tabSize - 1\n          }\n        } else if (character !== lineFeed && character !== '') {\n          currentMarker = null\n        }\n      }\n    }\n\n    if (currentMarker) {\n      if (!pedantic && marker !== currentMarker) {\n        break\n      }\n\n      prefixed = true\n    } else {\n      if (!commonmark && !indented && value.charAt(startIndex) === space) {\n        indented = true\n      } else if (commonmark && item) {\n        indented = size >= item.indent || size > tabSize\n      }\n\n      prefixed = false\n      index = startIndex\n    }\n\n    line = value.slice(startIndex, nextIndex)\n    content = startIndex === index ? line : value.slice(index, nextIndex)\n\n    if (\n      currentMarker === asterisk ||\n      currentMarker === underscore ||\n      currentMarker === dash\n    ) {\n      if (tokenizers.thematicBreak.call(self, eat, line, true)) {\n        break\n      }\n    }\n\n    prevEmpty = empty\n    empty = !prefixed && !trim(content).length\n\n    if (indented && item) {\n      item.value = item.value.concat(emptyLines, line)\n      allLines = allLines.concat(emptyLines, line)\n      emptyLines = []\n    } else if (prefixed) {\n      if (emptyLines.length !== 0) {\n        spread = true\n        item.value.push('')\n        item.trail = emptyLines.concat()\n      }\n\n      item = {\n        value: [line],\n        indent: size,\n        trail: []\n      }\n\n      items.push(item)\n      allLines = allLines.concat(emptyLines, line)\n      emptyLines = []\n    } else if (empty) {\n      if (prevEmpty && !commonmark) {\n        break\n      }\n\n      emptyLines.push(line)\n    } else {\n      if (prevEmpty) {\n        break\n      }\n\n      if (interrupt(interuptors, tokenizers, self, [eat, line, true])) {\n        break\n      }\n\n      item.value = item.value.concat(emptyLines, line)\n      allLines = allLines.concat(emptyLines, line)\n      emptyLines = []\n    }\n\n    index = nextIndex + 1\n  }\n\n  node = eat(allLines.join(lineFeed)).reset({\n    type: 'list',\n    ordered: ordered,\n    start: start,\n    spread: spread,\n    children: []\n  })\n\n  enterTop = self.enterList()\n  exitBlockquote = self.enterBlock()\n  index = -1\n  length = items.length\n\n  while (++index < length) {\n    item = items[index].value.join(lineFeed)\n    now = eat.now()\n\n    eat(item)(listItem(self, item, now), node)\n\n    item = items[index].trail.join(lineFeed)\n\n    if (index !== length - 1) {\n      item += lineFeed\n    }\n\n    eat(item)\n  }\n\n  enterTop()\n  exitBlockquote()\n\n  return node\n}\n\nfunction listItem(ctx, value, position) {\n  var offsets = ctx.offset\n  var fn = ctx.options.pedantic ? pedanticListItem : normalListItem\n  var checked = null\n  var task\n  var indent\n\n  value = fn.apply(null, arguments)\n\n  if (ctx.options.gfm) {\n    task = value.match(taskItemExpression)\n\n    if (task) {\n      indent = task[0].length\n      checked = task[1].toLowerCase() === lowercaseX\n      offsets[position.line] += indent\n      value = value.slice(indent)\n    }\n  }\n\n  return {\n    type: 'listItem',\n    spread: looseListItemExpression.test(value),\n    checked: checked,\n    children: ctx.tokenizeBlock(value, position)\n  }\n}\n\n// Create a list-item using overly simple mechanics.\nfunction pedanticListItem(ctx, value, position) {\n  var offsets = ctx.offset\n  var line = position.line\n\n  // Remove the list-item\u2019s bullet.\n  value = value.replace(pedanticBulletExpression, replacer)\n\n  // The initial line was also matched by the below, so we reset the `line`.\n  line = position.line\n\n  return value.replace(initialIndentExpression, replacer)\n\n  // A simple replacer which removed all matches, and adds their length to\n  // `offset`.\n  function replacer($0) {\n    offsets[line] = (offsets[line] || 0) + $0.length\n    line++\n\n    return ''\n  }\n}\n\n// Create a list-item using sane mechanics.\nfunction normalListItem(ctx, value, position) {\n  var offsets = ctx.offset\n  var line = position.line\n  var max\n  var bullet\n  var rest\n  var lines\n  var trimmedLines\n  var index\n  var length\n\n  // Remove the list-item\u2019s bullet.\n  value = value.replace(bulletExpression, replacer)\n\n  lines = value.split(lineFeed)\n\n  trimmedLines = removeIndent(value, getIndent(max).indent).split(lineFeed)\n\n  // We replaced the initial bullet with something else above, which was used\n  // to trick `removeIndentation` into removing some more characters when\n  // possible.  However, that could result in the initial line to be stripped\n  // more than it should be.\n  trimmedLines[0] = rest\n\n  offsets[line] = (offsets[line] || 0) + bullet.length\n  line++\n\n  index = 0\n  length = lines.length\n\n  while (++index < length) {\n    offsets[line] =\n      (offsets[line] || 0) + lines[index].length - trimmedLines[index].length\n    line++\n  }\n\n  return trimmedLines.join(lineFeed)\n\n  /* eslint-disable-next-line max-params */\n  function replacer($0, $1, $2, $3, $4) {\n    bullet = $1 + $2 + $3\n    rest = $4\n\n    // Make sure that the first nine numbered list items can indent with an\n    // extra space.  That is, when the bullet did not receive an extra final\n    // space.\n    if (Number($2) < 10 && bullet.length % 2 === 1) {\n      $2 = space + $2\n    }\n\n    max = $1 + repeat(space, $2.length) + $3\n\n    return max + rest\n  }\n}\n", "'use strict'\n\nmodule.exports = setextHeading\n\nvar lineFeed = '\\n'\nvar tab = '\\t'\nvar space = ' '\nvar equalsTo = '='\nvar dash = '-'\n\nvar maxIndent = 3\n\nvar equalsToDepth = 1\nvar dashDepth = 2\n\nfunction setextHeading(eat, value, silent) {\n  var self = this\n  var now = eat.now()\n  var length = value.length\n  var index = -1\n  var subvalue = ''\n  var content\n  var queue\n  var character\n  var marker\n  var depth\n\n  // Eat initial indentation.\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (character !== space || index >= maxIndent) {\n      index--\n      break\n    }\n\n    subvalue += character\n  }\n\n  // Eat content.\n  content = ''\n  queue = ''\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (character === lineFeed) {\n      index--\n      break\n    }\n\n    if (character === space || character === tab) {\n      queue += character\n    } else {\n      content += queue + character\n      queue = ''\n    }\n  }\n\n  now.column += subvalue.length\n  now.offset += subvalue.length\n  subvalue += content + queue\n\n  // Ensure the content is followed by a newline and a valid marker.\n  character = value.charAt(++index)\n  marker = value.charAt(++index)\n\n  if (character !== lineFeed || (marker !== equalsTo && marker !== dash)) {\n    return\n  }\n\n  subvalue += character\n\n  // Eat Setext-line.\n  queue = marker\n  depth = marker === equalsTo ? equalsToDepth : dashDepth\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (character !== marker) {\n      if (character !== lineFeed) {\n        return\n      }\n\n      index--\n      break\n    }\n\n    queue += character\n  }\n\n  if (silent) {\n    return true\n  }\n\n  return eat(subvalue + queue)({\n    type: 'heading',\n    depth: depth,\n    children: self.tokenizeInline(content, now)\n  })\n}\n", "'use strict'\n\nvar attributeName = '[a-zA-Z_:][a-zA-Z0-9:._-]*'\nvar unquoted = '[^\"\\'=<>`\\\\u0000-\\\\u0020]+'\nvar singleQuoted = \"'[^']*'\"\nvar doubleQuoted = '\"[^\"]*\"'\nvar attributeValue =\n  '(?:' + unquoted + '|' + singleQuoted + '|' + doubleQuoted + ')'\nvar attribute =\n  '(?:\\\\s+' + attributeName + '(?:\\\\s*=\\\\s*' + attributeValue + ')?)'\nvar openTag = '<[A-Za-z][A-Za-z0-9\\\\-]*' + attribute + '*\\\\s*\\\\/?>'\nvar closeTag = '<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>'\nvar comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->'\nvar processing = '<[?].*?[?]>'\nvar declaration = '<![A-Za-z]+\\\\s+[^>]*>'\nvar cdata = '<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>'\n\nexports.openCloseTag = new RegExp('^(?:' + openTag + '|' + closeTag + ')')\n\nexports.tag = new RegExp(\n  '^(?:' +\n    openTag +\n    '|' +\n    closeTag +\n    '|' +\n    comment +\n    '|' +\n    processing +\n    '|' +\n    declaration +\n    '|' +\n    cdata +\n    ')'\n)\n", "'use strict'\n\nvar openCloseTag = require('../util/html').openCloseTag\n\nmodule.exports = blockHtml\n\nvar tab = '\\t'\nvar space = ' '\nvar lineFeed = '\\n'\nvar lessThan = '<'\n\nvar rawOpenExpression = /^<(script|pre|style)(?=(\\s|>|$))/i\nvar rawCloseExpression = /<\\/(script|pre|style)>/i\nvar commentOpenExpression = /^<!--/\nvar commentCloseExpression = /-->/\nvar instructionOpenExpression = /^<\\?/\nvar instructionCloseExpression = /\\?>/\nvar directiveOpenExpression = /^<![A-Za-z]/\nvar directiveCloseExpression = />/\nvar cdataOpenExpression = /^<!\\[CDATA\\[/\nvar cdataCloseExpression = /\\]\\]>/\nvar elementCloseExpression = /^$/\nvar otherElementOpenExpression = new RegExp(openCloseTag.source + '\\\\s*$')\n\nfunction blockHtml(eat, value, silent) {\n  var self = this\n  var blocks = self.options.blocks.join('|')\n  var elementOpenExpression = new RegExp(\n    '^</?(' + blocks + ')(?=(\\\\s|/?>|$))',\n    'i'\n  )\n  var length = value.length\n  var index = 0\n  var next\n  var line\n  var offset\n  var character\n  var count\n  var sequence\n  var subvalue\n\n  var sequences = [\n    [rawOpenExpression, rawCloseExpression, true],\n    [commentOpenExpression, commentCloseExpression, true],\n    [instructionOpenExpression, instructionCloseExpression, true],\n    [directiveOpenExpression, directiveCloseExpression, true],\n    [cdataOpenExpression, cdataCloseExpression, true],\n    [elementOpenExpression, elementCloseExpression, true],\n    [otherElementOpenExpression, elementCloseExpression, false]\n  ]\n\n  // Eat initial spacing.\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== tab && character !== space) {\n      break\n    }\n\n    index++\n  }\n\n  if (value.charAt(index) !== lessThan) {\n    return\n  }\n\n  next = value.indexOf(lineFeed, index + 1)\n  next = next === -1 ? length : next\n  line = value.slice(index, next)\n  offset = -1\n  count = sequences.length\n\n  while (++offset < count) {\n    if (sequences[offset][0].test(line)) {\n      sequence = sequences[offset]\n      break\n    }\n  }\n\n  if (!sequence) {\n    return\n  }\n\n  if (silent) {\n    return sequence[2]\n  }\n\n  index = next\n\n  if (!sequence[1].test(line)) {\n    while (index < length) {\n      next = value.indexOf(lineFeed, index + 1)\n      next = next === -1 ? length : next\n      line = value.slice(index + 1, next)\n\n      if (sequence[1].test(line)) {\n        if (line) {\n          index = next\n        }\n\n        break\n      }\n\n      index = next\n    }\n  }\n\n  subvalue = value.slice(0, index)\n\n  return eat(subvalue)({type: 'html', value: subvalue})\n}\n", "'use strict'\n\nmodule.exports = collapse\n\n// `collapse(' \\t\\nbar \\nbaz\\t') // ' bar baz '`\nfunction collapse(value) {\n  return String(value).replace(/\\s+/g, ' ')\n}\n", "'use strict'\n\nvar collapseWhiteSpace = require('collapse-white-space')\n\nmodule.exports = normalize\n\n// Normalize an identifier.  Collapses multiple white space characters into a\n// single space, and removes casing.\nfunction normalize(value) {\n  return collapseWhiteSpace(value).toLowerCase()\n}\n", "'use strict'\n\nvar whitespace = require('is-whitespace-character')\nvar normalize = require('../util/normalize')\n\nmodule.exports = footnoteDefinition\nfootnoteDefinition.notInList = true\nfootnoteDefinition.notInBlock = true\n\nvar backslash = '\\\\'\nvar lineFeed = '\\n'\nvar tab = '\\t'\nvar space = ' '\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar caret = '^'\nvar colon = ':'\n\nvar EXPRESSION_INITIAL_TAB = /^( {4}|\\t)?/gm\n\nfunction footnoteDefinition(eat, value, silent) {\n  var self = this\n  var offsets = self.offset\n  var index\n  var length\n  var subvalue\n  var now\n  var currentLine\n  var content\n  var queue\n  var subqueue\n  var character\n  var identifier\n  var add\n  var exit\n\n  if (!self.options.footnotes) {\n    return\n  }\n\n  index = 0\n  length = value.length\n  subvalue = ''\n  now = eat.now()\n  currentLine = now.line\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (!whitespace(character)) {\n      break\n    }\n\n    subvalue += character\n    index++\n  }\n\n  if (\n    value.charAt(index) !== leftSquareBracket ||\n    value.charAt(index + 1) !== caret\n  ) {\n    return\n  }\n\n  subvalue += leftSquareBracket + caret\n  index = subvalue.length\n  queue = ''\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character === rightSquareBracket) {\n      break\n    } else if (character === backslash) {\n      queue += character\n      index++\n      character = value.charAt(index)\n    }\n\n    queue += character\n    index++\n  }\n\n  if (\n    !queue ||\n    value.charAt(index) !== rightSquareBracket ||\n    value.charAt(index + 1) !== colon\n  ) {\n    return\n  }\n\n  if (silent) {\n    return true\n  }\n\n  identifier = queue\n  subvalue += queue + rightSquareBracket + colon\n  index = subvalue.length\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== tab && character !== space) {\n      break\n    }\n\n    subvalue += character\n    index++\n  }\n\n  now.column += subvalue.length\n  now.offset += subvalue.length\n  queue = ''\n  content = ''\n  subqueue = ''\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character === lineFeed) {\n      subqueue = character\n      index++\n\n      while (index < length) {\n        character = value.charAt(index)\n\n        if (character !== lineFeed) {\n          break\n        }\n\n        subqueue += character\n        index++\n      }\n\n      queue += subqueue\n      subqueue = ''\n\n      while (index < length) {\n        character = value.charAt(index)\n\n        if (character !== space) {\n          break\n        }\n\n        subqueue += character\n        index++\n      }\n\n      if (subqueue.length === 0) {\n        break\n      }\n\n      queue += subqueue\n    }\n\n    if (queue) {\n      content += queue\n      queue = ''\n    }\n\n    content += character\n    index++\n  }\n\n  subvalue += content\n\n  content = content.replace(EXPRESSION_INITIAL_TAB, function(line) {\n    offsets[currentLine] = (offsets[currentLine] || 0) + line.length\n    currentLine++\n\n    return ''\n  })\n\n  add = eat(subvalue)\n\n  exit = self.enterBlock()\n  content = self.tokenizeBlock(content, now)\n  exit()\n\n  return add({\n    type: 'footnoteDefinition',\n    identifier: normalize(identifier),\n    label: identifier,\n    children: content\n  })\n}\n", "'use strict'\n\nvar whitespace = require('is-whitespace-character')\nvar normalize = require('../util/normalize')\n\nmodule.exports = definition\n\nvar quotationMark = '\"'\nvar apostrophe = \"'\"\nvar backslash = '\\\\'\nvar lineFeed = '\\n'\nvar tab = '\\t'\nvar space = ' '\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar leftParenthesis = '('\nvar rightParenthesis = ')'\nvar colon = ':'\nvar lessThan = '<'\nvar greaterThan = '>'\n\nfunction definition(eat, value, silent) {\n  var self = this\n  var commonmark = self.options.commonmark\n  var index = 0\n  var length = value.length\n  var subvalue = ''\n  var beforeURL\n  var beforeTitle\n  var queue\n  var character\n  var test\n  var identifier\n  var url\n  var title\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== space && character !== tab) {\n      break\n    }\n\n    subvalue += character\n    index++\n  }\n\n  character = value.charAt(index)\n\n  if (character !== leftSquareBracket) {\n    return\n  }\n\n  index++\n  subvalue += character\n  queue = ''\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character === rightSquareBracket) {\n      break\n    } else if (character === backslash) {\n      queue += character\n      index++\n      character = value.charAt(index)\n    }\n\n    queue += character\n    index++\n  }\n\n  if (\n    !queue ||\n    value.charAt(index) !== rightSquareBracket ||\n    value.charAt(index + 1) !== colon\n  ) {\n    return\n  }\n\n  identifier = queue\n  subvalue += queue + rightSquareBracket + colon\n  index = subvalue.length\n  queue = ''\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== tab && character !== space && character !== lineFeed) {\n      break\n    }\n\n    subvalue += character\n    index++\n  }\n\n  character = value.charAt(index)\n  queue = ''\n  beforeURL = subvalue\n\n  if (character === lessThan) {\n    index++\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (!isEnclosedURLCharacter(character)) {\n        break\n      }\n\n      queue += character\n      index++\n    }\n\n    character = value.charAt(index)\n\n    if (character === isEnclosedURLCharacter.delimiter) {\n      subvalue += lessThan + queue + character\n      index++\n    } else {\n      if (commonmark) {\n        return\n      }\n\n      index -= queue.length + 1\n      queue = ''\n    }\n  }\n\n  if (!queue) {\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (!isUnclosedURLCharacter(character)) {\n        break\n      }\n\n      queue += character\n      index++\n    }\n\n    subvalue += queue\n  }\n\n  if (!queue) {\n    return\n  }\n\n  url = queue\n  queue = ''\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== tab && character !== space && character !== lineFeed) {\n      break\n    }\n\n    queue += character\n    index++\n  }\n\n  character = value.charAt(index)\n  test = null\n\n  if (character === quotationMark) {\n    test = quotationMark\n  } else if (character === apostrophe) {\n    test = apostrophe\n  } else if (character === leftParenthesis) {\n    test = rightParenthesis\n  }\n\n  if (!test) {\n    queue = ''\n    index = subvalue.length\n  } else if (queue) {\n    subvalue += queue + character\n    index = subvalue.length\n    queue = ''\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (character === test) {\n        break\n      }\n\n      if (character === lineFeed) {\n        index++\n        character = value.charAt(index)\n\n        if (character === lineFeed || character === test) {\n          return\n        }\n\n        queue += lineFeed\n      }\n\n      queue += character\n      index++\n    }\n\n    character = value.charAt(index)\n\n    if (character !== test) {\n      return\n    }\n\n    beforeTitle = subvalue\n    subvalue += queue + character\n    index++\n    title = queue\n    queue = ''\n  } else {\n    return\n  }\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character !== tab && character !== space) {\n      break\n    }\n\n    subvalue += character\n    index++\n  }\n\n  character = value.charAt(index)\n\n  if (!character || character === lineFeed) {\n    if (silent) {\n      return true\n    }\n\n    beforeURL = eat(beforeURL).test().end\n    url = self.decode.raw(self.unescape(url), beforeURL, {nonTerminated: false})\n\n    if (title) {\n      beforeTitle = eat(beforeTitle).test().end\n      title = self.decode.raw(self.unescape(title), beforeTitle)\n    }\n\n    return eat(subvalue)({\n      type: 'definition',\n      identifier: normalize(identifier),\n      label: identifier,\n      title: title || null,\n      url: url\n    })\n  }\n}\n\n// Check if `character` can be inside an enclosed URI.\nfunction isEnclosedURLCharacter(character) {\n  return (\n    character !== greaterThan &&\n    character !== leftSquareBracket &&\n    character !== rightSquareBracket\n  )\n}\n\nisEnclosedURLCharacter.delimiter = greaterThan\n\n// Check if `character` can be inside an unclosed URI.\nfunction isUnclosedURLCharacter(character) {\n  return (\n    character !== leftSquareBracket &&\n    character !== rightSquareBracket &&\n    !whitespace(character)\n  )\n}\n", "'use strict'\n\nvar whitespace = require('is-whitespace-character')\n\nmodule.exports = table\n\nvar tab = '\\t'\nvar lineFeed = '\\n'\nvar space = ' '\nvar dash = '-'\nvar colon = ':'\nvar backslash = '\\\\'\nvar verticalBar = '|'\n\nvar minColumns = 1\nvar minRows = 2\n\nvar left = 'left'\nvar center = 'center'\nvar right = 'right'\n\nfunction table(eat, value, silent) {\n  var self = this\n  var index\n  var alignments\n  var alignment\n  var subvalue\n  var row\n  var length\n  var lines\n  var queue\n  var character\n  var hasDash\n  var align\n  var cell\n  var preamble\n  var now\n  var position\n  var lineCount\n  var line\n  var rows\n  var table\n  var lineIndex\n  var pipeIndex\n  var first\n\n  // Exit when not in gfm-mode.\n  if (!self.options.gfm) {\n    return\n  }\n\n  // Get the rows.\n  // Detecting tables soon is hard, so there are some checks for performance\n  // here, such as the minimum number of rows, and allowed characters in the\n  // alignment row.\n  index = 0\n  lineCount = 0\n  length = value.length + 1\n  lines = []\n\n  while (index < length) {\n    lineIndex = value.indexOf(lineFeed, index)\n    pipeIndex = value.indexOf(verticalBar, index + 1)\n\n    if (lineIndex === -1) {\n      lineIndex = value.length\n    }\n\n    if (pipeIndex === -1 || pipeIndex > lineIndex) {\n      if (lineCount < minRows) {\n        return\n      }\n\n      break\n    }\n\n    lines.push(value.slice(index, lineIndex))\n    lineCount++\n    index = lineIndex + 1\n  }\n\n  // Parse the alignment row.\n  subvalue = lines.join(lineFeed)\n  alignments = lines.splice(1, 1)[0] || []\n  index = 0\n  length = alignments.length\n  lineCount--\n  alignment = false\n  align = []\n\n  while (index < length) {\n    character = alignments.charAt(index)\n\n    if (character === verticalBar) {\n      hasDash = null\n\n      if (alignment === false) {\n        if (first === false) {\n          return\n        }\n      } else {\n        align.push(alignment)\n        alignment = false\n      }\n\n      first = false\n    } else if (character === dash) {\n      hasDash = true\n      alignment = alignment || null\n    } else if (character === colon) {\n      if (alignment === left) {\n        alignment = center\n      } else if (hasDash && alignment === null) {\n        alignment = right\n      } else {\n        alignment = left\n      }\n    } else if (!whitespace(character)) {\n      return\n    }\n\n    index++\n  }\n\n  if (alignment !== false) {\n    align.push(alignment)\n  }\n\n  // Exit when without enough columns.\n  if (align.length < minColumns) {\n    return\n  }\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  // Parse the rows.\n  position = -1\n  rows = []\n\n  table = eat(subvalue).reset({type: 'table', align: align, children: rows})\n\n  while (++position < lineCount) {\n    line = lines[position]\n    row = {type: 'tableRow', children: []}\n\n    // Eat a newline character when this is not the first row.\n    if (position) {\n      eat(lineFeed)\n    }\n\n    // Eat the row.\n    eat(line).reset(row, table)\n\n    length = line.length + 1\n    index = 0\n    queue = ''\n    cell = ''\n    preamble = true\n\n    while (index < length) {\n      character = line.charAt(index)\n\n      if (character === tab || character === space) {\n        if (cell) {\n          queue += character\n        } else {\n          eat(character)\n        }\n\n        index++\n        continue\n      }\n\n      if (character === '' || character === verticalBar) {\n        if (preamble) {\n          eat(character)\n        } else {\n          if ((cell || character) && !preamble) {\n            subvalue = cell\n\n            if (queue.length > 1) {\n              if (character) {\n                subvalue += queue.slice(0, queue.length - 1)\n                queue = queue.charAt(queue.length - 1)\n              } else {\n                subvalue += queue\n                queue = ''\n              }\n            }\n\n            now = eat.now()\n\n            eat(subvalue)(\n              {type: 'tableCell', children: self.tokenizeInline(cell, now)},\n              row\n            )\n          }\n\n          eat(queue + character)\n\n          queue = ''\n          cell = ''\n        }\n      } else {\n        if (queue) {\n          cell += queue\n          queue = ''\n        }\n\n        cell += character\n\n        if (character === backslash && index !== length - 2) {\n          cell += line.charAt(index + 1)\n          index++\n        }\n      }\n\n      preamble = false\n      index++\n    }\n\n    // Eat the alignment row.\n    if (!position) {\n      eat(lineFeed + alignments)\n    }\n  }\n\n  return table\n}\n", "'use strict'\n\nvar trim = require('trim')\nvar decimal = require('is-decimal')\nvar trimTrailingLines = require('trim-trailing-lines')\nvar interrupt = require('../util/interrupt')\n\nmodule.exports = paragraph\n\nvar tab = '\\t'\nvar lineFeed = '\\n'\nvar space = ' '\n\nvar tabSize = 4\n\n// Tokenise paragraph.\nfunction paragraph(eat, value, silent) {\n  var self = this\n  var settings = self.options\n  var commonmark = settings.commonmark\n  var gfm = settings.gfm\n  var tokenizers = self.blockTokenizers\n  var interruptors = self.interruptParagraph\n  var index = value.indexOf(lineFeed)\n  var length = value.length\n  var position\n  var subvalue\n  var character\n  var size\n  var now\n\n  while (index < length) {\n    // Eat everything if there\u2019s no following newline.\n    if (index === -1) {\n      index = length\n      break\n    }\n\n    // Stop if the next character is NEWLINE.\n    if (value.charAt(index + 1) === lineFeed) {\n      break\n    }\n\n    // In commonmark-mode, following indented lines are part of the paragraph.\n    if (commonmark) {\n      size = 0\n      position = index + 1\n\n      while (position < length) {\n        character = value.charAt(position)\n\n        if (character === tab) {\n          size = tabSize\n          break\n        } else if (character === space) {\n          size++\n        } else {\n          break\n        }\n\n        position++\n      }\n\n      if (size >= tabSize && character !== lineFeed) {\n        index = value.indexOf(lineFeed, index + 1)\n        continue\n      }\n    }\n\n    subvalue = value.slice(index + 1)\n\n    // Check if the following code contains a possible block.\n    if (interrupt(interruptors, tokenizers, self, [eat, subvalue, true])) {\n      break\n    }\n\n    // Break if the following line starts a list, when already in a list, or\n    // when in commonmark, or when in gfm mode and the bullet is *not* numeric.\n    if (\n      tokenizers.list.call(self, eat, subvalue, true) &&\n      (self.inList ||\n        commonmark ||\n        (gfm && !decimal(trim.left(subvalue).charAt(0))))\n    ) {\n      break\n    }\n\n    position = index\n    index = value.indexOf(lineFeed, index + 1)\n\n    if (index !== -1 && trim(value.slice(position, index)) === '') {\n      index = position\n      break\n    }\n  }\n\n  subvalue = value.slice(0, index)\n\n  if (trim(subvalue) === '') {\n    eat(subvalue)\n\n    return null\n  }\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  now = eat.now()\n  subvalue = trimTrailingLines(subvalue)\n\n  return eat(subvalue)({\n    type: 'paragraph',\n    children: self.tokenizeInline(subvalue, now)\n  })\n}\n", "'use strict'\n\nmodule.exports = locate\n\nfunction locate(value, fromIndex) {\n  return value.indexOf('\\\\', fromIndex)\n}\n", "'use strict'\n\nvar locate = require('../locate/escape')\n\nmodule.exports = escape\nescape.locator = locate\n\nvar lineFeed = '\\n'\nvar backslash = '\\\\'\n\nfunction escape(eat, value, silent) {\n  var self = this\n  var character\n  var node\n\n  if (value.charAt(0) === backslash) {\n    character = value.charAt(1)\n\n    if (self.escape.indexOf(character) !== -1) {\n      /* istanbul ignore if - never used (yet) */\n      if (silent) {\n        return true\n      }\n\n      if (character === lineFeed) {\n        node = {type: 'break'}\n      } else {\n        node = {type: 'text', value: character}\n      }\n\n      return eat(backslash + character)(node)\n    }\n  }\n}\n", "'use strict'\n\nmodule.exports = locate\n\nfunction locate(value, fromIndex) {\n  return value.indexOf('<', fromIndex)\n}\n", "'use strict'\n\nvar whitespace = require('is-whitespace-character')\nvar decode = require('parse-entities')\nvar locate = require('../locate/tag')\n\nmodule.exports = autoLink\nautoLink.locator = locate\nautoLink.notInLink = true\n\nvar lessThan = '<'\nvar greaterThan = '>'\nvar atSign = '@'\nvar slash = '/'\nvar mailto = 'mailto:'\nvar mailtoLength = mailto.length\n\nfunction autoLink(eat, value, silent) {\n  var self = this\n  var subvalue = ''\n  var length = value.length\n  var index = 0\n  var queue = ''\n  var hasAtCharacter = false\n  var link = ''\n  var character\n  var now\n  var content\n  var tokenizers\n  var exit\n\n  if (value.charAt(0) !== lessThan) {\n    return\n  }\n\n  index++\n  subvalue = lessThan\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (\n      whitespace(character) ||\n      character === greaterThan ||\n      character === atSign ||\n      (character === ':' && value.charAt(index + 1) === slash)\n    ) {\n      break\n    }\n\n    queue += character\n    index++\n  }\n\n  if (!queue) {\n    return\n  }\n\n  link += queue\n  queue = ''\n\n  character = value.charAt(index)\n  link += character\n  index++\n\n  if (character === atSign) {\n    hasAtCharacter = true\n  } else {\n    if (character !== ':' || value.charAt(index + 1) !== slash) {\n      return\n    }\n\n    link += slash\n    index++\n  }\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (whitespace(character) || character === greaterThan) {\n      break\n    }\n\n    queue += character\n    index++\n  }\n\n  character = value.charAt(index)\n\n  if (!queue || character !== greaterThan) {\n    return\n  }\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  link += queue\n  content = link\n  subvalue += link + character\n  now = eat.now()\n  now.column++\n  now.offset++\n\n  if (hasAtCharacter) {\n    if (link.slice(0, mailtoLength).toLowerCase() === mailto) {\n      content = content.slice(mailtoLength)\n      now.column += mailtoLength\n      now.offset += mailtoLength\n    } else {\n      link = mailto + link\n    }\n  }\n\n  // Temporarily remove all tokenizers except text in autolinks.\n  tokenizers = self.inlineTokenizers\n  self.inlineTokenizers = {text: tokenizers.text}\n\n  exit = self.enterLink()\n\n  content = self.tokenizeInline(content, now)\n\n  self.inlineTokenizers = tokenizers\n  exit()\n\n  return eat(subvalue)({\n    type: 'link',\n    title: null,\n    url: decode(link, {nonTerminated: false}),\n    children: content\n  })\n}\n", "'use strict'\n\nmodule.exports = locate\n\nvar protocols = ['https://', 'http://', 'mailto:']\n\nfunction locate(value, fromIndex) {\n  var length = protocols.length\n  var index = -1\n  var min = -1\n  var position\n\n  if (!this.options.gfm) {\n    return -1\n  }\n\n  while (++index < length) {\n    position = value.indexOf(protocols[index], fromIndex)\n\n    if (position !== -1 && (position < min || min === -1)) {\n      min = position\n    }\n  }\n\n  return min\n}\n", "'use strict'\n\nvar decode = require('parse-entities')\nvar whitespace = require('is-whitespace-character')\nvar locate = require('../locate/url')\n\nmodule.exports = url\nurl.locator = locate\nurl.notInLink = true\n\nvar quotationMark = '\"'\nvar apostrophe = \"'\"\nvar leftParenthesis = '('\nvar rightParenthesis = ')'\nvar comma = ','\nvar dot = '.'\nvar colon = ':'\nvar semicolon = ';'\nvar lessThan = '<'\nvar atSign = '@'\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\n\nvar http = 'http://'\nvar https = 'https://'\nvar mailto = 'mailto:'\n\nvar protocols = [http, https, mailto]\n\nvar protocolsLength = protocols.length\n\nfunction url(eat, value, silent) {\n  var self = this\n  var subvalue\n  var content\n  var character\n  var index\n  var position\n  var protocol\n  var match\n  var length\n  var queue\n  var parenCount\n  var nextCharacter\n  var tokenizers\n  var exit\n\n  if (!self.options.gfm) {\n    return\n  }\n\n  subvalue = ''\n  index = -1\n\n  while (++index < protocolsLength) {\n    protocol = protocols[index]\n    match = value.slice(0, protocol.length)\n\n    if (match.toLowerCase() === protocol) {\n      subvalue = match\n      break\n    }\n  }\n\n  if (!subvalue) {\n    return\n  }\n\n  index = subvalue.length\n  length = value.length\n  queue = ''\n  parenCount = 0\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (whitespace(character) || character === lessThan) {\n      break\n    }\n\n    if (\n      character === dot ||\n      character === comma ||\n      character === colon ||\n      character === semicolon ||\n      character === quotationMark ||\n      character === apostrophe ||\n      character === rightParenthesis ||\n      character === rightSquareBracket\n    ) {\n      nextCharacter = value.charAt(index + 1)\n\n      if (!nextCharacter || whitespace(nextCharacter)) {\n        break\n      }\n    }\n\n    if (character === leftParenthesis || character === leftSquareBracket) {\n      parenCount++\n    }\n\n    if (character === rightParenthesis || character === rightSquareBracket) {\n      parenCount--\n\n      if (parenCount < 0) {\n        break\n      }\n    }\n\n    queue += character\n    index++\n  }\n\n  if (!queue) {\n    return\n  }\n\n  subvalue += queue\n  content = subvalue\n\n  if (protocol === mailto) {\n    position = queue.indexOf(atSign)\n\n    if (position === -1 || position === length - 1) {\n      return\n    }\n\n    content = content.slice(mailto.length)\n  }\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  exit = self.enterLink()\n\n  // Temporarily remove all tokenizers except text in url.\n  tokenizers = self.inlineTokenizers\n  self.inlineTokenizers = {text: tokenizers.text}\n\n  content = self.tokenizeInline(content, eat.now())\n\n  self.inlineTokenizers = tokenizers\n  exit()\n\n  return eat(subvalue)({\n    type: 'link',\n    title: null,\n    url: decode(subvalue, {nonTerminated: false}),\n    children: content\n  })\n}\n", "'use strict'\n\nvar alphabetical = require('is-alphabetical')\nvar locate = require('../locate/tag')\nvar tag = require('../util/html').tag\n\nmodule.exports = inlineHTML\ninlineHTML.locator = locate\n\nvar lessThan = '<'\nvar questionMark = '?'\nvar exclamationMark = '!'\nvar slash = '/'\n\nvar htmlLinkOpenExpression = /^<a /i\nvar htmlLinkCloseExpression = /^<\\/a>/i\n\nfunction inlineHTML(eat, value, silent) {\n  var self = this\n  var length = value.length\n  var character\n  var subvalue\n\n  if (value.charAt(0) !== lessThan || length < 3) {\n    return\n  }\n\n  character = value.charAt(1)\n\n  if (\n    !alphabetical(character) &&\n    character !== questionMark &&\n    character !== exclamationMark &&\n    character !== slash\n  ) {\n    return\n  }\n\n  subvalue = value.match(tag)\n\n  if (!subvalue) {\n    return\n  }\n\n  /* istanbul ignore if - not used yet. */\n  if (silent) {\n    return true\n  }\n\n  subvalue = subvalue[0]\n\n  if (!self.inLink && htmlLinkOpenExpression.test(subvalue)) {\n    self.inLink = true\n  } else if (self.inLink && htmlLinkCloseExpression.test(subvalue)) {\n    self.inLink = false\n  }\n\n  return eat(subvalue)({type: 'html', value: subvalue})\n}\n", "'use strict'\n\nmodule.exports = locate\n\nfunction locate(value, fromIndex) {\n  var link = value.indexOf('[', fromIndex)\n  var image = value.indexOf('![', fromIndex)\n\n  if (image === -1) {\n    return link\n  }\n\n  // Link can never be `-1` if an image is found, so we don\u2019t need to check\n  // for that :)\n  return link < image ? link : image\n}\n", "'use strict'\n\nvar whitespace = require('is-whitespace-character')\nvar locate = require('../locate/link')\n\nmodule.exports = link\nlink.locator = locate\n\nvar lineFeed = '\\n'\nvar exclamationMark = '!'\nvar quotationMark = '\"'\nvar apostrophe = \"'\"\nvar leftParenthesis = '('\nvar rightParenthesis = ')'\nvar lessThan = '<'\nvar greaterThan = '>'\nvar leftSquareBracket = '['\nvar backslash = '\\\\'\nvar rightSquareBracket = ']'\nvar graveAccent = '`'\n\nfunction link(eat, value, silent) {\n  var self = this\n  var subvalue = ''\n  var index = 0\n  var character = value.charAt(0)\n  var pedantic = self.options.pedantic\n  var commonmark = self.options.commonmark\n  var gfm = self.options.gfm\n  var closed\n  var count\n  var opening\n  var beforeURL\n  var beforeTitle\n  var subqueue\n  var hasMarker\n  var isImage\n  var content\n  var marker\n  var length\n  var title\n  var depth\n  var queue\n  var url\n  var now\n  var exit\n  var node\n\n  // Detect whether this is an image.\n  if (character === exclamationMark) {\n    isImage = true\n    subvalue = character\n    character = value.charAt(++index)\n  }\n\n  // Eat the opening.\n  if (character !== leftSquareBracket) {\n    return\n  }\n\n  // Exit when this is a link and we\u2019re already inside a link.\n  if (!isImage && self.inLink) {\n    return\n  }\n\n  subvalue += character\n  queue = ''\n  index++\n\n  // Eat the content.\n  length = value.length\n  now = eat.now()\n  depth = 0\n\n  now.column += index\n  now.offset += index\n\n  while (index < length) {\n    character = value.charAt(index)\n    subqueue = character\n\n    if (character === graveAccent) {\n      // Inline-code in link content.\n      count = 1\n\n      while (value.charAt(index + 1) === graveAccent) {\n        subqueue += character\n        index++\n        count++\n      }\n\n      if (!opening) {\n        opening = count\n      } else if (count >= opening) {\n        opening = 0\n      }\n    } else if (character === backslash) {\n      // Allow brackets to be escaped.\n      index++\n      subqueue += value.charAt(index)\n    } else if ((!opening || gfm) && character === leftSquareBracket) {\n      // In GFM mode, brackets in code still count.  In all other modes,\n      // they don\u2019t.\n      depth++\n    } else if ((!opening || gfm) && character === rightSquareBracket) {\n      if (depth) {\n        depth--\n      } else {\n        // Allow white-space between content and url in GFM mode.\n        if (!pedantic) {\n          while (index < length) {\n            character = value.charAt(index + 1)\n\n            if (!whitespace(character)) {\n              break\n            }\n\n            subqueue += character\n            index++\n          }\n        }\n\n        if (value.charAt(index + 1) !== leftParenthesis) {\n          return\n        }\n\n        subqueue += leftParenthesis\n        closed = true\n        index++\n\n        break\n      }\n    }\n\n    queue += subqueue\n    subqueue = ''\n    index++\n  }\n\n  // Eat the content closing.\n  if (!closed) {\n    return\n  }\n\n  content = queue\n  subvalue += queue + subqueue\n  index++\n\n  // Eat white-space.\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (!whitespace(character)) {\n      break\n    }\n\n    subvalue += character\n    index++\n  }\n\n  // Eat the URL.\n  character = value.charAt(index)\n  queue = ''\n  beforeURL = subvalue\n\n  if (character === lessThan) {\n    index++\n    beforeURL += lessThan\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (character === greaterThan) {\n        break\n      }\n\n      if (commonmark && character === lineFeed) {\n        return\n      }\n\n      queue += character\n      index++\n    }\n\n    if (value.charAt(index) !== greaterThan) {\n      return\n    }\n\n    subvalue += lessThan + queue + greaterThan\n    url = queue\n    index++\n  } else {\n    character = null\n    subqueue = ''\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (\n        subqueue &&\n        (character === quotationMark ||\n          character === apostrophe ||\n          (commonmark && character === leftParenthesis))\n      ) {\n        break\n      }\n\n      if (whitespace(character)) {\n        if (!pedantic) {\n          break\n        }\n\n        subqueue += character\n      } else {\n        if (character === leftParenthesis) {\n          depth++\n        } else if (character === rightParenthesis) {\n          if (depth === 0) {\n            break\n          }\n\n          depth--\n        }\n\n        queue += subqueue\n        subqueue = ''\n\n        if (character === backslash) {\n          queue += backslash\n          character = value.charAt(++index)\n        }\n\n        queue += character\n      }\n\n      index++\n    }\n\n    subvalue += queue\n    url = queue\n    index = subvalue.length\n  }\n\n  // Eat white-space.\n  queue = ''\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (!whitespace(character)) {\n      break\n    }\n\n    queue += character\n    index++\n  }\n\n  character = value.charAt(index)\n  subvalue += queue\n\n  // Eat the title.\n  if (\n    queue &&\n    (character === quotationMark ||\n      character === apostrophe ||\n      (commonmark && character === leftParenthesis))\n  ) {\n    index++\n    subvalue += character\n    queue = ''\n    marker = character === leftParenthesis ? rightParenthesis : character\n    beforeTitle = subvalue\n\n    // In commonmark-mode, things are pretty easy: the marker cannot occur\n    // inside the title.  Non-commonmark does, however, support nested\n    // delimiters.\n    if (commonmark) {\n      while (index < length) {\n        character = value.charAt(index)\n\n        if (character === marker) {\n          break\n        }\n\n        if (character === backslash) {\n          queue += backslash\n          character = value.charAt(++index)\n        }\n\n        index++\n        queue += character\n      }\n\n      character = value.charAt(index)\n\n      if (character !== marker) {\n        return\n      }\n\n      title = queue\n      subvalue += queue + character\n      index++\n\n      while (index < length) {\n        character = value.charAt(index)\n\n        if (!whitespace(character)) {\n          break\n        }\n\n        subvalue += character\n        index++\n      }\n    } else {\n      subqueue = ''\n\n      while (index < length) {\n        character = value.charAt(index)\n\n        if (character === marker) {\n          if (hasMarker) {\n            queue += marker + subqueue\n            subqueue = ''\n          }\n\n          hasMarker = true\n        } else if (!hasMarker) {\n          queue += character\n        } else if (character === rightParenthesis) {\n          subvalue += queue + marker + subqueue\n          title = queue\n          break\n        } else if (whitespace(character)) {\n          subqueue += character\n        } else {\n          queue += marker + subqueue + character\n          subqueue = ''\n          hasMarker = false\n        }\n\n        index++\n      }\n    }\n  }\n\n  if (value.charAt(index) !== rightParenthesis) {\n    return\n  }\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  subvalue += rightParenthesis\n\n  url = self.decode.raw(self.unescape(url), eat(beforeURL).test().end, {\n    nonTerminated: false\n  })\n\n  if (title) {\n    beforeTitle = eat(beforeTitle).test().end\n    title = self.decode.raw(self.unescape(title), beforeTitle)\n  }\n\n  node = {\n    type: isImage ? 'image' : 'link',\n    title: title || null,\n    url: url\n  }\n\n  if (isImage) {\n    node.alt = self.decode.raw(self.unescape(content), now) || null\n  } else {\n    exit = self.enterLink()\n    node.children = self.tokenizeInline(content, now)\n    exit()\n  }\n\n  return eat(subvalue)(node)\n}\n", "'use strict'\n\nvar whitespace = require('is-whitespace-character')\nvar locate = require('../locate/link')\nvar normalize = require('../util/normalize')\n\nmodule.exports = reference\nreference.locator = locate\n\nvar link = 'link'\nvar image = 'image'\nvar footnote = 'footnote'\nvar shortcut = 'shortcut'\nvar collapsed = 'collapsed'\nvar full = 'full'\nvar space = ' '\nvar exclamationMark = '!'\nvar leftSquareBracket = '['\nvar backslash = '\\\\'\nvar rightSquareBracket = ']'\nvar caret = '^'\n\nfunction reference(eat, value, silent) {\n  var self = this\n  var commonmark = self.options.commonmark\n  var footnotes = self.options.footnotes\n  var character = value.charAt(0)\n  var index = 0\n  var length = value.length\n  var subvalue = ''\n  var intro = ''\n  var type = link\n  var referenceType = shortcut\n  var content\n  var identifier\n  var now\n  var node\n  var exit\n  var queue\n  var bracketed\n  var depth\n\n  // Check whether we\u2019re eating an image.\n  if (character === exclamationMark) {\n    type = image\n    intro = character\n    character = value.charAt(++index)\n  }\n\n  if (character !== leftSquareBracket) {\n    return\n  }\n\n  index++\n  intro += character\n  queue = ''\n\n  // Check whether we\u2019re eating a footnote.\n  if (footnotes && value.charAt(index) === caret) {\n    // Exit if `![^` is found, so the `!` will be seen as text after this,\n    // and we\u2019ll enter this function again when `[^` is found.\n    if (type === image) {\n      return\n    }\n\n    intro += caret\n    index++\n    type = footnote\n  }\n\n  // Eat the text.\n  depth = 0\n\n  while (index < length) {\n    character = value.charAt(index)\n\n    if (character === leftSquareBracket) {\n      bracketed = true\n      depth++\n    } else if (character === rightSquareBracket) {\n      if (!depth) {\n        break\n      }\n\n      depth--\n    }\n\n    if (character === backslash) {\n      queue += backslash\n      character = value.charAt(++index)\n    }\n\n    queue += character\n    index++\n  }\n\n  subvalue = queue\n  content = queue\n  character = value.charAt(index)\n\n  if (character !== rightSquareBracket) {\n    return\n  }\n\n  index++\n  subvalue += character\n  queue = ''\n\n  if (!commonmark) {\n    // The original markdown syntax definition explicitly allows for whitespace\n    // between the link text and link label; commonmark departs from this, in\n    // part to improve support for shortcut reference links\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (!whitespace(character)) {\n        break\n      }\n\n      queue += character\n      index++\n    }\n  }\n\n  character = value.charAt(index)\n\n  // Inline footnotes cannot have a label.\n  // If footnotes are enabled, link labels cannot start with a caret.\n  if (\n    type !== footnote &&\n    character === leftSquareBracket &&\n    (!footnotes || value.charAt(index + 1) !== caret)\n  ) {\n    identifier = ''\n    queue += character\n    index++\n\n    while (index < length) {\n      character = value.charAt(index)\n\n      if (character === leftSquareBracket || character === rightSquareBracket) {\n        break\n      }\n\n      if (character === backslash) {\n        identifier += backslash\n        character = value.charAt(++index)\n      }\n\n      identifier += character\n      index++\n    }\n\n    character = value.charAt(index)\n\n    if (character === rightSquareBracket) {\n      referenceType = identifier ? full : collapsed\n      queue += identifier + character\n      index++\n    } else {\n      identifier = ''\n    }\n\n    subvalue += queue\n    queue = ''\n  } else {\n    if (!content) {\n      return\n    }\n\n    identifier = content\n  }\n\n  // Brackets cannot be inside the identifier.\n  if (referenceType !== full && bracketed) {\n    return\n  }\n\n  subvalue = intro + subvalue\n\n  if (type === link && self.inLink) {\n    return null\n  }\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  if (type === footnote && content.indexOf(space) !== -1) {\n    return eat(subvalue)({\n      type: footnote,\n      children: this.tokenizeInline(content, eat.now())\n    })\n  }\n\n  now = eat.now()\n  now.column += intro.length\n  now.offset += intro.length\n  identifier = referenceType === full ? identifier : content\n\n  node = {\n    type: type + 'Reference',\n    identifier: normalize(identifier),\n    label: identifier\n  }\n\n  if (type === link || type === image) {\n    node.referenceType = referenceType\n  }\n\n  if (type === link) {\n    exit = self.enterLink()\n    node.children = self.tokenizeInline(content, now)\n    exit()\n  } else if (type === image) {\n    node.alt = self.decode.raw(self.unescape(content), now) || null\n  }\n\n  return eat(subvalue)(node)\n}\n", "'use strict'\n\nmodule.exports = locate\n\nfunction locate(value, fromIndex) {\n  var asterisk = value.indexOf('**', fromIndex)\n  var underscore = value.indexOf('__', fromIndex)\n\n  if (underscore === -1) {\n    return asterisk\n  }\n\n  if (asterisk === -1) {\n    return underscore\n  }\n\n  return underscore < asterisk ? underscore : asterisk\n}\n", "'use strict'\n\nvar trim = require('trim')\nvar whitespace = require('is-whitespace-character')\nvar locate = require('../locate/strong')\n\nmodule.exports = strong\nstrong.locator = locate\n\nvar backslash = '\\\\'\nvar asterisk = '*'\nvar underscore = '_'\n\nfunction strong(eat, value, silent) {\n  var self = this\n  var index = 0\n  var character = value.charAt(index)\n  var now\n  var pedantic\n  var marker\n  var queue\n  var subvalue\n  var length\n  var prev\n\n  if (\n    (character !== asterisk && character !== underscore) ||\n    value.charAt(++index) !== character\n  ) {\n    return\n  }\n\n  pedantic = self.options.pedantic\n  marker = character\n  subvalue = marker + marker\n  length = value.length\n  index++\n  queue = ''\n  character = ''\n\n  if (pedantic && whitespace(value.charAt(index))) {\n    return\n  }\n\n  while (index < length) {\n    prev = character\n    character = value.charAt(index)\n\n    if (\n      character === marker &&\n      value.charAt(index + 1) === marker &&\n      (!pedantic || !whitespace(prev))\n    ) {\n      character = value.charAt(index + 2)\n\n      if (character !== marker) {\n        if (!trim(queue)) {\n          return\n        }\n\n        /* istanbul ignore if - never used (yet) */\n        if (silent) {\n          return true\n        }\n\n        now = eat.now()\n        now.column += 2\n        now.offset += 2\n\n        return eat(subvalue + queue + subvalue)({\n          type: 'strong',\n          children: self.tokenizeInline(queue, now)\n        })\n      }\n    }\n\n    if (!pedantic && character === backslash) {\n      queue += character\n      character = value.charAt(++index)\n    }\n\n    queue += character\n    index++\n  }\n}\n", "'use strict'\n\nmodule.exports = wordCharacter\n\nvar fromCode = String.fromCharCode\nvar re = /\\w/\n\n// Check if the given character code, or the character code at the first\n// character, is a word character.\nfunction wordCharacter(character) {\n  return re.test(\n    typeof character === 'number' ? fromCode(character) : character.charAt(0)\n  )\n}\n", "'use strict'\n\nmodule.exports = locate\n\nfunction locate(value, fromIndex) {\n  var asterisk = value.indexOf('*', fromIndex)\n  var underscore = value.indexOf('_', fromIndex)\n\n  if (underscore === -1) {\n    return asterisk\n  }\n\n  if (asterisk === -1) {\n    return underscore\n  }\n\n  return underscore < asterisk ? underscore : asterisk\n}\n", "'use strict'\n\nvar trim = require('trim')\nvar word = require('is-word-character')\nvar whitespace = require('is-whitespace-character')\nvar locate = require('../locate/emphasis')\n\nmodule.exports = emphasis\nemphasis.locator = locate\n\nvar asterisk = '*'\nvar underscore = '_'\nvar backslash = '\\\\'\n\nfunction emphasis(eat, value, silent) {\n  var self = this\n  var index = 0\n  var character = value.charAt(index)\n  var now\n  var pedantic\n  var marker\n  var queue\n  var subvalue\n  var length\n  var prev\n\n  if (character !== asterisk && character !== underscore) {\n    return\n  }\n\n  pedantic = self.options.pedantic\n  subvalue = character\n  marker = character\n  length = value.length\n  index++\n  queue = ''\n  character = ''\n\n  if (pedantic && whitespace(value.charAt(index))) {\n    return\n  }\n\n  while (index < length) {\n    prev = character\n    character = value.charAt(index)\n\n    if (character === marker && (!pedantic || !whitespace(prev))) {\n      character = value.charAt(++index)\n\n      if (character !== marker) {\n        if (!trim(queue) || prev === marker) {\n          return\n        }\n\n        if (!pedantic && marker === underscore && word(character)) {\n          queue += marker\n          continue\n        }\n\n        /* istanbul ignore if - never used (yet) */\n        if (silent) {\n          return true\n        }\n\n        now = eat.now()\n        now.column++\n        now.offset++\n\n        return eat(subvalue + queue + marker)({\n          type: 'emphasis',\n          children: self.tokenizeInline(queue, now)\n        })\n      }\n\n      queue += marker\n    }\n\n    if (!pedantic && character === backslash) {\n      queue += character\n      character = value.charAt(++index)\n    }\n\n    queue += character\n    index++\n  }\n}\n", "'use strict'\n\nmodule.exports = locate\n\nfunction locate(value, fromIndex) {\n  return value.indexOf('~~', fromIndex)\n}\n", "'use strict'\n\nvar whitespace = require('is-whitespace-character')\nvar locate = require('../locate/delete')\n\nmodule.exports = strikethrough\nstrikethrough.locator = locate\n\nvar tilde = '~'\nvar fence = '~~'\n\nfunction strikethrough(eat, value, silent) {\n  var self = this\n  var character = ''\n  var previous = ''\n  var preceding = ''\n  var subvalue = ''\n  var index\n  var length\n  var now\n\n  if (\n    !self.options.gfm ||\n    value.charAt(0) !== tilde ||\n    value.charAt(1) !== tilde ||\n    whitespace(value.charAt(2))\n  ) {\n    return\n  }\n\n  index = 1\n  length = value.length\n  now = eat.now()\n  now.column += 2\n  now.offset += 2\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (\n      character === tilde &&\n      previous === tilde &&\n      (!preceding || !whitespace(preceding))\n    ) {\n      /* istanbul ignore if - never used (yet) */\n      if (silent) {\n        return true\n      }\n\n      return eat(fence + subvalue + fence)({\n        type: 'delete',\n        children: self.tokenizeInline(subvalue, now)\n      })\n    }\n\n    subvalue += previous\n    preceding = previous\n    previous = character\n  }\n}\n", "'use strict'\n\nmodule.exports = locate\n\nfunction locate(value, fromIndex) {\n  return value.indexOf('`', fromIndex)\n}\n", "'use strict'\n\nvar locate = require('../locate/code-inline')\n\nmodule.exports = inlineCode\ninlineCode.locator = locate\n\nvar lineFeed = 10 //  '\\n'\nvar space = 32 // ' '\nvar graveAccent = 96 //  '`'\n\nfunction inlineCode(eat, value, silent) {\n  var length = value.length\n  var index = 0\n  var openingFenceEnd\n  var closingFenceStart\n  var closingFenceEnd\n  var code\n  var next\n  var found\n\n  while (index < length) {\n    if (value.charCodeAt(index) !== graveAccent) {\n      break\n    }\n\n    index++\n  }\n\n  if (index === 0 || index === length) {\n    return\n  }\n\n  openingFenceEnd = index\n  next = value.charCodeAt(index)\n\n  while (index < length) {\n    code = next\n    next = value.charCodeAt(index + 1)\n\n    if (code === graveAccent) {\n      if (closingFenceStart === undefined) {\n        closingFenceStart = index\n      }\n\n      closingFenceEnd = index + 1\n\n      if (\n        next !== graveAccent &&\n        closingFenceEnd - closingFenceStart === openingFenceEnd\n      ) {\n        found = true\n        break\n      }\n    } else if (closingFenceStart !== undefined) {\n      closingFenceStart = undefined\n      closingFenceEnd = undefined\n    }\n\n    index++\n  }\n\n  if (!found) {\n    return\n  }\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  // Remove the initial and final space (or line feed), iff they exist and there\n  // are non-space characters in the content.\n  index = openingFenceEnd\n  length = closingFenceStart\n  code = value.charCodeAt(index)\n  next = value.charCodeAt(length - 1)\n  found = false\n\n  if (\n    length - index > 2 &&\n    (code === space || code === lineFeed) &&\n    (next === space || next === lineFeed)\n  ) {\n    index++\n    length--\n\n    while (index < length) {\n      code = value.charCodeAt(index)\n\n      if (code !== space && code !== lineFeed) {\n        found = true\n        break\n      }\n\n      index++\n    }\n\n    if (found === true) {\n      openingFenceEnd++\n      closingFenceStart--\n    }\n  }\n\n  return eat(value.slice(0, closingFenceEnd))({\n    type: 'inlineCode',\n    value: value.slice(openingFenceEnd, closingFenceStart)\n  })\n}\n", "'use strict'\n\nmodule.exports = locate\n\nfunction locate(value, fromIndex) {\n  var index = value.indexOf('\\n', fromIndex)\n\n  while (index > fromIndex) {\n    if (value.charAt(index - 1) !== ' ') {\n      break\n    }\n\n    index--\n  }\n\n  return index\n}\n", "'use strict'\n\nvar locate = require('../locate/break')\n\nmodule.exports = hardBreak\nhardBreak.locator = locate\n\nvar space = ' '\nvar lineFeed = '\\n'\nvar minBreakLength = 2\n\nfunction hardBreak(eat, value, silent) {\n  var length = value.length\n  var index = -1\n  var queue = ''\n  var character\n\n  while (++index < length) {\n    character = value.charAt(index)\n\n    if (character === lineFeed) {\n      if (index < minBreakLength) {\n        return\n      }\n\n      /* istanbul ignore if - never used (yet) */\n      if (silent) {\n        return true\n      }\n\n      queue += character\n\n      return eat(queue)({type: 'break'})\n    }\n\n    if (character !== space) {\n      return\n    }\n\n    queue += character\n  }\n}\n", "'use strict'\n\nmodule.exports = text\n\nfunction text(eat, value, silent) {\n  var self = this\n  var methods\n  var tokenizers\n  var index\n  var length\n  var subvalue\n  var position\n  var tokenizer\n  var name\n  var min\n  var now\n\n  /* istanbul ignore if - never used (yet) */\n  if (silent) {\n    return true\n  }\n\n  methods = self.inlineMethods\n  length = methods.length\n  tokenizers = self.inlineTokenizers\n  index = -1\n  min = value.length\n\n  while (++index < length) {\n    name = methods[index]\n\n    if (name === 'text' || !tokenizers[name]) {\n      continue\n    }\n\n    tokenizer = tokenizers[name].locator\n\n    if (!tokenizer) {\n      eat.file.fail('Missing locator: `' + name + '`')\n    }\n\n    position = tokenizer.call(self, value, 1)\n\n    if (position !== -1 && position < min) {\n      min = position\n    }\n  }\n\n  subvalue = value.slice(0, min)\n  now = eat.now()\n\n  self.decode(subvalue, now, handler)\n\n  function handler(content, position, source) {\n    eat(source || content)({type: 'text', value: content})\n  }\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar toggle = require('state-toggle')\nvar vfileLocation = require('vfile-location')\nvar unescape = require('./unescape')\nvar decode = require('./decode')\nvar tokenizer = require('./tokenizer')\n\nmodule.exports = Parser\n\nfunction Parser(doc, file) {\n  this.file = file\n  this.offset = {}\n  this.options = xtend(this.options)\n  this.setOptions({})\n\n  this.inList = false\n  this.inBlock = false\n  this.inLink = false\n  this.atStart = true\n\n  this.toOffset = vfileLocation(file).toOffset\n  this.unescape = unescape(this, 'escape')\n  this.decode = decode(this)\n}\n\nvar proto = Parser.prototype\n\n// Expose core.\nproto.setOptions = require('./set-options')\nproto.parse = require('./parse')\n\n// Expose `defaults`.\nproto.options = require('./defaults')\n\n// Enter and exit helpers.\nproto.exitStart = toggle('atStart', true)\nproto.enterList = toggle('inList', false)\nproto.enterLink = toggle('inLink', false)\nproto.enterBlock = toggle('inBlock', false)\n\n// Nodes that can interupt a paragraph:\n//\n// ```markdown\n// A paragraph, followed by a thematic break.\n// ___\n// ```\n//\n// In the above example, the thematic break \u201Cinterupts\u201D the paragraph.\nproto.interruptParagraph = [\n  ['thematicBreak'],\n  ['atxHeading'],\n  ['fencedCode'],\n  ['blockquote'],\n  ['html'],\n  ['setextHeading', {commonmark: false}],\n  ['definition', {commonmark: false}],\n  ['footnote', {commonmark: false}]\n]\n\n// Nodes that can interupt a list:\n//\n// ```markdown\n// - One\n// ___\n// ```\n//\n// In the above example, the thematic break \u201Cinterupts\u201D the list.\nproto.interruptList = [\n  ['atxHeading', {pedantic: false}],\n  ['fencedCode', {pedantic: false}],\n  ['thematicBreak', {pedantic: false}],\n  ['definition', {commonmark: false}],\n  ['footnote', {commonmark: false}]\n]\n\n// Nodes that can interupt a blockquote:\n//\n// ```markdown\n// > A paragraph.\n// ___\n// ```\n//\n// In the above example, the thematic break \u201Cinterupts\u201D the blockquote.\nproto.interruptBlockquote = [\n  ['indentedCode', {commonmark: true}],\n  ['fencedCode', {commonmark: true}],\n  ['atxHeading', {commonmark: true}],\n  ['setextHeading', {commonmark: true}],\n  ['thematicBreak', {commonmark: true}],\n  ['html', {commonmark: true}],\n  ['list', {commonmark: true}],\n  ['definition', {commonmark: false}],\n  ['footnote', {commonmark: false}]\n]\n\n// Handlers.\nproto.blockTokenizers = {\n  newline: require('./tokenize/newline'),\n  indentedCode: require('./tokenize/code-indented'),\n  fencedCode: require('./tokenize/code-fenced'),\n  blockquote: require('./tokenize/blockquote'),\n  atxHeading: require('./tokenize/heading-atx'),\n  thematicBreak: require('./tokenize/thematic-break'),\n  list: require('./tokenize/list'),\n  setextHeading: require('./tokenize/heading-setext'),\n  html: require('./tokenize/html-block'),\n  footnote: require('./tokenize/footnote-definition'),\n  definition: require('./tokenize/definition'),\n  table: require('./tokenize/table'),\n  paragraph: require('./tokenize/paragraph')\n}\n\nproto.inlineTokenizers = {\n  escape: require('./tokenize/escape'),\n  autoLink: require('./tokenize/auto-link'),\n  url: require('./tokenize/url'),\n  html: require('./tokenize/html-inline'),\n  link: require('./tokenize/link'),\n  reference: require('./tokenize/reference'),\n  strong: require('./tokenize/strong'),\n  emphasis: require('./tokenize/emphasis'),\n  deletion: require('./tokenize/delete'),\n  code: require('./tokenize/code-inline'),\n  break: require('./tokenize/break'),\n  text: require('./tokenize/text')\n}\n\n// Expose precedence.\nproto.blockMethods = keys(proto.blockTokenizers)\nproto.inlineMethods = keys(proto.inlineTokenizers)\n\n// Tokenizers.\nproto.tokenizeBlock = tokenizer('block')\nproto.tokenizeInline = tokenizer('inline')\nproto.tokenizeFactory = tokenizer\n\n// Get all keys in `value`.\nfunction keys(value) {\n  var result = []\n  var key\n\n  for (key in value) {\n    result.push(key)\n  }\n\n  return result\n}\n", "'use strict'\n\nvar unherit = require('unherit')\nvar xtend = require('xtend')\nvar Parser = require('./lib/parser.js')\n\nmodule.exports = parse\nparse.Parser = Parser\n\nfunction parse(options) {\n  var settings = this.data('settings')\n  var Local = unherit(Parser)\n\n  Local.prototype.options = xtend(Local.prototype.options, settings, options)\n\n  this.Parser = Local\n}\n", "'use strict'\n\nmodule.exports = identity\n\nfunction identity(value) {\n  return value\n}\n", "'use strict'\n\nvar identity = require('./identity')\n\nmodule.exports = enter\n\n// Shortcut and collapsed link references need no escaping and encoding during\n// the processing of child nodes (it must be implied from identifier).\n//\n// This toggler turns encoding and escaping off for shortcut and collapsed\n// references.\n//\n// Implies `enterLink`.\nfunction enter(compiler, node) {\n  var encode = compiler.encode\n  var escape = compiler.escape\n  var exitLink = compiler.enterLink()\n\n  if (node.referenceType !== 'shortcut' && node.referenceType !== 'collapsed') {\n    return exitLink\n  }\n\n  compiler.escape = identity\n  compiler.encode = identity\n\n  return exit\n\n  function exit() {\n    compiler.encode = encode\n    compiler.escape = escape\n    exitLink()\n  }\n}\n", "'use strict'\n\nmodule.exports = {\n  gfm: true,\n  commonmark: false,\n  pedantic: false,\n  entities: 'false',\n  setext: false,\n  closeAtx: false,\n  looseTable: false,\n  spacedTable: true,\n  paddedTable: true,\n  stringLength: stringLength,\n  incrementListMarker: true,\n  fences: false,\n  fence: '`',\n  bullet: '-',\n  listItemIndent: 'tab',\n  rule: '*',\n  ruleSpaces: true,\n  ruleRepetition: 3,\n  strong: '*',\n  emphasis: '_'\n}\n\nfunction stringLength(value) {\n  return value.length\n}\n", "'use strict'\n\nvar entities = require('character-entities-html4')\nvar legacy = require('character-entities-legacy')\nvar hexadecimal = require('is-hexadecimal')\nvar decimal = require('is-decimal')\nvar alphanumerical = require('is-alphanumerical')\nvar dangerous = require('./dangerous.json')\n\nmodule.exports = encode\nencode.escape = escape\n\nvar own = {}.hasOwnProperty\n\n// List of enforced escapes.\nvar escapes = ['\"', \"'\", '<', '>', '&', '`']\n\n// Map of characters to names.\nvar characters = construct()\n\n// Default escapes.\nvar defaultEscapes = toExpression(escapes)\n\n// Surrogate pairs.\nvar surrogatePair = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g\n\n// Non-ASCII characters.\n// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape\nvar bmp = /[\\x01-\\t\\x0B\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g\n\n// Encode special characters in `value`.\nfunction encode(value, options) {\n  var settings = options || {}\n  var subset = settings.subset\n  var set = subset ? toExpression(subset) : defaultEscapes\n  var escapeOnly = settings.escapeOnly\n  var omit = settings.omitOptionalSemicolons\n\n  value = value.replace(set, replace)\n\n  if (subset || escapeOnly) {\n    return value\n  }\n\n  return value\n    .replace(surrogatePair, replaceSurrogatePair)\n    .replace(bmp, replace)\n\n  function replaceSurrogatePair(pair, pos, val) {\n    return toHexReference(\n      (pair.charCodeAt(0) - 0xd800) * 0x400 +\n        pair.charCodeAt(1) -\n        0xdc00 +\n        0x10000,\n      val.charAt(pos + 2),\n      omit\n    )\n  }\n\n  function replace(char, pos, val) {\n    return one(char, val.charAt(pos + 1), settings)\n  }\n}\n\n// Shortcut to escape special characters in HTML.\nfunction escape(value) {\n  return encode(value, {escapeOnly: true, useNamedReferences: true})\n}\n\n// Encode `char` according to `options`.\nfunction one(char, next, options) {\n  var shortest = options.useShortestReferences\n  var omit = options.omitOptionalSemicolons\n  var named\n  var code\n  var numeric\n  var decimal\n\n  if ((shortest || options.useNamedReferences) && own.call(characters, char)) {\n    named = toNamed(characters[char], next, omit, options.attribute)\n  }\n\n  if (shortest || !named) {\n    code = char.charCodeAt(0)\n    numeric = toHexReference(code, next, omit)\n\n    // Use the shortest numeric reference when requested.\n    // A simple algorithm would use decimal for all code points under 100, as\n    // those are shorter than hexadecimal:\n    //\n    // * `&#99;` vs `&#x63;` (decimal shorter)\n    // * `&#100;` vs `&#x64;` (equal)\n    //\n    // However, because we take `next` into consideration when `omit` is used,\n    // And it would be possible that decimals are shorter on bigger values as\n    // well if `next` is hexadecimal but not decimal, we instead compare both.\n    if (shortest) {\n      decimal = toDecimalReference(code, next, omit)\n\n      if (decimal.length < numeric.length) {\n        numeric = decimal\n      }\n    }\n  }\n\n  if (named && (!shortest || named.length < numeric.length)) {\n    return named\n  }\n\n  return numeric\n}\n\n// Transform `code` into an entity.\nfunction toNamed(name, next, omit, attribute) {\n  var value = '&' + name\n\n  if (\n    omit &&\n    own.call(legacy, name) &&\n    dangerous.indexOf(name) === -1 &&\n    (!attribute || (next && next !== '=' && !alphanumerical(next)))\n  ) {\n    return value\n  }\n\n  return value + ';'\n}\n\n// Transform `code` into a hexadecimal character reference.\nfunction toHexReference(code, next, omit) {\n  var value = '&#x' + code.toString(16).toUpperCase()\n  return omit && next && !hexadecimal(next) ? value : value + ';'\n}\n\n// Transform `code` into a decimal character reference.\nfunction toDecimalReference(code, next, omit) {\n  var value = '&#' + String(code)\n  return omit && next && !decimal(next) ? value : value + ';'\n}\n\n// Create an expression for `characters`.\nfunction toExpression(characters) {\n  return new RegExp('[' + characters.join('') + ']', 'g')\n}\n\n// Construct the map.\nfunction construct() {\n  var chars = {}\n  var name\n\n  for (name in entities) {\n    chars[entities[name]] = name\n  }\n\n  return chars\n}\n", "'use strict';\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn !/[^0-9a-z\\xDF-\\xFF]/.test(str.toLowerCase());\n};\n", "'use strict'\n\nvar decode = require('parse-entities')\n\nmodule.exports = length\n\nvar ampersand = '&'\n\n// Returns the length of HTML entity that is a prefix of the given string\n// (excluding the ampersand), 0 if it does not start with an entity.\nfunction length(value) {\n  var prefix\n\n  /* istanbul ignore if - Currently also tested for at implemention, but we\n   * keep it here because that\u2019s proper. */\n  if (value.charAt(0) !== ampersand) {\n    return 0\n  }\n\n  prefix = value.split(ampersand, 2).join(ampersand)\n\n  return prefix.length - decode(prefix).length\n}\n", "'use strict'\n\nvar decimal = require('is-decimal')\nvar alphanumeric = require('is-alphanumeric')\nvar whitespace = require('is-whitespace-character')\nvar escapes = require('markdown-escapes')\nvar prefix = require('./util/entity-prefix-length')\n\nmodule.exports = factory\n\nvar tab = '\\t'\nvar lineFeed = '\\n'\nvar space = ' '\nvar numberSign = '#'\nvar ampersand = '&'\nvar leftParenthesis = '('\nvar rightParenthesis = ')'\nvar asterisk = '*'\nvar plusSign = '+'\nvar dash = '-'\nvar dot = '.'\nvar colon = ':'\nvar lessThan = '<'\nvar greaterThan = '>'\nvar leftSquareBracket = '['\nvar backslash = '\\\\'\nvar rightSquareBracket = ']'\nvar underscore = '_'\nvar graveAccent = '`'\nvar verticalBar = '|'\nvar tilde = '~'\nvar exclamationMark = '!'\n\nvar entities = {\n  '<': '&lt;',\n  ':': '&#x3A;',\n  '&': '&amp;',\n  '|': '&#x7C;',\n  '~': '&#x7E;'\n}\n\nvar shortcut = 'shortcut'\nvar mailto = 'mailto'\nvar https = 'https'\nvar http = 'http'\n\nvar blankExpression = /\\n\\s*$/\n\n// Factory to escape characters.\nfunction factory(options) {\n  return escape\n\n  // Escape punctuation characters in a node\u2019s value.\n  function escape(value, node, parent) {\n    var self = this\n    var gfm = options.gfm\n    var commonmark = options.commonmark\n    var pedantic = options.pedantic\n    var markers = commonmark ? [dot, rightParenthesis] : [dot]\n    var siblings = parent && parent.children\n    var index = siblings && siblings.indexOf(node)\n    var prev = siblings && siblings[index - 1]\n    var next = siblings && siblings[index + 1]\n    var length = value.length\n    var escapable = escapes(options)\n    var position = -1\n    var queue = []\n    var escaped = queue\n    var afterNewLine\n    var character\n    var wordCharBefore\n    var wordCharAfter\n    var offset\n    var replace\n\n    if (prev) {\n      afterNewLine = text(prev) && blankExpression.test(prev.value)\n    } else {\n      afterNewLine =\n        !parent || parent.type === 'root' || parent.type === 'paragraph'\n    }\n\n    while (++position < length) {\n      character = value.charAt(position)\n      replace = false\n\n      if (character === '\\n') {\n        afterNewLine = true\n      } else if (\n        character === backslash ||\n        character === graveAccent ||\n        character === asterisk ||\n        character === leftSquareBracket ||\n        character === lessThan ||\n        (character === ampersand && prefix(value.slice(position)) > 0) ||\n        (character === rightSquareBracket && self.inLink) ||\n        (gfm && character === tilde && value.charAt(position + 1) === tilde) ||\n        (gfm &&\n          character === verticalBar &&\n          (self.inTable || alignment(value, position))) ||\n        (character === underscore &&\n          // Delegate leading/trailing underscores to the multinode version below.\n          position > 0 &&\n          position < length - 1 &&\n          (pedantic ||\n            !alphanumeric(value.charAt(position - 1)) ||\n            !alphanumeric(value.charAt(position + 1)))) ||\n        (gfm && !self.inLink && character === colon && protocol(queue.join('')))\n      ) {\n        replace = true\n      } else if (afterNewLine) {\n        if (\n          character === greaterThan ||\n          character === numberSign ||\n          character === asterisk ||\n          character === dash ||\n          character === plusSign\n        ) {\n          replace = true\n        } else if (decimal(character)) {\n          offset = position + 1\n\n          while (offset < length) {\n            if (!decimal(value.charAt(offset))) {\n              break\n            }\n\n            offset++\n          }\n\n          if (markers.indexOf(value.charAt(offset)) !== -1) {\n            next = value.charAt(offset + 1)\n\n            if (!next || next === space || next === tab || next === lineFeed) {\n              queue.push(value.slice(position, offset))\n              position = offset\n              character = value.charAt(position)\n              replace = true\n            }\n          }\n        }\n      }\n\n      if (afterNewLine && !whitespace(character)) {\n        afterNewLine = false\n      }\n\n      queue.push(replace ? one(character) : character)\n    }\n\n    // Multi-node versions.\n    if (siblings && text(node)) {\n      // Check for an opening parentheses after a link-reference (which can be\n      // joined by white-space).\n      if (prev && prev.referenceType === shortcut) {\n        position = -1\n        length = escaped.length\n\n        while (++position < length) {\n          character = escaped[position]\n\n          if (character === space || character === tab) {\n            continue\n          }\n\n          if (character === leftParenthesis || character === colon) {\n            escaped[position] = one(character)\n          }\n\n          break\n        }\n\n        // If the current node is all spaces / tabs, preceded by a shortcut,\n        // and followed by a text starting with `(`, escape it.\n        if (\n          text(next) &&\n          position === length &&\n          next.value.charAt(0) === leftParenthesis\n        ) {\n          escaped.push(backslash)\n        }\n      }\n\n      // Ensure non-auto-links are not seen as links.  This pattern needs to\n      // check the preceding nodes too.\n      if (\n        gfm &&\n        !self.inLink &&\n        text(prev) &&\n        value.charAt(0) === colon &&\n        protocol(prev.value.slice(-6))\n      ) {\n        escaped[0] = one(colon)\n      }\n\n      // Escape ampersand if it would otherwise start an entity.\n      if (\n        text(next) &&\n        value.charAt(length - 1) === ampersand &&\n        prefix(ampersand + next.value) !== 0\n      ) {\n        escaped[escaped.length - 1] = one(ampersand)\n      }\n\n      // Escape exclamation marks immediately followed by links.\n      if (\n        next &&\n        next.type === 'link' &&\n        value.charAt(length - 1) === exclamationMark\n      ) {\n        escaped[escaped.length - 1] = one(exclamationMark)\n      }\n\n      // Escape double tildes in GFM.\n      if (\n        gfm &&\n        text(next) &&\n        value.charAt(length - 1) === tilde &&\n        next.value.charAt(0) === tilde\n      ) {\n        escaped.splice(escaped.length - 1, 0, backslash)\n      }\n\n      // Escape underscores, but not mid-word (unless in pedantic mode).\n      wordCharBefore = text(prev) && alphanumeric(prev.value.slice(-1))\n      wordCharAfter = text(next) && alphanumeric(next.value.charAt(0))\n\n      if (length === 1) {\n        if (\n          value === underscore &&\n          (pedantic || !wordCharBefore || !wordCharAfter)\n        ) {\n          escaped.unshift(backslash)\n        }\n      } else {\n        if (\n          value.charAt(0) === underscore &&\n          (pedantic || !wordCharBefore || !alphanumeric(value.charAt(1)))\n        ) {\n          escaped.unshift(backslash)\n        }\n\n        if (\n          value.charAt(length - 1) === underscore &&\n          (pedantic ||\n            !wordCharAfter ||\n            !alphanumeric(value.charAt(length - 2)))\n        ) {\n          escaped.splice(escaped.length - 1, 0, backslash)\n        }\n      }\n    }\n\n    return escaped.join('')\n\n    function one(character) {\n      return escapable.indexOf(character) === -1\n        ? entities[character]\n        : backslash + character\n    }\n  }\n}\n\n// Check if `index` in `value` is inside an alignment row.\nfunction alignment(value, index) {\n  var start = value.lastIndexOf(lineFeed, index)\n  var end = value.indexOf(lineFeed, index)\n  var char\n\n  end = end === -1 ? value.length : end\n\n  while (++start < end) {\n    char = value.charAt(start)\n\n    if (\n      char !== colon &&\n      char !== dash &&\n      char !== space &&\n      char !== verticalBar\n    ) {\n      return false\n    }\n  }\n\n  return true\n}\n\n// Check if `node` is a text node.\nfunction text(node) {\n  return node && node.type === 'text'\n}\n\n// Check if `value` ends in a protocol.\nfunction protocol(value) {\n  var val = value.slice(-6).toLowerCase()\n  return val === mailto || val.slice(-5) === https || val.slice(-4) === http\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar encode = require('stringify-entities')\nvar defaults = require('./defaults')\nvar escapeFactory = require('./escape')\nvar identity = require('./util/identity')\n\nmodule.exports = setOptions\n\n// Map of applicable enums.\nvar maps = {\n  entities: {true: true, false: true, numbers: true, escape: true},\n  bullet: {'*': true, '-': true, '+': true},\n  rule: {'-': true, _: true, '*': true},\n  listItemIndent: {tab: true, mixed: true, 1: true},\n  emphasis: {_: true, '*': true},\n  strong: {_: true, '*': true},\n  fence: {'`': true, '~': true}\n}\n\n// Expose `validate`.\nvar validate = {\n  boolean: validateBoolean,\n  string: validateString,\n  number: validateNumber,\n  function: validateFunction\n}\n\n// Set options.  Does not overwrite previously set options.\nfunction setOptions(options) {\n  var self = this\n  var current = self.options\n  var ruleRepetition\n  var key\n\n  if (options == null) {\n    options = {}\n  } else if (typeof options === 'object') {\n    options = xtend(options)\n  } else {\n    throw new Error('Invalid value `' + options + '` for setting `options`')\n  }\n\n  for (key in defaults) {\n    validate[typeof defaults[key]](options, key, current[key], maps[key])\n  }\n\n  ruleRepetition = options.ruleRepetition\n\n  if (ruleRepetition && ruleRepetition < 3) {\n    raise(ruleRepetition, 'options.ruleRepetition')\n  }\n\n  self.encode = encodeFactory(String(options.entities))\n  self.escape = escapeFactory(options)\n\n  self.options = options\n\n  return self\n}\n\n// Validate a value to be boolean. Defaults to `def`.  Raises an exception with\n// `context[name]` when not a boolean.\nfunction validateBoolean(context, name, def) {\n  var value = context[name]\n\n  if (value == null) {\n    value = def\n  }\n\n  if (typeof value !== 'boolean') {\n    raise(value, 'options.' + name)\n  }\n\n  context[name] = value\n}\n\n// Validate a value to be boolean. Defaults to `def`.  Raises an exception with\n// `context[name]` when not a boolean.\nfunction validateNumber(context, name, def) {\n  var value = context[name]\n\n  if (value == null) {\n    value = def\n  }\n\n  if (isNaN(value)) {\n    raise(value, 'options.' + name)\n  }\n\n  context[name] = value\n}\n\n// Validate a value to be in `map`. Defaults to `def`.  Raises an exception\n// with `context[name]` when not in `map`.\nfunction validateString(context, name, def, map) {\n  var value = context[name]\n\n  if (value == null) {\n    value = def\n  }\n\n  value = String(value)\n\n  if (!(value in map)) {\n    raise(value, 'options.' + name)\n  }\n\n  context[name] = value\n}\n\n// Validate a value to be function. Defaults to `def`.  Raises an exception\n// with `context[name]` when not a function.\nfunction validateFunction(context, name, def) {\n  var value = context[name]\n\n  if (value == null) {\n    value = def\n  }\n\n  if (typeof value !== 'function') {\n    raise(value, 'options.' + name)\n  }\n\n  context[name] = value\n}\n\n// Factory to encode HTML entities.  Creates a no-operation function when\n// `type` is `'false'`, a function which encodes using named references when\n// `type` is `'true'`, and a function which encodes using numbered references\n// when `type` is `'numbers'`.\nfunction encodeFactory(type) {\n  var options = {}\n\n  if (type === 'false') {\n    return identity\n  }\n\n  if (type === 'true') {\n    options.useNamedReferences = true\n  }\n\n  if (type === 'escape') {\n    options.escapeOnly = true\n    options.useNamedReferences = true\n  }\n\n  return wrapped\n\n  // Encode HTML entities using the bound options.\n  function wrapped(value) {\n    return encode(value, options)\n  }\n}\n\n// Throw an exception with in its `message` `value` and `name`.\nfunction raise(value, name) {\n  throw new Error('Invalid value `' + value + '` for setting `' + name + '`')\n}\n", "'use strict'\n\nmodule.exports = convert\n\nfunction convert(test) {\n  if (typeof test === 'string') {\n    return typeFactory(test)\n  }\n\n  if (test === null || test === undefined) {\n    return ok\n  }\n\n  if (typeof test === 'object') {\n    return ('length' in test ? anyFactory : matchesFactory)(test)\n  }\n\n  if (typeof test === 'function') {\n    return test\n  }\n\n  throw new Error('Expected function, string, or object as test')\n}\n\nfunction convertAll(tests) {\n  var results = []\n  var length = tests.length\n  var index = -1\n\n  while (++index < length) {\n    results[index] = convert(tests[index])\n  }\n\n  return results\n}\n\n// Utility assert each property in `test` is represented in `node`, and each\n// values are strictly equal.\nfunction matchesFactory(test) {\n  return matches\n\n  function matches(node) {\n    var key\n\n    for (key in test) {\n      if (node[key] !== test[key]) {\n        return false\n      }\n    }\n\n    return true\n  }\n}\n\nfunction anyFactory(tests) {\n  var checks = convertAll(tests)\n  var length = checks.length\n\n  return matches\n\n  function matches() {\n    var index = -1\n\n    while (++index < length) {\n      if (checks[index].apply(this, arguments)) {\n        return true\n      }\n    }\n\n    return false\n  }\n}\n\n// Utility to convert a string into a function which checks a given node\u2019s type\n// for said string.\nfunction typeFactory(test) {\n  return type\n\n  function type(node) {\n    return Boolean(node && node.type === test)\n  }\n}\n\n// Utility to return true.\nfunction ok() {\n  return true\n}\n", "'use strict'\n\nmodule.exports = visitParents\n\nvar convert = require('unist-util-is/convert')\n\nvar CONTINUE = true\nvar SKIP = 'skip'\nvar EXIT = false\n\nvisitParents.CONTINUE = CONTINUE\nvisitParents.SKIP = SKIP\nvisitParents.EXIT = EXIT\n\nfunction visitParents(tree, test, visitor, reverse) {\n  var is\n\n  if (typeof test === 'function' && typeof visitor !== 'function') {\n    reverse = visitor\n    visitor = test\n    test = null\n  }\n\n  is = convert(test)\n\n  one(tree, null, [])\n\n  // Visit a single node.\n  function one(node, index, parents) {\n    var result = []\n    var subresult\n\n    if (!test || is(node, index, parents[parents.length - 1] || null)) {\n      result = toResult(visitor(node, parents))\n\n      if (result[0] === EXIT) {\n        return result\n      }\n    }\n\n    if (node.children && result[0] !== SKIP) {\n      subresult = toResult(all(node.children, parents.concat(node)))\n      return subresult[0] === EXIT ? subresult : result\n    }\n\n    return result\n  }\n\n  // Visit children in `parent`.\n  function all(children, parents) {\n    var min = -1\n    var step = reverse ? -1 : 1\n    var index = (reverse ? children.length : min) + step\n    var result\n\n    while (index > min && index < children.length) {\n      result = one(children[index], index, parents)\n\n      if (result[0] === EXIT) {\n        return result\n      }\n\n      index = typeof result[1] === 'number' ? result[1] : index + step\n    }\n  }\n}\n\nfunction toResult(value) {\n  if (value !== null && typeof value === 'object' && 'length' in value) {\n    return value\n  }\n\n  if (typeof value === 'number') {\n    return [CONTINUE, value]\n  }\n\n  return [value]\n}\n", "'use strict'\n\nmodule.exports = visit\n\nvar visitParents = require('unist-util-visit-parents')\n\nvar CONTINUE = visitParents.CONTINUE\nvar SKIP = visitParents.SKIP\nvar EXIT = visitParents.EXIT\n\nvisit.CONTINUE = CONTINUE\nvisit.SKIP = SKIP\nvisit.EXIT = EXIT\n\nfunction visit(tree, test, visitor, reverse) {\n  if (typeof test === 'function' && typeof visitor !== 'function') {\n    reverse = visitor\n    visitor = test\n    test = null\n  }\n\n  visitParents(tree, test, overload, reverse)\n\n  function overload(node, parents) {\n    var parent = parents[parents.length - 1]\n    var index = parent ? parent.children.indexOf(node) : null\n    return visitor(node, index, parent)\n  }\n}\n", "'use strict'\n\nvar visit = require('unist-util-visit')\n\nmodule.exports = compact\n\n// Make an mdast tree compact by merging adjacent text nodes.\nfunction compact(tree, commonmark) {\n  visit(tree, visitor)\n\n  return tree\n\n  function visitor(child, index, parent) {\n    var siblings = parent ? parent.children : []\n    var prev = index && siblings[index - 1]\n\n    if (\n      prev &&\n      child.type === prev.type &&\n      mergeable(prev, commonmark) &&\n      mergeable(child, commonmark)\n    ) {\n      if (child.value) {\n        prev.value += child.value\n      }\n\n      if (child.children) {\n        prev.children = prev.children.concat(child.children)\n      }\n\n      siblings.splice(index, 1)\n\n      if (prev.position && child.position) {\n        prev.position.end = child.position.end\n      }\n\n      return index\n    }\n  }\n}\n\nfunction mergeable(node, commonmark) {\n  var start\n  var end\n\n  if (node.type === 'text') {\n    if (!node.position) {\n      return true\n    }\n\n    start = node.position.start\n    end = node.position.end\n\n    // Only merge nodes which occupy the same size as their `value`.\n    return (\n      start.line !== end.line || end.column - start.column === node.value.length\n    )\n  }\n\n  return commonmark && node.type === 'blockquote'\n}\n", "'use strict'\n\nvar compact = require('mdast-util-compact')\n\nmodule.exports = compile\n\n// Stringify the given tree.\nfunction compile() {\n  return this.visit(compact(this.tree, this.options.commonmark))\n}\n", "'use strict'\n\nmodule.exports = one\n\nfunction one(node, parent) {\n  var self = this\n  var visitors = self.visitors\n\n  // Fail on unknown nodes.\n  if (typeof visitors[node.type] !== 'function') {\n    self.file.fail(\n      new Error(\n        'Missing compiler for node of type `' + node.type + '`: `' + node + '`'\n      ),\n      node\n    )\n  }\n\n  return visitors[node.type].call(self, node, parent)\n}\n", "'use strict'\n\nmodule.exports = all\n\n// Visit all children of `parent`.\nfunction all(parent) {\n  var self = this\n  var children = parent.children\n  var length = children.length\n  var results = []\n  var index = -1\n\n  while (++index < length) {\n    results[index] = self.visit(children[index], parent)\n  }\n\n  return results\n}\n", "'use strict'\n\nmodule.exports = block\n\nvar lineFeed = '\\n'\n\nvar blank = lineFeed + lineFeed\nvar triple = blank + lineFeed\nvar comment = blank + '<!---->' + blank\n\n// Stringify a block node with block children (e.g., `root` or `blockquote`).\n// Knows about code following a list, or adjacent lists with similar bullets,\n// and places an extra line feed between them.\nfunction block(node) {\n  var self = this\n  var options = self.options\n  var fences = options.fences\n  var gap = options.commonmark ? comment : triple\n  var values = []\n  var children = node.children\n  var length = children.length\n  var index = -1\n  var prev\n  var child\n\n  while (++index < length) {\n    prev = child\n    child = children[index]\n\n    if (prev) {\n      // A list preceding another list that are equally ordered, or a\n      // list preceding an indented code block, need a gap between them,\n      // so as not to see them as one list, or content of the list,\n      // respectively.\n      //\n      // In commonmark, only something that breaks both up can do that,\n      // so we opt for an empty, invisible comment.  In other flavours,\n      // two blank lines are fine.\n      if (\n        prev.type === 'list' &&\n        ((child.type === 'list' && prev.ordered === child.ordered) ||\n          (child.type === 'code' && !child.lang && !fences))\n      ) {\n        values.push(gap)\n      } else {\n        values.push(blank)\n      }\n    }\n\n    values.push(self.visit(child, node))\n  }\n\n  return values.join('')\n}\n", "'use strict'\n\nmodule.exports = orderedItems\n\nvar lineFeed = '\\n'\nvar dot = '.'\n\nvar blank = lineFeed + lineFeed\n\n// Visit ordered list items.\n//\n// Starts the list with\n// `node.start` and increments each following list item\n// bullet by one:\n//\n//     2. foo\n//     3. bar\n//\n// In `incrementListMarker: false` mode, does not increment\n// each marker and stays on `node.start`:\n//\n//     1. foo\n//     1. bar\nfunction orderedItems(node) {\n  var self = this\n  var fn = self.visitors.listItem\n  var increment = self.options.incrementListMarker\n  var values = []\n  var start = node.start\n  var children = node.children\n  var length = children.length\n  var index = -1\n  var bullet\n\n  start = start == null ? 1 : start\n\n  while (++index < length) {\n    bullet = (increment ? start + index : start) + dot\n    values[index] = fn.call(self, children[index], node, index, bullet)\n  }\n\n  return values.join(node.spread ? blank : lineFeed)\n}\n", "'use strict'\n\nmodule.exports = unorderedItems\n\nvar lineFeed = '\\n'\n\nvar blank = lineFeed + lineFeed\n\n// Visit unordered list items.  Uses `options.bullet` as each item\u2019s bullet.\nfunction unorderedItems(node) {\n  var self = this\n  var bullet = self.options.bullet\n  var fn = self.visitors.listItem\n  var children = node.children\n  var length = children.length\n  var index = -1\n  var values = []\n\n  while (++index < length) {\n    values[index] = fn.call(self, children[index], node, index, bullet)\n  }\n\n  return values.join(node.spread ? blank : lineFeed)\n}\n", "'use strict'\n\nmodule.exports = root\n\nvar lineFeed = '\\n'\n\n// Stringify a root.\n// Adds a final newline to ensure valid POSIX files. */\nfunction root(node) {\n  var doc = this.block(node)\n\n  if (doc.charAt(doc.length - 1) !== lineFeed) {\n    doc += lineFeed\n  }\n\n  return doc\n}\n", "'use strict'\n\nmodule.exports = text\n\n// Stringify text.\n// Supports named entities in `settings.encode: true` mode:\n//\n// ```markdown\n// AT&amp;T\n// ```\n//\n// Supports numbered entities in `settings.encode: numbers` mode:\n//\n// ```markdown\n// AT&#x26;T\n// ```\nfunction text(node, parent) {\n  return this.encode(this.escape(node.value, node, parent), node)\n}\n", "'use strict'\n\nvar repeat = require('repeat-string')\n\nmodule.exports = heading\n\nvar lineFeed = '\\n'\nvar space = ' '\nvar numberSign = '#'\nvar dash = '-'\nvar equalsTo = '='\n\n// Stringify a heading.\n//\n// In `setext: true` mode and when `depth` is smaller than three, creates a\n// setext header:\n//\n// ```markdown\n// Foo\n// ===\n// ```\n//\n// Otherwise, an ATX header is generated:\n//\n// ```markdown\n// ### Foo\n// ```\n//\n// In `closeAtx: true` mode, the header is closed with hashes:\n//\n// ```markdown\n// ### Foo ###\n// ```\nfunction heading(node) {\n  var self = this\n  var depth = node.depth\n  var setext = self.options.setext\n  var closeAtx = self.options.closeAtx\n  var content = self.all(node).join('')\n  var prefix\n\n  if (setext && depth < 3) {\n    return (\n      content + lineFeed + repeat(depth === 1 ? equalsTo : dash, content.length)\n    )\n  }\n\n  prefix = repeat(numberSign, node.depth)\n\n  return prefix + space + content + (closeAtx ? space + prefix : '')\n}\n", "'use strict'\n\nmodule.exports = paragraph\n\nfunction paragraph(node) {\n  return this.all(node).join('')\n}\n", "'use strict'\n\nmodule.exports = blockquote\n\nvar lineFeed = '\\n'\nvar space = ' '\nvar greaterThan = '>'\n\nfunction blockquote(node) {\n  var values = this.block(node).split(lineFeed)\n  var result = []\n  var length = values.length\n  var index = -1\n  var value\n\n  while (++index < length) {\n    value = values[index]\n    result[index] = (value ? space : '') + value\n  }\n\n  return greaterThan + result.join(lineFeed + greaterThan)\n}\n", "'use strict'\n\nmodule.exports = list\n\nfunction list(node) {\n  var fn = node.ordered ? this.visitOrderedItems : this.visitUnorderedItems\n  return fn.call(this, node)\n}\n", "'use strict'\n\nvar repeat = require('repeat-string')\n\nmodule.exports = pad\n\nvar lineFeed = '\\n'\nvar space = ' '\n\nvar tabSize = 4\n\n// Pad `value` with `level * tabSize` spaces.  Respects lines.  Ignores empty\n// lines.\nfunction pad(value, level) {\n  var values = value.split(lineFeed)\n  var index = values.length\n  var padding = repeat(space, level * tabSize)\n\n  while (index--) {\n    if (values[index].length !== 0) {\n      values[index] = padding + values[index]\n    }\n  }\n\n  return values.join(lineFeed)\n}\n", "'use strict'\n\nvar repeat = require('repeat-string')\nvar pad = require('../util/pad')\n\nmodule.exports = listItem\n\nvar lineFeed = '\\n'\nvar space = ' '\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar lowercaseX = 'x'\n\nvar ceil = Math.ceil\nvar blank = lineFeed + lineFeed\n\nvar tabSize = 4\n\n// Stringify a list item.\n//\n// Prefixes the content with a checked checkbox when `checked: true`:\n//\n// ```markdown\n// [x] foo\n// ```\n//\n// Prefixes the content with an unchecked checkbox when `checked: false`:\n//\n// ```markdown\n// [ ] foo\n// ```\nfunction listItem(node, parent, position, bullet) {\n  var self = this\n  var style = self.options.listItemIndent\n  var marker = bullet || self.options.bullet\n  var spread = node.spread == null ? true : node.spread\n  var checked = node.checked\n  var children = node.children\n  var length = children.length\n  var values = []\n  var index = -1\n  var value\n  var indent\n  var spacing\n\n  while (++index < length) {\n    values[index] = self.visit(children[index], node)\n  }\n\n  value = values.join(spread ? blank : lineFeed)\n\n  if (typeof checked === 'boolean') {\n    // Note: I\u2019d like to be able to only add the space between the check and\n    // the value, but unfortunately github does not support empty list-items\n    // with a checkbox :(\n    value =\n      leftSquareBracket +\n      (checked ? lowercaseX : space) +\n      rightSquareBracket +\n      space +\n      value\n  }\n\n  if (style === '1' || (style === 'mixed' && value.indexOf(lineFeed) === -1)) {\n    indent = marker.length + 1\n    spacing = space\n  } else {\n    indent = ceil((marker.length + 1) / tabSize) * tabSize\n    spacing = repeat(space, indent - marker.length)\n  }\n\n  return value\n    ? marker + spacing + pad(value, indent / tabSize).slice(indent)\n    : marker\n}\n", "'use strict'\n\nmodule.exports = longestStreak\n\n// Get the count of the longest repeating streak of `character` in `value`.\nfunction longestStreak(value, character) {\n  var count = 0\n  var maximum = 0\n  var expected\n  var index\n\n  if (typeof character !== 'string' || character.length !== 1) {\n    throw new Error('Expected character')\n  }\n\n  value = String(value)\n  index = value.indexOf(character)\n  expected = index\n\n  while (index !== -1) {\n    count++\n\n    if (index === expected) {\n      if (count > maximum) {\n        maximum = count\n      }\n    } else {\n      count = 1\n    }\n\n    expected = index + 1\n    index = value.indexOf(character, expected)\n  }\n\n  return maximum\n}\n", "'use strict'\n\nvar streak = require('longest-streak')\nvar repeat = require('repeat-string')\n\nmodule.exports = inlineCode\n\nvar graveAccentChar = '`'\nvar lineFeed = 10 //  '\\n'\nvar space = 32 // ' '\nvar graveAccent = 96 //  '`'\n\n// Stringify inline code.\n//\n// Knows about internal ticks (`\\``), and ensures one more tick is used to\n// enclose the inline code:\n//\n// ````markdown\n// ```foo ``bar`` baz```\n// ````\n//\n// Even knows about inital and final ticks:\n//\n// ``markdown\n// `` `foo ``\n// `` foo` ``\n// ```\nfunction inlineCode(node) {\n  var value = node.value\n  var ticks = repeat(graveAccentChar, streak(value, graveAccentChar) + 1)\n  var start = ticks\n  var end = ticks\n  var head = value.charCodeAt(0)\n  var tail = value.charCodeAt(value.length - 1)\n  var wrap = false\n  var index\n  var length\n\n  if (head === graveAccent || tail === graveAccent) {\n    wrap = true\n  } else if (value.length > 2 && ws(head) && ws(tail)) {\n    index = 1\n    length = value.length - 1\n\n    while (++index < length) {\n      if (!ws(value.charCodeAt(index))) {\n        wrap = true\n        break\n      }\n    }\n  }\n\n  if (wrap) {\n    start += ' '\n    end = ' ' + end\n  }\n\n  return start + value + end\n}\n\nfunction ws(code) {\n  return code === lineFeed || code === space\n}\n", "'use strict'\n\nvar streak = require('longest-streak')\nvar repeat = require('repeat-string')\nvar pad = require('../util/pad')\n\nmodule.exports = code\n\nvar lineFeed = '\\n'\nvar space = ' '\nvar tilde = '~'\nvar graveAccent = '`'\n\n// Stringify code.\n// Creates indented code when:\n//\n// - No language tag exists\n// - Not in `fences: true` mode\n// - A non-empty value exists\n//\n// Otherwise, GFM fenced code is created:\n//\n// ````markdown\n// ```js\n// foo();\n// ```\n// ````\n//\n// When in ``fence: `~` `` mode, uses tildes as fences:\n//\n// ```markdown\n// ~~~js\n// foo();\n// ~~~\n// ```\n//\n// Knows about internal fences:\n//\n// `````markdown\n// ````markdown\n// ```javascript\n// foo();\n// ```\n// ````\n// `````\nfunction code(node, parent) {\n  var self = this\n  var value = node.value\n  var options = self.options\n  var marker = options.fence\n  var info = node.lang || ''\n  var fence\n\n  if (info && node.meta) {\n    info += space + node.meta\n  }\n\n  info = self.encode(self.escape(info, node))\n\n  // Without (needed) fences.\n  if (\n    !info &&\n    !options.fences &&\n    value &&\n    value.charAt(0) !== lineFeed &&\n    value.charAt(value.length - 1) !== lineFeed\n  ) {\n    // Throw when pedantic, in a list item which isn\u2019t compiled using a tab.\n    if (\n      parent &&\n      parent.type === 'listItem' &&\n      options.listItemIndent !== 'tab' &&\n      options.pedantic\n    ) {\n      self.file.fail(\n        'Cannot indent code properly. See https://git.io/fxKR8',\n        node.position\n      )\n    }\n\n    return pad(value, 1)\n  }\n\n  // Backticks in the info string don\u2019t work with backtick fenced code.\n  // Backticks (and tildes) are fine in tilde fenced code.\n  if (marker === graveAccent && info.indexOf(graveAccent) !== -1) {\n    marker = tilde\n  }\n\n  fence = repeat(marker, Math.max(streak(value, marker) + 1, 3))\n\n  return fence + info + lineFeed + value + lineFeed + fence\n}\n", "'use strict'\n\nmodule.exports = html\n\nfunction html(node) {\n  return node.value\n}\n", "'use strict'\n\nvar repeat = require('repeat-string')\n\nmodule.exports = thematic\n\nvar space = ' '\n\n// Stringify a `thematic-break`.\n// The character used is configurable through `rule`: (`'_'`):\n//\n// ```markdown\n// ___\n// ```\n//\n// The number of repititions is defined through `ruleRepetition` (`6`):\n//\n// ```markdown\n// ******\n// ```\n//\n// Whether spaces delimit each character, is configured through `ruleSpaces`\n// (`true`):\n// ```markdown\n// * * *\n// ```\nfunction thematic() {\n  var options = this.options\n  var rule = repeat(options.rule, options.ruleRepetition)\n  return options.ruleSpaces ? rule.split('').join(space) : rule\n}\n", "'use strict'\n\nvar repeat = require('repeat-string')\n\nmodule.exports = strong\n\n// Stringify a `strong`.\n//\n// The marker used is configurable by `strong`, which defaults to an asterisk\n// (`'*'`) but also accepts an underscore (`'_'`):\n//\n// ```markdown\n// __foo__\n// ```\nfunction strong(node) {\n  var marker = repeat(this.options.strong, 2)\n  return marker + this.all(node).join('') + marker\n}\n", "'use strict'\n\nmodule.exports = emphasis\n\nvar underscore = '_'\nvar asterisk = '*'\n\n// Stringify an `emphasis`.\n//\n// The marker used is configurable through `emphasis`, which defaults to an\n// underscore (`'_'`) but also accepts an asterisk (`'*'`):\n//\n// ```markdown\n// *foo*\n// ```\n//\n// In `pedantic` mode, text which itself contains an underscore will cause the\n// marker to default to an asterisk instead:\n//\n// ```markdown\n// *foo_bar*\n// ```\nfunction emphasis(node) {\n  var marker = this.options.emphasis\n  var content = this.all(node).join('')\n\n  // When in pedantic mode, prevent using underscore as the marker when there\n  // are underscores in the content.\n  if (\n    this.options.pedantic &&\n    marker === underscore &&\n    content.indexOf(marker) !== -1\n  ) {\n    marker = asterisk\n  }\n\n  return marker + content + marker\n}\n", "'use strict'\n\nmodule.exports = lineBreak\n\nvar backslash = '\\\\'\nvar lineFeed = '\\n'\nvar space = ' '\n\nvar commonmark = backslash + lineFeed\nvar normal = space + space + lineFeed\n\nfunction lineBreak() {\n  return this.options.commonmark ? commonmark : normal\n}\n", "'use strict'\n\nmodule.exports = strikethrough\n\nvar tilde = '~'\n\nvar fence = tilde + tilde\n\nfunction strikethrough(node) {\n  return fence + this.all(node).join('') + fence\n}\n", "'use strict'\n\nvar count = require('ccount')\n\nmodule.exports = enclose\n\nvar leftParenthesis = '('\nvar rightParenthesis = ')'\nvar lessThan = '<'\nvar greaterThan = '>'\n\nvar expression = /\\s/\n\n// Wrap `url` in angle brackets when needed, or when\n// forced.\n// In links, images, and definitions, the URL part needs\n// to be enclosed when it:\n//\n// - has a length of `0`\n// - contains white-space\n// - has more or less opening than closing parentheses\nfunction enclose(uri, always) {\n  if (\n    always ||\n    uri.length === 0 ||\n    expression.test(uri) ||\n    count(uri, leftParenthesis) !== count(uri, rightParenthesis)\n  ) {\n    return lessThan + uri + greaterThan\n  }\n\n  return uri\n}\n", "'use strict'\n\nmodule.exports = enclose\n\nvar quotationMark = '\"'\nvar apostrophe = \"'\"\n\n// There is currently no way to support nested delimiters across Markdown.pl,\n// CommonMark, and GitHub (RedCarpet).  The following code supports Markdown.pl\n// and GitHub.\n// CommonMark is not supported when mixing double- and single quotes inside a\n// title.\nfunction enclose(title) {\n  var delimiter =\n    title.indexOf(quotationMark) === -1 ? quotationMark : apostrophe\n  return delimiter + title + delimiter\n}\n", "'use strict'\n\nvar uri = require('../util/enclose-uri')\nvar title = require('../util/enclose-title')\n\nmodule.exports = link\n\nvar space = ' '\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar leftParenthesis = '('\nvar rightParenthesis = ')'\n\n// Expression for a protocol:\n// See <https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Generic_syntax>.\nvar protocol = /^[a-z][a-z+.-]+:\\/?/i\n\n// Stringify a link.\n//\n// When no title exists, the compiled `children` equal `url`, and `url` starts\n// with a protocol, an auto link is created:\n//\n// ```markdown\n// <http://example.com>\n// ```\n//\n// Otherwise, is smart about enclosing `url` (see `encloseURI()`) and `title`\n// (see `encloseTitle()`).\n// ```\n//\n// ```markdown\n// [foo](<foo at bar dot com> 'An \"example\" e-mail')\n// ```\n//\n// Supports named entities in the `url` and `title` when in `settings.encode`\n// mode.\nfunction link(node) {\n  var self = this\n  var content = self.encode(node.url || '', node)\n  var exit = self.enterLink()\n  var escaped = self.encode(self.escape(node.url || '', node))\n  var value = self.all(node).join('')\n\n  exit()\n\n  if (node.title == null && protocol.test(content) && escaped === value) {\n    // Backslash escapes do not work in autolinks, so we do not escape.\n    return uri(self.encode(node.url), true)\n  }\n\n  content = uri(content)\n\n  if (node.title) {\n    content += space + title(self.encode(self.escape(node.title, node), node))\n  }\n\n  return (\n    leftSquareBracket +\n    value +\n    rightSquareBracket +\n    leftParenthesis +\n    content +\n    rightParenthesis\n  )\n}\n", "'use strict'\n\nvar entityPrefixLength = require('./entity-prefix-length')\n\nmodule.exports = copy\n\nvar ampersand = '&'\n\nvar punctuationExppresion = /[-!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~_]/\n\n// For shortcut and collapsed reference links, the contents is also an\n// identifier, so we need to restore the original encoding and escaping\n// that were present in the source string.\n//\n// This function takes the unescaped & unencoded value from shortcut\u2019s\n// child nodes and the identifier and encodes the former according to\n// the latter.\nfunction copy(value, identifier) {\n  var length = value.length\n  var count = identifier.length\n  var result = []\n  var position = 0\n  var index = 0\n  var start\n\n  while (index < length) {\n    // Take next non-punctuation characters from `value`.\n    start = index\n\n    while (index < length && !punctuationExppresion.test(value.charAt(index))) {\n      index += 1\n    }\n\n    result.push(value.slice(start, index))\n\n    // Advance `position` to the next punctuation character.\n    while (\n      position < count &&\n      !punctuationExppresion.test(identifier.charAt(position))\n    ) {\n      position += 1\n    }\n\n    // Take next punctuation characters from `identifier`.\n    start = position\n\n    while (\n      position < count &&\n      punctuationExppresion.test(identifier.charAt(position))\n    ) {\n      if (identifier.charAt(position) === ampersand) {\n        position += entityPrefixLength(identifier.slice(position))\n      }\n\n      position += 1\n    }\n\n    result.push(identifier.slice(start, position))\n\n    // Advance `index` to the next non-punctuation character.\n    while (index < length && punctuationExppresion.test(value.charAt(index))) {\n      index += 1\n    }\n  }\n\n  return result.join('')\n}\n", "'use strict'\n\nmodule.exports = label\n\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\n\nvar shortcut = 'shortcut'\nvar collapsed = 'collapsed'\n\n// Stringify a reference label.\n// Because link references are easily, mistakingly, created (for example,\n// `[foo]`), reference nodes have an extra property depicting how it looked in\n// the original document, so stringification can cause minimal changes.\nfunction label(node) {\n  var type = node.referenceType\n\n  if (type === shortcut) {\n    return ''\n  }\n\n  return (\n    leftSquareBracket +\n    (type === collapsed ? '' : node.label || node.identifier) +\n    rightSquareBracket\n  )\n}\n", "'use strict'\n\nvar copy = require('../util/copy-identifier-encoding')\nvar label = require('../util/label')\n\nmodule.exports = linkReference\n\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\n\nvar shortcut = 'shortcut'\nvar collapsed = 'collapsed'\n\nfunction linkReference(node) {\n  var self = this\n  var type = node.referenceType\n  var exit = self.enterLinkReference(self, node)\n  var value = self.all(node).join('')\n\n  exit()\n\n  if (type === shortcut || type === collapsed) {\n    value = copy(value, node.label || node.identifier)\n  }\n\n  return leftSquareBracket + value + rightSquareBracket + label(node)\n}\n", "'use strict'\n\nvar label = require('../util/label')\n\nmodule.exports = imageReference\n\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar exclamationMark = '!'\n\nfunction imageReference(node) {\n  return (\n    exclamationMark +\n    leftSquareBracket +\n    (this.encode(node.alt, node) || '') +\n    rightSquareBracket +\n    label(node)\n  )\n}\n", "'use strict'\n\nvar uri = require('../util/enclose-uri')\nvar title = require('../util/enclose-title')\n\nmodule.exports = definition\n\nvar space = ' '\nvar colon = ':'\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\n\n// Stringify an URL definition.\n//\n// Is smart about enclosing `url` (see `encloseURI()`) and `title` (see\n// `encloseTitle()`).\n//\n// ```markdown\n// [foo]: <foo at bar dot com> 'An \"example\" e-mail'\n// ```\nfunction definition(node) {\n  var content = uri(node.url)\n\n  if (node.title) {\n    content += space + title(node.title)\n  }\n\n  return (\n    leftSquareBracket +\n    (node.label || node.identifier) +\n    rightSquareBracket +\n    colon +\n    space +\n    content\n  )\n}\n", "'use strict'\n\nvar uri = require('../util/enclose-uri')\nvar title = require('../util/enclose-title')\n\nmodule.exports = image\n\nvar space = ' '\nvar leftParenthesis = '('\nvar rightParenthesis = ')'\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar exclamationMark = '!'\n\n// Stringify an image.\n//\n// Is smart about enclosing `url` (see `encloseURI()`) and `title` (see\n// `encloseTitle()`).\n//\n// ```markdown\n// ![foo](</fav icon.png> 'My \"favourite\" icon')\n// ```\n//\n// Supports named entities in `url`, `alt`, and `title` when in\n// `settings.encode` mode.\nfunction image(node) {\n  var self = this\n  var content = uri(self.encode(node.url || '', node))\n  var exit = self.enterLink()\n  var alt = self.encode(self.escape(node.alt || '', node))\n\n  exit()\n\n  if (node.title) {\n    content += space + title(self.encode(node.title, node))\n  }\n\n  return (\n    exclamationMark +\n    leftSquareBracket +\n    alt +\n    rightSquareBracket +\n    leftParenthesis +\n    content +\n    rightParenthesis\n  )\n}\n", "'use strict'\n\nmodule.exports = footnote\n\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar caret = '^'\n\nfunction footnote(node) {\n  return (\n    leftSquareBracket + caret + this.all(node).join('') + rightSquareBracket\n  )\n}\n", "'use strict'\n\nmodule.exports = footnoteReference\n\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar caret = '^'\n\nfunction footnoteReference(node) {\n  return (\n    leftSquareBracket +\n    caret +\n    (node.label || node.identifier) +\n    rightSquareBracket\n  )\n}\n", "'use strict'\n\nvar repeat = require('repeat-string')\n\nvar lineFeed = '\\n'\nvar space = ' '\nvar colon = ':'\nvar leftSquareBracket = '['\nvar rightSquareBracket = ']'\nvar caret = '^'\n\nvar tabSize = 4\nvar blank = lineFeed + lineFeed\nvar indent = repeat(space, tabSize)\n\nmodule.exports = footnoteDefinition\n\nfunction footnoteDefinition(node) {\n  var content = this.all(node).join(blank + indent)\n\n  return (\n    leftSquareBracket +\n    caret +\n    (node.label || node.identifier) +\n    rightSquareBracket +\n    colon +\n    space +\n    content\n  )\n}\n", "'use strict'\n\nmodule.exports = markdownTable\n\nvar dotRe = /\\./\nvar lastDotRe = /\\.[^.]*$/\n\n// Characters.\nvar space = ' '\nvar lineFeed = '\\n'\nvar dash = '-'\nvar dot = '.'\nvar colon = ':'\nvar lowercaseC = 'c'\nvar lowercaseL = 'l'\nvar lowercaseR = 'r'\nvar verticalBar = '|'\n\nvar minCellSize = 3\n\n// Create a table from a matrix of strings.\nfunction markdownTable(table, options) {\n  var settings = options || {}\n  var delimiter = settings.delimiter\n  var start = settings.start\n  var end = settings.end\n  var alignment = settings.align\n  var calculateStringLength = settings.stringLength || lengthNoop\n  var cellCount = 0\n  var rowIndex = -1\n  var rowLength = table.length\n  var sizes = []\n  var align\n  var rule\n  var rows\n  var row\n  var cells\n  var index\n  var position\n  var size\n  var value\n  var spacing\n  var before\n  var after\n\n  alignment = alignment ? alignment.concat() : []\n\n  if (delimiter === null || delimiter === undefined) {\n    delimiter = space + verticalBar + space\n  }\n\n  if (start === null || start === undefined) {\n    start = verticalBar + space\n  }\n\n  if (end === null || end === undefined) {\n    end = space + verticalBar\n  }\n\n  while (++rowIndex < rowLength) {\n    row = table[rowIndex]\n\n    index = -1\n\n    if (row.length > cellCount) {\n      cellCount = row.length\n    }\n\n    while (++index < cellCount) {\n      position = row[index] ? dotindex(row[index]) : null\n\n      if (!sizes[index]) {\n        sizes[index] = minCellSize\n      }\n\n      if (position > sizes[index]) {\n        sizes[index] = position\n      }\n    }\n  }\n\n  if (typeof alignment === 'string') {\n    alignment = pad(cellCount, alignment).split('')\n  }\n\n  // Make sure only valid alignments are used.\n  index = -1\n\n  while (++index < cellCount) {\n    align = alignment[index]\n\n    if (typeof align === 'string') {\n      align = align.charAt(0).toLowerCase()\n    }\n\n    if (\n      align !== lowercaseL &&\n      align !== lowercaseR &&\n      align !== lowercaseC &&\n      align !== dot\n    ) {\n      align = ''\n    }\n\n    alignment[index] = align\n  }\n\n  rowIndex = -1\n  rows = []\n\n  while (++rowIndex < rowLength) {\n    row = table[rowIndex]\n\n    index = -1\n    cells = []\n\n    while (++index < cellCount) {\n      value = row[index]\n\n      value = stringify(value)\n\n      if (alignment[index] === dot) {\n        position = dotindex(value)\n\n        size =\n          sizes[index] +\n          (dotRe.test(value) ? 0 : 1) -\n          (calculateStringLength(value) - position)\n\n        cells[index] = value + pad(size - 1)\n      } else {\n        cells[index] = value\n      }\n    }\n\n    rows[rowIndex] = cells\n  }\n\n  sizes = []\n  rowIndex = -1\n\n  while (++rowIndex < rowLength) {\n    cells = rows[rowIndex]\n\n    index = -1\n\n    while (++index < cellCount) {\n      value = cells[index]\n\n      if (!sizes[index]) {\n        sizes[index] = minCellSize\n      }\n\n      size = calculateStringLength(value)\n\n      if (size > sizes[index]) {\n        sizes[index] = size\n      }\n    }\n  }\n\n  rowIndex = -1\n\n  while (++rowIndex < rowLength) {\n    cells = rows[rowIndex]\n\n    index = -1\n\n    if (settings.pad !== false) {\n      while (++index < cellCount) {\n        value = cells[index]\n\n        position = sizes[index] - (calculateStringLength(value) || 0)\n        spacing = pad(position)\n\n        if (alignment[index] === lowercaseR || alignment[index] === dot) {\n          value = spacing + value\n        } else if (alignment[index] === lowercaseC) {\n          position /= 2\n\n          if (position % 1 === 0) {\n            before = position\n            after = position\n          } else {\n            before = position + 0.5\n            after = position - 0.5\n          }\n\n          value = pad(before) + value + pad(after)\n        } else {\n          value += spacing\n        }\n\n        cells[index] = value\n      }\n    }\n\n    rows[rowIndex] = cells.join(delimiter)\n  }\n\n  if (settings.rule !== false) {\n    index = -1\n    rule = []\n\n    while (++index < cellCount) {\n      // When `pad` is false, make the rule the same size as the first row.\n      if (settings.pad === false) {\n        value = table[0][index]\n        spacing = calculateStringLength(stringify(value))\n        spacing = spacing > minCellSize ? spacing : minCellSize\n      } else {\n        spacing = sizes[index]\n      }\n\n      align = alignment[index]\n\n      // When `align` is left, don't add colons.\n      value = align === lowercaseR || align === '' ? dash : colon\n      value += pad(spacing - 2, dash)\n      value += align !== lowercaseL && align !== '' ? colon : dash\n\n      rule[index] = value\n    }\n\n    rows.splice(1, 0, rule.join(delimiter))\n  }\n\n  return start + rows.join(end + lineFeed + start) + end\n}\n\nfunction stringify(value) {\n  return value === null || value === undefined ? '' : String(value)\n}\n\n// Get the length of `value`.\nfunction lengthNoop(value) {\n  return String(value).length\n}\n\n// Get a string consisting of `length` `character`s.\nfunction pad(length, character) {\n  return new Array(length + 1).join(character || space)\n}\n\n// Get the position of the last dot in `value`.\nfunction dotindex(value) {\n  var match = lastDotRe.exec(value)\n\n  return match ? match.index + 1 : value.length\n}\n", "'use strict'\n\nvar markdownTable = require('markdown-table')\n\nmodule.exports = table\n\nvar space = ' '\nvar verticalBar = '|'\n\n// Stringify table.\n//\n// Creates a fenced table by default, but not in `looseTable: true` mode:\n//\n// ```markdown\n//  Foo | Bar\n// :-: | ---\n// Baz | Qux\n//\n// NOTE: Be careful with `looseTable: true` mode, as a loose table inside an\n// indented code block on GitHub renders as an actual table!\n//\n// Creates a spaced table by default, but not in `spacedTable: false`:\n//\n// ```markdown\n// |Foo|Bar|\n// |:-:|---|\n// |Baz|Qux|\n// ```\nfunction table(node) {\n  var self = this\n  var options = self.options\n  var loose = options.looseTable\n  var spaced = options.spacedTable\n  var pad = options.paddedTable\n  var stringLength = options.stringLength\n  var rows = node.children\n  var index = rows.length\n  var exit = self.enterTable()\n  var result = []\n  var start\n  var end\n\n  while (index--) {\n    result[index] = self.all(rows[index])\n  }\n\n  exit()\n\n  if (loose) {\n    start = ''\n    end = ''\n  } else if (spaced) {\n    start = verticalBar + space\n    end = space + verticalBar\n  } else {\n    start = verticalBar\n    end = verticalBar\n  }\n\n  return markdownTable(result, {\n    align: node.align,\n    pad: pad,\n    start: start,\n    end: end,\n    stringLength: stringLength,\n    delimiter: spaced ? space + verticalBar + space : verticalBar\n  })\n}\n", "'use strict'\n\nmodule.exports = tableCell\n\nvar lineFeed = /\\r?\\n/g\n\nfunction tableCell(node) {\n  return this.all(node)\n    .join('')\n    .replace(lineFeed, ' ')\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar toggle = require('state-toggle')\n\nmodule.exports = Compiler\n\n// Construct a new compiler.\nfunction Compiler(tree, file) {\n  this.inLink = false\n  this.inTable = false\n  this.tree = tree\n  this.file = file\n  this.options = xtend(this.options)\n  this.setOptions({})\n}\n\nvar proto = Compiler.prototype\n\n// Enter and exit helpers. */\nproto.enterLink = toggle('inLink', false)\nproto.enterTable = toggle('inTable', false)\nproto.enterLinkReference = require('./util/enter-link-reference')\n\n// Configuration.\nproto.options = require('./defaults')\nproto.setOptions = require('./set-options')\n\nproto.compile = require('./macro/compile')\nproto.visit = require('./macro/one')\nproto.all = require('./macro/all')\nproto.block = require('./macro/block')\nproto.visitOrderedItems = require('./macro/ordered-items')\nproto.visitUnorderedItems = require('./macro/unordered-items')\n\n// Expose visitors.\nproto.visitors = {\n  root: require('./visitors/root'),\n  text: require('./visitors/text'),\n  heading: require('./visitors/heading'),\n  paragraph: require('./visitors/paragraph'),\n  blockquote: require('./visitors/blockquote'),\n  list: require('./visitors/list'),\n  listItem: require('./visitors/list-item'),\n  inlineCode: require('./visitors/inline-code'),\n  code: require('./visitors/code'),\n  html: require('./visitors/html'),\n  thematicBreak: require('./visitors/thematic-break'),\n  strong: require('./visitors/strong'),\n  emphasis: require('./visitors/emphasis'),\n  break: require('./visitors/break'),\n  delete: require('./visitors/delete'),\n  link: require('./visitors/link'),\n  linkReference: require('./visitors/link-reference'),\n  imageReference: require('./visitors/image-reference'),\n  definition: require('./visitors/definition'),\n  image: require('./visitors/image'),\n  footnote: require('./visitors/footnote'),\n  footnoteReference: require('./visitors/footnote-reference'),\n  footnoteDefinition: require('./visitors/footnote-definition'),\n  table: require('./visitors/table'),\n  tableCell: require('./visitors/table-cell')\n}\n", "'use strict'\n\nvar unherit = require('unherit')\nvar xtend = require('xtend')\nvar Compiler = require('./lib/compiler.js')\n\nmodule.exports = stringify\nstringify.Compiler = Compiler\n\nfunction stringify(options) {\n  var Local = unherit(Compiler)\n  Local.prototype.options = xtend(\n    Local.prototype.options,\n    this.data('settings'),\n    options\n  )\n  this.Compiler = Local\n}\n", "'use strict'\n\nvar unified = require('unified')\nvar parse = require('remark-parse')\nvar stringify = require('remark-stringify')\n\nmodule.exports = unified()\n  .use(parse)\n  .use(stringify)\n  .freeze()\n", "'use strict'\n\nexports.parse = parse\nexports.stringify = stringify\n\nvar empty = ''\nvar space = ' '\nvar whiteSpace = /[ \\t\\n\\r\\f]+/g\n\nfunction parse(value) {\n  var input = String(value || empty).trim()\n  return input === empty ? [] : input.split(whiteSpace)\n}\n\nfunction stringify(values) {\n  return values.join(space).trim()\n}\n", "\"use strict\";\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar spaceSeparated = require('space-separated-tokens');\n\nfunction escapeRegExp(str) {\n  return str.replace(new RegExp(\"[-[\\\\]{}()*+?.\\\\\\\\^$|/]\", 'g'), '\\\\$&');\n}\n\nvar C_NEWLINE = '\\n';\nvar C_FENCE = '|';\n\nfunction compilerFactory(nodeType) {\n  var text;\n  var title;\n  return {\n    blockHeading: function blockHeading(node) {\n      title = this.all(node).join('');\n      return '';\n    },\n    blockBody: function blockBody(node) {\n      text = this.all(node).map(function (s) {\n        return s.replace(/\\n/g, '\\n| ');\n      }).join('\\n|\\n| ');\n      return text;\n    },\n    block: function block(node) {\n      text = '';\n      title = '';\n      this.all(node);\n\n      if (title) {\n        return \"[[\".concat(nodeType, \" | \").concat(title, \"]]\\n| \").concat(text);\n      } else {\n        return \"[[\".concat(nodeType, \"]]\\n| \").concat(text);\n      }\n    }\n  };\n}\n\nmodule.exports = function blockPlugin() {\n  var availableBlocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var pattern = Object.keys(availableBlocks).map(escapeRegExp).join('|');\n\n  if (!pattern) {\n    throw new Error('remark-custom-blocks needs to be passed a configuration object as option');\n  }\n\n  var regex = new RegExp(\"\\\\[\\\\[(\".concat(pattern, \")(?: *\\\\| *(.*))?\\\\]\\\\]\\n\"));\n\n  function blockTokenizer(eat, value, silent) {\n    var now = eat.now();\n    var keep = regex.exec(value);\n    if (!keep) return;\n    if (keep.index !== 0) return;\n\n    var _keep = _slicedToArray(keep, 3),\n        eaten = _keep[0],\n        blockType = _keep[1],\n        blockTitle = _keep[2];\n    /* istanbul ignore if - never used (yet) */\n\n\n    if (silent) return true;\n    var linesToEat = [];\n    var content = [];\n    var idx = 0;\n\n    while ((idx = value.indexOf(C_NEWLINE)) !== -1) {\n      var next = value.indexOf(C_NEWLINE, idx + 1); // either slice until next NEWLINE or slice until end of string\n\n      var lineToEat = next !== -1 ? value.slice(idx + 1, next) : value.slice(idx + 1);\n      if (lineToEat[0] !== C_FENCE) break; // remove leading `FENCE ` or leading `FENCE`\n\n      var line = lineToEat.slice(lineToEat.startsWith(\"\".concat(C_FENCE, \" \")) ? 2 : 1);\n      linesToEat.push(lineToEat);\n      content.push(line);\n      value = value.slice(idx + 1);\n    }\n\n    var contentString = content.join(C_NEWLINE);\n    var stringToEat = eaten + linesToEat.join(C_NEWLINE);\n    var potentialBlock = availableBlocks[blockType];\n    var titleAllowed = potentialBlock.title && ['optional', 'required'].includes(potentialBlock.title);\n    var titleRequired = potentialBlock.title && potentialBlock.title === 'required';\n    if (titleRequired && !blockTitle) return;\n    if (!titleAllowed && blockTitle) return;\n    var add = eat(stringToEat);\n\n    if (potentialBlock.details) {\n      potentialBlock.containerElement = 'details';\n      potentialBlock.titleElement = 'summary';\n    }\n\n    var exit = this.enterBlock();\n    var contents = {\n      type: \"\".concat(blockType, \"CustomBlockBody\"),\n      data: {\n        hName: potentialBlock.contentsElement ? potentialBlock.contentsElement : 'div',\n        hProperties: {\n          className: 'custom-block-body'\n        }\n      },\n      children: this.tokenizeBlock(contentString, now)\n    };\n    exit();\n    var blockChildren = [contents];\n\n    if (titleAllowed && blockTitle) {\n      var titleElement = potentialBlock.titleElement ? potentialBlock.titleElement : 'div';\n      var titleNode = {\n        type: \"\".concat(blockType, \"CustomBlockHeading\"),\n        data: {\n          hName: titleElement,\n          hProperties: {\n            className: 'custom-block-heading'\n          }\n        },\n        children: this.tokenizeInline(blockTitle, now)\n      };\n      blockChildren.unshift(titleNode);\n    }\n\n    var classList = spaceSeparated.parse(potentialBlock.classes || '');\n    return add({\n      type: \"\".concat(blockType, \"CustomBlock\"),\n      children: blockChildren,\n      data: {\n        hName: potentialBlock.containerElement ? potentialBlock.containerElement : 'div',\n        hProperties: {\n          className: ['custom-block'].concat(_toConsumableArray(classList))\n        }\n      }\n    });\n  }\n\n  var Parser = this.Parser; // Inject blockTokenizer\n\n  var blockTokenizers = Parser.prototype.blockTokenizers;\n  var blockMethods = Parser.prototype.blockMethods;\n  blockTokenizers.customBlocks = blockTokenizer;\n  blockMethods.splice(blockMethods.indexOf('fencedCode') + 1, 0, 'customBlocks');\n  var Compiler = this.Compiler;\n\n  if (Compiler) {\n    var visitors = Compiler.prototype.visitors;\n    if (!visitors) return;\n    Object.keys(availableBlocks).forEach(function (key) {\n      var compiler = compilerFactory(key);\n      visitors[\"\".concat(key, \"CustomBlock\")] = compiler.block;\n      visitors[\"\".concat(key, \"CustomBlockHeading\")] = compiler.blockHeading;\n      visitors[\"\".concat(key, \"CustomBlockBody\")] = compiler.blockBody;\n    });\n  } // Inject into interrupt rules\n\n\n  var interruptParagraph = Parser.prototype.interruptParagraph;\n  var interruptList = Parser.prototype.interruptList;\n  var interruptBlockquote = Parser.prototype.interruptBlockquote;\n  interruptParagraph.splice(interruptParagraph.indexOf('fencedCode') + 1, 0, ['customBlocks']);\n  interruptList.splice(interruptList.indexOf('fencedCode') + 1, 0, ['customBlocks']);\n  interruptBlockquote.splice(interruptBlockquote.indexOf('fencedCode') + 1, 0, ['customBlocks']);\n};", "'use strict'\n\nmodule.exports = u\n\nfunction u(type, props, value) {\n  var node\n\n  if (\n    (value === null || value === undefined) &&\n    (typeof props !== 'object' || Array.isArray(props))\n  ) {\n    value = props\n    props = {}\n  }\n\n  node = Object.assign({type: String(type)}, props)\n\n  if (Array.isArray(value)) {\n    node.children = value\n  } else if (value !== null && value !== undefined) {\n    node.value = String(value)\n  }\n\n  return node\n}\n", "'use strict'\n\nmodule.exports = generated\n\nfunction generated(node) {\n  var position = optional(optional(node).position)\n  var start = optional(position.start)\n  var end = optional(position.end)\n\n  return !start.line || !start.column || !end.line || !end.column\n}\n\nfunction optional(value) {\n  return value && typeof value === 'object' ? value : {}\n}\n", "'use strict'\n\nvar visit = require('unist-util-visit')\n\nmodule.exports = getDefinitionFactory\n\nvar own = {}.hasOwnProperty\n\n// Get a definition in `node` by `identifier`.\nfunction getDefinitionFactory(node, options) {\n  return getterFactory(gather(node, options))\n}\n\n// Gather all definitions in `node`\nfunction gather(node, options) {\n  var cache = {}\n\n  if (!node || !node.type) {\n    throw new Error('mdast-util-definitions expected node')\n  }\n\n  visit(node, 'definition', options && options.commonmark ? commonmark : normal)\n\n  return cache\n\n  function commonmark(definition) {\n    var id = normalise(definition.identifier)\n    if (!own.call(cache, id)) {\n      cache[id] = definition\n    }\n  }\n\n  function normal(definition) {\n    cache[normalise(definition.identifier)] = definition\n  }\n}\n\n// Factory to get a node from the given definition-cache.\nfunction getterFactory(cache) {\n  return getter\n\n  // Get a node from the bound definition-cache.\n  function getter(identifier) {\n    var id = identifier && normalise(identifier)\n    return id && own.call(cache, id) ? cache[id] : null\n  }\n}\n\nfunction normalise(identifier) {\n  return identifier.toUpperCase()\n}\n", "'use strict'\n\nmodule.exports = all\n\nvar one = require('./one')\n\nfunction all(h, parent) {\n  var nodes = parent.children || []\n  var length = nodes.length\n  var values = []\n  var index = -1\n  var result\n  var head\n\n  while (++index < length) {\n    result = one(h, nodes[index], parent)\n\n    if (result) {\n      if (index && nodes[index - 1].type === 'break') {\n        if (result.value) {\n          result.value = result.value.replace(/^\\s+/, '')\n        }\n\n        head = result.children && result.children[0]\n\n        if (head && head.value) {\n          head.value = head.value.replace(/^\\s+/, '')\n        }\n      }\n\n      values = values.concat(result)\n    }\n  }\n\n  return values\n}\n", "'use strict'\n\nmodule.exports = one\n\nvar u = require('unist-builder')\nvar all = require('./all')\n\nvar own = {}.hasOwnProperty\n\n// Transform an unknown node.\nfunction unknown(h, node) {\n  if (text(node)) {\n    return h.augment(node, u('text', node.value))\n  }\n\n  return h(node, 'div', all(h, node))\n}\n\n// Visit a node.\nfunction one(h, node, parent) {\n  var type = node && node.type\n  var fn = own.call(h.handlers, type) ? h.handlers[type] : h.unknownHandler\n\n  // Fail on non-nodes.\n  if (!type) {\n    throw new Error('Expected node, got `' + node + '`')\n  }\n\n  return (typeof fn === 'function' ? fn : unknown)(h, node, parent)\n}\n\n// Check if the node should be renderered as a text node.\nfunction text(node) {\n  var data = node.data || {}\n\n  if (\n    own.call(data, 'hName') ||\n    own.call(data, 'hProperties') ||\n    own.call(data, 'hChildren')\n  ) {\n    return false\n  }\n\n  return 'value' in node\n}\n", "'use strict'\n\nmodule.exports = thematicBreak\n\nfunction thematicBreak(h, node) {\n  return h(node, 'hr')\n}\n", "'use strict'\n\nmodule.exports = wrap\n\nvar u = require('unist-builder')\n\n// Wrap `nodes` with line feeds between each entry.\n// Optionally adds line feeds at the start and end.\nfunction wrap(nodes, loose) {\n  var result = []\n  var index = -1\n  var length = nodes.length\n\n  if (loose) {\n    result.push(u('text', '\\n'))\n  }\n\n  while (++index < length) {\n    if (index) {\n      result.push(u('text', '\\n'))\n    }\n\n    result.push(nodes[index])\n  }\n\n  if (loose && nodes.length !== 0) {\n    result.push(u('text', '\\n'))\n  }\n\n  return result\n}\n", "'use strict'\n\nmodule.exports = list\n\nvar wrap = require('../wrap')\nvar all = require('../all')\n\nfunction list(h, node) {\n  var props = {}\n  var name = node.ordered ? 'ol' : 'ul'\n  var items\n  var index = -1\n  var length\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    props.start = node.start\n  }\n\n  items = all(h, node)\n  length = items.length\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < length) {\n    if (\n      items[index].properties.className &&\n      items[index].properties.className.indexOf('task-list-item') !== -1\n    ) {\n      props.className = ['contains-task-list']\n      break\n    }\n  }\n\n  return h(node, name, props, wrap(items, true))\n}\n", "'use strict'\n\nmodule.exports = generateFootnotes\n\nvar thematicBreak = require('./handlers/thematic-break')\nvar list = require('./handlers/list')\nvar wrap = require('./wrap')\n\nfunction generateFootnotes(h) {\n  var footnoteById = h.footnoteById\n  var footnoteOrder = h.footnoteOrder\n  var length = footnoteOrder.length\n  var index = -1\n  var listItems = []\n  var def\n  var backReference\n  var content\n  var tail\n\n  while (++index < length) {\n    def = footnoteById[footnoteOrder[index].toUpperCase()]\n\n    if (!def) {\n      continue\n    }\n\n    content = def.children.concat()\n    tail = content[content.length - 1]\n    backReference = {\n      type: 'link',\n      url: '#fnref-' + def.identifier,\n      data: {hProperties: {className: ['footnote-backref']}},\n      children: [{type: 'text', value: '\u21A9'}]\n    }\n\n    if (!tail || tail.type !== 'paragraph') {\n      tail = {type: 'paragraph', children: []}\n      content.push(tail)\n    }\n\n    tail.children.push(backReference)\n\n    listItems.push({\n      type: 'listItem',\n      data: {hProperties: {id: 'fn-' + def.identifier}},\n      children: content,\n      position: def.position\n    })\n  }\n\n  if (listItems.length === 0) {\n    return null\n  }\n\n  return h(\n    null,\n    'div',\n    {className: ['footnotes']},\n    wrap(\n      [\n        thematicBreak(h),\n        list(h, {type: 'list', ordered: true, children: listItems})\n      ],\n      true\n    )\n  )\n}\n", "'use strict'\n\nmodule.exports = blockquote\n\nvar wrap = require('../wrap')\nvar all = require('../all')\n\nfunction blockquote(h, node) {\n  return h(node, 'blockquote', wrap(all(h, node), true))\n}\n", "'use strict'\n\nmodule.exports = hardBreak\n\nvar u = require('unist-builder')\n\nfunction hardBreak(h, node) {\n  return [h(node, 'br'), u('text', '\\n')]\n}\n", "'use strict'\n\nmodule.exports = detab\n\nvar repeat = require('repeat-string')\n\nvar tab = 0x09\nvar lineFeed = 0x0a\nvar carriageReturn = 0x0d\n\n// Replace tabs with spaces, being smart about which column the tab is at and\n// which size should be used.\nfunction detab(value, size) {\n  var string = typeof value === 'string'\n  var length = string && value.length\n  var start = 0\n  var index = -1\n  var column = -1\n  var tabSize = size || 4\n  var results = []\n  var code\n  var add\n\n  if (!string) {\n    throw new Error('detab expected string')\n  }\n\n  while (++index < length) {\n    code = value.charCodeAt(index)\n\n    if (code === tab) {\n      add = tabSize - ((column + 1) % tabSize)\n      column += add\n      results.push(value.slice(start, index) + repeat(' ', add))\n      start = index + 1\n    } else if (code === lineFeed || code === carriageReturn) {\n      column = -1\n    } else {\n      column++\n    }\n  }\n\n  results.push(value.slice(start))\n\n  return results.join('')\n}\n", "'use strict'\n\nmodule.exports = code\n\nvar detab = require('detab')\nvar u = require('unist-builder')\n\nfunction code(h, node) {\n  var value = node.value ? detab(node.value + '\\n') : ''\n  var lang = node.lang && node.lang.match(/^[^ \\t]+(?=[ \\t]|$)/)\n  var props = {}\n\n  if (lang) {\n    props.className = ['language-' + lang]\n  }\n\n  return h(node.position, 'pre', [h(node, 'code', props, [u('text', value)])])\n}\n", "'use strict'\n\nmodule.exports = strikethrough\n\nvar all = require('../all')\n\nfunction strikethrough(h, node) {\n  return h(node, 'del', all(h, node))\n}\n", "'use strict'\n\nmodule.exports = emphasis\n\nvar all = require('../all')\n\nfunction emphasis(h, node) {\n  return h(node, 'em', all(h, node))\n}\n", "'use strict'\n\nmodule.exports = footnoteReference\n\nvar u = require('unist-builder')\n\nfunction footnoteReference(h, node) {\n  var footnoteOrder = h.footnoteOrder\n  var identifier = String(node.identifier)\n\n  if (footnoteOrder.indexOf(identifier) === -1) {\n    footnoteOrder.push(identifier)\n  }\n\n  return h(node.position, 'sup', {id: 'fnref-' + identifier}, [\n    h(node, 'a', {href: '#fn-' + identifier, className: ['footnote-ref']}, [\n      u('text', node.label || identifier)\n    ])\n  ])\n}\n", "'use strict'\n\nmodule.exports = footnote\n\nvar footnoteReference = require('./footnote-reference')\n\nfunction footnote(h, node) {\n  var footnoteById = h.footnoteById\n  var footnoteOrder = h.footnoteOrder\n  var identifier = 1\n\n  while (identifier in footnoteById) {\n    identifier++\n  }\n\n  identifier = String(identifier)\n\n  // No need to check if `identifier` exists in `footnoteOrder`, it\u2019s guaranteed\n  // to not exist because we just generated it.\n  footnoteOrder.push(identifier)\n\n  footnoteById[identifier] = {\n    type: 'footnoteDefinition',\n    identifier: identifier,\n    children: [{type: 'paragraph', children: node.children}],\n    position: node.position\n  }\n\n  return footnoteReference(h, {\n    type: 'footnoteReference',\n    identifier: identifier,\n    position: node.position\n  })\n}\n", "'use strict'\n\nmodule.exports = heading\n\nvar all = require('../all')\n\nfunction heading(h, node) {\n  return h(node, 'h' + node.depth, all(h, node))\n}\n", "'use strict'\n\nmodule.exports = html\n\nvar u = require('unist-builder')\n\n// Return either a `raw` node in dangerous mode, otherwise nothing.\nfunction html(h, node) {\n  return h.dangerous ? h.augment(node, u('raw', node.value)) : null\n}\n", "\n'use strict';\n\n\nvar encodeCache = {};\n\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache(exclude) {\n  var i, ch, cache = encodeCache[exclude];\n  if (cache) { return cache; }\n\n  cache = encodeCache[exclude] = [];\n\n  for (i = 0; i < 128; i++) {\n    ch = String.fromCharCode(i);\n\n    if (/^[0-9a-z]$/i.test(ch)) {\n      // always allow unencoded alphanumeric characters\n      cache.push(ch);\n    } else {\n      cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n    }\n  }\n\n  for (i = 0; i < exclude.length; i++) {\n    cache[exclude.charCodeAt(i)] = exclude[i];\n  }\n\n  return cache;\n}\n\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n//  - string       - string to encode\n//  - exclude      - list of characters to ignore (in addition to a-zA-Z0-9)\n//  - keepEscaped  - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode(string, exclude, keepEscaped) {\n  var i, l, code, nextCode, cache,\n      result = '';\n\n  if (typeof exclude !== 'string') {\n    // encode(string, keepEscaped)\n    keepEscaped  = exclude;\n    exclude = encode.defaultChars;\n  }\n\n  if (typeof keepEscaped === 'undefined') {\n    keepEscaped = true;\n  }\n\n  cache = getEncodeCache(exclude);\n\n  for (i = 0, l = string.length; i < l; i++) {\n    code = string.charCodeAt(i);\n\n    if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n      if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n        result += string.slice(i, i + 3);\n        i += 2;\n        continue;\n      }\n    }\n\n    if (code < 128) {\n      result += cache[code];\n      continue;\n    }\n\n    if (code >= 0xD800 && code <= 0xDFFF) {\n      if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n        nextCode = string.charCodeAt(i + 1);\n        if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n          result += encodeURIComponent(string[i] + string[i + 1]);\n          i++;\n          continue;\n        }\n      }\n      result += '%EF%BF%BD';\n      continue;\n    }\n\n    result += encodeURIComponent(string[i]);\n  }\n\n  return result;\n}\n\nencode.defaultChars   = \";/?:@&=+$,-_.!~*'()#\";\nencode.componentChars = \"-_.!~*'()\";\n\n\nmodule.exports = encode;\n", "'use strict'\n\nmodule.exports = revert\n\nvar u = require('unist-builder')\nvar all = require('./all')\n\n// Return the content of a reference without definition as Markdown.\nfunction revert(h, node) {\n  var subtype = node.referenceType\n  var suffix = ']'\n  var contents\n  var head\n  var tail\n\n  if (subtype === 'collapsed') {\n    suffix += '[]'\n  } else if (subtype === 'full') {\n    suffix += '[' + (node.label || node.identifier) + ']'\n  }\n\n  if (node.type === 'imageReference') {\n    return u('text', '![' + node.alt + suffix)\n  }\n\n  contents = all(h, node)\n  head = contents[0]\n\n  if (head && head.type === 'text') {\n    head.value = '[' + head.value\n  } else {\n    contents.unshift(u('text', '['))\n  }\n\n  tail = contents[contents.length - 1]\n\n  if (tail && tail.type === 'text') {\n    tail.value += suffix\n  } else {\n    contents.push(u('text', suffix))\n  }\n\n  return contents\n}\n", "'use strict'\n\nmodule.exports = imageReference\n\nvar normalize = require('mdurl/encode')\nvar revert = require('../revert')\n\nfunction imageReference(h, node) {\n  var def = h.definition(node.identifier)\n  var props\n\n  if (!def) {\n    return revert(h, node)\n  }\n\n  props = {src: normalize(def.url || ''), alt: node.alt}\n\n  if (def.title !== null && def.title !== undefined) {\n    props.title = def.title\n  }\n\n  return h(node, 'img', props)\n}\n", "'use strict'\n\nvar normalize = require('mdurl/encode')\n\nmodule.exports = image\n\nfunction image(h, node) {\n  var props = {src: normalize(node.url), alt: node.alt}\n\n  if (node.title !== null && node.title !== undefined) {\n    props.title = node.title\n  }\n\n  return h(node, 'img', props)\n}\n", "'use strict'\n\nmodule.exports = collapse\n\n// `collapse(' \\t\\nbar \\nbaz\\t') // ' bar baz '`\nfunction collapse(value) {\n  return String(value).replace(/\\s+/g, ' ')\n}\n", "'use strict'\n\nmodule.exports = inlineCode\n\nvar collapse = require('collapse-white-space')\nvar u = require('unist-builder')\n\nfunction inlineCode(h, node) {\n  return h(node, 'code', [u('text', collapse(node.value))])\n}\n", "'use strict'\n\nmodule.exports = linkReference\n\nvar normalize = require('mdurl/encode')\nvar revert = require('../revert')\nvar all = require('../all')\n\nfunction linkReference(h, node) {\n  var def = h.definition(node.identifier)\n  var props\n\n  if (!def) {\n    return revert(h, node)\n  }\n\n  props = {href: normalize(def.url || '')}\n\n  if (def.title !== null && def.title !== undefined) {\n    props.title = def.title\n  }\n\n  return h(node, 'a', props, all(h, node))\n}\n", "'use strict'\n\nvar normalize = require('mdurl/encode')\nvar all = require('../all')\n\nmodule.exports = link\n\nfunction link(h, node) {\n  var props = {href: normalize(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    props.title = node.title\n  }\n\n  return h(node, 'a', props, all(h, node))\n}\n", "'use strict'\n\nmodule.exports = listItem\n\nvar u = require('unist-builder')\nvar wrap = require('../wrap')\nvar all = require('../all')\n\nfunction listItem(h, node, parent) {\n  var children = node.children\n  var head = children[0]\n  var raw = all(h, node)\n  var loose = parent ? listLoose(parent) : listItemLoose(node)\n  var props = {}\n  var result\n  var container\n  var index\n  var length\n  var child\n\n  // Tight lists should not render `paragraph` nodes as `p` elements.\n  if (loose) {\n    result = raw\n  } else {\n    result = []\n    length = raw.length\n    index = -1\n\n    while (++index < length) {\n      child = raw[index]\n\n      if (child.tagName === 'p') {\n        result = result.concat(child.children)\n      } else {\n        result.push(child)\n      }\n    }\n  }\n\n  if (typeof node.checked === 'boolean') {\n    if (loose && (!head || head.type !== 'paragraph')) {\n      result.unshift(h(null, 'p', []))\n    }\n\n    container = loose ? result[0].children : result\n\n    if (container.length !== 0) {\n      container.unshift(u('text', ' '))\n    }\n\n    container.unshift(\n      h(null, 'input', {\n        type: 'checkbox',\n        checked: node.checked,\n        disabled: true\n      })\n    )\n\n    // According to github-markdown-css, this class hides bullet.\n    // See: <https://github.com/sindresorhus/github-markdown-css>.\n    props.className = ['task-list-item']\n  }\n\n  if (loose && result.length !== 0) {\n    result = wrap(result, true)\n  }\n\n  return h(node, 'li', props, result)\n}\n\nfunction listLoose(node) {\n  var loose = node.spread\n  var children = node.children\n  var length = children.length\n  var index = -1\n\n  while (!loose && ++index < length) {\n    loose = listItemLoose(children[index])\n  }\n\n  return loose\n}\n\nfunction listItemLoose(node) {\n  var spread = node.spread\n\n  return spread === undefined || spread === null\n    ? node.children.length > 1\n    : spread\n}\n", "'use strict'\n\nmodule.exports = paragraph\n\nvar all = require('../all')\n\nfunction paragraph(h, node) {\n  return h(node, 'p', all(h, node))\n}\n", "'use strict'\n\nmodule.exports = root\n\nvar u = require('unist-builder')\nvar wrap = require('../wrap')\nvar all = require('../all')\n\nfunction root(h, node) {\n  return h.augment(node, u('root', wrap(all(h, node))))\n}\n", "'use strict'\n\nmodule.exports = strong\n\nvar all = require('../all')\n\nfunction strong(h, node) {\n  return h(node, 'strong', all(h, node))\n}\n", "'use strict'\n\nmodule.exports = table\n\nvar position = require('unist-util-position')\nvar wrap = require('../wrap')\nvar all = require('../all')\n\nfunction table(h, node) {\n  var rows = node.children\n  var index = rows.length\n  var align = node.align\n  var alignLength = align.length\n  var result = []\n  var pos\n  var row\n  var out\n  var name\n  var cell\n\n  while (index--) {\n    row = rows[index].children\n    name = index === 0 ? 'th' : 'td'\n    pos = alignLength\n    out = []\n\n    while (pos--) {\n      cell = row[pos]\n      out[pos] = h(cell, name, {align: align[pos]}, cell ? all(h, cell) : [])\n    }\n\n    result[index] = h(rows[index], 'tr', wrap(out, true))\n  }\n\n  return h(\n    node,\n    'table',\n    wrap(\n      [\n        h(result[0].position, 'thead', wrap([result[0]], true)),\n        h(\n          {\n            start: position.start(result[1]),\n            end: position.end(result[result.length - 1])\n          },\n          'tbody',\n          wrap(result.slice(1), true)\n        )\n      ],\n      true\n    )\n  )\n}\n", "'use strict'\n\nmodule.exports = trimLines\n\nvar ws = /[ \\t]*\\n+[ \\t]*/g\nvar newline = '\\n'\n\nfunction trimLines(value) {\n  return String(value).replace(ws, newline)\n}\n", "'use strict'\n\nmodule.exports = text\n\nvar u = require('unist-builder')\nvar trimLines = require('trim-lines')\n\nfunction text(h, node) {\n  return h.augment(node, u('text', trimLines(node.value)))\n}\n", "'use strict'\n\nmodule.exports = {\n  blockquote: require('./blockquote'),\n  break: require('./break'),\n  code: require('./code'),\n  delete: require('./delete'),\n  emphasis: require('./emphasis'),\n  footnoteReference: require('./footnote-reference'),\n  footnote: require('./footnote'),\n  heading: require('./heading'),\n  html: require('./html'),\n  imageReference: require('./image-reference'),\n  image: require('./image'),\n  inlineCode: require('./inline-code'),\n  linkReference: require('./link-reference'),\n  link: require('./link'),\n  listItem: require('./list-item'),\n  list: require('./list'),\n  paragraph: require('./paragraph'),\n  root: require('./root'),\n  strong: require('./strong'),\n  table: require('./table'),\n  text: require('./text'),\n  thematicBreak: require('./thematic-break'),\n  toml: ignore,\n  yaml: ignore,\n  definition: ignore,\n  footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n  return null\n}\n", "'use strict'\n\nmodule.exports = toHast\n\nvar u = require('unist-builder')\nvar visit = require('unist-util-visit')\nvar position = require('unist-util-position')\nvar generated = require('unist-util-generated')\nvar definitions = require('mdast-util-definitions')\nvar one = require('./one')\nvar footer = require('./footer')\nvar handlers = require('./handlers')\n\nvar own = {}.hasOwnProperty\n\n// Factory to transform.\nfunction factory(tree, options) {\n  var settings = options || {}\n  var dangerous = settings.allowDangerousHTML\n  var footnoteById = {}\n\n  h.dangerous = dangerous\n  h.definition = definitions(tree, settings)\n  h.footnoteById = footnoteById\n  h.footnoteOrder = []\n  h.augment = augment\n  h.handlers = Object.assign({}, handlers, settings.handlers)\n  h.unknownHandler = settings.unknownHandler\n\n  visit(tree, 'footnoteDefinition', onfootnotedefinition)\n\n  return h\n\n  // Finalise the created `right`, a hast node, from `left`, an mdast node.\n  function augment(left, right) {\n    var data\n    var ctx\n\n    // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n    if (left && 'data' in left) {\n      data = left.data\n\n      if (right.type === 'element' && data.hName) {\n        right.tagName = data.hName\n      }\n\n      if (right.type === 'element' && data.hProperties) {\n        right.properties = Object.assign({}, right.properties, data.hProperties)\n      }\n\n      if (right.children && data.hChildren) {\n        right.children = data.hChildren\n      }\n    }\n\n    ctx = left && left.position ? left : {position: left}\n\n    if (!generated(ctx)) {\n      right.position = {\n        start: position.start(ctx),\n        end: position.end(ctx)\n      }\n    }\n\n    return right\n  }\n\n  // Create an element for `node`.\n  function h(node, tagName, props, children) {\n    if (\n      (children === undefined || children === null) &&\n      typeof props === 'object' &&\n      'length' in props\n    ) {\n      children = props\n      props = {}\n    }\n\n    return augment(node, {\n      type: 'element',\n      tagName: tagName,\n      properties: props || {},\n      children: children || []\n    })\n  }\n\n  function onfootnotedefinition(definition) {\n    var id = String(definition.identifier).toUpperCase()\n\n    // Mimick CM behavior of link definitions.\n    // See: <https://github.com/syntax-tree/mdast-util-definitions/blob/8d48e57/index.js#L26>.\n    if (!own.call(footnoteById, id)) {\n      footnoteById[id] = definition\n    }\n  }\n}\n\n// Transform `tree`, which is an mdast node, to a hast node.\nfunction toHast(tree, options) {\n  var h = factory(tree, options)\n  var node = one(h, tree)\n  var foot = footer(h)\n\n  if (foot) {\n    node.children = node.children.concat(u('text', '\\n'), foot)\n  }\n\n  return node\n}\n", "'use strict'\nmodule.exports = require('./lib')\n", "'use strict'\n\nvar mdast2hast = require('mdast-util-to-hast')\n\nmodule.exports = remark2rehype\n\n// Attacher.\n// If a destination is given, runs the destination with the new hast tree\n// (bridge mode).\n// Without destination, returns the tree: further plugins run on that tree\n// (mutate mode).\nfunction remark2rehype(destination, options) {\n  if (destination && !destination.process) {\n    options = destination\n    destination = null\n  }\n\n  return destination ? bridge(destination, options) : mutate(options)\n}\n\n// Bridge mode.\n// Runs the destination with the new hast tree.\nfunction bridge(destination, options) {\n  return transformer\n\n  function transformer(node, file, next) {\n    destination.run(mdast2hast(node, options), file, done)\n\n    function done(err) {\n      next(err)\n    }\n  }\n}\n\n// Mutate-mode.\n// Further transformers run on the hast tree.\nfunction mutate(options) {\n  return transformer\n\n  function transformer(node) {\n    return mdast2hast(node, options)\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport OpenCloseIcon from '../../components/icons/OpenCloseIcon';\n\ninterface State {\n  open: boolean;\n}\n\nexport default class DocCollapsibleBlock extends React.PureComponent<{}, State> {\n  state = { open: false };\n\n  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    this.setState(state => ({ open: !state.open }));\n    event.stopPropagation();\n    event.preventDefault();\n  };\n\n  renderTitle(children: any) {\n    return (\n      <a\n        aria-expanded={this.state.open}\n        aria-haspopup={true}\n        role=\"button\"\n        className=\"link-no-underline\"\n        href=\"#\"\n        onClick={this.handleClick}>\n        <OpenCloseIcon className=\"text-middle little-spacer-right\" open={this.state.open} />\n        {children.props ? children.props.children : children}\n      </a>\n    );\n  }\n\n  render() {\n    const childrenAsArray = React.Children.toArray(this.props.children);\n    if (childrenAsArray.length < 1) {\n      return null;\n    }\n\n    const firstChildChildren = React.Children.toArray(\n      (childrenAsArray[0] as React.ReactElement<any>).props.children\n    );\n    if (firstChildChildren.length < 2) {\n      return null;\n    }\n\n    return (\n      <div className=\"collapse-container\">\n        {this.renderTitle(firstChildChildren[0])}\n        {this.state.open && firstChildChildren.slice(1)}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getBaseUrl } from '../../helpers/system';\n\nexport default function DocImg(props: React.ImgHTMLAttributes<HTMLImageElement>) {\n  const { alt, src, ...other } = props;\n\n  if (process.env.NODE_ENV === 'development') {\n    return <img alt={alt} className=\"max-width-100\" src={getBaseUrl() + src} {...other} />;\n  }\n\n  return (\n    <img\n      alt={alt}\n      className=\"max-width-100\"\n      src={getBaseUrl() + '/images/embed-doc' + src}\n      {...other}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport DetachIcon from '../../components/icons/DetachIcon';\nimport { isSonarCloud } from '../../helpers/system';\nimport { withAppState } from '../hoc/withAppState';\n\ninterface OwnProps {\n  appState: Pick<T.AppState, 'canAdmin'>;\n  customProps?: {\n    [k: string]: any;\n  };\n}\n\ntype Props = OwnProps & React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nconst SONARCLOUD_LINK = '/#sonarcloud#/';\nconst SONARQUBE_LINK = '/#sonarqube#/';\nconst SONARQUBE_ADMIN_LINK = '/#sonarqube-admin#/';\n\nexport class DocLink extends React.PureComponent<Props> {\n  handleClickOnAnchor = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    const { customProps, href = '#' } = this.props;\n    if (customProps && customProps.onAnchorClick) {\n      customProps.onAnchorClick(href, event);\n    }\n  };\n\n  render() {\n    const { appState, children, href, customProps, ...other } = this.props;\n    if (href && href.startsWith('#')) {\n      return (\n        <a href=\"#\" onClick={this.handleClickOnAnchor}>\n          {children}\n        </a>\n      );\n    }\n\n    if (href && href.startsWith('/')) {\n      if (href.startsWith(SONARCLOUD_LINK)) {\n        return <SonarCloudLink url={href}>{children}</SonarCloudLink>;\n      } else if (href.startsWith(SONARQUBE_LINK)) {\n        return <SonarQubeLink url={href}>{children}</SonarQubeLink>;\n      } else if (href.startsWith(SONARQUBE_ADMIN_LINK)) {\n        return (\n          <SonarQubeAdminLink canAdmin={appState.canAdmin} url={href}>\n            {children}\n          </SonarQubeAdminLink>\n        );\n      } else {\n        const url = '/documentation' + href;\n        return (\n          <Link to={url} {...other}>\n            {children}\n          </Link>\n        );\n      }\n    }\n\n    return (\n      <>\n        <a href={href} rel=\"noopener noreferrer\" target=\"_blank\" {...other}>\n          {children}\n        </a>\n        <DetachIcon\n          className=\"text-muted little-spacer-left little-spacer-right text-baseline\"\n          size={12}\n        />\n      </>\n    );\n  }\n}\n\nexport default withAppState(DocLink);\n\ninterface SonarCloudLinkProps {\n  children: React.ReactNode;\n  url: string;\n}\n\nfunction SonarCloudLink({ children, url }: SonarCloudLinkProps) {\n  if (!isSonarCloud()) {\n    return <>{children}</>;\n  } else {\n    const to = `/${url.substr(SONARCLOUD_LINK.length)}`;\n    return <Link to={to}>{children}</Link>;\n  }\n}\n\ninterface SonarQubeLinkProps {\n  children: React.ReactNode;\n  url: string;\n}\n\nfunction SonarQubeLink({ children, url }: SonarQubeLinkProps) {\n  if (isSonarCloud()) {\n    return <>{children}</>;\n  } else {\n    const to = `/${url.substr(SONARQUBE_LINK.length)}`;\n    return (\n      <Link target=\"_blank\" to={to}>\n        {children}\n      </Link>\n    );\n  }\n}\n\ninterface SonarQubeAdminLinkProps {\n  canAdmin?: boolean;\n  children: React.ReactNode;\n  url: string;\n}\n\nfunction SonarQubeAdminLink({ canAdmin, children, url }: SonarQubeAdminLinkProps) {\n  if (isSonarCloud() || !canAdmin) {\n    return <>{children}</>;\n  } else {\n    const to = `/${url.substr(SONARQUBE_ADMIN_LINK.length)}`;\n    return (\n      <Link target=\"_blank\" to={to}>\n        {children}\n      </Link>\n    );\n  }\n}\n", "'use strict'\n\nvar xtend = require('xtend')\nvar defaults = require('./github.json')\n\nmodule.exports = wrapper\n\nvar own = {}.hasOwnProperty\n\nvar allData = 'data*'\nvar commentEnd = '-->'\n\nvar nodeSchema = {\n  root: {children: all},\n  doctype: handleDoctype,\n  comment: handleComment,\n  element: {\n    tagName: handleTagName,\n    properties: handleProperties,\n    children: all\n  },\n  text: {value: handleValue},\n  '*': {\n    data: allow,\n    position: allow\n  }\n}\n\n// Sanitize `node`, according to `schema`.\nfunction wrapper(node, schema) {\n  var ctx = {type: 'root', children: []}\n  var replace\n\n  if (!node || typeof node !== 'object' || !node.type) {\n    return ctx\n  }\n\n  replace = one(xtend(defaults, schema || {}), node, [])\n\n  if (!replace) {\n    return ctx\n  }\n\n  if ('length' in replace) {\n    if (replace.length === 1) {\n      return replace[0]\n    }\n\n    ctx.children = replace\n\n    return ctx\n  }\n\n  return replace\n}\n\n// Sanitize `node`.\nfunction one(schema, node, stack) {\n  var type = node && node.type\n  var replacement = {type: node.type}\n  var replace = true\n  var definition\n  var allowed\n  var result\n  var key\n\n  if (!own.call(nodeSchema, type)) {\n    replace = false\n  } else {\n    definition = nodeSchema[type]\n\n    if (typeof definition === 'function') {\n      definition = definition(schema, node)\n    }\n\n    if (!definition) {\n      replace = false\n    } else {\n      allowed = xtend(definition, nodeSchema['*'])\n\n      for (key in allowed) {\n        result = allowed[key](schema, node[key], node, stack)\n\n        if (result === false) {\n          replace = false\n\n          // Set the non-safe value.\n          replacement[key] = node[key]\n        } else if (result !== null && result !== undefined) {\n          replacement[key] = result\n        }\n      }\n    }\n  }\n\n  if (!replace) {\n    if (\n      !replacement.children ||\n      replacement.children.length === 0 ||\n      schema.strip.indexOf(replacement.tagName) !== -1\n    ) {\n      return null\n    }\n\n    return replacement.children\n  }\n\n  return replacement\n}\n\n// Sanitize `children`.\nfunction all(schema, children, node, stack) {\n  var nodes = children || []\n  var length = nodes.length || 0\n  var results = []\n  var index = -1\n  var result\n\n  stack = stack.concat(node.tagName)\n\n  while (++index < length) {\n    result = one(schema, nodes[index], stack)\n\n    if (result) {\n      if ('length' in result) {\n        results = results.concat(result)\n      } else {\n        results.push(result)\n      }\n    }\n  }\n\n  return results\n}\n\n// Sanitize `properties`.\nfunction handleProperties(schema, properties, node, stack) {\n  var name = handleTagName(schema, node.tagName, node, stack)\n  var attrs = schema.attributes\n  var reqs = schema.required || /* istanbul ignore next */ {}\n  var props = properties || {}\n  var result = {}\n  var allowed\n  var required\n  var definition\n  var prop\n  var value\n\n  allowed = xtend(\n    toPropertyValueMap(attrs['*']),\n    toPropertyValueMap(own.call(attrs, name) ? attrs[name] : [])\n  )\n\n  for (prop in props) {\n    value = props[prop]\n\n    if (own.call(allowed, prop)) {\n      definition = allowed[prop]\n    } else if (data(prop) && own.call(allowed, allData)) {\n      definition = allowed[allData]\n    } else {\n      continue\n    }\n\n    if (value && typeof value === 'object' && 'length' in value) {\n      value = handlePropertyValues(schema, value, prop, definition)\n    } else {\n      value = handlePropertyValue(schema, value, prop, definition)\n    }\n\n    if (value !== null && value !== undefined) {\n      result[prop] = value\n    }\n  }\n\n  required = own.call(reqs, name) ? reqs[name] : {}\n\n  for (prop in required) {\n    if (!own.call(result, prop)) {\n      result[prop] = required[prop]\n    }\n  }\n\n  return result\n}\n\n// Sanitize a property value which is a list.\nfunction handlePropertyValues(schema, values, prop, definition) {\n  var length = values.length\n  var result = []\n  var index = -1\n  var value\n\n  while (++index < length) {\n    value = handlePropertyValue(schema, values[index], prop, definition)\n\n    if (value !== null && value !== undefined) {\n      result.push(value)\n    }\n  }\n\n  return result\n}\n\n// Sanitize a property value.\nfunction handlePropertyValue(schema, value, prop, definition) {\n  if (\n    typeof value !== 'boolean' &&\n    typeof value !== 'number' &&\n    typeof value !== 'string'\n  ) {\n    return null\n  }\n\n  if (!handleProtocol(schema, value, prop)) {\n    return null\n  }\n\n  if (definition.length !== 0 && definition.indexOf(value) === -1) {\n    return null\n  }\n\n  if (schema.clobber.indexOf(prop) !== -1) {\n    value = schema.clobberPrefix + value\n  }\n\n  return value\n}\n\n// Check whether `value` is a safe URL.\nfunction handleProtocol(schema, value, prop) {\n  var protocols = schema.protocols\n  var protocol\n  var first\n  var colon\n  var length\n  var index\n\n  protocols = own.call(protocols, prop) ? protocols[prop].concat() : []\n\n  if (protocols.length === 0) {\n    return true\n  }\n\n  value = String(value)\n  first = value.charAt(0)\n\n  if (first === '#' || first === '/') {\n    return true\n  }\n\n  colon = value.indexOf(':')\n\n  if (colon === -1) {\n    return true\n  }\n\n  length = protocols.length\n  index = -1\n\n  while (++index < length) {\n    protocol = protocols[index]\n\n    if (\n      colon === protocol.length &&\n      value.slice(0, protocol.length) === protocol\n    ) {\n      return true\n    }\n  }\n\n  index = value.indexOf('?')\n\n  if (index !== -1 && colon > index) {\n    return true\n  }\n\n  index = value.indexOf('#')\n\n  if (index !== -1 && colon > index) {\n    return true\n  }\n\n  return false\n}\n\n// Always return a valid HTML5 doctype.\nfunction handleDoctypeName() {\n  return 'html'\n}\n\n// Sanitize `tagName`.\nfunction handleTagName(schema, tagName, node, stack) {\n  var name = typeof tagName === 'string' ? tagName : null\n  var ancestors = schema.ancestors\n  var length\n  var index\n\n  if (!name || name === '*' || schema.tagNames.indexOf(name) === -1) {\n    return false\n  }\n\n  ancestors = own.call(ancestors, name) ? ancestors[name] : []\n\n  // Some nodes can break out of their context if they don\u2019t have a certain\n  // ancestor.\n  if (ancestors.length !== 0) {\n    length = ancestors.length + 1\n    index = -1\n\n    while (++index < length) {\n      if (!ancestors[index]) {\n        return false\n      }\n\n      if (stack.indexOf(ancestors[index]) !== -1) {\n        break\n      }\n    }\n  }\n\n  return name\n}\n\nfunction handleDoctype(schema) {\n  return schema.allowDoctypes ? {name: handleDoctypeName} : null\n}\n\nfunction handleComment(schema) {\n  return schema.allowComments ? {value: handleCommentValue} : null\n}\n\n// See <https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments>\nfunction handleCommentValue(schema, value) {\n  var val = typeof value === 'string' ? value : ''\n  var index = val.indexOf(commentEnd)\n\n  return index === -1 ? val : val.slice(0, index)\n}\n\n// Sanitize `value`.\nfunction handleValue(schema, value) {\n  return typeof value === 'string' ? value : ''\n}\n\n// Create a map from a list of props or a list of properties and values.\nfunction toPropertyValueMap(values) {\n  var result = {}\n  var length = values.length\n  var index = -1\n  var value\n\n  while (++index < length) {\n    value = values[index]\n\n    if (value && typeof value === 'object' && 'length' in value) {\n      result[value[0]] = value.slice(1)\n    } else {\n      result[value] = []\n    }\n  }\n\n  return result\n}\n\n// Allow `value`.\nfunction allow(schema, value) {\n  return value\n}\n\n// Check if `prop` is a data property.\nfunction data(prop) {\n  return prop.length > 4 && prop.slice(0, 4).toLowerCase() === 'data'\n}\n", "'use strict'\nmodule.exports = require('./lib')\n", "'use strict'\n\nmodule.exports = react\n\nvar toHast = require('mdast-util-to-hast')\nvar sanitize = require('hast-util-sanitize')\nvar toH = require('hast-to-hyperscript')\nvar tableCellStyle = require('@mapbox/hast-util-table-cell-style')\n\nvar globalReact\nvar globalCreateElement\nvar globalFragment\n\n/* istanbul ignore next - Hard to test */\ntry {\n  globalReact = require('react')\n  globalCreateElement = globalReact.createElement\n  globalFragment = globalReact.Fragment\n} catch (_) {}\n\nvar own = {}.hasOwnProperty\n\nvar tableElements = ['table', 'thead', 'tbody', 'tfoot', 'tr']\n\nfunction react(options) {\n  var settings = options || {}\n  var createElement = settings.createElement || globalCreateElement\n  var Fragment = settings.fragment || globalFragment\n  var clean = settings.sanitize !== false\n  var scheme =\n    clean && typeof settings.sanitize !== 'boolean' ? settings.sanitize : null\n  var toHastOptions = settings.toHast || {}\n  var components = settings.remarkReactComponents || {}\n\n  this.Compiler = compile\n\n  // Wrapper around `createElement` to pass components in.\n  function h(name, props, children) {\n    // Currently, React issues a warning for *any* white space in tables.\n    // So we remove the pretty lines for now.\n    // See: <https://github.com/facebook/react/pull/7081>.\n    // See: <https://github.com/facebook/react/pull/7515>.\n    // See: <https://github.com/remarkjs/remark-react/issues/64>.\n    if (children && tableElements.indexOf(name) !== -1) {\n      children = children.filter(function (child) {\n        return child !== '\\n'\n      })\n    }\n\n    return createElement(\n      own.call(components, name) ? components[name] : name,\n      props,\n      children\n    )\n  }\n\n  // Compile mdast to React.\n  function compile(node) {\n    var tree = toHast(node, toHastOptions)\n    var root\n\n    if (clean) {\n      tree = sanitize(tree, scheme)\n    }\n\n    root = toH(h, tableCellStyle(tree), settings.prefix)\n\n    // If this compiled to a `<div>`, but fragment are possible, use those.\n    if (root.type === 'div' && Fragment) {\n      root = createElement(Fragment, {}, root.props.children)\n    }\n\n    return root\n  }\n}\n", "'use strict'\n\nmodule.exports = toString\n\n// Get the text content of a node.\n// Prefer the node\u2019s plain-text fields, otherwise serialize its children,\n// and if the given value is an array, serialize the nodes in it.\nfunction toString(node) {\n  return (\n    (node &&\n      (node.value ||\n        node.alt ||\n        node.title ||\n        ('children' in node && all(node.children)) ||\n        ('length' in node && all(node)))) ||\n    ''\n  )\n}\n\nfunction all(values) {\n  var result = []\n  var length = values.length\n  var index = -1\n\n  while (++index < length) {\n    result[index] = toString(values[index])\n  }\n\n  return result.join('')\n}\n", "'use strict'\n\nmodule.exports = toExpression\n\n// Transform a string into an applicable expression.\nfunction toExpression(value) {\n  return new RegExp('^(' + value + ')$', 'i')\n}\n", "'use strict'\n\nmodule.exports = search\n\nvar toString = require('mdast-util-to-string')\nvar visit = require('unist-util-visit')\nvar convert = require('unist-util-is/convert')\nvar slugs = require('github-slugger')()\nvar toExpression = require('./to-expression')\n\nvar heading = convert('heading')\n\n// Search a node for a location.\nfunction search(root, expression, settings) {\n  var length = root.children.length\n  var depth = null\n  var lookingForToc = expression !== null\n  var maxDepth = settings.maxDepth || 6\n  var skip = settings.skip ? toExpression(settings.skip) : null\n  var parents = convert(settings.parents || root)\n  var map = []\n  var headingIndex\n  var closingIndex\n\n  if (!lookingForToc) {\n    headingIndex = -1\n  }\n\n  slugs.reset()\n\n  // Visit all headings in `root`.  We `slug` all headings (to account for\n  // duplicates), but only create a TOC from top-level headings.\n  visit(root, 'heading', onheading)\n\n  if (headingIndex && !closingIndex) {\n    closingIndex = length + 1\n  }\n\n  if (headingIndex === undefined) {\n    headingIndex = -1\n    closingIndex = -1\n    map = []\n  }\n\n  return {index: headingIndex, endIndex: closingIndex, map: map}\n\n  function onheading(child, index, parent) {\n    var value = toString(child)\n    var id = child.data && child.data.hProperties && child.data.hProperties.id\n    var slug = slugs.slug(id || value)\n\n    if (!parents(parent)) {\n      return\n    }\n\n    if (lookingForToc) {\n      if (isClosingHeading(child, depth)) {\n        closingIndex = index\n        lookingForToc = false\n      }\n\n      if (isOpeningHeading(child, depth, expression)) {\n        headingIndex = index + 1\n        depth = child.depth\n      }\n    }\n\n    if (\n      !lookingForToc &&\n      value &&\n      child.depth <= maxDepth &&\n      (!skip || !skip.test(value))\n    ) {\n      map.push({\n        depth: child.depth,\n        children: child.children,\n        id: slug\n      })\n    }\n  }\n}\n\n// Check if `node` is the main heading.\nfunction isOpeningHeading(node, depth, expression) {\n  return depth === null && heading(node) && expression.test(toString(node))\n}\n\n// Check if `node` is the next heading.\nfunction isClosingHeading(node, depth) {\n  return depth && heading(node) && node.depth <= depth\n}\n", "'use strict'\n\nvar extend = require('extend')\n\nmodule.exports = contents\n\nvar LIST = 'list'\nvar LIST_ITEM = 'listItem'\nvar PARAGRAPH = 'paragraph'\nvar LINK = 'link'\nvar LINK_REFERENCE = 'linkReference'\n\n// Transform a list of heading objects to a markdown list.\nfunction contents(map, tight, prefix) {\n  var minDepth = Infinity\n  var index = -1\n  var length = map.length\n  var table\n\n  // Find minimum depth.\n  while (++index < length) {\n    if (map[index].depth < minDepth) {\n      minDepth = map[index].depth\n    }\n  }\n\n  // Normalize depth.\n  index = -1\n\n  while (++index < length) {\n    map[index].depth -= minDepth - 1\n  }\n\n  // Construct the main list.\n  table = list()\n\n  // Add TOC to list.\n  index = -1\n\n  while (++index < length) {\n    insert(map[index], table, tight, prefix)\n  }\n\n  return table\n}\n\n// Insert an entry into `parent`.\nfunction insert(entry, parent, tight, prefix) {\n  var children = parent.children\n  var length = children.length\n  var last = children[length - 1]\n  var index\n  var item\n\n  if (entry.depth === 1) {\n    item = listItem()\n\n    item.children.push({\n      type: PARAGRAPH,\n      children: [\n        {\n          type: LINK,\n          title: null,\n          url: '#' + (prefix || '') + entry.id,\n          children: all(entry.children)\n        }\n      ]\n    })\n\n    children.push(item)\n  } else if (last && last.type === LIST_ITEM) {\n    insert(entry, last, tight, prefix)\n  } else if (last && last.type === LIST) {\n    entry.depth--\n\n    insert(entry, last, tight, prefix)\n  } else if (parent.type === LIST) {\n    item = listItem()\n\n    insert(entry, item, tight, prefix)\n\n    children.push(item)\n  } else {\n    item = list()\n    entry.depth--\n\n    insert(entry, item, tight, prefix)\n\n    children.push(item)\n  }\n\n  // Properly style list-items with new lines.\n  parent.spread = !tight\n\n  if (parent.type === LIST && parent.spread) {\n    parent.spread = false\n    index = -1\n\n    while (++index < length) {\n      if (children[index].children.length > 1) {\n        parent.spread = true\n        break\n      }\n    }\n  }\n}\n\nfunction all(children) {\n  var result = []\n  var length = children.length\n  var index = -1\n\n  while (++index < length) {\n    result = result.concat(one(children[index]))\n  }\n\n  return result\n}\n\nfunction one(node) {\n  var copy\n\n  if (node.type === LINK || node.type === LINK_REFERENCE) {\n    return all(node.children)\n  }\n\n  copy = extend({}, node)\n\n  delete copy.children\n  delete copy.position\n\n  copy = extend(true, {}, copy)\n\n  if (node.children) {\n    copy.children = all(node.children)\n  }\n\n  return copy\n}\n\n// Create a list.\nfunction list() {\n  return {type: LIST, ordered: false, spread: false, children: []}\n}\n\n// Create a list item.\nfunction listItem() {\n  return {type: LIST_ITEM, spread: false, children: []}\n}\n", "'use strict'\n\nmodule.exports = toc\n\nvar search = require('./search')\nvar contents = require('./contents')\nvar toExpression = require('./to-expression')\n\n// Get a TOC representation of `node`.\nfunction toc(node, options) {\n  var settings = options || {}\n  var heading = settings.heading ? toExpression(settings.heading) : null\n  var result = search(node, heading, settings)\n  var map = result.map\n\n  result.map =\n    map.length === 0 ? null : contents(map, settings.tight, settings.prefix)\n\n  // No given heading.\n  if (!heading) {\n    result.index = null\n    result.endIndex = null\n  }\n\n  return result\n}\n", "'use strict'\n\nmodule.exports = require('./lib')\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport util from 'mdast-util-toc';\n/**\n * This is a simplified version of the remark-toc plugin: https://github.com/remarkjs/remark-toc\n * It *only* renders the TOC, and leaves all the rest out.\n */\nexport default function onlyToc() {\n  return transformer;\n\n  function transformer(node) {\n    const result = util(node, { heading: 'doctoc', maxDepth: 2 });\n\n    if (result.index === null || result.index === -1 || !result.map) {\n      node.children = [];\n    } else {\n      node.children = [result.map];\n    }\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { debounce, memoize } from 'lodash';\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport remark from 'remark';\nimport reactRenderer from 'remark-react';\nimport { translate } from '../../helpers/l10n';\nimport onlyToc from './plugins/remark-only-toc';\n\ninterface Props {\n  content: string;\n  onAnchorClick: (href: string, event: React.MouseEvent<HTMLAnchorElement>) => void;\n}\n\ninterface State {\n  anchors: AnchorObject[];\n  highlightAnchor?: string;\n}\n\ninterface AnchorObject {\n  href: string;\n  title: string;\n}\n\nexport default class DocToc extends React.PureComponent<Props, State> {\n  debouncedScrollHandler: () => void;\n\n  node: HTMLDivElement | null = null;\n\n  state: State = { anchors: [] };\n\n  constructor(props: Props) {\n    super(props);\n    this.debouncedScrollHandler = debounce(this.scrollHandler);\n  }\n\n  static getDerivedStateFromProps(props: Props) {\n    const { content } = props;\n    return { anchors: DocToc.getAnchors(content) };\n  }\n\n  componentDidMount() {\n    window.addEventListener('scroll', this.debouncedScrollHandler, true);\n    this.scrollHandler();\n  }\n\n  componentWillUnmount() {\n    window.removeEventListener('scroll', this.debouncedScrollHandler, true);\n  }\n\n  static getAnchors = memoize((content: string) => {\n    const file: { contents: JSX.Element } = remark()\n      .use(reactRenderer)\n      .use(onlyToc)\n      .processSync('\\n## doctoc\\n' + content);\n\n    if (file && file.contents.props.children) {\n      let list = file.contents;\n      let limit = 10;\n      while (limit && list.props.children.length && list.type !== 'ul') {\n        list = list.props.children[0];\n        limit--;\n      }\n\n      if (list.type === 'ul' && list.props.children.length) {\n        return list.props.children\n          .map((li: JSX.Element | string) => {\n            if (typeof li === 'string') {\n              return null;\n            }\n\n            const anchor = li.props.children[0];\n            return {\n              href: anchor.props.href,\n              title: anchor.props.children[0]\n            } as AnchorObject;\n          })\n          .filter((item: AnchorObject | null) => item);\n      }\n    }\n    return [];\n  });\n\n  scrollHandler = () => {\n    // eslint-disable-next-line react/no-find-dom-node\n    const node = findDOMNode(this) as HTMLElement;\n\n    if (!node || !node.parentNode) {\n      return;\n    }\n\n    const headings: NodeListOf<HTMLHeadingElement> = node.parentNode.querySelectorAll('h2[id]');\n    const scrollTop = window.pageYOffset || document.body.scrollTop;\n    let highlightAnchor;\n\n    for (let i = 0, len = headings.length; i < len; i++) {\n      if (headings.item(i).offsetTop > scrollTop + 120) {\n        break;\n      }\n      highlightAnchor = `#${headings.item(i).id}`;\n    }\n\n    this.setState({\n      highlightAnchor\n    });\n  };\n\n  render() {\n    const { anchors, highlightAnchor } = this.state;\n\n    if (anchors.length === 0) {\n      return null;\n    }\n\n    return (\n      <div className=\"markdown-toc\">\n        <div className=\"markdown-toc-content\">\n          <h4>{translate('documentation.on_this_page')}</h4>\n          {anchors.map(anchor => {\n            return (\n              <a\n                className={classNames({ active: highlightAnchor === anchor.href })}\n                href={anchor.href}\n                key={anchor.title}\n                onClick={(event: React.MouseEvent<HTMLAnchorElement>) => {\n                  this.props.onAnchorClick(anchor.href, event);\n                }}>\n                {anchor.title}\n              </a>\n            );\n          })}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { forEach } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport DetachIcon from '../../components/icons/DetachIcon';\n\ninterface OwnProps {\n  customProps?: T.Dict<string>;\n}\n\ntype Props = OwnProps & React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nconst SONARCLOUD_LINK = '/#sonarcloud#/';\n\nexport default function DocTooltipLink({ children, customProps, href, ...other }: Props) {\n  if (customProps) {\n    forEach(customProps, (value, key) => {\n      if (href) {\n        href = href.replace(`#${key}#`, encodeURIComponent(value));\n      }\n    });\n  }\n\n  if (href && href.startsWith('/')) {\n    if (href.startsWith(SONARCLOUD_LINK)) {\n      href = `/${href.substr(SONARCLOUD_LINK.length)}`;\n    } else {\n      href = `/documentation/${href.substr(1)}`;\n    }\n\n    return (\n      <Link rel=\"noopener noreferrer\" target=\"_blank\" to={href} {...other}>\n        {children}\n      </Link>\n    );\n  }\n\n  return (\n    <>\n      <a href={href} rel=\"noopener noreferrer\" target=\"_blank\" {...other}>\n        {children}\n      </a>\n      <DetachIcon className=\"little-spacer-left little-spacer-right text-baseline\" size={12} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport rehypeRaw from 'rehype-raw';\nimport rehypeReact from 'rehype-react';\nimport rehypeSlug from 'rehype-slug';\nimport remark from 'remark';\nimport remarkCustomBlocks from 'remark-custom-blocks';\nimport remarkRehype from 'remark-rehype';\nimport { scrollToElement } from '../../helpers/scrolling';\nimport DocCollapsibleBlock from './DocCollapsibleBlock';\nimport DocImg from './DocImg';\nimport DocLink from './DocLink';\nimport './DocMarkdownBlock.css';\nimport DocToc from './DocToc';\nimport DocTooltipLink from './DocTooltipLink';\n\ninterface Props {\n  childProps?: T.Dict<string>;\n  className?: string;\n  content: string;\n  isTooltip?: boolean;\n  scrollToHref?: string;\n  stickyToc?: boolean;\n  title?: string;\n}\n\nconst WAIT_TIMEOUT = 500;\n\nexport default class DocMarkdownBlock extends React.PureComponent<Props> {\n  node: HTMLElement | null = null;\n\n  componentDidMount() {\n    const { scrollToHref } = this.props;\n    if (scrollToHref) {\n      setTimeout(() => {\n        this.handleAnchorClick(scrollToHref);\n      }, WAIT_TIMEOUT);\n    }\n  }\n\n  handleAnchorClick = (href: string, event?: React.MouseEvent<HTMLAnchorElement>) => {\n    if (this.node) {\n      const element = this.node.querySelector(href);\n      if (element) {\n        if (event) {\n          event.preventDefault();\n        }\n        scrollToElement(element, { bottomOffset: window.innerHeight - 80 });\n\n        // We cannot use React Router here, because we cannot simply replace a hash.\n        if (history.pushState) {\n          history.pushState(null, '', href);\n        }\n      }\n    }\n  };\n\n  render() {\n    const { childProps, content, className, title, stickyToc, isTooltip } = this.props;\n\n    const md = remark();\n\n    // TODO find a way to replace these custom blocks with real Alert components\n    md.use(remarkCustomBlocks, {\n      danger: { classes: 'alert alert-danger' },\n      warning: { classes: 'alert alert-warning' },\n      info: { classes: 'alert alert-info' },\n      success: { classes: 'alert alert-success' },\n      collapse: { classes: 'collapse' }\n    })\n      .use(remarkRehype, { allowDangerousHTML: true })\n      .use(rehypeSlug)\n      .use(rehypeRaw)\n      .use(rehypeReact, {\n        createElement: React.createElement,\n        components: {\n          div: Block,\n          // use custom link to render documentation anchors\n          a: isTooltip\n            ? withChildProps(DocTooltipLink, childProps)\n            : withChildProps(DocLink, { onAnchorClick: this.handleAnchorClick }),\n          // use custom img tag to render documentation images\n          img: DocImg\n        }\n      });\n\n    return (\n      <div\n        className={classNames('markdown', className, { 'has-toc': stickyToc })}\n        ref={ref => (this.node = ref)}>\n        <div className=\"markdown-content\">\n          {title !== undefined && <h1 className=\"documentation-title\">{title}</h1>}\n          {md.processSync(content).contents}\n        </div>\n        {stickyToc && <DocToc content={content} onAnchorClick={this.handleAnchorClick} />}\n      </div>\n    );\n  }\n}\n\nfunction withChildProps<P>(\n  WrappedComponent: React.ComponentType<P & { customProps?: T.Dict<any> }>,\n  childProps?: T.Dict<any>\n) {\n  return function withChildProps(props: P) {\n    return <WrappedComponent customProps={childProps} {...props} />;\n  };\n}\n\nfunction Block(props: React.HtmlHTMLAttributes<HTMLDivElement>) {\n  if (props.className) {\n    if (props.className.includes('collapse')) {\n      return <DocCollapsibleBlock>{props.children}</DocCollapsibleBlock>;\n    } else {\n      return <div className={classNames('cut-margins', props.className)}>{props.children}</div>;\n    }\n  } else {\n    return props.children;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n// keep this file in JavaScript, because it is used by a webpack loader\nmodule.exports = { getFrontMatter, separateFrontMatter, filterContent };\n\nfunction getFrontMatter(content) {\n  const lines = content.split('\\n');\n  const position = getFrontMatterPosition(lines);\n  return position ? parseFrontMatter(lines.slice(position.firstLine + 1, position.lastLine)) : {};\n}\n\nfunction separateFrontMatter(content) {\n  const lines = content.split('\\n');\n  const position = getFrontMatterPosition(lines);\n  if (position) {\n    const frontmatter = parseFrontMatter(lines.slice(position.firstLine + 1, position.lastLine));\n    const content = lines.slice(position.lastLine + 1).join('\\n');\n    return { frontmatter, content };\n  } else {\n    return { frontmatter: {}, content };\n  }\n}\n\nfunction getFrontMatterPosition(lines) {\n  let firstLine;\n  let lastLine;\n  for (let i = 0; i < lines.length; i++) {\n    const line = lines[i];\n    if (line.trim() === '---') {\n      if (firstLine === undefined) {\n        firstLine = i;\n      } else {\n        lastLine = i;\n        break;\n      }\n    }\n  }\n  return lastLine !== undefined ? { firstLine, lastLine } : undefined;\n}\n\nfunction parseFrontMatter(lines) {\n  const data = {};\n  for (let i = 0; i < lines.length; i++) {\n    const tokens = lines[i].split(':').map(x => x.trim());\n    if (tokens.length === 2) {\n      data[tokens[0]] = tokens[1];\n    }\n  }\n  return data;\n}\n\n/**\n * @param {string} content\n * @returns {string}\n */\nfunction filterContent(content) {\n  const regexBase = '<!-- \\\\/?(sonarqube|sonarcloud|static) -->';\n  const { isSonarCloud, getInstance } = require('./system');\n  const contentWithInstance = content.replace(/{instance}/gi, getInstance());\n  const contentWithoutStatic = cutConditionalContent(contentWithInstance, 'static');\n  const filteredContent = isSonarCloud()\n    ? cutConditionalContent(contentWithoutStatic, 'sonarqube')\n    : cutConditionalContent(contentWithoutStatic, 'sonarcloud');\n  return filteredContent\n    .replace(new RegExp(`^${regexBase}(\\n|\\r|\\r\\n|$)`, 'gm'), '') // First, remove single-line ones, including ending carriage-returns.\n    .replace(new RegExp(`${regexBase}`, 'g'), ''); // Now remove all remaining ones.\n}\n\n/**\n * @param {string} content\n * @param {string} tag\n * @returns {string}\n */\nfunction cutConditionalContent(content, tag) {\n  const beginning = `<!-- ${tag} -->`;\n  const ending = `<!-- /${tag} -->`;\n\n  let newContent = content;\n  let start = newContent.indexOf(beginning);\n  let end = newContent.indexOf(ending);\n  while (start !== -1 && end !== -1) {\n    if (start < end) {\n      newContent = newContent.substring(0, start) + newContent.substring(end + ending.length);\n    } else {\n      // When conditional tags are incorrectly used we log an error, strip them out and pass to the next pair of tags\n      // eslint-disable-next-line no-console\n      console.error(\n        new Error(\n          `Documentation - incorrect usage of conditional formatting tags here: \"${newContent.substring(\n            end,\n            start + beginning.length\n          )}\"`\n        )\n      );\n      newContent =\n        newContent.substring(0, end) +\n        newContent.substring(end + ending.length, start) +\n        newContent.substring(start + beginning.length);\n    }\n    start = newContent.indexOf(beginning);\n    end = newContent.indexOf(ending);\n  }\n\n  return newContent;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport NavigationTree from 'Docs/../static/SonarQubeNavigationTree.json';\nimport {\n  DocNavigationItem,\n  DocsNavigationBlock,\n  DocsNavigationExternalLink\n} from 'Docs/@types/types';\nimport { flatten } from 'lodash';\n\nexport function getNavTree() {\n  return NavigationTree as DocNavigationItem[];\n}\n\nexport function getUrlsList(navTree: DocNavigationItem[]): string[] {\n  return flatten(\n    navTree.map(leaf => {\n      if (isDocsNavigationBlock(leaf)) {\n        return getUrlsList(leaf.children);\n      }\n      if (isDocsNavigationExternalLink(leaf)) {\n        return [leaf.url];\n      }\n      return [leaf];\n    })\n  );\n}\n\nexport function getOpenChainFromPath(pathname: string, navTree: DocNavigationItem[]) {\n  let chain: DocNavigationItem[] = [];\n\n  let found = false;\n  const walk = (leaf: DocNavigationItem, parents: DocNavigationItem[] = []) => {\n    if (found) {\n      return;\n    }\n\n    parents = parents.concat(leaf);\n\n    if (isDocsNavigationBlock(leaf)) {\n      leaf.children.forEach(child => {\n        if (typeof child === 'string' && testPathAgainstUrl(child, pathname)) {\n          chain = parents.concat(child);\n          found = true;\n        } else {\n          walk(child, parents);\n        }\n      });\n    } else if (typeof leaf === 'string' && testPathAgainstUrl(leaf, pathname)) {\n      chain = parents;\n      found = true;\n    }\n  };\n\n  navTree.forEach(leaf => walk(leaf));\n\n  return chain;\n}\n\nexport function isDocsNavigationBlock(leaf?: DocNavigationItem): leaf is DocsNavigationBlock {\n  return typeof leaf === 'object' && (leaf as DocsNavigationBlock).children !== undefined;\n}\n\nexport function isDocsNavigationExternalLink(\n  leaf?: DocNavigationItem\n): leaf is DocsNavigationExternalLink {\n  return typeof leaf === 'object' && (leaf as DocsNavigationExternalLink).url !== undefined;\n}\n\nexport function testPathAgainstUrl(path: string, url: string) {\n  const leadingRegEx = /^\\//;\n  const trailingRegEx = /\\/$/;\n  return (\n    path.replace(leadingRegEx, '').replace(trailingRegEx, '') ===\n    url.replace(leadingRegEx, '').replace(trailingRegEx, '')\n  );\n}\n", "module.exports = [{\"path\":\"404\",\"content\":\"---\\ntitle: Page not found\\nnav: Not found\\nurl: /404/\\n---\\n\\n#\u00A0Error\\n\\nThis page does not exist\\n\"},{\"path\":\"analysis/analysis-parameters\",\"content\":\"---\\ntitle: Analysis Parameters\\nurl: /analysis/analysis-parameters/\\n---\\n\\nProject analysis settings can be configured in multiple places. Here is the hierarchy:\\n\\n* Global properties, defined in the UI, apply to all projects (From the top bar, go to **[Administration > Configuration > General Settings](/#sonarqube-admin#/admin/settings)**)\\n* Project properties, defined in the UI, override global property values (At a project level, go to **Project Settings > General Settings**)\\n* Project analysis parameters, defined in a project analysis configuration file or scanner configuration file, override the ones defined in the UI\\n* Analysis / Command line parameters, defined when launching an analysis (with `-D` on the command line), override project analysis parameters\\n\\nNote that only parameters set through the UI are stored in the database.\\nFor example, if you override the `sonar.exclusions` parameter via command line for a specific project, it will not be stored in the database. Subsequent analyses, or analyses in SonarLint with connected mode, would still be executed with the exclusions defined in the UI and therefore stored in the DB.\\n\\nMost of the property keys shown in the interface at both global and project levels can also be set as analysis parameters, but the parameters listed below can _only_ be set at analysis time. \\n\\nFor language-specific parameters related to test coverage and execution, see [Test Coverage & Execution](/analysis/coverage/).  \\nFor language-specific parameters related to external issue reports, see [External Issues](/analysis/external-issues/).\\n\\n[[info]]\\n| Analysis parameters are case-sensitive.\\n\\n## Mandatory Parameters\\n\\n### Server\\nKey | Description | Default\\n---|----|---\\n`sonar.host.url`| the server URL | http://localhost:9000\\n\\n### Project Configuration\\nKey | Description | Default\\n---|----|---\\n`sonar.projectKey`|The project's unique key. Allowed characters are: letters, numbers, `-`, `_`, `.` and `:`, with at least one non-digit. | For Maven projects, this defaults to `<groupId>:<artifactId>`\\n\\n## Optional Parameters\\n\\n### Project Identity\\nKey | Description | Default\\n---|----|---\\n`sonar.projectName`|Name of the project that will be displayed on the web interface.|`<name>` for Maven projects, otherwise project key. If not provided and there is already a name in the DB, it won't be overwritten\\n`sonar.projectVersion` | The project version. | `<version>` for Maven projects, otherwise \\\"not provided\\\"\\n\\n### Authentication\\nBy default, user authentication is required to prevent anonymous users from browsing and analyzing projects on your instance, and you need to pass these parameters when running analyses. Authentication is enforced in the global Security(/instance-administration/security/) settings.\\n\\nWhen authentication is required or the \\\"Anyone\\\" pseudo-group does not have permission to perform analyses, you'll need to supply the credentials of a user with Execute Analysis permissions for the analysis to run under.\\n\\nKey | Description | Default\\n---|----|---\\n`sonar.login` | The [authentication token](/user-guide/user-token/) or login of a SonarQube user with Execute Analysis permission on the project. |\\n`sonar.password` | If you're using an authentication token, leave this blank. If you're using a login, this is the password that goes with your `sonar.login` username. |\\n\\n### Web Services\\nKey | Description | Default\\n---|----|---\\n`sonar.ws.timeout` | Maximum time to wait for the response of a Web Service call (in seconds). Modifying this value from the default is useful only when you're experiencing timeouts during analysis while waiting for the server to respond to Web Service calls. |  60\\n\\n### Project Configuration\\nKey | Description | Default\\n---|----|---\\n`sonar.projectDescription` | The project description. | `<description>` for Maven projects\\n`sonar.links.homepage` | Project home page. | `<url>` for Maven projects\\n`sonar.links.ci` | Continuous integration. | `<ciManagement><url>` for Maven projects\\n`sonar.links.issue` | Issue tracker. | `<issueManagement><url>` for Maven projects\\n`sonar.links.scm` | Project source repository. | `<scm><url>` for Maven projects\\n`sonar.sources` | Comma-separated paths to directories containing main source files. | Read from build system for Maven, Gradle, MSBuild projects. Defaults to project base directory when neither `sonar.sources` nor `sonar.tests` is provided.\\n`sonar.tests` | Comma-separated paths to directories containing test source files. | Read from build system for Maven, Gradle, MSBuild projects. Else default to empty.\\n`sonar.sourceEncoding` | Encoding of the source files. Ex: `UTF-8`, `MacRoman`, `Shift_JIS`. This property can be replaced by the standard property `project.build.sourceEncoding` in Maven projects. The list of available encodings depends on your JVM. | System encoding\\n`sonar.externalIssuesReportPaths` | Comma-delimited list of paths to Generic Issue reports. | \\n`sonar.projectDate` | Assign a date to the analysis. This parameter is only useful when you need to retroactively create the history of a not-analyzed-before project. The format is `yyyy-MM-dd`, for example: 2010-12-01. Since you cannot perform an analysis dated prior to the most recent one in the database, you must analyze recreate your project history in chronological order, oldest first. ![](/images/exclamation.svg) Note: You may need to adjust your housekeeping settings if you wish to create a long-running history. | Current date\\n`sonar.projectBaseDir` | Use this property when you need analysis to take place in a directory other than the one from which it was launched. E.G. analysis begins from `jenkins/jobs/myjob/workspace` but the files to be analyzed are in `ftpdrop/cobol/project1`. The path may be relative or absolute. Specify not the the source directory, but some parent of the source directory. The value specified here becomes the new \\\"analysis directory\\\", and other paths are then specified as though the analysis were starting from the specified value of `sonar.projectBaseDir`. Note that the analysis process will need write permissions in this directory; it is where the `sonar.working.directory` will be created. |\\n`sonar.working.directory` | Set the working directory for an analysis triggered with the SonarScanner or the SonarScanner for Ant (versions greater than 2.0). This property is not compatible with the SonarScanner for MSBuild. Path must be relative, and unique for each project. ![](/images/exclamation.svg) Beware: the specified folder is deleted before each analysis. | `.scannerwork`\\n`sonar.scm.provider` | This property can be used to explicitly tell SonarQube which SCM you're using on the project (in case auto-detection doesn't work). The value of this property is always lowercase and depends on the SCM (ex. \\\"git\\\" if you're using Git). Check the [SCM integration](/analysis/scm-integration/) documentation for more. |  \\n`sonar.scm.forceReloadAll` | By default, blame information is only retrieved for changed files. Set this property to `true` to load blame information for all files. This can be useful is you feel that some SCM data is outdated but SonarQube does not get the latest information from the SCM engine. | \\n`sonar.scm.exclusions.disabled`| For supported engines, files ignored by the SCM, i.e. files listed in `.gitignore`, will automatically be ignored by analysis too. Set this property to `true` to disable that feature. SCM exclusions are always disabled if `sonar.scm.disabled` is set to `true`. |\\n`sonar.scm.revision`| Overrides the revision, for instance the Git sha1, displayed in analysis results. By default value is provided by the CI environment or guessed by the checked-out sources.| \\n`sonar.buildString`| The string passed with this property will be stored with the analysis and available in the results of `api/project_analyses/search`, thus allowing you to later identify a specific analysis and obtain its ID for use with `api/project_analyses/set_baseline`. | |\\n`sonar.analysis.[yourKey]`| This property stub allows you to insert custom key/value pairs into the analysis context, which will also be passed forward to [webhooks](/project-administration/webhooks/). | |\\n\\n\\n### Duplications\\nKey | Description | Default\\n---|----|---\\n`sonar.cpd.${language}.minimumtokens` | A piece of code is considered duplicated as soon as there are at least 100 duplicated tokens in a row (override with `sonar.cpd.${language}.minimumTokens`) spread across at least 10 lines of code (override with `sonar.cpd.${language}.minimumLines`). For Java projects, a piece of code is considered duplicated when there is a series of at least 10 statements in a row, regardless of the number of tokens and lines. This threshold cannot be overridden.  | 100\\n`sonar.cpd.${language}.minimumLines` | (see above) | 10\\n\\n\\n### Analysis Logging\\nKey | Description | Default\\n---|----|---\\n`sonar.log.level` | Control the quantity / level of logs produced during an analysis. `DEBUG`: Display `INFO` logs + more details at `DEBUG` level. Similar to `sonar.verbose=true`. `TRACE`: Display `DEBUG` logs + the timings of all ElasticSearch queries and Web API calls executed by the SonarScanner. | `INFO`\\n`sonar.verbose` | Add more detail to both client and server-side analysis logs. Activates `DEBUG` mode for the scanner, and adds client-side environment variables and system properties to server-side log of analysis report processing. ![](/images/exclamation.svg)NOTE: There is the potential for this setting to expose sensitive information such as passwords if they are stored as server-side environment variables. | false\\n`sonar.scanner.dumpToFile` | Outputs to the specified file the full list of properties passed to the scanner API as a means to debug analysis. |  \\n`sonar.scanner.metadataFilePath` | Set the location where the scanner writes the `report-task.txt` file containing among other things the `ceTaskId`. | value of `sonar.working.directory`\\n\\n### Quality Gate \\nKey | Description | Default\\n---|----|---\\n`sonar.qualitygate.wait` | Forces the analysis step to poll the SonarQube instance and wait for the Quality Gate status. If there are no other options, you can use this to fail a pipeline build when the Quality Gate is failing. See the [CI Integration](/analysis/ci-integration-overview/) page for more information. | \\n`sonar.qualitygate.timeout` | Sets the number of seconds that the scanner should wait for a report to be processed. | 300\\n\\n### Deprecated\\n[[danger]]\\n| These parameters are listed for completeness, but are deprecated and should not be used in new analyses.\\n\\nKey | Description\\n---|----|--- \\n`sonar.links.scm_dev` **![](/images/cross.svg)Deprecated since SQ 7.1** | Developer connection. | `<scm><developerConnection>` for Maven projects\"},{\"path\":\"analysis/azuredevops-integration\",\"content\":\"---\\ntitle: Azure DevOps Integration\\nurl: /analysis/azuredevops-integration/\\n---\\nSonarQube's integration with Azure DevOps allows you to maintain code quality and security in your Azure DevOps repositories. It is compatible with both Azure DevOps Server and Azure DevOps Services.\\n\\nWith this integration, you'll be able to:\\n\\n- **Import your Azure DevOps repositories** - Import your Azure DevOps repositories into SonarQube to easily set up SonarQube projects. \\n- **Analyze projects with Azure Pipelines** - Integrate analysis into your build pipeline. Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), SonarScanners running in Azure Pipelines jobs can automatically detect branches or pull requests being built, so you don't need to specifically pass them as parameters to the scanner.\\n- **Report your Quality Gate status to your pull requests** - (starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)) See your Quality Gate and code metric results right in Azure DevOps so you know if it's safe to merge your changes.\\n\\n## Prerequisites\\nIntegration with Azure DevOps Server requires Azure DevOps Server 2020, Azure DevOps Server 2019, TFS 2018, or TFS 2017 Update 2 (including _Express_ editions).\\n\\n### Branch Analysis\\nCommunity Edition doesn't support the analysis of multiple branches, so you can only analyze your main branch. Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can analyze multiple branches and pull requests.\\n\\n## Importing your Azure DevOps repositories into SonarQube\\nSetting up the import of Azure DevOps repositories into SonarQube allows you to easily create SonarQube projects from your Azure DevOps repositories. If you're using [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) or above, this is also the first step in adding pull request decoration. \\n\\nTo set up the import of Azure DevOps repositories:  \\n\\n1. Set your global DevOps Platform settings\\n2. Add a personal access token for importing repositories  \\n\\n### Setting your global settings\\nTo import your Azure DevOps repositories into SonarQube, you need to first set your global SonarQube settings. Navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations**, select the **Azure DevOps** tab, and click the **Create configuration** button. Specify the following settings:\\n \\n- **Configuration Name** (Enterprise and Data Center Edition only) \u2013 The name used to identify your Azure DevOps configuration at the project level. Use something succinct and easily recognizable.\\n- **Azure DevOps collection/organization URL** \u2013 If you are using Azure DevOps Server, provide your full Azure DevOps collection URL. For example, `https://ado.your-company.com/DefaultCollection`. If you are using Azure DevOps Services, provide your full Azure DevOps organization URL. For example, `https://dev.azure.com/your_organization`.\\n- **Personal Access Token** \u2013 An Azure DevOps user account is used to decorate Pull Requests. We recommend using a dedicated Azure DevOps account with Administrator permissions. You need a [personal access token](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=tfs-2017&tabs=preview-page) from this account with the scope authorized for **Code > Read & Write** for the repositories that will be analyzed. Administrators can encrypt this token at **Administration > Configuration > Encryption**. See the **Settings Encryption** section of the [Security](/instance-administration/security/) page for more information. \\n\\n   This personal access token is used to report your Quality Gate status to your pull requests. You'll be asked for another personal access token for importing projects in the following section.\\n\\n### Adding a personal access token for importing repositories\\nAfter setting your global settings, you can add a project from Azure DevOps by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and selecting  **Azure DevOps**.\\n\\nThen, you'll be asked to provide a personal access token with `Code (Read & Write)` scope so SonarQube can access and list your Azure DevOps projects. This token will be stored in SonarQube and can be revoked at anytime in Azure DevOps.\\n\\nAfter saving your personal access token, you'll see a list of your Azure DevOps projects that you can **set up** to add them to SonarQube. Setting up your projects this way also sets your project settings for pull request decoration. \\n\\nFor information on analyzing your projects with Azure Pipelines, see the **Analyzing projects with Azure Pipelines** section below.\\n\\n## Analyzing projects with Azure Pipelines\\nSonarScanners running in Azure Pipelines jobs can automatically detect branches or pull requests being built, so you don't need to specifically pass them as parameters to the scanner.\\n\\n[[info]]\\n| Automatic branch detection is only available when using Git.\\n\\n### Installing your extension\\nFrom Visual Studio Marketplace, install the [SonarQube extension](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) by clicking the **Get it free** button. \\n\\n#### **Azure DevOps Server - build agents**\\n\\nIf you are using [Microsoft-hosted build agents](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops) then there is nothing else to install. The extension will work with all of the hosted agents (Windows, Linux, and macOS).\\n\\nIf you are self-hosting the build agents, make sure you have at least the minimum SonarQube-supported version of Java installed.\\n\\n### Adding a new SonarQube Service Endpoint\\nAfter installing your extension, you need to declare your SonarQube server as a service endpoint in your Azure DevOps project settings:\\n\\n1. In Azure DevOps, go to **Project Settings > Service connections**. \\n2. Click **New service connection** and select **SonarQube** from the service connection list.\\n3. Enter your SonarQube **Server URL**, an [Authentication Token](/user-guide/user-token/), and a memorable **Service connection name**. Then, click **Save**.\\n\\n### Configuring branch analysis\\nAfter adding your SonarQube service endpoint, you'll need to configure branch analysis. You'll use the following tasks in your build definitions to analyze your projects:\\n\\n- **Prepare Analysis Configuration** - This task configures the required settings before executing the build.\\n\\n- **Run Code Analysis** - (Not used in Maven or Gradle projects) This task executes the analysis of source code.\\n\\n- **Publish Quality Gate Result** - this task displays the Quality Gate status in the build summary letting you know if your code meets quality standards for production. This task may increase your build time as your pipeline has to wait for SonarQube to process the analysis report. It is highly recommended but optional.\\n\\nSelect your build technology below to expand the instructions for configuring branch analysis and to see an example `.yml` file.\\n\\n[[collapse]]\\n| ## .NET\\n| 1. In Azure DevOps, create or edit a **Build Pipeline**, and add a new **Prepare Analysis Configuration** task _before_ your build task:\\n|    - Select the SonarQube server endpoint you created in the **Adding a new SonarQube Service Endpoint** section.\\n|    - Under **Choose a way to run the analysis**, select **Integrate with MSBuild**.\\n|    - In the **project key** field, enter your project key.\\n| 1. Add a new **Run Code Analysis** task _after_ your build task.\\n| 1. Add a new **Publish Quality Gate Result** on your build pipeline summary.\\n| 1. Under the **Triggers** tab of your pipeline, check **Enable continuous integration**, and select all of the branches for which you want SonarQube analysis to run automatically.\\n| 1. Save your pipeline.\\n|\\n| **.yml example**:\\n| ```\\n| trigger:\\n| - master # or the name of your main branch\\n| - feature/*\\n|\\n| steps:\\n| # Prepare Analysis Configuration task\\n| - task: SonarQubePrepare@4\\n|   inputs:\\n|     SonarQube: 'YourSonarqubeServerEndpoint'\\n|     scannerMode: 'MSBuild'\\n|     projectKey: 'YourProjectKey'\\n|\\n| # Run Code Analysis task\\n| - task: SonarQubeAnalyze@4\\n|\\n| # Publish Quality Gate Result task\\n| - task: SonarQubePublish@4\\n|   inputs:\\n|     pollingTimeoutSec: '300'\\n| ```\\n\\n[[collapse]]\\n| ## Maven or Gradle\\n| 1. In Azure DevOps, create or edit a **Build Pipeline**, and add a new **Prepare Analysis Configuration** task _before_ your build task:\\n|    - Select the SonarQube server endpoint you created in the **Adding a new SonarQube Service Endpoint** section.\\n|    - Under **Choose a way to run the analysis**, select **Integrate with Maven or Gradle**.\\n|    - Expand the **Advanced section** and replace the **Additional Properties** with the following snippet:\\n| ```\\n|    # Additional properties that will be passed to the scanner,\\n|    # Put one key=value per line, example:\\n|    # sonar.exclusions=**/*.bin\\n|    sonar.projectKey=YourProjectKey\\n| ```\\n| 2. Edit or add a new Maven or Gradle task\\n|    - Under **Code Analysis**, check **Run SonarQube or SonarCloud Analysis**.\\n| 3. Add a new **Publish Quality Gate Result** on your build pipeline summary.\\n| 4. Under the **Triggers** tab of your pipeline, check **Enable continuous integration**, and select all of the branches for which you want SonarQube analysis to run automatically.\\n| 5. Save your pipeline.\\n|\\n| **.yml example**:\\n| ```\\n| trigger:\\n| - master # or the name of your main branch\\n| - feature/*\\n|\\n| steps:\\n| # Prepare Analysis Configuration task\\n| - task: SonarQubePrepare@4\\n|   inputs:\\n|     SonarQube: 'YourSonarqubeServerEndpoint'\\n|     scannerMode: 'Other'\\n|     extraProperties: 'sonar.projectKey=YourProjectKey'\\n|\\n| # Publish Quality Gate Result task\\n| - task: SonarQubePublish@4\\n|   inputs:\\n|     pollingTimeoutSec: '300'\\n| ```\\n\\n[[collapse]]\\n| ## Other (JavaScript, TypeScript, Go, Python, PHP, etc.)\\n| 1. In Azure DevOps, create or edit a **Build Pipeline**, and add a new **Prepare Analysis Configuration** task _before_ your build task:\\n|    - Select the SonarQube server endpoint you created in the **Adding a new SonarQube Service Endpoint** section.\\n|    - Under **Choose a way to run the analysis**, select **Use standalone scanner**.\\n|    - Select the **Manually provide configuration** mode.\\n|    - In the **project key** field, enter your project key.\\n| 1. Add a new **Run Code Analysis** task _after_ your build task.\\n| 1. Add a new **Publish Quality Gate Result** on your build pipeline summary.\\n| 1. Under the **Triggers** tab of your pipeline, check **Enable continuous integration**, and select all of the branches for which you want SonarQube analysis to run automatically.\\n| 1. Save your pipeline.\\n|\\n| **.yml example**:\\n| ```\\n| trigger:\\n| - master # or the name of your main branch\\n| - feature/*\\n|\\n| steps:\\n| # Prepare Analysis Configuration task\\n| - task: SonarQubePrepare@4\\n|   inputs:\\n|     SonarQube: 'YourSonarqubeServerEndpoint'\\n|     scannerMode: 'CLI'\\n|     configMode: 'manual'\\n|     cliProjectKey: 'YourProjectKey'\\n|\\n| # Run Code Analysis task\\n| - task: SonarQubeAnalyze@4\\n|\\n| # Publish Quality Gate Result task\\n| - task: SonarQubePublish@4\\n|   inputs:\\n|     pollingTimeoutSec: '300'\\n| ```\\n\\n[[collapse]]\\n| ## Analyzing a C/C++/Obj-C project\\n| In your build pipeline, insert the following steps in the order they appear here. These steps can be interweaved with other steps of your build as long as the following order is followed. All steps have to be executed on the same agent.\\n| \\n| 1. Make the **Build Wrapper** available on the build agent: \\n|    \\n|    Download and unzip the **Build Wrapper** on the build agent (see the **Prerequisites** section of the [C/C++/Objective-C](/analysis/languages/cfamily/) page). The archive to download and decompress depends on the platform of the host.\\n|    Please, note that:\\n|    - For the Microsoft-hosted build agent, you will need to make the **Build Wrapper** available on the build agent every time (as part of the build pipeline). To accomplish this, you can add a **PowerShell script** task by inserting a **Command Line** task.\\n|     Example of PowerShell commands on a Windows host:\\n|     ```\\n|     Invoke-WebRequest -Uri '<sonarqube_url>/static/cpp/build-wrapper-win-x86.zip' -OutFile 'build-wrapper.zip'\\n|     Expand-Archive -Path 'build-wrapper.zip' -DestinationPath '.'\\n|     ```\\n|     Example of bash commands on a Linux host:\\n|     ```\\n|     curl '<sonarqube_url>/static/cpp/build-wrapper-linux-x86.zip' --output build-wrapper.zip\\n|     unzip build-wrapper.zip\\n|     ```\\n|     Example of bash commands on a macos host:\\n|     ```\\n|     curl '<sonarqube_url>/static/cpp/build-wrapper-macosx-x86.zip' --output build-wrapper.zip\\n|     unzip build-wrapper.zip\\n|     ```  \\n|    - For the self-hosted build agent you can either download it every time (using the same scripts) or only once (as part of manual setup of build agent).\\n| 1. Add a **Prepare analysis Configuration** task and configure it as follow:\\n|     Click on the **Prepare analysis on SonarQube** task to configure it:\\n|    * Select the **SonarQube Server**\\n|    * In *Choose the way to run the analysis*, select *standalone scanner* (even if you build with *Visual Studio*/*MSBuild*) \\n|    * In *Additional Properties* in the *Advanced* section, add the property `sonar.cfamily.build-wrapper-output` with, as its value, the output directory to which the Build Wrapper should write its results: `sonar.cfamily.build-wrapper-output=<output directory>`\\n| 1. Add a **Command Line** task to run your build.\\n|    For the analysis to happen, your build has to be run through a command line so that it can be wrapped-up by the build-wrapper.\\n|    To do so, \\n|    * Run **Build Wrapper** executable. Pass in as the arguments (1) the output directory configured in the previous task and (2) the command that runs a clean build of your project (not an incremental build).\\n|    Example of PowerShell commands on a Windows host with an *MSBuild* build:\\n|      ```\\n|     build-wrapper-win-x86/build-wrapper-win-x86-64.exe --out-dir <output directory> MSBuild.exe /t:Rebuild\\n|      ```\\n|      Example of bash commands on a Linux host with a *make* build:\\n|      ```\\n|      build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir <output directory> make clean all\\n|      ```\\n|      Example of bash commands on a macos host with a *xcodebuild* build:\\n|      ```\\n|      build-wrapper-macosx-x86/build-wrapper-macos-x86 --out-dir <output directory> xcodebuild -project myproject.xcodeproj -configuration Release clean build\\n|      ```\\n| 1. Add a **Run Code Analysis** task to run the code analysis and make the results available to SonarQube. Consider running this task right after the previous one as the build environment should not be significantly altered before running the analysis.\\n| 1. Add a **Publish Quality Gate Result** task.\\n| \\n| **.yml example**:\\n| ```\\n| trigger:\\n| - master # or the name of your main branch\\n| - feature/*\\n|\\n| steps:\\n| # Make Build Wrapper available\\n| - task: Bash@3\\n|   displayName: Download Build Wrapper\\n|   inputs:\\n|     targetType: inline\\n|     script: >\\n|       curl  '<SONARQUBE_HOST>/static/cpp/build-wrapper-linux-x86.zip' --output build-wrapper.zip\\n|       unzip build-wrapper.zip\\n|\\n| # Prepare Analysis Configuration task\\n| - task: SonarQubePrepare@4\\n|   inputs:\\n|     SonarQube: 'YourSonarqubeServerEndpoint'\\n|     scannerMode: 'CLI'\\n|     configMode: 'manual'\\n|     cliProjectKey: 'YourProjectKey'\\n|     extraProperties: \\\"sonar.cfamily.build-wrapper-output=bw_output\\\"\\n| # Command Line task to run your build.\\n| - task: Bash@3\\n|    displayName: Bash Script\\n|    inputs:\\n|      targetType: inline\\n|      script: >\\n|        ./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw_output <Your build command>\\n|\\n| # Run Code Analysis task\\n| - task: SonarQubeAnalyze@4\\n|\\n| # Publish Quality Gate Result task\\n| - task: SonarQubePublish@4\\n|   inputs:\\n|     pollingTimeoutSec: '300'\\n| ```\\n|  *Note: You need to choose your correct image and adapt the correct wrapper depending on the agent os. See above example to have the correct wrapper.*\\n\\n### Running your pipeline\\nCommit and push your code to trigger the pipeline execution and SonarQube analysis. New pushes on your branches (and pull requests if you set up pull request analysis) trigger a new analysis in SonarQube.\\n\\n### Maintaining pull request code quality and security \\nUsing pull requests allows you to prevent unsafe or substandard code from being merged with your main branch. The following branch policies can help you maintain your code quality and safety by analyzing code and identifying issues in all of the pull requests on your project. These policies are optional, but they're highly recommended so you can quickly track, identify, and remediate issues in your code.\\n\\n#### **Ensuring your pull requests are automatically analyzed**\\nEnsure all of your pull requests get automatically analyzed by adding a [build validation branch policy](https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git#pr-triggers) on the target branch.\\n\\n#### **Preventing pull request merges when the Quality Gate fails**\\nPrevent the merge of pull requests with a failed Quality Gate by adding a `SonarQube/quality gate` [status check branch policy](https://docs.microsoft.com/en-us/azure/devops/repos/git/pr-status-policy) on the target branch.\\n \\n[[info]]\\n| Projects configured as part of a mono repository cannot use this status check branch policy to prevent pull request merges.\\n \\nCheck out this [![YouTube link](/images/youtube.png) video](https://www.youtube.com/watch?v=be5aw9_7bBU) for a quick overview on preventing pull requests from being merged when they are failing the Quality Gate.\\n\\n## Reporting your Quality Gate status in Azure DevOps\\nAfter you've set up SonarQube to import your Azure DevOps repositories as shown in the **Importing your Azure DevOps repositories into SonarQube** above, SonarQube can report your Quality Gate status and analysis metrics directly to your Azure DevOps pull requests.\\n\\nTo do this, add a project from Azure DevOps by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and select **Azure DevOps** from the drop-down menu.\\n\\nThen, follow the steps in SonarQube to analyze your project. SonarQube automatically sets the project settings required to show your Quality Gate in your pull requests.\\n\\n[[info]]\\n| To report your Quality Gate status in your pull requests, a SonarQube analysis needs to be run on your code. You can find the additional parameters required for pull request analysis on the [Pull Request Analysis](/analysis/pull-request/) page.\\n\\nIf you're creating your projects manually or adding Quality Gate reporting to an existing project, see the following section.\\n\\n### Reporting your Quality Gate status in manually created or existing projects\\nSonarQube can also report your Quality Gate status to Azure DevOps pull requests for existing and manually-created projects. After setting your global settings as shown in the **Importing your Azure DevOps repositories into SonarQube** section above, set the following project settings at **Project Settings > General Settings > DevOps Platform Integration**:\\n\\n- **Project name**\\n- **Repository name**\\n\\n### Advanced configuration\\n\\n[[collapse]]\\n| ## Reporting your Quality Gate status on pull requests in a mono repository\\n|\\n| _Reporting Quality Gate statuses to pull requests in a mono repository setup is supported starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n|\\n| In a mono repository setup, multiple SonarQube projects, each corresponding to a separate project within the mono repository, are all bound to the same Azure DevOps repository. You'll need to set up each SonarQube project that's part of a mono repository to report your Quality Gate status.\\n|\\n| You need to set up projects that are part of a mono repository manually as shown in the **Displaying your Quality Gate status in manually created or existing project** section above. You also need to set the **Enable mono repository support** setting to true at **Project Settings > General Settings > DevOps Platform Integration**.\\n|\\n| After setting your project settings, ensure the correct project is being analyzed by adjusting the analysis scope and pass your project names to the scanner. See the following sections for more information.\\n|\\n| ### Ensuring the correct project is analyzed\\n| You need to adjust the analysis scope to make sure SonarQube doesn't analyze code from other projects in your mono repository. To do this set up a **Source File Inclusion** for your  project at **Project Settings > Analysis Scope** with a pattern that will only include files from the appropriate folder. For example, adding `./MyFolderName/**/*` to your inclusions would only include analysis of code in the `MyFolderName` folder. See [Narrowing the Focus](/project-administration/narrowing-the-focus/) for more information on setting your analysis scope.\\n|\\n| ### Passing project names to the scanner\\n| Because of the nature of a mono repository, SonarQube scanners might read all project names of your mono repository as identical. To avoid having multiple projects with the same name, you need to pass the `sonar.projectName` parameter to the scanner. For example, if you're using the Maven scanner, you would pass `mvn sonar:sonar -Dsonar.projectName=YourProjectName`.\\n\\n[[collapse]]\\n| ## Configuring multiple DevOps Platform instances\\n| SonarQube can report your Quality Gate status to multiple DevOps Platform instances. To do this, you need to create a configuration for each DevOps Platform instance and assign that configuration to the appropriate projects. \\n|\\n| - As part of [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can create one configuration for each DevOps Platform. \\n|\\n| - Starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html), you can create multiple configurations for each DevOps Platform. If you have multiple configurations of the same DevOps Platform connected to SonarQube, you have to create projects manually.\\n\\n[[collapse]]\\n| ## Linking issues\\n| When adding a Quality Gate status to your pull requests, individual issues will be linked to their SonarQube counterparts automatically. For this to work correctly, you need to set the instance's **Server base URL** (**[Administration > Configuration > General Settings > General > General](/#sonarqube-admin#/admin/settings/)**) correctly. Otherwise, the links will default to `localhost`.\\n\\n## FAQ\\n\\n**Missing Build Agent Capability**\\t\\n\\nIf you add a Windows Build Agent and install a non-oracle Java version on it, the agent will fail to detect a needed capability for the SonarQube Azure DevOps plugin. If you are sure that the `java` executable is available in the `PATH` environment variable, you can add the missing capability manually by going to **your build agent > capabilities > user capabilities > add capability**. Here, you can add the key, value pair java, and null which should allow the SonarQube plugin to be scheduled on that build agent.\\t\\nThis Bug has been reported to the Microsoft Team with [azure-pipelines-agent#2046](https://github.com/microsoft/azure-pipelines-agent/issues/2046) but is currently not followed up upon.\\n\"},{\"path\":\"analysis/background-tasks\",\"content\":\"---\\ntitle: Background Tasks\\nurl: /analysis/background-tasks/\\n---\\n\\nA Background Task can be:\\n* the import of an Analysis Report\\n* the computation of a Portfolio\\n* the import or export of a project\\n\\n## What happens after the scanner is done analyzing?\\n\\nAnalysis is not complete until the relevant Background Task has been completed. Even though the SonarScanner's log shows `EXECUTION SUCCESS`, the analysis results will not be visible in the {instance} project until the Background Task has been completed. After a SonarScanner has finished analyzing your code, the result of the analysis (Sources, Issues, Metrics) -  the Analysis Report - is sent to {instance} Server for final processing by the Compute Engine. Analysis Reports are queued and processed serially.\\n\\nAt the Project level, when there is a pending Analysis Report waiting to be consumed, you have a \\\"Pending\\\" notification in the header, next to the date of the most recent completed analysis.\\n\\nGlobal Administrators can view the current queue at **[Administration > Projects > Background Tasks](/#sonarqube-admin#/admin/background_tasks)**. Project administrators can see the tasks for a project at **Project Settings > Background Tasks**.\\n\\n## How do I know when analysis report processing fails?\\nBackground tasks usually succeed, but sometimes unusual circumstances cause processing to fail. Examples include:\\n\\n* running out of memory while processing a report from a very large project\\n* hitting a clash between the key of an existing module or project and one in the report\\n* ...\\n\\nWhen that happens, the failed status is reflected on the project homepage, but that requires someone to notice it. You can also choose to be notified by email when background tasks fail - either on a project by project basis, or globally on all projects where you have administration rights, in the **Notifications** section of your profile.\\n\\n## How do I diagnose a failing background task?\\nFor each Analysis Report there is a dropdown menu allowing you to access to the \\\"Scanner Context\\\" showing you the configuration of the Scanner at the moment when the code scan has been run.\\n\\nIf processing failed for the task, an additional option will be available: \\\"Show Error Details\\\", to get the technical details why the processing of the Background Task failed.\\n\\n## How do I cancel a pending analysis report?\\nAdministrators can cancel the processing of a pending task by clicking:\\n\\n* on the red 'x' available on each line of a `Pending` task\\n* on the red \\\"bulk cancel\\\" option next to the pending jobs count. This button cancels all pending tasks.\\n\\nOnce processing has begun on a report, it's too late to cancel it.\\n\\n\"},{\"path\":\"analysis/bitbucket-cloud-integration\",\"content\":\"---\\ntitle: Bitbucket Cloud Integration\\nurl: /analysis/bitbucket-cloud-integration/\\n---\\n\\nSonarQube's integration with Bitbucket Cloud allows you to maintain code quality and security in your Bitbucket Cloud repositories.\\n\\nWith this integration, you'll be able to:\\n\\n- **Import your BitBucket Cloud repositories** \u2013 Import your Bitbucket Cloud repositories into SonarQube to easily set up SonarQube projects.\\n- **Analyze projects with Bitbucket Pipelines** \u2013 Integrate analysis into your build pipeline. SonarScanners running in Bitbucket Pipelines can automatically detect branches or pull requests being built so you don't need to specifically pass them as parameters to the scanner (branch and pull request analysis is available starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)).\\n- **Report your Quality Gate status to your pull requests** \u2013 (starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)) See your Quality Gate and code metric results right in Bitbucket Cloud so you know if it's safe to merge your changes.\\n- **Authenticate with Bitbucket Cloud** - Sign in to SonarQube with your Bitbucket Cloud credentials.\\n\\n## Importing your Bitbucket Cloud repositories into SonarQube\\n\\nSetting up the import of BitBucket Cloud repositories into SonarQube allows you to easily create SonarQube projects from your Bitbucket Cloud repositories. This is also the first step in adding authentication and, starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), the first step in reporting your analysis and Quality Gate status to your pull requests.\\n\\n[[info]]\\n| To import your Bitbucket repositories into SonarQube, you can only have one global configuration of Bitbucket, including Bitbucket Server and Bitbucket Cloud. See the **Configuring multiple DevOps Platform instances** section below for more information.\\n\\nTo set up the import of BitBucket Cloud repositories:\\n\\n1. Create an OAuth consumer.\\n1. Set your global DevOps Platform integration settings.\\n1. Add your Bitbucket username and an app password.\\n\\n### Creating your OAuth consumer\\nSonarQube uses a dedicated [OAuth consumer](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/) to import repositories and display your Quality Gate status on pull requests. Create the OAuth consumer in your Bitbucket Cloud workspace settings and specify the following:\\n\\n- **Name** \u2013 the name of your OAuth consumer\\n- **Callback URL** \u2013 Bitbucket Cloud requires this field, but it's not used by SonarQube so you can use any URL.\\n- **This is a private consumer** \u2013 Your OAuth consumer needs to be private. Make sure this check box is selected.\\n- **Permissions** \u2013 Grant **Read** access for the **Pull requests** permission.\\n\\n### Setting your global DevOps Platform Integration settings\\nTo set your global DevOps Platform Integration settings, navigate to **Administration > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Cloud** as the variant you want to configure. From here, specify the following settings:\\n\\n- **Configuration Name** (Enterprise and Data Center Edition only) \u2013 The name used to identify your Bitbucket Cloud configuration at the project level. Use something succinct and easily recognizable.\\n- **Workspace ID** \u2013 The workspace ID is part of your bitbucket cloud URL `https://bitbucket.org/{WORKSPACE-ID}/{repository-slug}`\\n- **OAuth Key** \u2013 Bitbucket automatically creates an OAuth key when you create your OAuth consumer. You can find it in your Bitbucket Cloud workspace settings under **OAuth consumers**.\\n- **OAuth Secret** \u2013 Bitbucket automatically creates an OAuth secret when you create your OAuth consumer. You can find it in your Bitbucket Cloud workspace settings under **OAuth consumers**. Administrators can encrypt this secret at **Administration > Configuration > Encryption**. See the **Settings Encryption** section of the [Security](/instance-administration/security/) page for more information.\\n\\n### Adding your Bitbucket username and an app password\\nAfter setting your global settings, you can add a project from Bitbucket Cloud by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and selecting **Bitbucket**.\\n\\nThen, you'll be asked to provide your Bitbucket username and an [app password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/). Your app password needs the **repository:read** permission.\\n\\nAfter adding your Bitbucket username and app password, you'll see a list of your Bitbucket Cloud projects that you can **set up** to add them to SonarQube. Setting up your projects this way also sets your project settings for displaying your Quality Gate status on pull requests.\\n\\n## Analyzing projects with Bitbucket Pipelines\\nSonarScanners running in Bitbucket Pipelines can automatically detect branches or pull requests being built so you don't need to specifically pass them as parameters to the scanner.\\n\\nTo analyze your projects with Bitbucket Pipelines, you need to:\\n- Set your environment variables.\\n- Configure your `bitbucket-pipelines.yml file`.\\n\\n### Setting environment variables\\nYou can set environment variables securely for all pipelines in Bitbucket Cloud's settings. See [User-defined variables](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#User-defined-variables) for more information.\\n\\n[[info]]\\n| You may need to commit your `bitbucket-pipelines.yml` before being able to set environment variables for pipelines.\\n\\nYou need to set the following environment variables in Bitbucket Cloud for analysis:\\n\\n- `SONAR_TOKEN` \u2013 Generate a SonarQube [token](/user-guide/user-token/) for Bitbucket Cloud and create a custom **secured** environment variable in Bitbucket Cloud with `SONAR_TOKEN` as the **Name** and the token you generated as the **Value**.\\n- `SONAR_HOST_URL` \u2013 Create a custom environment variable with `SONAR_HOST_URL` as the **Name** and your SonarQube server URL as the **Value**.\\n\\n### Configuring your bitbucket-pipelines.yml file\\nThis section shows you how to configure your `bitbucket-pipelines.yml` file.\\n\\nYou'll set up your build according to your SonarQube edition:\\n\\n- **Community Edition** \u2013 Community Edition doesn't support multiple branches, so you should only analyze your main branch. You can restrict analysis to your main branch by setting it as the only branch in your `branches` pipeline in your `bitbucket-pipelines.yml` file and not using the `pull-requests` pipeline.\\n- **Developer Edition and above** \u2013 Bitbucket Pipelines can build specific branches and pull requests if you use the `branches` and `pull-requests` pipelines as shown in the example configurations below.\\n\\nClick the scanner you're using below to expand the example configuration:\\n\\n**Note:** This assumes a typical Gitflow workflow. See [Use glob patterns on the Pipelines YAML file](https://support.atlassian.com/bitbucket-cloud/docs/use-glob-patterns-on-the-pipelines-yaml-file/) provided by Atlassian for more information on customizing what branches or pull requests trigger an analysis.\\n\\n[[collapse]]\\n| ## SonarScanner for Gradle\\n|\\n| **Note:** A project key might have to be provided through a `build.gradle` file, or through the command line parameter. For more information, see the [SonarScanner for Gradle](/analysis/scan/sonarscanner-for-gradle/) documentation.\\n|\\n| Add the following to your `build.gradle` file:\\n|\\n| ```\\n| plugins {\\n|   id \\\"org.sonarqube\\\" version \\\"3.3\\\"\\n| }\\n| ```\\n|\\n| Write the following in your `bitbucket-pipelines.yml`:\\n|\\n| ```\\n| image: openjdk:8\\n|\\n| clone:\\n|   depth: full\\n|\\n| pipelines:\\n|   branches:\\n|     '{master,main,develop}':\\n|       - step:\\n|           name: SonarQube analysis\\n|           caches:\\n|             - gradle\\n|             - sonar\\n|           script:\\n|             - bash ./gradlew sonarqube\\n|\\n|   pull-requests:\\n|     '**':\\n|       - step:\\n|           name: SonarQube analysis\\n|           caches:\\n|             - gradle\\n|             - sonar\\n|           script:\\n|             - bash ./gradlew sonarqube\\n|\\n| definitions:\\n|   caches:\\n|     sonar: ~/.sonar\\n| ```\\n\\n[[collapse]]\\n| ## SonarScanner for Maven\\n|\\n| **Note:** A project key might have to be provided through the command line parameter. For more information, see the [SonarScanner for Maven](/analysis/scan/sonarscanner-for-maven/) documentation.\\n|\\n| Write the following in your `bitbucket-pipelines.yml`:\\n|\\n| ```\\n| image: maven:3.3.9\\n|\\n| clone:\\n|   depth: full\\n|\\n| pipelines:\\n|   branches:\\n|     '{master,main,develop}':\\n|       - step:\\n|           name: SonarQube analysis\\n|           caches:\\n|             - maven\\n|             - sonar\\n|           script:\\n|             - mvn verify sonar:sonar\\n|\\n|   pull-requests:\\n|     '**':\\n|       - step:\\n|           name: SonarQube analysis\\n|           caches:\\n|             - maven\\n|             - sonar\\n|           script:\\n|             - mvn verify sonar:sonar\\n|\\n| definitions:\\n|   caches:\\n|     sonar: ~/.sonar\\n| ```\\n\\n[[collapse]]\\n| ## SonarScanner for .NET\\n|\\n| Write the following in your `bitbucket-pipelines.yml`:\\n| \\n| ```\\n| image: mcr.microsoft.com/dotnet/core/sdk:latest\\n| pipelines:\\n|   branches:\\n|     '{master,main,develop}':\\n|       - step:\\n|           name: SonarQube analysis\\n|           caches:\\n|             - dotnetcore\\n|             - sonar\\n|           script:\\n|             - apt-get update\\n|             - apt-get install --yes openjdk-11-jre\\n|             - dotnet tool install --global dotnet-sonarscanner\\n|             - export PATH=\\\"$PATH:/root/.dotnet/tools\\\"\\n|             - dotnet sonarscanner begin /k:\\\"YOUR_PROJECT_KEY*\\\" /d:\\\"sonar.login=${SONAR_TOKEN}\\\"  /d:\\\"sonar.host.url=${SONAR_HOST_URL}\\\"\\n|             - dotnet build \\n|             - dotnet sonarscanner end /d:\\\"sonar.login=${SONAR_TOKEN}\\\"\\n|   pull-requests:\\n|     '**':\\n|       - step:\\n|           name: SonarQube analysis\\n|           caches:\\n|             - dotnetcore\\n|             - sonar\\n|           script:\\n|             - apt-get update\\n|             - apt-get install --yes openjdk-11-jre\\n|             - dotnet tool install --global dotnet-sonarscanner\\n|             - export PATH=\\\"$PATH:/root/.dotnet/tools\\\"\\n|             - dotnet sonarscanner begin /k:\\\"YOUR_PROJECT_KEY\\\" /d:\\\"sonar.login=${SONAR_TOKEN}\\\"  /d:\\\"sonar.host.url=${SONAR_HOST_URL}\\\"\\n|             - dotnet build \\n|             - dotnet sonarscanner end /d:\\\"sonar.login=${SONAR_TOKEN}\\\"\\n| definitions:\\n|   caches:\\n|     sonar: ~/.sonar\\n|```\\n\\n[[collapse]]\\n| ## SonarScanner CLI\\n|\\n| You can set up the SonarScanner CLI configuration the following ways:\\n|\\n| - **SonarQube Scan Bitbucket Pipe** \u2013 Using the SonarQube Scan Bitbucket Pipe is an easy way to set up a basic configuration. You'll find the Bitbucket Pipe and configuration instructions on the [SonarQube Scan Bitbucket Pipe](https://bitbucket.org/sonarsource/sonarqube-scan/) page.\\n|\\n| - **Advanced Configuration** \u2013 If you need an advanced setup that allows for scanner caching, you can add the following to your `bitbucket-pipelines.yml` file:\\n|\\n|   [[info]]\\n|   | This configuration is an alternative to the SonarQube Scan Bitbucket Pipe. If you do not need a setup that allows for scanner caching, we recommend using the Bitbucket Pipe.\\n|\\n|    ```\\n|    clone:\\n|      depth: full\\n|\\n|    pipelines:\\n|      branches:\\n|        '{master,main,develop}':\\n|          - step:\\n|              name: SonarQube analysis\\n|              image: sonarsource/sonar-scanner-cli:latest\\n|              caches:\\n|                - sonar\\n|              script:\\n|                - sonar-scanner\\n|\\n|      pull-requests:\\n|        '**':\\n|          - step:\\n|              name: SonarQube analysis\\n|              image: sonarsource/sonar-scanner-cli:latest\\n|              caches:\\n|                - sonar\\n|              script:\\n|                - sonar-scanner\\n|\\n|    definitions:\\n|      caches:\\n|        sonar: /opt/sonar-scanner/.sonar\\n|    ```\\n|\\n| [[info]]\\n| | A project key has to be provided through a `sonar-project.properties` file, or through the command line parameter. For more information, see the [SonarScanner](/analysis/scan/sonarscanner/) documentation.\\n\\n#### **Failing the pipeline job when the Quality Gate fails**\\nYou can use the [SonarQube Quality Gate Check Bitbucket Pipe](https://bitbucket.org/sonarsource/sonarqube-quality-gate) to ensure your code meets your quality standards by failing your pipeline job when your [Quality Gate](/user-guide/quality-gates/) fails.\\n\\nIf you do not want to use the SonarQube Quality Gate Check Pipe, you can instruct the scanner to wait for the SonarQube Quality Gate status at the end of the analysis. To enable this, pass the `-Dsonar.qualitygate.wait=true` parameter to the scanner in the `bitbucket-pipelines.yml` file.\\n\\nThis will make the analysis step poll SonarQube regularly until the Quality Gate is computed. This will increase your pipeline duration. Note that, if the Quality Gate is red, this will make the analysis step fail, even if the actual analysis itself is successful. We advise only using this parameter when necessary (for example, to block a deployment pipeline if the Quality Gate is red). It should not be used to report the Quality Gate status in a pull request.\\n\\nYou can set the `sonar.qualitygate.timeout` property to an amount of time (in seconds) that the scanner should wait for a report to be processed. The default is 300 seconds. \\n\\n### For more information\\nFor more information on configuring your build with Bitbucket Pipelines, see the [Configure bitbucket-pipelines.yml](https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/) documentation provided by Atlassian.\\n\\n## Reporting your Quality Gate status in Bitbucket Cloud\\n\\nAfter creating and installing your OAuth consumer above, SonarQube can report your Quality Gate status and analysis metrics directly to your Bitbucket Cloud pull requests.\\n\\nTo do this, add a project from Bitbucket by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and select **Bitbucket** from the drop-down menu.\\n\\nThen, follow the steps in SonarQube to analyze your project. SonarQube automatically sets the project settings required to show your Quality Gate in your pull requests.\\n\\n[[info]]\\n| To report your Quality Gate status in your pull requests, a SonarQube analysis needs to be run on your code. You can find the additional parameters required for pull request analysis on the [Pull Request Analysis](/analysis/pull-request/) page.\\n\\nIf you're creating your projects manually or adding Quality Gate reporting to an existing project, see the following section.\\n\\n### Reporting your Quality Gate status in manually created or existing projects\\nSonarQube can also report your Quality Gate status to Bitbucket Cloud pull requests for existing and manually-created projects. After you've created and installed your OAuth consumer and updated your global settings as shown in the **Importing your Bitbucket Cloud repositories into SonarQube** section above, set the following project settings at **Project Settings > General Settings > DevOps Platform Integration**: \\n\\n- **Configuration name** \u2013 The configuration name that corresponds to your GitHub instance. \\n- **Repository SLUG** \u2013 The Repository SLUG is part of your Bitbucket Cloud URL. For example, `https://bitbucket.org/{workspace}/{repository}`\\n\\n### Advanced configuration\\n\\n[[collapse]]\\n| ## Reporting your Quality Gate status on pull requests in a mono repository\\n|\\n| _Reporting Quality Gate statuses to pull requests in a mono repository setup is supported starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n|\\n| In a mono repository setup, multiple SonarQube projects, each corresponding to a separate project within the mono repository, are all bound to the same Bitbucket Cloud repository. You'll need to set up each SonarQube project that's part of a mono repository to report your Quality Gate status.\\n|\\n| You need to set up projects that are part of a mono repository manually as shown in the **Displaying your Quality Gate status in manually created or existing project** section above. You also need to set the **Enable mono repository support** setting to true at **Project Settings > General Settings > DevOps Platform Integration**.\\n|\\n| After setting your project settings, ensure the correct project is being analyzed by adjusting the analysis scope and pass your project names to the scanner. See the following sections for more information.\\n|\\n| ### Ensuring the correct project is analyzed\\n| You need to adjust the analysis scope to make sure SonarQube doesn't analyze code from other projects in your mono repository. To do this set up a **Source File Inclusion** for your  project at **Project Settings > Analysis Scope** with a pattern that will only include files from the appropriate folder. For example, adding `./MyFolderName/**/*` to your inclusions would only include analysis of code in the `MyFolderName` folder. See [Narrowing the Focus](/project-administration/narrowing-the-focus/) for more information on setting your analysis scope.\\n|\\n| ### Passing project names to the scanner\\n| Because of the nature of a mono repository, SonarQube scanners might read all project names of your mono repository as identical. To avoid having multiple projects with the same name, you need to pass the `sonar.projectName` parameter to the scanner. For example, if you're using the Maven scanner, you would pass `mvn sonar:sonar -Dsonar.projectName=YourProjectName`.\\n\\n[[collapse]]\\n| ## Configuring multiple DevOps Platform instances\\n| SonarQube can report your Quality Gate status to multiple DevOps Platform instances. To do this, you need to create a configuration for each DevOps Platform instance and assign that configuration to the appropriate projects. \\n|\\n| - As part of [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can create one configuration for each DevOps Platform. \\n|\\n| - Starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html), you can create multiple configurations for each DevOps Platform. If you have multiple configurations of the same DevOps Platform connected to SonarQube, you have to create projects manually.\\n\\n[[collapse]]\\n| ## Linking issues\\n| When adding a Quality Gate status to your pull requests, individual issues will be linked to their SonarQube counterparts automatically. For this to work correctly, you need to set the instance's **Server base URL** (**[Administration > Configuration > General Settings > General > General](/#sonarqube-admin#/admin/settings/)**) correctly. Otherwise, the links will default to `localhost`.\\n\\n## Authenticating with Bitbucket Cloud\\nTo allow users to log in with Bitbucket Cloud credentials, you need to use an [OAuth consumer](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/) and set the authentication settings in SonarQube. You can either use the OAuth consumer that you created above in the **Importing your Bitbucket Cloud repositories into SonarQube** section or create a new OAuth consumer specifically for authentication. See the following sections for more on setting up authentication.\\n\\n### Setting your OAuth consumer settings\\nCreate or update your OAuth consumer in your Bitbucket Cloud workspace settings and specify the following:\\n\\n- **Name** \u2013 the name of your OAuth consumer.\\n- **Callback URL** \u2013 your SonarQube instance URL.\\n- **Permissions**: \\n\\t* **Account**: **Read** and **Email** access.\\n\\t* **Workspace membership**: **Read** access.\\n\\n[[info]]\\n| If you're using the same OAuth consumer for authentication and importing projects/reporting status to pull requests, make sure that the **This is a private consumer** box is checked and **Read** access for the **Pull requests** permission is granted. \\n\\n### Setting your authentication settings in SonarQube\\nTo set your global authentication settings, navigate to **Administration > DevOps Platform Integrations** and select the **Bitbucket** tab. Scroll down to the **Bitbucket Authentication** section and update the following settings:\\n\\n- **Enabled** - set to true.\\n- **OAuth consumer key** - enter the **Key** from your OAuth consumer page in Bitbucket.\\n- **OAuth consumer secret** - enter the **Secret** from your OAuth consumer page in Bitbucket.\\n- **Workspaces** - Only users from Bitbucket Workspaces that you add here will be able to authenticate in SonarQube. This is optional, but _highly_ recommended to ensure only the users you want to log in with Bitbucket credentials are able to. \\n\"},{\"path\":\"analysis/bitbucket-integration\",\"content\":\"---\\ntitle: Bitbucket Server Integration\\nurl: /analysis/bitbucket-integration/\\n---\\nSonarQube's integration with Bitbucket Server allows you to maintain code quality and security in your Bitbucket Server repositories.\\n\\nWith this integration, you'll be able to:\\n\\n- **Import your BitBucket Server repositories** - Import your Bitbucket Server repositories into SonarQube to easily set up SonarQube projects.  \\n- **Report your Quality Gate status to your pull requests** - (starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)) See your Quality Gate and code metric results right in Bitbucket Server so you know if it's safe to merge your changes.\\n\\n## Prerequisites\\nIntegration with Bitbucket Server requires at least Bitbucket Server version 5.15.\\n\\n### Branch Analysis\\nCommunity Edition doesn't support the analysis of multiple branches, so you can only analyze your main branch. Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can analyze multiple branches and pull requests.\\n\\n## Importing your Bitbucket Server repositories into SonarQube\\nSetting up the import of BitBucket Server repositories into SonarQube allows you to easily create SonarQube projects from your Bitbucket Server repositories. If you're using [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) or above, this is also the first step in adding pull request decoration.\\n\\n[[info]]\\n| To import your Bitbucket repositories into SonarQube, you can only have one global configuration of Bitbucket, including Bitbucket Server and Bitbucket Cloud. See the **Configuring multiple DevOps Platform instances** section below for more information.\\n\\nTo set up the import of BitBucket Server repositories:\\n\\n1. Set your global DevOps Platform integration settings\\n1. Add a personal access token for importing repositories\\n\\n### Setting your global DevOps Platform Integration settings\\nTo set your global DevOps Platform Integration settings, navigate to **Administration > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Server** as the variant you want to configure. From here, specify the following settings:\\n\\n- **Configuration Name** (Enterprise and Data Center Edition only) \u2013 The name used to identify your Bitbucket Server configuration at the project level. Use something succinct and easily recognizable.\\n- **Bitbucket Server URL** \u2013 your instances URL. For example, `https://bitbucket-server.your-company.com`.\\n- **Personal Access Token** \u2013 A Bitbucket Server user account is used to decorate Pull Requests. We recommend using a dedicated Bitbucket Server account with Administrator permissions. You need a [Personal Access Token](https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html) from this account with **Read** permission for the repositories that will be analyzed. Administrators can encrypt this token at **Administration > Configuration > Encryption**. See the **Settings Encryption** section of the [Security](/instance-administration/security/) page for more information. \\n\\n   This personal access token is used to report your Quality Gate status to your pull requests. You'll be asked for another personal access token for importing projects in the following section.\\n\\n### Adding a personal access token for importing repositories\\nAfter setting your global settings, you can add a project from Bitbucket Server by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and selecting **Bitbucket**.\\n\\nThen, you'll be asked to provide a personal access token from your user account with `Read` permissions for both projects and repositories. This token will be stored in SonarQube and can be revoked at anytime in Bitbucket Server.\\n\\nAfter saving your personal access token, you'll see a list of your Bitbucket Server projects that you can **set up** to add them to SonarQube. Setting up your projects this way also sets your project settings for pull request decoration.\\n\\n## Reporting your Quality Gate status to Bitbucket Server\\nAfter you've set up SonarQube to import your Bitbucket Server repositories as shown in the previous section, SonarQube can report your Quality Gate status and analysis metrics directly to your Bitbucket Server pull requests. \\n\\nTo do this, add a project from Bitbucket by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and select **Bitbucket** from the drop-down menu.\\n\\nThen, follow the steps in SonarQube to analyze your project. SonarQube automatically sets the project settings required to show your Quality Gate in your pull requests.\\n\\n[[info]]\\n| To report your Quality Gate status in your pull requests, a SonarQube analysis needs to be run on your code. You can find the additional parameters required for pull request analysis on the [Pull Request Analysis](/analysis/pull-request/) page.\\n\\nIf you're creating your projects manually or adding Quality Gate reporting to an existing project, see the following section.\\n\\n### Reporting your Quality Gate status in manually created or existing projects\\nSonarQube can also report your Quality Gate status to Bitbucket Server for existing projects and manually-created projects. After you've updated your global settings as shown in the **Importing your Bitbucket Server repositories into SonarQube** section above, set the following project settings at **Project Settings > General Settings > DevOps Platform Integration**: \\n\\n- **Configuration name** \u2013 The configuration name that corresponds to your DevOps Platform instance.\\n- **Project Key** \u2013 the project key is part of your BitBucket Server repository URL (.../projects/**{KEY}**/repos/{SLUG}/browse).\\n- **Repository SLUG** \u2013 The repository slug is part of your BitBucket Server repository URL (.../projects/{KEY}/repos/**{SLUG}**/browse).\\n\\n### Advanced configuration\\n\\n[[collapse]]\\n| ## Reporting your Quality Gate status on pull requests in a mono repository\\n|\\n| _Reporting Quality Gate statuses to pull requests in a mono repository setup is supported starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n|\\n| In a mono repository setup, multiple SonarQube projects, each corresponding to a separate project within the mono repository, are all bound to the same Bitbucket Server repository. You'll need to set up each SonarQube project that's part of a mono repository to report your Quality Gate status.\\n|\\n| You need to set up projects that are part of a mono repository manually as shown in the **Reporting your Quality Gate status in manually created or existing project** section above. You also need to set the **Enable mono repository support** setting to true at **Project Settings > General Settings > DevOps Platform Integration**.\\n|\\n| After setting your project settings, ensure the correct project is being analyzed by adjusting the analysis scope and pass your project names to the scanner. See the following sections for more information.\\n|\\n| ### Ensuring the correct project is analyzed\\n| You need to adjust the analysis scope to make sure SonarQube doesn't analyze code from other projects in your mono repository. To do this set up a **Source File Inclusion** for your  project at **Project Settings > Analysis Scope** with a pattern that will only include files from the appropriate folder. For example, adding `./MyFolderName/**/*` to your inclusions would only include analysis of code in the `MyFolderName` folder. See [Narrowing the Focus](/project-administration/narrowing-the-focus/) for more information on setting your analysis scope.\\n|\\n| ### Passing project names to the scanner\\n| Because of the nature of a mono repository, SonarQube scanners might read all project names of your mono repository as identical. To avoid having multiple projects with the same name, you need to pass the `sonar.projectName` parameter to the scanner. For example, if you're using the Maven scanner, you would pass `mvn sonar:sonar -Dsonar.projectName=YourProjectName`.\\n\\n[[collapse]]\\n| ## Configuring multiple DevOps Platform instances\\n| SonarQube can report your Quality Gate status to multiple DevOps Platform instances. To do this, you need to create a configuration for each DevOps Platform instance and assign that configuration to the appropriate projects. \\n|\\n| - As part of [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can create one configuration for each DevOps Platform. \\n|\\n| - Starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html), you can create multiple configurations for each DevOps Platform. If you have multiple configurations of the same DevOps Platform connected to SonarQube, you have to create projects manually.\\n\\n[[collapse]]\\n| ## Linking issues\\n| When adding a Quality Gate status to your pull requests, individual issues will be linked to their SonarQube counterparts automatically. For this to work correctly, you need to set the instance's **Server base URL** (**[Administration > Configuration > General Settings > General > General](/#sonarqube-admin#/admin/settings/)**) correctly. Otherwise, the links will default to `localhost`.\\n\\n## Preventing pull request merges when the Quality Gate fails\\nAfter setting up pull request analysis, you can block pull requests from being merged if it is failing the Quality Gate. To do this:\\n1. In Bitbucket Server, navigate to **Repository settings > Code Insights**.\\n2. Add a **Required report** called `com.sonarsource.sonarqube`\\n\\n[[info]]\\n|If your SonarQube project is configured as part of a mono repository in Enterprise Edition or above, you need to use a **Required report** that uses a SonarQube project key (`com.sonarsource.sonarqube_{sq-project-key}` instead of `com.sonarsource.sonarqube`).\\n\\n3. Select **Must pass** as the **Required status**.\\n4. Select **Must not have any annotations** as the **Annotation requirements**.\\n\"},{\"path\":\"analysis/ci-integration-overview\",\"content\":\"---\\ntitle: Overview\\nurl: /analysis/ci-integration-overview/\\n---\\n\\n_Merge and Pull Request analysis is available as part of [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) and [above](https://www.sonarsource.com/plans-and-pricing/)._\\n\\n## Failing a pipeline job when the Quality Gate fails\\nYou can ensure your code meets your quality standards by failing your pipeline job when your [Quality Gate](/user-guide/quality-gates/) fails.\\n\\nWith Jenkins, you can suspend pipeline execution until the analysis' Quality Gate status is known. See the [Jenkins](/analysis/jenkins/) integration page.\\n\\nWith GitHub Actions, you can fail the pipeline job when the Quality Gate fails using the [SonarQube Quality Gate Check Action](https://github.com/marketplace/actions/sonarqube-quality-gate-check).\\n\\nWith Bitbucket Pipelines, you can fail the pipeline job when the Quality Gate fails using the [SonarQube Quality Gate Check Pipe](https://bitbucket.org/sonarsource/sonarqube-quality-gate).\\n\\nFor other CIs, you can use the `sonar.qualitygate.wait=true` analysis parameter in your configuration file. Setting `sonar.qualitygate.wait` to true forces the analysis step to poll your SonarQube instance until the Quality Gate status is available. This increases the pipeline duration and causes the analysis step to fail any time the Quality Gate fails, even if the actual analysis is successful. You should only use this parameter if it's necessary.\\n\\nYou can set the `sonar.qualitygate.timeout` property to the number of seconds that the scanner should wait for a report to be processed. The default is 300 seconds.\\n\\n## GitLab CI/CD\\nFor GitLab CI/CD configuration, see the [GitLab integration](/analysis/gitlab-integration/) page.\\n\\n## GitHub Actions\\nFor GitHub Actions configuration, see the [GitHub integration](/analysis/github-integration/) page.\\n\\n## Azure Pipelines\\nFor Azure Pipelines configuration, see the [Azure DevOps integration](/analysis/azuredevops-integration/) page.\\n\\n## Bitbucket Pipelines\\nFor Bitbucket Pipelines configuration, see the [Bitbucket Cloud integration](/analysis/bitbucket-cloud-integration/) page.\\n\\n## Jenkins\\nFor Jenkins configuration, see [Jenkins](/analysis/jenkins/).\\n\"},{\"path\":\"analysis/codemagic\",\"content\":\"---\\ntitle: Codemagic Integration\\nurl: /analysis/codemagic/\\n---\\n\\nSonarScanners running in Codemagic can automatically detect branches and merge or pull requests in certain jobs. You don't need to explicitly pass the branch or pull request details.\\n\\n## Adding SonarQube scripts to your Codemagic .yml file\\nTo analyze your code when using Codemagic:\\n\\n1. Add the following scripts to your existing `codemagic.yaml` file:\\n\\n```\\n    scripts:   \\n      - |\\n        # download and install the SonarScanner\\n        wget -O $FCI_BUILD_DIR/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.4.0.2170-macosx.zip\\n        # If running in a Linux environment, download https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.4.0.2170-linux.zip \\n        unzip $FCI_BUILD_DIR/sonar-scanner.zip\\n        mv sonar-scanner-* sonar-scanner\\n      - |\\n        # Generate and upload code analysis report\\n        export PATH=$PATH:$FCI_BUILD_DIR/sonar-scanner/bin\\n        sonar-scanner \\\\\\n        -Dsonar.projectKey=YOUR_PROJECT_KEY \\\\\\n        -Dsonar.host.url=SONARQUBE_URL \\\\\\n```\\n\\n2. Define `SONAR_TOKEN` as a Codemagic environment variable.\\n\\n## Automatically detecting pull requests\\nFor SonarQube to automatically detect pull requests when using Codemagic, you need to add an event in the triggering section of your `codemagic.yaml` file as shown in the following snippet:\\n```\\n    triggering:\\n      events:\\n        - pull_request\\n```\\n\\nFor triggering to work, you also need to set up a link between Codemagic and your DevOps platform (Bitbucket, Github, etc.). See the [Codemagic documentation](https://docs.codemagic.io/configuration/webhooks/) for more information.\\n\\n## Caching the .sonar folder\\n\\nCaching the `.sonar` folder saves time on subsequent analyses. To do this, add the following snippet to your `codemagic.yaml` file:\\n\\n```\\n    cache:\\n      cache_paths:\\n        - ~/.sonar\\n```\"},{\"path\":\"analysis/coverage\",\"content\":\"---\\ntitle: Test Coverage & Execution\\nurl: /analysis/coverage/\\n---\\n\\nTest coverage reports and test execution reports are important code quality metrics that you can import into SonarQube. Test coverage reports tell you the percentage of your code that is covered by your test cases. Test execution reports tell you which tests have been run and their results.\\n\\n[[info]]\\n| SonarQube doesn't run your tests or generate reports. To include coverage results in your analysis, you need to set up a third-party coverage tool to generate reports and configure SonarQube to import those reports. \\n\\nBelow you'll find guidelines and resources as well as well as language- and tool-specific analysis parameters for importing coverage and execution reports.\\n\\n## General Guidlines\\nBefore importing test coverage and execution reports, you need to have the appropriate [SonarScanner](/analysis/overview/) configured as part of your build pipeline. Then, complete the following steps:\\n\\n1. Set up your coverage tool to run as part of your build pipeline. Your coverage tool should be set up to run *before* the SonarScanner analysis.\\n1. Configure the coverage tool so that location and format of the output report files matches what the SonarScanner expects.\\n1. Configure the analysis parameters of the SonarScanner so that it can import the report files.\\n\\nNow, on each build of your project, your coverage tool performs its analysis and outputs its results to one or more files (usually one for test coverage and one for test execution). Then, the SonarScanner imports those files and sends the results to SonarQube as part of its analysis process.\\n\\n## Supported report formats\\nSonarQube supports a variety of formats from third-party tools. We also provide a [generic test data format](/analysis/generic-test/) to easily gather and import test coverage and execution information into SonarQube.\\n\\n## Language-specific guides\\nOn the [SonarSource Community forum](https://community.sonarsource.com/), you can find guides with instructions on generating reports for the following languages:\\n* [Apex, C/C++, Objective-C, Go, JS/TS, and Python](https://community.sonarsource.com/t/coverage-test-data-generate-reports-for-apex-c-c-objective-c-go-js-ts-and-python/)\\n* [Swift](https://community.sonarsource.com/t/coverage-test-data-generate-reports-for-swift/)\\n* [C#, VB.net](https://community.sonarsource.com/t/coverage-test-data-generate-reports-for-c-vb-net/)\\n* [JaCoCo](https://community.sonarsource.com/t/coverage-test-data-importing-jacoco-coverage-report-in-xml-format/)\\n\\n## Wildcards\\nSome analysis parameters support the following path wildcards. Properties that support wildcards are noted in the **Description** columns of the analysis parameter tables below:\\n\\nSymbol|Meaning\\n---|---\\n`?`|a single character\\n`*`|any number of characters\\n`**`|any number of directories\\n\\n## Test coverage analysis parameters\\nUnless otherwise specified, these properties require values that are relative to project root.\\n\\n### All Languages\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.coverageReportPaths`|Path to coverage report in the [Generic Test Data](/analysis/generic-test/) format.\\n\\n### Apex\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.apex.coverage.reportPath`|Path to the `test-result-codecoverage.json` report file generated by the [`apex:test:run`](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_apex.htm?search_text=apex%20test#cli_reference_test_run) command of the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). Note, you must have a [Salesforce DX project](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_workspace_setup.htm) set up and linked to your Org\\n\\n### C/C++/Objective-C\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.cfamily.gcov.reportsPath`|Path to the directory containing native `*.gcov` reports (not the XML reports generated by gcovr)\\n`sonar.cfamily.llvm-cov.reportPath`| Path to a llvm-cov report\\n`sonar.cfamily.vscoveragexml.reportsPath`|Path may be absolute or relative to the solution directory. Path wildcards (see above) are supported. Note that the `.coveragexml` report format offered by Visual Studio is not supported.\\n`sonar.cfamily.bullseye.reportPath`| Path to the report from Bullseye, version >= 8.9.63 (use [covxml](http://www.bullseye.com/help/ref-covxml.html) tool)\\n\\n### C&#x23;\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.cs.vscoveragexml.reportsPaths`|Path to Visual Studio Code Coverage report. Multiple paths may be comma-delimited, or included via wildcards. See _Notes on importing .NET reports_ below.\\n`sonar.cs.dotcover.reportsPaths`|Path to dotCover coverage report. See _Notes on importing .NET reports_ below.\\n`sonar.cs.opencover.reportsPaths`|Path to OpenCover coverage report. See _Notes on importing .NET reports_ below.\\n`sonar.cs.ncover3.reportsPaths`![](/images/cross.svg)|**Deprecated.** Path to NCover3 coverage report. See _Notes on importing .NET reports_ below.\\n\\n### Flex\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.flex.cobertura.reportPaths`|Path to the Cobertura XML reports. Multiple paths may be comma-delimited. May be absolute or relative to the project base directory.\\n\\n### Go\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.go.coverage.reportPaths`|Comma-delimited list of paths to coverage report files. Path wildcards are supported (see above) since SonarGo 1.1.\\n\\n### Java, Kotlin, Scala, and JVM\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.coverage.jacoco.xmlReportPaths`|Path to JaCoCo XML coverage reports. Path wildcards are supported (see above).\\n\\n### Javascript and Typescript\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.javascript.lcov.reportPaths`|Comma-delimited list of paths to LCOV coverage report files. Paths may be absolute or relative to project root.\\n\\n### PHP\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.php.coverage.reportPaths`|Comma-delimited list of paths to Clover XML-format coverage report files. Paths may be absolute or relative to project root.\\n\\n### Python\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.python.coverage.reportPaths`|Comma-delimited list of paths to coverage reports in the Cobertura XML format. Path wildcards are supported (see above). Leave unset to use the default (`coverage-reports/*coverage-*.xml`).\\n\\n### Ruby\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.ruby.coverage.reportPaths`|Comma-delimited list of paths to SimpleCov report files generated with the [JSON formatter](https://github.com/simplecov-ruby/simplecov#json-formatter) (availaible from SimpleCov 0.20). For SimpleCov versions < 0.18, you can provide `.resultset.json` report files (not recommended). Paths may be absolute or relative to project-root.\\n\\n### Scala\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.scala.coverage.reportPaths`|Comma-separated list of paths to `scoverage.xml` report files generaged by Scoverage.\\n\\n### Swift, Xcode 9.3+\\n\\nAnalysis parameter|Description\\n----|----\\n&nbsp;|You can use the [xccov-to-sonarqube-generic.sh](https://github.com/SonarSource/sonar-scanning-examples/blob/master/swift-coverage/swift-coverage-example/xccov-to-sonarqube-generic.sh) script from the [sonar-scanning-examples/swift-coverage](https://github.com/SonarSource/sonar-scanning-examples/tree/master/swift-coverage) project convert output from Xcode 9.3's xccov tool to the [Generic Test Data](/analysis/generic-test/) format.\\n\\n### Swift, Xcode 7\u20139.2\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.swift.coverage.reportPath`|Path to the report generated by `llvm-cov show`. Path may be absolute or relative to project root.\\n\\n### VB.NET\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.vbnet.vscoveragexml.reportsPaths`|Path to Visual Studio Code Coverage report. Multiple paths may be comma-delimited, or included via wildcards. See _Notes on importing .NET reports_ below.\\n`sonar.vbnet.dotcover.reportsPaths`|Path to dotCover coverage report. See _Notes on importing .NET reports_ below.\\n`sonar.vbnet.opencover.reportsPaths`|Path to OpenCover coverage report. See _Notes on importing .NET reports_ below.\\n`sonar.vbnet.ncover3.reportsPaths`![](/images/cross.svg)|**Deprecated.** Path to NCover3 coverage report. See _Notes on importing .NET reports_ below.\\n\\n\\n## Test execution analysis parameters\\nUnless otherwise specified, these properties require values that are relative to project root.\\n\\n### All Languages\\n  \\nAnalysis parameter|Description\\n----|----\\n`sonar.testExecutionReportPaths`|Comma-delimited list of paths to execution reports in the [Generic Execution Data](/analysis/generic-test/) format. The paths must be relative to the project's base directory (root module).\\n\\n### C/C++/Objective-C\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.cfamily.cppunit.reportsPath`|Path to the directory holding the [CPPUnit](http://sourceforge.net/projects/cppunit/) reports. Note that while measures such as the number of tests are displayed at project level, no drilldown is available.\\n\\n### C&#x23;\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.cs.vstest.reportsPaths`|Paths to VSTest reports. Multiple paths may be comma-delimited, or included via wildcards. Note that while measures such as the number of tests are displayed at project level, no drilldown is available.\\n`sonar.cs.nunit.reportsPaths`|Paths to NUnit execution reports. Multiple paths may be comma-delimited, or included via wildcards. Note that while measures such as the number of tests are displayed at project level, no drilldown is available.\\n`sonar.cs.xunit.reportsPaths`|Paths to xUnit execution reports. Multiple paths may be comma-delimited, or included via wildcards. Note that while measures such as the number of tests are displayed at project level, no drilldown is available.\\n\\n### Go\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.go.tests.reportPaths`|Comma-delimited list of paths to unit test report files. Paths may be absolute or relative to project root.\\n\\n### Java, Kotlin\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.junit.reportPaths`|Comma-delimited list of paths to Surefire XML-format reports.\\n\\n### Javascript and Typescript\\n\\nAnalysis parameter|Description\\n----|----\\n&nbsp;|You can use [jest-sonar-reporter](https://www.npmjs.com/package/jest-sonar-reporter) or [karma-sonarqube-unit-reporter](https://github.com/tornaia/karma-sonarqube-unit-reporter) to create reports in the [Generic Execution Data](/analysis/generic-test/) format. Both packages are available on npm.\\n\\n### PHP\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.php.tests.reportPath`|Path to the PHPUnit unit test execution report file. Path may be absolute or relative to project root.\\n\\n### Python  \\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.python.xunit.reportPath`|Path to unit test execution report. Leave unset to use the default (`xunit-reports/xunit-result-*.xml`). Path wildcards (see above) are supported. If any paths in the report are invalid, set `sonar.python.xunit.skipDetails=true` to collect only project-level details.\\n\\n### VB.NET\\n\\nAnalysis parameter|Description\\n----|----\\n`sonar.vbnet.vstest.reportsPaths`|Paths to VSTest execution reports. Multiple paths may be comma-delimited, or included via wildcards. Note that while measures such as the number of tests are displayed at project level, no drilldown is available.\\n`sonar.vbnet.nunit.reportsPaths`|Paths to NUnit execution reports. Multiple paths may be comma-delimited, or included via wildcards. Note that while measures such as the number of tests are displayed at project level, no drilldown is available.\\n`sonar.vbnet.xunit.reportsPaths`|Paths to xUnit execution reports. Multiple paths may be comma-delimited, or included via wildcards. Note that while measures such as the number of tests are displayed at project level, no drilldown is available.\\n\\n## Importing .NET reports\\nTo import .NET reports, the report generation process must be executed after the begin step and before the end MSBuild command. The following steps detail importing .NET reports:\\n\\n1. Run the SonarScanner.MSBuild.exe `begin` command, specifying the absolute path where the reports _will be_ available using the `/d:propertyKey=\\\"path\\\"` syntax (\\\"propertyKey\\\" depends on the tool)\\n1. Build your project using MSBuild\\n1. Run your test tool, instructing it to produce a report at the same location specified earlier to the MSBuild SonarQube Runner ([How to generate reports with different tools](https://community.sonarsource.com/t/coverage-test-data-generate-reports-for-c-vb-net/9871)) \\n1. Run the SonarScanner.MSBuild.exe `end` command\\n\\nFor more information, see the [Generate Reports for C#, VB.net Community Post](https://community.sonarsource.com/t/coverage-test-data-generate-reports-for-c-vb-net/9871).\\n\\n## Troubleshooting \\n\\n### Why doesn't coverage in SonarQube match my coverage tool?\\nCode coverage metrics may look different between SonarQube and the tool you've used to gather them. Often, this is because the two aren't using the same metrics.  \\n\\nExternal tools often use line coverage, calculated by dividing covered lines (lines to cover - uncovered lines) by the total number of executable lines (lines to cover). \\n\\nSonarQube uses the covered lines from the imported coverage report and the executable lines (or lines to cover) to calculate its coverage metrics. SonarQube computes coverage as follows:\\n\\n```\\nCoverage = (CT + CF + LC)/(2*B + EL)\\nwhere\\nCT = conditions that have been evaluated to \u2018true\u2019 at least once\\nCF = conditions that have been evaluated to \u2018false\u2019 at least once\\nLC = covered lines = lines_to_cover - uncovered_lines\\nB = total number of conditions\\nEL = total number of executable lines (lines_to_cover)\\n```\\n\\nSonarQube might also compute line coverage differently from your external tool. This is because the lines to cover may not be the same according to SonarQube and to the tool.\\n\\nFor more information on what SonarQube considers a line of code, see the **Tests** section on the [metric-definitions page](/user-guide/metric-definitions/). \"},{\"path\":\"analysis/external-issues\",\"content\":\"---\\ntitle: Importing Third-Party Issues\\nurl: /analysis/external-issues/\\n---\\n\\nThis page lists analysis parameters related to the import of issues raised by external, third-party analyzers. If your analyzer isn't on this page, see the [Generic Issue Import Format](/analysis/generic-issue/) for a generic way to import external issues.\\n\\nSonarQube doesn't run your external analyzers or generate reports. It only imports pre-generated reports. Below you'll find language- and tool-specific analysis parameters for importing reports generated by external analyzers. \\n\\nIn the [Guides](https://community.sonarsource.com/c/announce/guides) category of the [SonarSource Community forum](https://community.sonarsource.com/) you might find instructions on generating these reports.\\n\\nSome properties support the following wildcards in paths. The remarks for properties that support wildcards will mention that fact. If the remarks do not say wildcards are supported, then they are not.:\\n\\nSymbol|Meaning\\n---|---\\n`?`|a single character\\n`*`|any number of characters\\n`**`|any number of directories\\n\\nUnless otherwise specified, the following properties accept both absolute paths and paths relative to project root.\\n\\nLanguage|Property|Remarks\\n----|----|----\\nApex|`sonar.apex.pmd.reportPaths`|Comma-delimited list of paths to [PMD Apex](https://pmd.github.io/pmd-5.5.7/pmd-apex/rules/index.html) [XML reports](https://pmd.github.io/latest/pmd_userdocs_installation.html#running-pmd-via-command-line)|\\nCSS|`sonar.css.stylelint.reportPaths`|Comma-delimited list of paths to [StyleLint.io](https://stylelint.io/) reports|\\nGo|`sonar.go.govet.reportPaths`|Comma-delimited list of paths to [GoVet](https://golang.org/cmd/vet/) reports|\\nGo|`sonar.go.golint.reportPaths`|Comma-delimited list of paths to [GoLint](https://github.com/golang/lint) reports|\\nGo|`sonar.go.gometalinter.reportPaths`|Comma-delimited list of paths to [GoMetaLinter](https://github.com/alecthomas/gometalinter) reports|\\nGo|`sonar.go.golangci-lint.reportPaths`|Comma-delimited list of paths to [golangci-lint](https://github.com/golangci/golangci-lint) reports in checkstyle format (use `--out-format checkstyle` golangci-lint option)|\\nJava|`sonar.java.spotbugs.reportPaths`|Comma-delimited list of paths to reports from [SpotBugs](https://spotbugs.github.io/), FindSecBugs, or FindBugs|\\nJava|`sonar.java.pmd.reportPaths`|Comma-delimited list of paths to reports from [PMD](http://maven.apache.org/plugins/maven-pmd-plugin/usage.html)\\nJava|`sonar.java.checkstyle.reportPaths`|Comma-delimited list of paths to reports from [Checkstyle](http://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle-mojo)\\nJavaScript|`sonar.eslint.reportPaths`|Comma-delimited list of paths to JSON [ESLint](https://eslint.org/) reports (use `-f json` ESLint option)\\nKotlin|`sonar.androidLint.reportPaths`|Comma-delimited list of paths to AndroidLint reports\\nKotlin|`sonar.kotlin.detekt.reportPaths`|Comma-delimited list of paths to [Detekt](https://github.com/arturbosch/detekt) reports\\nKotlin|`sonar.kotlin.ktlint.reportPaths`|Comma-delimited list of paths to [Ktlint](https://ktlint.github.io/) reports\\nPHP|`sonar.php.psalm.reportPaths`|Comma-delimited list of paths to [Psalm](https://github.com/vimeo/psalm) reports. Reports should be generated in the [Generic Issue Format](/analysis/generic-issue/) (run Psalm with the option `--output-format sonarqube`).\\nPHP|`sonar.php.phpstan.reportPaths`|Comma-delimited list of paths to [PHPStan](https://phpstan.org/) reports. Reports should be generated in the [PHPStan JSON Output Format](https://phpstan.org/user-guide/output-format) (use the PHPStan `analyse` command with the option `--error-format=json`).\\nPython|`sonar.python.pylint.reportPaths`|Comma-delimited list of paths to [Pylint](http://www.pylint.org/) reports (use `--output-format=parseable` [Pylint option](https://docs.pylint.org/en/1.6.0/output.html))\\nPython|`sonar.python.bandit.reportPaths`|Comma-delimited list of paths to [Bandit](https://github.com/PyCQA/bandit/blob/master/README.rst) reports\\nPython|`sonar.python.flake8.reportPaths`|Comma-delimited list of paths to [Flake8](https://flake8.pycqa.org/en/latest/) reports\\nRuby|`sonar.ruby.rubocop.reportPaths`|Comma-delimited list of paths to [Rubocop](https://github.com/rubocop-hq/rubocop) reports\\nScala|`sonar.scala.scalastyle.reportPaths`|Comma-delimited list of paths to [Scalastyle](http://www.scalastyle.org/) reports\\nScala|`sonar.scala.scapegoat.reportPaths`|Comma-delimited list of paths to [Scapegoat](https://github.com/sksamuel/scapegoat) reports in the **Scalastyle format**\\nSwift|`sonar.swift.swiftLint.reportPaths`|Comma-delimited list of paths to [SwiftLint](https://github.com/realm/SwiftLint) reports in JSON format\\nTypeScript|`sonar.typescript.tslint.reportPaths`|Comma-delimited list of paths to [TSLint](https://palantir.github.io/tslint/) reports in JSON format (use `-t json` TSLint option)|\\n\\n**Notes on external .NET issues**  \\nIssues from third-party Roslyn analyzers (including Roslyn analyzers provided by Microsoft) are included in the MSBuild output and imported by default into {instance} so no properties exist to enable that behavior. Instead, properties are available to adjust the import and to _stop_ importing those issues.\\n\\nNote that Roslyn issues with an *error* severity automatically fail the build. We don't recommended running the Scanner for MSBuild's end step if the MSBuild step fails for any reason because it will result in an essentially empty analysis.\\n\\nLanguage|Property|Remarks\\n----|----|----\\nC#|`sonar.cs.roslyn.ignoreIssues`|Set to `true` to disable import of external issues. Defaults to `false`.\\nC#|`sonar.cs.roslyn.bugCategories` `sonar.cs.roslyn.vulnerabilityCategories` `sonar.cs.roslyn.codeSmellCategories`|Comma-delimited list of categories whose issues should be classified as Bugs, Vulnerabilities, or Code Smells. \\nVB.NET|`sonar.vbnet.roslyn.ignoreIssues`|Set to `true` to disable import of external issues. Defaults to `false`.\\nVB.NET|`sonar.vbnet.roslyn.bugCategories` `sonar.vbnet.roslyn.vulnerabilityCategories` `sonar.vbnet.roslyn.codeSmellCategories`|Comma-delimited list of categories whose issues should be classified as Bugs, Vulnerabilities, or Code Smells. \\n\"},{\"path\":\"analysis/generic-issue\",\"content\":\"---\\ntitle: Generic Issue Import Format\\nurl: /analysis/generic-issue/\\n---\\n\\nSonarQube supports a generic import format for raising external issues in code. You can use this format to import issues from your favorite linter even if there's no plugin for it. SonarQube also supports many third-party issue report formats, see [Importing Third-Party Issues](/analysis/external-issues/) for more information.\\n\\nThere are a couple of limitations with importing external issues:\\n\\n* you can't manage them within SonarQube; for instance, there is no ability to mark them False Positive.\\n* you can't manage the activation of the rules that raise these issues within SonarQube. External rules aren't visible on the Rules page or reflected in Quality Profiles.\\n\\nExternal issues and the rules that raise them must be managed in the configuration of your linter. \\n\\n## Import \\nThe analysis parameter `sonar.externalIssuesReportPaths` accepts a comma-delimited list of paths to reports.\\n\\nEach report must contain, at top-level, an array of `Issue` objects named `issues`.\\n\\n#### Issue fields:\\n\\n* `engineId` - string\\n* `ruleId` - string\\n* `primaryLocation` - Location object \\n* `type` - string. One of BUG, VULNERABILITY, CODE_SMELL\\n* `severity` - string. One of BLOCKER, CRITICAL, MAJOR, MINOR, INFO\\n* `effortMinutes` - integer, optional. Defaults to 0\\n* `secondaryLocations` - array of Location objects, optional\\n\\n#### Location fields:\\n\\n* `message` - string\\n* `filePath` - string\\n* `textRange` - TextRange object, optional for secondary locations only\\n\\n#### TextRange fields:\\n\\n* `startLine` - integer. 1-indexed\\n* `endLine` - integer, optional. 1-indexed\\n* `startColumn` - integer, optional. 0-indexed\\n* `endColumn` - integer, optional. 0-indexed\\n\\n## Example\\nHere is an example of the expected format:\\n\\n\\t{ \\\"issues\\\": [\\n\\t\\t{\\n\\t\\t  \\\"engineId\\\": \\\"test\\\",\\n\\t\\t  \\\"ruleId\\\": \\\"rule1\\\",\\n\\t\\t  \\\"severity\\\":\\\"BLOCKER\\\",\\n\\t\\t  \\\"type\\\":\\\"CODE_SMELL\\\",\\n\\t\\t  \\\"primaryLocation\\\": {\\n\\t\\t\\t\\\"message\\\": \\\"fully-fleshed issue\\\",\\n\\t\\t\\t\\\"filePath\\\": \\\"sources/A.java\\\",\\n\\t\\t\\t\\\"textRange\\\": {\\n\\t\\t\\t  \\\"startLine\\\": 30,\\n\\t\\t\\t  \\\"endLine\\\": 30,\\n\\t\\t\\t  \\\"startColumn\\\": 9,\\n\\t\\t\\t  \\\"endColumn\\\": 14\\n\\t\\t\\t}\\n\\t\\t  },\\n\\t\\t  \\\"effortMinutes\\\": 90,\\n\\t\\t  \\\"secondaryLocations\\\": [\\n\\t\\t\\t{\\n\\t\\t\\t  \\\"message\\\": \\\"cross-file 2ndary location\\\",\\n\\t\\t\\t  \\\"filePath\\\": \\\"sources/B.java\\\",\\n\\t\\t\\t  \\\"textRange\\\": {\\n\\t\\t\\t\\t\\\"startLine\\\": 10,\\n\\t\\t\\t\\t\\\"endLine\\\": 10,\\n\\t\\t\\t\\t\\\"startColumn\\\": 6,\\n\\t\\t\\t\\t\\\"endColumn\\\": 38\\n\\t\\t\\t  }\\n\\t\\t\\t}\\n\\t\\t  ]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t  \\\"engineId\\\": \\\"test\\\",\\n\\t\\t  \\\"ruleId\\\": \\\"rule2\\\",\\n\\t\\t  \\\"severity\\\": \\\"INFO\\\",\\n\\t\\t  \\\"type\\\": \\\"BUG\\\",\\n\\t\\t  \\\"primaryLocation\\\": {\\n\\t\\t\\t\\\"message\\\": \\\"minimal issue raised at file level\\\",\\n\\t\\t\\t\\\"filePath\\\": \\\"sources/Measure.java\\\"\\n\\t\\t  }\\n\\t\\t}\\n\\t]}\\n\"},{\"path\":\"analysis/generic-test\",\"content\":\"---\\ntitle: Generic Test Data\\nurl: /analysis/generic-test/\\n---\\n\\nOut of the box, SonarQube supports generic formats for test coverage and test execution import. If your coverage engines' native output formats aren't supported by SonarQube, simply covert them to these formats:\\n\\n## Generic Coverage\\nReport paths should be passed in a comma-delimited list to:\\n\\n * `sonar.coverageReportPaths`\\n\\nThe supported format is described by the `sonar-generic-coverage.xsd`:\\n\\n\\t<xs:schema>\\n\\t  <xs:element name=\\\"coverage\\\">\\n\\t\\t<xs:complexType>\\n\\t\\t  <xs:sequence>\\n\\t\\t\\t<xs:element name=\\\"file\\\" minOccurs=\\\"0\\\" maxOccurs=\\\"unbounded\\\">\\n\\t\\t\\t  <xs:complexType>\\n\\t\\t\\t\\t<xs:sequence>\\n\\t\\t\\t\\t  <xs:element name=\\\"lineToCover\\\" minOccurs=\\\"0\\\" maxOccurs=\\\"unbounded\\\">\\n\\t\\t\\t\\t\\t<xs:complexType>\\n\\t\\t\\t\\t\\t  <xs:attribute name=\\\"lineNumber\\\" type=\\\"xs:positiveInteger\\\" use=\\\"required\\\"/>\\n\\t\\t\\t\\t\\t  <xs:attribute name=\\\"covered\\\" type=\\\"xs:boolean\\\" use=\\\"required\\\"/>\\n\\t\\t\\t\\t\\t  <xs:attribute name=\\\"branchesToCover\\\" type=\\\"xs:nonNegativeInteger\\\"/>\\n\\t\\t\\t\\t\\t  <xs:attribute name=\\\"coveredBranches\\\" type=\\\"xs:nonNegativeInteger\\\"/>\\n\\t\\t\\t\\t\\t</xs:complexType>\\n\\t\\t\\t\\t  </xs:element>\\n\\t\\t\\t\\t</xs:sequence>\\n\\t\\t\\t  <xs:attribute name=\\\"path\\\" type=\\\"xs:string\\\" use=\\\"required\\\"/>\\n\\t\\t\\t  </xs:complexType>\\n\\t\\t\\t</xs:element>\\n\\t\\t  </xs:sequence>\\n\\t\\t  <xs:attribute name=\\\"version\\\" type=\\\"xs:positiveInteger\\\" use=\\\"required\\\"/>\\n\\t\\t</xs:complexType>\\n\\t  </xs:element>\\n\\t</xs:schema>\\n\\nand looks like this:\\n\\n\\t<coverage version=\\\"1\\\">\\n\\t  <file path=\\\"xources/hello/NoConditions.xoo\\\">\\n\\t\\t<lineToCover lineNumber=\\\"6\\\" covered=\\\"true\\\"/>\\n\\t\\t<lineToCover lineNumber=\\\"7\\\" covered=\\\"false\\\"/>\\n\\t  </file>\\n\\t  <file path=\\\"xources/hello/WithConditions.xoo\\\">\\n\\t\\t<lineToCover lineNumber=\\\"3\\\" covered=\\\"true\\\" branchesToCover=\\\"2\\\" coveredBranches=\\\"1\\\"/>\\n\\t  </file>\\n\\t</coverage>\\n\\nThe root node should be named `coverage`. Its version attribute should be set to `1`.\\n\\nInsert a `file` element for each file which can be covered by tests. Its `path` attribute can be either absolute or relative to the root of the module.\\nInside a `file` element, insert a `lineToCover` for each line which can be covered by unit tests. It can have the following attributes:\\n* `lineNumber` (mandatory)\\n* `covered` (mandatory): boolean value indicating whether tests actually hit that line\\n* `branchesToCover` (optional): number of branches which can be covered\\n* `coveredBranches` (optional): number of branches which are actually covered by tests\\n\\n## Generic Execution\\nReport paths should be passed in a comma-delimited list to:\\n\\n* `sonar.testExecutionReportPaths`\\n\\nThe supported format looks like this:\\n\\n\\t<testExecutions version=\\\"1\\\">\\n\\t  <file path=\\\"testx/ClassOneTest.xoo\\\">\\n\\t\\t<testCase name=\\\"test1\\\" duration=\\\"5\\\"/>\\n\\t\\t<testCase name=\\\"test2\\\" duration=\\\"500\\\">\\n\\t\\t  <skipped message=\\\"short message\\\">other</skipped>\\n\\t\\t</testCase>\\n\\t\\t<testCase name=\\\"test3\\\" duration=\\\"100\\\">\\n\\t\\t  <failure message=\\\"short\\\">stacktrace</failure>\\n\\t\\t</testCase>\\n\\t\\t<testCase name=\\\"test4\\\" duration=\\\"500\\\">\\n\\t\\t  <error message=\\\"short\\\">stacktrace</error>\\n\\t\\t</testCase>\\n\\t  </file>\\n\\t</testExecutions>\\n\\t\\nThe root node should be named `testExecutions`. Its version attribute should be set to `1`.\\n\\nInsert a `file` element for each test file. Its `path` attribute can be either absolute or relative to the project's base directory (root module).\\n\\n**Note** unlike for coverage reports, the files present in the report must be test file names, not source code files covered by tests.\\n\\nInside a `file` element, insert a `testCase` for each test run by unit tests. It can have the following attributes/children:\\n\\n* `testCase` (mandatory)\\n  * `name` (mandatory): name of the test case\\n  * `duration` (mandatory): long value in milliseconds\\n \\n  * `failure|error|skipped` (optional): if the test is not OK, report the cause with a message and a long description\\n    * `message` (mandatory): short message describing the cause\\n    * `stacktrace` (optional): long message containing details about `failure|error|skipped` status\\n\"},{\"path\":\"analysis/github-integration\",\"content\":\"---\\ntitle: GitHub Integration\\nurl: /analysis/github-integration/\\n---\\n\\nSonarQube's integration with GitHub Enterprise and GitHub.com allows you to maintain code quality and security in your GitHub repositories.\\n\\nWith this integration, you'll be able to:\\n\\n- **Import your GitHub repositories** - Import your GitHub repositories into SonarQube to easily set up SonarQube projects.  \\n- **Analyze projects with GitHub Actions** - Integrate analysis into your build pipeline. Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), SonarScanners running in GitHub Actions jobs can automatically detect branches or pull requests being built so you don't need to specifically pass them as parameters to the scanner.\\n- **Report your Quality Gate status to your branches and pull requests** - (starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)) See your Quality Gate and code metric results right in GitHub so you know if it's safe to merge your changes.\\n- **Authenticate with GitHub** - Sign in to SonarQube with your GitHub credentials.  \\n\\n## Prerequisites\\n- To add pull request decoration to Checks in GitHub Enterprise, you must be running GitHub Enterprise version 2.21+.\\n- To analyze projects with GitHub Actions in GitHub Enterprise, you must be running [GitHub Enterprise version 3.0+](https://docs.github.com/en/enterprise-server@2.22/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server).\\n\\n### Branch Analysis\\nCommunity Edition doesn't support the analysis of multiple branches, so you can only analyze your main branch. With [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can analyze multiple branches and pull requests.\\n\\n## Importing your GitHub repositories to SonarQube\\nYou need to use a GitHub App to connect SonarQube and GitHub so you can import your GitHub repositories into SonarQube. This is also the first step in adding authentication, and, starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), the first step in reporting your analysis and Quality Gate status to your pull requests.\\n\\nIf you want to set up authentication without importing your GitHub repositories, see the **Creating a dedicated app for authentication** section below for instructions on setting up authentication.\\n\\nIn this section, you'll complete the following steps to connect SonarQube and GitHub with a GitHub App:\\n\\n1. Create your GitHub App.\\n1. Install your GitHub App in your organization.\\n1. Update your SonarQube global settings with your GitHub App information.\\n\\n### Step 1: Creating your GitHub App\\nSee GitHub's documentation on [creating a GitHub App](https://docs.github.com/apps/building-github-apps/creating-a-github-app/) for general information on creating your app. \\n\\nSpecify the following settings in your app:\\n\\n- **GitHub App Name** \u2013 Your app's name.\\n- **Homepage URL** \u2013 You can use any URL, such as `https://www.sonarqube.org/`.\\n- **User authorization callback URL** \u2013 Your instance's base URL. For example, `https://yourinstance.sonarqube.com`.\\n- **Webhook URL** \u2013 Your instance's base URL. For example, `https://yourinstance.sonarqube.com`.\\n- Grant access for the following **Repository permissions**:\\n\\n  | Permission          | Access       |\\n  |---------------------|--------------|\\n  | Checks              | Read & write |\\n  | **GitHub Enterprise:** Repository metadata <br> **GitHub.com:** Metadata <br> (this setting is automatically set by GitHub)| Read-only |\\n  | Pull Requests       | Read & write |\\n  | Commit statuses     | Read-only    |\\n\\n- For private repositories, grant access to the following **Repository permissions**:\\n  \\n  | Permission          | Access       |\\n  |---------------------|--------------|\\n  | Contents            | Read-only    |\\n  \\n\\n- If setting up **GitHub Authentication**, in addition to the aforementioned Repository permissions, grant access for the following **User permissions**:\\n\\n  | Permission          | Access       |\\n  |---------------------|--------------|\\n  | Email addresses     | Read-only    |\\n\\n  And grant access for the following **Organization permissions**:\\n\\n  | Permission          | Access       |\\n  |---------------------|--------------|\\n  | Members             | Read-only    |\\n  | Projects            | Read-only    |\\n\\n- Under \\\"Where can this GitHub App be installed?,\\\" select **Any account**.\\n\\n[[warning]]\\n| For security reasons, make sure you're using `HTTPS` protocol for your URLs in your app.\\n\\n### Step 2: Installing your GitHub App in your organization\\nNext, you need to install your GitHub App in your organizations. See GitHub's documentation on [installing GitHub Apps](https://docs.github.com/en/free-pro-team@latest/developers/apps/installing-github-apps) for more information.\\n\\n### Step 3: Updating your SonarQube global settings with your GitHub App information\\nAfter you've created and installed your GitHub App, update your global SonarQube settings to finish integration and allow for the import of GitHub projects.\\n\\nNavigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitHub** and specify the following settings:\\n\\n- **Configuration Name** (Enterprise and Data Center Edition only) \u2013 The name used to identify your GitHub configuration at the project level. Use something succinct and easily recognizable.\\n- **GitHub URL** \u2013 For example, `https://github.company.com/api/v3` for GitHub Enterprise or `https://api.github.com/` for GitHub.com.\\n- **GitHub App ID** \u2013 The App ID is found on your GitHub App's page on GitHub at **Settings > Developer Settings > GitHub Apps**. \\n- **Client ID** \u2013 The Client ID is found on your GitHub App's page.\\n- **Client secret** \u2013 The Client secret is found on your GitHub App's page. Administrators can encrypt this secret at **Administration > Configuration > Encryption**. See the **Settings Encryption** section of the [Security](/instance-administration/security/) page for more information.\\n- **Private Key** \u2013 Your GitHub App's private key. You can generate a `.pem` file from your GitHub App's page under **Private keys**. Copy and paste the whole contents of the file here. Administrators can encrypt this key at **Administration > Configuration > Encryption**. See the **Settings Encryption** section of the [Security](/instance-administration/security/) page for more information.\\n\\n## Analyzing projects with GitHub Actions\\nSonarScanners running in GitHub Actions can automatically detect branches and pull requests being built so you don't need to specifically pass them as parameters to the scanner.\\n\\nTo analyze your projects with GitHub Actions, you need to:\\n- Create your GitHub Secrets.\\n- Configure your workflow YAML file.\\n- Commit and push your code to start the analysis.\\n\\n### Creating your GitHub Secrets\\nYou can create repository secrets from your GitHub repository. See GitHub's documentation on [Encrypted secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) for more information. \\n\\nYou need to set the following GitHub repository secrets to analyze your projects with GitHub Actions:\\n\\n- `SONAR_TOKEN` \u2013 Generate a SonarQube [token](/user-guide/user-token/) and, in GitHub, create a new repository secret in GitHub with `SONAR_TOKEN` as the **Name** and the token you generated as the **Value**.\\n\\n- `SONAR_HOST_URL` \u2013 In GitHub, create a new repository secret with `SONAR_HOST_URL` as the **Name** and your SonarQube server URL as the **Value**.\\n\\n### Configuring your .github/workflows/build.yml file\\nThis section shows you how to configure your `.github/workflows/build.yml` file. \\n\\nYou'll set up your build according to your SonarQube edition:\\n\\n- **Community Edition** \u2013 Community Edition doesn't support multiple branches, so you should only analyze your main branch. You can restrict analysis to your main branch by setting it as the only branch in your `on.push.branches` configuration in your workflow YAML file, and not using `on.pull_request`.\\n\\n- **Developer Edition and above** \u2013 GitHub Actions can build specific branches and pull requests if you use `on.push.branches` and `on.pull-requests` configurations as shown in the examples below.\\n\\nClick the scanner you're using below to expand the example configuration:\\n\\n[[collapse]]\\n| ## SonarScanner for Maven\\n|\\n| **Note:** A project key might have to be provided  through the command line parameter. For more information, see the [SonarScanner for Maven](/analysis/scan/sonarscanner-for-maven/) documentation.\\n| \\n| Write the following in your workflow YAML file:\\n|\\n|```\\n| name: Build\\n| on:\\n|   push:\\n|     branches:\\n|       - master # or the name of your main branch\\n|   pull_request:\\n|     types: [opened, synchronize, reopened]\\n| jobs:\\n|   build:\\n|     name: Build\\n|     runs-on: ubuntu-latest\\n|     steps:\\n|       - uses: actions/checkout@v2\\n|         with:\\n|           fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis\\n|       - name: Set up JDK 11\\n|         uses: actions/setup-java@v1\\n|         with:\\n|           java-version: 11\\n|       - name: Cache SonarQube packages\\n|         uses: actions/cache@v1\\n|         with:\\n|           path: ~/.sonar/cache\\n|           key: ${{ runner.os }}-sonar\\n|           restore-keys: ${{ runner.os }}-sonar\\n|       - name: Cache Maven packages\\n|         uses: actions/cache@v1\\n|         with:\\n|           path: ~/.m2\\n|           key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}\\n|           restore-keys: ${{ runner.os }}-m2\\n|       - name: Build and analyze\\n|         env:\\n|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any\\n|           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}\\n|           SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}\\n|         run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar\\n| ```\\n\\n[[collapse]]\\n| ## SonarScanner for Gradle\\n|\\n| **Note:** A project key might have to be provided through a `build.gradle` file, or through the command line parameter. For more information, see the [SonarScanner for Gradle](/analysis/scan/sonarscanner-for-gradle/) documentation.\\n|\\n| Add the following to your `build.gradle` file:\\n|\\n| ```\\n| plugins {\\n|   id \\\"org.sonarqube\\\" version \\\"3.3\\\"\\n| }\\n| ```\\n|\\n| Write the following in your workflow YAML file:\\n|\\n| ```\\n| name: Build\\n| on:\\n|   push:\\n|     branches:\\n|       - master # or the name of your main branch\\n|   pull_request:\\n|     types: [opened, synchronize, reopened]\\n| jobs:\\n|   build:\\n|     name: Build\\n|     runs-on: ubuntu-latest\\n|     steps:\\n|       - uses: actions/checkout@v2\\n|         with:\\n|           fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis\\n|       - name: Set up JDK 11\\n|         uses: actions/setup-java@v1\\n|         with:\\n|           java-version: 11\\n|       - name: Cache SonarQube packages\\n|         uses: actions/cache@v1\\n|         with:\\n|           path: ~/.sonar/cache\\n|           key: ${{ runner.os }}-sonar\\n|           restore-keys: ${{ runner.os }}-sonar\\n|       - name: Cache Gradle packages\\n|         uses: actions/cache@v1\\n|         with:\\n|           path: ~/.gradle/caches\\n|           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}\\n|           restore-keys: ${{ runner.os }}-gradle\\n|       - name: Build and analyze\\n|         env:\\n|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any\\n|           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}\\n|           SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}\\n|         run: ./gradlew build sonarqube --info \\n| ```\\n\\n\\n[[collapse]]\\n| ## SonarScanner for .NET\\n| \\n| Write the following in your workflow YAML file:\\n| \\n| ```\\n| name: Build\\n| on:\\n|   push:\\n|     branches:\\n|       - master # or the name of your main branch\\n|   pull_request:\\n|     types: [opened, synchronize, reopened]\\n| jobs:\\n|   build:\\n|     name: Build\\n|     runs-on: windows-latest\\n|     steps:\\n|       - name: Set up JDK 11\\n|         uses: actions/setup-java@v1\\n|         with:\\n|           java-version: 1.11\\n|       - uses: actions/checkout@v2\\n|         with:\\n|           fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis\\n|       - name: Cache SonarQube packages\\n|         uses: actions/cache@v1\\n|         with:\\n|           path: ~\\\\sonar\\\\cache\\n|           key: ${{ runner.os }}-sonar\\n|           restore-keys: ${{ runner.os }}-sonar\\n|       - name: Cache SonarQube scanner\\n|         id: cache-sonar-scanner\\n|         uses: actions/cache@v1\\n|         with:\\n|           path: .\\\\.sonar\\\\scanner\\n|           key: ${{ runner.os }}-sonar-scanner\\n|           restore-keys: ${{ runner.os }}-sonar-scanner\\n|       - name: Install SonarQube scanner\\n|         if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'\\n|         shell: powershell\\n|         run: |\\n|           New-Item -Path .\\\\.sonar\\\\scanner -ItemType Directory\\n|           dotnet tool update dotnet-sonarscanner --tool-path .\\\\.sonar\\\\scanner\\n|       - name: Build and analyze\\n|         env:\\n|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any\\n|         shell: powershell\\n|         run: |\\n|           .\\\\.sonar\\\\scanner\\\\dotnet-sonarscanner begin /k:\\\"example\\\" /d:sonar.login=\\\"${{ secrets.SONAR_TOKEN }}\\\" /d:sonar.host.url=\\\"${{ secrets.SONAR_HOST_URL }}\\\"\\n|           dotnet build\\n|           .\\\\.sonar\\\\scanner\\\\dotnet-sonarscanner end /d:sonar.login=\\\"${{ secrets.SONAR_TOKEN }}\\\"\\n| ```\\n\\n[[collapse]]\\n| ## SonarScanner CLI\\n| \\n| You can easily set up a basic configuration using the SonarQube Scan GitHub Action. You'll find the GitHub Action and configuration instructions on the [SonarQube Scan GitHub Action](https://github.com/marketplace/actions/official-sonarqube-scan) page on the GitHub Marketplace.\\n\\n#### **Failing the pipeline job when the Quality Gate fails**\\nYou can use the [SonarQube Quality Gate Check GitHub Action](https://github.com/marketplace/actions/sonarqube-quality-gate-check) to ensure your code meets your quality standards by failing your pipeline job when your [Quality Gate](/user-guide/quality-gates/) fails.\\n\\nIf you do not want to use the SonarQube Quality Gate Check Action, you can instruct the scanner to wait for the SonarQube Quality Gate status at the end of the analysis. To enable this, pass the `-Dsonar.qualitygate.wait=true` parameter to the scanner in the workflow YAML file.\\n\\nThis will make the analysis step poll SonarQube regularly until the Quality Gate is computed. This will increase your pipeline duration. Note that, if the Quality Gate is red, this will make the analysis step fail, even if the actual analysis itself is successful. We advise only using this parameter when necessary (for example, to block a deployment pipeline if the Quality Gate is red). It should not be used to report the Quality Gate status in a pull request, as this is already done with pull request decoration.\\n\\nYou can set the `sonar.qualitygate.timeout` property to an amount of time (in seconds) that the scanner should wait for a report to be processed. The default is 300 seconds. \\n\\n### Commit and push your code\\nCommit and push your code to start the analysis. Each new push you make on your branches or pull requests will trigger a new analysis in SonarQube.\\n\\n## Reporting your Quality Gate status in GitHub\\nAfter creating and installing your GitHub App above, SonarQube can report your Quality Gate status and analysis metrics directly to your GitHub branches and pull requests.  \\n\\nTo do this, add a project from GitHub by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and select **GitHub** from the drop-down menu.\\n\\nThen, follow the steps in SonarQube to analyze your project. SonarQube automatically sets the project settings required to show your Quality Gate in your branches and pull requests.\\n\\n[[info]]\\n| To report your Quality Gate status in your branches and pull requests, a SonarQube analysis needs to be run on your code. You can find the additional parameters required for pull request analysis on the [Pull Request Analysis](/analysis/pull-request/) page.\\n\\nIf you're creating your projects manually or adding Quality Gate reporting to an existing project, see the following section.\\n\\n### Reporting your Quality Gate status in manually created or existing projects\\nSonarQube can also report your Quality Gate status to GitHub pull requests and branches for existing and manually-created projects. After you've created and installed your GitHub App and updated your global DevOps Platform Integration settings as shown in the **Importing your GitHub repositories into SonarQube** section above, set the following project settings at **Project Settings > General Settings > DevOps Platform Integration**: \\n\\n- **Configuration name** \u2013 The configuration name that corresponds to your GitHub instance. \\n- **Repository identifier** \u2013 The path of your repository URL.\\n\\n### Advanced configuration\\n\\n[[collapse]]\\n| ## Reporting your Quality Gate status on pull requests and branches in a mono repository\\n|\\n| _Reporting Quality Gate statuses to branches and pull requests in a mono repository setup is supported starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n|\\n| In a mono repository setup, multiple SonarQube projects, each corresponding to a separate project within the mono repository, are all bound to the same GitHub repository. You'll need to set up each SonarQube project that's part of a mono repository to report your Quality Gate status.\\n|\\n| You need to set up projects that are part of a mono repository manually as shown in the **Displaying your Quality Gate status in manually created or existing project** section above. You also need to set the **Enable mono repository support** setting to true at **Project Settings > General Settings > DevOps Platform Integration**. \\n|\\n| After setting your project settings, ensure that the correct project is being analyzed by adjusting the analysis scope and pass your project names to the scanner. See the following sections for more information.\\n|\\n| ### Ensuring the correct project is analyzed\\n| You need to adjust the analysis scope to make sure SonarQube doesn't analyze code from other projects in your mono repository. To do this set up a **Source File Inclusion** for your  project at **Project Settings > Analysis Scope** with a pattern that will only include files from the appropriate folder. For example, adding `./MyFolderName/**/*` to your inclusions would only include analysis of code in the `MyFolderName` folder. See [Narrowing the Focus](/project-administration/narrowing-the-focus/) for more information on setting your analysis scope.\\n|\\n| ### Passing project names to the scanner\\n| Because of the nature of a mono repository, SonarQube scanners might read all project names of your mono repository as identical. To avoid having multiple projects with the same name, you need to pass the `sonar.projectName` parameter to the scanner. For example, if you're using the Maven scanner, you would pass `mvn sonar:sonar -Dsonar.projectName=YourProjectName`.\\n\\n[[collapse]]\\n| ## Showing your analysis summary under the GitHub Conversation tab\\n| By default, **Enable analysis summary under the GitHub Conversation tab** is on and your pull request analysis will be shown under both the **Conversation** and **Checks** tabs in GitHub. When off, your pull request analysis summary is only shown under the **Checks** tab.\\n\\n[[collapse]]\\n| ## Configuring multiple DevOps Platform instances\\n| SonarQube can report your Quality Gate status to multiple DevOps Platform instances. To do this, you need to create a configuration for each DevOps Platform instance and assign that configuration to the appropriate projects. \\n|\\n| - As part of [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can create one configuration for each DevOps Platform. \\n|\\n| - Starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html), you can create multiple configurations for each DevOps Platform. If you have multiple configurations of the same DevOps Platform connected to SonarQube, you have to create projects manually.\\n\\n[[collapse]]\\n| ## Linking issues\\n| When adding a Quality Gate status to your pull requests and branches, individual issues will be linked to their SonarQube counterparts automatically. For this to work correctly, you need to set the instance's **Server base URL** (**[Administration > Configuration > General Settings > General > General](/#sonarqube-admin#/admin/settings/)**) correctly. Otherwise, the links will default to `localhost`.\\n\\n## Authenticating with GitHub\\nTo allow users to log in with GitHub credentials, use the GitHub App that you created above (see the **Importing your GitHub repositories using a GitHub App** section for more information) and update your global SonarQube settings.\\n\\n[[info]]\\n| If you're using Community Edition or you want to use a dedicated app for GitHub authentication, see the **Creating a dedicated app for authentication** section below.\\n\\nTo update your global SonarQube settings:\\n\\nNavigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitHub > GitHub Authentication** and update the following:\\n\\n1. **Enabled** \u2013 set the switch to `true`.\\n1. **Client ID** \u2013 the Client ID is found below the GitHub App ID on your GitHub App's page.\\n1. **Client Secret** \u2013 the Client secret is found below the Client ID on your GitHub App's page.\\n  \\nNow, from the login page, your users can connect their GitHub accounts with the new \\\"Log in with GitHub\\\" button.\\n\\n### Creating a dedicated app for authentication\\nIf you want to use a dedicated app for GitHub authentication, you can create a GitHub OAuth app. You'll find general instructions for creating a GitHub OAuth App [here](https://docs.github.com/en/free-pro-team@latest/developers/apps/creating-an-oauth-app). Specify the following settings in your OAuth App:\\n\\n- **Homepage URL** \u2013 the public URL of your SonarQube server. For example, `https://sonarqube.mycompany.com`. For security reasons, HTTP is not supported, and you must use HTTPS. The public URL is configured in SonarQube at **[Administration > General > Server base URL](/#sonarqube-admin#/admin/settings)**.\\n- **Authorization callback URL** \u2013 your instance's base URL. For example, `https://yourinstance.sonarqube.com`.\\n\\nAfter creating your app, update your global SonarQube settings: \\n\\nNavigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitHub > GitHub Authentication** and update the following:\\n\\n1. **Enabled** \u2013 set the switch to `true`.\\n1. **Client ID** \u2013 the Client ID is found below the GitHub App ID on your GitHub App's page.\\n1. **Client Secret** \u2013 the Client secret is found below the Client ID on your GitHub App's page.\\n  \\nNow, from the login page, your users can connect their GitHub accounts with the new \\\"Log in with GitHub\\\" button.\\n\"},{\"path\":\"analysis/gitlab-integration\",\"content\":\"---\\ntitle: GitLab Integration\\nurl: /analysis/gitlab-integration/\\n---\\n\\nSonarQube's integration with GitLab Self-Managed and GitLab.com allows you to maintain code quality and security in your GitLab projects.\\n\\nWith this integration, you'll be able to:\\n\\n- **Authenticate with GitLab** - Sign in to SonarQube with your GitLab credentials.\\n- **Import your GitLab projects** - Import your GitLab Projects into SonarQube to easily set up SonarQube projects.  \\n- **Analyze projects with GitLab CI/CD** - Integrate analysis into your build pipeline. Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), SonarScanners running in GitLab CI/CD jobs can automatically detect branches or merge requests being built so you don't need to specifically pass them as parameters to the scanner.\\n- **Report your Quality Gate status to your merge requests** - (starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)) See your Quality Gate and code metric results right in GitLab so you know if it's safe to merge your changes.\\n\\n## Prerequisites\\nIntegration with GitLab Self-Managed requires at least GitLab Self-Managed version 11.7.\\n\\n### Branch Analysis\\nCommunity Edition doesn't support the analysis of multiple branches, so you can only analyze your main branch. Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can analyze multiple branches and merge requests.\\n\\n## Authenticating with GitLab\\nYou can delegate authentication to GitLab using a dedicated GitLab OAuth application.\\n\\n### Creating a GitLab OAuth app\\nYou can find general instructions for creating a GitLab OAuth app [here](https://docs.gitlab.com/ee/integration/oauth_provider.html).\\n\\nSpecify the following settings in your OAuth app:\\n\\n- **Name** \u2013 your app's name, such as SonarQube.\\n- **Redirect URI** \u2013 enter your SonarQube URL with the path `/oauth2/callback/gitlab`. For example, `https://sonarqube.mycompany.com/oauth2/callback/gitlab`.\\n- **Scopes** \u2013 select **api** if you plan to enable group synchronization. Select **read_user** if you only plan to delegate authentication.\\n\\nAfter saving your application, GitLab takes you to the app's page. Here you find your **Application ID** and **Secret**. Keep these handy, open your SonarQube instance, and navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitLab > Authentication**. Set the following settings to finish setting up GitLab authentication:\\n\\n- **Enabled** \u2013 set to `true`.\\n- **Application ID** \u2013 the Application ID is found on your GitLab app's page.\\n- **Secret** \u2013 the Secret is found on your GitLab app's page.\\n\\nOn the login form, the new \\\"Log in with GitLab\\\" button allows users to connect with their GitLab accounts.\\n\\n### GitLab group synchronization\\nEnable **Synchronize user groups** at **Administration > Configuration > General Settings > DevOps Platform Integrations > GitLab** to associate GitLab groups with existing SonarQube groups of the same name. GitLab users inherit membership to subgroups from parent groups. \\n\\nTo synchronize a GitLab group or subgroup with a SonarQube group, name the SonarQube group with the full path of the GitLab group or subgroup URL. \\n\\nFor example, with the following GitLab group setup:\\n\\n- GitLab group = My Group\\n- GitLab subgroup = My Subgroup\\n- GitLab subgroup URL = `https://YourGitLabURL.com/my-group/my-subgroup`\\n\\nYou should name your SonarQube group `my-group` to synchronize it with your GitLab group and `my-group/my-subgroup` to synchronize it with your GitLab subgroup.\\n\\n## Importing your GitLab projects into SonarQube\\nSetting up the import of GitLab projects into SonarQube allows you to easily create SonarQube projects from your GitLab projects. If you're using [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) or above, this is also the first step in adding merge request decoration.\\n\\nTo set up the import of GitLab projects:\\n\\n1. Set your global settings\\n1. Add a personal access token for importing repositories\\n\\n### Setting your global settings\\nTo import your GitLab projects into SonarQube, you need to first set your global SonarQube settings. Navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations**, select the **GitLab** tab, and specify the following settings:\\n \\n- **Configuration Name** (Enterprise and Data Center Edition only) \u2013 The name used to identify your GitLab configuration at the project level. Use something succinct and easily recognizable.\\n- **GitLab URL** \u2013 The GitLab API URL.\\n- **Personal Access Token** \u2013 A GitLab user account is used to decorate Merge Requests. We recommend using a dedicated GitLab account with at least **Reporter** [permissions](https://docs.gitlab.com/ee/user/permissions.html) (the account needs permission to leave comments). Use a personal access token from this account with the **api** scope authorized for the repositories you're analyzing. Administrators can encrypt this token at **Administration > Configuration > Encryption**. See the **Settings Encryption** section of the [Security](/instance-administration/security/) page for more information.\\n\\n   This personal access token is used to report your Quality Gate status to your pull requests. You'll be asked for another personal access token for importing projects in the following section. \\n\\n### Adding a personal access token for importing projects\\nAfter setting these global settings, you can add a project from GitLab by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and selecting **GitLab**.\\n\\nThen, you'll be asked to provide a personal access token with `read_api` scope so SonarQube can access and list your GitLab projects. This token will be stored in SonarQube and can be revoked at anytime in GitLab.\\n\\nAfter saving your Personal Access Token, you'll see a list of your GitLab projects that you can **set up** to add them to SonarQube. Setting up your projects this way also sets your project settings for merge request decoration. \\n\\nFor information on analyzing your projects with GitLab CI/CD, see the following section.\\n\\n## Analyzing projects with GitLab CI/CD\\nSonarScanners running in GitLab CI/CD jobs can automatically detect branches or merge requests being built so you don't need to specifically pass them as parameters to the scanner.\\n\\nTo analyze your projects with GitLab CI/CD, you need to:\\n- Set your environment variables.\\n- Configure your gilab-ci.yml file.\\n\\nThe following sections detail these steps.\\n\\n[[warning]]\\n| You need to disable git shallow clone to make sure the scanner has access to all of your history when running analysis with GitLab CI/CD. For more information, see [Git shallow clone](https://docs.gitlab.com/ee/user/project/pipelines/settings.html#git-shallow-clone).\\n\\n### Setting environment variables \\nYou can set environment variables securely for all pipelines in GitLab's settings. See GitLab's documentation on [Creating a Custom Environment Variable](https://docs.gitlab.com/ee/ci/variables/#creating-a-custom-environment-variable) for more information.\\n \\nYou need to set the following environment variables in GitLab for analysis:\\n \\n- `SONAR_TOKEN` \u2013 Generate a SonarQube [token](/user-guide/user-token/) for GitLab and create a custom environment variable in GitLab with `SONAR_TOKEN` as the **Key** and the token you generated as the **Value**. \\n\\n- `SONAR_HOST_URL` \u2013 Create a custom environment variable with `SONAR_HOST_URL` as the **Key** and your SonarQube server URL as the **Value**.\\n\\n### Configuring your gitlab-ci.yml file\\n\\nThis section shows you how to configure your GitLab CI/CD `gitlab-ci.yml` file. The `allow_failure` parameter in the examples allows a job to fail without impacting the rest of the CI suite.\\n\\nYou'll set up your build according to your SonarQube edition:\\n\\n- **Community Edition** \u2013 Community Edition doesn't support multiple branches, so you should only analyze your main branch. You can restrict analysis to your main branch by adding the branch name to the `only` parameter in your .yml file.\\n\\n- **Developer Edition and above** By default, GitLab will build all branches but not Merge Requests. To build Merge Requests, you need to update the `.gitlab-ci.yml` file by adding `merge_requests` to the `only` parameter in your .yml. See the example configurations below for more information.\\n\\nClick the scanner you're using below to expand an example configuration:\\n\\n[[collapse]]\\n| ## SonarScanner for Gradle\\n| ```\\n| sonarqube-check:\\n|   image: gradle:jre11-slim\\n|   variables:\\n|     SONAR_USER_HOME: \\\"${CI_PROJECT_DIR}/.sonar\\\"  # Defines the location of the analysis task cache\\n|     GIT_DEPTH: \\\"0\\\"  # Tells git to fetch all the branches of the project, required by the analysis task\\n|   cache:\\n|     key: \\\"${CI_JOB_NAME}\\\"\\n|     paths:\\n|       - .sonar/cache\\n|   script: gradle sonarqube -Dsonar.qualitygate.wait=true\\n|   allow_failure: true\\n|   only:\\n|     - merge_requests\\n|     - master # or the name of your main branch\\n|     - develop\\n| ```\\n \\n[[collapse]]\\n| ## SonarScanner for Maven\\n| \\n| ```\\n| sonarqube-check:\\n|   image: maven:3.6.3-jdk-11\\n|   variables:\\n|     SONAR_USER_HOME: \\\"${CI_PROJECT_DIR}/.sonar\\\"  # Defines the location of the analysis task cache\\n|     GIT_DEPTH: \\\"0\\\"  # Tells git to fetch all the branches of the project, required by the analysis task\\n|   cache:\\n|     key: \\\"${CI_JOB_NAME}\\\"\\n|     paths:\\n|       - .sonar/cache\\n|   script:\\n|     - mvn verify sonar:sonar -Dsonar.qualitygate.wait=true\\n|   allow_failure: true\\n|   only:\\n|     - merge_requests\\n|     - master # or the name of your main branch\\n|     - develop\\n| ```\\n\\n[[collapse]]\\n| ## SonarScanner CLI\\n| \\n| ```\\n| sonarqube-check:\\n|   image:\\n|     name: sonarsource/sonar-scanner-cli:latest\\n|     entrypoint: [\\\"\\\"]\\n|   variables:\\n|     SONAR_USER_HOME: \\\"${CI_PROJECT_DIR}/.sonar\\\"  # Defines the location of the analysis task cache\\n|     GIT_DEPTH: \\\"0\\\"  # Tells git to fetch all the branches of the project, required by the analysis task\\n|   cache:\\n|     key: \\\"${CI_JOB_NAME}\\\"\\n|     paths:\\n|       - .sonar/cache\\n|   script:\\n|     - sonar-scanner -Dsonar.qualitygate.wait=true\\n|   allow_failure: true\\n|   only:\\n|     - merge_requests\\n|     - master # or the name of your main branch\\n|     - develop\\n| ```\\n|\\n|\\n| **Project key**  \\n| A project key has to be provided through `sonar-project.properties` or through the command line parameter. For more information, see the [SonarScanner](/analysis/scan/sonarscanner/) documentation.\\n|\\n| **Self-signed certificates**  \\n| If you secure your SonarQube instance with a self-signed certificate, you may need to build a custom image based on `sonarsource/sonar-scanner-cli`. See the section **Advanced Docker Configuration** within the [SonarScanner](/analysis/scan/sonarscanner/) documentation.\\n|\\n\\n#### **Failing the pipeline job when the Quality Gate fails**\\nIn order for the Quality Gate to fail on the GitLab side when it fails on the SonarQube side, the scanner needs to wait for the SonarQube Quality Gate status. To enable this, set the `sonar.qualitygate.wait=true` parameter in the `.gitlab-ci.yml` file. \\n\\nYou can set the `sonar.qualitygate.timeout` property to an amount of time (in seconds) that the scanner should wait for a report to be processed. The default is 300 seconds. \\n\\n### For more information\\nFor more information on configuring your build with GitLab CI/CD, see the [GitLab CI/CD Pipeline Configuration Reference](https://gitlab.com/help/ci/yaml/README.md).\\n\\n## Reporting your Quality Gate status in GitLab\\n\\nAfter you've set up SonarQube to import your GitLab projects as shown in the previous section, SonarQube can report your Quality Gate status and analysis metrics directly to GitLab.\\n\\nTo do this, add a project from GitLab by clicking the **Add project** button in the upper-right corner of the **Projects** homepage and select **GitLab** from the drop-down menu.\\n\\nThen, follow the steps in SonarQube to analyze your project. SonarQube automatically sets the project settings required to show your Quality Gate in your merge requests.\\n\\n[[info]]\\n| To report your Quality Gate status in your merge requests, a SonarQube analysis needs to be run on your code. You can find the additional parameters required for merge request analysis on the [Pull Request Analysis](/analysis/pull-request/) page.\\n\\nIf you're creating your projects manually or adding Quality Gate reporting to an existing project, see the following section.\\n\\n### Reporting your Quality Gate status in manually created or existing projects\\nSonarQube can also report your Quality Gate status to GitLab merge requests for existing and manually-created projects. After you've updated your global settings as shown in the **Importing your GitLab projects into SonarQube** section above, set the following project settings at **Project Settings > General Settings > DevOps Platform Integration**: \\n\\n- **Configuration name** \u2013 The configuration name that corresponds to your GitLab instance. \\n- **Project ID** \u2013 your GitLab Project ID found in GitLab\\n\\n### Advanced configuration\\n\\n[[collapse]]\\n| ## Reporting your Quality Gate status on pull requests in a mono repository\\n|\\n| _Reporting Quality Gate statuses to merge requests in a mono repository setup is supported starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n|\\n| In a mono repository setup, multiple SonarQube projects, each corresponding to a separate project within the mono repository, are all bound to the same Bitbucket Cloud repository. You'll need to set up each SonarQube project that's part of a mono repository to report your Quality Gate status.\\n|\\n| You need to set up projects that are part of a mono repository manually as shown in the **Displaying your Quality Gate status in manually created or existing project** section above. You also need to set the **Enable mono repository support** setting to true at **Project Settings > General Settings > DevOps Platform Integration**.\\n|\\n| After setting your project settings, ensure the correct project is being analyzed by adjusting the analysis scope and pass your project names to the scanner. See the following sections for more information.\\n|\\n| ### Ensuring the correct project is analyzed\\n| You need to adjust the analysis scope to make sure SonarQube doesn't analyze code from other projects in your mono repository. To do this set up a **Source File Inclusion** for your  project at **Project Settings > Analysis Scope** with a pattern that will only include files from the appropriate folder. For example, adding `./MyFolderName/**/*` to your inclusions would only include analysis of code in the `MyFolderName` folder. See [Narrowing the Focus](/project-administration/narrowing-the-focus/) for more information on setting your analysis scope.\\n|\\n| ### Passing project names to the scanner\\n| Because of the nature of a mono repository, SonarQube scanners might read all project names of your mono repository as identical. To avoid having multiple projects with the same name, you need to pass the `sonar.projectName` parameter to the scanner. For example, if you're using the Maven scanner, you would pass `mvn sonar:sonar -Dsonar.projectName=YourProjectName`.\\n\\n[[collapse]]\\n| ## Configuring multiple DevOps Platform instances\\n| SonarQube can report your Quality Gate status to multiple DevOps Platform instances. To do this, you need to create a configuration for each DevOps Platform instance and assign that configuration to the appropriate projects. \\n|\\n| - As part of [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can create one configuration for each DevOps Platform. \\n|\\n| - Starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html), you can create multiple configurations for each DevOps Platform. If you have multiple configurations of the same DevOps Platform connected to SonarQube, you have to create projects manually.\\n\\n[[collapse]]\\n| ## Linking issues\\n| When adding a Quality Gate status to your merge requests, individual issues will be linked to their SonarQube counterparts automatically. For this to work correctly, you need to set the instance's **Server base URL** (**[Administration > Configuration > General Settings > General > General](/#sonarqube-admin#/admin/settings/)**) correctly. Otherwise, the links will default to `localhost`.\\n\"},{\"path\":\"analysis/jenkins\",\"content\":\"---\\ntitle: Jenkins Integration\\nurl: /analysis/jenkins/\\n---\\n\\nSonarScanners running in Jenkins can automatically detect branches and Merge or pull requests in certain jobs. You don't need to explicitly pass the branch or pull request details.\\n\\n## Analysis Prerequisites\\n\\nTo run project analysis with Jenkins, you need to install and configure the following Jenkins plugins _in Jenkins_:\\n \\n- The SonarQube Scanner plugin.\\n- The Branch Source plugin that corresponds to your DevOps Platform (Bitbucket Server, GitHub, or GitLab) if you're analyzing multibranch pipeline jobs in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) or above. \\n\\nSee the **Installing and Configuring your Jenkins plugins** section below for more information.\\n\\n## Installing and Configuring your Jenkins plugins\\n\\n### SonarQube Scanner plugin\\n\\nClick SonarQube Scanner below to expand instructions on installing and configuring the plugin.\\n \\n[[collapse]]\\n| ## SonarQube Scanner\\n|\\n| [SonarQube Scanner plugin](https://plugins.jenkins.io/sonar/) version 2.11 or later is required. \\n|\\n| 1. From the Jenkins Dashboard, navigate to **Manage Jenkins > Manage Plugins** and install the **SonarQube Scanner** plugin.\\n| 1. Back at the Jenkins Dashboard, navigate to **Credentials > System** from the left navigation. \\n| 1. Click the **Global credentials (unrestricted)** link in the **System** table. \\n| 1. Click **Add credentials** in the left navigation and add the following information:\\n| \\t- **Kind**: Secret Text\\n| \\t- **Scope**: Global  \\n| \\t- **Secret**: Generate a token at **User > My Account > Security** in SonarQube, and copy and paste it here.\\n| 1. Click **OK**.\\n| 1. From the Jenkins Dashboard, navigate to **Manage Jenkins > Configure System**. \\n| 1. From the **SonarQube Servers** section, click **Add SonarQube**. Add the following information:\\n| \\t- **Name**: Give a unique name to your SonarQube instance.\\n| \\t- **Server URL**: Your SonarQube instance URL.\\n| \\t- **Credentials**: Select the credentials created during step 4.\\n| 1. Click **Save**\\n\\n### Branch Source plugin\\n_Required to analyze multibranch pipeline jobs in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) or above_\\n\\nClick your DevOps Platform below to expand the instructions on installing and configuring the Branch Source plugin.\\n\\n[[collapse]]\\n| ## BitBucket Server\\n|\\n| [Bitbucket Branch Source plugin](https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/) version 2.7 or later is required\\n| \\n| From the Jenkins Dashboard, navigate to **Manage Jenkins > Manage Plugins** and install the **Bitbucket Branch Source** plugin. Then configure the following:\\n|\\n| 1. From the Jenkins Dashboard, navigate to **Manage Jenkins > Configure System**. \\n| 1. From the **Bitbucket Endpoints** section, Click the **Add** drop-down menu and select **Bitbucket Server**. Add the following information:\\n| \\t- **Name**: Give a unique name to your Bitbucket Server instance.\\n| \\t- **Server URL**: Your Bitbucket Server instance URL.\\n| 1. Click **Save**.\\n\\n[[collapse]]\\n| ## BitBucket Cloud\\n|\\n| [Bitbucket Branch Source plugin](https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/) version 2.7 or later is required\\n|\\n| From the Jenkins Dashboard, navigate to **Manage Jenkins > Manage Plugins** and install the **Bitbucket Branch Source** plugin. \\n\\n[[collapse]]\\n| ## GitHub\\n|\\n| [GitHub Branch Source plugin](https://plugins.jenkins.io/github-branch-source/) version 2.7.1 or later is required\\n| \\n| 1. From the Jenkins Dashboard, navigate to **Manage Jenkins > Manage Plugins** and install the **GitHub Branch Source** plugin.\\n| 1. From the Jenkins Dashboard, navigate to **Manage Jenkins > Configure System**. \\n| 1. From the **GitHub** or **GitHub Enterprise Servers** section, add your GitHub server.\\n| 1. Click **Save**.\\n\\n[[collapse]]\\n| ## GitLab\\n|\\n| [GitLab Branch Source plugin](https://plugins.jenkins.io/gitlab-branch-source/) version 1.5.3 or later is required\\n| \\n| 1. From the Jenkins Dashboard, navigate to **Manage Jenkins > Manage Plugins** and install the **GitLab Branch Source** plugin.\\n| 1. From the Jenkins Dashboard, navigate to **Manage Jenkins > Configure System**. \\n| 1. From the **GitLab** section, add your GitLab server. Make sure to check the **Manage Web Hooks** checkbox.\\n| 1. Click **Save**.\\n\\n### Configuring Jenkins through the SonarQube tutorial\\n\\nYou can easily configure and analyze your projects with Jenkins through the tutorial in SonarQube. \\n\\n[[info]]\\n| You need to set up SonarQube to import your repositories before accessing the tutorial. See the **DevOps Platform Integrations** in the left-side navigation of this documentation for more information.\\n|\\n| A tutorial is currently available for all supported DevOps Platforms except Azure DevOps.\\n\\nTo access the tutorial:\\n\\n1. Click the **Add project** drop-down in the upper-right corner of the **Projects** page in SonarQube and select your DevOps platform.\\n1. Select the repository you want to import into SonarQube.\\n1. When asked **How do you want to analyze your repository?**, select **With Jenkins**.\\n\\nSee the **Installing and Configuring your Jenkins plugins** section below to set up your Jenkins plugins before going through the tutorial. \\n\\n## Configuring Single Branch Pipeline jobs\\nWith Community Edition, you can only analyze a single branch. For more information, see the [SonarScanner for Jenkins](/analysis/scan/sonarscanner-for-jenkins/) documentation.\\n\\n## Configuring Multibranch Pipeline jobs \\n \\nStarting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can analyze multiple branches and Pull Requests. The automatic configuration of branches and Pull Requests relies on environment variables available in Multibranch Pipeline jobs. These are set based on information exported by Jenkins plugins. \\n\\nFor configuration examples, see the [SonarScanner for Jenkins](/analysis/scan/sonarscanner-for-jenkins/) documentation.\\n\\n### Configuring Multibranch Pipeline jobs for Pull Request Decoration\\nYou need to configure your Multibranch Pipeline job correctly to avoid issues with Pull Request decoration. From your Multibranch Pipeline job in Jenkins, go to **Configure > Branch Sources > Behaviors**.\\n\\nFor Bitbucket and GitHub, under **Discover pull requests from origin**, make sure **The current pull request revision** is selected.\\n\\nFor GitLab, under **Discover merge requests from origin**, make sure **The current merge request revision** is selected.\\n\"},{\"path\":\"analysis/languages/abap\",\"content\":\"---\\ntitle: ABAP\\nurl: /analysis/languages/abap/\\n---\\n\\n_ABAP analysis is available starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)._\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the ABAP-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > ABAP](/#sonarqube-admin#/admin/settings?category=abap)**\\n\\n## Source Code Extraction\\n\\nIn order to analyze your source code with SonarQube you need to first extract it from SAP onto a filesystem. You can use your own tool or an open source tool; SonarSource does not provide any connectors or source code extraction tools.\\n\"},{\"path\":\"analysis/languages/apex\",\"content\":\"---\\ntitle: Apex\\nurl: /analysis/languages/apex/\\n---\\n\\n<!-- sonarqube -->\\n\\n_Apex analysis is available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n\\n<!-- /sonarqube -->\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the Apex-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud -->[**Administration > General Settings > Apex**](/#sonarqube-admin#/admin/settings?category=apex)\\n\\n## Related Pages\\n\\n- [Importing External Issues](/analysis/external-issues/) (PMD Apex)\\n- [Test Coverage & Execution](/analysis/coverage/) (For Salesforce DX project)\\n\"},{\"path\":\"analysis/languages/cfamily\",\"content\":\"---\\ntitle: C/C++/Objective-C\\nurl: /analysis/languages/cfamily/\\n---\\n\\n_C/C++/Objective-C analysis is available starting with [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)._\\n\\n\\n\\nC/C++/Objective-C analysis is officially registered as [CWE Compatible](https://cwe.mitre.org/compatible/).\\n\\n## Supported Compilers, Language Standards and Operating Systems\\n* Any version of Clang, GCC and Microsoft C/C++ compilers\\n* Any version of Intel compiler for Linux and macOS\\n* ARM5 and ARM6 compilers\\n* IAR compiler for ARM, Renesas RL78, Renesas RX, Renesas V850, Texas Instruments MSP430 and for 8051\\n* Compilers based wholly on GCC including for instance Linaro GCC and WindRiver GCC are also supported\\n* C89, C99, C11, C++03, C++11, C++14 and C++17 standards\\n* GNU extensions\\n* Microsoft Windows, Linux and macOS for runtime environment\\n\\n## Language-Specific Properties\\n\\nDiscover and update the C/C++/Objective-C specific properties in: <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > C / C++ / Objective-C](/#sonarqube-admin#/admin/settings?category=c+%2F+c%2B%2B+%2F+objective-c)**\\n\\n## Prerequisites\\n### Build Wrapper\\nAnalysis of C/C++/Objective-C projects requires the **SonarQube Build Wrapper**. It gathers all the configuration required for correct analysis of C/C++/Objective-C projects (such as macro definitions, include directories, \u2026) directly from your project's build process. The Build Wrapper does not impact your build; it merely eavesdrops on it and writes what it learns into files a directory you specify. \\n\\n<!-- sonarqube -->\\nYou can download the *Build Wrapper* directly from your SonarQube server, so that its version perfectly matches your version of the plugin. \\n* Download *Build Wrapper* for Linux from [{SonarQube URL}/static/cpp/build-wrapper-linux-x86.zip](/#sonarqube#/static/cpp/build-wrapper-linux-x86.zip)\\n* Download *Build Wrapper* for macOS from [{SonarQube URL}/static/cpp/build-wrapper-macosx-x86.zip](/#sonarqube#/static/cpp/build-wrapper-macosx-x86.zip)\\n* Download *Build Wrapper* for Windows from [{SonarQube URL}/static/cpp/build-wrapper-win-x86.zip](/#sonarqube#/static/cpp/build-wrapper-win-x86.zip)\\n<!-- /sonarqube -->\\n<!-- sonarcloud -->\\nYou can download the *Build Wrapper* directly from SonarCloud:\\n* [Download *Build Wrapper* for Linux](https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip)\\n* [Download *Build Wrapper* for macOS](https://sonarcloud.io/static/cpp/build-wrapper-macosx-x86.zip)\\n* [Download *Build Wrapper* for Windows](https://sonarcloud.io/static/cpp/build-wrapper-win-x86.zip)\\n<!-- /sonarcloud -->\\n\\n\\nUnzip the downloaded *Build Wrapper* and configure it in your `PATH` because doing so is just more convenient.\\n\\n### SonarQube Scanner\\nAnalysis of C/C++/Objective-C projects requires the [*SonarScanner*](https://redirect.sonarsource.com/doc/install-configure-scanner.html) CLI.\\n\\n## Analysis Steps\\n* If you use macOS or Linux operating systems make sure your source tree is in a directory called `src`\\n* Add execution of the *Build Wrapper* as a prefix to your usual build command (the examples below use `make`, `xcodebuild` and `MSBuild`, but any build tool that performs a full build can be used)\\n   ```\\n   // example for linux\\n   build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean all \\n   // example for macOS\\n   build-wrapper-macosx-x86 --out-dir build_wrapper_output_directory xcodebuild clean build\\n   // example for Windows\\n   build-wrapper-win-x86-64.exe --out-dir  build_wrapper_output_directory MSBuild.exe /t:Rebuild\\n   ```\\n* In the *sonar-project.properties* file at the root of your project add the property `sonar.cfamily.build-wrapper-output` with the path to the *Build Wrapper* output directory relative to the project directory (`build_wrapper_output_directory` in these examples). \\n\\n   Sample *sonar-project.properties*:\\n   ```\\n   sonar.projectKey=myFirstProject\\n   sonar.projectName=My First C++ Project\\n   sonar.projectVersion=1.0\\n   sonar.sources=src\\n   sonar.cfamily.build-wrapper-output=build_wrapper_output_directory\\n   sonar.sourceEncoding=UTF-8\\n   ```\\n* Execute the SonarScanner (`sonar-scanner`) from the root directory of the project\\n   ```\\n   sonar-scanner\\n   ```\\n* Follow the link provided at the end of the analysis to browse your project's quality metrics in the UI\\n\\n## Multithreaded Code Scan \\n\\nIt is possible to use all the cores available on the machine running the code scan. This can be activated by configuring the property `sonar.cfamily.threads` at the scanner level. Its default value is 1.\\n\\n* This feature must not be activated on a machine with only 1 core.\\n\\n* The analyzer will not guess which value is most suitable for your project. It's up to you to test and find the best value.\\n\\n* If a build machine with 2 cores is already configured to potentially run two code scans at the same time, there is no guarantee that configuring `sonar.cfamily.threads=2` will bring the expected performance benefits. It can even be worse than running with the default value.\\n\\n* The multithreaded execution requires more memory than single-threaded execution.\\n\\n* A machine with 64 cores configured with `sonar.cfamily.threads=64` is not certain to bring a large performance gain compared to a machine with 32 cores. The performance tradeoff will vary depending on the machine, project and setup, so some testing will be required to decide if the performance gain justifies moving to a larger machine.\\n\\n## Solution with a Mix of C# and C++\\n\\nWhen you have a Solution made of C++ and C#, to both use the SonarQube *Build Wrapper* and have an accurate analysis of the C# code, you must to use the [SonarScanner for MSBuild](https://github.com/SonarSource/sonar-scanner-msbuild).\\nNote that in this scenario source code stored in shared folders, not considered as a \\\"Project\\\" by Visual Studio, won't be scanned.\\n\\n* Download and install both the [SonarScanner for MSBuild](https://redirect.sonarsource.com/doc/install-configure-scanner-msbuild.html) and the SonarQube *Build Wrapper* (see *Prerequisites* section).\\n* Execute the SonarQube Scanner for MSBuild `begin` step\\n* Add execution of *Build Wrapper* to your normal MSBuild build command\\n* Execute the SonarQube Scanner for MSBuild `end` step to complete the analysis\\n\\nFor example:\\n```\\nSonarScanner.MSBuild.exe begin /k:\\\"cs-and-cpp-project-key\\\" /n:\\\"My C# and C++ project\\\" /v:\\\"1.0\\\" /d:sonar.cfamily.build-wrapper-output=\\\"bw_output\\\"\\nbuild-wrapper-win-x86-64.exe --out-dir bw_output MSBuild.exe /t:Rebuild\\nSonarScanner.MSBuild.exe end\\n```\\n\\n## Measures for Header Files\\nEach time we analyze a header file as part of a compilation unit, we compute for this header the measures: statements, functions, classes, cyclomatic complexity and cognitive complexity. That means that each measure may be computed more than once for a given header. In that case, we store the largest value for each measure.\\n\\n## Building with Bazel\\n\\n[Bazel](https://www.bazel.build/) recommends that you use the [`--batch`](https://docs.bazel.build/versions/master/bazel-user-manual.html#flag--batch) option when running in a Continuous Build context. When using the *BuildWrapper*, you are in such context. Also, you need to deactivate the [\\\"sandbox\\\"](https://docs.bazel.build/versions/master/bazel-user-manual.html#sandboxing) mechanism of *Bazel* so that the compiled file paths could be retrieved after the compilation phase.\\nHere is an example of the *BuildWrapper* command with Bazel parameters on macOS:\\n```\\nbuild-wrapper-macosx-x86 --out-dir bw bazel\\n  --batch\\n  --spawn_strategy=standalone\\n  --genrule_strategy=standalone\\n  --bazelrc=/dev/null build\\n  //main:hello-world\\n```\\n\\n## Related Pages\\n* [Test Coverage & Execution](/analysis/coverage/) (CPPUnit, GCOV, llvm-cov, Visual Studio, Bullseye)\\n* [Sample project](https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner-build-wrapper-linux) for C/C++ (Linux)\\n* [Sample project](https://github.com/SonarSource/sonar-scanning-examples/tree/master/objc-llvm-coverage) for Objective-C\\n* [SonarScanner for Azure Devops](https://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html) (analyzing Visual C++ project)\\n\"},{\"path\":\"analysis/languages/cobol\",\"content\":\"---\\ntitle: COBOL\\nurl: /analysis/languages/cobol/\\n---\\n\\n_Cobol analysis is available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n\\n\\n## Language-Specific Properties\\n\\nYou can discover and update the COBOL-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > Cobol](/#sonarqube-admin#/admin/settings?category=cobol)**\\n\\n## Source Code Extraction\\n\\nIn order to analyze your source code with SonarQube you need to first extract it onto a filesystem. You can use your own tool or an open source tool; SonarSource does not provide any connectors or source code extraction tools.\\n\\n## Advanced Configuration\\n\\n### Defining Source Code Format\\n\\nThe supported source code formats are:\\n\\n- Fixed format\\n- Free format\\n- Variable format\\n\\nTo set the format, go to <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > Cobol](/#sonarqube-admin#/admin/settings?category=cobol)** and set the \\\"Source format\\\" property.\\n\\nThe fixed format has three main areas:\\n\\n```\\nArea1 | Area2                                           | Area3\\n000100* MY COMMENT\\n000100 IDENTIFICATION DIVISION.\\n000200 PROGRAM-ID. HELLOWORLD.                          *xxx\\n100000 PROCEDURE DIVISION.                              *yyy\\n100100\\n100200 START.\\n100400 DISPLAY \\\"HELLO COBOL !\\\" LINE 42 POSITION 12.\\n100500 STOP RUN.\\n```\\n\\nAreas #1 and #3 contain non-significant characters.\\nArea #2 contains the source code. The first character of Area #2 is the Indicator Area, which has a special meaning (for instance `*` means that the line is a comment line, `D` means that the line is only taken into account in debug mode, etc.).\\n\\nThe free format:\\n\\n```\\nArea1 | Area2\\n      * MY COMMENT\\n       IDENTIFICATION DIVISION.\\n         PROGRAM-ID. HELLOWORLD.\\n       PROCEDURE DIVISION.\\n         DISPLAY \\\"HELLO COBOL !\\\" LINE 42 POSITION 12.\\n         STOP RUN.\\n```\\n\\nThe Indicator Area that has a special meaning (for instance `*` means that the line is a comment line, `D` means that the line in only taken into account in debug mode, etc.) is located at column 0. The size of the source code area is not limited.\\n\\nVariable format is also supported: it's similar to the fixed format but without Area #3.\\n\\n### Defining COBOL Dialect\\n\\nGo to <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > Cobol](/#sonarqube-admin#/admin/settings?category=cobol)** and set the \\\"Dialect\\\" property.\\n\\nThe COBOL analyzer supports the following dialects:\\n\\n- `bull-gcos-cobol`\\n- `hp-tandem-cobol`\\n- `ibm-os/vs-cobol`\\n- `ibm-ile-cobol`\\n- `ibm-cobol/ii`\\n- `ibm-cobol/400`\\n- `ibm-enterprise-cobol`\\n- `microfocus-cobol`\\n- `microfocus-acucobol-gt-cobol`\\n- `opencobol/cobol-it`\\n\\n### Making Copybooks Available to the Analysis\\n\\nCopybooks are, by definition, COBOL files that are not syntactically valid by themselves. However, copybooks are usually needed to properly parse COBOL programs. Thus, paths to the copybooks must be listed through the `sonar.cobol.copy.directories` property.\\n\\n### Raising Issues Against Copybooks\\n\\nTo have copybooks imported into a project, and issues logged against them, the copybook directories must be added to `sonar.sources` AND the copybook file suffixes must be added to `sonar.cobol.file.suffixes`. E.G.:\\n\\n```\\nsonar.sources=cobol,copy1,commonCopy\\nsonar.cobol.file.suffixes=cbl,cpy\\nsonar.cobol.copy.suffixes=cpy\\nsonar.cobol.copy.directories=copy1,commonCopy\\n```\\n\\nIn the case where a number of projects share a common set of copybooks, it may not be desirable to increment each project\u2019s technical debt with the issues from the common copybooks. In such cases, the directory holding the common copybooks should be listed in `sonar.cobol.copy.directories` (as before) but left out of sonar.sources, E.G.:\\n\\n```\\nsonar.sources=cobol,copy1\\nsonar.cobol.file.suffixes=cbl,cpy\\nsonar.cobol.copy.suffixes=cpy\\nsonar.cobol.copy.directories=copy1,commonCopy\\n```\\n\\n### Analyzing without file suffixes\\n\\nNote that it is possible to analyze a COBOL project without file suffixes. To do this, remove the two suffix-related properties from your configuration and substitute the following setting for `sonar.lang.patterns.cobol`:\\n\\n```\\nsonar.lang.patterns.cobol=**/*\\n```\\n\\n### Switching Off Issues\\n\\nThere are three ways to switch off issues:\\n\\n- Flagging issues as [false positive](/user-guide/issues/)\\n- [Ignoring the issues](/project-administration/narrowing-the-focus/)\\n- Using the `NOSONAR` tag. To switch off an issue, place the `NOSONAR` tag in a comment line located right before the line containing the issue. Example:\\n\\n```\\n* NOSONAR, in such case call to GO TO is tolerated, blabla...\\n GO TO MY_PARAGRAPH.\\n```\\n\\n### ACUCOBOL-GT Source Code Control Directives\\n\\nThe COBOL analyzer supports the ACUCOBOL-GT\u2019s Source Code Control directives. This mechanism allows you to conditionally modify the program at compile time by excluding or including lines. This can be used to maintain different versions of the program, perhaps to support different machine environments.\\n\\nThe `-Si` (include) flag controls the actions of the source code control system. It must be followed by an argument that specifies a pattern that the compiler will search for in the Identification Area of each source line. If the pattern is found, then the line will be included in the source program, even if it is a comment line. However, if the pattern is immediately preceded by an exclamation point, then the line will be excluded from the source (i.e., commented out).\\n\\nThe `-Sx` (exclude) flag works the same way except that its meaning is reversed (lines with the pattern will be commented out and lines with a preceding exclamation point will be included).\\n\\nFor example, suppose a program is being maintained for both the UNIX and VMS environments. The following piece of code is in the program:\\n\\n```\\nMOVE \\\"SYS$HELP:HELPFILE\\\" TO FILE-NAME.  VMS\\n*MOVE \\\"/etc/helpfile\\\" TO FILE-NAME.     UNX\\nOPEN INPUT HELP-FILE.\\n```\\n\\nThis program fragment is ready to be compiled for the VMS system. If a UNIX version is desired, then the following flags will correct the source during compilation:\\n\\n```\\n-Si UNX -Sx VMS\\n```\\n\\nPlease consult the ACUCOBOL-GT documentation for more on the mechanism.\\n\\nThere are two ways in SonarQube to specify the list of ACUCOBOL-GT flags to be used in order to preprocess the source code. The first option is to define a list of global flags which will be used to preprocess all source files. This can be done in the **[Administration > General Settings > Cobol](/#sonarqube-admin#/admin/settings?category=cobol) > Preprocessor**.\\n\\nThe second option is to provide a list of relative paths (with help of the \u2018sonar.cobol.acucobol.preprocessor.directives.directories\u2019 property) which contain the list of flags to be used for each COBOL source file. Let\u2019s take a simple example. If a file \u2018MY_PROGRAM.CBL\u2019 is going to be processed, the SonarQube ACUCOBOL-GT preprocessor, will try to find a file \u2018MY_PROGRAM.CMD\u2019. If this file is found, then the flags contained in this file is going to be used to preprocess the program \u2018MY_PROGRAM.CBL\u2019. If the file \u2018MY_PROGRAM.CMD\u2019 doesn\u2019t exist, then the preprocess will use the content of the file \u2018DEFAULT.CMD\u2019 if exists.\\n\\n### Microfocus Compiler Constants\\n\\nIf your code takes advantage of conditional compilation features provided by Microfocus, you may have to configure compiler constants for your analysis. You can define a compiler constant by setting a property named s`onar.cobol.compilationConstant.[constant name here].`\\n\\nFor example, if your COBOL code looks like this:\\n\\n```\\n       IDENTIFICATION DIVISION.\\n      $IF myconstant DEFINED\\n       PROGRAM-ID. x.\\n      $END\\n      $IF otherconstant DEFINED\\n       PROGRAM-ID. y.\\n      $END\\n```\\n\\nYou can set the value of a compiler constant named \\\"myconstant\\\" by inserting the following line in your sonar-project.properties file:\\n\\n```\\nsonar.cobol.compilationConstant.myconstant=myvalue\\n```\\n\\n## Database Catalog (DB2)\\n\\nThe COBOL analyzer offers rules which target embedded SQL statements and require the analyzer to have knowledge of the database catalog (E.G. the primary key column(s) of a given table).\\nThese rules will raise issues only if the database catalog is provided to the analysis. For the moment, this is available only for IBM DB2 (z/OS) catalogs, and the catalog must be provided via a set of CSV (\\\"Comma Separated Values\\\") files.\\n\\nThese rules rely on two analysis properties:\\n\\n| Key                                     | Description                                                                      |\\n| --------------------------------------- | -------------------------------------------------------------------------------- |\\n| `sonar.cobol.sql.catalog.csv.path`      | relative path of the directory containing CSV files for the database catalog     |\\n| `sonar.cobol.sql.catalog.defaultSchema` | comma-separated list of default database schemas used in embedded SQL statements |\\n\\n`sonar.cobol.sql.catalog.csv.path` should define a directory which contains 8 CSV files. Each of these CSV files contains data for a specific DB2 catalog table and is named after it. The following table lists the required files and their respective mandatory columns. Additional columns may be listed, but will be ignored:\\n\\n| Table                  | File name           | Required Columns                                                                       |\\n| ---------------------- | ------------------- | -------------------------------------------------------------------------------------- |\\n| `SYSIBM.SYSCOLUMNS`    | `SYSCOLUMNS.csv`    | `TBNAME`,`TBCREATOR`,`NAME`,`PARTKEY_COLSEQ`,`DEFAULT`,`NULLS`,`DEFAULTVALUE`          |\\n| `SYSIBM.SYSINDEXES`    | `SYSINDEXES.csv`    | `NAME`,`CREATOR`,`TBNAME`,`TBCREATOR`,`UNIQUERULE`,`INDEXTYPE`                         |\\n| `SYSIBM.SYSINDEXPART`  | `SYSINDEXPART.csv`  | `IXNAME`,`IXCREATOR`,`PARTITION`                                                       |\\n| `SYSIBM.SYSKEYS`       | `SYSKEYS.csv`       | `IXNAME`,`IXCREATOR`,`COLNAME`,`COLSEQ`                                                |\\n| `SYSIBM.SYSSYNONYMS`   | `SYSSYNONYMS.csv`   | `NAME`,`CREATOR`,`TBNAME`,`TBCREATOR`                                                  |\\n| `SYSIBM.SYSTABLES`     | `SYSTABLES.csv`     | `NAME`,`CREATOR`,`TYPE`,`PARTKEYCOLNUM`,`TSNAME`,`DBNAME`,`TBNAME`,`TBCREATOR`,`CARDF` |\\n| `SYSIBM.SYSTABLESPACE` | `SYSTABLESPACE.csv` | `NAME`,`DBNAME`,`PARTITIONS`                                                           |\\n| `SYSIBM.SYSVIEWS`      | `SYSVIEWS.csv`      | `NAME`,`CREATOR`,`STATEMENT`                                                           |\\n\\nThe CSV format is the following:\\n\\n- Each file must be named for the table it represents.\\n- First line must contain the exact names of the columns.\\n- Order of the columns is not meaningful.\\n- Fields are comma-delimited.\\n- If a field contains a comma, then its value must be surrounded by double quotes (\\\").\\n- If a field which is surrounded by double quotes contains a double quote character (\\\"), then this character must be doubled (\\\"\\\").\\n\\nExample for `SYSVIEWS.csv`:\\n\\n```\\nCREATOR,NAME,STATEMENT\\nUSER1,VIEW1,select x from table1\\nUSER1,VIEW2,\\\"select x, y from table1\\\"\\nUSER1,VIEW3,\\\"select x, \\\"\\\"y\\\"\\\" from table1\\\"\\n```\\n\\nThe `UNLOAD` DB2 utility with the `DELIMITED` option should produce the required files except for the column names on the first line.\\n\\n<!-- sonarqube -->\\n\\n## Custom Rules\\n\\n### Overview\\n\\nThe COBOL analyzer parses the source code, creates an Abstract Syntax Tree (AST) and then walks through the entire tree. A coding rule can subscribe to be notified every time a node of a certain type is visited.\\n\\nAs soon as the coding rule is notified, it can navigate the tree around the node and raise issues if necessary.\\n\\n### Writing a Plugin\\n\\nWriting new COBOL coding rules is a six-step process:\\n\\n- Create a standard SonarQube plugin.\\n- Attach this plugin to the SonarQube COBOL plugin (see the `pom.xml` file of the provided sample plugin project).\\n- Create as many custom COBOL coding rules as required by extending `com.sonarsource.api.ast.CobolCheck` and add them to the previous repository.\\n- Generate the SonarQube plugin (jar file).\\n- Place this jar file in the `$SONARQUBE_HOME/extensions/plugins` directory.\\n- Restart the SonarQube server.\\n\\n### Plugin Project Sample\\n\\nTo get started, clone the sample plugin project and follow the steps below:\\n\\n- Install Maven\\n- Build the plugin by running `mvn install` from the project directory. This will generate a SonarQube plugin jar file in the target directory.\\n- Add your newly created jar into the `$SONARQUBE_HOME/extensions/plugins` directory\\n- Restart the SonarQube server\\n\\nIf you now look at the COBOL Quality Profiles, you will find the new coding rule (\u201CSample check\u201D). Don\u2019t forget to activate it. Run an analysis of a COBOL project, and you will find that an issue was logged at line 5 on every file.\\n\\n### Subscribing to a NodeType\\n\\nVery often when writing a coding rule, you will want to subscribe to a NodeType. A NodeType can be either a rule of the grammar or a keyword of the language. As an example, here is the code of the implementation of the \u201CAvoid using Merge statement\u201D coding rule:\\n\\n```\\npublic class MergeStatementUsageCheck extends CobolCheck {\\n\\n  public void init() {\\n    subscribeTo(getCobolGrammar().mergeStatement);\\n  }\\n\\n  public void visitNode(AstNode node) {\\n    reportIssue(\\\"Avoid using MERGE statement.\\\").on(node);\\n  }\\n}\\n```\\n\\nNote that CICS and SQL grammars can be accessed using `getCicsGrammar()` and `getSqlGrammar()`.\\n\\n### Coding Rule Lifecycle\\n\\nA coding rule can optionally override six methods inherited from the CobolCheck class. Those methods are called sequentially in the following order:\\n\\n- `public void init() {\u2026}`: This method is called only once and should be used to subscribe to one or more NodeType(s).\\n- `public void visitFile(AstNode astNode) {\u2026}`: This method is called on each file before starting the parsing.\\n- `public void visitNode(AstNode astNode) {\u2026}`: This method is called when an AstNode matches a subscribed NodeType (see Subscribing to a NodeType) and before analyzing its content.\\n- `public void leaveNode(AstNode astNode) {\u2026}`: This method is called when an AstNode matches a desired NodeType (see Subscribing to a NodeType) and after analyzing its content.\\n- `public void leaveFile(AstNode astNode) {\u2026}`: This method is called before exiting a file.\\n- `public void destroy() {\u2026}`: This method is called before shutting down the coding rule.\\n- The `reportIssue(\u2026)` method, used to log an issue, should be called only inside the `visitFile(\u2026)`, `visitNode(\u2026)`, `leaveNode(\u2026)` and `leaveFile(\u2026)` methods. Indeed, the file context isn\u2019t known when the `init()` and `destroy()` methods are called, so the issue can\u2019t be associated to a file.\\n\\nMore advanced features are documented in the [API Javadoc](http://javadocs.sonarsource.org/cobol/apidocs/).\\n\\n### Navigating the AST (Abstract Syntax Tree) with the SSLR COBOL Toolkit\\n\\nWhen starting to write a new COBOL coding rule, the main difficulty is to understand the COBOL AST in order to know which NodeType(s) need to be visited. This can be achieved by using the [SSLR COBOL Toolkit](https://binaries.sonarsource.com/CommercialDistribution/sslr-cobol-toolkit/), a Swing application that enables loading a COBOL file and displaying its representation as an Abstract Syntax Tree.\\n\\nEach node in the AST is a COBOL grammar rule and each leaf in the AST is a COBOL token. Let\u2019s say you want to visit the node `ifStatement`. In this case, the `init()` method of your COBOL coding rule must contain the following statement: `subscribeTo(getCobolGrammar().ifStatement);`\\n\\n### API Changes\\n\\n_Since 4.0_\\nA new API is available to write the rules but also to implement the tests.\\n\\nCustom rules should now extend `CobolCheck` (`CobolAstCheck` is deprecated) and issues should be logged using the `reportIssue(...)` method.  \\nTests on custom rules should now use `CobolCheckVerifier`: the assertions about issues should now be added as comments inside COBOL test files.  \\nCustom rules should be listed in an implementation of `CobolCheckRepository` (`CobolAstCheckRepository` is now deprecated) and metadata should be loaded by implementing `RulesDefinitionExtension`.  \\nYou can now store your custom rules into a dedicated rule repository by implementing SonarQube's `RulesDefinition`: in that case, you don't need to implement `RulesDefinitionExtension`.  \\n![](/images/exclamation.svg) For users who already have custom rules in production: existing issues will be closed and re-opened because the internal keys of the rules are changing.\\nIf you wrote a custom plugin against SonarCOBOL 3.x, it should still be compatible at runtime with SonarCOBOL 4.0.\\n\\nTo migrate to the new API ([full example on github](https://github.com/SonarSource/sonar-custom-rules-examples/pull/14)):\\n\\n- First, migrate tests without modifying rule classes. That mainly requires moving assertions from java test classes to comments inside test cobol files ([see an example on github](https://github.com/SonarSource/sonar-custom-rules-examples/commit/c95b6a84b6fd1efc832a46cd5e1101ee51e6268e)).\\n- Update check classes to replace the calls to deprecated methods with the new methods which create issues ([see an example on github](https://github.com/SonarSource/sonar-custom-rules-examples/commit/d6f6ef7457d99e31990fa64b5ff9cc566775af96)).\\n- Implement `CobolRulesDefinitionExtension` and `CobolCheckRepository`, remove the class extending `CobolAstCheckRepository` ([see an example on github](https://github.com/SonarSource/sonar-custom-rules-examples/commit/ea15f07ce79366a08fee5b60e9a93c32a4625918)).\\n- Update check classes to extend `CobolCheck` instead of `CobolAstCheck` to stop using deprecated APIs ([see an example on github](https://github.com/SonarSource/sonar-custom-rules-examples/commit/8e1d746900f5411e9700fea04700cd804e45e034)).\\n\\nTo move your custom rules to a dedicated rule repository, see [an example on github](https://github.com/SonarSource/sonar-custom-rules-examples/commit/16ad89c4172c259f15bce56edcd09dd5b489eacd).\\n\\n## Related Pages\\n\\n- [Adding Coding Rules](/extend/adding-coding-rules/)\\n  <!-- /sonarqube -->\\n\"},{\"path\":\"analysis/languages/csharp\",\"content\":\"---\\ntitle: C#\\nurl: /analysis/languages/csharp/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the C#-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud --> **[Administration > General Settings > C#](/#sonarqube-admin#/admin/settings?category=c%23)**.\\n\\n### Analyze Generated Code\\n\\nTo analyze tool-generated code (e.g. WCF code generated by `SvcUtil.exe`, protobuf code generated by `protoc`, Swagger client code generated by `NSwag`) for a specific C# project, enable the \\\"Analyze generated code\\\" setting inside **Project > Administration > General Settings > C#**. By default, tool-generated code files are skipped from analysis.\\n\\n## Related Pages\\n* [Excluding External Roslyn Issues](/analysis/external-issues/) (See \\\"Notes on external .NET issues\\\")\\n* [Test Coverage & Execution](/analysis/coverage/) (Visual Studio Code Coverage, dotCover, OpenCover, Coverlet, NCover 3)\\n* [SonarScanner for MSBuild](/analysis/scan/sonarscanner-for-msbuild/)\\n* [SonarScanner for Azure DevOps](/analysis/scan/sonarscanner-for-azure-devops/)\\n\"},{\"path\":\"analysis/languages/flex\",\"content\":\"---\\ntitle: Flex\\nurl: /analysis/languages/flex/\\n---\\n\\n\\n## Supported Versions\\n* ActionScript 2\\n* ActionScript 3\\n\\n## Language-Specific Properties\\nDiscover and update the Flex-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud -->[**Administration > General Settings > Flex**](/#sonarqube-admin#/admin/settings?category=flex)\\n\\n## Related Pages\\n\\n* [Test Coverage & Execution](/analysis/coverage/) (Cobertura)\\n<!-- sonarqube -->\\n* [Adding Coding Rules](/extend/adding-coding-rules/)\\n<!-- /sonarqube -->\\n\"},{\"path\":\"analysis/languages/go\",\"content\":\"---\\ntitle: Go\\nurl: /analysis/languages/go/\\n---\\n\\n\\n\\n\\n## Prerequisites\\n\\n* SonarQube Scanner should run on a x86-64 Windows, macOS or Linux 64bits machine\\n* You need the [Go](https://golang.org/) installation on the scan machine only if you want to import coverage data\\n\\n## Language-Specific Properties\\n\\nYou can discover and update the Go-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > Go](/#sonarqube-admin#/admin/settings?category=go)**\\n\\n## \\\"sonar-project.properties\\\" Sample\\n\\nHere is a good first version of a `sonar-project.properties`, correctly excluding \\\"vendor\\\" directories and categorizing files as \\\"main\\\" or \\\"test\\\":\\n\\n```\\n  sonar.projectKey=com.company.projectkey1\\n  sonar.projectName=My Project Name\\n\\n  sonar.sources=.\\n  sonar.exclusions=**/*_test.go,**/vendor/**\\n\\n  sonar.tests=.\\n  sonar.test.inclusions=**/*_test.go\\n  sonar.test.exclusions=**/vendor/**\\n```\\n\\n## Related Pages\\n\\n* [Test Coverage & Execution](/analysis/coverage/)\\n* [Importing External Issues](/analysis/external-issues/) (GoVet, GoLint, GoMetaLinter)\\n\"},{\"path\":\"analysis/languages/html\",\"content\":\"---\\ntitle: HTML\\nurl: /analysis/languages/html/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nYou can discover and update HTML-specific [properties](/analysis/analysis-parameters/) in:  <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > HTML](/#sonarqube-admin#/admin/settings?category=html)**.\\n\\n## PHP Code Analysis\\nSonarPHP and SonarHTML both analyze files with extensions: `.php`, `.php3`, `.php4`, `.php5`, `.phtml`.\\n\\nFile metrics, such as the number of lines of code, can only be measured by one of the languages, PHP or HTML. They are handled by SonarPHP by default, and by SonarHTML if for some reason SonarPHP is not present.\\n\\nSonarHTML analyzes PHP files even if the PHP file extensions are not included in the list of file extensions to analyze.\\n\"},{\"path\":\"analysis/languages/java\",\"content\":\"---\\ntitle: Java\\nurl: /analysis/languages/java/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nYou can discover and update the Java-specific [properties](/analysis/analysis-parameters/) in:  <!-- sonarcloud -->Project <!-- /sonarcloud -->[Administration > General Settings > Java](/#sonarqube-admin#/admin/settings?category=java)\\n\\n## Java Analysis and Bytecode\\n\\nCompiled `.class` files are required for java projects with more than one java file. If not provided properly, analysis will fail with the message:\\n\\n    Please provide compiled classes of your project with sonar.java.binaries property.\\n\\nIf only some `.class` files are missing, you'll see warnings like this:\\n\\n    Class 'XXXXXX' is not accessible through the ClassLoader.\\n\\nIf you are not using Maven or Gradle for analysis, you must manually provide bytecode to the analysis.\\nYou can also analyze test code, and for that you need to provide tests binaires and test\u00A0libraries properties.\\n\\nKey | Value\\n---|---|\\n`sonar.java.binaries` (required) | Comma-separated paths to directories containing\u00A0the compiled bytecode files\u00A0corresponding to your source files. \\n`sonar.java.libraries` | Comma-separated paths to files with third-party libraries (JAR or Zip files) used by your project. Wildcards can be used: `sonar.java.libraries=path/to/Library.jar,directory/**/*.jar`\\n`sonar.java.test.binaries` | Comma-separated paths to directories containing\u00A0the compiled bytecode files\u00A0corresponding to your test files\\n`sonar.java.test.libraries` | Comma-separated paths to files with third-party libraries (JAR or Zip files) used by your tests. (For example, this should include the junit jar). Wildcards can be used: `sonar.java.test.libraries=directory/**/*.jar`\\n\\n[[warning]]\\n| Android users, Jack doesn't provide the required `.class` files.\\n\\n\\n## Turning issues off\\n\\nThe best way to deactivate an individual issue you don't intend to fix is to mark it \\\"Won't Fix\\\" or \\\"False Positive\\\" through the SonarQube UI.\\n\\nIf you need to deactivate a rule (or all rules) for an entire file, then [issue exclusions](/project-administration/narrowing-the-focus/) are the way to go. But if you only want to deactivate a rule across a subset of a file - all the lines of a method or a class - you can use `@SuppressWarnings(\\\"all\\\")` or `@SuppressWarnings` with rule keys: `@SuppressWarnings(\\\"squid:S2078\\\")` or `@SuppressWarnings({\\\"squid:S2078\\\", \\\"squid:S2076\\\"})`. \\n\\n## Handling Java Source Version\\n\\nThe Java Analyzer is able to react to the java version used for sources. This feature allows the deactivation of rules that target higher versions of Java than the one in use in the project so that false positives aren't generated from irrelevant rules.\\n\\nThe feature relies entirely on the `sonar.java.source` property, which is automatically filled by most of the scanners used for analyses (Maven, Gradle). Java version-specific rules are not disabled when `sonar.java.source` is not provided. Concretely, rules which are designed to target specific java versions (tagged \\\"java7\\\" or \\\"java8\\\") are activated by default in the Sonar Way Java profile. From a user perspective, the feature is fully automatic, but it means that you probably want your projects to be correctly configured.\\n\\nWhen using SonarScanner to perform analyses of project, the property `sonar.java.source` can to be set manually in `sonar-project.properties`. Accepted formats are:\\n* \\\"1.X\\\" (for instance 1.6 for java 6, 1.7 for java 7, 1.8 for java 8, etc.)\\n* \\\"X\\\" (for instance 7 for java 7, 8 for java 8, etc. )\\n\\nExample: `sonar.java.source=1.6`\\n\\nIf the property is provided, the analysis will take the source version into account, and execute related rules accordingly. At run time, each of these rules will be executed \u2013 or not \u2013 depending of the Java version used by sources within the project. For instance, on a correctly configured project built with Java 6, rules targeting Java 7 and Java 8 will never raise issues, even though they are enabled in the associated rule profile.\\n\\n## Related Pages\\n\\n* [Test Coverage & Execution](/analysis/coverage/) (JaCoCo, Surefire)\\n* [Importing External Issues](/analysis/external-issues/) ([SpotBugs](https://spotbugs.github.io/), [FindBugs](http://findbugs.sourceforge.net/), [FindSecBugs](https://github.com/find-sec-bugs/find-sec-bugs/wiki/Maven-configuration), [PMD](http://maven.apache.org/plugins/maven-pmd-plugin/usage.html), [Checkstyle](http://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle-mojo))\\n<!-- sonarqube -->* [Adding Coding Rules](/extend/adding-coding-rules/)<!-- /sonarqube -->\\n\\n<!-- sonarqube -->\\n## Custom Rules\\n\\nThe tutorial [Writing Custom Java Rules 101](https://redirect.sonarsource.com/doc/java-custom-rules-guide.html) will help to quickly start writing custom rules for Java.\\n\\n### API changes\\n\\n#### **6.1**\\n\\n* The `ExpressionTree` interface, from the AST API, is now enriched by two new methods `Optional<Object> asConstant()` and `<T> Optional<T> asConstant(Class<T> type)`. These methods let you try to retrieve the equivalent constant value of an expression (from a variable, for instance). An example of usage would be:\\n\\n```\\nclass A {\\n  public static final String CONSTANT1 = \\\"abc\\\";\\n  public static final String CONSTANT2 = CONSTANT1 + \\\"def\\\";\\n\\n  void foo() {\\n    System.out.println(CONSTANT2);\\n                    // ^^^^^^^^^ calling 'identifier.asConstant(String.class)' will return 'Optional.of(\\\"abcdef\\\")'\\n  }\\n}\\n```\\n\\n#### **6.0**\\n\\n* Deprecated method `org.sonar.plugins.java.api.JavaFileScannerContext.addIssue(File, JavaCheck, int, String)` has been **removed**. Custom rules relying on it should report issues on a given `Tree` from now on.\\n* Deprecated method `org.sonar.plugins.java.api.JavaFileScannerContext.getFile()` has been **removed**. Custom rules relying on it should rely on content of SQ's API `InputFile`.\\n* Deprecated method `org.sonar.plugins.java.api.tree.TryStatementTree.resources()` has been **removed**, in favor of `org.sonar.plugins.java.api.tree.TryStatementTree.resourceList()`, as Java 9 allows other trees than `VariableTree` to be placed as resources in try-with-resources statements.\\n* Method `org.sonar.plugins.java.api.semantic.Symbol.owner()` has been **flagged** with `@Nullable` annotation, to explicitly document the fact that some symbols (package, unknown, recovered) might well return `null`.\\n\\n* **Semantic engine**\\n    * Return type of constructor is now `void type` instead of `null`.\\n    * A **raw type** is now explicitly different from an **erasure type**. It is recommended to systematically use type erasure for type comparison when dealing with generics.\\n        ```\\n        class A<T> {\\n        //    ^^^^ Definition of a Generic Type\\n          boolean equals(Object o) {\\n            if (o instance of A) {\\n                           // ^ this is a raw type, not erasure of A<T>\\n             return true;\\n            }\\n            return false;\\n          }\\n\\n          A<String> foo() {\\n            return new A<String>();\\n                   //  ^^^^^^^^^ Parameterization of a Generic Type\\n          }\\n        }\\n        ```\\n    * According to Java Language Specification every array type implements the interface `java.io.Serializable`, calling `isSubtypeOf(\\\"java.io.Serializable\\\")` on an array type now consistently returns `true`.\\n    * Symbol corresponding to generic method invocations are now correctly parameterized.\\n    * In some special cases (mostly missing bytecode dependencies, misconfigured projects), and due to ECJ recovery system, unknown/recovered types can now lead to unknown symbols, even on `ClassTree`/`MethodTree`/`VariableTree`. To illustrate this, the following example now associate the method to an unknown symbol, while previous semantic engine from SonarJava 5.X series was creating a `Symbol.MethodSymbol` with an unknown return type.\\n        ```\\n        Class A {\\n          UnknownType<String> myMethod() { /* ... */ }\\n                          //  ^^^^^^^^  symbol corresponding to the MethodTree will be unknown,\\n        }\\n        ```\\n    * Thanks to improved semantic provided by ECJ engine, new semantic is now able to say that an *unknown* symbol is supposed to be type/variable/method (`isTypeSymbol()`, `isVariableSymbol()`, ...). Old semantic was answering `false` for all of them. Consequently, be sure to always use `isUnknown()` to validate symbol resolution. Other `is...Symbol()` methods are only designed to know how to cast the symbols (e.g from `Symbol` to `Symbol.MethodSymbol`).\\n\\n#### **5.12**\\n* **Dropped**\\n    * `org.sonar.plugins.java.api.JavaFileScannerContext`: Drop deprecated method used to retrieve trees contributing to the complexity of a method from  (deprecated since SonarJava 4.1). \\n        ```\\n        //org.sonar.plugins.java.api.JavaFileScannerContext\\n        /**\\n        * Computes the list of syntax nodes which are contributing to increase the complexity for the given methodTree.\\n        * @deprecated use {@link #getComplexityNodes(Tree)} instead\\n        * @param enclosingClass not used.\\n        * @param methodTree the methodTree to compute the complexity.\\n        * @return the list of syntax nodes incrementing the complexity.\\n        */\\n        @Deprecated\\n        List<Tree> getMethodComplexityNodes(ClassTree enclosingClass, MethodTree methodTree);\\n        ```\\n    * `org.sonar.plugins.java.api.JavaResourceLocator`: The following method has been dropped (deprecated since SonarJava 4.1), without replacement.\\n        ```\\n        //org.sonar.plugins.java.api.JavaResourceLocator\\n        /**\\n        * get source file key by class name.\\n        * @deprecated since 4.1 : will be dropped with no replacement.\\n        * @param className fully qualified name of the analyzed class.\\n        * @return key of the source file for the given class.\\n        */\\n        @Deprecated\\n        String findSourceFileKeyByClassName(String className);\\n        ```\\n    * `org.sonar.plugins.surefire.api.SurefireUtils`: Dropping deprecated field with old property (deprecated since SonarJava 4.11)\\n        ```\\n        //org.sonar.plugins.surefire.api.SurefireUtils\\n        /**\\n        * @deprecated since 4.11\\n        */\\n        @Deprecated\\n        public static final String SUREFIRE_REPORTS_PATH_PROPERTY = \\\"sonar.junit.reportsPath\\\";\\n        ```\\n* **Deprecated**  \\n    * `org.sonar.plugins.java.api.JavaFileScannerContext`: Deprecate usage of File-based methods from API, which will be removed in future release. Starting from this version, methods relying on InputFile has to be preferred.\\n        ```\\n        //org.sonar.plugins.java.api.JavaFileScannerContext\\n        /**\\n        * Report an issue at a specific line of a given file.\\n        * This method is used for one\\n        * @param file File on which to report\\n        * @param check The check raising the issue.\\n        * @param line line on which to report the issue\\n        * @param message Message to display to the user\\n        * @deprecated since SonarJava 5.12 - File are not supported anymore. Use corresponding 'reportIssue' methods, or directly at project level\\n        */\\n        @Deprecated\\n        void addIssue(File file, JavaCheck check, int line, String message);\\n        /**\\n        * FileKey of currently analyzed file.\\n        * @return the fileKey of the file currently analyzed.\\n        * @deprecated since SonarJava 5.12 - Rely on the InputFile key instead, using {@link #getInputFile()}\\n        */\\n        @Deprecated\\n        String getFileKey();\\n\\n        /**\\n        * File under analysis.\\n        * @return the currently analyzed file.\\n        * @deprecated since SonarJava 5.12 - File are not supported anymore. Use {@link #getInputFile()} or {@link #getProject()} instead\\n        */\\n        @Deprecated\\n        File getFile();\\n        ```\\n    * Deprecate methods which are not relevant anymore in switch-related trees from API, following introduction of the new Java 12 `switch` expression:\\n        ```\\n        //org.sonar.plugins.java.api.tree.CaseLabelTree\\n        /**\\n        * @deprecated (since 5.12) use the {@link #expressions()} method.\\n        */\\n        @Deprecated\\n        @Nullable\\n        ExpressionTree expression();\\n\\n        /**\\n        * @deprecated (since 5.12) use the {@link #colonOrArrowToken()} method.\\n        */\\n        @Deprecated\\n        SyntaxToken colonToken();\\n        ```\\n* **Added**\\n    * `org.sonar.plugins.java.api.JavaFileScannerContext`: Following methods have been added in order to provide help reporting issues at project level, and access data through SonarQube's InputFile API, which won't be possible anymore through files:\\n    ```\\n        //JavaFileScannerContext: New methods\\n        /**\\n        * Report an issue at at the project level.\\n        * @param check The check raising the issue.\\n        * @param message Message to display to the user\\n        */\\n        void addIssueOnProject(JavaCheck check, String message);\\n    \\n        /**\\n        * InputFile under analysis.\\n        * @return the currently analyzed inputFile.\\n        */\\n        InputFile getInputFile();\\n        \\n        /**\\n        * InputComponent representing the project being analyzed\\n        * @return the project component\\n        */\\n        InputComponent getProject();\\n        ```\\n    * In order to cover the Java 12 new switch expression, introduce a new Tree in the SonarJava Syntax Tree API  (Corresponding `Tree.Kind`: `SWITCH_EXPRESSION` ). New methods have also been added to fluently integrate the new switch expression into the SonarJava API.\\n        ```\\n        //org.sonar.plugins.java.api.tree.SwitchExpressionTree\\n        /**\\n        * 'switch' expression.\\n        *\\n        * JLS 14.11\\n        *\\n        * <pre>\\n        *   switch ( {@link #expression()} ) {\\n        *     {@link #cases()}\\n        *   }\\n        * </pre>\\n        *\\n        * @since Java 12\\n        */\\n        @Beta\\n        public interface SwitchExpressionTree extends ExpressionTree {\\n        \\n        SyntaxToken switchKeyword();\\n        \\n        SyntaxToken openParenToken();\\n        \\n        ExpressionTree expression();\\n        \\n        SyntaxToken closeParenToken();\\n        \\n        SyntaxToken openBraceToken();\\n        \\n        List<CaseGroupTree> cases();\\n        \\n        SyntaxToken closeBraceToken();\\n        }\\n        ```\\n        ```\\n        //org.sonar.plugins.java.api.tree.SwitchStatementTree\\n        /**\\n        * Switch expressions introduced with support Java 12\\n        * @since SonarJava 5.12\\n        */\\n        SwitchExpressionTree asSwitchExpression();\\n        ```\\n        ```\\n        //org.sonar.plugins.java.api.tree.CaseLabelTree\\n        /**\\n        * @return true for case with colon: \\\"case 3:\\\" or \\\"default:\\\"\\n        *         false for case with arrow: \\\"case 3 ->\\\" or \\\"default ->\\\"\\n        * @since 5.12 (Java 12 new features)\\n        */\\n        boolean isFallThrough();\\n        \\n        /**\\n        * @since 5.12 (Java 12 new features)\\n        */\\n        SyntaxToken colonOrArrowToken();\\n        ```\\n        ```\\n        //org.sonar.plugins.java.api.tree.BreakStatementTree\\n        /**\\n        * @since 5.12 (Java 12 new features)\\n        */\\n        @Nullable\\n        ExpressionTree value();\\n        ```\\n        ```\\n        //org.sonar.plugins.java.api.tree.TreeVisitor\\n        void visitSwitchExpression(SwitchExpressionTree tree);\\n        ```\\n\\n#### **5.7**\\n* **Breaking**  \\n    * This change will impact mostly the custom rules relying on semantic API. The type returned by some symbols will change from raw type to parameterized type with identity substitution and this will change how subtyping will answer.\\n\\n    It is possible to get the previous behavior back by using type erasure on the newly returned type. Note that not all returned types are impacted by this change.\\n\\n    Example:\\n    ```\\n    @Rule(key = \\\"MyFirstCustomRule\\\")\\n    public class MyFirstCustomCheck extends IssuableSubscriptionVisitor {\\n    \\n        @Override\\n        public List<Kind> nodesToVisit() {\\n            return ImmutableList.of(Kind.METHOD);\\n        }\\n    \\n        @Override\\n        public void visitNode(Tree tree) {\\n            MethodTree method = (MethodTree) tree;\\n            MethodSymbol symbol = method.symbol();\\n            \\n            Type returnType = symbol.returnType().type();\\n            // When analyzing the code \\\"MyClass<Integer> foo() {return null; }\\\"\\n            // BEFORE: returnType == ClassJavaType\\n            // NOW: returnType == ParametrizedTypeJavaType\\n    \\n            // Getting back previous type\\n            Type erasedType = returnType.erasure();\\n            // erasedType == ClassJavaType\\n        }\\n    }\\n    ```\\n<!-- /sonarqube -->\\n\"},{\"path\":\"analysis/languages/javascript\",\"content\":\"---\\ntitle: JavaScript\\nurl: /analysis/languages/javascript/\\n---\\n\\n\\n\\n## Prerequisites\\n\\nIn order to analyze JavaScript code, you need to have Node.js >= 8 installed on the machine running the scan. Set property `sonar.nodejs.executable` to an absolute path to Node.js executable, if standard `node` is not available.\\n \\n## Language-Specific Properties\\n\\nDiscover and update the JavaScript-specific properties in: **<!-- sonarcloud -->Project <!-- /sonarcloud -->[Administration > General Settings > JavaScript](/#sonarqube-admin#/admin/settings?category=javascript)**\\n\\n## Supported Frameworks and Versions\\n* ECMAScript 5 / ECMAScript 2015 (ECMAScript 6) / ECMAScript 2016 / ECMAScript 2017\\n* React JSX\\n* Vue.js\\n* Flow\\n\\n## Rule Profiles\\n\\nThere are 2 built-in rule profiles for JavaScript: `Sonar way` (default) and `Sonar way Recommended`.\\n* `Sonar way` profile is activated by default. It defines a trimmed list of high-value/low-noise rules useful in almost any JS development context.\\n* `Sonar way Recommended` contains all rules from `Sonar way`, plus more rules that mandate high code readability and long-term project evolution.\\n\\n<!-- sonarqube -->\\n## Custom rules\\n[[warning]]\\n| This feature is deprecated\\n### Overview\\n\\nThe JavaScript Analyzer parses the source code, creates an Abstract Syntax Tree (AST) and then walks through the entire tree. A coding rule is a visitor that is able to visit nodes from this AST.\\n\\nAs soon as the coding rule visits a node, it can navigate the tree around the node and log issues if necessary.\\n\\n### Create SonarQube Plugin\\nCustom rules for JavaScript can be added by writing a SonarQube Plugin and using JavaScript analyzer APIs.\\n\\nTo get started a sample plugin can be found here: [javascript-custom-rules](https://github.com/SonarSource/sonar-custom-rules-examples/tree/master/javascript-custom-rules).\\nHere are the step to follow:\\n\\n* Create a standard SonarQube plugin project\\n* Attach this plugin to the SonarQube JavaScript analyzer through the `pom.xml`:\\n  * Add the dependency to the JavaScript analyzer.\\n  * Add the following line in the sonar-packaging-maven-plugin configuration.\\n  ```\\n  <basePlugin>javascript</basePlugin>\\n  ```\\n* Implement the following extension points:\\n  * [Plugin](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/Plugin.html)\\n  * [RulesDefinition](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/server/rule/RulesDefinition.html) \\n  * `CustomRuleRepository`, this interface registers rule classes with JavaScript plugin, so they are invoked during analysis of JavaScript files.\\n* Declare `RulesDefinition` as an extension in the `Plugin` extension point.\\n\\nYou can implement both `RulesDefinition` and `CustomRulesRepository` in a single class.\\n\\n### Implement a Rule\\n\\n* Create a class that will hold the implementation of the rule. It should:\\n  * Extend `DoubleDispatchVisitorCheck` or `SubscriptionVisitorCheck`\\n  * Define the rule name, key, tags, etc. with Java annotations.\\n* Declare this class in the `RulesDefinition`.\\n\\n###  Implementation Details\\n\\n#### Using DoubleDispatchVisitorCheck\\n`DoubleDispatchVisitorCheck` extends `DoubleDispatchVisitor` which provide a set of methods to visit specific tree nodes (these methods' names start with `visit`). To explore a part of the AST, override the required method(s). For example, if you want to explore `if` statement nodes, override the `DoubleDispatchVisitor#visitIfStatement` method that will be called each time an `IfStatementTree` node is encountered in the AST.\\n\\n[[warning]]\\n| When overriding a visit method, you must call the `super` method in order to allow the visitor to visit the rest of the tree.\\n\\n#### Using SubscriptionVisitorCheck\\n`SubscriptionVisitorCheck` extends `SubscriptionVisitor`. To explore a part of the AST, override `SubscribtionVisitor#nodesToVisit()` by returning the list of the `Tree#Kind` of node you want to visit. For example, if you want to explore `if` statement nodes the method will return a list containing the element `Tree#Kind#IF_STATEMENT`.\\n\\n#### Create issues\\nUse these methods to log an issue:\\n\\n* `JavaScriptCheck#addIssue(tree, message)` creates and returns an instance of `PreciseIssue`. In the SonarQube UI this issue will highlight all code corresponding to the tree passed as the first parameter. To add cost (effort to fix) or secondary locations provide these values to your just-created instance of `PreciseIssue`.\\n* `JavaScriptCheck#addIssue(issue)` creates and returns the instance of `Issue`. Use this method to create non-standard issues (e.g. for a file-level issue instantiate `FileIssue`).\\n\\n#### Check context\\nCheck context is provided by `DoubleDispatchVisitorCheck` or `SubscriptionVisitorCheck` by calling the `JavaScriptCheck#getContext` method. Check context provides you access to the root tree of the file, the file itself and the symbol model (information about variables).\\n\\n#### Test rule\\nTo test the rule you can use `JavaScriptCheckVerifier#verify()` or `JavaScriptCheckVerifier#issues()`. To be able to use these methods add a dependency to your project:\\n```\\n<dependency>\\n  <groupId>org.sonarsource.javascript</groupId>\\n  <artifactId>javascript-checks-testkit</artifactId>\\n  <version>XXX</version>\\n  <scope>test</scope>\\n</dependency>\\n```\\n\\n### API Changes\\n#### SonarJS 4.2.1\\n* `CustomJavaScriptRulesDefinition` is deprecated. Implement extension `RulesDefinition` and `CustomRuleRepository` instead.\\n\\n#### SonarJS 4.0\\n* Method `TreeVisitorContext#getFile()` is removed.\\n\\n<!-- /sonarqube -->\\n\\n## Related Pages\\n\\n* [Test Coverage & Execution](/analysis/coverage/) (LCOV format)\\n* [Importing External Issues](/analysis/external-issues/) (ESLint)\\n* [SonarJS Plugin for ESLint](https://github.com/SonarSource/eslint-plugin-sonarjs)\\n<!-- sonarqube -->\\n* [Adding Coding Rules](/extend/adding-coding-rules/)\\n<!-- /sonarqube -->\\n\"},{\"path\":\"analysis/languages/kotlin\",\"content\":\"---\\ntitle: Kotlin\\nurl: /analysis/languages/kotlin/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nYou can discover and update Kotlin-specific [properties](/analysis/analysis-parameters/) in:  <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > Kotlin](/#sonarqube-admin#/admin/settings?category=kotlin)**.\\n\\n## Related Pages\\n* [Importing External Issues](/analysis/external-issues/) (AndroidLint and Detekt)\\n* [Test Coverage & Execution](/analysis/coverage/) (JaCoCo)\\n\"},{\"path\":\"analysis/languages/overview\",\"content\":\"---\\ntitle: Overview\\nurl: /analysis/languages/overview/\\n---\\n\\nSonarQube provides analysis of different languages depending on the edition you're running.\\n\\n| Language                                      | Community Edition      | Developer Edition      | Enterprise Edition and Data Center Edtion |\\n| --------------------------------------------- | ---------------------- | ---------------------- | ----------------------------------------- |\\n| [ABAP](/analysis/languages/abap/)             |                        | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Apex](/analysis/languages/apex/)             |                        |                        | ![](/images/check.svg)                    |\\n| [C#](/analysis/languages/csharp/)             | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [C](/analysis/languages/cfamily/)             |                        | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [C++](/analysis/languages/cfamily/)           |                        | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [COBOL](/analysis/languages/cobol/)           |                        |                        | ![](/images/check.svg)                    |\\n| [CSS](/analysis/languages/javascript/)        | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Flex](/analysis/languages/flex/)             | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Go](/analysis/languages/go/)                 | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Java](/analysis/languages/java/)             | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [JavaScript](/analysis/languages/javascript/) | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Kotlin](/analysis/languages/kotlin/)         | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Objective-C](/analysis/languages/cfamily/)   |                        | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [PHP](/analysis/languages/php/)               | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [PLI](/analysis/languages/pli/)               |                        |                        | ![](/images/check.svg)                    |\\n| [PLSQL](/analysis/languages/plsql/)           |                        | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Python](/analysis/languages/python/)         | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [RPG](/analysis/languages/rpg/)               |                        |                        | ![](/images/check.svg)                    |\\n| [Ruby](/analysis/languages/ruby/)             | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Scala](/analysis/languages/scala/)           | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [Swift](/analysis/languages/swift/)           |                        | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [TypeScript](/analysis/languages/javascript/) | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [TSQL](/analysis/languages/tsql/)             |                        | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [VB.NET](/analysis/languages/vbnet/)          | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [VB6](/analysis/languages/vb6/)               |                        |                        | ![](/images/check.svg)                    |\\n| [HTML](/analysis/languages/html/)             | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n| [XML](/analysis/languages/xml/)               | ![](/images/check.svg) | ![](/images/check.svg) | ![](/images/check.svg)                    |\\n\\nIn this section, you'll find documentation related to languages supported by SonarSource.\\n\"},{\"path\":\"analysis/languages/php\",\"content\":\"---\\ntitle: PHP\\nurl: /analysis/languages/php/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the PHP-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > PHP](/#sonarqube-admin#/admin/settings?category=php)**\\n\\n## Analyze php.ini Files\\n\\nThe PHP analyzer can analyze `php.ini` files with some specific rules (if these rules are activated in your Quality Profile). `php.ini` files must be part of the project you are analyzing, meaning the `php.ini` files have to be inside the directories listed in `sonar.sources`. \\nRules targeting `php.ini` files can be quickly identified through the [\\\"php-ini\\\"](https://rules.sonarsource.com/php/tag/php-ini) tag set on them.\\n\\n<!-- sonarqube -->\\n\\n## Custom Rules\\n\\n### Overview\\n\\nThe PHP analyzer parses the source code, creates an Abstract Syntax Tree (AST) and then walks through the entire tree. A coding rule is a visitor that is able to visit nodes from this AST.\\n\\nAs soon as the coding rule visits a node, it can navigate its children and log issues if necessary.\\n\\n### Example Plugin\\n\\nTo get started a sample plugin can be found here: [php-custom-rules](https://github.com/SonarSource/sonar-custom-rules-examples/tree/master/php-custom-rules).\\n\\n### Writing a Plugin\\n\\nCustom rules for PHP can be added by writing a SonarQube Plugin and using PHP analyzer APIs.\\nHere are the step to follow:\\n\\n#### Create SonarQube Plugin\\n\\n* create a standard SonarQube plugin project\\n* attach this plugin to the SonarQube PHP analyzer through the `pom.xml`:\\n  * add the dependency to the PHP analyzer.\\n  * add the following line in the sonar-packaging-maven-plugin configuration.\\n  ```\\n  <basePlugin>php</basePlugin>\\n  ```\\n* implement the following extension points:\\n  * [Plugin](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/Plugin.html)\\n  * [RulesDefinition](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/server/rule/RulesDefinition.html) and [PHPCustomRuleRepository](https://github.com/SonarSource/sonar-php/blob/master/php-frontend/src/main/java/org/sonar/plugins/php/api/visitors/PHPCustomRuleRepository.java), which can be implemented by a single class, to declare your custom rules\\n* declare the RulesDefinition as an extension in the Plugin extension point.\\n\\n#### Implement a Rule\\n\\n* create a class that will hold the implementation of the rule, it should:\\n  * extend `PHPVisitorCheck` or `PHPSubscriptionCheck`\\n  * define the rule name, key, tags, etc. with Java annotations.\\n* declare this class in the `RulesDefinition`.\\n\\n####  Implementation Details\\n\\n**Using `PHPVisitorCheck`**\\n\\nTo explore a part of the AST, override a method from the PHPVisitorCheck. For example, if you want to explore \\\"if statement\\\" nodes, override [PHPVisitorCheck#visitIfStatement](https://github.com/SonarSource/sonar-php/blob/master/php-frontend/src/main/java/org/sonar/plugins/php/api/visitors/PHPVisitorCheck.java#L265) method that will be called each time an [ifStatementTree](https://github.com/SonarSource/sonar-php/blob/master/php-frontend/src/main/java/org/sonar/plugins/php/api/tree/statement/IfStatementTree.java) node is encountered in the AST.\\n\\n[[warning]]\\n| When overriding a visit method, you must call the super method in order to allow the visitor to visit the children the node.\\n\\n**Using `PHPSubscriptionCheck`**\\n\\nTo explore a part of the AST, override [`PHPSubscriptionCheck#nodesToVisit`](https://github.com/SonarSource/sonar-php/blob/master/php-frontend/src/main/java/org/sonar/plugins/php/api/visitors/PHPSubscriptionCheck.java#L33) by returning the list of the [`Tree#Kind`](https://github.com/SonarSource/sonar-php/blob/master/php-frontend/src/main/java/org/sonar/plugins/php/api/tree/Tree.java#L124) of node you want to visit. For example, if you want to explore \\\"if statement\\\" nodes the method will return a list containing the element [`Tree#Kind#IF_STATEMENT`](https://github.com/SonarSource/sonar-php/blob/master/php-frontend/src/main/java/org/sonar/plugins/php/api/tree/Tree.java#L761).\\n\\n**Create Issues**\\n\\nFrom the check, issue can be created by calling [`CheckContext#newIssue`](https://github.com/SonarSource/sonar-php/blob/master/php-frontend/src/main/java/org/sonar/plugins/php/api/visitors/CheckContext.java#L90) method.\\n\\n**Testing Checks**\\n\\nTo test custom checks you can use method [`PHPCheckVerifier#verify`](https://github.com/SonarSource/sonar-php/blob/master/php-frontend/src/main/java/org/sonar/plugins/php/api/tests/PHPCheckVerifier.java#L55). You should end each line with an issue with a comment in the following form:\\n\\n```\\n// Noncompliant {{Message}}\\n```\\n\\nComment syntax is described [here](https://github.com/SonarSource/sonar-analyzer-commons/blob/master/test-commons/README.md).\\n\\n<!-- /sonarqube -->\\n\\n## Related Pages\\n\\n* [Test Coverage & Execution](/analysis/coverage/)\\n<!-- sonarqube -->\\n* [Adding Coding Rules](/extend/adding-coding-rules/)\\n<!-- /sonarqube -->\\n\"},{\"path\":\"analysis/languages/pli\",\"content\":\"---\\ntitle: PLI\\nurl: /analysis/languages/pli/\\n---\\n\\n_PL/I analysis is available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the PL/I-specific properties in: **[Administration > General Settings > PL/I](/#sonarqube-admin#/admin/settings?category=pl%2Fi)**\\n\\n## Source Code Extraction\\n\\nIn order to analyze your source code with SonarQube you need to first extract it onto a filesystem. You can use your own tool or an open source tool; SonarSource does not provide any connectors or source code extraction tools.\\n\\n## Dealing with Includes\\n\\nThere are two possible ways to tell SonarQube where to retrieve the source code referenced by an %INCLUDE statement.\\n\\nThe following syntaxes are supported:\\n\\n```\\n%INCLUDE 'C:/temp/myLib.pli'\\n%INCLUDE ddname(member);\\n%INCLUDE member; /* With member not enclosed within single or double quotes, i.e. a SYSLIB member */\\n```\\n\\nExample:\\n\\nIf you want to interpret:\\n\\n```\\n%INCLUDE O (XX02511) as %INCLUDE 'C:/temp/o/XX02511.99IPO';\\n%INCLUDE lib1 as %INCLUDE 'C:/temp/syslib/lib1.pli';\\n```\\n\\nthe Ddnames are defined as:\\n\\n```\\nsonar.pli.includeDdnames=O,SYSLIB\\n\\nsonar.pli.includeDdname.O.path=c:/temp/o\\nsonar.pli.includeDdname.O.suffix=.99IPO\\n\\nsonar.pli.includeDdname.SYSLIB.path=c:/temp/syslib\\nsonar.pli.includeDdname.SYSLIB.suffix=.pli\\n```\\n\\nNote that the following constructs, involving at least two members, are currently not supported:\\n\\n```\\n%INCLUDE member1, member2;\\n%INCLUDE ddname1(member1), member2;\\n%INCLUDE member1, ddname1(member2);\\n%INCLUDE ddname1(member1), ddname2(member2);\\n```\\n\\n## Related Pages\\n<!-- sonarqube -->\\n* [Adding Coding Rules](/extend/adding-coding-rules/)\\n<!-- /sonarqube -->\\n\"},{\"path\":\"analysis/languages/plsql\",\"content\":\"---\\ntitle: PL/SQL\\nurl: /analysis/languages/plsql/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the PL/SQL-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud --> **[Administration > General Settings > PL/SQL](/#sonarqube-admin#/admin/settings?category=pl%2Fsql)**\\n\\n## Advanced parameters\\n\\n### Default Schema\\nParameter | Description\\n--- | ---\\n`sonar.plsql.defaultSchema` | When a schema object (table, view, index, synonym) is referenced in SQL code without a schema prefix, the analyzer will assume that it belongs to this schema.\\n\\n\\n### Data Dictionary\\nSome rules raise issues only when a data dictionary is provided during analysis. To provide a\u00A0data dictionary, you must define the following properties in the `sonar-project.properties` file or on the scanner command line using the\u00A0 `-D` prefix:\\n\\n\\n|Parameter|Description|\\n| --- | --- | \\n|`sonar.plsql.jdbc.url`|URL of the JDBC connection. **Required for data dictionary lookup**. For example: `jdbc:oracle:thin:@my-oracle-server:1521/my-db`\\n|`sonar.plsql.jdbc.user`|JDBC user to authenticate the connection.\\n|`sonar.plsql.jdbc.password`|JDBC password provided to authenticate the connection.\\n|`sonar.plsql.jdbc.driver.path`|Path or URL of the Oracle jdbc driver jar.\\n|`sonar.plsql.jdbc.driver.class`|Java class name of the Oracle Driver. For example: `oracle.jdbc.OracleDriver`\\n\\nProviding this configuration allows SonarPLSQL to query data dictionary views such as `SYS.ALL_TAB_COLUMNS` in order to to better analyze your SQL.\\n\\n\\n<!-- sonarqube -->\\n## Related Pages\\n* [Adding Coding Rules](/extend/adding-coding-rules/)\\n<!-- /sonarqube -->\\n\\n\"},{\"path\":\"analysis/languages/python\",\"content\":\"---\\ntitle: Python\\nurl: /analysis/languages/python/\\n---\\n\\n\\n\\n## Supported Versions\\n* Python 3.X\\n* Python 2.X\\n\\n## Language-Specific Properties\\n\\nDiscover and update the Python-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud --> **[Administration > General Settings > Python](/#sonarqube-admin#/admin/settings?category=python)**.\\n\\n## Pylint\\n[Pylint](http://www.pylint.org/) is an external static source code analyzer, it can be used in conjunction with SonarPython.\\n\\nYou can enable Pylint rules directly in your Python Quality Profile. Their rule keys start with \\\"*Pylint:*\\\".\\n\\nOnce the rules are activated you should run Pylint and import its report:\\n```\\npylint <module_or_package> -r n --msg-template=\\\"{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}\\\" > <report_file>\\n```\\nThen pass the generated report path to analysis via the `sonar.python.pylint.reportPath` property.\\n\\n<!-- sonarqube -->\\n\\n## Custom Rules\\n\\n### Overview\\n\\nThe Python analyzer parses the source code, creates an Abstract Syntax Tree (AST) and then walks through the entire tree. A coding rule is a visitor that is able to visit nodes from this AST.\\n\\nAs soon as the coding rule visits a node, it can navigate its children and log issues if necessary.\\n\\n### Writing a Plugin\\n\\nCustom rules for Python can be added by writing a SonarQube Plugin and using Python analyzer APIs.\\nHere are the step to follow:\\n\\n#### Create SonarQube Plugin\\n\\n* create a standard SonarQube plugin project\\n* attach this plugin to the SonarQube Python analyzer through the `pom.xml`:\\n  * add the dependency to the Python analyzer.\\n  * add the following line in the sonar-packaging-maven-plugin configuration.\\n  ```\\n  <requirePlugins>python:2.0-SNAPSHOT</requirePlugin>\\n  ```\\n* implement the following extension points:\\n  * [Plugin](http://javadocs.sonarsource.org/latest/apidocs/org/sonar/api/Plugin.html)\\n  * [RulesDefinition](http://javadocs.sonarsource.org/latest/apidocs/org/sonar/api/server/rule/RulesDefinition.html) and [PythonCustomRuleRepository](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/PythonCustomRuleRepository.java), which can be implemented by a single class, to declare your custom rules\\n* declare the RulesDefinition as an extension in the Plugin extension point.\\n\\n#### Implement a Rule\\n\\n* create a class that will hold the implementation of the rule, it should:\\n  * extend `PythonCheckTree` or `PythonSubscriptionCheck`\\n  * define the rule name, key, tags, etc. with Java annotations.\\n* declare this class in the `RulesDefinition`.\\n\\n### Example Plugin\\n\\nTo get started a sample plugin can be found here: [python-custom-rules](https://github.com/SonarSource/sonar-custom-rules-examples/tree/master/python-custom-rules).\\n\\n####  Implementation Details\\n\\n**Using `PythonCheckTree`**\\n\\nTo explore a part of the AST, override a method from the PythonCheckTree. For example, if you want to explore \\\"if statement\\\" nodes, override [PythonCheckTree#visitIfStatement](https://github.com/SonarSource/sonar-python/blob/39b6126e9fdef42b93004cf6cc5818e861051334/python-frontend/src/main/java/org/sonar/plugins/python/api/tree/BaseTreeVisitor.java#L56) method that will be called each time an [ifStatement](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/tree/IfStatement.java) node is encountered in the AST.\\n\\n[[warning]]\\n| When overriding a visit method, you must call the super method in order to allow the visitor to visit the children the node.\\n\\n**Using `PythonSubscriptionCheck`**\\n\\nTo explore a part of the AST, override [`PythonSubscriptionCheck#initialize`](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/SubscriptionCheck.java#L26) and call the [`SubscriptionCheck.Context#registerSyntaxNodeConsumer`](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/SubscriptionCheck.java) with the [`Tree#Kind`](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/tree/Tree.java#L42) of node you want to visit. For example, if you want to explore \\\"if statement\\\" you should register to the kind [`Tree#Kind#IF_STATEMENT`](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/tree/Tree.java#L97) and then provide a lambda that will consume a [`SubscriptionContext`](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/SubscriptionContext.java#L27) to act on such ndoes.\\n\\n**Create Issues**\\n\\nFrom the check, issue can be created by calling [`SubscriptionContext#addIssue`](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/SubscriptionContext.java#L30) method or  [`PythonCheckTree#addIssue`](https://github.com/SonarSource/sonar-python/blob/master/python-frontend/src/main/java/org/sonar/plugins/python/api/PythonCheckTree.java#L36) method.\\n\\n**Testing Checks**\\n\\nTo test custom checks you can use method [`PythonCheckVerifier#verify`](https://github.com/SonarSource/sonar-python/blob/master/python-checks-testkit/src/main/java/org/sonar/python/checks/utils/PythonCheckVerifier.java). Don't forget to add the testkit dependency to access this class from your project : \\n  ```\\n    <dependency>\\n\\t  <groupId>org.sonarsource.python</groupId>\\n\\t  <artifactId>python-checks-testkit</artifactId>\\n\\t  <version>${project.version}</version>\\n\\t  <scope>test</scope>\\n    </dependency>\\n  ```\\n\\nYou should end each line with an issue with a comment in the following form:\\n\\n```\\n# Noncompliant {{Message}}\\n```\\n\\nComment syntax is described [here](https://github.com/SonarSource/sonar-analyzer-commons/blob/master/test-commons/README.md).\\n\\n<!-- /sonarqube -->\\n\\n## Related Pages\\n* [Importing External Issues](/analysis/external-issues/) ([Pylint](http://www.pylint.org/), [Bandit](https://github.com/PyCQA/bandit/blob/master/README.rst))\\n* [Test Coverage & Execution](/analysis/coverage/) (the [Coverage Tool](http://nedbatchelder.com/code/coverage/) provided by [Ned Batchelder](http://nedbatchelder.com/), [Nose](https://nose.readthedocs.org/en/latest/), [pytest](https://docs.pytest.org/en/latest/))\\n\"},{\"path\":\"analysis/languages/rpg\",\"content\":\"---\\ntitle: RPG\\nurl: /analysis/languages/rpg/\\n---\\n\\n_RPG analysis is available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the RPG-specific [properties](/analysis/analysis-parameters/) in: **[Administration > General Settings > RPG](/#sonarqube-admin#/admin/settings?category=rpg)**\\n\\n## Source Code Extraction\\n\\nIn order to analyze your source code with SonarQube you need to first extract it onto a filesystem. You can use your own tool or an open source tool; SonarSource does not provide any connectors or source code extraction tools.\\n\\n## RPG Source Format\\n\\nDepending on your extraction process, your RPG source files may include an extra margin on the left of the 80 columns used for code. This margin is in addition to the standard margin which takes up characters 1-5 in the 80-character source format. The extra margin is controlled through the `sonar.rpg.leftMarginWidth` property. By default, it is set to 12, which is the size of the margin in an IBM \u201Csource physical file\u201D. If your RPG source files do not contain such a margin, you should set `sonar.rpg.leftMarginWidth` to `0`.\\n\\nYou can find an [example file](https://raw.githubusercontent.com/SonarSource/sonar-scanning-examples/master/sonarqube-scanner/src/rpg/MYPROGRAM.rpg) illustrating a 12-character margin in our sample project.\\n\\nYou should also make sure to set `sonar.sourceEncoding` to the appropriate encoding. Please check the [documentation of this property](/analysis/analysis-parameters/).\\n\\n## Free-Form Support\\n\\nFree-form is supported for C-specs and SQL statements. Free-form is not yet supported for H, F, D and P specs (which were [added in IBM i 7.2](http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/rpgrelv7r2.htm)).\\n\\n## Custom Rules for RPG\\n\\nTo get started you can [browse](https://github.com/SonarSource/sonar-custom-rules-examples/tree/master/rpg-custom-rules) or [download](https://github.com/SonarSource/sonar-custom-rules-examples/archive/master.zip) a simple plugin.\\n\\n### Pre-requisites\\n\\n- JDK 8\\n- SonarRPG 2.0+\\n\\n### Creating a Maven Project\\n\\nYou should first create a Maven project: re-using the [pom.xml from the RPG example](https://github.com/SonarSource/sonar-custom-rules-examples/blob/master/rpg-custom-rules/pom.xml) is a good start.\\n\\nThe following dependencies need to be defined in the pom.xml:\\n\\n- `sonar-plugin-api` to get access to SonarQube APIs\\n- `sonar-rpg-plugin` to use the APIs of the RPG plugin\\n\\n### Writing a Custom Rule\\n\\nEach rule needs to be defined in a class which:\\n\\n- Implements [`com.sonarsource.rpg.api.checks.Check`](http://javadocs.sonarsource.org/rpg/apidocs/2.3/index.html?com/sonarsource/rpg/api/checks/Check.html). Instead of implementing this interface directly, the class can also extend [`VisitorBasedCheck`](http://javadocs.sonarsource.org/rpg/apidocs/2.3/index.html?com/sonarsource/rpg/api/checks/Check.html?com/sonarsource/rpg/api/checks/VisitorBasedCheck.html) which makes it easier to target some specific parts of the analyzed source code.\\n- Has an `org.sonar.check.Rule` annotation to define the key of the rule.\\n\\n#### Navigating the Syntax Tree\\n\\nThe analyzed source code is represented as a tree structure. The top-most tree is an instance of [`ModuleTree`](http://javadocs.sonarsource.org/rpg/apidocs/2.3/index.html?com/sonarsource/rpg/api/checks/Check.html?com/sonarsource/rpg/api/tree/ModuleTree.html) which has references to other trees. Some of the trees represent a group of RPG calculations (for example, an `IF` group is represented as a tree which references the calculations which are executed when the condition is true), some others represent expressions such as `a + b`.\\n\\nThe instance of [`CheckContext`](http://javadocs.sonarsource.org/rpg/apidocs/2.3/index.html?com/sonarsource/rpg/api/checks/Check.html?com/sonarsource/rpg/api/checks/CheckContext.html) which is passed to the checks gives a reference to the `ModuleTree` of the analyzed source code. The whole tree structure can be navigated from that object.\\n\\nMost often, it's easier to extend `VisitorBasedCheck` and to override one or more methods which name starts with visit, e.g. `visitIfGroup`. That way, it's possible to define what should be executed when visiting some specific kinds of trees.\\n\\n#### Creating Issues\\n\\n[`CheckContext`](http://javadocs.sonarsource.org/rpg/apidocs/2.3/index.html?com/sonarsource/rpg/api/checks/Check.html?com/sonarsource/rpg/api/checks/CheckContext.html) provides methods to create issues either at file level or at line level.\\n\\n#### Testing the Rule\\n\\nIt's possible to write unit tests for custom rules using `com.sonarsource.rpg.api.test.RpgCheckVerifier`. This utility class executes a custom rule against a given RPG test file. The RPG test file should contain comments denoting lines where issues should be expected:\\n\\n- if the line ends with \\\"// Noncompliant\\\", `RpgCheckVerifier` expects an issue on that line.\\n- if the line ends with \\\"// Noncompliant {{my message}}\\\", `RpgCheckVerifier` expects an issue on that line and checks that the issue message is \\\"my message\\\".\\n\\nThe example project contains an [example test class](https://github.com/SonarSource/sonar-custom-rules-examples/blob/master/rpg-custom-rules/src/test/java/com/sonarsource/rpg/example/checks/DataStructureNamingConventionCheckTest.java) and the [associated RPG file](https://github.com/SonarSource/sonar-custom-rules-examples/blob/master/rpg-custom-rules/src/test/resources/data-structure-name.rpg).\\n\\n### Rules Definition\\n\\nOne class should extend [`com.sonarsource.rpg.api.CustomRulesDefinition`](http://javadocs.sonarsource.org/rpg/apidocs/2.3/index.html?com/sonarsource/rpg/api/checks/Check.html?com/sonarsource/rpg/api/CustomRulesDefinition.html): it should list the classes of the custom rules and use the SonarQube API to define the metadata of these rules: name, HTML description, default severity...\\n\\n### Plugin Class\\n\\nThe entry point of the custom plugin is a class which lists SonarQube extensions. This list should contain the class created at the previous step.\\n\\n### Packaging the Custom Plugin\\n\\nTo package your custom plugin, the pom.xml should use `org.sonarsource.sonar-packaging-maven-plugin`, as described in the [documentation explaining how to build a plugin](/extend/developing-plugin/).\\n\\nIn the configuration for `sonar-packaging-maven-plugin`, basePlugin should be set to \\\"rpg\\\".\\n\\nBuilding the Maven project will produce a JAR file which can be deployed to a SonarQube server.\\n\"},{\"path\":\"analysis/languages/ruby\",\"content\":\"---\\ntitle: Ruby\\nurl: /analysis/languages/ruby/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the Ruby-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud --> **[Administration > General Settings > Ruby](/#sonarqube-admin#/admin/settings?category=ruby)**\\n\\n## Related Pages\\n* [Importing External Issues](/analysis/external-issues/) (Rubocop)\\n* [Test Coverage & Execution](/analysis/coverage/) (SimpleCov)\\n\"},{\"path\":\"analysis/languages/scala\",\"content\":\"---\\ntitle: Scala\\nurl: /analysis/languages/scala/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the Scala-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud --> **[Administration > General Settings > Scala](/#sonarqube-admin#/admin/settings?category=scala)**.\\n\\n## Related Pages\\n* [Importing External Issues](/analysis/external-issues/) (Scalastyle or Scapegoat)\\n* [Test Coverage & Execution](/analysis/coverage/) (Scoverage)\\n\"},{\"path\":\"analysis/languages/swift\",\"content\":\"---\\ntitle: Swift\\nurl: /analysis/languages/swift/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the Swift-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud --> **[Administration > General Settings > Swift](/#sonarqube-admin#/admin/settings?category=swift)**.\\n\\n## Related Pages\\n* [Importing External Issues](/analysis/external-issues/) (Xcode A.K.A. ProfData)\\n* [Test Coverage & Execution](/analysis/coverage/) (SwiftLint)\\n\"},{\"path\":\"analysis/languages/tsql\",\"content\":\"---\\ntitle: T-SQL\\nurl: /analysis/languages/tsql/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the T-SQL-specific [properties](/analysis/analysis-parameters/) in:  <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > T-SQL](/#sonarqube-admin#/admin/settings?category=t-sql)**.\\n\\n## Important Note\\nWith the default configuration, only files with the `.tsql` are analyzed as T-SQL, and files with the `.sql` file extension are analyzed as PL/SQL. This behavior is defined in <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > T-SQL > File Suffixes](/#sonarqube-admin#/admin/settings?category=t-sql)** and <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > PL/SQL > File Suffixes](/#sonarqube-admin#/admin/settings?category=pl%2Fsql)**. You can override these properties <!-- sonarqube -->either at server level or<!-- /sonarqube --> at project level.\\n\\n\"},{\"path\":\"analysis/languages/vb6\",\"content\":\"---\\ntitle: VB6\\nurl: /analysis/languages/vb6/\\n---\\n\\n_VB6 analysis is available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n\\n\\n## Language-Specific Properties\\n\\nYou can discover and update VB6-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > Visual Basic](/#sonarqube-admin#/admin/settings?category=visual+basic)**.\\n\"},{\"path\":\"analysis/languages/vbnet\",\"content\":\"---\\ntitle: VB.NET\\nurl: /analysis/languages/vbnet/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the VB.NET-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud --> **[Administration > General Settings > VB.NET](/#sonarqube-admin#/admin/settings?category=vb.net)**\\n\\n### Analyze Generated Code\\n\\nTo analyze tool-generated code (e.g. WCF code generated by `SvcUtil.exe`) for a specific VB.NET project, enable the \\\"Analyze generated code\\\" setting inside **Project > Administration > General Settings > VB.NET**. By default, tool-generated code files are skipped from analysis.\\n\\n## Known Limitations\\nCurrently an error will be thrown when an issue is raised on a line of code containing the following pattern `\\\\s+error\\\\s*:` (i.e. one or more spaces, the string 'error', zero or more spaces and a ':' ) . This is a well known problem on the Microsoft side (see [issue](https://github.com/dotnet/roslyn/issues/5724/)). In order to work around this problem, our analyzer will skip issues reported on any line where the pattern is detected.\\n\\n\\n## Related Pages\\n* [Importing External Issues](/analysis/external-issues/) (VSTest, NUnit, MSTest, xUnit)\\n* [Test Coverage & Execution](/analysis/coverage/) (Visual Studio Code Coverage, dotCover, OpenCover, Coverlet, NCover 3)\\n* [SonarScanner for MSBuild](/analysis/scan/sonarscanner-for-msbuild/)\\n* [SonarScanner for Azure DevOps](/analysis/scan/sonarscanner-for-azure-devops/)\\n\"},{\"path\":\"analysis/languages/xml\",\"content\":\"---\\ntitle: XML\\nurl: /analysis/languages/xml/\\n---\\n\\n\\n\\n## Language-Specific Properties\\n\\nDiscover and update the XML-specific [properties](/analysis/analysis-parameters/) in: <!-- sonarcloud -->Project <!-- /sonarcloud -->**[Administration > General Settings > XML](/#sonarqube-admin#/admin/settings?category=xml)**\\n\\n<!-- sonarqube -->\\n## Related Pages\\n* [Adding Coding Rules](/extend/adding-coding-rules/)\\n<!-- /sonarqube -->\\n\"},{\"path\":\"analysis/overview\",\"content\":\"---\\ntitle: Overview\\nurl: /analysis/overview/\\n---\\n\\nOnce the SonarQube platform has been installed, you're ready to install a scanner and begin creating projects. To do that, you must install and configure the scanner that is most appropriate for your needs. Do you build with:\\n\\n* Gradle - [SonarScanner for Gradle](/analysis/scan/sonarscanner-for-gradle/)\\n* .NET - [SonarScanner for .NET](/analysis/scan/sonarscanner-for-msbuild/)\\n* Maven - use the [SonarScanner for Maven](/analysis/scan/sonarscanner-for-maven/)\\n* Jenkins - [SonarScanner for Jenkins](/analysis/scan/sonarscanner-for-jenkins/)\\n* Azure DevOps - [SonarQube Extension for Azure DevOps](/analysis/scan/sonarscanner-for-azure-devops/)\\n* Ant - [SonarScanner for Ant](/analysis/scan/sonarscanner-for-ant/)\\n* anything else (CLI) - [SonarScanner](/analysis/scan/sonarscanner/)\\n\\n[[info]]\\n| SonarQube integrations are supported for popular DevOps Platforms: GitHub Enterprise and GitHub.com, BitBucket Server, Azure Devops Server and Azure DevOps Services.\\n\\n[[warning]]\\n| We do not recommend running an antivirus scanner on the machine where a SonarQube analysis runs, it could result in unpredictable behavior.\\n\\n\\nA project is created in SonarQube automatically on its first analysis. However, if you need to set some configuration on your project before its first analysis, you have the option of provisioning it via Administration options or the **+** menu item, which is visible to users with project creation rights.\\n\\n\\n## What does analysis produce? \\nSonarQube can analyze up to 27 different languages depending on your edition. The outcome of this analysis will be quality measures and issues (instances where coding rules were broken). However, what gets analyzed will vary depending on the language:\\n\\n* On all languages, \\\"blame\\\" data will automatically be imported from supported SCM providers. [Git and SVN are supported automatically](/analysis/scm-integration/). Other providers require additional plugins.\\n* On all languages, a static analysis of source code is performed (Java files, COBOL programs, etc.)\\n* A static analysis of compiled code can be performed for certain languages (.class files in Java, .dll files in C#, etc.)\\n\\n\\n## Will all files be analyzed?\\nBy default, only files that are recognized by your edition of SonarQube are loaded into the project during analysis. \\nFor example if you're using SonarQube Community Edition, which includes analysis of Java and JavaScript, but not C++, all `.java` and `.js` files would be loaded, but `.cpp` files would be ignored.\\n\\n## What about branches and pull requests?\\n_Developer Edition_ adds the ability to analyze your project's [branches](/branches/overview/) and [pull requests](/analysis/pull-request/) as well as the ability to automatically report your pull request analysis to your DevOps Platform interface. \\n\\n## What happens during analysis?\\nDuring analysis, data is requested from the server, the files provided to the analysis are analyzed, and the resulting data is sent back to the server at the end in the form of a report, which is then analyzed asynchronously server-side.\\n\\nAnalysis reports are queued, and processed sequentially, so it is quite possible that for a brief period after your analysis log shows completion, the updated values are not visible in your {instance} project. However, you will be able to tell what's going on because an icon will be added on the project homepage to the right of the project name. Mouse over it for more detail (and links if you're logged in with the proper permissions).\\n\\n![background task processing in progress.](/images/backgroundTaskProcessingInProgress.jpeg)\\n\\n\\nThe icon goes away once processing is complete, but if analysis report processing fails for some reason, the icon changes:\\n\\n![background task processing failed.](/images/backgroundTaskProcessingFailedIcon.jpeg)\\n\\n\\n## FAQ\\n\\n**Q.** Analysis errors out with `java.lang.OutOfMemoryError: GC overhead limit exceeded`. What do I do?  \\n**A.** This means your project is too large or too intricate for the scanner to analyze with the default memory allocation. To fix this you'll want to allocate a larger heap (using `-Xmx[numeric value here]`) to the process running the analysis. Some CI engines may give you an input to specify the necessary values, for instance if you're using a Maven Build Step in a Jenkins job to run analysis. Otherwise, use Java Options to set a higher value. Note that details of setting Java Options are omitted here because they vary depending on the environment.\\n\\n**Q.** Analysis errors out with `PKIX path building failed`. What do I do? \\n**A.** This error tells you that your SonarQube server is configured with HTTPS and a custom SSL certificate. However, the certificate is not correctly configured in the scanner machine\u2019s JVM. This configuration is outside of SonarQube scope. The server certificate is unknown and could not be validated with the provided truststore. You need to add the SonarQube server certificate to the Java truststore. See [Oracle's documentation](https://docs.oracle.com/cd/E19830-01/819-4712/ablqw/index.html) for more information.\"},{\"path\":\"analysis/pull-request\",\"content\":\"---\\ntitle: Pull Request Analysis\\nurl: /analysis/pull-request/\\n---\\n\\n_Pull Request analysis is available starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)._\\n\\nYou can see your Pull Requests in SonarQube from the Branches and Pull Requests dropdown menu of your project.\\n\\nPull Request analysis shows your Pull Request's Quality Gate and analysis in the SonarQube interface. This analysis shows new issues introduced by the Pull Request before merging with the target branch:\\n\\n![Pull Request Analysis.](/images/pranalysis.png)\\n\\n## Prerequisites\\n\\nBefore analyzing your Pull Requests, make sure that:\\n- The Pull Request source branch is checked out in the local repository.\\n- The branch being targeted by the Pull Request is fetched and present in the local repository. \\n- The analysis is being run on a local repository with valid repository metadata (e.g. the .git or .svn folders have not been removed). \\n Avoid any attempt at previewing the merge or actions involving your main branch.\\n\\n## Report pull request status to your DevOps Platform\\nYou can also report the pull request analysis and Quality Gate status directly in your DevOps Platform's interface. To set up pull request decoration, see the DevOps Platform integration page that corresponds with your DevOps Platform:\\n- [GitHub Enterprise and GitHub.com](/analysis/github-integration/)\\n- [GitLab Self-Managed and GitLab.com](/analysis/gitlab-integration/)\\n- [Bitbucket Server](/analysis/bitbucket-integration/)\\n- [Bitbucket Cloud](/analysis/bitbucket-cloud-integration/)\\n- [Azure DevOps](/analysis/azuredevops-integration/)\\n\\n[[info]]\\n| To decorate Pull Requests, a SonarQube analysis needs to be run on your code. You can find the additional parameters required for Pull Request analysis below in the **Analysis parameters** section.\\n\\n## Pull request Quality Gate\\n\\nA [Quality Gate](/user-guide/quality-gates/) lets you ensure you are meeting your organization's quality policy and that you can merge your pull request. The pull request uses your project Quality Gate as follows:\\n* **Focuses on new code** \u2013 The Pull Request quality gate only uses your project's quality gate conditions that apply to \\\"on New Code\\\" metrics.\\n* **Assigns a status** \u2013 Each Pull Request shows a quality gate status reflecting whether it Passed or Failed.\\n\\nPull request analyses on SonarQube are deleted automatically after 30 days with no analysis. This can be updated in **Administration > Configuration > General Settings > Housekeeping > Number of days before purging inactive branches**. \\n\\n## Analysis parameters\\n\\nThe following parameters enable Pull Request analysis.\\n\\n[[info]]\\n| Scanners can automatically detect Pull Request parameters when running on the following CI services:\\n| * Azure Pipelines\\n| * Bitbucket Pipelines\\n| * Cirrus CI\\n| * Codemagic\\n| * GitHub Actions\\n| * GitLab CI/CD\\n| * Jenkins (with the Branch Source plugin configured)\\n|\\n| Manually setting Pull Request parameters overrides automatic detection.\\n\\n| Parameter Name        | Description |\\n| --------------------- | ---------------------------------- |\\n| `sonar.pullrequest.key` | Unique identifier of your Pull Request. Must correspond to the key of the Pull Request in your DevOps Platform.<br/> e.g.: `sonar.pullrequest.key=5` |\\n| `sonar.pullrequest.branch` | The name of the branch that contains the changes to be merged.<br/> e.g.: `sonar.pullrequest.branch=feature/my-new-feature` |\\n| `sonar.pullrequest.base` | The branch into which the Pull Request will be merged. <br/> Default: master <br/> e.g.: `sonar.pullrequest.base=master` |\\n\"},{\"path\":\"analysis/scan/sonarscanner-for-ant\",\"content\":\"---\\ntitle: SonarScanner for Ant\\nurl: /analysis/scan/sonarscanner-for-ant/\\n---\\n\\n<!-- static -->\\n<update-center updatecenterkey=\\\"scannerant\\\"></update-center>\\n<!-- /static -->\\n<!-- embedded -->\\n[[info]]\\n| See the [online documentation](https://redirect.sonarsource.com/doc/download-scanner-ant.html) to get more details on the latest version of the scanner and how to download it.\\n<!-- /embedded -->\\n\\nThe SonarScanner for Ant provides a `task` to allow integration of SonarQube analysis into an Apache Ant build script.\\n\\nThe SonarScanner for Ant is an Ant Task that is a wrapper of [SonarScanner](/analysis/scan/sonarscanner/), which works by invoking SonarScanner and passing to it all [properties](/analysis/analysis-parameters/) named following a `sonar.*` convention. This has the downside of not being very Ant-y, but the upside of providing instant availability of any new analysis parameter introduced by a new version of SonarQube. Therefore, successful use of the SonarScanner for Ant requires strict adherence to the property names shown below.\\n\\n## Using the SonarScanner for Ant\\nDefine a new sonar Ant target in your Ant build script:\\n```\\n<!-- build.xml -->\\n<project name=\\\"My Project\\\" default=\\\"all\\\" basedir=\\\".\\\" xmlns:sonar=\\\"antlib:org.sonar.ant\\\">\\n...\\n  \\n<!-- Define the SonarQube global properties (the most usual way is to pass these properties via the command line) -->\\n<property name=\\\"sonar.host.url\\\" value=\\\"http://localhost:9000\\\" />\\n \\n...\\n  \\n<!-- Define the SonarQube project properties -->\\n<property name=\\\"sonar.projectKey\\\" value=\\\"org.sonarqube:sonarqube-scanner-ant\\\" />\\n<property name=\\\"sonar.projectName\\\" value=\\\"Example of SonarScanner for Ant Usage\\\" />\\n<property name=\\\"sonar.projectVersion\\\" value=\\\"1.0\\\" />\\n<property name=\\\"sonar.sources\\\" value=\\\"src\\\" />\\n<property name=\\\"sonar.java.binaries\\\" value=\\\"build\\\" />\\n<property name=\\\"sonar.java.libraries\\\" value=\\\"lib/*.jar\\\" />\\n...\\n \\n<!-- Define SonarScanner for Ant Target -->\\n<target name=\\\"sonar\\\">\\n    <taskdef uri=\\\"antlib:org.sonar.ant\\\" resource=\\\"org/sonar/ant/antlib.xml\\\">\\n        <!-- Update the following line, or put the \\\"sonarqube-ant-task-*.jar\\\" file in your \\\"$HOME/.ant/lib\\\" folder -->\\n        <classpath path=\\\"path/to/sonar/ant/task/lib/sonarqube-ant-task-*.jar\\\" />\\n    </taskdef>\\n \\n    <!-- Execute SonarScanner for Ant Analysis -->\\n    <sonar:sonar />\\n</target>\\n```\\n\\nRun the following command from the project base directory to launch the analysis. You need to pass an [authentication token](/user-guide/user-token/) using the `sonar.login` property in your command line:\\n```\\nant sonar -Dsonar.login=yourAuthenticationToken\\n```\\n\\n## Sample Project\\nTo help you get started, a simple project sample is available here: https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner-ant\\n\\n## Troubleshooting\\n**Enable Debug Logs**  \\nTo enable debug logs, use the regular Ant verbose option: `-v`\\n```\\nant sonar -v\\n```\\n\"},{\"path\":\"analysis/scan/sonarscanner-for-azure-devops\",\"content\":\"---\\ntitle: SonarScanner for Azure DevOps\\nurl: /analysis/scan/sonarscanner-for-azure-devops/\\n---\\n\\n<!-- static -->\\n<update-center updatecenterkey=\\\"scannerazure\\\"></update-center>\\n<!-- /static -->\\n<!-- embedded -->\\n[[info]]\\n| See the [online documentation](https://redirect.sonarsource.com/doc/download-scanner-azure.html) to get more details on the latest version of the scanner and how to download it.\\n<!-- /embedded -->\\n\\nThe [SonarScanner for Azure DevOps](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) makes it easy to integrate analysis into your build pipeline. The extension allows the analysis of all languages supported by SonarQube.\\n\\n## Compatibility\\nThe SonarScanner for Azure DevOps 5.x is compatible with:\\n* Azure DevOps Server 2019 (including _Express_ editions)\\n* Azure DevOps Server 2020 (including _Express_ editions)\\n* Azure DevOps Services\\n\\nThe SonarScanner for Azure DevOps 4.x is compatible with:\\n* TFS 2017 Update 2+ (including _Express_ editions)\\n* TFS 2018 (including _Express_ editions)\\n\\n## Analysis\\nFor information on setting up analysis with the SonarScanner for Azure DevOps, see the [Azure DevOps DevOps Platform integration](/analysis/azuredevops-integration/) page.\\n\"},{\"path\":\"analysis/scan/sonarscanner-for-gradle\",\"content\":\"---\\ntitle: SonarScanner for Gradle\\nurl: /analysis/scan/sonarscanner-for-gradle/\\n---\\n\\n<!-- static -->\\n<update-center updatecenterkey=\\\"scannergradle\\\"></update-center>\\n<!-- /static -->\\n<!-- embedded -->\\n[[info]]\\n| See the [online documentation](https://redirect.sonarsource.com/doc/download-scanner-gradle.html) to get more details on the latest version of the scanner and how to download it.\\n<!-- /embedded -->\\n\\nThe SonarScanner for Gradle provides an easy way to start SonarQube analysis of a Gradle project.\\n\\nThe ability to execute the SonarQube analysis via a regular Gradle task makes it available anywhere Gradle is available (developer build, CI server, etc.), without the need to manually download, setup, and maintain a SonarQube Runner installation. The Gradle build already has much of the information needed for SonarQube to successfully analyze a project. By preconfiguring the analysis based on that information, the need for manual configuration is reduced significantly. \\n\\n## Prerequisites\\n* Gradle versions 3+\\n* At least the minimal version of Java supported by your SonarQube server is in use \\n\\nBytecode created by javac compilation is required for Java analysis, including Android projects.\\n\\n## Configure the Scanner\\nInstallation is automatic, but certain global properties should still be configured. A good place to configure global properties is `~/.gradle/gradle.properties`. Be aware that the scanner uses system properties so all properties should be prefixed by `systemProp`. \\n\\n```\\n# gradle.properties\\nsystemProp.sonar.host.url=http://localhost:9000\\n```\\n\\n## Analyzing\\nFirst, include the scanner in your build in `build.gradle`:\\n\\n```\\nplugins {\\n  id \\\"org.sonarqube\\\" version \\\"3.3\\\"\\n}\\n```\\n\\nMore details on https://plugins.gradle.org/plugin/org.sonarqube\\n\\nAssuming a local SonarQube server with out-of-the-box settings is up and running, no further configuration is required.\\n\\nYou need to pass an [authentication token](/user-guide/user-token/) using the `sonar.login` property in your command line or you configure it as part of your `gradle.properties` file. Execute `gradle sonarqube -Dsonar.login=yourAuthenticationToken` and wait until the build has completed, then open the web page indicated at the bottom of the console output. You should now be able to browse the analysis results. \\n\\n## Analyzing Multi-Project Builds\\nTo analyze a project hierarchy, apply the SonarQube plugin to the root project of the hierarchy. Typically (but not necessarily) this will be the root project of the Gradle build. Information pertaining to the analysis as a whole has to be configured in the sonarqube block of this project. Any properties set on the command line also apply to this project.\\n\\n```\\n// build.gradle\\nsonarqube {\\n    properties {\\n        property \\\"sonar.sourceEncoding\\\", \\\"UTF-8\\\"\\n    }\\n}\\n```\\n\\nConfiguration shared between subprojects can be configured in a subprojects block.\\n```\\n// build.gradle\\nsubprojects {\\n    sonarqube {\\n        properties {\\n            property \\\"sonar.sources\\\", \\\"src\\\"\\n        }\\n    }\\n}\\n```\\n\\nProject-specific information is configured in the `sonarqube` block of the corresponding project.\\n```\\n// build.gradle\\nproject(\\\":project1\\\") {\\n    sonarqube {\\n        properties {\\n            property \\\"sonar.branch\\\", \\\"Foo\\\"\\n        }\\n    }}\\n```\\n\\nTo skip SonarQube analysis for a particular subproject, set sonarqube.skipProject to true.\\n```\\n// build.gradle\\nproject(\\\":project2\\\") {\\n    sonarqube {\\n        skipProject = true\\n    }\\n}\\n```\\n\\n## Task dependencies\\nAll tasks that produce output that should be included in the SonarQube analysis need to be executed before the `sonarqube` task runs. Typically, these are compile tasks, test tasks, and code coverage tasks. \\n\\nStarting with v3.0 of the SonarScanner for Gradle, task dependencies are no longer added automatically. Instead, the SonarScanner plugin enforces the correct order of tasks with `mustRunAfter`. You need to be either manually run the tasks that produce output before `sonarqube`, or you can add a dependency to the build script: \\n\\n```\\n// build.gradle\\nproject.tasks[\\\"sonarqube\\\"].dependsOn \\\"anotherTask\\\"\\n```\\n\\n## Sample project\\nA simple working example is available at this URL so you can check everything is correctly configured in your env:  \\nhttps://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner-gradle\\n\\n\\n## Analysis property defaults\\nThe SonarScanner for Gradle uses information contained in Gradle's object model to provide smart defaults for most of the standard [analysis parameters](/analysis/analysis-parameters/), as listed below.\\n\\nGradle defaults for standard SonarQube properties: \\n\\nProperty|Gradle default\\n---|---\\n`sonar.projectKey`|`[${project.group}:]${project.name}` for root module; `<root module key>:<module path>` for submodules \\n`sonar.projectName`|`${project.name}`\\n`sonar.projectDescription`|`${project.description}`\\n`sonar.projectVersion`|`${project.version}`\\n`sonar.projectBaseDir`|`${project.projectDir}`\\n`sonar.working.directory`|`${project.buildDir}/sonar`\\n\\nNotice that additional defaults are provided for projects that have the java-base or java plugin applied:\\n\\nProperty|Gradle default\\n---|---\\n`sonar.sourceEncoding`|`${project.compileJava.options.encoding}`\\n`sonar.java.source`|`${project.sourceCompatibility}`\\n`sonar.java.target`|`${project.targetCompatibility}`\\n`sonar.sources`|`${sourceSets.main.allJava.srcDirs}` (filtered to only include existing directories)\\n`sonar.tests`|`${sourceSets.test.allJava.srcDirs}` (filtered to only include existing directories)\\n`sonar.java.binaries`|`${sourceSets.main.output.classesDir}`\\n`sonar.java.libraries`|`${sourceSets.main.compileClasspath}` (filtering to only include files; rt.jar and jfxrt.jar added if necessary)\\n`sonar.java.test.binaries`|`${sourceSets.test.output.classesDir}`\\n`sonar.java.test.libraries`|`${sourceSets.test.compileClasspath}` (filtering to only include files; rt.jar and jfxrt.jar added if necessary)\\n`sonar.junit.reportPaths`|`${test.testResultsDir}` (if the directory exists)\\n\\nGroovy projects get all the Java defaults, plus:\\n\\nProperty|Gradle default\\n---|---\\n`sonar.groovy.binaries`|`${sourceSets.main.output.classesDir}`\\n\\n\\nAdditional defaults when JaCoCo plugin is applied\\n\\nProperty|Gradle default\\n---|---\\n`sonar.jacoco.reportPaths`|`${jacoco.destinationFile}`\\n`sonar.groovy.jacoco.reportPath`|`${jacoco.destinationFile}`\\n\\nAdditional defaults for Android projects (`com.android.application`, `com.android.library`, or `com.android.test`)\\nBy default the first variant of type \\\"debug\\\" will be used to configure the analysis. You can override the name of the variant to be used using the parameter 'androidVariant':\\n \\n```\\nbuild.gradle\\nsonarqube {\\n    androidVariant 'fullDebug'\\n}\\n```\\n\\nProperty|\\tGradle default\\n---|---\\n`sonar.sources` (for non test variants)|`${variant.sourcesets.map}` (ManifestFile/CDirectories/AidlDirectories/AssetsDirectories/CppDirectories/JavaDirectories/RenderscriptDirectories/ResDirectories/ResourcesDirectories)\\n`sonar.tests` (for test variants)|`${variant.sourcesets.map}` (ManifestFile/CDirectories/AidlDirectories/AssetsDirectories/CppDirectories/JavaDirectories/RenderscriptDirectories/ResDirectories/ResourcesDirectories)\\n`sonar.java[.test].binaries`|`${variant.destinationDir}`\\n`sonar.java[.test].libraries`|`${variant.javaCompile.classpath} + ${bootclasspath}`\\n`sonar.java.source`|`${variant.javaCompile.sourceCompatibility}`\\n`sonar.java.target`|`${variant.javaCompile.targetCompatibility}`\\n\\n\\n## Passing manual properties / overriding defaults\\nThe SonarScanner for Gradle adds a SonarQubeExtension extension to project and its subprojects, which allows you to configure/override the analysis properties.\\n```\\n// in build.gradle\\nsonarqube {\\n    properties {\\n        property \\\"sonar.exclusions\\\", \\\"**/*Generated.java\\\"\\n    }\\n}\\n```\\nSonarQube properties can also be set from the command line, or by setting a system property named exactly like the SonarQube property in question. This can be useful when dealing with sensitive information (e.g. credentials), environment information, or for ad-hoc configuration.\\n \\n```\\ngradle sonarqube -Dsonar.host.url=http://sonar.mycompany.com -Dsonar.verbose=true\\n```\\n\\nWhile certainly useful at times, we recommend keeping the bulk of the configuration in a (versioned) build script, readily available to everyone.\\nA SonarQube property value set via a system property overrides any value set in a build script (for the same property). When analyzing a project hierarchy, values set via system properties apply to the root project of the analyzed hierarchy. Each system property starting with `sonar.` will be taken into account.\\n\\n\\n\\n### Analyzing Custom Source Sets\\nBy default, the SonarScanner for Gradle passes on the project's main source set as production sources, and the project's test source set as test sources. This works regardless of the project's source directory layout. Additional source sets can be added as needed.\\n\\n```\\n// build.gradle\\nsonarqube {\\n    properties {\\n        properties[\\\"sonar.sources\\\"] += sourceSets.custom.allSource.srcDirs\\n        properties[\\\"sonar.tests\\\"] += sourceSets.integTest.allSource.srcDirs\\n    }\\n}\\n```\\n\\n## Advanced topics\\n### More on configuring SonarQube properties\\nLet's take a closer look at the `sonarqube.properties` `{}` block. As we have already seen in the examples, the `property()` method allows you to set new properties or override existing ones. Furthermore, all properties that have been configured up to this point, including all properties preconfigured by Gradle, are available via the properties accessor.\\n\\nEntries in the properties map can be read and written with the usual Groovy syntax. To facilitate their manipulation, values still have their \u201Cidiomatic\u201D type (File, List, etc.). After the sonarProperties block has been evaluated, values are converted to Strings as follows: Collection values are (recursively) converted to comma-separated Strings, and all other values are converted by calling their `toString()` methods.\\n\\nBecause the `sonarProperties` block is evaluated lazily, properties of Gradle's object model can be safely referenced from within the block, without having to fear that they have not yet been set.\\n\\n\"},{\"path\":\"analysis/scan/sonarscanner-for-jenkins\",\"content\":\"---\\ntitle: SonarScanner for Jenkins\\nurl: /analysis/scan/sonarscanner-for-jenkins/\\n---\\n\\n<!-- static -->\\n<update-center updatecenterkey=\\\"scannerjenkins\\\"></update-center>\\n<!-- /static -->\\n<!-- embedded -->\\n[[info]]\\n| See the [online documentation](https://redirect.sonarsource.com/doc/download-scanner-jenkins.html) to get more details on the latest version of the scanner and how to download it.\\n<!-- /embedded -->\\n\\nThis plugin lets you centralize the configuration of SonarQube server connection details in Jenkins global configuration.\\n\\nThen you can trigger SonarQube analysis from Jenkins using standard Jenkins Build Steps or [Jenkins Pipeline DSL](https://jenkins.io/solutions/pipeline/) to trigger analysis with:\\n\\n* [SonarScanner](/analysis/scan/sonarscanner/)\\n* [SonarScanner for Maven](/analysis/scan/sonarscanner-for-maven/)\\n* [SonarScanner for Gradle](/analysis/scan/sonarscanner-for-gradle/)\\n* [SonarScanner for .NET](/analysis/scan/sonarscanner-for-msbuild/)\\n\\nOnce the job is complete, the plugin will detect that a SonarQube analysis was made during the build and display a badge and a widget on the job page with a link to the SonarQube dashboard as well as quality gate status.\\n\\n## Installation\\n1. [Install the SonarScanner for Jenkins via the Jenkins Update Center](https://plugins.jenkins.io/sonar).\\n1. Configure your SonarQube server(s):\\n   1. Log into Jenkins as an administrator and go to **Manage Jenkins > Configure System**.\\n   1. Scroll down to the SonarQube configuration section, click **Add SonarQube**, and add the values you're prompted for.\\n   1. The server [authentication token](/user-guide/user-token/) should be created as a 'Secret Text' credential.\\n\\n## Analyzing a .NET solution\\n**Global Configuration**  \\n\\nThis step is mandatory if you want to trigger any of your analyses with the SonarScanner for .NET. You can define as many scanner instances as you wish. Then for each Jenkins job, you will be able to choose which launcher to use to run the SonarQube analysis.\\n\\n1. Log into Jenkins as an administrator and go to **Manage Jenkins > Global Tool Configuration**\\n1. Click on **Add SonarScanner for MSBuild**\\n1. Add an installation of the latest available version. Check **Install automatically** to have the SonarScanner for MSBuild automatically provisioned on your Jenkins executors\\n\\nIf you do not see any available version under Install from GitHub, first go to Manage Jenkins > Manage Plugins > Advanced and click on Check now\\n\\n**Job Configuration**  \\n\\n1. Configure the project, and go to the **Build** section.\\n1. Add the SonarQube for MSBuild - Begin Analysis to your build\\n1. Configure the SonarQube Project Key, Name, and Version in the SonarScanner for MSBuild - Begin Analysis build step\\n1. Add the MSBuild build step or the Execute Windows batch command to execute the build with MSBuild 14 (see compatibility) to your build.\\n1. Add the SonarQube for MSBuild - End Analysis build steps to your build\\n\\n## Analyzing a Java project with Maven or Gradle\\n**Global Configuration**  \\n\\n1. Log into Jenkins as an administrator and go to Manage Jenkins > Configure System\\n1. Scroll to the SonarQube servers section and check Enable injection of SonarQube server configuration as build environment variables\\n\\n**Job Configuration**  \\n\\n1. **Configure** the project, and go to the **Build Environment** section.\\n1. Enable **Prepare SonarScanner environment** to allow the injection of SonarQube server values into this particular job. If multiple SonarQube instances are configured, you will be able to choose which one to use.\\nOnce the environment variables are available, use them in a standard Maven build step (Invoke top-level Maven targets) by setting the Goals to include, or a standard Gradle build step (Invoke Gradle script) by setting the Tasks to execute.\\n\\nMaven goal:\\n```\\n$SONAR_MAVEN_GOAL\\n```\\nGradle task:\\n```\\nsonarqube\\n```\\n\\nIn both cases, launching your analysis may require authentication. In that case, make sure that the Global Configuration defines a valid SonarQube token.\\n\\n## Analyzing other project types\\n\\n**Global Configuration**  \\nThis step is mandatory if you want to trigger any of your SonarQube analyses with the SonarScanner. You can define as many scanner instances as you wish. Then for each Jenkins job, you will be able to choose which launcher to use to run the SonarQube analysis.\\n\\n1. Log into Jenkins as an administrator and go to **Manage Jenkins > Global Tool Configuration**\\n1. Scroll down to the SonarScanner configuration section and click on Add SonarScanner. It is based on the typical Jenkins tool auto-installation. You can either choose to point to an already installed version of SonarScanner (uncheck 'Install automatically') or tell Jenkins to grab the installer from a remote location (check 'Install automatically')\\n\\nIf you don't see a drop-down list with all available SonarScanner versions but instead see an empty text field then this is because Jenkins still hasn't downloaded the required update center file (default period is 1 day). You may force this refresh by clicking the 'Check Now' button in Manage Plugins > Advanced tab.\\n\\n**Job Configuration**\\n  \\n1. **Configure** the project, and go to the **Build** section. \\n1. Add the SonarScanner build step to your build.\\n1. Configure the SonarQube analysis properties. You can either point to an existing sonar-project.properties file or set the analysis properties directly in the **Analysis properties** field\\n\\n\\n\\n## Using a Jenkins pipeline\\nWe provide a `withSonarQubeEnv` block that allows you to select the SonarQube server you want to interact with. Connection details you have configured in Jenkins global configuration will be automatically passed to the scanner.\\n\\nIf needed you can override the `credentialId` if you don't want to use the one defined in global configuration (for example if you define credentials at folder level).\\n\\nIf you only need the SonarQube environment variables to be expanded in the build context then you can override the `envOnly` flag.\\n```\\nwithSonarQubeEnv('My SonarQube Server', envOnly: true) {\\n  // This expands the evironment variables SONAR_CONFIG_NAME, SONAR_HOST_URL, SONAR_AUTH_TOKEN that can be used by any script.\\n  println ${env.SONAR_HOST_URL} \\n}\\n```\\n\\nHere are some examples for every scanner, assuming you run on Unix slaves and you have configured a server named \\\"My SonarQube Server\\\" as well as required tools. If you run on Windows slaves, just replace `sh` with `bat`.\\n\\nSonarScanner:\\n```\\nnode {\\n  stage('SCM') {\\n    git 'https://github.com/foo/bar.git'\\n  }\\n  stage('SonarQube analysis') {\\n    def scannerHome = tool 'SonarScanner 4.0';\\n    withSonarQubeEnv('My SonarQube Server') { // If you have configured more than one global server connection, you can specify its name\\n      sh \\\"${scannerHome}/bin/sonar-scanner\\\"\\n    }\\n  }\\n}\\n```\\nSonarScanner for Gradle:\\n```\\nnode {\\n  stage('SCM') {\\n    git 'https://github.com/foo/bar.git'\\n  }\\n  stage('SonarQube analysis') {\\n    withSonarQubeEnv() { // Will pick the global server connection you have configured\\n      sh './gradlew sonarqube'\\n    }\\n  }\\n}\\n```\\nSonarScanner for Maven:\\n```\\nnode {\\n  stage('SCM') {\\n    git 'https://github.com/foo/bar.git'\\n  }\\n  stage('SonarQube analysis') {\\n    withSonarQubeEnv(credentialsId: 'f225455e-ea59-40fa-8af7-08176e86507a', installationName: 'My SonarQube Server') { // You can override the credential to be used\\n      sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar'\\n    }\\n  }\\n}\\n```\\nSonarScanner for .NET:\\n```\\nnode {\\n  stage('SCM') {\\n    git 'https://github.com/foo/bar.git'\\n  }\\n  stage('Build + SonarQube analysis') {\\n    def sqScannerMsBuildHome = tool 'Scanner for MSBuild 4.6'\\n    withSonarQubeEnv('My SonarQube Server') {\\n      bat \\\"${sqScannerMsBuildHome}\\\\\\\\SonarQube.Scanner.MSBuild.exe begin /k:myKey\\\"\\n      bat 'MSBuild.exe /t:Rebuild'\\n      bat \\\"${sqScannerMsBuildHome}\\\\\\\\SonarQube.Scanner.MSBuild.exe end\\\"\\n    }\\n  }\\n}\\n```\\n\\n## Pause pipeline until the Quality Gate is computed\\nThe `waitForQualityGate` step will pause the pipeline until SonarQube analysis is completed and returns Quality Gate status.\\n\\n### Pre-requisites:\\n* Configure a webhook in your SonarQube server pointing to `<your Jenkins instance>/sonarqube-webhook/` \\n* Use `withSonarQubeEnv` step in your pipeline (so that SonarQube taskId is correctly attached to the pipeline context).\\n\\n\\nScripted pipeline example:\\n```\\nnode {\\n  stage('SCM') {\\n    git 'https://github.com/foo/bar.git'\\n  }\\n  stage('SonarQube analysis') {\\n    withSonarQubeEnv('My SonarQube Server') {\\n      sh 'mvn clean package sonar:sonar'\\n    } // submitted SonarQube taskId is automatically attached to the pipeline context\\n  }\\n}\\n  \\n// No need to occupy a node\\nstage(\\\"Quality Gate\\\"){\\n  timeout(time: 1, unit: 'HOURS') { // Just in case something goes wrong, pipeline will be killed after a timeout\\n    def qg = waitForQualityGate() // Reuse taskId previously collected by withSonarQubeEnv\\n    if (qg.status != 'OK') {\\n      error \\\"Pipeline aborted due to quality gate failure: ${qg.status}\\\"\\n    }\\n  }\\n}\\n```\\nThanks to the webhook, the step is implemented in a very lightweight way: no need to occupy a node doing polling, and it doesn't prevent Jenkins to restart (step will be restored after restart). Note that to prevent race conditions, when the step starts (or is restarted) a direct call is made to the server to check if the task is already completed.\\n\\nDeclarative pipeline example:\\n```\\npipeline {\\n    agent any\\n    stages {\\n        stage('SCM') {\\n            steps {\\n                git url: 'https://github.com/foo/bar.git'\\n            }\\n        }\\n        stage('build && SonarQube analysis') {\\n            steps {\\n                withSonarQubeEnv('My SonarQube Server') {\\n                    // Optionally use a Maven environment you've configured already\\n                    withMaven(maven:'Maven 3.5') {\\n                        sh 'mvn clean package sonar:sonar'\\n                    }\\n                }\\n            }\\n        }\\n        stage(\\\"Quality Gate\\\") {\\n            steps {\\n                timeout(time: 1, unit: 'HOURS') {\\n                    // Parameter indicates whether to set pipeline to UNSTABLE if Quality Gate fails\\n                    // true = set pipeline to UNSTABLE, false = don't\\n                    waitForQualityGate abortPipeline: true\\n                }\\n            }\\n        }\\n    }\\n}\\n```\\n\\nIf you want to run multiple analysis in the same pipeline and use waitForQualityGate you have to do everything in order:\\n```\\npipeline {\\n    agent any\\n    stages {\\n        stage('SonarQube analysis 1') {\\n            steps {\\n                sh 'mvn clean package sonar:sonar'\\n            }\\n        }\\n        stage(\\\"Quality Gate 1\\\") {\\n            steps {\\n                waitForQualityGate abortPipeline: true\\n            }\\n        }\\n        stage('SonarQube analysis 2') {\\n            steps {\\n                sh 'gradle sonarqube'\\n            }\\n        }\\n        stage(\\\"Quality Gate 2\\\") {\\n            steps {\\n                waitForQualityGate abortPipeline: true\\n            }\\n        }\\n    }\\n}\\n```\\n\\n### Configuring a webhook secret\\n\\nIf you want to verify the webhook payload that is sent to Jenkins, you can add a secret to your webhook on SonarQube.\\n\\nTo set the secret: \\n\\n1. In Jenkins, navigate to **Manage Jenkins > Configure System > SonarQube Server > Advanced > Webhook Secret** and click the **Add** button.\\n1. Select **Secret text** and give the secret an ID.\\n1. Select the secret from the dropdown menu.\\n\\nIf you want to override the webhook secret on a project level, you can add the secret to Jenkins and then reference the secret ID when calling `waitForQualityGate`.\\n\\n    waitForQualityGate(webhookSecretId: 'yourSecretID')    \\nif your pipeline is declarative or\\n\\n    waitForQualityGate webhookSecretId: 'yourSecretID'\\nif your pipeline is scripted.\\n\"},{\"path\":\"analysis/scan/sonarscanner-for-maven\",\"content\":\"---\\ntitle: SonarScanner for Maven\\nurl: /analysis/scan/sonarscanner-for-maven/\\n---\\n\\n<!-- static -->\\n<update-center updatecenterkey=\\\"scannermaven\\\"></update-center>\\n<!-- /static -->\\n<!-- embedded -->\\n[[info]]\\n| See the [online documentation](https://redirect.sonarsource.com/doc/download-scanner-maven.html) to get more details on the latest version of the scanner and how to download it.\\n<!-- /embedded -->\\n\\nThe SonarScanner for Maven is recommended as the default scanner for Maven projects.\\n\\nThe ability to execute the SonarQube analysis via a regular Maven goal makes it available anywhere Maven is available (developer build, CI server, etc.), without the need to manually download, setup, and maintain a SonarQube Runner installation. The Maven build already has much of the information needed for SonarQube to successfully analyze a project. By preconfiguring the analysis based on that information, the need for manual configuration is reduced significantly. \\n\\n## Prerequisites\\n* Maven 3.x\\n* At least the minimal version of Java supported by your SonarQube server is in use \\n\\n## Global Settings \\n\\nEdit the [settings.xml](http://maven.apache.org/settings.html) file, located in `$MAVEN_HOME/conf` or `~/.m2`, to set the plugin prefix and optionally the SonarQube server URL.\\n\\nExample:\\n```\\n<settings>\\n    <pluginGroups>\\n        <pluginGroup>org.sonarsource.scanner.maven</pluginGroup>\\n    </pluginGroups>\\n    <profiles>\\n        <profile>\\n            <id>sonar</id>\\n            <activation>\\n                <activeByDefault>true</activeByDefault>\\n            </activation>\\n            <properties>\\n                <!-- Optional URL to server. Default value is http://localhost:9000 -->\\n                <sonar.host.url>\\n                  http://myserver:9000\\n                </sonar.host.url>\\n            </properties>\\n        </profile>\\n     </profiles>\\n</settings>\\n```\\n\\n## Analyzing\\nAnalyzing a Maven project consists of running a Maven goal: `sonar:sonar` from the directory that holds the main project `pom.xml`. You need to pass an [authentication token](/user-guide/user-token/) using the `sonar.login` property in your command line.\\n\\n```\\nmvn clean verify sonar:sonar -Dsonar.login=myAuthenticationToken\\n```\\n\\nIn some situations you may want to run the `sonar:sonar` goal as a dedicated step. Be sure to use `install` as first step for multi-module projects\\n```\\nmvn clean install\\nmvn sonar:sonar -Dsonar.login=myAuthenticationToken\\n```\\n\\nTo specify the version of sonar-maven-plugin instead of using the latest:\\n```\\nmvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar\\n```\\n\\nTo get coverage information, you'll need to generate the coverage report before the analysis. \\n\\n## Configuring Analysis\\nMost analysis properties will be read from your project. If you would like override the default values of specify additional parameters, configure the parameter names found on the [Analysis Parameters](/analysis/analysis-parameters/) page in the `<properties>` section of your pom.xml like this:\\n```\\n<properties>\\n  <sonar.buildString> [...] </sonar.buildString>\\n</properties>\\n ```\\n\\n## Sample Project\\nTo help you get started, a simple project sample is available here: https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner-maven\\n\\n## Excluding a module from analysis\\n* define property `<sonar.skip>true</sonar.skip>` in the `pom.xml` of the module you want to exclude\\n* use build profiles to exclude some module (like for integration tests)\\n* use Advanced Reactor Options (such as \\\"-pl\\\"). For example `mvn sonar:sonar -pl !module2`\\n\\n## How to Fix Version of Maven Plugin\\nIt is recommended to lock down versions of Maven plugins:\\n```\\n<build>\\n  <pluginManagement>\\n    <plugins>\\n      <plugin>\\n        <groupId>org.sonarsource.scanner.maven</groupId>\\n        <artifactId>sonar-maven-plugin</artifactId>\\n        <version>3.7.0.1746</version>\\n      </plugin>\\n    </plugins>\\n  </pluginManagement>\\n</build>\\n```\\n\\n## Troubleshooting\\n**If you get a java.lang.OutOfMemoryError**  \\nSet the `MAVEN_OPTS` environment variable, like this in *nix environments:\\n```\\nexport MAVEN_OPTS=\\\"-Xmx512m\\\"\\n```\\nIn Windows environments, avoid the double-quotes, since they get misinterpreted.\\n```\\nset MAVEN_OPTS=-Xmx512m\\n```\\n\"},{\"path\":\"analysis/scan/sonarscanner-for-msbuild\",\"content\":\"---\\r\\nurl: /analysis/scan/sonarscanner-for-msbuild/\\r\\ntitle: SonarScanner for .NET\\r\\n---\\r\\n\\r\\n<!-- sonarqube -->\\r\\n<!-- static -->\\r\\n<update-center updatecenterkey=\\\"scannermsbuild\\\"></update-center>\\r\\n<!-- /static -->\\r\\n<!-- embedded -->\\r\\n[[info]]\\r\\n| See the [online documentation](https://redirect.sonarsource.com/doc/download-scanner-msbuild.html) to get more details on the latest version of the scanner and how to download it.\\r\\n<!-- /embedded -->\\r\\n<!-- /sonarqube -->\\r\\n\\r\\n<!-- sonarcloud -->\\r\\n[[info]]\\r\\n| **Download SonarScanner for .NET** - [Issue Tracker](https://github.com/SonarSource/sonar-scanner-msbuild/issues) - [Source](https://github.com/SonarSource/sonar-scanner-msbuild)\\r\\n|\\r\\n| [Standalone executables](https://github.com/SonarSource/sonar-scanner-msbuild/releases) |\\r\\n| [.NET Core Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner)\\r\\n<!-- /sonarcloud -->\\r\\n\\r\\n[[info]]\\r\\n| Since version 5.0, the SonarScanner for MSBuild is now the SonarScanner for .NET. \\r\\n| documentation is updated with that new name, artifacts and links will remain with the old name for now.\\r\\n\\r\\nThe SonarScanner for .NET is the recommended way to launch an analysis for projects/solutions using MSBuild or dotnet command as a build tool. It is the result of a [collaboration between SonarSource and Microsoft](https://www.sonarqube.org/announcing-sonarqube-integration-with-msbuild-and-team-build/).\\r\\n\\r\\nSonarScanner for .NET is distributed as a standalone command line executable, as an extension for <!-- sonarcloud -->[Azure DevOps](/analysis/scan/sonarscanner-for-azure-devops/)<!-- /sonarcloud --><!-- sonarqube -->[Azure DevOps Server](/analysis/scan/sonarscanner-for-azure-devops/)<!-- /sonarqube -->, and as a plugin for [Jenkins](/analysis/scan/sonarscanner-for-jenkins/).\\r\\n\\r\\nIt supports .Net Core on every platform (Windows, macOS, Linux).\\r\\n\\r\\n## Prerequisites\\r\\n<!-- sonarqube -->\\r\\n* At least the minimal version of Java supported by your SonarQube server\\r\\n<!-- /sonarqube -->\\r\\n<!-- sonarcloud -->\\r\\n* Java 11 or greater\\r\\n<!-- /sonarcloud -->\\r\\n* The SDK corresponding to your build system:\\r\\n   * [.NET Framework v4.6](https://www.microsoft.com/en-us/download/details.aspx?id=53344) - either [Build Tools for Visual Studio 2015 Update 3](https://go.microsoft.com/fwlink/?LinkId=615458) or the [Build Tools for Visual Studio 2017](https://www.visualstudio.com/downloads/)\\r\\n   * [.NET Core SDK 2.0 and above](https://dotnet.microsoft.com/download) (for .NET Core version of the scanner or if you plan to use [.NET Core Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner)\\r\\n\\r\\n[[info]]\\r\\n| The flavor used to compile the Scanner for .NET (either .NET Framework, .NET Core or .NET) is independent of the .NET version the \\r\\n| project you want to analyze has been built with. Concretely, you can analyze .NET Core code with the .NET Framework version of \\r\\n| the Scanner. It's only relevant depending on your OS, and on the versions of .NET SDKs that are installed on your build machine.\\r\\n\\r\\n<!-- sonarqube -->\\r\\n### Compatibility\\r\\n\\r\\nScanner Version|SonarQube\\r\\n---|---\\r\\n5.x| LTS 6.7+\\r\\n4.x| LTS 6.7+\\r\\n<!-- /sonarqube -->\\r\\n## Installation\\r\\n\\r\\n### Standalone executable\\r\\n\\r\\n* Expand the downloaded file into the directory of your choice. We'll refer to it as `$install_directory` in the next steps.\\r\\n  * On Windows, you might need to unblock the ZIP file first (right-click **file > Properties > Unblock**).\\r\\n  * On Linux/OSX you may need to set execute permissions on the files in `$install_directory/sonar-scanner-(version)/bin`.\\r\\n\\r\\n* Uncomment, and update the global settings to point to <!-- sonarqube -->your SonarQube server<!-- /sonarqube --><!-- sonarcloud -->SonarCloud<!-- /sonarcloud --> by editing `$install_directory/SonarQube.Analysis.xml`. Values set in this file will be applied to all analyses of all projects unless overwritten locally.  \\r\\nConsider setting file system permissions to restrict access to this file.:\\r\\n\\r\\n```xml\\r\\n<SonarQubeAnalysisProperties  xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns=\\\"http://www.sonarsource.com/msbuild/integration/2015/1\\\">\\r\\n  <Property Name=\\\"sonar.host.url\\\"><!-- sonarqube -->http://localhost:9000<!-- /sonarqube --><!-- sonarcloud -->https://sonarcloud.io<!-- /sonarcloud --></Property>\\r\\n  <Property Name=\\\"sonar.login\\\">[my-user-token]</Property>\\r\\n</SonarQubeAnalysisProperties>\\r\\n```\\r\\n\\r\\n* Add `$install_directory` to your PATH environment variable.\\r\\n\\r\\n### .NET Core Global Tool\\r\\n\\r\\n```bash\\r\\ndotnet tool install --global dotnet-sonarscanner --version x.x.x\\r\\n```\\r\\n\\r\\nThe _--version_ argument is optional. If it is omitted the latest version will be installed. Full list of releases is available on the [NuGet page](https://www.nuget.org/packages/dotnet-sonarscanner)\\r\\n\\r\\n.NET Core Global Tool is available from .NET Core 2.1+\\r\\n\\r\\n<!-- sonarqube -->\\r\\n### On Linux/OSX, if your SonarQube server is secured\\r\\n\\r\\n1. Copy the server's CA certs to `/usr/local/share/ca-certificates`\\r\\n2. Run `sudo update-ca-certificates`\\r\\n<!-- /sonarqube -->\\r\\n\\r\\n## Use\\r\\n\\r\\n[[info]]\\r\\n| You can invoke the Scanner using arguments with both dash (-) or forward-slash (/) separators.\\r\\n| Example : SonarScanner.MSBuild.exe begin /k:\\\"project-key\\\" or SonarScanner.MSBuild.exe begin -k:\\\"project-key\\\" will work.\\r\\n\\r\\nThere are two versions of the SonarScanner for .NET. In the following commands, you need to pass an [authentication token](/user-guide/user-token/) using the `sonar.login` property.\\r\\n\\r\\n### \\\"Classic\\\" .NET Framework Invocation\\r\\n\\r\\nThe first version is based on the \\\"classic\\\" .NET Framework. To use it, execute the following commands from the root folder of your project:\\r\\n\\r\\n```\\r\\nSonarScanner.MSBuild.exe begin /k:\\\"project-key\\\" <!-- sonarcloud -->/o:\\\"<organization>\\\" <!-- /sonarcloud -->/d:sonar.login=\\\"<token>\\\"\\r\\nMSBuild.exe <path to solution.sln> /t:Rebuild\\r\\nSonarScanner.MSBuild.exe end /d:sonar.login=\\\"<token>\\\"\\r\\n```\\r\\n\\r\\nNote: On macOS or Linux, you can also use `mono <path to SonarScanner.MSBuild.exe>`.\\r\\n\\r\\n### .NET Core and .NET Core Global Tool Invocation\\r\\n\\r\\nThe second version is based on .NET Core which has a very similar usage:\\r\\n\\r\\n```bash\\r\\ndotnet <path to SonarScanner.MSBuild.dll> begin /k:\\\"project-key\\\" <!-- sonarcloud -->/o:\\\"<organization>\\\" <!-- /sonarcloud -->/d:sonar.login=\\\"<token>\\\"\\r\\ndotnet build <path to solution.sln>\\r\\ndotnet <path to SonarScanner.MSBuild.dll> end /d:sonar.login=\\\"<token>\\\" \\r\\n```\\r\\n\\r\\nThe .NET Core version can also be used as a .NET Core Global Tool.\\r\\nAfter installing the Scanner as a global tool as described above it can be invoked as follows:\\r\\n\\r\\n```bash\\r\\ndotnet tool install --global dotnet-sonarscanner\\r\\ndotnet sonarscanner begin /k:\\\"project-key\\\" <!-- sonarcloud -->/o:\\\"<organization>\\\" <!-- /sonarcloud -->/d:sonar.login=\\\"<token>\\\"\\r\\ndotnet build <path to solution.sln>\\r\\ndotnet sonarscanner end /d:sonar.login=\\\"<token>\\\"\\r\\n```\\r\\n\\r\\nIn summary, the invocation of the SonarScanner for .NET will depend on the scanner flavor:\\r\\n\\r\\n Scanner Flavor | Invocation\\r\\n --- | ---\\r\\n .NET 5 | `dotnet <path to SonarScanner.MSBuild.dll>` etc.\\r\\n .NET Core Global Tool | `dotnet sonarscanner begin` etc.\\r\\n .NET Core 2.0+ | `dotnet <path to SonarScanner.MSBuild.dll>` etc.\\r\\n .NET Framework 4.6+|`SonarScanner.MSBuild.exe begin` etc.\\r\\n\\r\\nNotes:\\r\\n\\r\\n* The .NET Core version of the scanner does not support TFS XAML builds and automatic finding/conversion of Code Coverage files. Apart from that, all versions of the Scanner have the same capabilities and command line arguments.\\r\\n\\r\\n## Analysis steps\\r\\n### Begin\\r\\nThe begin step is executed when you add the `begin` command line argument. It hooks into the build pipeline, downloads {instance} quality profiles and settings and prepares your project for the analysis.\\r\\n\\r\\nCommand Line Parameters:\\r\\n\\r\\n<!-- sonarcloud -->\\r\\n\\r\\nParameter|Description\\r\\n---|---\\r\\n`/k:<project-key>`|[required] Specifies the key of the analyzed project in {instance}\\r\\n`/n:<project name>`|[optional] Specifies the name of the analyzed project in {instance}. Adding this argument will overwrite the project name in {instance} if it already exists.\\r\\n`/v:<version>`|[recommended] Specifies the version of your project.\\r\\n`/o:<organization>`|[required] Specifies the name of the target organization in SonarCloud.\\r\\n`/d:sonar.login=<token> or <username>`| [recommended] Specifies the [authentication token](/user-guide/user-token/) or username used to authenticate with to {instance}. If this argument is added to the begin step, it must also be added to the end step.\\r\\n`/d:sonar.password=<password>`|[optional] Specifies the password for the {instance} username in the `sonar.login` argument. This argument is not needed if you use authentication token. If this argument is added to the begin step, it must also be added on the end step.\\r\\n`/d:sonar.verbose=true`|[optional] Sets the logging verbosity to detailed. Add this argument before sending logs for troubleshooting.\\r\\n`/d:sonar.dotnet.excludeTestProjects=true`|[optional] Excludes Test Projects from analysis. Add this argument to improve build performance when issues should not be detected in Test Projects.\\r\\n`/d:<analysis-parameter>=<value>`|[optional] Specifies an additional {instance} [analysis parameter](/analysis/analysis-parameters/), you can add this argument multiple times.\\r\\n\\r\\n<!-- /sonarcloud -->\\r\\n\\r\\n<!-- sonarqube -->\\r\\n\\r\\nParameter|Description\\r\\n---|---\\r\\n`/k:<project-key>`|[required] Specifies the key of the analyzed project in {instance}\\r\\n`/n:<project name>`|[optional] Specifies the name of the analyzed project in {instance}. Adding this argument will overwrite the project name in {instance} if it already exists.\\r\\n`/v:<version>`|[recommended] Specifies the version of your project.\\r\\n`/d:sonar.login=<token> or <username>`| [recommended] Specifies the [authentication token](/user-guide/user-token/) or username used to authenticate with to {instance}. If this argument is added to the begin step, it must also be added to the end step.\\r\\n`/d:sonar.password=<password>`|[optional] Specifies the password for the {instance} username in the `sonar.login` argument. This argument is not needed if you use authentication token. If this argument is added to the begin step, it must also be added on the end step.\\r\\n`/d:sonar.clientcert.path=<ClientCertificatePath>`|[optional] Specifies the path to a client certificate used to access {instance}. The certificate must be password protected.\\r\\n`/d:sonar.clientcert.password=<ClientCertificatePassword>`|[optional] Specifies the password for the client certificate used to access {instance}. Required if a client certificate is used.\\r\\n`/d:sonar.verbose=true`|[optional] Sets the logging verbosity to detailed. Add this argument before sending logs for troubleshooting.\\r\\n`/d:sonar.dotnet.excludeTestProjects=true`|[optional] Excludes Test Projects from analysis. Add this argument to improve build performance when issues should not be detected in Test Projects.\\r\\n`/d:<analysis-parameter>=<value>`|[optional] Specifies an additional {instance} [analysis parameter](/analysis/analysis-parameters/), you can add this argument multiple times.\\r\\n\\r\\n<!-- /sonarqube -->\\r\\n\\r\\nFor detailed information about all available parameters, see [Analysis Parameters](/analysis/analysis-parameters/).\\r\\n\\r\\n[[warning]]\\r\\n| ![](/images/exclamation.svg) The \\\"begin\\\" step will modify your build like this:\\r\\n| * the active `CodeAnalysisRuleSet` will be updated to match the {instance} quality profile\\r\\n| * `WarningsAsErrors` will be turned off\\r\\n|\\r\\n| If your build process cannot tolerate these changes we recommend creating a second build job for {instance} analysis.\\r\\n\\r\\n### Build\\r\\nBetween the `begin` and `end` steps, you need to build your project, execute tests and generate code coverage data. This part is specific to your needs and it is not detailed here.\\r\\n\\r\\n### End\\r\\nThe end step is executed when you add the \\\"end\\\" command line argument. It cleans the MSBuild/dotnet build hooks, collects the analysis data generated by the build, the test results, the code coverage and then uploads everything to {instance}\\r\\n\\r\\nThere are only two additional arguments that are allowed for the end step:\\r\\n\\r\\n<!-- sonarcloud -->\\r\\nParameter|Description\\r\\n---|---\\r\\n`/d:sonar.login=<token> or <username>`| This argument is required if it was added to the begin step.\\r\\n`/d:sonar.password=<password>`| This argument is required if it was added to the begin step and you are not using an authentication token.\\r\\n<!-- /sonarcloud -->\\r\\n\\r\\n<!-- sonarqube -->\\r\\nParameter|Description\\r\\n---|---\\r\\n`/d:sonar.login=<token> or <username>`| This argument is required if it was added to the begin step.\\r\\n`/d:sonar.password=<password>`| This argument is required if it was added to the begin step and you are not using an authentication token.\\r\\n`/d:sonar.clientcert.password=<ClientCertificatePassword>`|This argument is required if it was added to the begin step. Specifies the password for the client certificate used to access {instance}.\\r\\n<!-- /sonarqube -->\\r\\n\\r\\n### Known Limitations\\r\\n\\r\\n* MSBuild versions older than 14 are not supported.\\r\\n* Web Application projects are supported. Legacy Web Site projects are not.\\r\\n* Projects targeting multiple frameworks and using preprocessor directives could have slightly inaccurate metrics (lines of code, complexity, etc.) because the metrics are calculated only from the first of the built targets.\\r\\n\\r\\n## Code Coverage\\r\\n\\r\\nIn a Azure DevOps / TFS environment, test files are automatically retrieved following this search\\r\\n* Search for .trx files in any TestResults folder located under the $Build.SourcesDirectory path\\r\\n* If not found, then a fallback search is made against $Agent.TempDirectory\\r\\n\\r\\nOnce trx files have been found, their `.coverage` counterpart are searched as well and the scanner tries to convert them to `.coveragexml` files that will be uploaded to {instance}.\\r\\nCodeCoverage.exe tool is used for that, and the scanner also needs to find a path to that tool, following this search path\\r\\n* Search for the presence of `VsTestToolsInstallerInstalledToolLocation` environment variable, set by the VsTestToolsPlatformInstaller task or by the user\\r\\n* If not found, search for either the presence of that tool in well-known installation path, or via the registry.\\r\\n\\r\\nAs stated above, this will work only with the .NET 4.6 flavor of the Scanner.\\r\\n\\r\\n## Excluding projects from analysis\\r\\n\\r\\nSome project types, such as [Microsoft Fakes](https://msdn.microsoft.com/en-us/library/hh549175.aspx), are automatically excluded from analysis. To manually exclude a different type of project from the analysis, place the following in its .xxproj file.\\r\\n\\r\\n```xml\\r\\n<!-- in .csproj -->\\r\\n<PropertyGroup>\\r\\n  <!-- Exclude the project from analysis -->\\r\\n  <SonarQubeExclude>true</SonarQubeExclude>\\r\\n</PropertyGroup>\\r\\n```\\r\\n\\r\\n## Advanced topics\\r\\n\\r\\n**Analyzing MSBuild 12 projects with MSBuild 14**  \\r\\nThe Sonar Scanner for .NET requires your project to be built with MSBuild 14.0. We recommend installing Visual Studio 2015 update 3 or later on the analysis machine in order to benefit from the integration and features provided with the Visual Studio ecosystem (VSTest, MSTest unit tests, etc.).\\r\\n\\r\\nProjects targeting older versions of the .NET Framework can be built using MSBuild 14.0 by setting the \\\"TargetFrameworkVersion\\\" MSBuild property as documented by Microsoft:\\r\\n\\r\\n* [How to: Target a Version of the .NET Framework](https://msdn.microsoft.com/en-us/library/bb398202.aspx)\\r\\n* [MSBuild Target Framework and Target Platform](https://msdn.microsoft.com/en-us/library/hh264221.aspx)\\r\\n\\r\\nFor example, if you want to build a .NET 3.5 project, but you are using a newer MSBuild version:\\r\\n\\r\\n```\\r\\nMSBuild.exe /t:Rebuild /p:TargetFramework=net35\\r\\n```\\r\\n\\r\\nIf you do not want to switch your production build to MSBuild 14.0, you can set up a separate build dedicated to the {instance} analysis.\\r\\n\\r\\n**Detection of test projects**\\r\\n\\r\\nYou can read a full description on that subject on our wiki [here](https://github.com/SonarSource/sonar-scanner-msbuild/wiki/Analysis-of-product-projects-vs.-test-projects).\\r\\n\\r\\n**Per-project analysis parameters**\\r\\nSome analysis parameters can be set for a single MSBuild project by adding them to its .csproj file.\\r\\n\\r\\n```xml\\r\\n<!-- in .csproj -->\\r\\n<ItemGroup>\\r\\n  <SonarQubeSetting Include=\\\"sonar.stylecop.projectFilePath\\\">\\r\\n    <Value>$(MSBuildProjectFullPath)</Value>\\r\\n  </SonarQubeSetting>\\r\\n</ItemGroup>\\r\\n```\\r\\n\\r\\n**Analyzing languages other than C# and VB**\\r\\n\\r\\nFor newer SDK-style projects (used by .NET Core, .NET 5, and later), the SonarScanner for .NET will analyze all file types that are supported by the available language plugins unless explicitly excluded. \\r\\n\\r\\nFor older-style projects, the scanner will only analyze files that are listed in the `.csproj` or `.vbproj` project file. Normally this means that only C# and VB files will be analyzed. To enable the analysis of other types of files, include them in the project file.\\r\\n\\r\\nMore specifically, any files included by an element of one of the `ItemTypes` in\\r\\n[this list](https://github.com/SonarSource/sonar-scanner-msbuild/blob/master/src/SonarScanner.MSBuild.Tasks/Targets/SonarQube.Integration.targets#L112)\\r\\nwill be analyzed automatically. For example, the following line in your `.csproj` or `.vbproj` file\\r\\n\\r\\n```\\r\\n<Content Include=\\\"foo\\\\bar\\\\*.js\\\" />\\r\\n```\\r\\n\\r\\nwill enable the analysis of all JS files in the directory `foo\\\\bar` because `Content` is one of the `ItemTypes` whose includes are automatically analyzed.\\r\\n\\r\\nYou can also add `ItemTypes` to the default list by following the directions [here](https://github.com/SonarSource/sonar-scanner-msbuild/blob/master/src/SonarScanner.MSBuild.Tasks/Targets/SonarQube.Integration.targets#L75).\\r\\n\\r\\nYou can check which files the scanner will analyze by looking in the file .sonarqube\\\\out\\\\sonar-project.properties after MSBuild has finished.\\r\\n\\r\\n**Using SonarScanner for .NET with a Proxy**  \\r\\nOn build machines that connect to the Internet through a proxy server you might experience difficulties connecting to {instance}. To instruct the Java VM to use the system proxy settings, you need to set the following environment variable before running the SonarScanner for .NET:\\r\\n\\r\\n```bash\\r\\nSONAR_SCANNER_OPTS = \\\"-Djava.net.useSystemProxies=true\\\"\\r\\n```\\r\\n\\r\\nTo instruct the Java VM to use specific proxy settings or when there is no system-wide configuration use the following value:\\r\\n\\r\\n```bash\\r\\nSONAR_SCANNER_OPTS = \\\"-Dhttp.proxyHost=yourProxyHost -Dhttp.proxyPort=yourProxyPort\\\"\\r\\n```\\r\\nWhere _yourProxyHost_ and _yourProxyPort_ are the hostname and the port of your proxy server. There are additional proxy settings for HTTPS, authentication and exclusions that could be passed to the Java VM. For more information see the following article: https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html.\\r\\n\\r\\nYou also need to set the appropriate proxy environment variables used by .NET. `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and `NO_PROXY` are all supported. You can find more details [here](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.defaultproxy?view=net-5.0).\\r\\n\\r\\n## Known issues\\r\\n\\r\\n**I have multiple builds in the same pipeline, each of them getting analyzed even if the Run Code Analysis has already been executed**\\r\\n\\r\\nWe don't uninstall the global `ImportBefore` targets to support concurrent analyses on the same machine. Main effect is that if you build a solution where a .sonarqube folder is located nearby, then the sonar-dotnet analyzer will be executed along your build task.\\r\\n\\r\\nTo avoid that, you can disable the targets file by adding a build parameter:\\r\\n```\\r\\nmsbuild /p:SonarQubeTargetsImported=true\\r\\ndotnet build -p:SonarQubeTargetsImported=true\\r\\n```\\r\\n\"},{\"path\":\"analysis/scan/sonarscanner\",\"content\":\"---\\ntitle: SonarScanner\\nurl: /analysis/scan/sonarscanner/\\n---\\n\\n<!-- static -->\\n<update-center updatecenterkey=\\\"scannercli\\\"></update-center>\\n<!-- /static -->\\n<!-- embedded -->\\n[[info]]\\n| See the [online documentation](https://redirect.sonarsource.com/doc/download-scanner.html) to get more details on the latest version of the scanner and how to download it.\\n<!-- /embedded -->\\n\\nThe SonarScanner is the scanner to use when there is no specific scanner for your build system.\\n\\n## Configuring your project\\nCreate a configuration file in your project's root directory called `sonar-project.properties`\\n\\n```\\n# must be unique in a given SonarQube instance\\nsonar.projectKey=my:project\\n\\n# --- optional properties ---\\n\\n# defaults to project key\\n#sonar.projectName=My project\\n# defaults to 'not provided'\\n#sonar.projectVersion=1.0\\n \\n# Path is relative to the sonar-project.properties file. Defaults to .\\n#sonar.sources=.\\n \\n# Encoding of the source code. Default is default system encoding\\n#sonar.sourceEncoding=UTF-8\\n```\\n\\n## Running SonarScanner from the zip file\\nTo run SonarScanner from the zip file, follow these steps:\\n\\n1. Expand the downloaded file into the directory of your choice. We'll refer to it as `$install_directory` in the next steps.\\n1. Update the global settings to point to your SonarQube server by editing `$install_directory/conf/sonar-scanner.properties`:\\n```\\n#----- Default SonarQube server\\n#sonar.host.url=http://localhost:9000\\n```\\n1. Add the `$install_directory/bin` directory to your path.\\n1. Verify your installation by opening a new shell and executing the command `sonar-scanner -h` (`sonar-scanner.bat -h` on Windows). You should get output like this:\\n\\n   ```\\n   usage: sonar-scanner [options]\\n  \\n   Options:\\n     -D,--define <arg>     Define property\\n     -h,--help             Display help information\\n     -v,--version          Display version information\\n     -X,--debug            Produce execution debug output\\n   ```\\nIf you need more debug information, you can add one of the following to your command line: `-X`, `--verbose`, or `-Dsonar.verbose=true`.\\n\\n1. Run the following command from the project base directory to launch analysis and pass your [authentication token](/user-guide/user-token/):  \\n`sonar-scanner -Dsonar.login=myAuthenticationToken`\\n\\n## Running SonarScanner from the Docker image\\nTo scan using the SonarScanner Docker image, use the following command:\\n\\n```\\ndocker run \\\\\\n    --rm \\\\\\n    -e SONAR_HOST_URL=\\\"http://${SONARQUBE_URL}\\\" \\\\\\n    -e SONAR_LOGIN=\\\"myAuthenticationToken\\\" \\\\\\n    -v \\\"${YOUR_REPO}:/usr/src\\\" \\\\\\n    sonarsource/sonar-scanner-cli\\n```\\n\\n## Scanning C, C++, or ObjectiveC Projects\\nScanning projects that contain C, C++, or ObjectiveC code requires some additional analysis steps. You can find full details on the [C/C++/Objective-C](/analysis/languages/cfamily/) language page.\\n\\n## Sample Projects\\nTo help you get started, simple project samples are available for most languages on GitHub. They can be [browsed](https://github.com/SonarSource/sonar-scanning-examples) or [downloaded](https://github.com/SonarSource/sonar-scanning-examples/archive/master.zip). You'll find them filed under sonarqube-scanner/src.\\n\\n## Alternatives to sonar-project.properties\\nIf a sonar-project.properties file cannot be created in the root directory of the project, there are several alternatives:\\n\\n* The properties can be specified directly through the command line. Ex:\\n```\\nsonar-scanner -Dsonar.projectKey=myproject -Dsonar.sources=src1\\n```\\n* The property project.settings can be used to specify the path to the project configuration file (this option is incompatible with the `sonar.projectBaseDir` property). Ex:\\n```\\nsonar-scanner -Dproject.settings=../myproject.properties\\n```\\n* The root folder of the project to analyze can be set through the `sonar.projectBaseDir` property since SonarScanner 2.4. This folder must contain a `sonar-project.properties` file if `sonar.projectKey` is not specified on the command line.\\nAdditional analysis parameters can be defined in this project configuration file or through command-line parameters. \\n\\n## Alternate Analysis Directory\\nIf the files to be analyzed are not in the directory where the analysis starts from, use the `sonar.projectBaseDir` property to move analysis to a different directory. E.G. analysis begins from `jenkins/jobs/myjob/workspace` but the files to be analyzed are in `ftpdrop/cobol/project1`.\\nThis is configured in `sonar-project.properties` as follows:\\n```\\nsonar.projectBaseDir=/home/ftpdrop/cobol/project1\\nsonar.sources=src\\nsonar.cobol.copy.directories=/copy\\n```\\n\\n[[info]]\\n| You can configure more parameters. See [Analysis Parameters](/analysis/analysis-parameters/) for details.\\n\\n## Advanced Docker Configuration\\n\\nThe following sections offer advanced configuration options when running the SonarScanner with Docker. Click the headings to expand the instructions.\\n\\n[[collapse]]\\n| ## Running as a non-root user\\n| You can run the Docker image as a non-root user using the `--user` option. For example, to run as the current user:\\n| ```\\n| docker run \\\\\\n|     --rm \\\\\\n|     --user=\\\"$(id -u):$(id -g)\\\" \\\\\\n|     -e SONAR_HOST_URL=\\\"http://${SONARQUBE_URL}\\\"  \\\\\\n|     -v \\\"${YOUR_REPO}:/usr/src\\\" \\\\\\n|     sonarsource/sonar-scanner-cli\\n| ```\\n| [[warning]]\\n| |When running the container as a non-root user you have to make sure the user has read and write access to the directories you are mounting (like your source code or scanner cache directory), otherwise you may encounter permission-related problems.  \\n\\n[[collapse]]\\n| ## Caching scanner files\\n| To prevent SonarScanner from re-downloading language analyzers each time you run a scan, you can mount a directory where the scanner stores the downloads so that the downloads are reused between scanner runs. On some CI systems, you also need to add this directory to your CI cache configuration. \\n|\\n| The following command will store and use cache between runs:\\n|\\n| ```\\n| docker run \\\\\\n|     --rm \\\\\\n|     -v ${YOUR_CACHE_DIR}:/opt/sonar-scanner/.sonar/cache \\\\\\n|     -v ${YOUR_REPO}:/usr/src \\\\\\n|     -e SONAR_HOST_URL=\\\"http://${SONARQUBE_URL}\\\" \\\\\\n|     sonarsource/sonar-scanner-cli\\n| ```\\n|\\n| You can also change the location of where the scanner puts the downloads with the `SONAR_USER_HOME` environment variable.\\n\\n[[collapse]]\\n| ## Using self-signed certificates\\n| If you need to configure a self-signed certificate for the scanner to communicate with your SonarQube instance, we recommend using the OpenJDK provided with the `sonarsource/sonar-scanner-cli` image. To do this, follow these steps: \\n|\\n| 1. Extract the `cacerts` file from OpenJDK from the `sonarsource/sonar-scanner-cli` image:\\n|\\n| ```\\n| docker pull sonarsource/sonar-scanner-cli\\n| docker run \\\\\\n|     --rm \\\\\\n|     --entrypoint cat sonarsource/sonar-scanner-cli /opt/java/openjdk/lib/security/cacerts > cacerts\\n| ```\\n|\\n| 2. Add your certificate to the exported `cacerts` file. Assuming your certificate file is named `mycert.cer` and it's in your current local directory:\\n|\\n| ```\\n| docker run \\\\\\n|     --rm \\\\\\n|     -v `pwd`:/tmp/certs \\\\\\n|     sonarsource/sonar-scanner-cli \\\\\\n|     bash -c 'cd /tmp/certs && keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias mycert -file mycert.cer'\\n| ```\\n|\\n| 3. Mount the `cacerts` file that you've prepared in your target container:\\n| \\n| ```\\n| docker run \\\\\\n|     --rm \\\\\\n|     -e SONAR_HOST_URL=\\\"http://${SONARQUBE_URL}\\\" \\\\\\n|     -v `pwd`/cacerts:/opt/java/openjdk/lib/security/cacerts \\\\\\n|     sonarsource/sonar-scanner-cli\\n| ```\\n|\\n| Alternatively, you can create your own container that includes the modified `cacerts` file. Create a `Dockerfile` with the following contents:\\n|\\n| ```\\n| FROM sonarsource/sonar-scanner-cli\\n| COPY cacerts /opt/java/openjdk/lib/security/cacerts\\n| ```\\n|\\n| Then, assuming both the `cacerts` and `Dockerfile` are in the current directory, create the new image with a command such as:\\n| ```\\n| docker build --tag our-custom/sonar-scanner-cli .\\n| ```\\n|\\n\\n## Troubleshooting\\n**Java heap space error or java.lang.OutOfMemoryError**  \\nIncrease the memory via the `SONAR_SCANNER_OPTS` environment variable when running the scanner from a zip file:\\n```\\nexport SONAR_SCANNER_OPTS=\\\"-Xmx512m\\\"\\n```\\nIn Windows environments, avoid the double-quotes, since they get misinterpreted and combine the two parameters into a single one.\\n```\\nset SONAR_SCANNER_OPTS=-Xmx512m\\n```\\n\\n**Unsupported major.minor version**  \\nUpgrade the version of Java being used for analysis or use one of the native package (that embed its own Java runtime).\\n\\n**Property missing: `sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.**  \\nScanner CLI is not able to analyze .NET projects. Please, use the SonarScanner for .NET. If you are running the SonarScanner for .NET, ensure that you are not hitting a known limitation.\\n\"},{\"path\":\"analysis/scm-integration\",\"content\":\"---\\ntitle: SCM Integration\\nurl: /analysis/scm-integration/\\n---\\n\\nCollecting SCM data during code analysis can unlock a number of SonarQube features:\\n\\n* Automatic Issue Assignment\\n* code annotation (blame data) in the Code Viewer\\n* SCM-driven detection of new code (to help with [Clean as You Code](/user-guide/clean-as-you-code/)). Without SCM data, SonarQube determines new code using analysis dates (to timestamp modification of lines).\\n\\nSCM integration requires support for your individual SCM provider. Git and SVN are supported by default. For other SCM providers, see the Marketplace.\\n\\nIf need be, you can toggle it off at global level via administration settings and at a project level via project settings.\\n\\n## Git\\n[Git](http://www.git-scm.com/) integration is supported out of the box with a pure Java implementation so there's no need to have Git command line tool installed on the machine where analysis is performed.\\n\\nAuto-detection of Git during analysis will happen if there is a .git folder in the project root directory or in one of its parent folders. Otherwise you can force the provider using `-Dsonar.scm.provider=git`. A full clone is required for this integration to be able to collect the required blame information (see Known Issues). If a shallow clone is detected, a warning will be logged and no attempt will be made to retrieve blame information.\\n\\nGit integration uses [JGit](https://www.eclipse.org/jgit/). JGit is a pure Java implementation of the Git client.\\n\\n### Known Issues\\n\\n* Git doesn't consider old \\\"Mac\\\" line ends (CR) as new lines. As a result the blame operation will contain fewer lines than expected by SonarQube and analysis will fail. The solution is to fix line ends to use either Windows (CR/LF) or Unix (LF) line ends.\\n* JGit doesn't support .mailmap file to \\\"clean\\\" email adress during the blame\\n* \\\"Missing blame information...\\\" and \\\"Could not find ref...\\\" can be caused by checking out with a partial / shallow clone, or using Git submodules.\\n\\n### How to investigate error during blame (only possible on Unix/Linux)?\\n\\nIf you get an error when blame is executed on a file, it may be a limitation or a bug in JGit. To confirm please follow these steps:\\n\\n1. Download the standalone JGit command line distribution\\n\\n2. Try to execute the blame command on the offending file:  \\n    `chmod +x /path/to/org.eclipse.jgit.pgm-4.9.0.201710071750-r.sh /path/to/org.eclipse.jgit.pgm-4.9.0.201710071750-r.sh blame -w /path/to/offending/file`\\n\\n3. If you get the same error as during analysis, then this really looks like a bug in JGit (especially if you don't have an issue with the native git command line tool). Please try to do the previous steps with latest version of JGit and report all information to the [SonarQube Community Forum](https://community.sonarsource.com/).\\n\\n## Subversion\\n[Subversion](https://subversion.apache.org/) integration is supported out of the box for Subversion 1.6 to 1.9.x.\\n\\nAuto-detection of SVN during analysis will happen if there is a `.svn` folder somewhere in the parent hierarchy of the project root. Otherwise you can force the provider using `-Dsonar.scm.provider=svn` on the analysis command line.\\n\\n### Authentication\\nIn order to get blame information on your code you will need to supply authentication data to the scanner. You can do it by passing following parameters to it when starting an analysis:\\n\\n| Parameter Name        | Description |\\n| --------------------- | ---------------------------------- |\\n| `sonar.svn.username` | Username to be used for SVN server or SVN+SSH authentication |\\n| `sonar.svn.password.secured` | Password to be used for SVN server or SVN+SSH authentication |\\n| `sonar.svn.privateKeyPath` | Path to private key file. Can be used instead of password for SVN+SSH authentication |\\n| `sonar.svn.passphrase.secured` | Optional passphrase of your private key file |\\n\\n### Known issues\\nIf you get errors like:\\n\\n`Caused by: org.tmatesoft.svn.core.SVNException: svn: E200007: Retrieval of mergeinfo unsupported by 'https://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd/src/main/java/net/sourceforge/pmd/AbstractConfiguration.java';`\\nIt means the SVN server is not advertising the 'mergeinfo' capability. You can check the advertised capabilities by simply connecting to it:\\n\\n`telnet <svn_server> 3690`\\nOften this is because your SVN server is not >= 1.5 or your project was not properly migrated after a server upgrade. It could also be a misconfiguration of the server.\\n\\nYou should try to run svnadmin upgrade **on the server**. For more information, please read https://subversion.apache.org/docs/release-notes/1.5.html#repos-upgrades.\\n\\n\"},{\"path\":\"analysis/security_configuration\",\"content\":\"---\\ntitle: Security Engine Custom Configuration\\nurl: /analysis/security_configuration/\\n---\\n*Security Engine Custom Configuration is available as part of the [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html) and [above](https://www.sonarsource.com/plans-and-pricing/).*\\n\\nThe security engine tracks the path that data follows through your code. It detects when data that's potentially manipulated by a malicious user reaches a sensitive piece of code where an attack can occur.\\n\\nThose potentially malicious data are also called tainted data because they are tainted by user inputs. \\n\\nSonarQube's security engine already knows a lot of APIs that are potential sources or targets of attack. While we do our best to identify publicly available APIs, we can't know everything about your homemade frameworks particularly when it comes to sanitizing your data. Because of this, SonarQube allows you to customize the security engine to add your own sources, sanitizers, passthroughs, and sinks (see the **Elements** section below for more on these elements).\\n\\nFor example, you may want to:\\n\\n* add a source to add support for a framework that SonarQube doesn't cover out of the box\\n* use a custom sanitizer to tell the security engine that all data going through sanitizers should be considered safe. This allows you to remove false positives and tailor the security engine to your company.\\n\\n## Rules\\nYou can customize elements for Java, PHP, C#, and Python rules in the security engine. Click the languages below to expand a list of customizable rules for that language:\\n\\n[[collapse]]\\n| ## Java\\n| * [S3649](https://rules.sonarsource.com/java/RSPEC-3649): SQL Injection\\n| * [S5131](https://rules.sonarsource.com/java/RSPEC-5131): XSS\\n| * [S5146](https://rules.sonarsource.com/java/RSPEC-5146): Open Redirect\\n| * [S5167](https://rules.sonarsource.com/java/RSPEC-5167): HTTP Response Splitting\\n| * [S2083](https://rules.sonarsource.com/java/RSPEC-2083): Path Traversal Injection\\n| * [S2078](https://rules.sonarsource.com/java/RSPEC-2078): LDAP Injection\\n| * [S5145](https://rules.sonarsource.com/java/RSPEC-5145): Log Injection\\n| * [S2076](https://rules.sonarsource.com/java/RSPEC-2076): OS Command Injection\\n| * [S2631](https://rules.sonarsource.com/java/RSPEC-2631): RegExp Injection\\n| * [S5144](https://rules.sonarsource.com/java/RSPEC-5144): Server-Side Request Forgery (SSRF)\\n| * [S2091](https://rules.sonarsource.com/java/RSPEC-2091): XPath Injection\\n| * [S5135](https://rules.sonarsource.com/java/RSPEC-5135): Deserialization Injection\\n| * [S5334](https://rules.sonarsource.com/java/RSPEC-5334): Code Injection\\n| * [S6096](https://rules.sonarsource.com/java/RSPEC-6096): Zip Slip\\n\\n[[collapse]]\\n| ## PHP\\n| * [S3649](https://rules.sonarsource.com/php/RSPEC-3649): SQL Injection\\n| * [S5131](https://rules.sonarsource.com/php/RSPEC-5131): XSS\\n| * [S5146](https://rules.sonarsource.com/php/RSPEC-5146): Open Redirect\\n| * [S5167](https://rules.sonarsource.com/php/RSPEC-5167): HTTP Response Splitting\\n| * [S2083](https://rules.sonarsource.com/php/RSPEC-2083): Path Traversal Injection\\n| * [S2078](https://rules.sonarsource.com/php/RSPEC-2078): LDAP Injection\\n| * [S5145](https://rules.sonarsource.com/php/RSPEC-5145): Log Injection\\n| * [S2076](https://rules.sonarsource.com/php/RSPEC-2076): OS Command Injection\\n| * [S2631](https://rules.sonarsource.com/php/RSPEC-2631): RegExp Injection\\n| * [S5144](https://rules.sonarsource.com/php/RSPEC-5144): Server-Side Request Forgery (SSRF)\\n| * [S2091](https://rules.sonarsource.com/php/RSPEC-2091): XPath Injection\\n| * [S5135](https://rules.sonarsource.com/php/RSPEC-5135): Deserialization Injection\\n| * [S5334](https://rules.sonarsource.com/php/RSPEC-5334): Code Injection\\n| * [S5335](https://rules.sonarsource.com/php/RSPEC-5335): Include Injection\\n\\n[[collapse]]\\n| ## C&#35;\\n| * [S3649](https://rules.sonarsource.com/csharp/RSPEC-3649): SQL Injection\\n| * [S5131](https://rules.sonarsource.com/csharp/RSPEC-5131): XSS\\n| * [S5146](https://rules.sonarsource.com/csharp/RSPEC-5146): Open Redirect\\n| * [S5167](https://rules.sonarsource.com/csharp/RSPEC-5167): HTTP Response Splitting\\n| * [S2083](https://rules.sonarsource.com/csharp/RSPEC-2083): Path Traversal Injection\\n| * [S2078](https://rules.sonarsource.com/csharp/RSPEC-2078): LDAP Injection\\n| * [S5145](https://rules.sonarsource.com/csharp/RSPEC-5145): Log Injection\\n| * [S2076](https://rules.sonarsource.com/csharp/RSPEC-2076): OS Command Injection\\n| * [S2631](https://rules.sonarsource.com/csharp/RSPEC-2631): RegExp Injection\\n| * [S5144](https://rules.sonarsource.com/csharp/RSPEC-5144): Server-Side Request Forgery (SSRF)\\n| * [S2091](https://rules.sonarsource.com/csharp/RSPEC-2091): XPath Injection\\n| * [S5334](https://rules.sonarsource.com/csharp/RSPEC-5334): Code Injection\\n| * [S6096](https://rules.sonarsource.com/csharp/RSPEC-6096): Zip Slip\\n\\n[[collapse]]\\n| ## Python\\n| * [S3649](https://rules.sonarsource.com/python/RSPEC-3649): SQL Injection\\n| * [S5131](https://rules.sonarsource.com/python/RSPEC-5131): XSS\\n| * [S5146](https://rules.sonarsource.com/python/RSPEC-5146): Open Redirect\\n| * [S5167](https://rules.sonarsource.com/python/RSPEC-5167): HTTP Response Splitting\\n| * [S2083](https://rules.sonarsource.com/python/RSPEC-2083): Path Traversal Injection\\n| * [S2078](https://rules.sonarsource.com/python/RSPEC-2078): LDAP Injection\\n| * [S5145](https://rules.sonarsource.com/python/RSPEC-5145): Log Injection\\n| * [S2076](https://rules.sonarsource.com/python/RSPEC-2076): OS Command Injection\\n| * [S2631](https://rules.sonarsource.com/python/RSPEC-2631): RegExp Injection\\n| * [S5144](https://rules.sonarsource.com/python/RSPEC-5144): Server-Side Request Forgery (SSRF)\\n| * [S2091](https://rules.sonarsource.com/python/RSPEC-2091): XPath Injection\\n| * [S5135](https://rules.sonarsource.com/python/RSPEC-5135): Object Injection\\n| * [S5334](https://rules.sonarsource.com/python/RSPEC-5334): Code Injection\\n\\n## Elements\\n\\nYou can add the following elements to your custom configuration:\\n\\n* **Source** \u2013 Where you get user data. You should always consider user data tainted and vulnerable to injection attacks.\\n  Example: Calling `HttpServletRequest#getParam(\\\"foo\\\")` will return tainted content\\n* **Sanitizer** \u2013 Finds and removes malicious content from one or more potentially tainted arguments.\\n  Example: `DatabaseUtils#sqlEscapeString(String str)` returns a modified version of `str` where characters used in an SQL injection attack are removed.    \\n* **Validator** - Marks one or more arguments as safe from malicious content.\\n  Example: `String#matches(String str)` can be used to verify that `str` does not contain any content which may be used in an injection attack. \\n* **Passthrough** \u2013 Allows you to keep track of tainted data sent to a library outside the current function. When you pass a tainted value to a library function outside the current function, SonarQube automatically assumes it's being passed to a sanitizer. If the tainted data isn't being passed to a sanitizer, you can set up a passthrough to keep track of the data.\\n* **Sink** \u2013 A piece of code that can perform a security-sensitive task. Data should not contain any malicious content once it reaches a sink.\\n  Example: Running an SQL query with `java.sql.Statement#execute`\\n\\n## MethodId\\n\\nAll custom configurations rely on the accuracy of the `methodIds` provided. The `methodId` format differs for each language. Click the language you're using below for more information on the format for that language.\\n\\n[[collapse]]\\n| ## Java methodId\\n|\\n| The `methodId` format is inspired by the bytecode. The easiest way to get a `methodId` is to write a simple piece of Java code, compile it, and then look at the bytecode generated using the `javap -c path_to.class` file, and transform it a little. Looking at the following real-life example will help you understand the format.\\n| \\n| Let's imagine you want to declare `org.rapidoid.jdbc.JdbcClient.execute(String sql, Object... args)` as a new sink (you don't need to do this because Rapidoid is part of what is covered out of the box).\\n| \\n| Write a simple piece of code calling the JdbcClient.execute(...) method. The code doesn't need to actually do anything.\\n| \\n| ```\\n| import org.rapidoid.http.Req;\\n| import org.rapidoid.jdbc.JdbcClient;\\n|\\n| public static void callJDBCMethods(Req req) {\\n|   String tainted = req.param(\\\"TAINTED\\\");\\n|   JdbcClient jdbc = JDBC.api();\\n|   jdbc.execute(tainted, req); // Noncompliant\\n| }      \\n| ```\\n| \\n| Run the `javap -c` and locate the piece of bytecode corresponding to the call to `JdbcClient.execute`\\n| \\n| ```\\n| [...]\\n| org/rapidoid/jdbc/JdbcClient.execute:(Ljava/lang/String;[Ljava/lang/Object;)I\\n| [...]\\n| ````\\n| \\n| * Replace the `/` in the package name with  `.`\\n| * Remove the `:`\\n| * Replace the `.` separating the Class name and the Method name with a `#`\\n| \\n| The resulting `methodId` is:\\n| ```\\n| org.rapidoid.jdbc.JdbcClient#execute(Ljava/lang/String;[Ljava/lang/Object;)I\\n| ```\\n\\n[[collapse]]\\n| ## PHP methodId\\n| \\n| The `methodId` can be:\\n| * the name of a PHP function \\n| * the fully qualified name of a method following this format: `namespace\\\\\\\\ClassName::methodName`\\n| \\n| Example: `Symfony\\\\\\\\Component\\\\\\\\HttpFoundation\\\\\\\\Request::getUser` for the `getUser()` method of the `Request` object provided by `Symfony`\\n| \\n| Note: the `methodId` should be related to methods or functions that are part of the analysis scope. Because we recommended to not analyze the code of frameworks at the same time that you scan your own source code, defining methods or functions from frameworks will have no effect.\\n| This is linked to the fact that the SonarQube security engine needs to know the runtime type of each variable. The type can't be guessed when objects are created by frameworks' factories. Out of the box, the SonarQube security engine supports the main Symfony and Laravel types.\\n\\n[[collapse]]\\n| ## C&#35; methodId \\n| \\n| If you want to declare the constructor `SqlCommand` belonging to the namespace `System.Data.SqlClient` as a sink, the `methodId` should be:\\n| \\n| ```\\n| System.Data.SqlClient.SqlCommand.SqlCommand(string, System.Data.SqlClient.SqlConnection)\\n| ```\\n| \\n| You simply need to provide the fully qualified name of the method or constructor plus the types of the arguments.\\n\\n[[collapse]]\\n| ## Python methodId\\n| \\n| Python `methodIds` can be defined as either of the following:\\n| * the name of a global Python function.\\n| * the fully qualified name of a method following this format: `namespace.ClassName.methodName`. Ex: `ldap.ldapobject.SimpleLDAPObject.search`, `str.isidentifier`.\\n  \\n## Creating your custom configuration JSON file\\n\\nYou need to add your custom configurations to SonarQube using a JSON file. You can apply your custom configuration to a specific project or to all of your projects at the global level in SonarQube: \\n\\n* **Project level** \u2013 go to **Project Settings > General Settings > SAST Engine** and add your JSON file to the **JAVA/PHP/C#/Python custom configuration** field.\\n\\n* **Global level** \u2013 go to **Administration > General Settings > SAST Engine** and add your JSON file to the **JAVA/PHP/C#/Python custom configuration** field.  \\n\\nSee the following section for more information on formatting your JSON file.\\n\\n### Configuration file format\\nYour JSON file should include the rule you're adding a custom element to, the element you are customizing, and the `methodId` for each element. Each language needs a separate JSON file but can contain multiple rules. Click your language below to expand an example of a JSON file to help you understand the expected format.\\n\\n[[collapse]]\\n| ## Java JSON file example\\n|\\n| ```\\n| {\\n|   \\\"S3649\\\": {\\n|     \\\"sources\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.ServerRequest#getQuery()Ljava/lang/String;\\\"\\n|       }\\n|     ],\\n|     \\\"sanitizers\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.StringUtils#stringReplace(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\\\",\\n|         \\\"args\\\": [\\n|           2 \\n|         ]\\n|       }\\n|     ],\\n|     \\\"validators\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.StringUtils#equals(Ljava/lang/String;)Z\\\",\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       }\\n|     ],\\n|     \\\"passthroughs\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.RawUrl#<init>(Ljava/lang/String;)V\\\",\\n|         \\\"isWhitelist\\\": true,\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       }\\n|     ],\\n|     \\\"sinks\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.MySql#query(Ljava/lang/String;)V\\\",\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       },\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.SqlStatement#execute\\\",\\n|         \\\"isMethodPrefix\\\": true,\\n|         \\\"args\\\": [\\n|           0,\\n|           1\\n|         ]\\n|       },\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.SqlStatement#run(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V\\\",\\n|         \\\"interval\\\": {\\n|           \\\"fromIndex\\\": 1\\n|         }\\n|       }\\n|     ]\\n|   },\\n|   \\\"S5131\\\": {\\n|     \\\"sources\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.ServerRequest#getQueryString()Ljava/lang/String;\\\"\\n|       }\\n|     ],\\n|     \\\"sinks\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.package.Server#write(\\\",\\n|         \\\"isMethodPrefix\\\": true,\\n|         \\\"interval\\\": {\\n|           \\\"fromIndex\\\": 1\\n|         }\\n|       }\\n|     ]\\n|   }\\n| }\\n|```\\n|\\n| The `args` is the index of the parameter that can receive a tainted variable. Index starts:\\n| * `1` for a function call. \\n| * `0` for a method call, index `0` being the current instance (`this`).\\n| The `args` field must be a non-empty array of non-negative integers, and it is a mandatory field for sanitizers and validators.\\n\\n[[collapse]]\\n| ## PHP JSON file example\\n|\\n| ```\\n| {\\n|   \\\"S3649\\\": {\\n|     \\\"sources\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\ClassName\\\\\\\\ServerRequest::getQuery\\\"\\n|       }\\n|     ],\\n|     \\\"sanitizers\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"str_replace\\\",\\n|         \\\"args\\\": [\\n|           3\\n|         ]\\n|       }\\n|     ],\\n|     \\\"validators\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\Validator\\\\\\\\inArray::isValid\\\",\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       }\\n|     ],\\n|     \\\"passthroughs\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\RawUrl::RawUrl\\\",\\n|         \\\"isWhitelist\\\": true,\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       }\\n|     ],\\n|     \\\"sinks\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"mysql_query\\\",\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       },\\n|      {\\n|         \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\SqlStatement::execute\\\",\\n|         \\\"isMethodPrefix\\\": true,\\n|         \\\"args\\\": [\\n|           0,\\n|           1\\n|         ]\\n|       },\\n|       {\\n|         \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\SqlStatement::run\\\",\\n|         \\\"interval\\\": {\\n|           \\\"fromIndex\\\": 1\\n|         }\\n|       }\\n|     ]\\n|   },\\n|   \\\"S5131\\\": {\\n|     \\\"sources\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\ClassName\\\\\\\\ServerRequest::getQueryString\\\"\\n|       }\\n|     ],\\n|     \\\"sinks\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\ClassName\\\\\\\\Server::write\\\",\\n|         \\\"isMethodPrefix\\\": true,\\n|         \\\"interval\\\": {\\n|           \\\"fromIndex\\\": 1\\n|         }\\n|       }\\n|     ]\\n|   }\\n| }\\n|```\\n|\\n| The `args` is the index of the parameter that can receive a tainted variable. Index starts:\\n| * `1` for a function call. \\n| * `0` for a method call, index `0` being the current instance (`this`).\\n| The `args` field must be a non-empty array of non-negative integers, and it is a mandatory field for sanitizers and validators.\\n\\n[[collapse]]\\n| ## C&#35; JSON file example\\n|\\n| ```\\n| {\\n|   \\\"S3649\\\": {\\n|     \\\"sources\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My.Namespace.ServerRequest.GetQuery()\\\"\\n|       }\\n|     ],\\n|     \\\"sanitizers\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My.Namespace.StringUtils.StringReplace(string, string)\\\",\\n|         \\\"args\\\": [\\n|           0\\n|         ]\\n|       }\\n|     ],\\n|     \\\"validators\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My.Namespace.StringUtils.Regex.Matches(string)\\\",\\n|         \\\"args\\\": [\\n|           0\\n|         ]\\n|       }\\n|     ],\\n|     \\\"passthroughs\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My.Namespace.RawUrl.RawUrl(string)\\\",\\n|         \\\"isWhitelist\\\": true,\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       }\\n|     ],\\n|     \\\"sinks\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My.Namespace.MySql.Query(string)\\\",\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       },\\n|       {\\n|         \\\"methodId\\\": \\\"My.Namespace.SqlStatement.Execute\\\",\\n|         \\\"isMethodPrefix\\\": true,\\n|         \\\"args\\\": [\\n|           0,\\n|           1\\n|         ]\\n|       },\\n|       {\\n|         \\\"methodId\\\": \\\"My.Namespace.SqlStatement.Run(string, string, string)\\\",\\n|         \\\"interval\\\": {\\n|           \\\"fromIndex\\\": 1\\n|         }\\n|       }\\n|     ]\\n|   },\\n|   \\\"S5131\\\": {\\n|     \\\"sources\\\": [\\n|       {\\n|         \\\"$comment\\\": \\\"The following method id is a getter on the 'QueryString' property\\\",\\n|         \\\"methodId\\\": \\\"My.Namespace.ServerRequest.QueryString.get\\\"\\n|       }\\n|     ],\\n|     \\\"sinks\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"My.Namespace.Server.Write(\\\",\\n|         \\\"isMethodPrefix\\\": true,\\n|         \\\"interval\\\": {\\n|           \\\"fromIndex\\\": 1\\n|         }\\n|       }\\n|     ]\\n|   }\\n| }\\n|```\\n|\\n| The `args` is the index of the parameter that can receive a tainted variable. Index starts:\\n| * `1` for a function call. \\n| * `0` for a method call, index `0` being the current instance (`this`).\\n| The `args` field must be a non-empty array of non-negative integers, and it is a mandatory field for sanitizers and validators.\\n\\n[[collapse]]\\n| ## Python JSON file example\\n|\\n|```\\n| {\\n|   \\\"S3649\\\": {\\n|     \\\"sources\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.namespace.ServerRequest.get_query\\\"\\n|       }\\n|     ],\\n|     \\\"sanitizers\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"str_replace\\\",\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       }\\n|     ],\\n|     \\\"validators\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.namespace.regex.matches\\\",\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       }\\n|     ],\\n|     \\\"passthroughs\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.namespace.RawUrl\\\",\\n|         \\\"isWhitelist\\\": true,\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       }\\n|     ],\\n|     \\\"sinks\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"mysql_query\\\",\\n|         \\\"args\\\": [\\n|           1\\n|         ]\\n|       },\\n|       {\\n|         \\\"methodId\\\": \\\"my.namespace.SqlStatement.execute\\\",\\n|         \\\"isMethodPrefix\\\": true,\\n|         \\\"args\\\": [\\n|           0,\\n|           1\\n|         ]\\n|       },\\n|       {\\n|         \\\"methodId\\\": \\\"my.namespace.SqlStatement.run\\\",\\n|         \\\"interval\\\": {\\n|           \\\"fromIndex\\\": 1\\n|         }\\n|       }\\n|     ]\\n|   },\\n|   \\\"S5131\\\": {\\n|     \\\"sources\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.namespace.ServerRequest.get_query_string\\\"\\n|       }\\n|     ],\\n|     \\\"sinks\\\": [\\n|       {\\n|         \\\"methodId\\\": \\\"my.namespace.Server.write(\\\",\\n|         \\\"isMethodPrefix\\\": true,\\n|         \\\"interval\\\": {\\n|           \\\"fromIndex\\\": 1\\n|         }\\n|       }\\n|     ]\\n|   }\\n| }\\n|\\n|```\\n|\\n| The `args` is the index of the parameter that can receive a tainted variable. Index starts:\\n| * `1` for a function call. \\n| * `0` for a method call, index `0` being the current instance (`this`).\\n| The `args` field must be a non-empty array of non-negative integers, and it is a mandatory field for sanitizers and validators.\\n\\n### (Deprecated) Customizing through analysis parameters\\n\\n[[warning]]\\n| Customizing the security engine through analysis parameters is deprecated. We recommend adding your custom configuration in SonarQube as shown above. This allows you to create a single configuration file for each language and to easily apply it to multiple projects or globally.\\n\\nTo customize the SonarQube security engine, you can feed security configuration data through parameters given to the SonarScanners. To do this, you should provide JSON files with the value of the new analysis parameters. \\n\\n[[info]]\\n|The configuration works per rule. You can't share a configuration between rules.\\n\\nThe parameters should use the following syntax:\\n\\n```\\nsonar.security.[ConfigType].[RuleRepository].[RuleKey]=[FileName]\\n```\\nThe `ConfigType` value can be one of the following:\\n\\n* `sources`\\n* `sanitizers`\\n* `passthroughs`\\n* `sinks`\\n\\nThe `RuleRepository` value can be one of the following:\\n\\n* `javasecurity`: if you want to customize the Java Security Engine\\n* `phpsecurity`: if you want to customize the PHP Security Engine\\n* `roslyn.sonaranalyzer.security.cs`: if you want to customize the C# Security Engine\\n* `pythonsecurity`: if you want to customize the Python Security Engine\\n\\nThe `RuleKey` value should be one of the values shown in the **Rules** section above.\\n  \\n#### **JSON formatting example**\\n\\nConfiguration is provided using JSON files. Click the heading below to expand an example PHP JSON file to help you understand the expected format.\\n\\n[[collapse]]\\n| ## JSON File Format Example for PHP\\n|\\n| [[info]]\\n| | You need to create a configuration for each rule. There is no way to share a configuration between rules.\\n|\\n| ```\\n| {\\n|   \\\"sources\\\": [\\n|     {\\n|       \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\ClassName\\\\\\\\ServerRequest::getQuery\\\"\\n|     }\\n|   ],\\n|   \\\"sanitizers\\\": [\\n|     {\\n|       \\\"methodId\\\": \\\"str_replace\\\",\\n|       \\\"args\\\": [\\n|         3\\n|       ]\\n|     }\\n|   ],\\n|   \\\"validators\\\": [\\n|     {\\n|      \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\Validator\\\\\\\\inArray::isValid\\\",\\n|      \\\"args\\\": [\\n|         1\\n|       ]\\n|     }\\n|   ],\\n|  \\\"passthroughs\\\": [\\n|     {\\n|       \\\"methodId\\\": \\\"rawurldecode\\\",\\n|       \\\"args\\\": [\\n|         1\\n|       ]\\n|     }\\n|   ],\\n|   \\\"sinks\\\": [\\n|     {\\n|       \\\"methodId\\\": \\\"mysql_query\\\",\\n|       \\\"args\\\": [\\n|         1\\n|       ]\\n|     },\\n|     {\\n|       \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\SqlStatement::execute\\\",\\n|       \\\"isMethodPrefix\\\": true, // this is to say that all the methods starting with execute on the SqlStatement object will be considered\\n|       \\\"args\\\": [\\n|         0,\\n|         1\\n|       ]\\n|     },\\n|     {\\n|       \\\"methodId\\\": \\\"My\\\\\\\\Namespace\\\\\\\\SqlStatement::run\\\",\\n|       \\\"interval\\\": {\\n|         \\\"fromIndex\\\": 1 // every parameter from the number 1 will be considered\\n|       }\\n|     }\\n|   ]  \\n| }\\n| ```\\n|\\n| The `args` is the index of the parameter that can receive a tainted variable. Index starts:\\n| * `1` for a function call. \\n| * `0` for a method call, index `0` being the current instance (`this`)  .\\n| The `args` field must be a non-empty array of non-negative integers, and it is a mandatory field for sanitizers and validators.\\n\\n## Deactivating the core configuration\\n\\nYou can disable the core configuration per language or per rule using the following:\\n\\n```\\nsonar.security.[ConfigType].[RuleRepository].noDefaultConfig=[true|false]\\nsonar.security.[ConfigType].[RuleRepository].[RuleKey].noDefaultConfig=[true|false]\\n```\\n\"},{\"path\":\"branches/branches-faq\",\"content\":\"---\\ntitle: Branch FAQ\\nurl: /branches/branches-faq/\\n---\\n\\n_Branch analysis is available starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)._\\n\\n## How long are branches retained?  \\nBranches will be deleted automatically when they are inactive according to your settings at [Administration > Configuration > General Settings > Housekeeping > Number of days before deleting inactive branches](/#sonarqube-admin#/admin/settings?category=housekeeping) except for branches you have set to be kept when inactive. These branches are kept until you delete them manually at the project level at **Project Settings > Branches & Pull Requests**. See the [Branches Analysis](/branches/overview/) for more information on keeping inactive branches.\\n\\n## Does my project need to be stored in an SCM like Git or SVN?  \\nNo, you don't need to be connected to a SCM. However, SCM data still enhances the SonarQube experience (including issue auto-assignment and issue backdating), and you will be well prepared to take advantage of [Pull Request Analysis](/analysis/pull-request/)!\\n\\n## What if I mark an Issue \\\"Won't Fix\\\" or \\\"False-Positive\\\" in a branch?\\nIt will be replicated as such when creating a pull request and merging the pull request into the main branch.\\n\\nIf you're using the **Reference Branch** [New Code](/project-administration/new-code-period/) definition, issues in the reference branch that come from a feature branch automatically inherit their attributes (including \\\"Won't Fix\\\" and \\\"False Positive\\\" resolutions) from the feature branch.\\n## Can I manually delete a branch?  \\nYou can delete a branch in the **Branches** tab at **Project Settings > Branches and Pull Requests**.\\n\\n## Does the payload of the Webhook include branch information?  \\nYes, an extra node called \\\"branch\\\" is added to the payload.\\n\\n## When are Webhooks called?  \\nWhen the computation of the background task is done for a given branch.\\n\\n## What is the impact on my LOCs consumption vs my license?  \\nThe LOC of your largest branch are counted toward your license limit. All other branches are ignored.  \\n\"},{\"path\":\"branches/overview\",\"content\":\"---\\ntitle: Branch Analysis\\nurl: /branches/overview/\\n---\\n\\n_Branch analysis is available starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)._\\n\\n## Overview\\n\\nWith Branch Analysis, you can ensure that you're maintaining consistent code quality all the way down to the branch level of your projects. \\n\\n### Master / Main Branch\\n\\nThis is the default branch and typically corresponds to what's being developed for your next release. This branch is usually known within a development team as \\\"master\\\" or \\\"head\\\" and is analyzed when no specific branch parameters are provided. SonarQube labels this branch as **Main Branch**, and, with Community Edition, this is the only branch you can analyze. \\n\\nAdding projects by DevOps Platform copies the main branch name in SonarQube from the main branch name in your repository. See **DevOps Platform Integrations** in the documentation navigation for more information on adding your project from an DevOps Platform.\\n\\nIf you add your project manually, your main branch defaults to the name \\\"master\\\".\\n\\nStarting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), your main branch can be renamed from the project settings at **Project Settings > Branches and Pull Requests**. \\n\\n### Settings and Quality Profiles on Branches\\n\\nBranch settings and Quality Profiles are the same as those set for the main branch, and by design, it's not possible to configure other values. The New Code Period is the only exception to this as it can be set on a branch-by-branch basis.\\n\\n### New Code\\n\\nYou can set a New Code definition for each branch. This is especially helpful if you are likely to develop and release multiple versions from the branch. See the [Defining New Code](/project-administration/new-code-period/) documentation for more information.\\n\\n### Quality Gate\\n\\nThe branch Quality Gate lets you know if your branch is ready to be merged. Each branch has a quality gate that:\\n\\n* Applies on conditions on New Code and overall code.\\n* Assigns a status (Passed or Failed).\\n\\n## Setting up Branch analysis\\n\\nA branch is created when the `sonar.branch.name` parameter is passed during analysis.\\n\\n[[info]]\\n| Scanners can automatically detect branch parameters when running on the following CI services:\\n| * Azure Pipelines\\n| * Bitbucket Pipelines\\n| * Cirrus CI\\n| * Codemagic\\n| * GitHub Actions\\n| * GitLab CI/CD\\n| * Jenkins (with the Branch Source plugin configured)\\n|\\n| Manually setting branch parameters overrides automatic detection.\\n\\n| Parameter Name        | Description |\\n| --------------------- | ------------------------------------------------- |\\n| `sonar.branch.name`   | Name of the branch (visible in the UI)\\n\\n### Limiting analysis to relevant branches  \\n\\nYou need to add a condition to your pipeline script to ensure only relevant branches are analyzed. For example, you wouldn't want to run analysis on feature branches that won't need analysis until they have pull requests . \\n\\nIn the following example, analysis would be limited to branches named `main` or `release/*`.\\n\\n```\\nif [[ \\\"$CI_BRANCH_NAME\\\" == main ]] || [[ \\\"$CI_BRANCH_NAME\\\" == release/* ]]; then\\n  ./gradlew sonarqube\\nfi\\n``` \\n\\n### Issue Creation and Synchronization\\n\\nDuring the first analysis, issues (type, severity, status, assignee, change log, comments) are synchronized with the Main Branch. In each synchronized issue, a comment is added to the change log of the issue on the branch: \\\"The issue has been copied from branch 'main' to branch 'yyy'\\\".\\n\\nAt each subsequent analysis of the branch, any new issue in the Main Branch that comes from a pull request automatically inherits its attributes (type, severity, ...) from the pull request. A comment is added to the change log of the issue on the branch: \\\"The issue has been merged from 'xxx' into 'yyy'\\\"\\n\\nIssues can be synchronized between branches if you're using the **Reference Branch** [New Code](/project-administration/new-code-period/) definition. When using this New Code definition, any new issue in the reference branch that comes from a feature branch automatically inherits its attributes (type, severity, ...) from the feature branch. A comment is added to the change log of the issue on the branch: \\\"The issue has been merged from 'xxx' into 'yyy'\\\".\\n\\n### Fetching full Git history\\n\\nBy default, some CIs don't fetch your full Git history. For example, TravisCI only fetches the last 50 git commits. You must use `git fetch --unshallow` to get the full history. If you don't, new issues may not be assigned to the correct developer.\\n\\n## Managing inactive branches\\nInactive branches are branches that are no longer being analyzed. You can use Housekeeping to automatically delete branches that are inactive (i.e. old feature branches) or to keep inactive branches that you want to continue maintaining (i.e. release branches). \\n\\n### Deleting inactive branches\\n\\nYou can set the number of days a branch can be inactive before it's deleted in the global settings at **Administration > General Settings > Housekeeping > Number of days before deleting inactive branches**. Branches that are inactive for the number of days that you set will be automatically deleted.\\n\\n### Using patterns to keep inactive branches\\n\\nYou can use naming patterns to protect specific branches, such as release branches, from automatic deletion. To do this, add a pattern using Java regular expressions under **Administration > General Settings > Housekeeping > Branches > Branches to keep when inactive** at either the global or project level. When a branch is created with a name that follows one of these patterns, it will be kept indefinitely. \\n\\nFor example, adding the pattern `release/.*` would keep any branches named release/6.0, release/7, and so on.\\n\\n**Note:** Patterns aren't retroactive and won't apply to branches that have already been created. They only apply to branches created after the pattern is set. You can protect an existing branch at the project level. See the following section.\\n\\n### Managing inactive branches at a project level\\n\\nYou can set a branch to **Keep when inactive** at the project level from from the **Branches** tab at **Project Settings > Branches and Pull Requests**. Here, you can also turn off protection for a branch so it will be deleted when it's inactive for the number of days that has been specified in the global settings at **Administration > General Settings > Housekeeping > Number of days before deleting inactive branches**. \\n\\n**Note:** The main branch is always protected from automatic deletion, even if it's inactive. This can't be changed.\\n\\n## Keeping your \\\"master\\\" branch history when upgrading from Community Edition to a commercial edition\\n[[info]]\\n| If you added a SonarQube project from an DevOps Platform instead of manually, the name of the main branch in SonarQube is copied from the name of the main branch in your repository, and you shouldn't have any branch history issues when upgrading to a commercial edition.\\n\\nIn Community Edition, if you create a project manually, your analyzed branch is named \\\"master\\\" by default. \\n\\nWhen upgrading to a current commercial edition version, automatic branch and pull request configuration creates branches based on their names in your code repository. If the name of your Main Branch (master) in SonarQube doesn't match the branch's name in your code repository, the history of your Main Branch won't be taken on by the branch you analyze. \\n\\n**Before running analysis**, you can keep your branch history by renaming the Main Branch in SonarQube with the name of the branch in your code repository at **Project Settings > Branches and Pull Requests**. \\n\\nFor example, if your Main Branch is named \\\"master\\\" in SonarQube but \\\"develop\\\" in your code repository, rename your Main Branch \\\"develop\\\" in SonarQube.\\n\"},{\"path\":\"extend/adding-coding-rules\",\"content\":\"---\\ntitle: Adding Coding Rules\\nurl: /extend/adding-coding-rules/\\n---\\n\\nThere are three ways to add coding rules to SonarQube:\\n\\n* Writing a SonarQube plugin in Java that uses SonarQube APIs to add new rules\\n* Adding XPath rules directly through the SonarQube web interface\\n* Importing [Generic Issue Reports](/analysis/generic-issue/) generated by an independently run tool\\n\\nThe Java API will be more fully-featured than what's available for XPath, and is generally preferable. However, this comes with the overhead of maintaining a SonarQube plugin (including keeping it up-to-date as APIs change, upgrading the plugin after releasing a new version).\\n\\nImporting [Generic Issue Reports](/analysis/generic-issue/) is a good solution when there's a very specific need for a subset of projects on your SonarQube instance. They are the most flexible option, but lack some features (such as being able to control their execution by inclusion in a Quality Profile).\\n\\n[[info]]\\n| Before implementing a new coding rule, you should consider whether it is specific to your own context or might benefit others. If it might benefit others, you can propose it on the [Community Forum](https://community.sonarsource.com/). If there is shared interest, then it might be implemented for you directly in the related language plugin. It means less maintenance for you, and benefit to others.\\n\\n## Custom rule support by language\\n\\n|  | XPath 1.0 | Java | Generic Issue Reports | Other |\\n|-|-|-|-|-|\\n| ABAP | - | - | ![](/images/check.svg) |  |\\n| Apex | - | - | ![](/images/check.svg) |  |\\n| C# | - | - | ![](/images/check.svg) | ![](/images/check.svg)[Importing Issues from Third-Party Roslyn Analyzers (C#, VB.NET)](/analysis/external-issues/) |\\n| C/C++/Objective-C | - | - | ![](/images/check.svg) |  |\\n| COBOL | - | ![](/images/check.svg) | ![](/images/check.svg) |  |\\n| CSS | - | - | ![](/images/check.svg) |  |\\n| Flex | ![](/images/check.svg) | - | ![](/images/check.svg) |  |\\n| Go | - | - | ![](/images/check.svg) |  |\\n| HTML | - | - | ![](/images/check.svg) |  |\\n| Java | - | ![](/images/check.svg) | ![](/images/check.svg) |  |\\n| JavaScript / Typescript | - | - | ![](/images/check.svg) |  |\\n| PHP | - | ![](/images/check.svg) | ![](/images/check.svg) |  |\\n| PL/SQL | ![](/images/check.svg) | - | ![](/images/check.svg) |  |\\n| PL/I | ![](/images/check.svg) | - | ![](/images/check.svg) |  |\\n| Python | - | ![](/images/check.svg) | ![](/images/check.svg) |  |\\n| RPG | - | ![](/images/check.svg) | ![](/images/check.svg) |  |\\n| Ruby | - | - | ![](/images/check.svg) |  |\\n| Scala | - | - | ![](/images/check.svg) |  |\\n| Swift | - | - | ![](/images/check.svg) |  |\\n| T-SQL | - | - | ![](/images/check.svg) |  |\\n| VB.NET | - | - | ![](/images/check.svg) | ![](/images/check.svg)[Importing Issues from Third-Party Roslyn Analyzers (C#, VB.NET)](/analysis/external-issues/) |\\n| VB6 | - | - | ![](/images/check.svg) |  |\\n| XML | ![](/images/check.svg) | - | ![](/images/check.svg) |  |\\n\\n\\n## Adding coding rules using Java\\nWriting coding rules in Java is a six-step process:\\n\\n* Create a SonarQube plugin.\\n* Put a dependency on the API of the language plugin for which you are writing coding rules.\\n* Create as many custom rules as required.\\n* Generate the SonarQube plugin (jar file).\\n* Place this jar file in the SONARQUBE_HOME/extensions/plugins directory.\\n* Restart SonarQube server.\\n\\nSee the following pages to see samples and details about how to create coding rules \\n\\n* [for COBOL](/analysis/languages/cobol/)\\n* [for Java](/analysis/languages/java/)\\n* [for PHP](/analysis/languages/php/)\\n* [for Python](/analysis/languages/python/)\\n* [for RPG](/analysis/languages/rpg/)\\n\\n\\n## Adding coding rules using XPATH\\n\\nSonarQube provides a quick and easy way to add new coding rules directly via the web interface for certain languages using XPath 1.0 expressions. For XML, which is already immediately accessible to XPath, you can simply write your rules and check them using any of the [freely available tools](http://codebeautify.org/Xpath-Tester) for examining XPath on XML. If you're writing rules for XML, skip down to the Adding your rule to the server section once you've got your rules written.\\n\\nFor other languages how to access a variable, for example, in XPath is less obvious, so we've provided tools.\\n\\n### Writing an XPath Rule using SSLR Toolkit\\nThe rules must be written in XPath (version 1.0) to navigate the language's [Abstract Syntax Tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST). For most languages, an SSLR Toolkit is provided to help you navigate the AST. You need to download the `sslr-{language}-toolkit-{version}.jar` file corresponding to the version of your language plugin you have on your SonarQube instance.\\n\\nEach language's SSLR Toolkit is a standalone application that displays the AST for a piece of code source that you feed into it, allowing you to read the node names and attributes from your code sample and write your XPath expression. Knowing the XPath language is the only prerequisite, and there are a lot of tutorials on XPath online.\\n\\nThe latest version of SSLR Toolkit can be downloaded from following locations:\\n\\n* [Flex](https://binaries.sonarsource.com/Distribution/sonar-flex-plugin/)\\n* [PL/SQL](https://binaries.sonarsource.com/CommercialDistribution/sslr-plsql-toolkit/)\\n* [PL/I](https://binaries.sonarsource.com/CommercialDistribution/sslr-pli-toolkit/)\\n\\nFor an SSLR preview, consider the following source code sample:\\n```\\nfunction HelloWorld(hour) {\\n  if (hour) {\\n    this.hour = hour;\\n  } else {\\n    var date = new Date();\\n    this.hour = date.getHours();\\n  }\\n  this.displayGreeting = function() {\\n    if (this.hour >= 22 || this.hour <= 5)\\n      document.write(\\\"Good night, World!\\\");\\n    else\\n      document.write(\\\"Hello, World!\\\");\\n  } \\n}\\n```\\nWhile parsing source code, SonarQube builds an Abstract Syntax Tree (AST) for it, and the SSLR Toolkit provided for each language will show you SonarQube's AST for a given piece of code. Here's the AST for our sample:\\n\\n![AST example](/images/astSample.png)\\n\\nThe [XPath](http://en.wikipedia.org/wiki/XPath) language provides a way to write coding rules by navigating this AST, and the SSLR Toolkit for the language will give you the ability to test your new rules against your sample code.\\n\\n### Adding your Rule to the Server\\nOnce your new rule is written, you can add it SonarQube:\\n\\n1. Login as an Quality Profile Administrator\\n1. Go to the Rules page\\n1. Select the Language for which you want to create the XPath rule\\n1. Tick the Template criterion and select \\\"Show Templates Only\\\" \\n1. Look for the XPath rule template\\n1. Click on it to select it, then use the interface controls to create a new instance\\n1. Fill in the form that pops up\\n1. Once you've created your rule, you'll need to add it to a Quality Profile and run analysis to see it in action.\\n\\n\\n## Coding rule guidelines\\nThese are the guidelines that SonarSource uses internally to specify new rules. Rules in community plugins are not required to adhere to these guidelines. They are provided here only in case they are useful.\\n\\nNote that fields \\\"title\\\", \\\"description\\\" and \\\"message\\\" have a different format when the rule type is \\\"Hotspot\\\".\\n\\n### Guidelines applicable to all rules\\n#### Code examples\\nDo not give examples that make references to real companies or organizations:\\n```\\n$fp = file_get_contents(\\\"https://www.real-company.com\\\"); \\n```\\n\\nShould be replaced by a neutral website:\\n```\\n$fp = file_get_contents(\\\"https//www.example.com\\\");\\n// or even better:\\n$fp = file_get_contents(\\\"https://localhost\\\");\\n```\\n\\n#### See/References\\nWhen a reference is made to a standards specification, e.g. MISRA, the following steps must also be taken:\\n\\n* add any related tags such as security, bug, etc.\\n* add the relevant standard-related tag/label such as cwe, misra, etc. (If you forget, the overnight automation will remember for you.) \\n* update the appropriate field on the References tab with the cited id. (If you forget, the overnight automation will remember for you.) \\n\\nIf needed, references to other rules should be listed under a \\\"See also\\\" heading. If a \\\"See\\\" heading exists in the rule, then the \\\"See also\\\" title should be at the h3 level. Otherwise, use an h2 for it.\\n\\nOther rules should be linked to only if they are related or contradictory (such as a pair of rules about where `{` should go).\\n\\nWhy list references to other rules under \\\"see also\\\" instead of \\\"see\\\"? The see section is used to support the current rule, and one rule cannot be used as justification for another rule. \\n\\n#### Rule Type\\nNow that you've fleshed out the description, you should have a fairly clear idea of what type of rule this is, but to be explicit:\\n\\n**Bug** - Something that's wrong or potentially wrong. \\n\\n**Code Smell** - Something that will confuse a maintainer or cause them to stumble in their reading of the code.\\n\\n**Vulnerability** - Something that's wrong which impacts the application's security and therefore needs a fix.\\n\\n**Hotspot** - An optional protection is missing and the developer needs to do a review before deciding whether to apply a fix.\\n\\nSometimes the line between Bug and Code Smell is fuzzy. When in doubt, ask yourself: \\\"Is code that breaks this rule doing what the programmer probably intended?\\\" If the answer is \\\"probably not\\\" then it's a Bug. Everything else is a Code Smell. \\n\\nThe main differences between vulnerabilities and hotspots are explained on the [security-hotspots](/user-guide/security-hotspots/) page. During the specification of a rule, the following guidelines might also help:\\n* The difficulty of exploiting a weakness should not be a criterion for specifying a hotspot or a vulnerability.\\n* Vulnerabilities and hotspots should not overlap but can be related to the same subject. For example, with the hotspot [RSPEC-2077](https://jira.sonarsource.com/browse/RSPEC-2077), formatted SQL queries are highlighted and we recommend the use of *prepare statements* as an additional protection to prevent SQL-injection vulnerabilities ([RSPEC-3649](https://jira.sonarsource.com/browse/RSPEC-3649)).\\n\\n\\n#### Default severities\\nWhen assessing the default severity of a rule, the first thing to do is ask yourself \\\"what's the worst thing that could happen?\\\" In answering, you should factor in Murphy's Law without predicting Armageddon.\\n\\nOnce you have your answer, it's time to assess whether the Impact and Likelihood of the Worst Thing are High or Low. To do that, ask yourself these specific questions:\\n\\nVulnerability\\n* Impact: Could the exploitation of the vulnerability result in significant damage to your assets or your users? (Yes = High)\\n* Likelihood: What is the probability a hacker will be able to exploit it? what is the time to fix the issue?\\n\\nBug\\n* Impact: Could the bug cause the application to crash or corrupt stored data?\\n(Languages where an error can cause program termination: COBOL, Python, PL/SQL, RPG.) \\n* Likelihood: What is the probability the worst will happen?\\n\\nCode Smell\\n* Impact: Could the Code Smell lead a maintainer to introduce a bug?\\n* Likelihood: What is the probability the worst will happen?\\n\\nOnce you have your Impact and Likelihood assessments, the rest is easy:\\n\\n&nbsp;| impact|likelihood\\n---|---|---\\nBlocker|![](/images/check.svg)|![](/images/check.svg)\\nCritical|![](/images/check.svg)|![](/images/cross.svg)\\nMajor|![](/images/cross.svg)|![](/images/check.svg)\\nMinor|![](/images/cross.svg)|![](/images/cross.svg)\\n\\n#### Tags\\nRules can have 0-n tags, although most rules should have at least one. Many of the common-across-languages tags are described in [the issues docs](/user-guide/issues/).\\n\\n#### Evaluation of the remediation cost\\nFor most rules, the SQALE remediation cost is constant per issue. The goal of this section is to help define the value of this constant and to unify the way those estimations are done to prevent having some big discrepancies among language plugins. \\n\\nFirst, classify the effort to do the remediation:\\n\\n1. TRIVIAL\\nNo need to understand the logic and no potential impact. \\nExamples: remove unused imports, replace tabulations by spaces, remove call to System.out.println() used for debugging purpose, ...\\n1. EASY\\nNo need to understand the logic but potential impacts. \\nExamples: rename a method, rename a parameter, remove unused private method, ...\\n1. MEDIUM\\nUnderstanding the logic of a piece of code is required before doing a little and easy refactoring (1 or 2 lines of code), but understanding the big picture is not required.\\nExamples : CURSORs should not be declared inside a loop, EXAMINE statement should not be used, IF should be closed with END-IF, ...\\n1. MAJOR\\nUnderstanding the logic of a piece of code is required and it's up to the developer to define the remediation action.\\nExamples: Too many nested IF statements, Methods should not have too many parameters, UNION should not be used in SQL SELECT statements, Public java method should have a javadoc, Avoid using deprecated methods, ...\\n1. HIGH\\nThe remediation action might lead to locally impact the design of the application.\\nExamples: Classes should not have too many responsibilities, Cobol programs should not have too many lines of code, Architectural constraint, ...\\n1. COMPLEX\\nThe remediation action might lead to an impact on the overall design of the application.\\nExamples: Avoid cycles between packages, ...\\n\\nThen use the following table to get the remediation cost according to the required remediation effort and to the language:\\n\\n&nbsp;|Trivial|Easy|Medium|Major|High|Complex\\n---|---|---|---|---|---|---\\nABAP, COBOL, ...| 10min | 20min | 30min | 1h | 3h | 1d \\nOther languages| 5min |10min|20min|1h|3h|1d\\n\\nFor rules using either the \\\"linear\\\" or \\\"linear with offset\\\" remediation functions, the \\\"Effort To Fix\\\" field must be fed on each issue and this field is used to compute the remediation cost.  \\n\\n#### Issue location(s) and highlighting\\nFor any given rule, highlighting behavior should be consistent across languages within the bounds of what's relevant for each language.\\n\\nWhen possible, each issue should be raised on the line of code that needs correction, with highlighting limited to the portion of the line to be corrected. For example:\\n\\n* an issue for a misnamed method should be raised on the line with the method name, and the method name itself should be highlighted.\\n\\nWhen correcting an issue requires action across multiple lines, the issue should be raised on the lowest block that encloses all relevant lines. For example an issue for:\\n\\n* method complexity should be raised on the method signature\\n* method count in a class should be raised on the class declaration\\n\\nWhen an issue could be made clearer by highlighting multiple code segments, such as a method complexity issue, additional issue locations may be highlighted, and additional messages may optionally be logged for those locations. In general, these guidelines should be followed for secondary issue locations:\\n\\n* highlight the minimum code to show the line's contribution to the issue. \\n* avoid using an additional message if the secondary location is likely to be on the same issue as the issue itself. For example: the rule \\\"Parameters should be final\\\" will raise an issue on the method name, and highlight each non-final parameter. Since all locations are likely to be on the same line, additional messages would only confuse the issue.\\n* don't write a novel. The message for a secondary location is meant to be a hint to push the user in the right direction. Don't take over the interface with a narrative.\\n\\n\\n### Guidelines for Bug, Vulnerability, and Code Smell rules\\n\\n#### Titles\\n* The title of the rule should match the pattern \\\"X should [ not ] Y\\\" for most rules. Note that the \\\"should [ not ]\\\" pattern is too strong for Finding rules, which are about observations on the code. Finding titles should be neutral, such as \\\"Track x\\\".\\n* All other things being equal, the positive form is preferred. E.G.\\n   * \\\"X should Y\\\" is preferred to \\n   * \\\"X should not Z\\\"\\n* Titles should be written in plural form if at all possible. E.G.\\n   * ![](/images/check.svg)Flibbers should gibbet\\n   * ![](/images/cross.svg)A Flibber should gibbet\\n* Any piece of code in the rule title should be double-quoted (and not single-quoted).\\n* There should be no category/tag prefixed to the rule title, such as \\\"Accessibility - Image tags should have an alternate text attribute\\\"\\n* Titles should be as concise as possible. Somewhere around 70 or 80 characters is an ideal maximum, although this is not always achievable.\\n\\nNoncompliant Title Examples:\\n\\n* File should not have too many lines of code  // Noncompliant; singular form used\\n* Avoid file with too many lines of code  // Noncompliant; doesn't follow \\\"x should [not] y\\\" pattern\\n* Too many lines of code  // Noncompliant\\n* Don't use \\\"System.(out/err)\\\"  // Noncompliant\\n* Parameters in an overriding virtual function should either use the same default arguments as the function they override, or not specify any default arguments  // Noncompliant; waaaay too long\\n\\nCompliant Solutions:\\n\\n* Files should not have too many lines of code  \\n* \\\"System.(out/err)\\\" should not be used to log messages\\n* Overriding virtual functions should not change parameter defaults\\n\\nStarting with the subject, such as \\\"Files\\\", will ensure that all rules applying to files will be grouped together.\\n\\n#### Descriptions\\nRule descriptions should contain the following sections in the listed order:\\n\\n* **Rationale** (unlabeled) - explaining why this rule makes sense. \\nIf it's not absolutely clear from the rationale what circumstances will cause an issue to be raised, then this section should end with \\\"This rule raises an issue when \\\\[ insert circumstances here ]\\\".\\n* **Noncompliant Code Example** - providing some examples of issues\\n   * Ideally, the examples should depend upon the default values of any parameters the rule has, and these default values should be mentioned before the code block. This is for the benefit of users whose rule parameters are tuned to something other than the default values. E.G.\\nWith a parameter of: <code>*:.*log4j.*</code>\\n   * The lines in these code samples where issues are expected should be marked with a \\\"Noncompliant\\\" comment\\n   * \\\"Compliant\\\" comments may be used to help demonstrate the difference between what is and is not allowed by the rule\\n   * It is acceptable to omit this section when demonstrating noncompliance would take too long, e.g. \\\"Classes should not have too many lines of code\\\"\\n* **Compliant Solution** - demonstrating how to fix the previous issues. Good to have but not required for rules that detect bugs. \\n   * There is no need to mark anything \\\"Compliant\\\" in the Compliant Solution; everything here is compliant by definition\\n   * It is acceptable to omit this section when there are too many equally viable solutions.\\n* **Exceptions** (optional) - listing and explaining some specific use cases where no issues are logged even though some might be expected. Note that this is sometimes incorporated into the rationale, instead.\\n* **See** (optional) - listing references and/or links to external standards like MISRA, SEI, CERT, etc.\\nDeprecated (optional): listing replacement rules with links\\n\\nCode samples for COBOL should be in upper case. \\n\\nWhen displayed in SonarQube, any code or keywords in the description should be enclosed in `<code>` tags. For descriptions written in JIRA, this means using double curly braces (`{{` and `}}`) to enclose such text. They will be translated in the final output.\\n\\n#### Messages\\nIssue messages should contain the remediation message for bug and quality rules. For potential-bug rules, it should make it explicit that a manual review is required. It should be in the imperative mood (\\\"Do x\\\"), and therefore start with a verb.\\n\\nAn issue message should always end with a period ('.') since it is an actual sentence, unless it ends with a regular expression, in which case the regular expression should be preceded by a colon and should end the message.\\n\\nAny piece of code in the rule message should be double-quoted (and not single-quoted). Moreover, if an issue is triggered because a number was above a threshold value, then both the number and the threshold value should be mentioned in the issue message. \\n\\nSample messages:\\n\\n* Remove or refactor this useless \\\"switch\\\" statement. // Compliant\\n* This \\\"switch\\\" statement is useless and should be refactored or removed. // Noncompliant\\n* Every \\\"switch\\\" statement shall have at least one case-clause. // Noncompliant\\n* Rename this variable to comply with the regular expression: [a-z]+  // Compliant\\n\\n[[collapse]]\\n| ## Sample Specification\\n| ### Generic exceptions should not be thrown\\n|\\n| Using generic exceptions such as `Error`, `RuntimeException`, `Throwable`, and `Exception` prevents calling methods from handling true, system-generated exceptions differently than application-generated errors.\\n| \\n| **Noncompliant Code Example**  \\n| ```\\n| With the default regular expression [a-z][a-zA-Z0-9]+:\\n| \\n| try { /* ... */ } catch (Exception e) { LOGGER.info(\\\"context\\\"); } // Noncompliant; exception is lost\\n| try { /* ... */ } catch (Exception e) { LOGGER.info(e); } // Noncompliant; context is required\\n| try { /* ... */ } catch (Exception e) { LOGGER.info(e.getMessage()); } // Noncompliant; exception is lost (only message is preserved)\\n| try {\\n| /* ... */\\n| } catch (Exception e) { // Noncompliant - exception is lost\\n| throw new RuntimeException(\\\"context\\\");\\n| }\\n| ```\\n|\\n| **Compliant Solution**  \\n| ```\\n| try { /* ... */ } catch (Exception e) { LOGGER.info(\\\"context\\\", e); }\\n| try {\\n| /* ... */\\n| } catch (Exception e) {\\n| throw new RuntimeException(\\\"context\\\", e);\\n| }\\n| ```\\n| **Exceptions**  \\n| Generic exceptions in the signatures of overriding methods are ignored.\\n| ```\\n| @Override\\n| public void myMethod() throws Exception {...}\\n| ```\\n| **See**  \\n| * MISRA C:2004, 4.5.2\\n| * MITRE, [CWE-580](http://cwe.mitre.org/data/definitions/580.html) - clone() Method Without super.clone()\\n|\\n| **See also**  \\n| S4567 - Rule title here\\n\\n### Guidelines for Hotspot rules\\n\\nSee [RSPEC-2092](https://jira.sonarsource.com/browse/RSPEC-2092) for an example of Hotspot rule.\\n\\n#### Titles\\n* The title should start with a verb in the present participle form (-ing)\\n* The title should end with \\\"is security-sensitive\\\"\\n\\nNoncompliant Title Examples:\\n\\n* Avoid creation of cookies without the \\\"secure\\\" flag\\n\\nCompliant Solution:\\n\\n* Creating cookies without the \\\"secure\\\" flag is security-sensitive\\n\\n#### Descriptions\\nRule descriptions should contain the following sections in the listed order:\\n\\n* **Rationale** (unlabeled) - explaining why this rule makes sense.\\n   * It starts with a copy of the title. The \\\"is security sensitive\\\" part can be replaced with \\\"can lead to ...<DESCRIBE RISK>\\\" when there is one risk and it is easy to describe in a short manner.\\n* **Ask Yourself Whether** - set of questions that the developer should ask herself/himself.\\n   * Those questions should help the developer to decide whether or not a missing protection has to be implemented based on the context of the application.\\nFor example, if the highlighted missing protection (such as secure cookie flag) helps protect a bit against MITM attacks, list all mandatory protections that, at the contrary, greatly lower this risk (such as encryption). At the end of the review, the developer should be sure that in its context the implementation of this protection improves the overall application's security.  \\n   * The hotspot-review should be done by developers by themselves without external help:\\n      * It is not recommended to drive the review with **data sensitivity** (eg: \\\"*if this data/feature/component is sensitive there is risk*\\\") because this concept is too generic and the use of the application (with ou without sensitive data) may vary over time and cannot be controlled by developers.\\n      * It is not recommended to highlight a widely-used technology (weak in some contexts) when its replacement can only be done with such significant changes (eg: a new authentication system or a different database engine) that it would block developers who may not be responsible for the architecture of the application.\\n   * This section ends with \\\"There is a risk if you answered yes to any of those questions.\\\".\\n* **Recommended Secure Coding Practices** - describing all the ways to mitigate the risk.\\n   * This part can be easily translated by a developer into examples of implementation/source code, if the recommendations are too abstract the developer will not be able to imagine the fix and decide whether to implement it.\\n* The following parts are mandatory in RSPEC language-specification:\\n   * **Sensitive Code Example** - Same as \\\"Noncompliant code example\\\" for Bug, Vulnerability, and Code Smell rules.\\n   * **Compliant Solution** - same as for Bug, Vulnerability, and Code Smell rules.\\n\\n* **See** (optional) -  same as for Bug, Vulnerability and Code Smell rules.\\n* **Deprecated** (optional) -  listing replacement rules with links.\\n\\nGuidelines regarding COBOL, keywords and code are the same as for other rules.\\n\\n#### Messages\\nMost of the time you can paraphrase the title:\\n* start the sentence with \\\"Make sure that\\\"\\n* replace \\\"is security-sensitive\\\" with \\\"is safe here\\\"\\n\\nExamples:\\n   * Make sure creating this cookie without the \\\"secure\\\" flag is safe. \\n\"},{\"path\":\"extend/adding-scm\",\"content\":\"---\\ntitle: Supporting SCM Providers\\nurl: /extend/adding-scm/\\n---\\nSonarQube Scanner uses information from the project's SCM, if available, to:\\n\\n* Assign a new issue to the person who introduced it. The last committer on the related line of code is considered to be the author of the issue. \\n* Estimate the coverage on New Code, including added and changed code since in your New Code.\\n* Display the most recent commit on each line the code viewer.\\n![Commit info is available from the margin of the code viewer](/images/commit-info-in-code-viewer.png)\\n\\nThe only required SCM command is \\\"blame\\\", which gets the last committer of each line for a given file. This command is executed by a SonarQube plugin through the extension point `org.sonar.api.batch.scm.ScmProvider`. See the embedded SCM integrations, for instance [Git](/analysis/scm-integration/), for more details.\\n\"},{\"path\":\"extend/contributing\",\"content\":\"---\\ntitle: Contributing\\nurl: /extend/contributing/\\n---\\n\\nPlease be aware that we are not actively looking for feature contributions to SonarQube itself because it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes for SonarQube, but we do happily welcome contributions to the other open source projects under the SonarSource umbrella. \\n\\n\\n## General guidelines\\n* Choose an open ticket in [JIRA](https://jira.sonarsource.com/secure/Dashboard.jspa) or propose your change on the [SonarQube Community Forum](https://community.sonarsource.com) - the discussion there is likely to result in an open JIRA ticket. ;-)\\n* Use the SonarSource conventions, which you'll find neatly packaged here: https://github.com/SonarSource/sonar-developer-toolset#the-almost-unbreakable-build\\n* Use pull requests to submit your work\\n\\n## New rule implementations in existing plugins\\n* Start from an existing [RSpec](https://jira.sonarsource.com/browse/RSPEC-1973?filter=10375) (Rule Specification) that lists your language of interest in the \\\"Targeted languages\\\" field. \\n   * If the RSpec you're interested in doesn't target the language where you want to implement it, raise the question on the Community Forums .\\n   * If no RSpec exists for the rule you want to implement, raise the question on the [Community Forum](https://community.sonarsource.com/).\\n* Put your rule implementation class in the [language]-checks (e.g. java-checks, javascript-checks, &etc.) module, in the checks sub-package\\n* The naming convention for implementation classes is [A-Z][A-Za-z]+Check.java. (Yes, put \\\"Check\\\" in the name too.) The class name should be descriptive and not reflect the rule key. E.G. FindBadCodeCheck.java, not S007.java.\\n* A good way to get started on a rule implementation is to look at the implementations of rules that do similar things.\\n* During development there's no need to load the plugin in a server to test your implementation, use the rule's unit test for that.\\n* For a complete implementation, make sure all of the following are done:\\n   * create HTML description file and metadata file\\n   * write test class\\n   * register the rule in CheckList.java\\n   * add the rule to the profile used for the integration test in `profile.xml`\\n   * run the integration test and add any new issues to the set of expected issues \\n\"},{\"path\":\"extend/developing-plugin\",\"content\":\"---\\ntitle: Plugin basics\\nurl: /extend/developing-plugin/\\n---\\n\\n## Building your plugin\\n\\n### Prerequisites\\nTo build a plugin, you need Java 8 and Maven 3.1 (or greater). Gradle can also be used thanks to https://github.com/iwarapter/gradle-sonar-packaging-plugin. Note that this Gradle plugin is not officially supported by SonarSource.\\n\\n### Create a Maven Project\\nThe recommended way to start is by duplicating the plugin example project: https://github.com/SonarSource/sonar-custom-plugin-example.\\n\\nIf you want to start the project from scratch, use the following Maven pom.xml template:\\n\\n[[collapse]]\\n| ## pom.xml\\n| ```\\n| <?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n| <project xmlns=\\\"http://maven.apache.org/POM/4.0.0\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\\\">\\n|   <modelVersion>4.0.0</modelVersion>\\n|   <groupId>YOUR_GROUP_ID</groupId>\\n|   <!-- it's recommended to follow the pattern \\\"sonar-{key}-plugin\\\", for example \\\"sonar-myphp-plugin\\\" -->\\n|   <artifactId>YOUR_ARTIFACT_ID</artifactId>\\n|   <version>YOUR_VERSION</version>\\n|   \\n|   <!-- this is important for sonar-packaging-maven-plugin -->\\n|   <packaging>sonar-plugin</packaging>\\n|  \\n|   <dependencies>\\n|     <dependency>\\n|       <groupId>org.sonarsource.sonarqube</groupId>\\n|       <artifactId>sonar-plugin-api</artifactId>\\n|       <!-- minimal version of SonarQube to support. -->\\n|       <version>6.7</version>\\n|       <!-- mandatory scope -->\\n|       <scope>provided</scope>\\n|     </dependency>\\n|   </dependencies>\\n|  \\n|   <build>\\n|     <plugins>\\n|       <plugin>\\n|         <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>\\n|         <artifactId>sonar-packaging-maven-plugin</artifactId>\\n|         <version>1.18.0.372</version>\\n|         <extensions>true</extensions>\\n|         <configuration>\\n|           <!-- the entry-point class that extends org.sonar.api.SonarPlugin -->\\n|           <pluginClass>com.mycompany.sonar.reference.ExamplePlugin</pluginClass>\\n|            \\n|           <!-- advanced properties can be set here. See paragraph \\\"Advanced Build Properties\\\". -->\\n|         </configuration>\\n|       </plugin>\\n|     </plugins>\\n|   </build>\\n| </project>\\n| ```\\n\\n### Build\\nTo build your plugin project, execute this command from the project root directory:  \\n`mvn clean package`  \\nThe plugin jar file is generated in the project's `target/` directory.\\n\\n### Deploy\\n**\\\"Cold\\\" Deploy**  \\nThe standard way to install the plugin for regular users is to copy the JAR artifact, from the `target/` directory  to the `extensions/plugins/` directory of your SonarQube installation then start the server. The file `logs/web.log` will then contain a log line similar to:  \\n`Deploy plugin Example Plugin / 0.1-SNAPSHOT`  \\nScanner extensions such as sensors are immediately retrieved and loaded when scanning source code. \\n\\n### Debug\\n**Debugging web server extensions**  \\n\\n1. Edit conf/sonar.properties and set: `sonar.web.javaAdditionalOpts=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000`\\n1. Install your plugin by copying its JAR file to extensions/plugins\\n1. Start the server. The line `Listening for transport dt_socket at address: 5005` is logged in  `logs/sonar.log`.\\n1. Attach your IDE to the debug process (listening on port 8000 in the example)\\n\\n**Debugging compute engine extensions**  \\nSame procedure as for web server extensions (see previous paragraph), but with the property: `sonar.ce.javaAdditionalOpts=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000`\\n\\n**Debugging scanner extensions**  \\n```\\nexport SONAR_SCANNER_OPTS=\\\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000\\\"\\ncd /path/to/project\\nsonar-scanner \\n```\\nWhen using the Scanner for Maven, then simply execute:\\n```\\ncd /path/to/project\\nmvnDebug sonar:sonar\\n# debug port is 8000\\n```\\n\\n### Advanced Build Properties\\nPlugin properties are defined in the file `META-INF/MANIFEST.MF` of the plugin .jar file.\\n\\nMost of them are defined through the `<configuration>` section of the [sonar-packaging-maven-plugin](https://jira.sonarsource.com/browse/PACKMP). Some are taken from standard pom nodes Effective values are listed at the end of the build log:\\n```\\n[INFO] --- sonar-packaging-maven-plugin:1.15:sonar-plugin (default-sonar-plugin) @ sonar-widget-lab-plugin ---\\n[INFO] -------------------------------------------------------\\n[INFO] Plugin definition in Marketplace\\n[INFO]     Key: widgetlab\\n[INFO]     Name: Widget Lab\\n[INFO]     Description: Additional widgets\\n[INFO]     Version: 1.9-SNAPSHOT\\n[INFO]     Entry-point Class: org.codehaus.sonar.plugins.widgetlab.WidgetLabPlugin\\n[INFO]     Required Plugins:\\n[INFO]     Use Child-first ClassLoader: false\\n[INFO]     Base Plugin:\\n[INFO]     Homepage URL: https://redirect.sonarsource.com/plugins/widgetlab.html\\n[INFO]     Minimal SonarQube Version: 4.5.1\\n[INFO]     Licensing: GNU LGPL 3\\n[INFO]     Organization: Shaw Industries\\n[INFO]     Organization URL: http://shawfloors.com\\n[INFO]     Terms and Conditions:\\n[INFO]     Issue Tracker URL: http://jira.codehaus.org/browse/SONARWIDLB\\n[INFO]     Build date: 2015-12-15T18:28:54+0100\\n[INFO]     Sources URL: https://github.com/SonarCommunity/sonar-widget-lab\\n[INFO]     Developers: G. Ann Campbell,Patroklos Papapetrou\\n[INFO] -------------------------------------------------------\\n[INFO] Building jar: /dev/sonar-widget-lab/target/sonar-widget-lab-plugin-1.9-SNAPSHOT.jar \\n```\\n\\nSupported standard pom node properties:\\n\\nMaven Property|Manifest Key|Notes\\n---|---|---\\n`version` | Plugin-Version | (required) Plugin version as displayed in page \\\"Marketplace\\\". Default: ${project.version}\\n- | Sonar-Version | (required) Minimal version of supported SonarQube at runtime. For example if value is 5.2, then deploying the plugin on versions 5.1 and lower will fail. Default value is given by the version of sonar-plugin-api dependency. It can be overridden with the Maven property sonarQubeMinVersion (since sonar-packaging-maven-plugin 1.16). That allows in some cases to use new features of recent API and to still be compatible at runtime with older versions of SonarQube. Default: version of dependency sonar-plugin-api\\n`license` | Plugin-License | Plugin license as displayed in page \\\"Marketplace\\\". Default `${project.licenses}`\\n`developers` | Plugin-Developers | List of developers displayed in page \\\"Marketplace\\\". Default: `${project.developers}`\\n\\nSupported `<configuration>` properties:\\n\\nMaven Property|Manifest Key|Notes\\n---|---|---\\n`pluginKey` | Plugin-Key | (required) Contains only letters/digits and is unique among all plugins. Examples: groovy, widgetlab. Constructed from `${project.artifactId}.` Given an artifactId of: `sonar-widget-lab-plugin`, your pluginKey will be: `widgetlab`\\n`pluginClass` | Plugin-Class | (required) Name of the entry-point class that extends `org.sonar.api.SonarPlugin`. Example: `org.codehaus.sonar.plugins.widgetlab.WidgetLabPlugin` \\n`pluginName` | Plugin-Name | (required) Displayed in the page \\\"Marketplace\\\". Default: `${project.name}`\\n`pluginDescription` | Plugin-Description | Displayed in the page \\\"Marketplace\\\". Default: `${project.description}`\\n`pluginUrl` |  Plugin-Homepage | Homepage of website, for example https://github.com/SonarQubeCommunity/sonar-widget-lab `${project.url}`\\n`pluginIssueTrackerUrl` |  Plugin-IssueTrackerUrl | Example: https://github.com/SonarQubeCommunity/sonar-widget-lab/issues. Default: `${project.issueManagement.url}`\\n`pluginTermsConditionsUrl`  |  Plugin-TermsConditionsUrl | Users must read this document when installing the plugin from Marketplace. Default: `${sonar.pluginTermsConditionsUrl}`\\n`useChildFirstClassLoader` | Plugin-ChildFirstClassLoader | Each plugin is executed in an isolated classloader, which inherits a shared classloader that contains API and some other classes. By default the loading strategy of classes is parent-first (look up in shared classloader then in plugin classloader). If the property is true, then the strategy is child-first. This property is mainly used when building plugin against API < 5.2, as the shared classloader contained many 3rd party libraries (guava 10, commons-lang, ...) false\\n`basePlugin` | Plugin-Base | If specified, then the plugin is executed in the same classloader as basePlugin.\\n`pluginSourcesUrl` | Plugin-SourcesUrl | URL of SCM repository for open-source plugins. Displayed in page \\\"Marketplace\\\". Default: `${project.scm.url}`\\n`pluginOrganizationName` | Plugin-Organization | Organization which develops the plugin, displayed in the page \\\"Marketplace\\\". Default: `${project.organization.name}`\\n`pluginOrganizationUrl` | Plugin-OrganizationUrl | URL of the organization, displayed in the page \\\"Marketplace\\\". Default: `${project.organization.url}`\\n`sonarLintSupported` | SonarLint-Supported | Whether the language plugin supports SonarLint or not. Only SonarSource analyzers and custom rules plugins for SonarSource analyzers should set this to true. \\n`pluginDisplayVersion` | Plugin-Display-Version | The version as displayed in SonarQube administration console. By default it's the raw version, for example \\\"1.2\\\", but can be overridden to \\\"1.2 (build 12345)\\\" for instance. Supported in sonar-packaging-maven-plugin 1.18.0.372. Default: `${project.version}`\\n\\n\\nThe Maven sonar-packaging-maven-plugin supports also these properties:\\n\\nMaven Property|Manifest Key|Notes\\n---|---|---\\n`addMavenDescriptor` |Copy pom file inside the directory META-INF of generated JAR file? | Boolean. Default: `${sonar.addMavenDescriptor}` / `true`.\\n`skipDependenciesPackaging` | Do not copy Maven dependencies into JAR file. | Default: `${sonar.skipDependenciesPackaging} / `false`.\\n\\nOther Manifest fields:  \\n\\n* `Implementation-Build` - Identifier of build or commit, for example the Git sha1 \\\"94638028f0099de59f769cdca776e506684235d6\\\". It is displayed for debugging purpose in logs when SonarQube server starts.\\n\\n## API basics\\n\\n### Extension points\\nSonarQube provides extension points for its three technical stacks:\\n\\n* Scanner, which runs the source code analysis\\n* Compute Engine, which consolidates the output of scanners, for example by \\n   * computing 2nd-level measures such as ratings\\n   * aggregating measures (for example number of lines of code of project = sum of lines of code of all files)\\n   * assigning new issues to developers\\n   * persisting everything in data stores\\n* Web application\\n\\nExtension points are not designed to add new features but to complete existing features. Technically they are contracts defined by a Java interface or an abstract class annotated with @ExtensionPoint. The exhaustive list of extension points is available in the javadoc.\\n\\nThe implementations of extension points (named \\\"extensions\\\") provided by a plugin must be declared in its entry point class, which implements org.sonar.api.Plugin and which is referenced in pom.xml:\\n\\nExamplePlugin.java\\n```\\npackage org.sonarqube.plugins.example;\\nimport org.sonar.api.Plugin;\\n \\npublic class ExamplePlugin implements Plugin {\\n  @Override\\n  public void define(Context context) {\\n    // implementations of extension points\\n    context.addExtensions(FooLanguage.class, ExampleProperties.class);\\n  }\\n}\\n```\\npom.xml\\n```\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<project>\\n  ...\\n  <build>\\n    <plugins>\\n      <plugin>\\n        <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>\\n        <artifactId>sonar-packaging-maven-plugin</artifactId>\\n        <extensions>true</extensions>\\n        <configuration>\\n          <pluginClass>org.sonarqube.plugins.example.ExamplePlugin</pluginClass>\\n        </configuration>\\n      </plugin>\\n    </plugins>\\n  </build>\\n</project>\\n```\\n### Lifecycle\\nA plugin extension exists only in its associated technical stacks. A scanner sensor is for example instantiated and executed only in a scanner runtime, but not in the web server nor in Compute Engine. The stack is defined by the annotations [@ScannerSide](http://javadocs.sonarsource.org/latest/apidocs/org/sonar/api/batch/ScannerSide.html), [@ServerSide](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/server/ServerSide.html) (for web server) and [@ComputeEngineSide](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/ce/ComputeEngineSide.html). \\n\\nAn extension can call core components or another extension of the same stack. These dependencies are defined by constructor injection:\\n\\n```\\n@ScannerSide\\npublic class Foo {\\n  public void call() {}\\n}\\n \\n// Sensor is a scanner extension point \\npublic class MySensor implements Sensor {\\n  private final Foo foo;\\n  private final Languages languages;\\n  \\n  // Languages is core component which lists all the supported programming languages.\\n  public MySensor(Foo foo, Languages languages) {   \\n    this.foo = foo;\\n    this.languages = languages;\\n  }\\n  \\n  @Override\\n  public void execute(SensorContext context) {\\n    System.out.println(this.languages.all());\\n    foo.call();\\n  }\\n}\\n \\n  \\npublic class ExamplePlugin implements Plugin {\\n  @Override\\n  public void define(Context context) {\\n    // Languages is a core component. It must not be declared by plugins.\\n    context.addExtensions(Foo.class, MySensor.class);\\n  }\\n}\\n```\\n\\nIt is recommended not to call other components in constructors. Indeed, they may not be initialized at that time. Constructors should only be used for dependency injection.\\n\\n[[warning]]\\n| Compilation does not fail if incorrect dependencies are defined, such as a scanner extension trying to call a web server extension. Still it will fail at runtime when plugin is loaded.\\n\\n### Third-party Libraries\\nPlugins are executed in their own isolated classloaders. That allows the packaging and use of 3rd-party libraries without runtime conflicts with core internal libraries or other plugins. Note that since version 5.2, the SonarQube API does not bring transitive dependencies, except SLF4J. The libraries just have to be declared in the pom.xml with default scope \\\"compile\\\":\\n\\npom.xml\\n```\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<project>\\n  ...\\n  <dependencies>\\n    ...\\n    <dependency>\\n      <groupId>commons-codec</groupId>\\n      <artifactId>commons-codec</artifactId>\\n      <version>1.10</version>\\n    </dependency>\\n </dependencies>\\n</project>\\n```\\nTechnically the libraries are packaged in the directory META-INF/lib of the generated JAR file. An alternative is to shade libraries, for example with maven-shade-plugin. That minimizes the size of the plugin .jar file by copying only the effective used classes.\\n\\n[[info]]\\n| The command `mvn dependency:tree` gives the list of all dependencies, including transitive ones.\\n\\n### Configuration\\nThe core component [`org.sonar.api.config.Configuration`](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/config/Configuration.html) provides access to configuration. It deals with default values and decryption of values. It is available in all stacks (scanner, web server, Compute Engine). As recommended earlier, it must not be called from constructors.\\n\\nMyExtension.java\\n```\\npublic class MyRules implements RulesDefinition {\\n  private final Configuration config;\\n  \\n  public MyRules(Configuration config) {   \\n    this.config = config; \\n  }\\n  \\n  @Override\\n  public void define(Context context) {\\n    int value = config.getInt(\\\"sonar.property\\\").orElse(0);\\n  }\\n}\\n```\\nScanner sensors can get config directly from SensorContext, without using constructor injection:\\n\\nMySensor.java\\n```\\npublic class MySensor extends Sensor {\\n  @Override\\n  public void execute(SensorContext context) {\\n    int value = context.config().getInt(\\\"sonar.property\\\").orElse(0);\\n  }\\n}\\n```\\n\\nIn the scanner stack, properties are checked in the following order, and the first non-blank value is the one that is used:\\n\\n1. System property\\n1. Scanner command-line (-Dsonar.property=foo for instance)\\n1. Scanner tool (<properties> of scanner for Maven for instance) \\n1. Project configuration defined in the web UI \\n1. Global configuration defined in the web UI \\n1. Default value\\n\\nPlugins can define their own properties so that they can be configured from web administration console. The extension point org.sonar.api.config.PropertyDefinition must be used :\\n```\\npublic class ExamplePlugin implements Plugin {\\n  @Override\\n  public void define(Context context) {\\n    context.addExtension(\\n      PropertyDefinition.builder(\\\"sonar.my.property\\\")\\n       .name(\\\"My Property\\\")\\n       .description(\\\"This is the description displayed in web admin console\\\")\\n       .defaultValue(\\\"42\\\")\\n       .build()\\n    );\\n  }\\n}\\n```\\n\\n[[info]]\\n| Values of the properties suffixed with `.secured` are not available to be read by any users. `.secured` is needed for passwords, for instance.\\n\\nThe annotation [`@org.sonar.api.Property`](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/Property.html) can also be used on an extension to declare a property, but org.sonar.api.config.PropertyDefinition is preferred.\\n```\\n@Properties(\\n    @Property(key=\\\"sonar.my.property\\\", name=\\\"My Property\\\", defaultValue=\\\"42\\\")\\n)\\npublic class MySensor implements Sensor {\\n  // ...\\n}\\n  \\npublic class ExamplePlugin implements Plugin {\\n  @Override\\n  public void define(Context context) {\\n    context.addExtension(MySensor.class);\\n  }\\n}\\n```\\n\\n### Logging\\nThe class [`org.sonar.api.utils.log.Logger`](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/utils/log/Logger.html) is used to log messages to scanner output, web server logs/sonar.log, or Compute Engine logs (available from administration web console). It's convenient for unit testing (see class [`LogTester`](http://javadocs.sonarsource.org/latest/apidocs/index.html?org/sonar/api/utils/log/LogTester.html)).\\n```\\nimport org.sonar.api.utils.log.*;\\npublic class MyClass {\\n  private static final Logger LOGGER = Loggers.get(MyClass.class);\\n \\n  public void doSomething() {\\n    LOGGER.info(\\\"foo\\\");\\n  }\\n}\\n```\\nInternally [SLF4J](http://www.slf4j.org/) is used as a facade of various logging frameworks (log4j, commons-log, logback, java.util.logging). That allows all these frameworks to work at runtime, such as when they are required for a 3rd party library. SLF4J loggers can also be used instead of org.sonar.api.utils.log.Logger. Read the [SLF4J manual](http://www.slf4j.org/manual.html) for more details.\\n\\nAs an exception, plugins must not package logging libraries. Dependencies like SLF4J or log4j must be declared with scope \\\"provided\\\".\\n\\n### Exposing APIs to Other Plugins\\nThe common use case is to write a language plugin that will allow some other plugins to contribute additional rules (see for example how it is done for [Java](https://github.com/SonarSource/sonar-java) analysis). The main plugin will expose some APIs that will be implemented/used by the \\\"rule\\\" plugins.\\n\\nPlugins are loaded in isolated classloaders. It means a plugin can't access another plugin's classes. There is an exception for package names following pattern `org.sonar.plugins.<pluginKey>.api`. For example all classes in a plugin with the key myplugin that are located in `org.sonar.plugins.myplugin.api` are visible to other plugins.\\n\\n### Serving Static Resources\\nIf you need to serve static resources from your plugin such as images or JavaScript files, place them in a directory under `resources` named `static` (`myplugin/src/main/resources/static`). At runtime they'll be available from `http://{server}/static/{pluginKey}/{file}`. \\n\\n\\n## Versioning and API Deprecation\\n### Versioning Strategy\\nThe goal of this versioning strategy is both to:\\n\\n* Release often, release early in order to get quick feedback from the SonarQube community\\n* Release stable versions of the SonarQube platform for companies whose main priority is to set up a very stable environment. Even if the price for such stable environments is missing out on the latest, sexy SonarQube features\\n* Support the API deprecation strategy (see next section)\\n\\nThe rules are:\\n\\n* Each ~two months a new version of SonarQube is released. This version should increment the minor digit of the previous version (ex: 4.2 -> 4.3)\\n* After three (or more) releases, a bug-fix version is released, and becomes the new LTS. The major digit of the subsequent version is incremented to start a new cycle (ex: 5.6 -> 6.0)\\n\\nAnd here is the strategy in action:\\n```\\n4.4 -> 4.5 -> 5.0 -> 5.1 -> 5.2 -> ... -> 5.5 -> 6.0 -> ...     <- New release every ~2 months\\n        |                                  |\\n      4.5.1 -> 4.5.2 -> ...              5.5.1 -> 5.5.2 -> ...  <- New LTS\\n```\\n\\n### API Deprecation Strategy\\nThe goal of this deprecation strategy is to make sure that deprecated APIs will be dropped without side-effects at a given planned date. The expected consequence of such strategy is to ease the evolution of the SonarQube API by making such refactoring painless.\\n\\nThe rules are:\\n\\n* An API must be deprecated before being dropped\\n* A deprecated API must be fully supported until its drop (For instance the implementation of a deprecated method can't be replaced by `throw new UnsupportedOperationException())`\\n* If an API is deprecated in version X.Y, this API will be dropped in version (X+2).0. Example: an API deprecated in 4.1 is supported in 4.2, 4.3, 5.0, 5.1, 5.2, 5.3 and is dropped in version 6.0.\\n* According to the versioning strategy, that means that an API can remain deprecated before being dropped during 6 to 12 months.\\n* Any release of a SonarQube plugin must at least depend on the latest LTS version of the SonarQube API\\n* For each SonarQube plugin there must at least one release on each LTS version of SonarQube, which means at least one release each 6 months.\\n* No use of deprecated APIs is accepted when releasing a plugin. It raises a critical issue in SonarQube analysis. This issue can't be postponed.\\n* No deprecated API introduced 2 major versions ago is accepted when releasing SonarQube. It raises a critical issue in SonarQube analysis. This issue can't be postponed.\\n* An API is marked as deprecated with both:\\n   * the annotation @Deprecated\\n   * the javadoc tag @deprecated whose message must start with \\\"in x.y\\\", for example:\\n   \\n    ```\\n    /**\\n     * @deprecated in 4.2. Replaced by {@link #newMethod()}.\\n     */\\n    @Deprecated\\n    public void foo() {\\n    ```\\n\\n## API Changes\\n\\n### Release 9.0\\n![](/images/exclamation.svg) Deprecated\\n* `org.sonar.api.server.rule.RulesDefinition` is deprecated. Use the `sonar-check-api` to annotate rule classes instead of loading the metadata from XML files\\n\\n![](/images/cross.svg) Removed\\n* `org.sonar.api.ExtensionProvider` Use `org.sonar.api.Plugin.Context#addExtensions()` to add objects to the container.\\n* `org.sonar.api.batch.sensor.SensorDescriptor#requireProperty()`. Use `#onlyWhenConfiguration()` instead. \\n* All API related to preview/issues analysis mode.\\n* Coverage types (unit, IT, overall) was removed.\\n* Resource perspectives. Use methods in `SensorContext`.\\n* `org.sonar.api.platform.Server#getRootDir()`. Use `ServerFileSystem#getHomeDir()`.\\n* `org.sonar.api.profiles.ProfileDefinition.java`. Define quality profiles with `BuiltInQualityProfilesDefinition`.\\n* `org.sonar.api.rules.XMLRuleParser`. Use the `sonar-check-api` to annotate rule classes.\\n\\n### Release 8.4\\n![](/images/check.svg) Added\\n* `org.sonar.api.batch.scm.ScmProvider#forkDate`\\n\\n![](/images/exclamation.svg) Deprecated\\n* `org.sonar.api.rules.Rule#getId()` is deprecated and will always throw UnsupportedOperationException.\\n\\n### Release 8.3\\n![](/images/exclamation.svg) Deprecated\\n* `org.sonar.api.utils.text.JsonWriter`\\n\\n### Release 8.2\\nNo changes\\n\\n### Release 8.1\\nNo changes\\n\\n### Release 8.0\\nNo changes\\n \\n### Release 7.9\\nNo changes\\n\\n### Release 7.8\\n\\n![](/images/check.svg) Added\\n* `org.sonar.api.web.WebAnalytics`\\n\\n![](/images/exclamation.svg) Deprecated\\n* `org.sonar.api.i18n.I18`\\n* `org.sonar.api.SonarQubeVersion` use `org.sonar.api.SonarRuntime` instead\\n* `org.sonar.api.profiles.XMLProfileParser`\\n* `org.sonar.api.notifications.NotificationChannel`\\n\\n![](/images/cross.svg) Removed\\n* Pico components relying on reflection to have their `start` or `stop` method called. Make your component implements `org.sonar.api.Startable` instead.\\n\\n### Release 7.7\\n\\n![](/images/check.svg) Added\\n* ` org.sonar.api.batch.scm.ScmProvider#ignoreCommand`\\n\\n![](/images/exclamation.svg) Deprecated\\n* `org.sonar.api.batch.fs.InputFile::status`\\n* `org.sonar.api.resources.Qualifiers#BRC`\\n\\n![](/images/cross.svg) Removed\\n* The preview/issues mode of scanner has been removed\\n\\n### Release 7.6\\n\\n![](/images/info.svg) Changed\\n\\n* `PostJob` moved to project level IoC container\\n* `InputFileFilter` moved to project level IoC container\\n\\n![](/images/check.svg) Added\\n\\n* New annotation `org.sonar.api.scanner.ScannerSide` to mark (project level) scanner components\\n* `org.sonar.api.batch.fs.InputProject` to create issues on project\\n* `org.sonar.api.scanner.ProjectSensor` to declare Sensors that only run at project level\\n\\n![](/images/exclamation.svg) Deprecated\\n\\n* `org.sonar.scanner.issue.IssueFilter` deprecated\\n* `org.sonar.api.batch.InstantiationStrategy` deprecated\\n* `org.sonar.api.batch.ScannerSide` deprecated\\n* `org.sonar.api.batch.fs.InputModule` deprecated\\n* Concept of global Sensor is deprecated (use `ProjectSensor` instead)\\n\\n![](/images/cross.svg) Removed\\n\\n* Support of scanner tasks was removed\\n* `RulesProfile` is no longer available for scanner side components (use `ActiveRules` instead)\\n\\n### Release 7.5\\nNo changes\\n\\n### Release 7.4\\n![](/images/info.svg) Changed\\n\\n* Allow identity provider to not provide login\\n\\n![](/images/check.svg) Added\\n\\n* Allow sensors to report adhoc rules metadata\\n\\n![](/images/cross.svg) Removed\\n\\n* `org.sonar.api.rules.RuleFinder` removed from scanner side\\n* `sonar-channel` removed from plugin classloader\\n* stop support of plugins compiled with API < 5.2\\n\\n### Release 7.3\\n\\n![](/images/check.svg) Added\\n\\n* `RulesDefinitions` supports HotSpots and security standards\\n\\n![](/images/exclamation.svg) Deprecated\\n* `org.sonar.api.batch.AnalysisMode` and `org.sonar.api.issue.ProjectIssues` since preview mode is already deprecated for a while\\n\\n### Release 7.2\\n![](/images/check.svg) Added\\n* `org.sonar.api.batch.sensor.SensorContext#newExternalIssue` to report external issues\\n* `org.sonar.api.batch.sensor.SensorContext#newSignificantCode` to report part of the source file that should be used for issue tracking\\n* `org.sonar.api.scan.issue.filter.FilterableIssue#textRange`\\n\\n![](/images/exclamation.svg) Deprecated\\n* org.sonar.api.scan.issue.filter.FilterableIssue#line\\n\\n### Release 7.1\\n![](/images/check.svg) Added\\n* `org.sonar.api.Plugin.Context#getBootConfiguration`\\n* `org.sonar.api.server.rule.RulesDefinition.NewRule#addDeprecatedRuleKey` to support deprecated rule keys\\n\\n### Release 7.0\\n![](/images/check.svg) Added\\n* `org.sonar.api.batch.scm.ScmProvider#relativePathFromScmRoot`, `org.sonar.api.batch.scm.ScmProvider#branchChangedFiles` and `org.sonar.api.batch.scm.ScmProvider#revisionId` to improve branch and PR support\\n\\n### Release 6.7\\nNo changes\\n\"},{\"path\":\"extend/executable-lines\",\"content\":\"---\\ntitle: Executable Lines\\nurl: /extend/executable-lines/\\n---\\n \\nThese are the guidelines that SonarSource uses internally when defining executable lines for a language. Community plugins are not required to adhere to these guidelines. They are provided here only in case they are useful.\\n\\n## Things that are executable\\nExecutable lines data is used to calculate missing test coverage for files that are not included in coverage reports. Ideally, executable line counts will be at or just under what coverage engines would calculate.\\n\\nGenerally, each line containing a statement should count as an executable line, with the exception that compound statements ({}) are ignored, although their contents are not\\n\\nSo:\\n```\\nvoid doTheThing ()        // +0\\n{                         // +0\\n  String fname=\\\"Finn\\\";    // +1\\n  etc();                  // +1\\n}                         // +0\\n```\\n\\n## Things that are ignored\\n### !Statement: +0 \\nSince some coverage engines mark these things as executable, it's worth stating explicitly that we will ignore them:\\n\\n* lines containing only punctuation: }, });, ;\\n* the method signature of a method definition\\n\\n### Imports, Declarations: +0\\nImports, package and namespace statements, declarations, and a few other things demonstrated below are ignored, \\n```\\npackage foo;     // +0\\nnamespace bar {  // +0\\n  ...\\n}\\n  \\nimport java.util.ArrayList;  // +0\\n#include <stdio>             // +0\\n  \\npublic interface FooFace {  // +0\\n  void doFoo();             // +0\\n}\\npublic class Foo1 implements FooFace {  // +0\\n  private String name;                  // +0\\n}\\nstruct PairWithOperator { // +0\\n  int x;                  // +0\\n  int y;                  // +0\\n  \\n  bool operator==(PairWithOperator rhs) const {  // +0\\n    return x == rhs.x && y == rhs.y;             // +1\\n  }\\n}\\n  \\nclass C {\\n  C(const C&) =default;  // +0 (explicit inheritance of parent method)\\n}\\n \\nusing Vec = std::vector<T,MyAllocator<T>>;       // +0\\n  \\nstatic {                 // +0\\n  ...\\n}\\n \\n01  ERROR-MESSAGE.                                      *> +0\\n        02  ERROR-TEXT  PIC X(132) OCCURS 10 TIMES      *> +0\\n                                   INDEXED BY ERROR-INDEX.\\n77  ERROR-TEXT-LEN      PIC S9(9)  COMP VALUE +132.     *> +0\\n```\\n\\n### Location\\nThe presence of executable code on a line makes the entire line executable.\\n\\nIf a statement is split over multiple lines, the line to be marked executable is the first one with executable code. \\nGiven that a for loop is considered executable:\\n```\\nfor         // +1\\n  (         // +0\\n   int i=0; // +0\\n   i < 10;  // +0\\n   i++      // +0\\n  )         // +0\\n{           // +0\\n}\\n```\\nRegardless of the number of lines across which nested statements are spread, the executable line count should only be incremented by one, since typically the execution of one naturally follows from the other. \\n\\n```\\nfoo(1, bar());  // +1\\n  \\nfoo(1,          // +1\\n    bar());     // +0\\n```\\nWe ignore here the possibility that `bar()` could throw an exception, preventing `foo` from being executed.\\n\\n## Exceptions\\n### Python\\n`# pragma: no cover` exempts a block from coverage.\\n\\n![# pragma: no cover example](/images/executable-lines-python-exception.png)\\n\\n### JavaScript\\nWe mark variable declarations executable.\\n\\nFor example:\\n\\n```\\nvar a;  // +1\\n```\\n\"},{\"path\":\"extend/extend-web-app\",\"content\":\"---\\ntitle: Adding pages to the webapp\\nurl: /extend/extend-web-app/\\n---\\nSonarQube's UI is built as a Single Page Application using [React](https://reactjs.org/). It provides the ability to add a new pages to the UI using JavaScript. A page (or page extension) is a self-contained JavaScript application that runs in the SonarQube environment. You can find the example of page extensions in the [SonarQube](https://github.com/SonarSource/sonarqube) or [sonar-custom-plugin-example](https://github.com/SonarSource/sonar-custom-plugin-example/tree/7.x/) repositories on GitHub.\\n\\nBefore reading this guide, make sure you know how to [build, deploy, and debug a plugin](/extend/developing-plugin/).\\n\\n## Step 1. Create a Java class implementing PageDefinition\\n\\nFor each page, you'll need to set a key and a name. The page key should have the format `plugin_key/page_id` (e.g.: `governance/project_dump`). The `plugin_key` is computed from the `<artifactId>` in your `pom.xml`, or can be set explicitly in the pom using the `<pluginKey>` parameter in the `sonar-packaging-maven-plugin` configuration. All the pages should be declared in this class.\\n\\nExample:\\n\\n```\\nimport org.sonar.api.web.page.Page;\\nimport org.sonar.api.web.page.PageDefinition;\\nimport org.sonar.api.web.page.Context;\\n\\nimport static org.sonar.api.web.page.Page.Scope.COMPONENT;\\nimport static org.sonar.api.web.page.Page.Qualifier.VIEW;\\nimport static org.sonar.api.web.page.Page.Qualifier.SUB_VIEW;\\n \\npublic class MyPluginPageDefinition implements PageDefinition {\\n  @Override\\n  public void define(Context context) {\\n    context\\n      .addPage(Page.builder(\\\"my_plugin/global_page\\\")\\n        .setName(\\\"Global Page\\\")\\n        .build())\\n      .addPage(Page.builder(\\\"my_plugin/project_page\\\")\\n        .setName(\\\"Project Page\\\")\\n        .setScope(COMPONENT)\\n        .build())\\n      .addPage(Page.builder(\\\"my_plugin/portfolio_page\\\")\\n        .setName(\\\"Portfolio Page\\\")\\n        .setScope(COMPONENT)\\n        .setComponentQualifiers(VIEW, SUB_VIEW)\\n        .build())\\n      .addPage(Page.builder(\\\"my_plugin/admin_page\\\")\\n        .setName(\\\"Admin Page\\\")\\n        .setAdmin(true)\\n        .build());\\n  }\\n}\\n```\\n\\n### Configuring each page\\n\\nThere are 3 settings available when you define the page extensions using the `PageDefinition` class:\\n\\n* `setAdmin(boolean admin)`: flag this page as restricted to users with \\\"administer\\\" permission. Defaults to `false`.\\n* `setScope(org.sonar.api.web.page.Page.Scope scope)`: set the scope of this page. Available scopes are `GLOBAL` (default), which will add this page to the main menu, and `COMPONENT`, which will add the page to a project, application, or portfolio menu (applications and portfolios only apply to Enterprise Edition and above).\\n* `setComponentQualifiers(org.sonar.api.web.page.Qualifier... qualifiers)`: if `setScope()` is set to `COMPONENT`, this sets to what kind of component the page applies to. Available qualifiers are `PROJECT`, `APP`, `VIEW` (portfolio), and `SUB_VIEW` (`APP`, `VIEW`, and `SUB_VIEW` only apply to Enterprise Edition and above). You can pass multiple qualifiers. If no qualifier is set, it will apply to all types.\\n\\n## Step 2. Create a JavaScript file per page\\n\\nThe `PageDefinition` will register each key as an available route in SonarQube. Whenever this route is visited, SonarQube will asynchronously fetch a single JavaScript file from your plugin's `/static/` directory, and boot up your page's application. This file should have the same name as the `page_id` you defined in your `PageDefinition` class. In the example in Step 1, you would need 4 different JavaScript files:\\n\\n* `/static/global_page.js`\\n* `/static/project_page.js`\\n* `/static/portfolio_page.js`\\n* `/static/admin_page.js`\\n\\nEach file *must* call the global `window.registerExtension()` function, and pass its *full key* as a first argument (`plugin_key/page_id`, e.g.: `governance/project_dump`). The second argument is the *start* callback. This function will be called once your page is started, and receive information about the current page as an argument (see below). The return value of the start callback depends on how you want to implement your page:\\n\\n* If you want to use [React](https://reactjs.org/), you should return a React Component:\\n  ```\\n  // static/global_page.js\\n  import React from \\\"react\\\";\\n  import App from \\\"./components/App\\\";\\n  \\n  window.registerExtension('my_plugin/global_page', function (options) {\\n    return <App options={options} />\\n  });\\n  ```\\n* If you want to use any other framework, you should perform any start logic directly inside the start function body, and **return a shutdown callback**:\\n  ```\\n  // static/global_page.js\\n  const init = require(\\\"./my-app/init\\\");\\n  \\n  window.registerExtension('my_plugin/global_page', function (options) {\\n    // Start up my custom application, passing the DOM element which will serve as\\n    // the container.\\n    init.boot(options.el, options.currentUser, options.component);\\n  \\n    // Whenever the user leaves the page, cleanly shut everything down\\n    // (i.e., remove event listeners, stop running timers, etc).\\n    return function () {\\n      init.removeEventListeners();\\n      init.clearState();\\n      init.shutdown();\\n    };\\n  });\\n  ```\\n\\nThe `options` object will contain the following:\\n* `options.el`: a DOM node you must use to inject your content.\\n* `options.currentUser`: information about the current user.\\n* (optional) `options.component`: contains the information of the current project, application, or portfolio.\\n* (optional) `options.branchLike`: contains the information of the current branch or pull request.\\n\\n[[info]]\\n| SonarQube doesn't guarantee any JavaScript library availability at runtime (except React). If you need a library, include it in the final file.\\n\\n## Examples\\n\\nIt is highly recommended you check out [sonar-custom-plugin-example](https://github.com/SonarSource/sonar-custom-plugin-example/tree/7.x/). It contains detailed examples using several front-end frameworks, and its code is thoroughly documented. It also describes how to run a local development server to speed up the front-end development, without requiring a full rebuild and re-deploy to test your changes.\\n\"},{\"path\":\"extend/i18n\",\"content\":\"---\\ntitle: Internationalization\\nurl: /extend/i18n/\\n---\\n\\nThis page gives guidelines to I18n for:\\n\\n* Plugin developers who would like to apply the i18n mechanism in their own plugins, so that these plugins can be available in several languages.\\n* People who would like to help the community by making the platform available in a new language.\\n\\n## Principles\\nAlthough the basics of the i18n mechanism are the same for every part of the ecosystem, the packaging differs depending on what you are developing:\\n\\n* Translations for SonarQube: making SonarQube available in a new language requires you to develop and publish a new Language Pack plugin. \\n   * By default SonarQube embeds the English Pack.\\n   * All other Language Pack plugins, like the French Pack plugin, are maintained by the community, and are available through Marketplace (category \\\"Localization\\\").\\n* Translations for the SonarQube Community Plugins: open-source plugins from the SonarQube Community must embed only the bundles for the default locale (en). Translations will be done in the Language Pack plugins.\\n\\n* Translations for other Plugins: closed-source/commercial/independent plugins must embed the bundles for the default locale and the translations for every language they want to support.\\n\\n## Translation Bundles\\nLocalized messages are stored in properties files:\\n\\n* These are regular properties files with key/value pairs where you put most translations\\n* These files must be stored in the org.sonar.l10n package (usually in the `src/main/resources/org/sonar/l10n` directory)\\n* The names of these files must follow the convention `<key of the plugin to translate>_<language>.properties`, for example `widgetlabs_fr.properties` or `core_fr.properties` for the core bundle. See `sonar-packaging-maven-plugin` for details on plugin key derivation.\\n* Messages can accept arguments. Such entries would look like:\\n   * `myplugin.foo=This is a message with 2 params: the first \\\"{0}\\\" and the second \\\"{1}\\\".`\\n* Messages can accept pluralization. Such entries would look like:\\n   * `myplugin.foo={x, number} {x, plural, one {thing} other {things}}`\\n   * We use it for example with a combination of 2 labels: `component_navigation.last_analysis_had_warnings=Last analysis had {warnings}` and `component_navigation.x_warnings={warningsCount, number} {warningsCount, plural, one {warning} other {warnings}}`. This renders `Last analysis had 1 warning` if `warningsCount` equals 1 and `Last analysis had 2 warnings` otherwise, in this case 2.\\n   * Learn more about this syntax [here](https://formatjs.io/guides/message-syntax/#plural-format).\\n   \\n[[warning]]\\n| **UTF-8 encoding**  \\n| In the Java API, properties files are supposed to be encoded in ISO-8859 charset. Without good tooling, it can be quite annoying to write translations for languages that do not fit in this charset.\\n| This is why we decided to encode the properties files in UTF-8, and let Maven turn them into ASCII at build time thanks to native2ascii-maven-plugin (check the French plugin pom.xml). This makes the process of writing translations with a standard editor far easier.\\n\\n### How to read localized messages from a plugin extension?\\nThe component `org.sonar.api.i18n.I18n` is available for web server extensions. Scanner extensions cannot load bundles.\\n\\n## Writing a Language Pack\\nA Language Pack defines bundles for SonarQube and/or plugins.\\n\\n### Creating a Language Pack\\nThe easiest way to create a new pack is to copy the [Chinese Pack](https://github.com/SonarQubeCommunity/sonar-l10n-zh) and adapt it to your language.\\n\\n### Maintaining a Language Pack\\nIn the pom file, set the versions of SonarQube and of the plugins you want to translate. When it's time to update your language pack for a new version of SonarQube or a plugin, the easiest way to see what keys are missing is to run:\\n```\\nmvn test\\n```\\nIf the build fails, it means that some keys are missing. Go to `target/l10n` to check the reports for each bundle. Missing keys are listed under 'Missing translations are:'\\n```\\nMissing translations are:\\ncode_viewer.no_info_displayed_due_to_security=Due to security settings, no information can be displayed.\\ncomparison.version.latest=LATEST\\n...\\n```\\n\\nEach time you add a new bundle or update an existing one, please create a JIRA ticket on the corresponding L10n component in order to track changes.\\n\\n## Localizing a Plugin\\nThis section applies if you are developing a closed-source plugin. If your plugin falls in this category, it must embed its own bundles. Bundle must be defined in `src/main/resources/org/sonar/l10n/<plugin key>_<language>.properties`\\n\\nThe default bundle is mandatory, and must be English. For example the plugin with key \\\"mysonarplugin\\\" must define the following files in order to enable the French translation:\\n\\n* `org/sonar/l10n/mysonarplugin.properties`\\n* `org/sonar/l10n/mysonarplugin_fr.properties`\\n\"},{\"path\":\"extend/new-languages\",\"content\":\"---\\ntitle: Supporting New Languages\\nurl: /extend/new-languages/\\n---\\n\\n\\nThe steps to cover a new programming language are:\\n\\n1. Write the grammar. This is the hardest part.\\n1. Write a parser (a parser simply parses an input based on your grammar to yield a parse tree).\\n1. Test your grammar, to ensure it is able to parse real-life language files.\\n1. Write a few parse tree visitors. Some visitors will compute metrics such as [executable lines](/extend/executable-lines/), while others will enforce [coding rules](/extend/adding-coding-rules/). A dozen or so visitors is sufficient for an initial release.\\n1. Write a scanner Sensor, in a SonarQube plugin, to launch the visitors. \\n1. Compute\\n   1. issues\\n   1. raw measures\\n   1. code duplications\\n   1. syntax highlighting\\n   1. symbol table\\n   1. coverage information (lines/branches to cover, line/branch hits)\\n   \\nIn fulfilling these steps, the [SonarSource Language Recognizer (SSLR)](https://github.com/SonarSource/sslr) can be an important resource.\\n   \\n\\n \\n\\n\"},{\"path\":\"extend/web-api\",\"content\":\"---\\ntitle: Web API\\nurl: /extend/web-api/\\n---\\n## Documentation\\n\\nSonarQube provides web API to access its functionalities from applications. The web services composing the web API are documented within SonarQube, through the URL [/web_api](/#sonarqube#/web_api). You can also access the web API documentation from the top bar in SonarQube:\\n\\n ![web API documentation](/images/webapi.png)\\n\\n## Authentication\\n\\nAdministrative web services are secured and require the user to have specific permissions. In order to be authenticated, the user must provide credentials as described below.\\n\\n### User Token\\n\\nThis is the recommended way. Benefits are described in the page [User Token](/user-guide/user-token/). The token is sent via the login field of HTTP basic authentication, without any password.\\n```\\n# note that the colon after the token is required in curl to set an empty password \\ncurl -u THIS_IS_MY_TOKEN: https://sonarqube.com/api/user_tokens/search\\n```\\n\\n### HTTP Basic Access\\n\\nLogin and password are sent via the standard HTTP Basic fields:\\n```\\ncurl -u MY_LOGIN:MY_PASSWORD https://sonarqube.com/api/user_tokens/search\\n```\\nUsers who authenticate in web application through an OAuth provider, for instance GitHub or Bitbucket, don't have credentials and can't use HTTP Basic mode. They must generate and use tokens.\\n\"},{\"path\":\"faq\",\"content\":\"---\\ntitle: Frequently Asked Questions\\nurl: /faq/\\n---\\n\\n## How do I get rid of issues that are False-Positives?\\n**False-Positive and Won't Fix**  \\nYou can mark individual issues False Positive or Won't Fix through the issues interface. If you're using PR analysis provided by the Developer Edition, issues marked False Positive or Won't Fix will retain that status after merge. This is the preferred approach.\\n\\n**//NOSONAR**  \\nFor most languages, SonarQube supports the use of the generic mechanism: `//NOSONAR` at the end of the line of the issue. This will suppress all issues - now and in the future - that might be raised on the line.\\n\\n## How do I find and remove projects that haven't been analyzed in a while?\\nIn **[Administration > Projects > Management](/#sonarqube-admin#/admin/projects_management)** you can search for **Last analysis before** to filter projects not analyzed since a specific date, and then use bulk **Delete** to remove the projects that match your filter.\\n\\nThis can be automated by using the corresponding Web API: `api/projects/bulk_delete?analyzedBefore=YYYY-MM-DD`.\\n\\n<!-- sonarqube -->\\n## How do I trigger a full ElasticSearch reindex?\\nCurrently, the only way to force a reindex is to:\\n\\n* Stop your server\\n* Remove the contents of the $SQ_HOME/data/es7 directory\\n* Start your server\\n\\nBefore doing this, you should be aware first that processes are in place on the SonarQube side that out-of-sync indices are detected and corrected, and second that a full re-index can be quite lengthy depending on the size of your instance.\\n\\n## Why can't I use my HTTP Proxy since I upgraded to Java8u111?\\n\\nIf you are getting this error in the logs when trying to use the Marketplace:\\n```\\njava.io.IOException: Unable to tunnel through proxy. Proxy returns \\\"HTTP/1.1 407 Proxy Authentication Required\\n```\\n... you probably upgraded your Java8 installation with an update greater than 111. To fix that, update _$SONARQUBE_HOME/conf/sonar.properties` like this:\\n```\\nsonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djdk.http.auth.tunneling.disabledSchemes=\\\"\\\"\\n```\\nReference: http://www.oracle.com/technetwork/java/javase/8u111-relnotes-3124969.html\\n<!-- /sonarqube -->\\n\\n\"},{\"path\":\"index\",\"content\":\"---\\ntitle: SonarQube Documentation\\nurl: /\\n---\\n\\nWelcome to the SonarQube documentation! \\n\\n[SonarQube](http://www.sonarqube.org/)\u00AE is an automatic code review tool to detect bugs, vulnerabilities, and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests.\\n\\nIf you want to try out SonarQube, check out the [Try out SonarQube](/setup/get-started-2-minutes/) page for instructions on installing a local instance and analyzing a project.\\n\\nIf you're ready to set up a production instance, check out the [Install the Server](/setup/install-server/) documentation.\\n\\nOtherwise, you can also find an overview and common scenarios below or navigate through and search the full documentation in the left pane.\\n\\n## Overview\\n\\n![SonarQube Instance Components](/images/dev-cycle.png)\\n\\nIn a typical development process:  \\n\\n1. Developers develop and merge code in an IDE (preferably using [SonarLint](https://www.sonarlint.org/) to receive immediate feedback in the editor) and check-in their code to their DevOps Platform.\\n1. An organization\u2019s continuous integration (CI) tool checks out, builds, and runs unit tests, and an integrated SonarQube scanner analyzes the results.\\n1. The scanner posts the results to the SonarQube server which provides feedback to developers through the SonarQube interface, email, in-IDE notifications (through SonarLint), and decoration on pull or merge requests (when using [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) and above).\\n\\n## Installing, monitoring, and upgrading\\n\\nSee the [installing](/setup/install-server/) and [upgrading](/setup/upgrading/) pages for setting up your production instance.\\n\\nWhen your instance is up and running, see the [Monitoring](/instance-administration/monitoring/) documentation for information on keeping your instance running smoothly.\\n\\nIf you're using SonarQube Data Center Edition, see the [Configure & Operate a Cluster](/setup/operate-cluster/) documentation for more information on running your instance as a cluster.\\n\\n## Setting up analysis\\n\\nAnalyzing your code starts with installing and configuring a SonarQube scanner. The scanner can either run on your build or as part of your continuous integration (CI) pipeline performing a scan whenever your build process is triggered. For more information, see [Analyzing Source Code](/analysis/overview/). \\n\\n### Analyzing branches\\n\\nStarting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can analyze your branches in SonarQube, and ensure that your code quality is consistent all the way down to the branch level in your projects. For more information, see [Branch Analysis](/branches/overview/).\\n\\n### Analyzing pull requests\\n\\nStarting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can integrate SonarQube to be part of your pull or merge request process. Issuing a pull request can trigger a branch analysis and add pull request decoration to see your branch analysis directly in your DevOps Platforms's interface in addition to the SonarQube interface. For more information, see the [Pull Request Analysis Overview](/analysis/pull-request/).\\n\\n## Writing Clean and Safe Code\\n\\nSonarQube gives you the tools you need to write clean and safe code:\\n\\n- [SonarLint](https://www.sonarlint.org/) \u2013 SonarLint is a companion product that works in your editor giving immediate feedback so you can catch and fix issues before they get to the repository.\\n- [Quality Gate](/user-guide/quality-gates/) \u2013 The Quality Gate lets you know if your project is ready for production. \\n- [Clean as You Code](/user-guide/clean-as-you-code/) \u2013 Clean as You Code is an approach to code quality that eliminates a lot of the challenges that come with traditional approaches. As a developer, you focus on maintaining high standards and taking responsibility specifically in the New Code you're working on.\\n- [Issues](/user-guide/issues/) \u2013 SonarQube raises issues whenever a piece of your code breaks a coding rule, whether it's an error that will break your code (bug), a point in your code open to attack (vulnerability), or a maintainability issue (code smell).\\n- [Security Hotspots](/user-guide/security-hotspots/) \u2013 SonarQube highlights security-sensitive pieces of code that need to be reviewed. Upon review, you'll either find there is no threat or you need to apply a fix to secure the code.\\n \\n## Administering a Project\\n\\nIf you have the **Create Projects** permission (a global administrator can set permissions at **Administration > Security > Global Permissions**), you can create and administer projects. See [Project Settings](/project-administration/project-settings/) for general information on setting up projects. \\n\\nA project is automatically added on the first analysis. However, you can provision projects (set up permissions, Quality Profiles, etc.) before running the first analysis. See [Project Existence](/project-administration/project-existence/) for more information on provisioning a project and handling provisioned projects.\\n\\nYou also want to make sure SonarQube's results are relevant. To do this you need to [Narrowing the Focus](/project-administration/narrowing-the-focus/) or configure what to analyze for each project.\\n\\nYou can also set up [Webhooks](/project-administration/webhooks/) to notify external services when a project analysis is complete.\\n\\n## Administering an Instance\\n\\nIf you're a global administrator, you can set up authentication, administrator access, and authorization. See [Security](/instance-administration/security/) for more information.\\n\\nYou can also set up email [notifications](/instance-administration/notifications/) that developers can subscribe to that are sent at the end of each analysis. \\n\\nWhen you run new analyses on your projects, some data is cleaned out of the database to save space and improve performance. See [Housekeeping](/instance-administration/housekeeping/) for information on what data is cleaned and how to change these settings.\\n\\nStarting in [Enterprise Edition](https://www.sonarqube.org/enterprise-edition/), you can set up [Portfolios](/user-guide/portfolios/) to get a high-level overview on the releasability of a group of projects.  \\n\\n## Staying Connected\\n\\nUse the following links to get help and keep up with SonarQube:\\n\\n- [Get help in the community](https://www.sonarqube.org/community/)\\n- [Source code](https://github.com/SonarSource)\\n- [Issue tracker](https://jira.sonarsource.com/)\"},{\"path\":\"instance-administration/audit-logs\",\"content\":\"---\\ntitle: Audit Logs\\nurl: /instance-administration/audit-logs/\\n---\\n_Audit logs are available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)._\\n\\nAdministrators can download audit logs to maintain an audit trail of the security-related changes made to their SonarQube instance. See the following section for the types of changes tracked in the audit logs. \\n\\n## Tracked changes\\nAudit logs track the following changes in SonarQube:\\n- user accounts\\n- permissions\\n- global configuration of security-related settings\\n- creating, updating, or deleting of projects, applications, and portfolios\\n- installing or updating plugins\\n- setting or revoking licenses\\n\\n## Downloading audit logs\\nAdministrators can download audit logs at **Administration > Audit logs**. From here, you can select the time period that you want to download audit logs for. This is limited by your housekeeping settings. See the following section for more on setting your audit log housekeeping settings.\\n\\n## Audit log housekeeping\\nYou can set how often SonarQube deletes audit logs in the housekeeping settings at **[Administration > General > Housekeeping](/#sonarqube-admin#/admin/settings?category=housekeeping)**. By default, SonarQube deletes audit logs monthly. \\n\\nSetting your housekeeping policy to keep your audit logs for a long period of time (for example, only deleting logs yearly) can increase your database size and the amount of time it takes to download audit logs. To avoid this, we recommend downloading your audit logs at shorter intervals and storing them outside of SonarQube. \\n\\nWe also recommend downloading and storing your audit logs outside of SonarQube if you need to maintain them for a longer period of time than can be set in the housekeeping settings.\"},{\"path\":\"instance-administration/backup-restore\",\"content\":\"---\\ntitle: Backup and Restore\\nurl: /instance-administration/backup-restore/\\n---\\n\\n## Backing Up Data\\nMost databases come with backup tools. We recommend using these tools to back up your data.\\n\\n## Restoring Data\\nTo restore data from backup, follow these steps:\\n\\n1. Stop the server.\\n1. Restore the backup.\\n1. Drop the Elasticsearch indexes by deleting the contents of `$SQ_HOME/data/es7 directory`.\\n1. Restart the server.\\n\"},{\"path\":\"instance-administration/compute-engine-performance\",\"content\":\"---\\ntitle: Compute Engine Performance\\nurl: /instance-administration/compute-engine-performance/\\n---\\n\\n_The ability to manage Compute Engine performance is available as part of [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html) and [above](https://www.sonarsource.com/plans-and-pricing/)._\\n\\n\\n### How can I get analyses through the Compute Engine Queue faster?\\nIf analyses are taking too long to process, it may be that you need to increase the number of Compute Engine (CE) workers (**[Administration > Projects > Background Tasks > Number of Workers](/#sonarqube-admin#/admin/background_tasks)**). \\n\\nThere are two cases to consider:\\n\\n1. slowness comes from the fact that the queue is often full of pending tasks\\n1. individual tasks take a long time to process\\n\\nIn the first case, increasing the number of workers could help. The second case should be carefully evaluated. In either case, when considering increasing the number of CE workers, two questions should be answered.\\n\\n* does my infrastructure allow me to increase the number of workers?\\n* to what extent should I increase the number of workers? I.E. What number should I configure?\\n\\nIncreasing the number of workers will increase the stress on the resources consumed by the Compute Engine. Those resources are:\\n\\n* the DB\\n* disk I/O\\n* network\\n* heap\\n* CPU\\n\\nOf those, only the last two are internal to the CE.\\n\\nIf slowness comes from any of the external resources (DB, disk I/O, network), then increasing the number of workers could actually slow the processing of individual reports (think of two people trying to go through a door at  the same time). However, if your slowness is caused by large individual analysis reports hogging the CE worker for extended periods of time, then enabling parallel processing by adding another worker could help. But if you do, you need to take a look at the internal resources.\\n\\nCE workers are not CPU-intensive and memory use depends entirely on the project that was analyzed. Some need a lot of memory, others don't. But with multiple CE workers, you should increase CE heap size by a multiple of the number of workers. The same logic applies to CPU: if running with one worker consumes up to Y% of CPU, then you should plan for Z workers requiring Y*Z% of CPU.\\n\\nTo accurately diagnose your situation, monitor network latency, the I/O of the SonarQube instance, and the database CPU and memory usage to evaluate whether slowness is mainly/mostly/only related to external resources. \\n\"},{\"path\":\"instance-administration/db-copy\",\"content\":\"---\\ntitle: SonarQube DB Copy Tool\\nurl: /instance-administration/db-copy/\\n---\\n\\n_The SonarQube DB Copy Tool is available to customers with [SonarSource support](https://www.sonarsource.com/support/)._\\n\\nWe provide this tool to help you migrate your SonarQube database from one database vendor to another. For example, if you've been using your SonarQube instance with Oracle and want to migrate to PostgreSQL without losing your analysis history, the SonarQube DB Copy Tool can help. \\n\\nIn the following lines, we mention \\\"source\\\" and \\\"target\\\" SonarQube database instances. The source instance is the database you're moving from, and the target instance is the one you're moving to.\\n\\nHere's an overview of the general procedure:\\n\\n* Connect to both the source and target databases.\\n* Read the data from the source database table by table.\\n* Save the data into the target database table by table.\\n* Recreate the sequences, index, ... on the target database.\\n\\n## Installation\\nThe SonarQube DB Copy Tool is provided as a standalone JAR file. You need to make sure you're meeting the following conditions:\\n\\n* The JAR file must not be installed in your source or target SonarQube instances. You can put the JAR file anywhere on your machine as long as your machine is authorized to access your source and target SonarQube databases.\\n* You must be using at least version **1.3.3.627** of the JAR file.\\n\\n## DB Copy preparation phase\\nTo prepare for the DB Copy Tool, you need to ready the target instance by setting up a SonarQube schema and populating it with the necessary tables so that your source and target instances have the same database schema.\\n\\n1. Make sure your target database is up and running.\\n1. On your target database, create the `sonar` schema. \\n1. Download and expand a copy of SonarQube that exactly matches the version you're running. \\n1. Configure your SonarQube copy to connect to the target database. (If you've placed your SonarQube copy on the same server that runs your primary SonarQube instance, you'll also need to configure non-default ports for your copy SonarQube instance.)\\n1. Start your copy SonarQube instance. It will connect to your empty target and populate the schema.\\n1. Once your copy instance is up and running (this indicates that the schema is fully populated), you can stop and delete it.\\n1. Refresh the Database Statistics on the target database before restarting SonarQube\\n\\nAt this point, you have the exact same list of tables in your source and target databases.\\n\\n## DB Copy run phase\\nTo run the DB Copy Tool, perform the following steps:\\n\\n1. **Stop your primary SonarQube instance.**\\n1. Execute the base command jar with the correct parameters. \\n1. Update your primary SonarQube instance's configuration to point to the target DB\\n1. Restart your primary SonarQube instance.\\n\\n### Base command\\n```\\njava -jar sonar-db-copy-1.3.3.627-jar-with-dependencies.jar\\n```\\n\\n### Parameters\\nName | Description | Required\\n---|---|---|---\\n`-help`|Print this parameters help| no  \\n`-urlSrc`|JDBC URL of the source database|yes\\n`-userSrc`|Username of the source database|yes\\n`-pwdSrc`|Password of the source database|yes\\n`-urlDest`|JDBC URL of the target database|yes\\n`-userDest`|Username of the target database|yes\\n`-pwdDest`|Password of the target database|yes\\n`-driverDest`|JDBC Driver of the target database|no\\n`-driverSrc`|JDBC Driver of the source database|no\\n`-T`|Comma separated list of tables to migrate|no\\n\\n## Execution Examples\\nFirst, sonar-db-copy verifies if URLs can be reached and the database versions:\\n  \\n```\\n***************** CONFIGURATION VERIFICATIONS ***************\\nDatabase SOURCE has been reached at :          jdbc:h2:tcp://localhost:9092/sonar-db-copy\\nDatabase DESTINATION has been reached at :     mysql://localhost:13306/sonar?autoReconnect=true\\nThe version of SonarQube schema migration are the same between source (433) and destination (433).\\n```\\n\\nWhen the versions are different, the application stops.  \\n\\n```\\n***************** CONFIGURATION VERIFICATIONS ***************\\nDatabase SOURCE has been reached at :          jdbc:h2:tcp://localhost:9092/sonar-db-copy\\nDatabase DESTINATION has been reached at :     mysql://localhost:13306/sonar?autoReconnect=true\\nException in thread \\\"main\\\" Version of the schema migration are not the same between source (433) and destination (494).\\n```\\n\\nSometimes when you have restarted the copy, the destination database version is 0. This is not a problem, and the copy will continue.  \\n\\n```\\n***************** CONFIGURATION VERIFICATIONS ***************\\nDatabase SOURCE has been reached at :          jdbc:h2:tcp://localhost:9092/sonar-db-copy\\nDatabase DESTINATION has been reached at :     mysql://localhost:13306/sonar?autoReconnect=true\\n!  WARNING \u2013 The versions of SonarQube schema migration source is (433) when destination is (0).\\n```\\n\\nThen it searches tables in the source and destination databases:  \\n\\n```\\n*************** SEARCH TABLES ***************\\nSTART GETTING METADATA IN SOURCE...\\n  53 TABLES GETTED.\\nSTART GETTING METADATA IN DESTINATION...\\n  53 TABLES GETTED.\\n*************** FOUND TABLES ***************\\n\\nFOUND TABLE : action_plans\\n  SOURCE:\\n        COLUMNS : (id,kee,name,description,deadline,user_login,project_id,status,created_at,updated_at)\\n\\t\\tTYPES:  : (INTEGER,VARCHAR,VARCHAR,VARCHAR,TIMESTAMP,VARCHAR,INTEGER,VARCHAR,TIMESTAMP,TIMESTAMP)\\n  DESTINATION:\\n\\t\\tCOLUMNS : (id,create_at,updated_at,name,description,deadline,user_login,project_id,status,kee)\\n\\t\\tTYPES   : (BIGINT,TIMESTAMP,TIMESTAMP,VARCHAR,VARCHAR,TIMESTAMP,VARCHAR,INTEGER,VARCHAR,VARCHAR)\\n\\t\\t\\nFOUND TABLE : active_dashboards\\n\\tSOURCE:\\n\\t\\tCOLUMNS : (id,dashboard_id,user_id,order_index)\\n\\t\\tTYPES   : (INTEGER,INTEGER,INTEGER,INTEGER)\\n\\tDESTINATION:\\n\\t\\tCOLUMNS : (id,dashboard_id,user_id,order_index)\\n\\t\\tTYPES   : (INTEGER,INTEGER,INTEGER,INTEGER)\\n```\\n\\t\\t\\nIf there are missing tables, you will see this log:  \\n\\n```\\nFOUND TABLE : action_plans\\n  SOURCE:\\n        COLUMNS : (id,person_id,login,create_at,updated_at)\\n\\t\\tTYPES:  : (INTEGER,INTEGER,VARCHAR,TIMESTAMP,TIMESTAMP)\\n  DESTINATION:\\n ! WARNING - TABLE authors is not present in the DESTINATION database.\\n``` \\n\\nThen, sonar-db-copy truncates tables in the target database and indicates the number of tables purged. Of course, the tables missing can not be purged:  \\n\\n```\\n*************** DELETE TABLES FROM DESTINATION ***************\\nSTART DELETING...\\n ! WARNING - Can't DELETE TABLE :authors because it doesn't exist in the destination database.\\n   52 TABLES DELETED IN DESTINATION.\\n```\\n\\nNext, sonar-db-copy reproduces data from source to destination and adjusts the sequence of destination database after the copy:  \\n\\n```\\n*************** COPY DATA ***************\\naction_plans                 0 / 0\\naction_plans                 0 / 0\\nactive_dashboards            0 / 5\\nactive_dashboards            5 / 5\\nactive_rules                 0 / 629\\nactive_rules                 629 / 629\\nactive_rule_changes          0 / 0\\nactive_rule_changes          0 / 0\\nactive_rule_notes            0 / 0\\nactive_rule_notes            0 / 0\\nactive_rule_parameters       0 / 58\\nactive_rule_parameters       58 / 58\\n```\\n\\nIf there are some missing tables, you'll see the following warning:  \\n\\n```\\n! WARNING - Can't WRITE in TABLE :authors because it doesn't exist in destination database.\\n```\\n\\nIf errors appear during the copy, the process does NOT stop but the errors are displayed:  \\n\\n```\\n** ERROR ** IN TABLE: users when read and write at col: 10 and id=1.\\n** ERROR ** SORUCE COLUMNS      ( name,admin,remarks,id,id,login,name).\\n** ERROR ** DESTINATION COLUMNS ( id,login,name,email,crypted_password).\\n** ERROR ** LINES NOT COPIED at ROW (0) WITH id = (1).\\n** ERROR ** Cannot parse \\\"TIMESTAMP\\\" constant \\\"TRUE\\\" [22007-172]\\n```\\n\\nAt the end, sonar-db-copy reiterates the difference between the source and destination databases. An error message is displayed if the databases are different. \\n\\n```\\nINFO *************** CHECK DESCREPANCIES ***************\\nWARN TABLE projects has 65 ROWS in SOURCE while 0 ROWS in DESTINATION\\nINFO ********************************************\\nINFO ** THE COPY HAS FINISHED UNSUCCESSFULLY !!! WATCH OUT THE LOG!!! **\\nINFO ********************************************\\n```\\n\"},{\"path\":\"instance-administration/delegated-auth\",\"content\":\"---\\ntitle: Delegating Authentication\\nurl: /instance-administration/delegated-auth/\\n---\\n\\nSonarQube comes with an onboard user database, as well as the ability to delegate authentication via HTTP Headers, GitHub Authentication, GitLab Authentication, SAML, or LDAP. Each method offers user identity management, group synchronization/mapping, and authentication.\\n\\n## Group Mapping\\nWhen using group mapping, the following caveats apply regardless of which delegated authentication method is used:\\n* membership in synchronized groups will override any membership locally configured in SonarQube _at each login_\\n* membership in a group is synched only if a group with the same name exists in SonarQube\\n* membership in the default group `sonar-users` remains (this is a built-in group) even if the group does not exist in the identity provider\\n\\n[[warning]]\\n|When group mapping is configured, the delegated authentication source becomes the only place to manage group membership, and the user's groups are re-fetched with each log in.\\n\\n## HTTP Header Authentication\\nYou can delegate user authentication to third-party systems (proxies/servers) using HTTP Header Authentication. See `SSO AUTHENTICATION` section within `sonar.properties` file.\\n\\nWhen this feature is activated, SonarQube expects that the authentication is handled prior any query reaching the server. \\nThe tool that handles the authentication should:\\n\\n* intercept calls to the SonarQube server\\n* take care of the authentication\\n* update the HTTP request header with the relevant SonarQube user information\\n* re-route the request to SonarQube with the appropriate header information\\n\\n![HTTP Header Authentication flow](/images/http-header-authentication.png)\\n\\nAll the parameters required to activate and configure this feature are available in SonarQube server configuration file (in _$SONARQUBE-HOME/conf/sonar.properties_).\\n\\nUsing Http header authentication is an easy way integrate your SonarQube deployment with an in-house SSO implementation.\\n\\n## GitHub, GitLab, and Bitbucket Cloud Authentication\\nYou can delegate authentication to GitHub, GitLab, or Bitbucket Cloud. See the corresponding DevOps Platform integration page for more information:\\n- [GitHub Enterprise and GitHub.com](/analysis/github-integration/)\\n- [GitLab Self-Managed and GitLab.com](/analysis/gitlab-integration/)\\n- [Bitbucket Cloud](/analysis/bitbucket-cloud-integration/)\\n\\n## SAML Authentication  \\nYou can delegate authentication to a SAML 2.0 Identity Provider using SAML Authentication.\\n\\n### Limitations\\n* SAML requests are not signed. Client signature validation should be disabled in the Identity Provider.\\n* SAML encrypted responses are not supported. SAML encryption should be disabled in the Identity Provider.\\n\\n### Example: Using Keycloak as a SAML Identity Provider\\nThe following example may be useful if you're using Keycloak as a SAML Identity Provider. If you're not using Keycloak, your settings are likely to be different.\\n\\n[[collapse]]\\n| ## In the Keycloak server, create a new SAML client\\n| Create a new client\\n|\\n| 1. \\\"Client ID\\\" is something like \\\"sonarqube\\\" \\n| 1. \\\"Client Protocol\\\" must be set to \\\"saml\\\"\\n| 1. \\\"Client SAML Endpoint\\\" can be left empty\\n|\\n| Configure the new client\\n|\\n| 1. in Settings\\n|    1. Set\\\"Client Signature Required\\\" to OFF\\n|    1. Set \\\"Valid Redirect URIs\\\" to \\\"<Your SonarQube URL>/oauth2/callback/*, E.G https://sonarqube.mycompany.com/oauth2/callback/saml\\n| 1. in Client Scopes > Default Client Scopes , remove \\\"role_list\\\" from \\\"Assigned Default Client Scopes\\\" (to prevent the error `com.onelogin.saml2.exception.ValidationError: Found an Attribute element with duplicated Name` during authentication)\\n| 1. In Mappers create a mapper for each user attribute (Note that values provided below for Name, SAML Attribute Name, Role Attribute Name are only example values): \\n|    1. Create a mapper for the login: \\n|       * Name: Login\\n|       * Mapper Type: User Property\\n|       * Property: Username (Note that the login should not contain any special characters other than `.-_@` to meet SonarQube restrictions.)\\n|       * SAML Attribute Name: login\\n|    1. Create a mapper for the name: \\n|       * Name: Name\\n|       * Mapper Type: User Property\\n|       * User Attribute: Username (It can also be another attribute you would previously have specified for the users)\\n|       * SAML Attribute Name: name\\n|    1. (Optional) Create a mapper for the email: \\n|       * Name: Email\\n|       * Mapper Type: User Property\\n|       * Property: Email\\n|       * SAML Attribute Name: email\\n|    1. (Optional) Create a mapper for the groups (If you rely on a list of roles defined in \\\"Roles\\\" of the Realm (not in \\\"Roles\\\" of the client)):\\n|       * Name: Groups\\n|       * Mapper Type: Role list\\n|       * Role Attribute Name: groups\\n|       * Single Role Attribute: ON\\n|    1. If you rely on a list of groups defined in \\\"Groups\\\":\\n|       * Name: Groups\\n|       * Mapper Type: Group list\\n|       * Role Attribute Name: groups\\n|       * Single Role Attribute: ON\\n|       * Full Group Path: OFF\\n|\\n| Download the XML configuration file from Keycloak.\\n\\n[[collapse]]\\n| ## In SonarQube, Configure SAML authentication\\n| Go to **[Administration > Configuration > General Settings > Security > SAML](/#sonarqube-admin#/admin/settings?category=security)**\\n| * **Enabled** should be set to true\\n| * **Application ID** is the value of the \\\"Client ID\\\" you set in Keycloak (for example \\\"sonarqube\\\")\\n| * **Provider ID** is the value of the \\\"EntityDescriptor\\\" > \\\"entityID\\\" attribute in the XML configuration file (for example \\\"http://keycloak:8080/auth/realms/sonarqube\\\" where sonarqube is the name of the realm)\\n| * **SAML login url** is the value of \\\"SingleSignOnService\\\" > \\\"Location\\\" attribute in the XML configuration file (for example \\\"http://keycloak:8080/auth/realms/sonarqube/protocol/saml\\\")\\n| * **Provider certificate** is the value you get from *Reaml Settings* -> *Keys* -> click on the *Certificate* button\\n| * **SAML user login attribute** is the value set in the login mapper in \\\"SAML Attribute Name\\\"\\n| * **SAML user name attribute** is the value set in the name mapper in \\\"SAML Attribute Name\\\"\\n| * (Optional) **SAML user email attribute** is the value set in the email mapper in \\\"SAML Attribute Name\\\"\\n| * (Optional) **SAML group attribute** is the value set in the groups mapper in \\\"Role/Group Attribute Name\\\"\\n|\\n| In the login form, the new button \\\"Log in with SAML\\\" allows users to connect with their SAML account.\\n\\n### SAML and reverse proxy configuration\\nWhen using SAML, make sure your reverse proxy is properly configured. See [Operating the Server](/setup/operate-server/) for more information.\\n\\n## LDAP Authentication\\nYou can configure SonarQube authentication and authorization to an LDAP server (including LDAP Service of Active Directory) by configuring the correct values in _$SONARQUBE-HOME/conf/sonar.properties_.\\n\\nThe main features are:\\n\\n* Password checking against the external authentication engine.\\n* Automatic synchronization of usernames and emails.\\n* Automatic synchronization of relationships between users and groups (authorization).\\n* Ability to authenticate against both the external and the internal authentication systems. There is an automatic fallback on SonarQube internal system if the LDAP server is down.\\n* During the first authentication trial, if the user's password is correct, the SonarQube database is automatically populated with the new user. Each time a user logs into SonarQube, the username, the email and the groups this user belongs to that are refreshed in the SonarQube database. You can choose to have group membership synchronized as well, but this is not the default.\\n\\n\\n&nbsp;| Apache DS | OpenLDAP | Open DS | Active Directory\\n----|-----------|----------|---------|-----------------\\nAnonymous | ![](/images/check.svg) |![](/images/check.svg) |![](/images/check.svg) |  &nbsp;\\nSimple|![](/images/check.svg)|![](/images/check.svg)|![](/images/check.svg)|![](/images/check.svg)\\nLDAPS|![](/images/check.svg)|![](/images/check.svg)|  |![](/images/check.svg)\\nDIGEST-MD5|![](/images/check.svg)|  |![](/images/check.svg)|![](/images/check.svg)\\nCRAM-MD5|![](/images/check.svg)|  |![](/images/check.svg)|![](/images/check.svg)\\nGSSAPI|![](/images/check.svg)|  |  |  \\n![](/images/check.svg) = successfully tested\\n\\n### Setup\\n1. Configure LDAP by editing _$SONARQUBE-HOME/conf/sonar.properties_ (see table below)\\n2. Restart the SonarQube server and check the log file for:\\n```\\nINFO org.sonar.INFO Security realm: LDAP ...\\nINFO o.s.p.l.LdapContextFactory Test LDAP connection: OK\\n```\\n1. Log into SonarQube\\n1. On logout users will be presented a login page (_/sessions/login_), where they can choose to login as technical user or a domain user by passing appropriate credentials\\n\\nFrom SonarScanners, we recommend using [local technical users](/instance-administration/security/) for authentication against SonarQube Server.\\n\\n**General Configuration**\\n\\nProperty|Description|Default value|Required|Example\\n---|---|---|---|---\\n`sonar.security.realm`|Set this to `LDAP` authenticate first against the external sytem. If the external system is not reachable or if the user is not defined in the external system, authentication will be performed against SonarQube's internal database.| none |Yes|`LDAP` (only possible value)\\n`sonar.authenticator.downcase`|Set to true when connecting to a LDAP server using a case-insensitive setup.|`false`|No\\n`ldap.url`|URL of the LDAP server. If you are using ldaps, you should install the server certificate into the Java truststore.| none |Yes|`ldap://localhost:10389`\\n`ldap.bindDn`|The username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory.|none|No|`cn=sonar,ou=users,o=mycompany`\\n`ldap.bindPassword`|The password of the user to connect with. Leave this blank for anonymous access to the LDAP directory.|none|No|`secret`\\n`ldap.authentication`|Possible values: `simple`, `CRAM-MD5`, `DIGEST-MD5`, `GSSAPI`. See [the tutorial on authentication mechanisms](http://java.sun.com/products/jndi/tutorial/ldap/security/auth.html)|`simple`|No\\n`ldap.realm`|See [Digest-MD5 Authentication](http://java.sun.com/products/jndi/tutorial/ldap/security/digest.html), [CRAM-MD5 Authentication](http://java.sun.com/products/jndi/tutorial/ldap/security/crammd5.html)| none|No|example.org\\n`ldap.contextFactoryClass`|Context factory class.|`com.sun.jndi.ldap.LdapCtxFactory`|No\\n`ldap.StartTLS`|Enable use of `StartTLS`|`false`|No\\n`ldap.followReferrals`|Follow referrals or not. See [Referrals in the JNDI](http://docs.oracle.com/javase/jndi/tutorial/ldap/referral/jndi.html)|`true`\\n\\n**User Mapping**\\n\\nProperty|Description|Default value|Required|Example for Active Directory\\n---|---|---|---|---\\n`ldap.user.baseDn`|Distinguished Name (DN) of the root node in LDAP from which to search for users.|None|Yes|`cn=users,dc=example,dc=org`\\n`ldap.user.request`|LDAP user request.|`(&(objectClass=inetOrgPerson)(uid={login}))`|No|`(&(objectClass=user)(sAMAccountName={login}))`\\n`ldap.user.realNameAttribute`|Attribute in LDAP defining the user\u2019s real name.|`cn`|No|  \\n`ldap.user.emailAttribute`|Attribute in LDAP defining the user\u2019s email.|`mail`|No| \\n\\n**Group Mapping**\\nOnly groups (not roles) and static groups (not dynamic groups) are supported. Click [here](http://identitycontrol.blogspot.fr/2007/07/static-vs-dynamic-ldap-groups.html) for more information.\\n\\nFor the delegation of authorization, [groups must be first defined in SonarQube](/instance-administration/security/). Then, the following properties must be defined to allow SonarQube to automatically synchronize the relationships between users and groups.\\n\\nProperty|Description|Default value|Required|Example for Active Directory\\n---|---|---|---|---\\n`ldap.group.baseDn`|Distinguished Name (DN) of the root node in LDAP from which to search for groups.|none|No|`cn=groups,dc=example,dc=org`\\n`ldap.group.request`|LDAP group request.|`(&(objectClass=groupOfUniqueNames)(uniqueMember={dn}))`|No|`(&(objectClass=group)(member={dn}))`\\n`ldap.group.idAttribute`|Property used to specifiy the attribute to be used for returning the list of user groups in the compatibility mode.|`cn`|No|`sAMAccountName`\\n\\n### Sample Configuration\\n```\\n# LDAP configuration\\n# General Configuration\\nsonar.security.realm=LDAP\\nldap.url=ldap://myserver.mycompany.com\\nldap.bindDn=my_bind_dn\\nldap.bindPassword=my_bind_password\\n  \\n# User Configuration\\nldap.user.baseDn=ou=Users,dc=mycompany,dc=com\\nldap.user.request=(&(objectClass=inetOrgPerson)(uid={login}))\\nldap.user.realNameAttribute=cn\\nldap.user.emailAttribute=mail\\n \\n# Group Configuration\\nldap.group.baseDn=ou=Groups,dc=sonarsource,dc=com\\nldap.group.request=(&(objectClass=posixGroup)(memberUid={uid}))\\n```\\n\\n## Advanced LDAP Topics\\n### Authentication Methods\\n* **`Anonymous`** -  Used when only read-only access to non-protected entries and attributes is needed when binding to the LDAP server.\\n* **`Simple`** Simple authentication is not recommended for production deployments not using the ldaps secure protocol since it sends a cleartext password over the network.\\n* **`CRAM-MD5`** - The Challenge-Response Authentication Method (CRAM) based on the HMAC-MD5 MAC algorithm ([RFC 2195](http://tools.ietf.org/html/rfc2195)).\\n* **`DIGEST-MD5`** - This is an improvement on the CRAM-MD5 authentication method ([RFC 2831](http://www.ietf.org/rfc/rfc2831.txt)).\\n* **`GSSAPI`** - GSS-API is Generic Security Service API ([RFC 2744](http://www.ietf.org/rfc/rfc2744.txt)). One of the most popular security services available for GSS-API is the Kerberos v5, used in Microsoft's Windows 2000 platform.\\n\\nFor a full discussion of LDAP authentication approaches, see [RFC 2829](http://www.ietf.org/rfc/rfc2829.txt) and [RFC 2251](http://www.ietf.org/rfc/rfc2251.txt).\\n\\n### Multiple Servers\\nTo configure multiple servers:\\n```\\n# List the different servers\\nldap.servers=server1,server2\\n  \\n# Configure server1\\nldap.server1.url=ldap://server1:1389\\nldap.server1.user.baseDn=dc=dept1,dc=com\\n...\\n \\n# Configure server2\\nldap.server2.url=ldap://server2:1389\\nldap.server2.user.baseDn=dc=dept2,dc=com\\n...\\n```\\n\\nAuthentication will be tried on each server, in the order they are listed in the configurations, until one succeeds. User/Group mapping will be performed against the first server on which the user is found.\\n\\nNote that all the LDAP servers must be available while (re)starting the SonarQube server.\\n\\n### Migrate users to a new authentication method\\nIf you are changing your delegated authentication method and migrating existing users from your previous authentication method, you can use the `api/users/update_identity_provider` web API to update your users' identity provider.\\n\\n### Troubleshooting\\n* Detailed connection logs (and potential error codes received from LDAP server) are output to SonarQube's _$SONARQUBE_HOME/logs/web.log_, when logging is in `DEBUG` mode.\\n\\n* Time out when running SonarQube analysis using LDAP\\nJava parameters are documented here: http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html. Such parameters can be set in `sonar.web.javaAdditionalOpts` in _$SONARQUBE-HOME/conf/sonar.properties_.\\n\\n## Revoking tokens for deactivated users\\nWhen SonarQube authentication is delegated to an external identity provider (LDAP, SAML, GitHub, or GitLab), deactivating a user on the identity provider side does not remove any tokens associated with the user on the SonarQube side. We recommend deactivating the user in SonarQube at **Administration > Security > Users** by selecting **Deactivate** from the ![Settings drop-down](/images/gear.png) drop-down menu to ensure tokens associated with that user can no longer be used.\\n\"},{\"path\":\"instance-administration/housekeeping\",\"content\":\"---\\ntitle: Housekeeping\\nurl: /instance-administration/housekeeping/\\n---\\n\\nWhen you run a new analysis of your project or its branches or pull requests(PRs), some data that was previously available is cleaned out of the database. For example the source code of the previous analysis, measures at directory and file levels, and so on are automatically removed at the end of a new analysis. Additionally, some old analysis snapshots, PR analyses, and branches are also removed.\\n\\nWhy? Well, it's useful to analyze a project frequently to see how its quality evolves. It is also useful to be able to see the trends over weeks, months, years. But when you look back in time, you don't really need the same level of detail as you do for the project's current state. To save space and to improve overall performance, the Database Cleaner deletes some rows in the database. Here is the default configuration:\\n\\n- Audit logs (available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html)) are deleted monthly.\\n- For each project:\\n  - only one snapshot per day is kept after 1 day. Snapshots marked by an event are not deleted.\\n  - only one snapshot per week is kept after 1 month. Snapshots marked by an event are not deleted.\\n  - only one snapshot per month is kept after 1 year. Snapshots marked by an event are not deleted.\\n  - only snapshots with version events are kept after 2 years. Snapshots without events or with only other event types are deleted.\\n  - **all snapshots** older than 5 years are deleted, including snapshots marked by an event. \\n- All closed issues more than 30 days old are deleted\\n- History at package/directory level is removed\\n\\nThese settings can be changed at [Administration > General > Housekeeping](/#sonarqube-admin#/admin/settings?category=housekeeping).\\n\"},{\"path\":\"instance-administration/license-manager\",\"content\":\"---\\ntitle: License Administration\\nurl: /instance-administration/license-manager/\\n---\\n\\n## License Manager\\n_Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can access the License Manager at **Administration > Configuration> License Manager**._\\n\\nYou can use the License Manager to retrieve your server ID (required for obtaining a License Key) and configure your SonarSource-provided License key.\\n\\n[[warning]]\\n|The server ID is specific to the current database system. Make sure to configure an external database for long-term use prior to requesting your license with this server ID.\\n\\n### Retrieving the server ID\\nThe server ID is always available on the License Manager page, as well as in the **System Info** section at **Administration > System**.\\n\\n[[info]]\\n|If the database connection string is updated, the server ID will be re-generated and you'll need a new license.\u00A0When it is generated, the server ID is unique. The same server ID will never be generated twice, even on the same SonarQube instance.\\n\\n### Setting a license\\nBy clicking the **Set new license** button, you can set a new license to enable or disable features in SonarQube or to update your license.\\n\\n### Lines of Code consumption\\nUnder **Lines of Code**, the gauge shows how many lines of code (LOC) you are currently scanning and how close you are to your limit. If you're near your limit, you may need to purchase additional LOCs.\\n\\n### Global Administrator notifications\\nThe License Manager has two built-in notification mechanisms (notifications are sent to Global Administrators). Global administrators will get notifications when:\\n\\n- **the license is about to expire** \u2013 a reminder is sent two months and again one month before your license expires.\\n- **the configurable LOC threshold is exceeded** \u2013 you can change this threshold using the indicator on the LOC gauge. \\n\\t- A background job runs at server startup and then every 24 hours to check the LOC threshold and decide if a notification should be sent. \\n\\t- The background job does not check the validity of SMTP server settings and whether the global administrator email addresses are set up. For global administrators to receive notifications, these settings need to be correctly configured before the LOC threshold is reached or exceeded.\\n\\n### Features Included\\n\\nThis section of the License Manager page lists the commercial features that are enabled by the current license.\\n\\n## Staging licenses\\n_Staging licenses are only available in Enterprise Editions, Data Center Edition, or with commercial support_\\n\\nYour commercial license may include one or more staging licenses. You can use these licenses for non-production instances to test new features, upgrades, new integrations, etc.\\n\\nOur license mechanism supports a regular synchronization between your production instance and staging instances. To set up synchronization:\\n\\n- First Staging setup:\\n  1. Create a staging database and copy the production database in it.\\n  1. Connect your SonarQube staging instance to it.\\n  1. Start SonarQube and retrieve the generated server ID.\\n  1. Request your Staging license key for this server ID.\\n  1. Set it up in the Administration panel.\\n  \\n- Synchronization on a regular basis:\\n  1. Empty the staging database and copy the production database in it\\n  1. Start SonarQube\\n  1. The server ID will be the same as generated the first time, so you can reuse the same license key\\n\\n## Actions that will invalidate your license key\\n\\nCertain actions will regenerate your server ID and invalidate your license key. The following are some of the most common of these actions:\\n\\n- Moving, upgrading, or changing your database server to another host, available with a different IP or DNS name.\\n- Changing the existing database server IP or DNS name.\\n- Changing the database/schema name on the database server.\\n- Restoring the database content from another SonarQube instance (except for production/staging synchronization).\\n- Reinstalling SonarQube on an empty database.\\n- Using DBCopy or MySQL Migrator to copy your old database into a new one.\\n\\nIf you plan on going through one of these scenarios and you have commercial support, please open a support ticket beforehand to confirm the plan or to explore alternatives.\\n\\nIn all cases, follow the steps below in **Requesting a new license** if your license key had been invalidated.\\n\\n## Requesting a new license\\nIf your license key isn't working:\\n1. Send an email to contact@sonarsource.com that includes the following information:\\n\\t- Server ID - Found under **System Info** at **Administration > System**\\n\\t- SonarQube version - Found under **System Info** at **Administration > System**\\n\\t- SonarQube edition\\n1. Clarify what current license (production/staging) and server ID this is replacing.\\n1. Confirm the status of the existing license.\\n\\nA new license key will be issued within 1 business day once we receive an email with the needed information at contact@sonarsource.com.\\n\\n## Support\\n\\n### Access to SonarSource Support\\nIf your license entitles you to SonarSource Support, A **Support** tab will appear at **[Administration > Support](/#sonarqube-admin#/admin/extension/license/support)** to guide you through interactions with SonarSource Support.\\n\\nThis page also allows you to collect the\u00A0Support Information File\u00A0of your instance. Make sure to provide this file for any interaction with SonarSource Support.\\n\\n![Support Information File.](/images/support-information-file.png)\\n\\n\"},{\"path\":\"instance-administration/look-and-feel\",\"content\":\"---\\ntitle: Look and Feel\\nurl: /instance-administration/look-and-feel/\\n---\\n\\n## Home logo\\nYou can set your own \\\"home\\\" logo in **[Administration > General > Look & Feel](/#sonarqube-admin#/admin/settings)**. Simply provide an image URL and width. Ideally, the width will scale the height to 30 pixels. This logo will be used in both the menu bar and on the About page.\\n\\n## Content of the \\\"About\\\" page\\nYou also have the ability to add content to the About page, which anonymous users land on by default: **[Administration > General > Look & Feel](/#sonarqube-admin#/admin/settings)**.\\n\\n## Gravatar\\nGravatar support is enabled by default, using gravatar.com. You can configure a different server or disable the feature altogether. When enabled, gravatars show up next to most uses of the user name.\\n\"},{\"path\":\"instance-administration/marketplace\",\"content\":\"---\\ntitle: Marketplace\\nurl: /instance-administration/marketplace/\\n---\\n\\n[[info]]\\n| You can only install and update plugins from the Marketplace in SonarQube Community Edition. With commercial editions, you need manually install and update your plugins. See [Install a Plugin](/setup/install-plugin/) for more information.\\n\\nAdministrators can access the Marketplace via **[Administration > Marketplace](/#sonarqube-admin#/admin/marketplace)**. The Marketplace is the place for keeping the pieces of the SonarQube platform up to date. It lets you:\\n\\nSee\\n\\n* The currently installed SonarQube Edition\\n* Which plugins are installed\\n* Whether plugin updates are available\\n* Which other plugins are compatible with your version of SonarQube\\n\\nDiscover\\n\\n* Which other Editions are available, to enable more features\\n\\nInstall\\n\\n* New plugins\\n* Plugin updates\\n\\nTo view/install plugin updates, your SonarQube server needs internet access. Installations require the platform to be restarted before they take effect.\\n\\n## Pending Operations\\n\\nWhen you perform an action in the Marketplace (install, update, or uninstall a plugin), a yellow banner appears at the top of the page showing pending operations that will be executed once SonarQube is restarted. Pending operations can be canceled until the server is restarted.\\n\\n## Restart SonarQube\\nRestarting SonarQube can be done manually from the command line by running `sonar.sh restart` or directly from the UI:\\n\\n* in the Update Center when you have Pending Changes, the restart button will be displayed in the yellow banner (see Pending Operations)\\n* in the System Info page at any time\\n\\n## Manual Updates\\nIf you're using a commercial edition or your server doesn't have internet access, you won't be able to rely on the Marketplace for plugins, and you will have to handle plugin installations and upgrades manually.\\n\\nTo see what plugins are available and which version of a plugin is appropriate for your server, use the [plugin version matrix](/instance-administration/plugin-version-matrix/), which is kept up to date with current plugin availability and compatibility.\\n\\nTo install a plugin, simply download it using the manual download link on the plugin documentation page, place it in `$SONARQUBE-HOME/extensions/plugins`, and restart the server.\\n\\n### Stopping the Marketplace from searching for plugin updates\\nYour SonarQube server needs internet access for the Marketplace to search for plugin updates. If your server doesn't have internet access, you may get errors in your logs when the Marketplace tries to search for new plugins. You can stop this by updating `sonar.updatecenter.activate` in `$SONARQUBE-HOME/conf/sonar.properties`.\\n\\n## Which URLs does the Marketplace connect to?\\nThe SonarQube Marketplace connects to https://update.sonarsource.org/ to get the list of plugins. Most of the referenced plugins are downloaded from:\\n* https://binaries.sonarsource.com/\\n* https://github.com/\\n\\n## Using the Marketplace behind a Proxy\\nMarketplace uses HTTP(S) connections to external servers to provide these services. If SonarQube is located behind a proxy, additional information must be provided in the _$SONARQUBE-HOME/conf/sonar.properties_ configuration file:\\n```\\nhttp.proxyHost=<your.proxy.host>\\nhttp.proxyPort=<yout.proxy.port>\\n\\n#If proxy authentication is required\\nhttp.proxyUser=<your.proxy.user>\\nhttp.proxyPassword=<your.proxy.password> \\n```\\nNote: the same properties can be used in the 'https.' form for HTTPS connections.\"},{\"path\":\"instance-administration/monitoring\",\"content\":\"---\\ntitle: Monitoring\\nurl: /instance-administration/monitoring/\\n---\\n\\nMonitoring your SonarQube instance is key to keeping it healthy and having happy users.\\n\\nAs a start, you can use this Web API to get an overview of the health of your SonarQube installation:\\n\\n* [api/system/health](/#sonarqube-admin#/api/system/health)\\n\\n## Java Process Memory\\n\\nThe SonarQube application server consists of three main Java processes:\\n\\n* Compute Engine\\n* Elasticsearch\\n* Web (including embedded web server)\\n\\nEach of these Java processes has its own memory settings that can be configured in the _$SONARQUBE-HOME/conf/sonar.properties_ file. The default memory settings that ship with SonarQube are fine for most instances. If you are supporting a large SonarQube instance (more than 100 users or more than 5,000,000 lines of code) or an instance that is part of your Continuous Integration pipeline, you should monitor the memory and CPU usage of all three key Java processes on your instance, along with overall disk space. Monitoring will allow you to see if any of the processes is running short of resources and take action ahead of resource shortages. There are numerous monitoring tools available, both open source and commercial, to help you with this task. SonarSource does not recommend or endorse any particular tool.\\n\\n## Memory settings\\n\\nYou may need to increase your memory settings if you see the following symptoms:\\n\\n* Your monitoring tools show one or more of the SonarQube processes is reaching its memory limit\\n* Any of the SonarQube processes crashes and/or generates an out-of-memory error in the sonar.log file\\n* A SonarQube background task fails with an out-of-memory error in the background task log\\n* The store size of the Issues index of your Elasticsearch instance (visible in the System Info) is greater than or equal to the memory allocated to the Elasticsearch Java process\\n\\nYou can increase the maximum memory allocated to the appropriate process by increasing the  -Xmx memory setting for the corresponding Java process in your _$SONARQUBE-HOME/conf/sonar.properties_ file:\\n\\nJava Process | SonarQube Property | Notes\\n--- | --- | ---\\nCompute Engine | sonar.ce.javaOpts\\nElasticsearch | sonar.search.javaOpts | It is recommended to set the min and max memory to the same value to prevent the heap from resizing at runtime, which diverts JVM resources and can greatly increase response times of in-flight requests.\\nWeb | sonar.web.javaOpts\\n\\nThe -Xmx parameter accepts numbers in both megabytes (e.g. -Xmx2048m) and gigabytes (e.g. -Xmx2G). The metric suffix is case-insensitive.\\n\\n## Exposed JMX MBeans\\n\\nThe SonarQube Server offers visibility about what happens internally through the exposure of JMX MBeans.\\n\\nIn addition to the classical Java MBeans providing information about the ClassLoader, OS, Memory, and Threads you have access to three more MBeans in the SonarQube Server:\\n\\n* ComputeEngine\\n* Database\\n* SonarQube\\n\\nAll these MBeans are read-only. It's not possible to modify or reset their values in real time.\\n\\n[[collapse]]\\n| ## ComputeEngineTasks MBean\\n| Attribute Name | Description\\n| ---|---\\n| ProcessingTime | Measure the time (in ms) spent to process Background Tasks since the last restart of SonarQube. Its value will always increase and will be reset by a restart of SonarQube.  This measure is very powerful when combined with SuccessCount and ErrorCount measures to get the average time to handle a Background Task, or when used to understand how much time the SonarQube Server is spending during a day to handle Background Tasks. It gives you an indication of the load on your server.\\n| ErrorCount | Number of Background Tasks which failed since the last restart of SonarQube\\n| PendingCount | Number of Background Tasks waiting to be processed since the last restart of SonarQube\\n| InProgressCount | Number of Background Tasks currently under processing. Its value is either 1 or 0, since SonarQube can process only one task at a time.\\n| SuccessCount | Number of Background Tasks successfully processed since the last restart of SonarQube\\n| WorkerCount | Number of Background Tasks that can be processed at the same time\\n| PendingTime | Pending time (in ms) of the oldest Background Task waiting to be processed. This measure, together with PendingCount, helps you know if analyses are stacking and taking too long to start processing. This helps you evaluate if it might be worth configuring additional Compute Engine workers (Enterprise Edition) or additional nodes (Data Center Edition) to improve SonarQube performance.\\n|\\n| Note:\\n| * the total number of Background Tasks handled since the last restart of SonarQube is equal to SuccessCount + ErrorCount\\n| * all values reset to their default values after restarting SonarQube\\n\\n[[collapse]]\\n| ## Database MBean\\n| ### Same attributes are available for both ComputeEngineServer and WebServer.\\n| Attribute Name | Description\\n| ---|---\\n| MigrationStatus | Possible values are: UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL (only available for WebServer).\\n| PoolActiveConnections\\t| Number of active database connections\\n| PoolIdleConnections | Number of database connections waiting to be used\\n| PoolInitialSize | Initial size of the database connections pool.\\n| PoolMaxActiveConnections | Maximum number of active database connections\\n| PoolMaxIdleConnections | Maximum number of database connections waiting to be used\\n| PoolMaxWaitMillis | In milliseconds\\n| PoolRemoveAbandoned | Possible values : true, false\\n| PoolRemoveAbandonedTimeoutSeconds | In Seconds\\n\\n[[collapse]]\\n| ## SonarQube MBean\\n| Attribute Name | Description\\n| ---|---\\n| LogLevel | Log Level: INFO, DEBUG, TRACE\\n| ServerId | SonarQube Server ID\\n| Version | SonarQube Version\\n\\n## How do I Activate JMX?\\n\\n### Local Access\\n\\nThere is nothing to activate to view SonarQube MBeans if your tool is running on the same server as the SonarQube Server.\\n\\n### Remote Access\\n\\nHere are examples of configuration to activate remote access to JMX MBeans.\\n\\n* For the WebServer:\\n```\\n# JMX WEB - 10443/10444\\nsonar.web.javaAdditionalOpts=-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.port=10443 -Dcom.sun.management.jmxremote.rmi.port=10444 -Dcom.sun.management.jmxremote.password.file=/opt/sonarsource/sonar/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/opt/sonarsource/sonar/conf/jmxremote.access\\n```\\n\\n* For the ComputeEngine:\\n\\nThere is no specific javaAdditionalOpts entry, simply amend sonar.ce.javaOpts.\\n\\nExample of `jmxremote.access`:\\n\\n```\\n#\\n# JMX Access Control file\\n#\\nreader readonly\\nadmin  readwrite \\\\\\n    create javax.management.monitor.*,javax.management.timer.*,com.sun.management.*,com.oracle.jrockit.* \\\\\\n    unregister\\n```\\n\\nExample of `jmxremote.password`:\\n\\n```\\n#\\n# JMX Access Password file\\n#\\nreader readerpassword\\nadmin  adminpassword\\n```\\n\\nNote: on `jmxremote.password`, you should apply `chmod 600` or `400` for security reasons.\\n\"},{\"path\":\"instance-administration/notifications\",\"content\":\"---\\ntitle: Notifications\\nurl: /instance-administration/notifications/\\n---\\nAt the end of each analysis, notifications are computed for each subscribed user. Then, asynchronously, these notifications are sent via email.\\n\\nTo set the frequency with which the notification queue is processed, set `the sonar.notifications.delay` property (in seconds) in _$SONARQUBE-HOME/conf/sonar.properties_. The server must be restarted for the new value to be taken into account.\\n\\n## Who gets notifications\\nOnly users who subscribe themselves will get notifications. With only one exception, there is no admin functionality to proactively subscribe another user. If you believe a user should be receiving notifications, then it's time to practice the gentle art of persuasion.\\n\\n### The exception\\n\\nNotifications will automatically (without user opt-in) be sent to users with Quality Profile Administration rights when built-in quality profiles are updated. These updates can only happen through updating SonarQube or updating a third-party analyzer. This type of notification is on by default, and can be toggled globally in **[Administration > General Settings > General](/#sonarqube-admin#/admin/settings/)**.\\n\\n## Email Configuration\\nTo configure the email server, go to **[Administration > General Settings > Email](/#sonarqube-admin#/admin/settings)**.\\n\\nCheck also the Server base URL property at Administration > General Settings > General to make sure that links in those notification emails will redirect to the right SonarQube server URL.\\n\"},{\"path\":\"instance-administration/plugin-version-matrix\",\"content\":\"---\\ntitle: Plugin Version Matrix\\nurl: /instance-administration/plugin-version-matrix/\\n---\\n\\n![(Supported by SonarSource)](https://update.sonarsource.org/plugins/onde-sonar-16.png) = Supported by SonarSource  \\n![(not compatible)](https://update.sonarsource.org/plugins/error.png) = Not compatible\\n\\n[Open in a new window](https://update.sonarsource.org/plugins/compatibility-matrix.html)\\n\\n<iframe src=\\\"https://update.sonarsource.org/plugins/compatibility-matrix.html\\\" height=\\\"3100\\\">Your browser does not support iframes.</iframe>\\n\"},{\"path\":\"instance-administration/project-move\",\"content\":\"---\\ntitle: Project Move\\nurl: /instance-administration/project-move/\\n---\\n\\nProject Move allows you to export a project from one SonarQube instance and import it into another SonarQube instance. To use Project Move, you must have the Administer permission on the project in the source instance, and access to the file systems of both instances.\\n\\n## When to use Project Move\\nProject Move can help you with the following situations:\\n\\n* You want to create a central SonarQube instance at enterprise level and you want to keep the history created on instances used previously at the team level.\\n* You want to consolidate your editions and move projects from a Community Edition instance to an [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html) instance or [above](https://redirect.sonarsource.com/editions/editions.html).\\n* Your company is acquiring another company that already has a central SonarQube instance.\\n* You are at a large company with several SonarQube instances and an application is transferred from one team to another.\\n\\n## Prerequisites\\nTo export your project's data from the source instance and then load it on the target instance, make sure the following are true.\\n\\nThe _target_ instance must:\\n\\n* Be [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html) or [above](https://redirect.sonarsource.com/editions/editions.html).\\n* Contain all of the plugins with the same versions as the source instance.  \\n\\n[[info]]\\n|The target instance can have additional plugins and languages that aren't in the source instance, but not the other way around. If your source instance has plugins that aren't in your target instance, either remove them and reanalyze your project or add them to your target instance.\\n\\nBoth instances must have:\\n\\n* The exact same SonarQube version\\n* The same custom metrics\\n* The same custom rules\\n\\n## How to export\\n_Your source instance can be Community Edition or above, but cannot have plugins or languages that are not in the target instance._\\n\\nOn the source instance:\\n* reanalyze the project one last time to make sure it is populated with data corresponding to your current SonarQube installation\\n* navigate to the project and at the project level, choose **Project Settings > Import / Export**\\n* click on the **Export** button to generate a zip file containing the settings and history of your Project (but not the source code). Note that if you need to change the Project's key, you must to do it before performing the export.\\n\\nA zip file containing all project data is generated in _$SONAR_SOURCE_HOME/data/governance/project_dumps/export/_ named _<project_key>.zip_\\n\\n## How to import\\n_Your target instance must be [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html) or [above](https://redirect.sonarsource.com/editions/editions.html)._\\n\\nOn the target instance:\\n\\n* With a user having the \\\"Administer System\\\" and \\\"Create Projects\\\" permissions, go to [**Administration > Projects > Management**](/#sonarqube-admin#/admin/projects_management/) and [provision the project](/project-administration/project-existence/) using the same key the project had in the source instance.\\n* Configure the Project's permissions, and the Quality Profiles and Quality Gate associated to the Project\\n* Put the generated zip file into the directory `$SONAR\\\\_TARGET\\\\_HOME/data/governance/project_dumps/import`. You need to create the `governance/project_dumps/import` folders the first time. \\n* Go to the Project's Home Page and choose **Project Settings > Import / Export**\\n* Click on the Import button to start importing your data\\n* Source code is not included in the zip file. Once the import is finished, trigger an analysis to import source files into the new instance.\\n\\nNotes:\\n\\n* If the import is successful, the zip file will automatically be deleted.\\n* It is not possible to import a project that has been already analyzed on the target instance.\\n* Security reports in an imported project will be empty until an analysis has run.\\n\"},{\"path\":\"instance-administration/quality-profiles\",\"content\":\"---\\ntitle: Quality Profiles\\nurl: /instance-administration/quality-profiles/\\n---\\n\\n**Quality Profiles** are a core component of SonarQube where you define sets of [**Rules**](/user-guide/rules/) that, when violated, raise issues on your codebase (example: Methods should not have a Cognitive Complexity higher than 15). Each individual language has its own Quality Profile.\\n\\nTo manage Quality Profiles, navigate to the [**Quality Profiles**](/#sonarqube#/profiles) page. Here, you'll find the Quality Profiles grouped by language.\\n\\nIdeally, all of your projects will be measured with the same Quality Profile, but that isn't _always_ practical. For example, you might run into the following situations:\\n\\n- You have different technical requirements from one project to another (for example, different rules might apply to a threaded/non-threaded Java application).\\n- You want to ensure stronger requirements for some of your projects (for example, internal frameworks).\\n\\nYou can define as many Quality Profiles as needed to fit your specific needs.\\n\\n## Default Quality Profiles\\n\\nEach language must have a default Quality Profile (marked with the Default tag). Projects that are not explicitly assigned to specific Quality Profiles are analyzed using the default Quality Profiles. There is also at least one built-in **Sonar way** Quality Profile for each language. SonarSource creates these Quality Profiles with rules that generally apply to most projects. \\n\\nThe **Sonar way** Quality Profiles are a good starting point as you begin analyzing code, and they start out as the default Quality Profiles for each language. However, we recommend that you **Copy** this profile (see **Copying a profile** below) and begin to fine-tune the rules. Why?\\n\\n- Default Quality Profiles are not editable, so you won't be able to customize the **Sonar way** to your needs.\\n- The **Sonar way** becomes a baseline against which you can track your own Quality Profiles.\\n- The **Sonar way** may be updated over time to adjust which rules are included and adjust rule severities.\\n\\n## Quality Profile permissions\\n\\nBy default, only users with the global **Administer Quality Profiles** permission can edit Quality Profiles. This is set at **Administration > Security > Global Permissions**.\\n\\nSonarQube also allows users with the global **Administer Quality Profiles** permission to give an expert or group of experts permission to manage a specific Quality Profile. These experts only have permission for that Quality Profile, not all Quality Profiles. Grant permissions to specific Quality Profiles on the Quality Profile's page (**Quality Profiles > [Quality Profile name]**) under the **Permissions** heading by clicking the **Grant permissions to more users** button.\\n\\n## Copying a Quality Profile\\nCopying a profile works well when you need to make a few changes to a built-in profile. When you copy a profile, you start off with all of the activated rules from the profile you copied from. From here, you can activate or deactivate rules to fit your needs. After copying a profile, your new profile won't inherit any changes made to the original profile.\\n\\nFollow these steps to copy a profile: \\n\\n1. Go to the Quality Profile page (**Quality Profiles > [ Profile Name ]**) of the profile you want to copy.\\n1. Select **Copy** from the ![Settings drop-down](/images/gear.png) drop-down menu  in the upper-right corner of the page. \\n1. Give your new Quality Profile a name and click **Copy**\\n\\n## Extending a Quality Profile\\nExtending a profile works well when many or all of your projects follow a set of common rules, but some of your projects also need to follow additional rules. When you extend a profile, you create a child profile based on a parent profile. This child profile inherits all of the rule settings from the parent profile. If rules are activated or deactivated in the parent profile, they're activated or deactivated in the child profile. \\n\\nWhile you can activate rules in your child profile that are deactivated in the parent profile, you cannot deactivate rules in the child profile that are active in the parent profile.\\n\\nFollow these steps to extend a profile:\\n\\n1. Create a base profile with your core set of rules by clicking the **Create** button on the **Quality Profiles** page, or use an existing profile as a base profile.\\n1. From the **Quality Profiles** page (**Quality Profiles > [ Profile Name ]**), find your base profile in the list of Quality Profiles and select **Extend** from the ![Settings drop-down](/images/gear.png) drop-down menu.\\n1. After giving your new profile a name, SonarQube opens your new profiles page. \\n1. Below the **Rules** table, click **Activate More** to add rules to your extended profile. \\n1. From the **Inheritance** table, you can see the hierarchy of inheritance for your profile, and you can change the parent profile by clicking the **Change Parent** button. \\n\\nYour new profile has all of the activated rules from the profile you copied, but you can activate or deactivate any rules from the **Rules** table by clicking the numbers in the **Active** and **Inactive** columns. \\n\\nWhen you copy a profile, your new profile does not inherit any future rule updates made to the original profile. \\n\\n## Comparing two Quality Profiles\\nYou can compare the activated rules between two Quality Profiles. This is especially useful when you're using a Quality Profile copied from another profile as you won't automatically inherit new rules added to the original Quality Profile. Comparing your custom Quality Profile to the original Quality Profile shows any additional activated rules that aren't in your Quality Profile.\\n\\nTo compare two profiles:\\n\\n1. From the **Quality Profiles** page, click the name of the first Quality Profile you'd like to compare. \\n1. Select **Compare** from the ![Settings drop-down](/images/gear.png) drop-down menu. \\n1. Select the second Quality Profile you'd like to compare from the **Compare with** drop-down menu.\\n\\nFrom here you can activate rules between the two profiles using the ![Activate rule right](/images/activate_rule_compare1.png) buttons.\\n\\n## Knowing what's changed in a Quality Profile\\nWhen SonarQube notices that an analysis was performed with a Quality Profile that is different in some way from the previous analysis, a Quality Profile event is added to the project's event log. To see the changes in a profile, navigate to the profile (**Quality Profiles > [ Profile Name ]**) and choose **Changelog**. This may help you understand how profile changes impact the issues raised in an analysis.\\n\\nAdditionally, users with Quality Profile administration privileges are notified by email each time a built-in profile is updated. These updates can be caused by updating SonarQube or updating third-party analyzers.\\n\\n## Using a Quality Profile on another SonarQube instance\\nTo use a profile from one SonarQube instance on another SonarQube instance, take the following steps:\\n\\n1. From the source SonarQube instance, open the Quality Profile you want to use. \\n1. Select **Back up** from the ![Settings drop-down](/images/gear.png) drop-down menu. This exports the profile as an XML file.\\n1. From the target SonarQube instance, click the **Restore** button on the **Quality Profiles** main page.\\n1. Choose the XML file that you exported previously, and click **Restore**.\\n\\n## Using a non-default profile on a project\\nOne profile for each language is marked as the default profile. Barring any other intervention, all projects that use that language will be analyzed with that profile. To have a project analyzed by a non-default profile instead, start from **Quality Profiles**, and click through on your target profile, then use the Projects part of the interface to manage which projects are explicitly assigned to the profile.\\n\\n## Ensuring your Quality Profile has all relevant new rules\\n\\nEach time a new SonarQube version is released, new rules are added. New rules won't appear automatically in your profile, however, unless you're using a built-in profile or a profile extended from a built-in profile (see the **Extending a profile** section above).\\n\\nIf you're not using a built-in profile, you can compare your profile to the built-in profile to see what new on-by-default rules you're missing (see the **Comparing two Quality Profiles** section above).\\n\\nAnother option is to go to the **Rules** page in SonarQube, and use the **Available Since** search facet to see what rules have been added to the platform since the day you upgraded.\\n\\nAnd finally, the **Quality Profiles** main page shows recently added rules in the **Recently Added Rules** section on the right side of the page.\\n\\n## Avoiding deprecated rules\\n\\nThe **Deprecated Rules** section of the **Rules** page is your first warning that a profile contains deprecated rules. This section with a pink background gives the total number of instances of deprecated rules that are currently active in profiles and a breakdown of deprecated rule count per profile. Clicking through here takes you to the **Rules** page to edit the profile in question.\\n\\nAlternately, you can perform a **Rules** search for the rules in a profile (either manually or by clicking through from the **Quality Profiles** page) and use the **Status** rule search facet to narrow the list to the ones that need attention.\\n\\n## Security\\n\\nThe Quality Profiles service can be accessed by any user (even anonymous users). All users can view every aspect of a Quality Profile. That means anyone can see which rules are included in a profile, which rules have been left out, how a profile has changed over time, and compare the rules in any two profiles.\\n\\nTo make rule profile changes (create, edit, or delete) users must be granted the **Administer Quality Profiles and Gates** permission.\\n\\nA **project administrator** can choose which profiles their project is associated with. See Project Settings for more.\\n\"},{\"path\":\"instance-administration/security\",\"content\":\"---\\ntitle: Security\\nurl: /instance-administration/security/\\n---\\n\\n## Overview\\n\\nSonarQube comes with a number of global security features:\\n\\n* on-board authentication and authorization mechanisms\\n* the ability to force users to authenticate before they can see any part of a SonarQube instance\\n* the ability to delegate to authentication (for more see [Delegating Authentication](/instance-administration/delegated-auth/))\\n\\nAdditionally, you can configure at a group or user level who can:\\n* see that a project even exists\\n* access a project's source code \\n* administer a project (set exclusion patterns, tune plugin configuration for that project, etc.)\\n* administer Quality Profiles, Quality Gates, and the SonarQube instance itself.\\n\\nAnother aspect of security is the encryption of settings such as passwords. SonarQube provides a built-in mechanism to encrypt settings.\\n\\n## Authentication\\n\\nBy default, SonarQube forces user authentication. You can disable forced user authentication, and allow anonymous users to browse projects and run analyses in your instance. To do this, log in as a system administrator, go to **[Administration > Configuration > General Settings > Security](/#sonarqube-admin#/admin/settings?category=security)**, and disable the **Force user authentication** property. \\n\\n[[warning]]\\n| Disabling the **Force user authentication** can expose your SonarQube instance to security risks. We strongly recommend forcing user authentication on production instances or carefully configuring the security (user permissions, project visibility, etc.) on your instance.  \\n\\n### API Endpoints Authentication\\n\\nIf the **Force user authentication** property is set to false, the following API endpoints are accessible **without authentication** (click **API endpoints** below to expand the list):\\n\\n[[collapse]]\\n| ## API endpoints\\n|\\n| * api/components/search\\n| * api/issues/tags\\n| * api/languages/list\\n| * api/metrics/domains\\n| * api/metrics/search\\n| * api/metrics/types\\n| * api/plugins/installed\\n| * api/project_tags/search\\n| * api/qualitygates/list\\n| * api/qualitygates/search\\n| * api/qualitygates/show\\n| * api/qualityprofiles/backup\\n| * api/qualityprofiles/changelog\\n| * api/qualityprofiles/export\\n| * api/qualityprofiles/exporters\\n| * api/qualityprofiles/importers\\n| * api/qualityprofiles/inheritance\\n| * api/qualityprofiles/projects\\n| * api/qualityprofiles/search\\n| * api/rules/repositories\\n| * api/rules/search\\n| * api/rules/show\\n| * api/rules/tags\\n| * api/server/version\\n| * api/sources/scm (for public repositories)\\n| * api/sources/show (for public repositories)\\n| * api/system/db_migration_status\\n| * api/system/migrate_db\\n| * api/system/ping\\n| * api/system/status\\n| * api/system/upgrades\\n| * api/users/search\\n| * api/webservices/list\\n| * api/webservices/response_example\\n\\nWe advise keeping **Force user authentication** enabled if you have your SonarQube instance publicly accessible.\\n\\n### Authentication Mechanisms\\nAuthentication can be managed through a number of mechanisms:\\n\\n* Via the SonarQube built-in users/groups database\\n* Via external identity providers such as an LDAP server (including LDAP Service of Active Directory), GitHub etc. See the Authentication & Authorization section of the Plugin Library.\\n* Via HTTP headers\\n\\n### Technical Users\\nWhen you create a user in SonarQube's own database, it is considered local and will only be authenticated against SonarQube's own user/group database rather than against any external tool (LDAP, Active Directory, Crowd, etc.). By default `admin` is a local account.\\n\\nSimilarly, all non-local accounts will be authenticated only against the external tool. \\n\\nAn Administrator can manage tokens on a user's behalf via **[Administration > Security > Users](/#sonarqube-admin#/admin/users)**. From here, click in the user's **Tokens** column to see the user's existing tokens, and either revoke existing tokens or generate new ones. Once established, a token is the only credential needed to run an analysis. Tokens should be passed as the value of the `sonar.login` property.\\n\\n### Default Admin Credentials\\nWhen installing SonarQube, a default user with Administer System permission is created automatically:\\n\\n* Login: admin\\n* Password: admin\\n\\n## Reinstating Admin Access\\nIf you changed and then lost the `admin` password, you can reset it using the following query:\\n```\\nupdate users set crypted_password='100000$t2h8AtNs1AlCHuLobDjHQTn9XppwTIx88UjqUm4s8RsfTuXQHSd/fpFexAnewwPsO6jGFQUv/24DnO55hY6Xew==', salt='k9x9eN127/3e/hf38iNiKwVfaVk=', hash_method='PBKDF2', reset_password='true', user_local='true' where login='admin';\\n```\\nIf you've deleted `admin` and subsequently locked out the other users with global administrative permissions, you'll need to re-grant `admin` to a user with the following query:\\n```\\nINSERT INTO user_roles(uuid, user_uuid, role) \\nVALUES ('random-uuid',\\n(select uuid from users where login='mylogin'), \\n'admin');\\n```\\n\\n## Authorization\\nThe way authorization is implemented in SonarQube is pretty standard. It is possible to create as many users and groups of users as needed. The users can then be attached (or not) to (multiple) groups. Groups and/or users are then given (multiple) permissions. The permissions grant access to projects, services, and functionalities.\\n\\nTo administer groups and users, choose **Administration > Security**, and use the sub-menu items.\\n\\n### User\\nMultiple integrations that allow the delegation of authentication are available (see the [Plugin Version Matrix](/instance-administration/plugin-version-matrix/)), but you can manually create and edit users at **[Settings > Security > Users](/#sonarqube-admin#/admin/users)**. For manually-created users, login and password can be set at creation. Manually-created users can edit their passwords.\\n\\nDuring both user creation and edit, you can set an account's screen name, email address. User login and email address will be implicitly recognized by the Issue Assignment feature as SCM accounts if applicable, but you can set additional SCM accounts explicitly. \\n\\n### Group\\nA group is a set of users.\\n\\nTo administer groups, go to **[Administration > Security > Groups](/#sonarqube-admin#/admin/groups)**.\\n\\nTo edit the membership of a group, click the icon next to the membership total.\\n\\nTwo groups have a special meaning:\\n\\n* **Anyone** is a group that exists in the system, but that cannot be managed. Every user belongs to this group, including anonymous users.\\n* **sonar-users** is the default group to which users are automatically added.\\n\\n### Global Permissions\\nTo set global permissions, log in as a System administrator and go to **[Administration > Security > Global Permissions](/#sonarqube-admin#/admin/permissions)**. \\n\\n* **Administer System**: All administration functions for the instance: global configuration.\\n* **Administer Quality Profiles**: Any action on Quality Profiles, including delegating permissions to specific Quality Profiles.\\n* **Administer Quality Gates**: Any action on Quality Gates, including delegating permissions to specific Quality Gates.\\n* **Execute Analysis**:  Access to all settings required to perform analysis and the ability to push analysis results to the SonarQube server. This includes private project settings but excludes secured settings like passwords.\\n* **Create Projects**: Initialize the structure of a new project before its first analysis. This permission is also required when doing the very first analysis of a project that has not already been created via the GUI. * **\\n* **Create Applications**: Create a new Application. * **\\n* **Create Portfolios**: Create a new Portfolio. * **\\n\\n\\\\* Users with any explicit create permission will see a \\\"+\\\" item in the top menu giving access to these functions. If these permissions are removed from global administrators, they will lose quick access to them via the \\\"+\\\" menu, **but retain access to creation** via the **Administration** menu.\\n\\n** Creating an item does not automatically grant rights to administer it. For that, see _Creators permission_ below.\\n\\n### Project Permissions\\nProject permissions are available from the project-level Administration menu: **Project Settings > Permissions**.\\n\\nProject visibility may be toggled between public or private. Making a project private hides its source code and measures from the `Anyone` group. For both public and private projects, four different permissions can be set:\\n\\n* **Administer Issues**: Change the type and severity of issues, resolve issues as being \\\"Won't Fix\\\" or \\\"False Positive\\\" (users also need \\\"Browse\\\" permission).\\n* **Administer Security Hotspots**: Change the status of a Security Hotspot.\\n* **Administer**: Access project settings and perform administration tasks (users also need \\\"Browse\\\" permission).  \\n  By default, a user with this **Administer** permission can manage both configuration and permissions for the current project. To only allow project administrators to update the project configuration, go to **[Administration > Configuration > General Settings > Security](/#sonarqube-admin#/admin/settings?category=security)** and disable the **Enable permission management for project administrators** property.\\n* **Execute Analysis**: Access to all settings required to perform analysis and the ability to push analysis results to the SonarQube server. This includes private project settings but excludes secured settings like passwords.\\n\\nPrivate projects have two additional permissions:\\n* **Browse**: Access a project; browse its measures, issues, and Security Hotspots; perform some issue edits (confirm/resolve/reopen, assignment, comment); comment on or change the user assigned to a Security Hotspot.\\n* **See Source Code**: View the project's source code.\\n\\nNote that permissions _are not_ cumulative. For instance, if you want to be able to administer the project, you also have to be granted the Browse permission to be able to access the project (which is the default for public projects).\\n\\nYou can either manually grant permissions for each project to some users and groups or apply permission templates to projects. \\n\\n## Permission Templates for Default Permissions\\nSonarQube ships with a default permissions template, which automatically grants specific permissions to certain groups when a project, portfolio, or application is created. It is possible to edit this template and to create additional templates. A separate template can be set for each type of resource. Further, for projects, you can have a template apply only to a subset of new projects using a project key regular expression (the template's **Project Key Pattern**). By default, every new project with a key that matches the supplied pattern will have the template's permissions applied.\\n\\nTemplates are empty immediately after creation. Clicking on the template name will take you to its permission editing interface.\\n\\nTemplates are administered through **[Administration > Security > Permission Templates](/#sonarqube-admin#/admin/permission_templates)**.\\n\\n### Creators permissions\\n**Creators** is a special group that appears only in the permission template editing interface. Any permissions assigned to this group will at the time of project/portfolio/application creation be granted to the single user account used to create the project. This allows SonarQube administrators to let users autonomously create and administer their own projects.\\n\\nWhile templates can be applied after project creation, applying a template that includes \\\"Creators\\\" permissions to an existing project/portfolio/application will not grant the relevant permissions to the project's original creator because that association is not stored.\\n\\n### Reset project permissions to a template\\nTo apply permission templates to projects go to **[Administration > Projects > Management](/#sonarqube-admin#/admin/projects_management)**. You can either apply a template to a specific project using the project-specific **Actions > Apply Permission Template** option or use the Bulk Apply Permission Template to apply a template to all selected projects.\\n\\nNote that there is no relation between a project and a permission template, meaning that:\\n* the permissions of a project can be modified after a permission template has been applied to this project\\n* none of the project permissions is changed when a permission template is modified\\n\\n## Settings Encryption\\nEncryption is mostly used to remove clear passwords from settings (database or SCM credentials for instance). The implemented solution is based on a symmetric key algorithm. The key point is that the secret key is stored in a secured file on disk. This file must be owned by and readable only by the system account that runs the SonarQube server.\\n\\nThe encryption algorithm used is AES with 256 bit keys.\\n\\n1. **Generate the secret key**  \\nA unique secret key must be shared between all parts of the SonarQube infrastructure. To generate it, go to **[Administration > Configuration > Encryption](/#sonarqube-admin#/admin/settings/encryption)** and click on Generate Secret Key.\\n1. **Store the secret key on the SonarQube server**  \\n   * Copy the generated secret key to a file on the machine hosting the SonarQube server. The default location is _~/.sonar/sonar-secret.txt_. If you want to store it somewhere else, set its path through the `sonar.secretKeyPath` property in _$SONARQUBE-HOME/conf/sonar.properties_\\n   * Restrict file permissions to the account running the SonarQube server (ownership and read-access only).\\n   * Restart your SonarQube server\\n1. **Generate the encrypted values of your settings**  \\nGo back to **[Administration > Configuration > Encryption](/#sonarqube-admin#/admin/settings/encryption)** and use the form that has been added to the interface to generated encrypted versions of your values.\\n![Encrypt values through the admin interface](/images/encrypt-value.png)\\n1. **Use the encrypted values in your SonarQube server configuration**  \\nEncrypted values can either be set in SonarQube or copied into _$SONARQUBE-HOME/conf/sonar.properties_:\\n   ```\\n   sonar.jdbc.password={aes-gcm}CCGCFg4Xpm6r+PiJb1Swfg==  # Encrypted DB password\\n   ...\\n   sonar.secretKeyPath=C:/path/to/my/secure/location/my_secret_key.txt\\n   ```\\n\"},{\"path\":\"instance-administration/system-info\",\"content\":\"---\\ntitle: Server Logs & System Info\\nurl: /instance-administration/system-info/\\n---\\n\\nThe System Info page is found at **[Administration > System](/#sonarqube-admin#/admin/system)**. It gives you access to detailed information on the state of your SonarQube instance. \\n\\n## System Info\\n\\nYou can browse details about your running instance on this page. \\n\\n### Download\\n\\nAdditionally, if you have a Support contract, you might be asked by a Support representative to send in your System Info, which can be downloaded from the page **[Administration > System](/#sonarqube-admin#/admin/system)** using the **\\\"Download System Info\\\"** button at the top.\\n\\n### Server Id\\nYour server id can be obtained from this page by expanding the **System** section. If you're running a commercial instance, you can also find this value on the License page (**[Administration > Configuration > License Manager](/#sonarqube-admin#/admin/extension/license/app)**)\\n\\n## Logs\\nServer-side logging is controlled by properties set in _$SONARQUBE-HOME/conf/sonar.properties_.\\n\\n4 logs files are created: one per SonarQube process.\\n\\n### Log Level\\nThe server-side log level can be customized via the `sonar.log.level` property. Supported values are:\\n\\n* **`INFO`** - the default\\n* **`DEBUG`** - for advanced logs.\\n* **`TRACE`** - show advanced logs and all SQL and Elasticsearch requests. `TRACE` level logging slows down the server environment, and should be used only for tracking web request performance problems.\\n\\n### Log Level by Process\\nThe server-side log level can be adjusted more precisely for the 4 processes of SonarQube Server via the following property:\\n\\n* **`sonar.log.level.app`** - for the Main process of SonarQube (aka WrapperSimpleApp, the bootstrapper process starting the 3 others) \\n* **`sonar.log.level.web`** - for the WebServer\\n* **`sonar.log.level.ce`** - for the ComputeEngineServer\\n* **`sonar.log.level.es`** - for the SearchServer\\n\\n### Log Rotation\\nTo control log rolling, use the `sonar.log.rollingPolicy`\\n\\n* **`time:[value]`** - for time-based rotation. For example, use `time:yyyy-MM-dd` for daily rotation, and * `time:yyyy-MM` for monthly rotation.\\n* **`size:[value]`** - for size-based rotation. For example, `size:10MB`.\\n* **`none`** - for no rotation. Typically this would be used when logs are handled by an external system like logrotate.\\n\\n`sonar.log.maxFiles` is the maximum number of files to keep. This property is ignored if `sonar.log.rollingPolicy=none`.\\n\\n#### **Wrapper Config**\\n\\nIf Sonarqube was started using the SonarQube wrapper (for example, by using the provided start and stop scripts), the log rotation of the main Process (sonar.log) needs to be defined in the `wrapper.conf`.  \\nBy Default, the wrapper will rotate the `sonar.log` file each day if there is new content to be logged.  \\n\\nThe log rotation in the wrapper can be fine-tuned with the following properties:\\n\\n* **`wrapper.logfile.maxsize=value[m for mb, k for kb]`**\\n* **`wrapper.logfile.maxfiles=value`**\\n* **`wrapper.logfile.rollmode=DATE|SIZE`**\\n\\n`wrapper.logfile.maxsize` and `wrapper.logfile.maxfiles` are only considered if `wrapper.logfile.rollmode` is set to `SIZE`.  \\nFor `wrapper.logfile.rollmode=DATE` to work properly, the file defined with the property `wrapper.logfile` needs to include a \\\"YYYYMMDD\\\" Token.\\n\\n### UI Access to Logs and Log Levels\\n\\nThe System Info page gives you the ability to download your instance's current log files (log files rotate on a regular basis), and to tune the log level via controls at the top of the page. Changes made here are temporary, and last only until the next time the instance is restarted, at which point the level will be reset to the more permanent value set in _$SONARQUBE-HOME/conf/sonar.properties_. Regardless, if you change your log level _from_ `INFO`, but sure to change it back as soon as is practical; log files can get very large very quickly at lower log levels.\\n\\n## Total Lines of Code\\nThe number of Lines of Code (for licensing purposes) in an instance can be found in the **System** section of the System Info page on, and on the License page (**[Administration > Configuration > License Manager](/#sonarqube-admin#/admin/extension/license/app)** in commercial editions. \\n\\nIf you're on a commercial edition and using Branch or PR analysis, rest assured that only lines from the single largest branch in a project are considered for licensing purposes. The Lines of Code in the rest of the branches are ignored.\\n\"},{\"path\":\"project-administration/managing-application\",\"content\":\"---\\ntitle: Managing Applications\\nurl: /project-administration/managing-applications/\\n---\\n\\n*Applications are available starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html).*\\n\\n## Permissions\\nThere are two levels of users with permissions for adding and editing Applications: users with the Create Applications permission and Global Administrators.  \\n\\n### Create Applications Permission\\nUsers with the Create Applications permission (granted at the global level at [Administration > Security > Global Permissions](/#sonarqube-admin#/admin/permissions)) can create Applications by clicking the **Create Application** button in the upper-right corner of the **Projects** homepage. \\n\\nUsers with the Create Applications permission can edit an individual Application definition from the Application-level **Portfolio Settings > Edit Definition** interface.\\n\\n### Global Administrators\\nStarting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html), Global Administrators have access to the overall Portfolio and Application administration interface at **[Administration > Configuration > Portfolios](/#sonarqube-admin#/admin/extension/governance/views_console)**. From this page, they can create and edit Applications. \\n\\nGlobal Administrators also have access to the Projects Management page at **[Administration > Projects > Management](/#sonarqube-admin#/admin/projects_management)**. Changing the selection mechanism on this page to \u201CPortfolios\u201D or \u201CApplications\u201D lets you manage the Portfolios or Applications of your SonarQube instance. The dropdown menu to the right of each item lets you edit permissions, apply Permission Templates, or restore access to a Portfolio or Application.\\n\\n## Populating Applications\\nOnce your Application exists, you can populate it with manually-selected projects. By default, the configuration interface shows the list of projects currently selected for the application. To add additional projects, choose the \\\"Unselected\\\" or \\\"All\\\" filter.\\n\\n## Creating Application Branches\\nOnce your Application is populated with projects, you can create application branches by choosing branches from the Application's component projects. This option is available in the Application's **Application Settings > Edit Definition** interface, or from the global administration interface.\\n\\n## Calculation\\nBy default, Applications are queued to be recalculated after each analysis of an included project. For each relevant Application, a \u201CBackground Task\u201D is created, and you can follow the progress on each in the **[Administration > Projects > Background Tasks](/#sonarqube-admin#/admin/background_tasks)** by looking at the logs available for each item.\\n\\n## Reindexing\\nDuring Elasticsearch reindexing due to disaster recovery or upgrading, Applications become available as they are indexed.\"},{\"path\":\"project-administration/managing-portfolios\",\"content\":\"---\\ntitle: Managing Portfolios\\nurl: /project-administration/managing-portfolios/\\n---\\n\\n*Portfolios are available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html).*\\n\\nThis page has information on managing and setting up Portfolios. For a general overview of Portfolios, see the [Portfolios](/user-guide/portfolios/) page in the User Guide.\\n\\n## Permissions\\n\\n### Creating Portfolios\\nUsers with the Create Portfolios permission and global administrators can create Portfolios:\\n\\n* **Create Portfolios permission** \u2013 Users with the Create Portfolios permission (granted at the global level at **Administration > Security > Global Permissions**) can create Portfolios by clicking the **Create Portfolio** button in the upper-right corner of the Portfolios homepage.\\n* **Global Administrators** \u2013 In addition to creating Portfolios from the Portfolios homepage, global administrators (with the global Administer System permission granted at [**Administration > Security > Global Permissions**](/#sonarqube-admin#/admin/permissions)) create portfolios from the overall Portfolio administration interface at **Administration > Configuration > Portfolios**.\\n\\n### Editing Portfolios\\nUsers need to have either **Administer** permissions for any Portfolios that they want to edit or the global **Administer System** permission.\\n\\n## Populating Portfolios\\nAfter you've created a portfolio, you can populate it with projects, applications, and other portfolios.\\n\\n[[info]]\\n|**Uniqueness in portfolios**<br/><br/>\\n|Project branches, applications, and portfolios can only appear once in any given hierarchy in order to avoid magnifying their impacts on aggregated ratings. The portfolio configuration interface has some logic to prevent obvious duplications (such as manually adding the same project). However, in case of more subtle duplications (for example, due to regular expression or other bulk definition), the calculation of that portfolio will fail with a helpful error message.\\n\\n### Adding another Portfolio to a Portfolio\\nTo add another Portfolio to your Portfolio, from **[Administration > Configuration > Portfolios](/#sonarqube-admin#/admin/extension/governance/views_console)** click the **Add Portfolio** button at the top of the third column, and choose:\\n\\n* **Standard** - This option allows you to create a new Portfolio from scratch and add it to the currently selected Portfolio. Once created, you can add projects, applications, and more layers of portfolios.\\n* **Local Reference** - This option allows you to reference an existing Portfolio in the currently selected Portfolio. Once added, it is not editable here, but must be chosen in the left-most column to be edited.\\n\\n### Adding a project to a Portfolio\\nTo add projects to a Portfolio, navigate to the Portfolio you want to add a project to. Select **Edit Definition** from **Portfolio Settings**. Click the pencil icon next to **Project selection mode**, and select one of the following options:\\n\\n* **Manual** \u2013 choose the projects individually.\\n* **Tags** - select one or more project tags. Projects with those tags will automatically be included in the Portfolio.\\n* **Regular Expression** \u2013 specify a regular expression and projects with a matching name OR key will be included.\\n* **All Projects** \u2013 choose this option to add all projects not already included in this Portfolio (directly or via  -Portfolio).\\n\\nBy default, adding a project to a portfolio shows the analysis of the project's main branch. See the following section if you want to select a non-main branch or multiple branches for your project.\\n\\n#### **Selecting specific project branches for your portfolio**\\nIn some situations, you may want to either monitor a project branch that's not your main branch or multiple project branches. For example:\\n\\n* Your project has multiple release branches, and you want to monitor them all in a Portfolio.\\n* Your project's main branch isn't your release branch, and you want to monitor your release branch in your Portfolio.\\n\\nTo specify a project branch or branches to monitor in your portfolios, you can do the following:\\n\\n* **Manual** \u2013 You can use manual selection to select one or multiple project branches. To do this: \\n   1. From the Portfolio you want to edit, go to **Portfolio Settings > Edit Definition**.\\n   2. Click the pencil icon next to the **Project selection mode**, set **Manual** as your **Project Selection Mode**, and click **Save**.\\n   3. click the pencil icon next to the project you want to monitor. \\n   4. Select the branches you want to monitor. If you don't select a branch, the main branch is selected by default.\\n   \\n* **Tags, Regular Expressions, All Remaining Projects** \u2013 To specify a branch to monitor in your portfolios using the tags, regular expressions, or all remaining projects options, do the following:\\n   1. From the Portfolio you want to edit, go to **Portfolio Settings > Edit Definition**. \\n   2. Click the pencil icon next to the **Project selection mode**, and select your desired **Project Selection Mode**.\\n   3. Enter the name of the branch you want to monitor in the **Branch selection** field, and click **Save**.\\n\\n### Adding Applications to a Portfolio\\nTo add an Application to a Portfolio, make sure your Application is [already created](/user-guide/applications/). Then:\\n\\n1. Navigate to the Portfolios configuration page by going to **[Administration > Configuration > Portfolios](/#sonarqube-admint#/admin/extension/governance/views_console/)**.\\n2. Select the Portfolio where you want to add your Application.\\n3. Click **Add Portfolio**.\\n4. Select **Local Reference**.\\n5. Choose your Application from the drop-down menu and click **Add**.\\n\\n## Calculation\\nBy default, Portfolios are queued to be recalculated after each analysis of an included project. For each relevant Portfolio, a \u201CBackground Task\u201D is created, and you can follow the progress on each in the **[Administration > Projects > Background Tasks](/#sonarqube-admin#/admin/background_tasks)** by looking at the logs available for each item.\\n\\nIf you're having performance issues related to the automatic recalculation of large portfolios, you can specify the hour(s) at which you want them to be recalculated at **[Administration > Portfolios > Recalculation](/#sonarqube-admin#/admin/settings?category=portfolios)**. Portfolios are queued to be recalculated at the beginning of the hour(s) that you specify.\\n\\n## Elasticsearch reindexing\\nDuring Elasticsearch reindexing due to disaster recovery or an upgrade, you won't have access to Portfolios until all projects are indexed.\\n\"},{\"path\":\"project-administration/managing-project-history\",\"content\":\"---\\ntitle: Managing Project History\\nurl: /project-administration/managing-project-history/\\n---\\n\\nOne of the most powerful features of {instance} is that it shows you not just your project health today, but how it has changed over time. It does that by selectively keeping data from previous analyses (see [Housekeeping](/instance-administration/housekeeping/)). It doesn't keep all previous analyses - that would bloat the database. Similarly, for the analyses it does keep, {instance} doesn't keep all the data. Once a project snapshot moves from the \\\"Last analysis\\\" (i.e. the most recent) to being part of the project's history, data below the project level is purged - again to keep from bloating the database.\\n\\nTypically these aren't things you need to even think about; {instance} just handles them for you. But occasionally you may need to remove a bad snapshot from a project's history or change the housekeeping algorithms.\\n\\n## Managing History\\nOccasionally, you may need to manually delete a project snapshot, whether because the wrong Quality Profile was used, or because there was a problem with analysis, and so on. Note that the most recent snapshot (labeled \\\"Last snapshot\\\") can never be deleted.\\n\\n[[warning]]\\n|**About deleting snapshots**<br/><br/>\\n|Deleting a snapshot is a 2-step process:<br/><br/>\\n|* The snapshot must first be removed from the project history by clicking on Delete snapshot. It won't be displayed anymore on this History page but will still be present in the database.\\n|* The snapshot is actually deleted during the next project analysis.\\n\\nAt project level, from the front page **Activity** list, choose **Show More** to see the full activity list.\\n\\nFor every snapshot, it is possible to manually:\\n\\n* Add, rename or remove a version\\n* Add, rename or remove an event\\n* Delete the snapshot\\n\"},{\"path\":\"project-administration/narrowing-the-focus\",\"content\":\"---\\ntitle: Narrowing the Focus\\nurl: /project-administration/narrowing-the-focus/\\n---\\n\\nIf SonarQube's results aren't relevant, no one will want to use it. That's why precisely configuring what to analyze for each project is a very important step. Doing so allows you to remove noise, like the issues and duplications marked on generated code, or the issues from rules that aren't relevant for certain types of files.\\n\\nSonarQube gives you several options for configuring exactly what will be analyzed. You can\\n\\n* completely ignore some files or directories\\n* exclude files/directories from Coverage calculations but analyze all other aspects\\n* exclude files/directories from Duplications detection but analyze all other aspects\\n* exclude files/directories from Issues detection (specific rules or all of them) but analyze all other aspects\\n\\nYou can make these changes globally or at a project level. At the global level, the navigation path is  **Administration > General Settings > Analysis Scope**. At the project level, the navigation path is **Project Settings > General Settings > Analysis Scope**\\n\\n## Patterns\\n\\nPaths are relative to the project base directory. The following wildcards can be used:\\n\\n* `*`\\t- Match zero or more characters  \\n* `**` - Match zero or more directories  \\n* `?` - Match a single character  \\n\\nRelative paths are based on the fully qualified name of the component.\\n\\nExample|Matches|Does not match\\n----|----|----\\n`**/*Bean.java`|org/sonar.api/MyBean.java <br/> org/sonar/util/MyOtherBean.java|org/sonar/util/MyDTO.java\\n`**/*Bean?.java`|org/sonar/util/MyOtherBean1.java|org/sonar/util/MyOtherBean.java <br/> org/sonar.api/MyBean.java <br/> org/sonar/util/MyDTO.java\\n`org/sonar/*`|org/sonar/MyClass.java <br/> org/sonar/MyOtherClass.java|org/sonar/util/MyClassUtil.java\\n`org/sonar/**/*`|org/sonar/MyClass.java <br/> org/sonar/MyOtherClass.java <br/> org/sonar/util/MyClassUtil.java|\\n\\n## Ignore Files\\nWe recommend that you exclude generated code, source code from libraries, etc. There are four different ways to narrow your analysis to the source code that will be relevant to the development team. You can combine them all together to tune your analysis scope. Additionally, we automatically exclude from analysis the files described in your projects' `.gitignore` files. This behavior can be disabled. See `sonar.scm.exclusions.disabled` in the [Analysis Parameters](/analysis/analysis-parameters/) page for details.\\n\\n### Source Directories\\nSet the [sonar.sources](/analysis/analysis-parameters/) property to limit the scope of the analysis to certain directories.\\n\\n### File Suffixes\\nFor most languages, you can restrict the scope of analysis to files matching a set of extensions. Go to **Project Settings > General Settings > [Language]** to set the File suffixes property.\\n\\n### Choosing Files\\nYour first line of defence having a well-defined set of files in your analysis is your `sonar.sources` value. For projects built and analyzed with Maven, Gradle, or MSBuild, this value is defined automatically with a generally thorough, yet sane value. For other projects, you want to make sure `sonar.sources` is set to your project _sub-directory_ that actually contains your source files. Setting it to `.` will cast a wider net than most people intend.\\n\\n![Set sonar.sources to the project sub-directory that contains your source files](/images/sources.jpg)\\n\\nOnce you've got all the files _in_ your analysis that you want, it's time to look at whether you have any files you'd rather leave _out_ of your analysis, such as JavaScript libraries, and generated files. Those can be handled with Exclusions. Specifying an exclusion means that everything under your `sonar.sources` directory will be included in analysis _except_ the files with paths that match your exclusion pattern.\\n\\n![Use exclusions to keep libraries and generated files out of analysis](/images/exclusions.jpg)\\n\\nTo use exclusions to analyze everything but the specified files, go to **Project Settings > General Settings > Analysis Scope > Files**.\\n\\n* **Source File Exclusions** - to exclude source code files\\n* **Test File Exclusions** - to exclude test files\\n\\nThe vast majority of needs are met simply by setting `sonar.sources` carefully. Most other needs are met with the addition of a few simple exclusions. In a few corner cases, it is necessary to be explicit about what's _included_ in analysis and leave out everything else, but that is not the normal case, and setting inclusions should not be the first thing you try when configuring a new project.\\n\\n![Use inclusions in the rare case that you want to analyze only a subset of files](/images/inclusions.jpg)\\n\\nTo use exclusions to analyze _only_ the specified subset(s) of files in `sonar.sources`, go to **Project Settings > General Settings > Analysis Scope > Files**.\\n\\n* **Source File Inclusions** \\n* **Test File Inclusions** \\n\\nYou can set these properties at both the project and global levels.\\n\\nSee the Patterns section below for more details on the syntax to use in these inputs.\\n\\n## Ignore Code Coverage\\n\\nYou can prevent some files from being taken into account for code coverage by unit tests.\\n\\nTo do so, go to **Project Settings > General Settings > Analysis Scope > Code Coverage** and set the *Coverage Exclusions* property. See the Patterns section for more details on the syntax.\\n\\n## Ignore Duplications\\n\\nYou can prevent some files from being checked for duplications.\\n\\nTo do so, go to **Project Settings > General Settings > Analysis Scope > Duplications** and set the *Duplication Exclusions* property. See the Patterns section for more details on the syntax.\\n\\n## Ignore Issues\\nYou can have SonarQube ignore issues on certain components and against certain coding rules. Go to **Project Settings > General Settings > Analysis Scope > Issues**.\\n\\nNote that the properties below can only be set through the web interface because they are multi-valued.\\n\\n### Ignore Issues on Files\\nYou can ignore all issues on files that contain a block of code matching a given regular expression.\\n\\nExample:\\n* *Ignore all issues in files containing \\\"@javax.annotation.Generated\\\"*  \\n`@javax\\\\.annotation\\\\.Generated`\\n\\n### Ignore Issues in Blocks\\nYou can ignore all issues on specific blocks of code, while continuing to scan and mark issues on the remainder of the file. Blocks to be ignored are delimited by start and end strings which can be specified by regular expressions (or plain strings).\\n\\nNotes:\\n\\n* If the first regular expression is found but not the second one, the end of the file is considered to be the end of the block.\\n* Regular expressions are not matched on a multi-line basis.\\n\\n### Ignore Issues on Multiple Criteria\\nYou can ignore issues on certain components and for certain coding rules. To list a specific rule, use the fully qualified rule ID.\\n\\n[[info]]\\n| You can find the fully qualified rule ID on the Rule definition.\\n\\nExamples:\\n\\n* *Ignore all issues on all files*  \\nKEY = `*`  \\nPATH = `**/*`\\n* *Ignore all issues on COBOL program \\\"bank/ZTR00021.cbl\\\"*  \\nKEY = `*`  \\nPATH = `bank/ZTR00021.cbl`  \\n* *Ignore all issues on classes located directly in the Java package \\\"com.foo\\\", but not in its sub-packages*  \\nKEY = `*`  \\nPATH = `com/foo/*`\\n* *Ignore all issues against coding rule \\\"cpp:Union\\\" on files in the directory \\\"object\\\" and its sub-directories*  \\nKEY = `cpp:Union`  \\nPATH = `object/**/*`  \\n\\n### Restrict Scope of Coding Rules\\n\\nYou can restrict the application of a rule to only certain components, ignoring all others.\\n\\nExamples:\\n\\n* *Only check the rule \\\"Magic Number\\\" on \\\"Bean\\\" objects and not on anything else*  \\nKEY = `checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck`  \\nPATH = `**/*Bean.java`\\n* *Only check the rule \\\"Prevent GO TO statement from transferring control outside current module on COBOL programs\\\" located in the directories \\\"bank/creditcard\\\" and \\\"bank/bankcard\\\". This requires two criteria to define it:*  \\nKEY #1 = `cobol:COBOL.GotoTransferControlOutsideCurrentModuleCheck`  \\nPATH #1 = `bank/creditcard/**/*`  \\nKEY #2 = `cobol:COBOL.GotoTransferControlOutsideCurrentModuleCheck`  \\nPATH #2 = `bank/bankcard/**/*`\\n\"},{\"path\":\"project-administration/new-code-period\",\"content\":\"---\\ntitle: Defining New Code\\nurl: /project-administration/new-code-period/\\n---\\n\\nDefining what is considered New Code is an important part of SonarQube's Clean as You Code approach to code quality and safety. By focusing on code that's been added or changed since your New Code definition, you can set consistent quality requirements and expectations. Your New Code will be issue free and you'll clean up the code you encounter along the way. For more information on New Code and why it's important, check out [Clean as You Code](/user-guide/clean-as-you-code/).\\n\\n## Setting your New Code definition\\n\\nYou can define New Code at the global, project, or branch level.\\n\\n- **Global level**  \\n   You can set a global New Code definition at [**Administration > Configuration > General Settings > New Code**](/#sonarqube-admin#/admin/settings?category=new_code_period/). What you define as New Code at the global level will be the default for your projects.\\n\\n- **Project level**  \\n   You can set a New Code definition for your project at **Project Settings > New Code**. What you define as New Code at the project level will be the default for the project's branches if you're using an edition that supports multiple branches (starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)).\\n\\n- **Branch level**  \\n   You can define New Code for each branch from the **Actions** column of the branches table on the project's **New Code** settings page if you're using an edition that supports multiple branches (starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)).\\n\\n## New Code definitions\\n\\nYou can define New Code as changes from a previous version, a specific analysis, a reference branch, or within a specific period (number of days):\\n\\n- **Previous Version** \u2013 Define New Code as any changes made in your project's current version. This works well for projects with regular versions or releases.\\n\\n   Available at the global, project, and branch level.\\n\\n- **Specific analysis** \u2013 Choose a previous analysis as your New Code definition. Any changes made since that analysis are considered New Code.\\n\\n   Available at the branch level starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) and the project level for community edition.\\n\\n[[info]]\\n| For Community Edition, past analysis is available at the project-level because Community Edition doesn't support multiple branches. Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), you can do this at the branch level, and each branch can be set to one of the branch's specific past analyses.\\n\\n- **Reference Branch** \u2013 Choose a specific branch to define your New Code. Any changes made from your reference branch are considered New Code.\\n\\n   Available at the project and branch level.\\n\\n- **Number of days** \u2013 Specify a number of days for a floating New Code period. For example, setting **Number of Days** to 30 creates a floating New Code period beginning 30 days from the current date.\\n  Available at the global, project, and branch level.\\n\"},{\"path\":\"project-administration/portfolio-pdf-configuration\",\"content\":\"---\\ntitle: PDF Reports\\nurl: /project-administration/portfolio-pdf-configuration/\\n---\\n\\n*PDF Reports are available as part of the [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html) and [above](https://www.sonarsource.com/plans-and-pricing/).*\\n\\nPDF reports give a periodic, high-level overview of the overall code quality and security of your projects, applications, or portfolios.\\n\\n## Project and Application PDF Reports\\n\\nUsers with access to a project or application can download a PDF report or subscribe to receive PDF reports from the **Project/Application PDF Report** drop-down menu in the upper-right corner of the project or application's home page. The frequency that you receive reports is set by a project or application administrator.\\n\\n### Changing PDF subscription frequency\\nUsers with administrative rights on a project or application can configure how frequently SonarQube sends PDF reports. You can change the frequency all projects and applications at a global level or for each project or application individually: \\n\\n- **Global-level** \u2013 To change the frequency setting globally, navigate to **Administration > General Settings > Governance**. Under **Project and Application PDF Reports**, select an option from the **PDF Reports Frequency** drop-down menu. \\n\\n- **Project-level** \u2013 To change the frequency setting for a specific project, navigate to the project's home page then **Project Settings > General Settings > Governance**. Under **Project and Application PDF Reports**, select an option from the **PDF Reports Frequency** drop-down menu.\\n\\n- **Application-level** \u2013 To change the frequency setting for a specific application, navigate to the application's home page then **Application Settings > Application Report Settings**, and select an option from the **Application Reports Frequency** drop-down menu.\\n\\nYou have the following options for subscription frequency:\\n\\n- **Daily** \u2013 report is sent on a daily basis.\\n- **Weekly** \u2013 report is sent on a weekly basis.\\n- **Monthly (default)** \u2013 report is sent on a monthly basis.\\n\\n### Temporary branches\\nYou cannot download or subscribe to a PDF report for a temporary branch. If you are unable to download or subscribe to a PDF report for a branch, go to **Project Settings > Branches & Pull Requests** and make sure that the **Keep when inactive** toggle is on for that branch.\\n\\n## Portfolio PDF Reports\\nUsers with access to a portfolio can download a PDF report or subscribe to receive PDF reports from the **Portfolio PDF Report** drop-down menu in the upper-right corner of the portfolio's home page. The frequency that you receive reports is set by a portfolio administrator. See the following section for more information.\\n\\n### Changing PDF subscription frequency\\nUsers with administrative rights on a portfolio can configure how frequently SonarQube sends PDF reports. You can change the frequency for all portfolios globally or for each portfolio individually. \\n\\n- **Global-level** \u2013 To change the frequency setting at a global level, navigate to **Administration > Portfolios**, and select an option from the **Frequency** drop-down menu. \\n\\n- **Portfolio-level** \u2013 To change the frequency setting for a specific portfolio, navigate to the portfolio's home page then **Portfolio Settings > Executive Report** and select an option under **Frequency**. \\n\\nYou have the following options for subscription frequency:\\n\\n- **Daily** \u2013 report is sent during the first portfolio calculation of the day (if any)\\n- **Weekly** \u2013 report is sent during the first portfolio calculation of the week (if any) from Monday\\n- **Monthly (default)** \u2013 report is sent during the first portfolio calculation of the month (if any), starting from the first day of the current month\\n\\n### Sending portfolio PDF reports to non-SonarQube users\\nUsers with administrative rights on a portfolio can send the portfolio PDF report to non-SonarQube users by adding their email in the **Other Recipients** field at **Portfolio Settings > Executive Report**.\"},{\"path\":\"project-administration/project-existence\",\"content\":\"---\\ntitle: Project Existence\\nurl: /project-administration/project-existence/\\n---\\n\\nTypically, projects are created during their first analysis and never deleted (because old software never dies). For atypical situations, there is the page at **[Administration > Projects > Management](/#sonarqube-admin#/admin/projects_management/)**, which allows you to manage project existence.\\n\\n## How do I provision a project before its first analysis?\\nProvisioning a project allows you to declare and configure it (define permissions, set Quality Profiles, etc.) before running the first analysis. To be able to provision projects, you have to be logged in and be granted the Provision Projects permission.\\n\\nTo provision a new project either use the '+' menu in the top menu or if you have global administration privileges, go to **[Administration > Projects > Management](/#sonarqube-admin#/admin/projects_management/)** and click on **Create Project**. The only required information is the key and the name of your project.\\n\\nOnce the project is provisioned, you can configure it (define permissions, set Quality Profiles, etc.), and when you're finished with the configuration, you can simply run the project's first analysis.\\n\\nYou can also provision and configure projects using the Web API.\\n\\n## How do I find provisioned projects (that haven't been analyzed yet)?\\nThe **[Projects Management](/#sonarqube-admin#/admin/projects_management/)** search interface includes a toggle to allow you to narrow your results on this page to only projects that have never been analyzed. From there you can deal with them on this page as a set, or click through to the individual project homepages for individual attention and administration.\\n\\n## How do I lock down permissions on a project? (Private vs Public)\\nBy default, any newly created project will be considered \\\"Public\\\". It means every SonarQube user, authenticated or not, will be able to:\\n\\n* **Browse**: Access a project, browse its measures, issues and perform some issue edits (confirm/resolve/reopen, assignment, comment).\\n* **See Source Code**: View the project's source code.\\n\\nIf you want to be sure only a limited list of Groups and Users can see the project, you need to mark it Private. Once a project is private you will be able to define which Groups and Users can **Browse** the project or **See Source Code**.\\n\\nIf you want all newly created projects to be considered \\\"Private\\\", you can change the default visibility in **[Administration > Projects > Management](/#sonarqube-admin#/admin/projects_management/)**.\\n\\n## How do I delete projects?\\nA project may be deleted individually from the Administration page of the project. See Project Settings for more details. To delete projects in bulk, use **[Administration > Projects > Management](/#sonarqube-admin#/admin/projects_management/)**. Here you can select the projects to delete. A deleted project is gone for good, there is no way to undo this action.\\n\\n## How do I find projects that are no longer analyzed?\\nThe **[Projects Management](/#sonarqube-admin#/admin/projects_management/)** search interface includes a date picker to help you find all projects last analyzed before your specified date. From there you can deal with them on this page as a set, or click through to the individual project homepages for individual attention and administration.\\n\"},{\"path\":\"project-administration/project-settings\",\"content\":\"---\\ntitle: Project Settings\\nurl: /project-administration/project-settings/\\n---\\n\\n## Tags\\n\\nProject tags allow you to categorize and group projects for easier selection on the **Projects** page. Project tags can be administered from the project home page. Administrators will see a dropdown menu indicator next to the project's list of current tags (or next to the \\\"No tags\\\" indicator). If the tag you want isn't visible in the dropdown, use the built in \\\"search\\\" input to find what you're looking for or create it on the fly.\\n\\n## Administration Items\\n\\nProject administration is accessible through the **Project Settings** menu of each project.  \\n\\nOnly project administrators can access project's settings (see [Authorization](/instance-administration/security/)).\\n\\n### Adding a Project\\n\\nA project is automatically added at its first analysis. Note that you can also [provision projects](/project-administration/project-existence/).\\n\\n### Analysis Report Processing\\n\\nA project-level Background Tasks page is available at **Project Settings > Background Tasks** to allow project administrators to check their projects' processing. It offers analysis report details and logs.\\n\\n### Deleting a Project\\n\\n#### **Deleting a Single Project**\\n\\nYou can delete a project through **Project Settings > Deletion**.\\n\\n#### **Deleting Multiple Projects**\\nYou can also delete multiple projects simultaneously from the global **Project Settings > Projects > Management**.\\n\\n### Updating the Project Key  \\n\\nThe project key can be updated (without losing the history on the project) at **Project Settings > Update Key**.\\n\\nThe new key must contain at least one non-digit character. Allowed characters are: 'a' through 'z', 'A' through 'Z', '-' (dash), '\\\\_' (underscore), '.' (dot), ':' (colon) and digits '0' to '9'. This value is case-sensitive.\\n\\n### Default Issue Assignee\\n\\nWhen new issues are created during an analysis, they are assigned to the last committer where the issue was raised. When it is not possible to identify the last committer, issues can be assigned to a default assignee, at [Administration  > General Settings > Issues](/#sonarqube-admin#/admin/settings).\\n\\n### Setting Quality Gate and Quality Profiles  \\n\\nProject administrators can select which ...\\n\\n* Quality profiles (go to **Project Settings  > Quality Profiles**)\\n* Quality gate (go to **Project Settings  > Quality Gate**)\\n\\n... to use on their project.\\n\\n### Setting Exclusions  \\n\\nSee [Narrowing the Focus](/project-administration/narrowing-the-focus/).\\n\\n### Customizing Links\\n\\nOn top of standard links which may only be set as [Analysis Parameters](/analysis/analysis-parameters/), additional custom links can be added through the web interface (under **Project Settings > Links**). Those links will then be displayed in the [Project Page](/user-guide/project-page/).\\n\"},{\"path\":\"project-administration/webhooks\",\"content\":\"---\\ntitle: Webhooks\\nurl: /project-administration/webhooks/\\n---\\n\\nWebhooks notify external services when a project analysis is complete. An HTTP POST request including a JSON payload is sent to each URL. URLs may be specified at both the project and global levels. Project-level specification does not replace global-level webhooks. All hooks at both levels are called.\\n\\nThe HTTP(S) call:\\n\\n* is made regardless of the status of the Background Task\\n* includes a JSON document as payload, using the POST method\\n* has a content type of \\\"application/json\\\", with UTF-8 encoding\\n\\n## Configuration\\n\\nYou can configure up to 10 webhooks at the project level in **Project Settings > Webhooks**.\\n\\nAn additional set of 10 webhooks can be configured at the global level in **Administration > Configuration > Webhooks**.\\n\\nIf configured, all 20 will be executed.\\n\\n## Delivery and Payload\\n\\n### Delivery\\n\\nThe Webhook administration console shows the result and timestamp of the most recent delivery of each webhook with the payload available via the list icon. Results and payloads of earlier deliveries are available from the tools menu to the right of each webhook.\\n\\nResponse records are purged after 30 days.\\n\\nThe URL must respond within 10 seconds or the delivery is marked as failed.\\n\\n### Payload\\n\\nAn HTTP header \\\"X-SonarQube-Project\\\" with the project key is sent to allow quick identification of the project involved.\\n\\nThe Payload is a JSON document which includes:\\n\\n* when the analysis was performed: see \\\"analysedAt\\\"\\n* the identification of the project analyzed: see \\\"project\\\"\\n* each Quality Gate criterion checked and its status: see \\\"qualityGate\\\"\\n* the Quality Gate status of the project: see \\\"qualityGate.status\\\"\\n* the status and the identifier of the Background Task : see \\\"status\\\" and \\\"taskId\\\"\\n* user-specified properties: see \\\"properties\\\"\\n\\n#### Example\\n\\n```\\n{\\n    \\\"serverUrl\\\": \\\"http://localhost:9000\\\",\\n    \\\"taskId\\\": \\\"AVh21JS2JepAEhwQ-b3u\\\",\\n    \\\"status\\\": \\\"SUCCESS\\\",\\n    \\\"analysedAt\\\": \\\"2016-11-18T10:46:28+0100\\\",\\n    \\\"revision\\\": \\\"c739069ec7105e01303e8b3065a81141aad9f129\\\",\\n    \\\"project\\\": {\\n        \\\"key\\\": \\\"myproject\\\",\\n        \\\"name\\\": \\\"My Project\\\",\\n        \\\"url\\\": \\\"https://mycompany.com/sonarqube/dashboard?id=myproject\\\"\\n    },\\n    \\\"properties\\\": {\\n    },\\n    \\\"qualityGate\\\": {\\n        \\\"conditions\\\": [\\n            {\\n                \\\"errorThreshold\\\": \\\"1\\\",\\n                \\\"metric\\\": \\\"new_security_rating\\\",\\n                \\\"onLeakPeriod\\\": true,\\n                \\\"operator\\\": \\\"GREATER_THAN\\\",\\n                \\\"status\\\": \\\"OK\\\",\\n                \\\"value\\\": \\\"1\\\"\\n            },\\n            {\\n                \\\"errorThreshold\\\": \\\"1\\\",\\n                \\\"metric\\\": \\\"new_reliability_rating\\\",\\n                \\\"onLeakPeriod\\\": true,\\n                \\\"operator\\\": \\\"GREATER_THAN\\\",\\n                \\\"status\\\": \\\"OK\\\",\\n                \\\"value\\\": \\\"1\\\"\\n            },\\n            {\\n                \\\"errorThreshold\\\": \\\"1\\\",\\n                \\\"metric\\\": \\\"new_maintainability_rating\\\",\\n                \\\"onLeakPeriod\\\": true,\\n                \\\"operator\\\": \\\"GREATER_THAN\\\",\\n                \\\"status\\\": \\\"OK\\\",\\n                \\\"value\\\": \\\"1\\\"\\n            },\\n            {\\n                \\\"errorThreshold\\\": \\\"80\\\",\\n                \\\"metric\\\": \\\"new_coverage\\\",\\n                \\\"onLeakPeriod\\\": true,\\n                \\\"operator\\\": \\\"LESS_THAN\\\",\\n                \\\"status\\\": \\\"NO_VALUE\\\"\\n            }\\n        ],\\n        \\\"name\\\": \\\"SonarQube way\\\",\\n        \\\"status\\\": \\\"OK\\\"\\n    }\\n}\\n```\\n\\n## Securing your webhooks\\n\\nAfter you've configured your server to receive payloads, you want to be sure that the payloads you receive are initiated by {instance} and not by hackers. You can do this by validating a hash signature that ensures that requests originate from {instance}. \\n\\n### Setting your secret\\n\\nTo set your secret in {instance}:\\n\\n1. From the project or organization where you're securing your webhooks, navigate to the webhooks settings at **Project Settings > Webhooks**\\n1. You can either click **Create** to create a new webhook or click an existing webhook's settings drop-down and click **Update**.\\n1. Enter a random string in the **Secret** text box. This is used as the key to generate the HMAC hex digest value in the `X-Sonar-Webhook-HMAC-SHA256` header.\\n1. Click **Update**. \\n\\n### Validating {instance} Payloads\\n\\nAfter setting your secret, it's used by {instance} to create a hash signature with each payload that's passed using the `X-Sonar-Webhook-HMAC-SHA256` HTTP header. The header value needs to match the signature you are expecting to receive. {instance} uses a HMAC lower-case SHA256 digest to compute the signature of the request body. Here's some sample Java code for your server:\\n\\n```\\nprivate static boolean isValidSignature(YourHttpRequest request) {\\n  String receivedSignature = request.getHeader(\\\"X-Sonar-Webhook-HMAC-SHA256\\\");\\n  // See Apache commons-codec\\n  String expectedSignature = new HmacUtils(HmacAlgorithms.HMAC_SHA_256, \\\"your_secret\\\").hmacHex(request.getBody())\\n  return Objects.equals(expectedSignature, receivedSignature);  \\n}\\n```\\n\\nIf the signatures don't match, then the payload should be ignored.\\n\\n## Additional parameters\\n\\nA basic authentication mechanism is supported by providing user/password in the URL of the Webhook such as `https://myLogin:myPassword@my_server/foo`.\\n\\nIf you provide additional properties to your SonarScanner using the pattern `sonar.analysis.*`, these properties will be automatically added to the section \\\"properties\\\" of the payload.\\n\\nFor example these additional parameters:\\n\\n```\\nsonar-scanner -Dsonar.analysis.buildNumber=12345\\n```\\n\\nWould add this to the payload:\\n\\n```\\n\\\"properties\\\": {\\n  \\\"sonar.analysis.buildNumber\\\": \\\"12345\\\"\\n}\\n```\\n\"},{\"path\":\"requirements/hardware-recommendations\",\"content\":\"---\\ntitle: Hardware Recommendations\\nurl: /requirements/hardware-recommendations/\\n---\\n## Database\\nWe recommend that for large instances, the database used by SonarQube is hosted on a machine that is physically separate from SonarQube Server but close to it on the network.\\n\\n### Oracle\\nIn case your SonarQube Server is running on Linux and you are using Oracle, the Oracle JDBC Driver may be blocked due to /dev/random. See [this Oracle article](http://www.usn-it.de/index.php/2009/02/20/oracle-11g-jdbc-driver-hangs-blocked-by-devrandom-entropy-pool-empty/) for more details about this problem.\\n\\nTo avoid it, you may want to add this JVM parameter to your SonarQube Web Server (`sonar.web.javaOpts`) configuration :\\n ```\\n -Djava.security.egd=file:///dev/urandom\\n ```\\n\\n## Elasticsearch (ES)\\n* [Elasticsearch](https://www.elastic.co/) is used by SonarQube in the background in the SearchServer process. To ensure good performance of your SonarQube, you need to follow these recommendations that are linked to ES usage.\\n\\n### Disk\\n* Free disk space is an absolute requirement. ES implements a safety mechanism to prevent the disk from being flooded with index data that locks all indices in read-only mode when a 95% disk usage watermark is reached. For information on recovering from ES read-only indices, see the [Troubleshooting](/setup/troubleshooting/) page.\\n* Disk can easily become the bottleneck of ES. If you can afford SSDs, they are by far superior to any spinning media. SSD-backed nodes see boosts in both query and indexing performance. If you use spinning media, try to obtain the fastest disks possible (high-performance server disks 15k RPM drives).\\n* Using RAID 0 is an effective way to increase disk speed, for both spinning disks and SSD. There is no need to use mirroring or parity variants of RAID because of Elasticsearch replicas and database primary storage.\\n* Do not use remote-mounted storage, such as NFS, SMB/CIFS or network-attached storage (NAS). They are often slower, display larger latencies with a wider deviation in average latency, and are a single point of failure.\\n\\n**Advanced**\\n* If you are using SSD, make sure your OS I/O Scheduler is configured correctly. When you write data to disk, the I/O Scheduler decides when that data is actually sent to the disk. The default under most *nix distributions is a scheduler called cfq (Completely Fair Queuing). This scheduler allocates \\\"time slices\\\" to each process, and then optimizes the delivery of these various queues to the disk. It is optimized for spinning media: the nature of rotating platters means it is more efficient to write data to disk based on physical layout. This is very inefficient for SSD, however, since there are no spinning platters involved. Instead, deadline or noop should be used. The deadline scheduler optimizes based on how long writes have been pending, while noop is just a simple FIFO queue. This simple change can have dramatic impacts.\\n* If SQ home directory is located on a slow disk, then the property `sonar.path.data` can be used to move data to a faster disk (RAID 0 local SSD for instance).\\n\\n### Memory\\n* Machine available memory for OS must be at least the Elasticsearch heap size. The reason is that Lucene (used by ES) is designed to leverage the underlying OS for caching in-memory data structures. That means that by default OS must have at least 1Gb of available memory.\\n* Don't allocate more than 32GB. See the following Elasticsearch articles for more details:\\n  * [Elasticsearch Guide: Heap Sizing](https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html)\\n  * [A Heap of Trouble](https://www.elastic.co/blog/a-heap-of-trouble)\\n  * [Elasticsearch Reference: JVM heap size](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/advanced-configuration.html#set-jvm-heap-size)\\n\\n### CPU\\n* If you need to choose between faster CPUs or more cores, then choose more cores. The extra concurrency that multiple cores offer will far outweigh a slightly faster clock speed.\\n* By nature, data is distributed on multiple nodes, so execution time depends on the slowest node. It's better to have multiple medium boxes than one fast and one slow.\\n\"},{\"path\":\"requirements/requirements\",\"content\":\"---\\ntitle: Prerequisites and Overview\\nurl: /requirements/requirements/\\n---\\n## Prerequisite\\nThe only prerequisite for running SonarQube is to have Java (Oracle JRE 11 or OpenJDK 11) installed on your machine.\\n\\n## Hardware Requirements\\n1. A small-scale (individual or small team) instance of the SonarQube server requires at least 2GB of RAM to run efficiently and 1GB of free RAM for the OS. If you are installing an instance for a large teams or Enterprise, please consider the additional recommendations below.\\n2. The amount of disk space you need will depend on how much code you analyze with SonarQube.\\n3. SonarQube must be installed on hard drives that have excellent read & write performance. Most importantly, the \\\"data\\\" folder houses the Elasticsearch indices on which a huge amount of I/O will be done when the server is up and running. Great read & write hard drive performance will therefore have a great impact on the overall SonarQube server performance.\\n4. SonarQube does not support 32-bit systems on the server side. SonarQube does, however, support 32-bit systems on the scanner side.\\n\\n### Enterprise Hardware Recommendations\\nFor large teams or Enterprise-scale installations of SonarQube, additional hardware is required. At the Enterprise level, [monitoring your SonarQube instance](/instance-administration/monitoring/) is essential and should guide further hardware upgrades as your instance grows. A starting configuration should include at least:\\n\\n* 8 cores, to allow the main SonarQube platform to run with multiple Compute Engine workers\\n* 16GB of RAM\\nFor additional requirements and recommendations relating to database and ElasticSearch, see [Hardware Recommendations](/requirements/hardware-recommendations/).\\n\\n## Supported Platforms\\n### Java\\nThe SonarQube scanners and the SonarQube server require Java version 11. Versions beyond Java 11 are not officially supported. \\n\\nSonarQube is able to analyze any kind of Java source files regardless of the version of Java they comply to. \\n\\nWe recommend using the Critical Patch Update (CPU) releases.\\n\\n| Java           | Server                    | Scanners                  |\\n| -------------- | ------------------------- | ------------------------- |\\n| Oracle JRE     | ![](/images/check.svg) 11 | ![](/images/check.svg) 11 |\\n|                | ![](/images/cross.svg) 8  | ![](/images/cross.svg) 8  |\\n| OpenJDK        | ![](/images/check.svg) 11 | ![](/images/check.svg) 11 |\\n|                | ![](/images/cross.svg) 8  | ![](/images/cross.svg) 8  |\\n\\n| Database                                                    |                                                                                                                                                                                                                                                                   |\\n| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| [PostgreSQL](http://www.postgresql.org/)                    | ![](/images/check.svg) 13                                                                                                                                                                                                                                         |\\n|                                                             | ![](/images/check.svg) 12                                                                                                                                                                                                                                         |\\n|                                                             | ![](/images/check.svg) 11                                                                                                                                                                                                                                         |\\n|                                                             | ![](/images/check.svg) 10                                                                                                                                                                                                                                         |\\n|                                                             | ![](/images/check.svg) 9.6                                                                                                                                                                                                                                         |\\n|                                                             | ![](/images/exclamation.svg) Must be configured to use UTF-8 charset                                                                                                                                                                                              |\\n| [Microsoft SQL Server](http://www.microsoft.com/sqlserver/) | ![](/images/check.svg) 2019 (MSSQL Server 15.0) with bundled Microsoft JDBC driver. Express Edition is supported.                                                                                                                                                 |\\n|                                                             | ![](/images/check.svg) 2017 (MSSQL Server 14.0) with bundled Microsoft JDBC driver. Express Edition is supported.                                                                                                                                                 |\\n|                                                             | ![](/images/check.svg) 2016 (MSSQL Server 13.0) with bundled Microsoft JDBC driver. Express Edition is supported.                                                                                                                                                 |\\n|                                                             | ![](/images/check.svg) 2014 (MSSQL Server 12.0) with bundled Microsoft JDBC driver. Express Edition is supported.                                                                                                                                                 |\\n|                                                             | ![](/images/exclamation.svg) Collation must be case-sensitive (CS) and accent-sensitive (AS) (example: `Latin1_General_CS_AS`)                                                                                                                                      |\\n|                                                             | ![](/images/exclamation.svg) `READ_COMMITTED_SNAPSHOT` must be set on the SonarQube database to avoid potential deadlocks under heavy load                                                                                                                          |\\n|                                                             | ![](/images/info.svg) Both Windows authentication (\u201CIntegrated Security\u201D) and SQL Server authentication are supported. See the Microsoft SQL Server section in Installing/installation/installing-the-server page for instructions on configuring authentication. |\\n| [Oracle](http://www.oracle.com/database/)                   | ![](/images/check.svg) 19C                                                                                                                                                                                                                                        |\\n|                                                             | ![](/images/check.svg) 18C                                                                                                                                                                                                                                        |\\n|                                                             | ![](/images/check.svg) 12C                                                                                                                                                                                                                                        |\\n|                                                             | ![](/images/check.svg) XE Editions                                                                                                                                                                                                                                |\\n|                                                             | ![](/images/exclamation.svg) Must be configured to use a UTF8-family charset (see `NLS_CHARACTERSET`)                                                                                                                                                               |\\n|                                                             | ![](/images/exclamation.svg) The driver ojdbc14.jar is not supported                                                                                                                                                                                              |\\n|                                                             | ![](/images/info.svg) We recommend using the latest Oracle JDBC driver                                                                                                                                                                                            |\\n|                                                             | ![](/images/exclamation.svg) Only the thin mode is supported, not OCI                                                                                                                                                                                             |\\n\\n### Web Browser\\nTo get the full experience SonarQube has to offer, you must enable JavaScript in your browser.\\n\\n| Browser                     |                                         |\\n| --------------------------- | --------------------------------------- |\\n| Microsoft Edge              | ![](/images/check.svg) Latest           |\\n| Mozilla Firefox             | ![](/images/check.svg) Latest           |\\n| Google Chrome               | ![](/images/check.svg) Latest           |\\n| Opera                       | ![](/images/exclamation.svg) Not tested |\\n| Safari                      | ![](/images/check.svg) Latest           |\\n\\n## Platform notes\\n### Linux\\nIf you're running on Linux, you must ensure that:\\n\\n* `vm.max_map_count` is greater than or equal to 524288\\n* `fs.file-max` is greater than or equal to 131072\\n* the user running SonarQube can open at least 131072 file descriptors\\n* the user running SonarQube can open at least 8192 threads\\n\\nYou can see the values with the following commands:\\n```\\nsysctl vm.max_map_count\\nsysctl fs.file-max\\nulimit -n\\nulimit -u\\n```\\n\\nYou can set them dynamically for the current session by running  the following commands as `root`:\\n```\\nsysctl -w vm.max_map_count=524288\\nsysctl -w fs.file-max=131072\\nulimit -n 131072\\nulimit -u 8192\\n```\\n\\nTo set these values more permanently, you must update either _/etc/sysctl.d/99-sonarqube.conf_ (or _/etc/sysctl.conf_ as you wish) to reflect these values.\\n\\nIf the user running SonarQube (`sonarqube` in this example) does not have the permission to have at least 131072 open descriptors, you must insert this line in _/etc/security/limits.d/99-sonarqube.conf_ (or _/etc/security/limits.conf_ as you wish):\\n```\\nsonarqube   -   nofile   131072\\nsonarqube   -   nproc    8192\\n```\\n\\nIf you are using `systemd` to start SonarQube, you must specify those limits inside your unit file in the section \\\\[service\\\\] :\\n```\\n[Service]\\n...\\nLimitNOFILE=131072\\nLimitNPROC=8192\\n...\\n```\\n\\n### seccomp filter\\nBy default, Elasticsearch uses [seccomp filter](https://www.kernel.org/doc/Documentation/prctl/seccomp_filter.txt). On most distribution this feature is activated in the kernel, however on distributions like Red Hat Linux 6 this feature is deactivated. If you are using a distribution without this feature and you cannot upgrade to a newer version with seccomp activated, you have to explicitly deactivate this security layer by updating `sonar.search.javaAdditionalOpts` in _$SONARQUBE_HOME/conf/sonar.properties_:\\n```\\nsonar.search.javaAdditionalOpts=-Dbootstrap.system_call_filter=false\\n```\\n\\nYou can check if seccomp is available on your kernel with:\\n```\\n$ grep SECCOMP /boot/config-$(uname -r)\\n```\\n\\nIf your kernel has seccomp, you will see:\\n```\\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\\nCONFIG_SECCOMP_FILTER=y\\nCONFIG_SECCOMP=y\\n```\\nFor more detail, see the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/breaking-changes-5.6.html).\\n\\n### Fonts\\nGenerating [Executive Reports](/project-administration/portfolio-pdf-configuration/) requires that fonts be installed on the server hosting SonarQube. On Windows servers, this is a given. However, this is not always the case for Linux servers.\\n\\nThe following should be ensured:\\n\\n* [Fontconfig](https://en.wikipedia.org/wiki/Fontconfig) is installed on the server hosting SonarQube\\n* A package of [FreeType](https://www.freetype.org/) fonts is installed on the SonarQube server. The exact packages available will vary by distribution, but a commonly used package is `libfreetype6`\\n\"},{\"path\":\"setup/analysis-with-java-11\",\"content\":\"---\\ntitle: Moving Analysis to Java 11\\nurl: /analysis/analysis-with-java-11/\\n---\\n\\nJava 11 is required for all scanners. If you're using a previous version of the Java, see the section below that aligns with your build for information on moving your analysis to Java 11.\\n\\n## Maven or Gradle\\n\\nWe suggest basing your whole build on Java 11. If that's not compatible, you can have a dedicated script for the analysis that overrides the `JAVA_HOME` environment variable just before running it. See the following examples:\\n\\n### Maven\\n\\n```\\nmvn verify ...\\nexport JAVA_HOME=/path/to/java11\\nmvn sonar:sonar ...\\n```\\n\\n### Gradle \\n\\n```\\ngradle build ...\\nexport JAVA_HOME=/path/to/java11\\ngradle sonarqube ...\\n```\\n\\n## Azure DevOps\\n\\nIf you are running your build with a Microsoft-hosted agent, this is already automatically done, and you're all set. \\n\\nIf you're using a self-hosted agent, you can either modify your build pipeline to ensure that it runs with Java 11 by default or override the `JAVA_HOME` environment variable just before running the analysis.\\n\\n### Xamarin\\nIn the specific case of Xamarin only allowing Java 8, you will need to specify a Java 8 path while invoking MSBuild, allowing the JAVA_HOME environment variable for the scanner only.\\n\\n```\\n$env:XAMARIN_JAVA_HOME=/path/to/java8\\nmsbuild.exe  /p:JavaSdkDirectory=$env:XAMARIN_JAVA_HOME\\n```\\n\\n## Dockerfile\\n\\nYou can use several base images to run your build with Java 11. Here are some examples:\\n\\n- openjdk:11-jre-slim\\n- debian:buster and above\\n- gradle:jre11-slim\\n\\nIf your build is not compatible with Java 11, you can override `JAVA_HOME` environment variable before running scanners.\\n\\n## Jenkins\\n\\nYou can easily define a new JDK version by navigating to **Manage Jenkins > Global Tool Configuration** if you have the [JDK Tool Plugin](https://plugins.jenkins.io/jdk-tool/) installed.\\n\\n### Declarative Pipelines\\n\\nIf you are using a declarative pipeline with different stages you can add a 'tools' section to the stage in which the code scan occurs. This makes the scanner use the specificed JDK version.\\n\\n```\\nstage('SonarQube analysis') {\\n    tools {\\n        jdk \\\"jdk11\\\" // the name you have given the JDK installation in Global Tool Configuration\\n    }\\n    environment {\\n        scannerHome = tool 'SonarQube Scanner' // the name you have given the Sonar Scanner (in Global Tool Configuration)\\n    }\\n    steps {\\n        withSonarQubeEnv(installationName: 'SonarQube') {\\n            sh \\\"${scannerHome}/bin/sonar-scanner -X\\\"\\n        }\\n    }\\n}\\n```\\n\\nIf you are analyzing a Java 8 project you probably want to continue using Java 8 to build your project. The following example allows you to continue building in Java 8 but will use Java 11 to scan the code:\\n\\n```\\nstage('Build') {\\n    tools {\\n        jdk \\\"jdk8\\\" // the name you have given the JDK installation using the JDK manager (Global Tool Configuration)\\n    }\\n    steps {\\n        sh 'mvn compile'\\n    }\\n}\\nstage('SonarQube analysis') {\\n    tools {\\n        jdk \\\"jdk11\\\" // the name you have given the JDK installation using the JDK manager (Global Tool Configuration)\\n    }\\n    environment {\\n        scannerHome = tool 'SonarQube Scanner' // the name you have given the Sonar Scanner (Global Tool Configuration)\\n    }\\n    steps {\\n        withSonarQubeEnv(installationName: 'SonarQube') {\\n            sh 'mvn sonar:sonar'\\n        }\\n    }\\n}\\n```\\n\\nThe previous example is for Maven, but you can easily modify it for Gradle.\\n\\n### Classical Pipelines\\n\\n#### **Set Job JDK version**  \\nYou can set the JDK version that a job should use in the **General** section of your configuration. This option is only visible if you have configured multiple JDK versions under **Manage Jenkins > Global Tool Configuration**.\\n\\n#### **Set Execute SonarQube Scanner JDK version**  \\nIf you're using the **Execute SonarQube Scanner** step in your configuration, you can set the JDK for this step in the configuration dialog. This allows you to use JDK 11 for the code scanning performed by SonarQube and the globally configured JDK for all other steps in the job.\\n\\n#### **Java 8 projects**  \\nJenkins doesn't let you switch JDKs when using a 'Freestyle project' or 'Maven project' configuration, so when you want to build your project using Java 8 you have to manually set the `JAVA_HOME` variable to Java 11 when executing the scanner.\\n\\nYou can do this with the [Tool Environment Plugin](https://plugins.jenkins.io/toolenv/). When this plugin is installed, you can expose the location of the JDK you added under **Manage Jenkins > Global Tool Configuration**.\\n\\nThe location of the JDK can then be used to set the `JAVA_HOME` environment variable. The build and post steps sections can be configured as follows:\\n![Configuration](/images/jenkins-maven-setup.png)\\n\\n\"},{\"path\":\"setup/before-you-upgrade\",\"content\":\"---\\ntitle: Before You Upgrade\\nurl: /setup/before-you-upgrade/\\n---\\n\\nThis page contains some concepts and recommendations that you should familiarize yourself with before upgrading. See the [Upgrade Guide](/setup/upgrading/) for information on the actual upgrade process.\\n\\n## SonarQube version number format\\nVersion numbers have up to three digits with each digit representing part of the release cycle:\\n\\n![SonarQube version number format](/images/version.png)\\n\\n**Major version number**  \\nThe major version number represents a series of releases with high-level objectives for the release cycle. It's incremented with the release following an LTS version (for example, the release following 7.9 LTS was 8.0).\\n\\n**Minor version number**  \\nThe minor version number corresponds to incremental functional changes within a major release cycle. At the time of an LTS release, the release cycle is closed and the minor version number is frozen.\\n\\n**Patch release number**  \\nOnly on LTS versions, the patch release number represents patches to an LTS that fixed blocker or critical problems. The patch release number isn't considered in your upgrade migration path, and your migration path is the same no matter which patch number you are on.\\n\\n## Migration path\\nUpgrading across multiple non-LTS versions is handled automatically. However, if there are one or multiple LTS versions in your migration path, you must first migrate to each intermediate LTS and then to your target version, as shown in **Example 3** below.\\n\\n[[info]]\\n|If you're migrating from an earlier patch version of an LTS, you can upgrade directly to the next LTS. You don't need to install any intermediate patch versions.\\n\\n**Migration Path Examples**:\\n\\n**Example 1** \u2013 From 8.1 > 9.0, the migration path is 8.1 > 8.9.1 LTS > 9.0  \\n**Example 2** \u2013 From 8.2 > 8.9 LTS, the migration path is 8.2 > the latest 8.9 LTS patch.  \\n**Example 3** \u2013 From 6.7.7 LTS > 8.9 LTS, the migration path is 6.7.7 LTS > 7.9.6 LTS > the latest 8.9 LTS patch.\\n\\n## Release Upgrade Notes\\nUsually SonarQube releases come with some specific recommendations for upgrading from the previous version. You should read the [Release Upgrade Notes](/setup/upgrade-notes/) for each version between your current version and the target version.\\n\\n## Practice your upgrade\\nWe recommend practicing your upgrade to:\\n- make sure your infrastructure can run the upgrade.\\n- get an idea of how long the upgrade will take.\\n- gain a better understanding of the upgrade process and anticipate what you'll need to do when performing the actual upgrade.\\n- address any issues you encounter during the practice upgrade on the [SonarSource Community](https://community.sonarsource.com/).\\n\\nTo practice your upgrade, create a staging environment using a recent backup of your production database. You want your staging environment to be as similar to your production instance as possible because the resources and time needed to upgrade depends on what's stored in your database. Use this staging environment to test the upgrade, observing how long it takes to back up and restore systems and complete the process.\\n\\n\"},{\"path\":\"setup/get-started-2-minutes\",\"content\":\"---\\ntitle: Try Out SonarQube\\nurl: /setup/get-started-2-minutes/\\n---\\nYou've heard about how [SonarQube](https://www.sonarqube.org/) can help you write cleaner and safer code, and now you're ready to try it out for yourself. This guide shows you how to install a local instance of SonarQube and analyze a project. Installing a local instance gets you up and running quickly, so you can experience SonarQube first hand.\\n\\nOnce you're ready to set up a production instance, take a look at the [Install SonarQube](/setup/install-server/) documentation.\\n\\n## Installing a local instance of SonarQube\\nYou can evaluate SonarQube using a traditional installation with the [zip file](https://www.sonarqube.org/downloads/) or you can spin up a Docker container using one of our [Docker images](https://hub.docker.com/_/sonarqube/). Click the method you prefer below to expand the installation instructions: \\n\\n[[collapse]]\\n| ## From the zip file\\n|\\n| 1. [Download](https://www.sonarqube.org/downloads/) the SonarQube Community Edition zip file.\\n|\\n| 2. As a **non-`root` user**, unzip it, let's say in _C:\\\\sonarqube_ or _/opt/sonarqube_.\\n|\\n| 3. As a **non-`root` user**, start the SonarQube Server:\\n|\\n|    ```\\n|    # On Windows, execute:\\n|    C:\\\\sonarqube\\\\bin\\\\windows-x86-64\\\\StartSonar.bat\\n|\\n|    # On other operating systems, as a non-root user execute:\\n|    /opt/sonarqube/bin/[OS]/sonar.sh console\\n|    ```\\n|\\n|   ![](/images/info.svg) If your instance fails to start, check your [logs](/setup/troubleshooting/) to find the cause.\\n\\n[[collapse]]\\n| ## From the Docker image\\n| Find the Community Edition Docker image on [Docker Hub](https://hub.docker.com/_/sonarqube/).\\n|\\n| 1. Start the server by running:\\n|\\n| ```console\\n| $ docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest\\n| ```\\n\\nOnce your instance is up and running, Log in to [http://localhost:9000](http://localhost:9000) using System Administrator credentials:\\n- login: admin \\n- password: admin\\n\\n## Analyzing a Project\\nNow that you're logged in to your local SonarQube instance, let's analyze a project: \\n\\n1. Click the **Create new project** button.\\n\\n1. Give your project a **Project key** and a **Display name** and click the **Set Up** button.\\n\\n1. Under **Provide a token**, select **Generate a token**. Give your token a name, click the **Generate** button, and click **Continue**.\\n\\n1. Select your project's main language under **Run analysis on your project**, and follow the instructions to analyze your project. Here you'll download and execute a Scanner on your code (if you're using Maven or Gradle, the Scanner is automatically downloaded).\\n\\nAfter successfully analyzing your code, you'll see your first analysis on SonarQube:\\n\\n![successful analysis](/images/successfulproject.png)\\n\\n\\n\"},{\"path\":\"setup/install-cluster\",\"content\":\"---\\ntitle: Install the Server as a Cluster\\nurl: /setup/install-cluster/\\n---\\n\\n_Running SonarQube as a Cluster is only possible with a [Data Center Edition](https://www.sonarsource.com/plans-and-pricing/data-center/)_.\\n\\nThe Data Center Edition allows SonarQube to run in a clustered configuration to make it resilient to failures.\\n\\n## Overview\\n\\nThe default configuration for the Data Center Edition comprises five servers, a load balancer, and a database server:\\n\\n- Two application nodes responsible for handling web requests from users (WebServer process) and handling analysis reports (ComputeEngine process). You can add application nodes to increase computing capabilities.\\n- Three search nodes that host the Elasticsearch process that will store data indices. SSDs perform significantly better than HDDs for these nodes.\\n- A reverse proxy / load balancer to load balance traffic between the two application nodes. The installing organization must supply this hardware or software component.\\n- PostgreSQL, Oracle, or Microsoft SQL Server database server. This software must be supplied by the installing organization.\\n\\n\\nWith this configuration, one application node and one search node can be lost without impacting users.  Here is a diagram of the default topology:\\n\\n![DCE Cluster Machines Topology.](/images/cluster-dce.png)\\n\\n## Requirements\\n\\n### Network\\n\\nAll servers, including the database server, must be located within the same region. \\n\\nAll application and search nodes should have static IP addresses (reference via hostname is not supported). Network traffic should not be restricted between application and search nodes.\\n\\n### Servers\\n\\nYou need a minimum of five servers (two application nodes and three search nodes) to form a SonarQube application cluster. Servers can be virtual machines; it is not necessary to use physical machines. You can also add application nodes to increase computing capabilities. \\n\\nThe operating system requirements for servers are available on the [Requirements](/requirements/requirements/) page. \\n\\nAll application nodes should be identical in terms of hardware and software. Similarly, all search nodes should be identical to each other. Application and search nodes, however, can differ from one another. Generally, search nodes are configured with more CPU and RAM than application nodes.\\n\\nSearch nodes can be located in different availability zones, but they must be in the same region. In this case, each search node should be located in a separate availability zone to maintain availability in the event of a failure in one zone.\\n\\n#### **Example Machines**\\nHere are the machines we used to perform our validation with a 200M issues database. You can use this as a minimum recommendation to build your cluster.\\n\\n- App Node made of [Amazon EC2 m4.xlarge](https://aws.amazon.com/ec2/instance-types/): 4 vCPUs, 16GB RAM\\n- Search Node made of [Amazon EC2 m4.2xlarge](https://aws.amazon.com/ec2/instance-types/): 8 vCPUs, 32GB RAM - 16GB allocated to Elasticsearch. SSDs perform significantly better than HDDs for these nodes.\\n\\n### Database Server\\n\\nSupported database systems are available on the [Requirements](/requirements/requirements/) page.\\n\\n### Load Balancer\\n\\nSonarSource does not provide specific recommendations for reverse proxy / load balancer or solution-specific configuration. The general requirements for SonarQube Data Center Edition are:\\n\\n- Ability to balance HTTP requests (load) between the application nodes configured in the SonarQube cluster.\\n- If terminating HTTPS, meets the requirements set out in [Securing SonarQube Behind a Proxy](/setup/operate-server/).\\n- No requirement to preserve or sticky sessions; this is handled by the built-in JWT mechanism.\\n- Ability to check for node health for routing\\n\\n#### Example with HAProxy\\n\\n```\\nfrontend http-in\\n    bind *:80\\n    bind *:443 ssl crt /etc/ssl/private/<server_certificate>\\n    http-request redirect scheme https unless { ssl_fc }\\n    default_backend sonarqube_server\\nbackend sonarqube_server\\n    balance roundrobin\\n    http-request set-header X-Forwarded-Proto https\\n    option httpchk GET /api/system/status\\n    http-check expect rstring UP|DB_MIGRATION_NEEDED|DB_MIGRATION_RUNNING\\n    default-server check maxconn 200\\n    server node1 <server_endpoint_1>\\n    server node2 <server_endpoint_2> \\n```\\n\\n### License\\n\\nYou need a dedicated license to activate the Data Center Edition. If you don't have one yet, please contact the SonarSource Sales Team.\\n\\n### Support\\n\\nDon't start this journey alone!  As a Data Center Edition subscriber, SonarSource will assist with the setup and configuration of your cluster. Get in touch with [SonarSource Support](https://support.sonarsource.com) for help.\\n\\n## Installing SonarQube from the ZIP file\\n\\nAdditional parameters are required to activate clustering capabilities and specialize each node. These parameters are in addition to standard configuration properties used in a single-node configuration.\\n\\nThe **sonar.properties** file on each node will be edited to configure the node's specialization. A list of all cluster-specific configuration parameters is available in the [Operate the Cluster](/setup/operate-cluster/) documentation.\\n\\nPrior to configuration, you will need to generate a value for the `sonar.auth.jwtBase64Hs256Secret` property for the application nodes.  The value is a HS256 key encoded with base64 and will be the same for both nodes.  The following is an example on how to generate this value on a Unix system:\\n\\n```\\necho -n \\\"your_secret\\\" | openssl dgst -sha256 -hmac \\\"your_key\\\" -binary | base64\\n```\\n\\n### Sample Configuration\\n\\nThe following example represents a sample configuration of a SonarQube cluster.  The example assumes:\\n\\n- The VMs having IP addresses ip1 and ip2 (server1, server2) are application nodes\\n- The VMs having IP addresses ip3, ip4, and ip5 (server3, server4 and server5) are search nodes\\n\\nThe configuration to be added to sonar.properties for each node is the following:\\n\\n#### Application Nodes\\n\\n**server1**\\n```\\n...\\nsonar.cluster.enabled=true\\nsonar.cluster.node.type=application\\nsonar.cluster.node.host=ip1\\nsonar.cluster.node.port=9003\\nsonar.cluster.hosts=ip1,ip2\\nsonar.cluster.search.hosts=ip3:9001,ip4:9001,ip5:9001\\nsonar.auth.jwtBase64Hs256Secret=YOURGENERATEDSECRET\\n...\\n```\\n\\n**server2**\\n```\\n...\\nsonar.cluster.enabled=true\\nsonar.cluster.node.type=application\\nsonar.cluster.node.host=ip2\\nsonar.cluster.node.port=9003\\nsonar.cluster.hosts=ip1,ip2\\nsonar.cluster.search.hosts=ip3:9001,ip4:9001,ip5:9001\\nsonar.auth.jwtBase64Hs256Secret=YOURGENERATEDSECRET\\n...\\n```\\n\\n#### Search Nodes\\n\\n**server3**\\n```\\n...\\nsonar.cluster.enabled=true\\nsonar.cluster.node.type=search\\nsonar.cluster.node.search.host=ip3\\nsonar.cluster.node.search.port=9001\\nsonar.cluster.node.es.host=ip3\\nsonar.cluster.node.es.port=9002\\nsonar.cluster.es.hosts=ip3:9002,ip4:9002,ip5:9002\\n...\\n```\\n\\n**server4**\\n```\\n...\\nsonar.cluster.enabled=true\\nsonar.cluster.node.type=search\\nsonar.cluster.node.search.host=ip4\\nsonar.cluster.node.search.port=9001\\nsonar.cluster.node.es.host=ip4\\nsonar.cluster.node.es.port=9002\\nsonar.cluster.es.hosts=ip3:9002,ip4:9002,ip5:9002\\n...\\n```\\n\\n**server5**\\n```\\n...\\nsonar.cluster.enabled=true\\nsonar.cluster.node.type=search\\nsonar.cluster.node.search.host=ip5\\nsonar.cluster.node.search.port=9001\\nsonar.cluster.node.es.host=ip5\\nsonar.cluster.node.es.port=9002\\nsonar.cluster.es.hosts=ip3:9002,ip4:9002,ip5:9002\\n...\\n```\\n\\n### Sample Installation Process\\n\\nThe following is an example of the default SonarQube cluster installation process. You need to tailor your installation to the specifics of the target installation environment and the operational requirements of the hosting organization.\\n\\n**Prepare the cluster environment:**\\n\\n1. Prepare the cluster environment by setting up the network and provisioning the nodes and load balancer. \\n2. Follow the [Installing the Server](/setup/install-server/) documentation to configure the database server.\\n\\n**Prepare a personalized SonarQube package:**\\n\\n1. On a single application node of the cluster, download and install SonarQube Data Center Edition, following the usual [Installing the Server](/setup/install-server/) documentation.\\n2. Add cluster-related parameters to `$SONARQUBE_HOME/conf/sonar.properties`.\\n3. This is also a good opportunity to install plugins. Download and place a copy of each plugin JAR in `$SONARQUBE_HOME/extensions/plugins`.  Be sure to check compatibility with your SonarQube version using the [Plugin Version Matrix](/instance-administration/plugin-version-matrix/).\\n4. Zip the directory `$SONARQUBE_HOME`. This archive is a customized SonarQube Data Center Edition package that can be copied to other nodes.\\n\\n**Test configuration on a single node:**\\n\\n1. On the application node where you created your Zip package, comment out all cluster-related parameters in `$SONARQUBE_HOME/conf/sonar.properties`.\\n2. Configure the load balancer to proxy with single application node.\\n3. Start server and test access through load balancer.\\n4. Request license from SonarSource Sales Team.\\n5. After applying license, you will have a full-featured SonarQube system operating on a single node.\\n\\n**Deploy SonarQube package on other nodes:**\\n\\n1. Unzip SonarQube package on the other four nodes.\\n2. Configure node-specific parameters on all five nodes in `$SONARQUBE_HOME/conf/sonar.properties` and ensure application node-specific and search node-specific parameters are properly set.\\n3. Start all search nodes.\\n4. After all search nodes are running, start all application nodes.\\n5. Configure the load balancer to proxy with both application nodes.\\n\\n## Installing SonarQube from the Docker Image\\n\\nYou can also install a cluster using our docker images. The general setup is the same but is shifted to a docker specific terminology.\\n\\n## Requirements\\n\\n### Network\\n\\nAll containers should be in the same network. This includes search and application nodes.\\nFor the best performance, it is advised to check for low latency between the database and the cluster nodes.\\n\\n### Limits\\n\\nThe limits of each container depend on the workload that each container has. A good starting point would be:\\n\\n* cpus: 0.5  \\n* mem_limit: 4096M  \\n* mem_reservation: 1024M  \\n\\nThe 4Gb mem_limit should not be lower as this is the minimal value for Elasticsearch.\\n\\n### Scalability\\n\\nApplication nodes can be scaled using replicas. This is not the case for the Search nodes as Elasticsearch will not become ready. See the [Configure and Operate a Cluster](/setup/operate-cluster/) for more information.\\n\\n### Volumes\\nYou'll use the following volumes in your configuration:\\n\\n- `sonarqube_data` \u2013 In the Docker Compose configuration example in the following section, volumes are shared between replicas in the application nodes, so you don't need a `sonarqube_data` volume on your application nodes. In the search nodes, the `sonarqube_data` volume contains the Elasticsearch data and helps reduce startup time, so we recommend having a `sonarqube_data` volume on each search node.\\n- `sonarqube_extensions` \u2013 For application nodes, we recommend sharing a common `sonarqube_extensions` volume which contains any plugins you install and the Oracle JDBC driver if necessary.\\n- `sonarqube_logs` \u2013 For both application and search nodes, we recommend sharing a common `sonarqube_logs` volume which contains SonarQube logs. The volume will be populated with a new folder depending on the container's hostname and all logs of this container will be put into this folder. This behavior also happens when a custom log path is specified via the [Docker Environment Variables](/setup/environment-variables/).\\n\\n## Example Docker Compose configuration\\n\\nClick the heading below to expand the docker-compose.yml file example. \\n\\n[[info]]\\n| The example below will use the latest version of the SonarQube Docker image. If want to use the LTS version of SonarQube, you need to update the example with the `sonarqube:lts-datacenter-app` and `sonarqube:lts-datacenter-search` image tags.\\n\\n[[collapse]]\\n| ## docker-compose.yml file example\\n|\\n| ```yaml\\n|version: \\\"3\\\"\\n|\\n|services:\\n|  sonarqube:\\n|    image: sonarqube:datacenter-app\\n|    depends_on:\\n|      - db\\n|      - search-1\\n|      - search-2\\n|      - search-3\\n|    networks:\\n|      - sonar-network\\n|    deploy:\\n|      replicas: 2\\n|    environment:\\n|      SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar\\n|      SONAR_JDBC_USERNAME: sonar\\n|      SONAR_JDBC_PASSWORD: sonar\\n|      SONAR_WEB_PORT: 9000\\n|      SONAR_CLUSTER_SEARCH_HOSTS: \\\"search-1,search-2,search-3\\\"\\n|      SONAR_CLUSTER_HOSTS: \\\"sonarqube\\\"\\n|      SONAR_AUTH_JWTBASE64HS256SECRET: \\\"dZ0EB0KxnF++nr5+4vfTCaun/eWbv6gOoXodiAMqcFo=\\\"\\n|      VIRTUAL_HOST: sonarqube.dev.local\\n|      VIRTUAL_PORT: 9000\\n|    volumes:\\n|      - sonarqube_extensions:/opt/sonarqube/extensions\\n|      - sonarqube_logs:/opt/sonarqube/logs\\n|  search-1:\\n|    image: sonarqube:datacenter-search\\n|    hostname: \\\"search-1\\\"\\n|    depends_on:\\n|      - db\\n|    networks:\\n|      - sonar-network\\n|    environment:\\n|      SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar\\n|      SONAR_JDBC_USERNAME: sonar\\n|      SONAR_JDBC_PASSWORD: sonar\\n|      SONAR_CLUSTER_ES_HOSTS: \\\"search-1,search-2,search-3\\\"\\n|      SONAR_CLUSTER_NODE_NAME: \\\"search-1\\\"\\n|    volumes:\\n|      - search-data-1:/opt/sonarqube/data\\n|  search-2:\\n|    image: sonarqube:8.6-datacenter-search\\n|    hostname: \\\"search-2\\\"\\n|    depends_on:\\n|      - db\\n|    networks:\\n|      - sonar-network\\n|    environment:\\n|      SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar\\n|      SONAR_JDBC_USERNAME: sonar\\n|      SONAR_JDBC_PASSWORD: sonar\\n|      SONAR_CLUSTER_ES_HOSTS: \\\"search-1,search-2,search-3\\\"\\n|      SONAR_CLUSTER_NODE_NAME: \\\"search-2\\\"\\n|    volumes:\\n|      - search-data-2:/opt/sonarqube/data\\n|  search-3:\\n|    image: sonarqube:8.6-datacenter-search\\n|    hostname: \\\"search-3\\\"\\n|    depends_on:\\n|      - db\\n|    networks:\\n|      - sonar-network\\n|    environment:\\n|      SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar\\n|      SONAR_JDBC_USERNAME: sonar\\n|      SONAR_JDBC_PASSWORD: sonar\\n|      SONAR_CLUSTER_ES_HOSTS: \\\"search-1,search-2,search-3\\\"\\n|      SONAR_CLUSTER_NODE_NAME: \\\"search-3\\\"\\n|    volumes:\\n|      - search-data-3:/opt/sonarqube/data\\n|  db:\\n|    image: postgres:12\\n|    networks:\\n|      - sonar-network\\n|    environment:\\n|      POSTGRES_USER: sonar\\n|      POSTGRES_PASSWORD: sonar\\n|    volumes:\\n|      - postgresql:/var/lib/postgresql\\n|      - postgresql_data:/var/lib/postgresql/data\\n|  proxy:\\n|    image: jwilder/nginx-proxy\\n|    ports:\\n|      - \\\"80:80\\\"\\n|    volumes:\\n|      - /var/run/docker.sock:/tmp/docker.sock:ro\\n|    networks:\\n|      - sonar-network\\n|      - sonar-public\\n|\\n|networks:\\n|  sonar-network:\\n|    ipam:\\n|      driver: default\\n|      config:\\n|        - subnet: 172.28.2.0/24\\n|  sonar-public:\\n|    driver: bridge\\n|\\n|volumes:\\n|  sonarqube_extensions:\\n|  sonarqube_logs:\\n|  search-data-1:\\n|  search-data-2:\\n|  search-data-3:\\n|  postgresql:\\n|  postgresql_data:\\n| ```\\n\\n## Next Steps\\nOnce you've complete these steps, check out the [Operate your Cluster](/setup/operate-cluster/) documentation.\\n\"},{\"path\":\"setup/install-plugin\",\"content\":\"---\\ntitle: Install a Plugin\\nurl: /setup/install-plugin/\\n---\\n\\nThere are two ways to install plugins in SonarQube:\\n\\n- **Marketplace** - With Community Edition, you can use Marketplace to automatically install plugins from the SonarQube. With commercial editions, you can browse plugins in the Marketplace, but you need to manually install and update your plugins.\\n- **Manual Installation** - You need to manually install plugins when using commercial editions of SonarQube. You can also manually install plugins if your SonarQube instance doesn't have internet access or the plugin you're installing isn't in the Marketplace.\\n\\n[[warning]]\\n| Plugins are not provided by SonarSource, and you therefore install them at your own risk. A SonarQube administrator needs to acknowledge this risk in the Marketplace before installing plugins or when prompted in SonarQube after installing a plugin manually.\\n\\n## Installing plugins from the Marketplace\\n\\n[[info]]\\n|You can only install and update plugins from the Marketplace in SonarQube Community Edition. With commercial editions, you need manually install and update plugins.\\n\\nIf your instance has internet access and you're connected with a SonarQube user with the **Administer System** global permission, you can find the Marketplace at **Administration > Marketplace**. From here:\\n\\n- Find the plugin you want to install\\n- Click **Install** and wait for the download to be processed\\n\\nOnce the download is complete, a **Restart** button will be available to restart your instance.\\n\\nSee [Marketplace](/instance-administration/marketplace/) for more details on how to configure your SonarQube Server to connect to the internet.\\n\\n## Manual installing plugins\\n\\nTo manually install a plugin:\\n\\n1. Download the plugin you want to install. The version needs to be compatible with your SonarQube version.\\n2. Put the downloaded jar in `$SONARQUBE_HOME/extensions/plugins`, and remove any previous versions of the same plugins.\\n3. Restart your SonarQube server.\\n\\n## Uninstalling plugins\\n\\nTo uninstall a plugin from the Marketplace (**Administration > Marketplace**):\\n1. Sort the **Plugins** list by installed plugins by selecting **Installed** above the list.\\n2. Find the plugin you want to uninstall.\\n3. Click the **Uninstall** button to the right of the plugin information.\\n4. Restart your SonarQube server.\\n\\nTo uninstall a plugin manually:\\n1. Delete the plugin from the `$SONARQUBE-HOME/extensions/plugins` folder.\\n2. Restart your SonarQube server.\\n\"},{\"path\":\"setup/install-server\",\"content\":\"---\\ntitle: Install the Server\\nurl: /setup/install-server/\\n---\\n\\n## Overview\\n\\nThis section describes a single-node SonarQube instance. For details on clustered setup, see [Install the Server as a Cluster](/setup/install-cluster/).\\n\\n### Instance components\\n\\nA SonarQube instance comprises three components:\\n\\n![SonarQube Instance Components](/images/SQ-instance-components.png)\\n\\n1. The SonarQube server running the following processes:\\n\\t- a web server that serves the SonarQube user interface.\\n\\t- a search server based on Elasticsearch.\\n\\t- the compute engine in charge of processing code analysis reports and saving them in the SonarQube database.\\n\\n2. The database to store the following:\\n\\t- Metrics and issues for code quality and security generated during code scans.\\n\\t- The SonarQube instance configuration.\\n\\n3. One or more scanners running on your build or continuous integration servers to analyze projects.\\n\\n### Hosts and locations\\n\\nFor optimal performance, the SonarQube server and database should be installed on separate hosts, and the server host should be dedicated. The server and database hosts should be located in the same network.\\n\\nAll hosts must be time-synchronized.\\n\\n## Installing the database\\n\\nSeveral [database engines](/requirements/requirements/) are supported. Be sure to follow the requirements listed for your database. They are real requirements not recommendations.\\n\\nCreate an empty schema and a `sonarqube` user. Grant this `sonarqube` user permissions to `create`, `update`, and `delete` objects for this schema.\\n\\n[[collapse]]\\n| ## Microsoft SQL Server\\n|\\n|[[warning]]\\n|| Collation **MUST** be case-sensitive (CS) and accent-sensitive (AS).  \\n|| `READ_COMMITED_SNAPSHOT` **MUST** be set on the SonarQube database.\\n|\\n|MS SQL database's shared lock strategy may impact SonarQube runtime. Making sure that `is_read_committed_snapshot_on` is set to `true` to prevent SonarQube from facing potential deadlocks under heavy loads. \\n|\\n|Example of query to check `is_read_committed_snapshot_on`:\\n|```\\n|SELECT is_read_committed_snapshot_on FROM sys.databases WHERE name='YourSonarQubeDatabase';\\n|```\\n|Example of query to update `is_read_committed_snapshot_on`:\\n|```\\n|ALTER DATABASE YourSonarQubeDatabase SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;\\n|```\\n|### Integrated Security\\n|\\n|To use integrated security: \\n|\\n|1. Download the [Microsoft SQL JDBC Driver 9.2.0 package](https://docs.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver15#92) and copy `mssql-jdbc_auth-9.2.0.x64.dll` to any folder in your path. \\n|\\n|2. **If you're running SonarQube as a Windows service,** make sure the Windows account under which the service is running has permission to connect your SQL server. The account should have `db_owner` database role membership. \\n|\\n|\\t**If you're running the SonarQube server from a command prompt,** the user under which the command prompt is running should have `db_owner` database role membership. \\n|\\n|3. Ensure that `sonar.jdbc.username` or `sonar.jdbc.password` properties are commented out or SonarQube will use SQL authentication.\\n|\\n|```\\n|sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true\\n|```\\n|\\n|### SQL Authentication\\n|\\n|To use SQL Authentication, use the following connection string. Also ensure that `sonar.jdbc.username` and `sonar.jdbc.password` are set appropriately:\\n|\\n|```\\n|sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar\\n|sonar.jdbc.username=sonarqube\\n|sonar.jdbc.password=mypassword\\n|```\\n\\n[[collapse]]\\n| ## Oracle\\n|\\n|If there are two SonarQube schemas on the same Oracle instance, especially if they are for two different versions, SonarQube gets confused and picks the first it finds. To avoid this issue:\\n|\\n|- Either privileges associated to the SonarQube Oracle user should be decreased\\n|- Or a trigger should be defined on the Oracle side to automatically alter the SonarQube Oracle user session when establishing a new connection:\\n|\\n|[[warning]]\\n|| Oracle JDBC driver versions 12.1.0.1 and 12.1.0.2 have major bugs, and are not recommended for use with the SonarQube ([see more details](https://groups.google.com/forum/#!msg/sonarqube/Ahqt1iarqJg/u0BVRJZnBQAJ)).\\n\\n[[collapse]]\\n| ## PostgreSQL\\n|\\n|If you want to use a custom schema and not the default \\\"public\\\" one, the PostgreSQL `search_path` property must be set:\\n|\\n|```\\n|ALTER USER mySonarUser SET search_path to mySonarQubeSchema\\n|```\\n\\n## Installing SonarQube from the ZIP file\\n\\nFirst, check the [requirements](/requirements/requirements/). Then download and unzip the [distribution](http://www.sonarqube.org/downloads/) (do not unzip into a directory starting with a digit). \\n\\nSonarQube cannot be run as `root` on Unix-based systems, so create a dedicated user account for SonarQube if necessary.\\n\\n_$SONARQUBE-HOME_ (below) refers to the path to the directory where the SonarQube distribution has been unzipped.\\n\\n### Setting the Access to the Database\\n\\nEdit _$SONARQUBE-HOME/conf/sonar.properties_ to configure the database settings. Templates are available for every supported database. Just uncomment and configure the template you need and comment out the lines dedicated to H2:\\n\\n```\\nExample for PostgreSQL\\nsonar.jdbc.username=sonarqube\\nsonar.jdbc.password=mypassword\\nsonar.jdbc.url=jdbc:postgresql://localhost/sonarqube\\n```\\n\\n### Adding the JDBC Driver\\n\\nDrivers for the supported databases (except Oracle) are already provided. Do not replace the provided drivers; they are the only ones supported.\\n\\nFor Oracle, copy the JDBC driver into _$SONARQUBE-HOME/extensions/jdbc-driver/oracle_.\\n\\n### Configuring the Elasticsearch storage path\\n\\nBy default, Elasticsearch data is stored in _$SONARQUBE-HOME/data_, but this is not recommended for production instances. Instead, you should store this data elsewhere, ideally in a dedicated volume with fast I/O. Beyond maintaining acceptable performance, doing so will also ease the upgrade of SonarQube.\\n\\nEdit _$SONARQUBE-HOME/conf/sonar.properties_ to configure the following settings:\\n\\n```\\nsonar.path.data=/var/sonarqube/data\\nsonar.path.temp=/var/sonarqube/temp\\n```\\n\\nThe user used to launch SonarQube must have read and write access to those directories.\\n\\n### Starting the Web Server\\n\\nThe default port is \\\"9000\\\" and the context path is \\\"/\\\". These values can be changed in _$SONARQUBE-HOME/conf/sonar.properties_:\\n\\n```\\nsonar.web.host=192.168.0.1\\nsonar.web.port=80\\nsonar.web.context=/sonarqube\\n```\\n\\nExecute the following script to start the server:\\n\\n- On Linux: bin/linux-x86-64/sonar.sh start\\n- On macOS: bin/macosx-universal-64/sonar.sh start\\n- On Windows: bin/windows-x86-64/StartSonar.bat\\n\\nYou can now browse SonarQube at _http://localhost:9000_ (the default System administrator credentials are `admin`/`admin`).\\n\\n### Adjusting the Java Installation\\n\\nIf there are multiple versions of Java installed on your server, you may need to explicitly define which version of Java is used.\\n\\nTo change the Java JVM used by SonarQube, edit _$SONARQUBE-HOME/conf/wrapper.conf_ and update the following line:\\n\\n```\\nwrapper.java.command=/path/to/my/jdk/bin/java\\n```\\n\\n### Advanced Installation Features\\n\\n- Running SonarQube as a Service on [Windows](/setup/operate-server/) or [Linux](/setup/operate-server/)\\n- Running SonarQube [behind a Proxy](/setup/operate-server/)\\n- Monitoring and adjusting [Java Process Memory](/instance-administration/monitoring/)\\n\\n## Installing SonarQube from the Docker Image\\n\\nFollow these steps for your first installation:\\n\\n1.\\tCreating the following volumes helps prevent the loss of information when updating to a new version or upgrading to a higher edition:\\n\\t- `sonarqube_data` \u2013 contains data files, such as the embedded H2 database and Elasticsearch indexes\\n\\t- `sonarqube_logs` \u2013 contains SonarQube logs about access, web process, CE process, and Elasticsearch\\n\\t- `sonarqube_extensions` \u2013 will contain any plugins you install and the Oracle JDBC driver if necessary.\\n\\t\\n\\tCreate the volumes with the following commands:\\n\\t```bash\\n\\t$> docker volume create --name sonarqube_data\\n\\t$> docker volume create --name sonarqube_logs\\n\\t$> docker volume create --name sonarqube_extensions\\n\\t``` \\n\\t[[warning]]\\n    | Make sure you're using [volumes](https://docs.docker.com/storage/volumes/) as shown with the above commands, and not [bind mounts](https://docs.docker.com/storage/bind-mounts/). Using bind mounts prevents plugins from populating correctly.\\n\\n2. Drivers for supported databases (except Oracle) are already provided. If you're using an Oracle database, you need to add the JDBC driver to the `sonar_extensions` volume. To do this:\\n\\n\\ta. Start the SonarQube container with the embedded H2 database:\\n   \\n    ```\\n\\t$ docker run --rm \\\\\\n\\t\\t-p 9000:9000 \\\\\\n\\t\\t-v sonarqube_extensions:/opt/sonarqube/extensions \\\\\\n\\t\\t<image_name>\\n\\t```\\n\\t\\n\\tb. Exit once SonarQube has started properly. \\n   \\n\\tc. Copy the Oracle JDBC driver into `sonarqube_extensions/jdbc-driver/oracle`.\\n   \\n3. Run the image with your database properties defined using the -e environment variable flag:\\n\\n\\t```bash\\n\\t$> docker run -d --name sonarqube \\\\\\n\\t\\t-p 9000:9000 \\\\\\n\\t\\t-e SONAR_JDBC_URL=... \\\\\\n\\t\\t-e SONAR_JDBC_USERNAME=... \\\\\\n\\t\\t-e SONAR_JDBC_PASSWORD=... \\\\\\n\\t\\t-v sonarqube_data:/opt/sonarqube/data \\\\\\n\\t\\t-v sonarqube_extensions:/opt/sonarqube/extensions \\\\\\n\\t\\t-v sonarqube_logs:/opt/sonarqube/logs \\\\\\n\\t\\t<image_name>\\n\\t```\\n\\t\\n\\tFor more configuration environment variables, see the [Docker Environment Variables](/setup/environment-variables/).\\n\\t\\n\\t[[warning]]\\n    | Use of the environment variables `SONARQUBE_JDBC_USERNAME`, `SONARQUBE_JDBC_PASSWORD`, and `SONARQUBE_JDBC_URL` is deprecated and will stop working in future releases.\\n\\n####**Example Docker Compose configuration**\\nIf you're using [Docker Compose](https://docs.docker.com/compose/), use the following example as a reference when configuring your `.yml` file. Click the heading below to expand the `.yml` file.\\n\\n[[info]]\\n| The example below will use the latest version of the SonarQube Docker image. If want to use the LTS version of SonarQube, you need to update the example with the `sonarqube:lts-community` image tag.\\n\\n[[collapse]]\\n| ## Docker Compose .yml file example\\n|\\n| ```\\n| version: \\\"3\\\"\\n| \\n| services:\\n|   sonarqube:\\n|     image: sonarqube:community\\n|     depends_on:\\n|       - db\\n|     environment:\\n|       SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar\\n|       SONAR_JDBC_USERNAME: sonar\\n|       SONAR_JDBC_PASSWORD: sonar\\n|     volumes:\\n|       - sonarqube_data:/opt/sonarqube/data\\n|       - sonarqube_extensions:/opt/sonarqube/extensions\\n|       - sonarqube_logs:/opt/sonarqube/logs\\n|     ports:\\n|       - \\\"9000:9000\\\"\\n|   db:\\n|     image: postgres:12\\n|     environment:\\n|       POSTGRES_USER: sonar\\n|       POSTGRES_PASSWORD: sonar\\n|     volumes:\\n|       - postgresql:/var/lib/postgresql\\n|       - postgresql_data:/var/lib/postgresql/data\\n| \\n| volumes:\\n|   sonarqube_data:\\n|   sonarqube_extensions:\\n|   sonarqube_logs:\\n|   postgresql:\\n|   postgresql_data:\\n| ```\\n\\n## Next Steps\\n\\nOnce your server is installed and running, you may also want to [Install Plugins](/setup/install-plugin/). Then you're ready to begin [Analyzing Source Code](/analysis/overview/).\\n\\n## Troubleshooting/FAQ\\n\\n### Failed to connect to the Marketplace via proxy\\n\\nDouble check that settings for proxy are correctly set in `$SONARQUBE_HOME/conf/sonar.properties`.\\nNote that if your proxy username contains a backslash, then it should be escaped - for example username \\\"domain\\\\user\\\" in file should look like:\\n\\n```\\nhttp.proxyUser=domain\\\\\\\\user\\n```\\n\\nFor some proxies, the exception \\\"java.net.ProtocolException: Server redirected too many times\\\" might mean an incorrect username or password has been configured.\\n\\n### Exception java.lang.RuntimeException: can not run elasticsearch as root\\n\\nSonarQube starts an Elasticsearch process, and the same account that is running SonarQube itself will be used for the Elasticsearch process. Since Elasticsearch cannot be run as `root`, that means SonarQube can't be either. You must choose some other, non-`root` account with which to run SonarQube, preferably an account dedicated to the purpose.\\n\\n### Sonarqube DNS cache\\n\\nWhen reporting Quality Gate status to DevOps platforms, SonarQube uses a DNS cache time to live policy of 30 seconds. If necessary, you can change this setting in your JVM:\\n\\n```bash\\necho \\\"networkaddress.cache.ttl=5\\\" >> \\\"${JAVA_HOME}/conf/security/java.security\\\" \\n```\\n\\nPlease be aware that low values increases the risk of DNS spoofing attacks.\\n\"},{\"path\":\"setup/lts-to-lts-upgrade-notes\",\"content\":\"---\\ntitle: LTS to LTS Release Upgrade Notes\\nurl: /setup/lts-to-lts-upgrade-notes/\\n---\\n\\nThese Upgrade Notes are intended for users who are directly upgrading from SonarQube _v7.9 LTS_ to _v8.9 LTS_. Just upgrading a few minor versions? Refer to the regular [Upgrade Notes](/setup/upgrade-notes/).\\n\\n## Authentication\\n**Default Authentication and Administrator credentials (8.6)**  \\nOn a fresh install to avoid misconfiguration and related security risks, authentication is now required by default, and you need to change the default password for the administrator account. \\n\\nWhen upgrading, if you were still using default credentials, you'll be asked to change the password the next time you authenticate with the admin account. ([MMF-1352](https://jira.sonarsource.com/browse/MMF-1352), [MMF-2146](https://jira.sonarsource.com/browse/MMF-2146)).\\n\\n**Additional SAML checks (8.4)**  \\nSAML authentication adds additional checks for validating SAML responses from the identity provider. This could reveal a non-standard configuration that needs to be updated. Information will appear in the logs upon a failed login attempt in the event that the configuration needs to be tweaked.\\n\\n**GitLab Authentication now available (8.0)**  \\nGitLab OAuth2 authentication is now available in all editions. If you were using the community plugin, you need to remove it from SonarQube before upgrading. The configured variable of the plugin will be migrated, so the authentication will work without having to rewrite the configuration. Due to changes in group mapping, GitLab subgroups mapped using the community plugin will need to be renamed in SonarQube for the mapping to work. ([SONAR-12460](https://jira.sonarsource.com/browse/SONAR-12460)).\\n\\n## Analysis\\n**Updated built-in Quality Profiles (8.0-8.9)**  \\nThe built-in Quality Profiles for each language have been updated, meaning rules may have been added, changed, deprecated or dropped. If you are using or extending any of the \u201CSonar way\u201D built-in Quality Profiles, make sure to check their Changelog to see what has changed. \\n\\n**JavaScript security analysis can take longer (8.8)**  \\nThe JavaScript security analysis in commercial editions has been overhauled for far better accuracy. This overhaul results in an expected increase in memory requirement for analysis. \\n\\n**JavaScript, TypeScript, and CSS analysis now requires Node.js 10+ (8.7, 8.8)**  \\nIn order to analyze Javascript, Typescript, and CSS code, you now need to have Node.js 10+ installed on the machine running the scan.\\n\\n**SonarScanner for MSBuild compatibility (and renaming) (8.5)**  \\nAnalyzing a C# / VB.NET solution in SonarQube 8.5 requires SonarScanner for MSBuild 4.0+.\\n\\nThe SonarScanner for MSBuild has been renamed to the [SonarScanner for .NET](/analysis/scan/sonarscanner-for-msbuild/)\\n\\n**New Code Period values simplified (8.0, 8.4)**  \\nIt's now easier to set your New Code Period in the UI. With the new settings, specific analysis has replaced setting the New Code Period to a specific date or version. If you were using a specific date or version for your New Code Period, now you'll need to use a specific analysis. \\n\\nIt is now also possible to set the New Code Period to be defined against an already analyzed branch, mimicking the New Code Period of what were previously short-lived branches.\\n\\nSee the [Setting Your New Code Period](/project-administration/new-code-period/) for more info. ([MMF-1579](https://jira.sonarsource.com/browse/MMF-1579)).\\n\\n**Security Hotspots in the built-in Quality Gate (8.3)**   \\nWe've added a new condition to the built-in \\\"Sonar way\\\" Quality Gate to make sure all Security Hotspots on New Code are reviewed. The Quality Gate fails if the percentage of new Hotspots reviewed is less than 100%. ([MMF-1907](https://jira.sonarsource.com/browse/MMF-1907)).\\n\\n**Jenkins automatic branch and Pull Request detection (8.3)**  \\nWith [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) and [above](https://www.sonarsource.com/plans-and-pricing/), Scanners now automatically detect branches and Pull Requests in Jenkins Multibranch Pipelines. You no longer need to pass branch and Pull Request parameters. When upgrading from Community Edition or an old commercial edition version, the branch name in your SonarQube project needs to match the branch name in your code repository to continue writing history to the branch. Because SonarQube names the Main Branch \\\"master\\\" by default, you may have to rename it before running analysis again. See the [Jenkins CI Integration](/analysis/jenkins/) page for more information. ([MMF-1676](https://jira.sonarsource.com/browse/MMF-1676)).\\n\\n**Updated .NET code coverage (8.3)**  \\nThe code coverage for .NET projects now takes into account the branch/condition coverage in addition to the line coverage. The coverage of your projects may decrease to be closer to reality, and it can impact your Quality Gate. (See more details [here](https://community.sonarsource.com/t/c-vb-net-sonarqube-and-sonarcloud-support-branch-condition-coverage-data/22384)).\\n\\n**Support for `.exec` format JaCoCo Coverage Reports dropped (8.2)**  \\nThe `.exec` format for JaCoCo coverage reports is no longer supported.\\n\\nOnce upgraded, you will only be able to import `.xml` style reports. You should ensure that you are now [Importing JaCoCo coverage reports in XML format](https://community.sonarsource.com/t/coverage-test-data-importing-jacoco-coverage-report-in-xml-format/12151).\\n\\n**Short-lived and Long-lived branches are now just branches (8.1, 8.4)**  \\nThe concept for branches is now simplified, with a single way to handle all of them. ([MMF-1786](https://jira.sonarsource.com/browse/MMF-1786)).\\n* Analysis is the same for all branches. The parameter `sonar.branch.target` is no longer used and can be removed.\\n* All branches behave as previous Long-lived branches: all measures are available. The New Code period is configurable and starts by default after the first analysis. The Quality Gate check applies on all conditions.\\n* As a consequence, branches that were previously Short-Lived branches may display incomplete measures before they are analyzed again. With the first analysis, measures on New Code and the Quality Gate status may change.\\n* New housekeeping settings replace the Long-lived branch pattern and allow you to choose the branches which should be kept when inactive.\\n* Detection of new issues in branches and PRs is simplified. The list of issues reported as new may change slightly. ([SONAR-12627](https://jira.sonarsource.com/browse/SONAR-12627)).\\n\\n## Integration\\n**GitHub Enterprise compatibility (8.9)**  \\nSonarQube 8.9 only supports GitHub Enterprise 2.21+ for pull request decoration (the previous minimum version was 2.15).\\n\\n**Azure DevOps Services and Bitbucket Cloud are now supported (8.7)**  \\nSonarQube now officially supports Azure DevOps Services and Bitbucket Cloud. If you were running analysis using Bitbucket Pipelines previously, when you upgrade, the Main branch name in your SonarQube project needs to match the branch name in your code repository to continue writing history to the branch. You may have to rename it before running analysis again.\\n\\n**Analysis summary for GitHub Pull Requests (8.3)**\\n* Pull Request analysis can be shown under the Conversation tab in GitHub. You can enable or disable it at **Project Settings > General Settings > Pull Request Decoration**. \\n* If you already have Pull Request analysis under the GitHub Checks tab, you'll need to update your GitHub App to give Pull Requests read & write access. For more information see [Pull Requests](/analysis/pull-request/). ([MMF-1892](https://jira.sonarsource.com/browse/MMF-1892)).\\n\\n**Configuration of Pull Request decoration (8.1)**  \\nThe configuration of Pull Request decoration changes. Previous settings are replaced by a new configuration in the UI. Also, decoration of Pull Requests now supports multiple instances of a same ALM provider in Enterprise Edition and above. ([MMF-1814](https://jira.sonarsource.com/browse/MMF-1814)).\\n\\n## Operations\\n**Plugins require risk consent (8.9)**  \\nWhen upgrading, if you're using plugins, a SonarQube administrator needs to acknowledge the risk involved with plugin installation when prompted in SonarQube. ([MMF-2301](https://jira.sonarsource.com/browse/MMF-2301)).\\n\\n**Database support updated (8.9)**  \\nSonarQube 8.9 supports the following database versions:\\n\\n* PostgreSQL versions 9.6 to 13. PostgreSQL versions <9.6 are no longer supported.\\n* MSSQL Server 2014, 2016, 2017, and 2019.\\n* Oracle XE, 12C, 18C, and 19C. Oracle 11G is no longer supported.\\n\\n**Webhooks aren't allowed to target the instance (8.9)**  \\nTo improve security, webhooks, by default, aren't allowed to point to the SonarQube server. You can change this behavior in the configuration. ([SONAR-14682](https://jira.sonarsource.com/browse/SONAR-14682)).\\n\\n**Docker Images for commercial SonarQube Editions (8.2, 8.7)**  \\nIf you wish to deploy SonarQube in a containerized environment, we recommend using the Docker Images provided by SonarSource available on [Docker Hub](https://hub.docker.com/_/sonarqube), now for all SonarQube editions. \\n\\n**Microsoft SQL Server and Integrated Authentication (8.7)**  \\nIf you are using Microsoft SQL Server with Integrated Authentication, you will need to replace the `sqljdbc_auth.dll` file on your `PATH` with `mssql-jdbc_auth-9.2.0.x64.dll` from the [Microsoft SQL JDBC Driver 9.2.0 package](https://docs.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver15#92). See [Install the Server](/setup/install-server/) for more information.\\n\\n**Elasticsearch update and change in cluster configuration (8.6)**  \\nFor non-DCE editions, the Elasticsearch upgrade doesn't change the configuration. SonarQube automatically binds to the loopback address an additional Elasticsearch port which can be configured optionally.  \\n\\nWhen running a cluster with Data Center Edition, the configuration of search nodes has changed. The old search properties will now fail. You need to configure two new sets of properties. See [Configure and Operate a Cluster](/setup/operate-cluster/) for more information.  \\n\\nWe recommend only giving external access to the application nodes and to the main port. ([SONAR-12686](https://jira.sonarsource.com/browse/SONAR-12686)).\\n\\n**Upgrade simplified: Languages, Git and SVN, LDAP/GitHub/SAML support now built-in (8.0, 8.5)**  \\nAll plugins related to languages, Git/SVN support, and LDAP/GitHub/SAML authentication are now built into SonarQube itself. If you were using these plugins, you need to remove them from your extensions/plugins directory before upgrading. Read more in this community guide: [SonarQube v8.5 and Beyond: Where did all the plugins go?](https://community.sonarsource.com/t/sonarqube-v8-5-and-beyond-where-did-all-the-plugins-go/32792) ([MMF-2042](https://jira.sonarsource.com/browse/MMF-2042))\\n\\n**Updated system settings recommendation (8.4)**  \\nIn previous versions, the recommended limits regarding threads, file descriptors, and vm.max_map_count were taken from Elasticsearch dependencies. This release can reach these limits occasionally, so we recommend increasing the following settings of your OS when upgrading:\\n\\n* `vm.max_map_` count is greater than or equal to 524288\\n* `fs.file-max` is greater than or equal to 131072\\n* the user running SonarQube can open at least 131072 file descriptors\\n* the user running SonarQube can open at least 8192 threads\\n\\nFor more information, see the [Requirements](/requirements/requirements/) documentation. \\n\\n**Project, Application, and Portfolio availability when rebuilding Elasticsearch indexes (8.4)**  \\nFrom now on if your upgrade requires the rebuild of Elasticsearch indexes, your projects and Applications will become available as they are reindexed. Portfolios won't be available until all projects are reindexed. ([MMF-2010](https://jira.sonarsource.com/browse/MMF-2010))\\n\\n**Deprecated configuration (8.2)**  \\nThe old way of referencing environment variables in server configuration is deprecated and replaced with the support of default environment variables. ([SONAR-13113](https://jira.sonarsource.com/browse/SONAR-13113)).\\n\\n## User Interface\\n**Applications on the Projects page (8.3)**  \\n[Applications](/user-guide/applications/) are now found on the Projects page. You can filter, favorite, and tag applications like you can with projects. ([MMF-1382](https://jira.sonarsource.com/browse/MMF-1382)).\\n\\n**Security Hotspots: dedicated space and workflow (8.2)**  \\n* The Security Hotspots have a brand new space where developers can perform security reviews. The review process has been simplified. It's no longer necessary to transform a Security Hotspot into a Manual Vulnerability and back. A developer can now simply mark a Security Hotspot as Safe, Fixed, or leave it as-is if more time is needed. ([MMF-1868](https://jira.sonarsource.com/browse/MMF-1868)).\\n* Manual Vulnerabilities created from Security Hotspots are migrated to Security Hotspots with the status \\\"To Review\\\". A comment \\\"Migrated from Manual Vulnerability\\\" is added to the review history to recognize them.  \\n* The formula to compute the Security Review Rating, which was previously only available at the portfolio level, has been updated to be more meaningful. Historical values for this indicator have been removed to avoid confusion. ([MMF-1890](https://jira.sonarsource.com/browse/MMF-1890)).\\n* A Security Hotspots Reviewed metric has been added and is available to Quality Gates along with the Security Review Rating.\\n\\n**New project homepage (8.2)**  \\nThe project homepage has been redesigned to focus on New Code. ([MMF-1886](https://jira.sonarsource.com/browse/MMF-1886)). Projects details are now tucked into a new \\\"Project information\\\" pane. The project administration menu has been renamed \\\"Project Settings\\\".\\n\\n## Web/Plugin API\\n**Deprecated web services have been dropped (8.1, 8.8)**  \\nWeb services that were deprecated in 6.x versions have been dropped. ([SONAR-13848](https://jira.sonarsource.com/browse/SONAR-13848)).\\n\\n**Changes in web services and plugin APIs (8.4)**  \\nThe format of several IDs exposed in web services changed and their use is deprecated. See [SONAR-13248](https://jira.sonarsource.com/browse/SONAR-13248), [SONAR-13249](https://jira.sonarsource.com/browse/SONAR-13249), and [SONAR-13300](https://jira.sonarsource.com/browse/SONAR-13300).  \\nA related change is introduced in a plugin API method. See [SONAR-13420](https://jira.sonarsource.com/browse/SONAR-13420).\\n\"},{\"path\":\"setup/operate-cluster\",\"content\":\"---\\ntitle: Configure & Operate a Cluster\\nurl: /setup/operate-cluster/\\n---\\n\\n_High availability and cluster scalability are features of the [Data Center Edition](https://redirect.sonarsource.com/editions/datacenter.html)._\\n\\nOnce the [SonarQube cluster is installed](/setup/install-cluster/), you have a high availability configuration that allows your SonarQube instance to stay up and running even if there is a crash or failure in one of the cluster's nodes. Your SonarQube cluster is also scalable, and you can add application nodes to increase your computing capabilities.\\n\\n## Start, Stop, or Upgrade the Cluster\\n\\n### Start the Cluster\\nTo start a cluster, you need to follow these steps in order:\\n\\n1. Start the search nodes\\n1. Start the application nodes\\n\\n### Stop the Cluster\\nTo stop a cluster, you need to follow these steps in order:\\n\\n1. Stop the application nodes\\n1. Stop the search nodes\\n\\n### Upgrade SonarQube\\n1. Stop the cluster.\\n1. Upgrade SonarQube on all nodes (application part, plugins, JDBC driver if required) following the usual upgrade procedure but without triggering the /setup phase.\\n1. Once all nodes have the same binaries: restart the cluster.\\n1. At this point, only one of the application nodes is up. Try to access `node_ip:port/setup` on each application node, and trigger the setup operation on the one that responds.\\n\\n## Start or Stop a Node\\nYou can start or stop a single node in the same way as starting and stopping an instance using a single server. By default, it's a graceful shutdown where no new analysis report processing can start, but the tasks in progress are allowed to finish.\\n\\n## Install or Upgrade a Plugin\\n1. Stop the application nodes.\\n1. Install or upgrade the plugin on the application nodes.\\n\\t* If upgrading, remove the old version.\\n\\t* You don't need to install plugins on search nodes.\\n1. Restart the application nodes.\\n\\n## Scalability\\nYou have the option of adding application nodes (up to 10 total application nodes) to your cluster to increase computing capabilities. \\n\\n### Scaling in a Traditional Environment\\n\\n#### **Adding an Application Node**\\nTo add an Application Node:\\n\\n1. Configure your new application node in sonar.properties. The following is an example of the configuration to be added to sonar.properties for a sixth application node (server6, ip6) in a cluster with the default five servers:\\n\\n\\t**server6**\\n\\t```\\n\\t...\\n\\tsonar.cluster.enabled=true\\n\\tsonar.cluster.node.type=application\\n\\tsonar.cluster.node.host=ip6 \\n\\tsonar.cluster.node.port=9003\\n\\tsonar.cluster.hosts=ip1,ip2,ip6\\n\\tsonar.cluster.search.hosts=ip3:9001,ip4:9001,ip5:9001\\n\\tsonar.auth.jwtBase64Hs256Secret=YOURGENERATEDSECRET\\n\\t...\\n\\t```\\n2. Update the configuration of the preexisting nodes to include your new node. \\n\\n\\tWhile you don't need to restart the cluster after adding a node, you should ensure the configuration is up to date on all of your nodes to avoid issues when you eventually do need to restart.\\n\\n#### **Removing an Application Node**\\nWhen you remove an application node, make sure to update the configuration of the remaining nodes. Much like adding a node, while you don't need to restart the cluster after removing a node, you should ensure the configuration is up to date on all of your nodes to avoid issues when you eventually do need to restart.\\n\\n### Scaling in a Docker Environment\\n\\n#### **Adding Application Nodes**\\n\\nIf you're using docker-compose, you can scale the application nodes using the following command:\\n\\n`docker-compose up -d --scale sonarqube=3`\\n\\n#### Removing Application Nodes\\nYou can reduce the number of application nodes with the same command used to add application nodes by lowering the number.\\n\\n## Monitoring\\nCPU and RAM usage on each node have to be monitored separately with an APM. \\n\\nIn addition, we provide a Web API _api/system/health_ you can use to validate that all of the nodes in your cluster are operational.  \\n\\n* GREEN: SonarQube is fully operational\\n* YELLOW: SonarQube is usable, but it needs attention in order to be fully operational\\n* RED: SonarQube is not operational\\n\\nTo call it from a monitoring system without having to give admin credentials, it is possible to setup a system passcode. You can configure this through the `sonar.web.systemPasscode` property in _$SONARQUBE-HOME/conf/sonar.properties_ if you're using a traditional environment or through the corresponding environment variable if you're using a Docker environment.\\n\\n### Cluster Status\\nOn the System Info page at **Administration > System**, you can check whether your cluster is running safely (green) or has some nodes with problems (orange or red).\\n\\n### Maximum Pending Time for Tasks\\nOn the global Background Tasks page at **Administration > Projects > Background Tasks**, you can see the number of **pending** tasks as well as the maximum **pending time** for the tasks in the queue. This shows the pending time of the oldest background task waiting to be processed. You can use this to evaluate if it might be worth configuring additional Compute Engine workers (Enterprise Edition) or additional nodes (Data Center Edition) to improve SonarQube performance. \\n\\n## Compute Engine Workers\\nIf you change the number of [Compute Engine workers](/instance-administration/compute-engine-performance/) in the UI, you must restart each application node to have the change take effect.\\n\\n## Project Move\\nWhen the [Project Move](/instance-administration/project-move/) feature is used in a DC installation:\\n\\n* Projects are exported on only one of the application nodes \\n* The archive of the exported projects must be copied to all the applications nodes in the target server\\n\\n## Configuration details\\nThere are three TCP networks to configure: \\n\\n- the network of application nodes that relies on Hazelcast.\\n- the network used for Elasticsearch internal communication between search nodes (`es` properties).\\n- the network between application nodes and search nodes (`search` properties).\\n\\n[Hazelcast](https://hazelcast.org/) is used to manage the communication between the cluster's application nodes. You don't need to install it yourself, it's provided out of the box.\\n\\n## Docker Environment Configuration\\nIn a Docker environment, your properties are configured using [Environment Variables](/setup/environment-variables/).\\n\\n## Traditional Environment Configuration\\nThe following properties may be defined in the _$SONARQUBE-HOME/conf/sonar.properties_ file of each node in a cluster. When defining a property that contains a list of hosts (`*.hosts`) the port is not required if the default port was not overridden in the configuration.\\n\\n[[warning]]\\n| Ports can be unintentionally exposed. We recommend only giving external access to the application nodes and to main port (`sonar.web.port`).\\n\\n### All nodes\\nProperty | Description | Default | Required | \\n---|---|---|---|\\n`sonar.cluster.enabled`|Set to `true` in each node to activate the cluster mode|`false`|yes\\n`sonar.cluster.name`|The name of the cluster. **Required if multiple clusters are present on the same network.** For example this prevents mixing Production and Preproduction clusters. This will be the name stored in the Hazelcast cluster and used as the name of the Elasticsearch cluster.|`sonarqube`|no\\n`sonar.cluster.node.name`|The name of the node that is used on Elasticsearch and stored in Hazelcast member attribute (NODE_NAME) for sonar-application|`sonarqube-{UUID}`|no\\n`sonar.cluster.node.type`|Type of node: either `application` or `search`| |yes\\n\\n### Application nodes\\nProperty  | Description | Required \\n---|---|---\\n`sonar.cluster.hosts`|Comma-delimited list of all **application** hosts in the cluster. This value must contain **only application hosts**. Each item in the list must contain the port if the default `sonar.cluster.node.port` value is not used. Item format is `sonar.cluster.node.host` or `sonar.cluster.node.host:sonar.cluster.node.port`.|yes\\n`sonar.cluster.node.host`|IP address of the network card that will be used by Hazelcast to communicate with the members of the cluster.|yes\\n`sonar.cluster.node.port`|The Hazelcast port for communication with each application member of the cluster. Default: `9003`|no\\n`sonar.cluster.node.web.port`|The Hazelcast port for communication with the WebServer process. Port must be accessible to all other application nodes. If not specified, a dynamic port will be chosen and all ports must be open among the nodes.|no\\n`sonar.cluster.node.ce.port`|The Hazelcast port for communication with the ComputeEngine process. Port must be accessible to all other application nodes. If not specified, a dynamic port will be chosen and all ports must be open among the nodes.|no\\n`sonar.cluster.search.hosts`|Comma-delimited list of search hosts in the cluster. The list can contain either the host or the host and port, but not both. The item format is `sonar.cluster.node.search.host` for host only or`sonar.cluster.node.search.host:sonar.cluster.node.search.port` for host and port.| yes\\n`sonar.auth.jwtBase64Hs256Secret`|Required for authentication with multiple web servers. It is used to keep user sessions opened when they are redirected from one web server to another by the load balancer. See _$SONARQUBE-HOME/conf/sonar.properties_) for details about how to generate this secret key.| yes\\n\\n### Search nodes\\nProperty  | Description | Default | Required \\n---|---|---|---\\n`sonar.cluster.node.search.host`|Elasticsearch host of the current node used for HTTP communication between search and application nodes. IP must be accessible to all application nodes.|`127.0.0.1`|yes\\n`sonar.cluster.node.search.port`|Elasticsearch port of the current node used for HTTP communication between search and application nodes. Port must be accessible to all application nodes.|`9001`|yes\\n`sonar.cluster.es.hosts`|Comma-delimited list of search hosts in the cluster. The list can contain either the host or the host and port but not both. The item format is `sonar.cluster.node.es.host` for host only or`sonar.cluster.node.es.host:sonar.cluster.node.es.port` for host and port.| |yes\\n`sonar.cluster.node.es.host`|Elasticsearch host of the current node used by Elasticsearch internal communication to form a cluster (TCP transport).|localhost|yes\\n`sonar.cluster.node.es.port`|Elasticsearch port of the current node used by Elasticsearch internal communication to form a cluster (TCP transport). Port must be accessible to all other search nodes|9002| yes\\n`sonar.search.initialStateTimeout`|The timeout for the Elasticsearch nodes to elect a primary node. The default value will be fine in most cases, but in a situation where startup is failing because of a timeout, this may need to be adjusted. The value must be set in the format: `{integer}{timeunit}`. Valid `{timeunit}` values are: `ms` (milliseconds); `s` (seconds); `m` (minutes); `h` (hours); `d` (days); `w` (weeks)|cluster: 120s; standalone: 30s|no\\n\\n### Elasticsearch authentication\\n\\n[[info]]\\n| This configuration is optional. To secure access to your setup, you may want to first limit access to the nodes in your network. Elasticsearch authentication just adds another layer of security.\\n\\n[[warning]]\\n| When creating the PKCS#12 container, make sure it is created with an algorithm that is readable by Java 11.\\n\\nFor Elasticsearch authentication, the following properties need to be configured on specific nodes:\\n\\n#### Application nodes\\nProperty  | Description | Default | Required\\n---|---|---|---\\n`sonar.cluster.search.password`|Password for Elasticsearch built-in user (elastic) which will be used on the client site. If provided, it enables authentication. If this property is set, `sonar.cluster.search.password` on the search nodes must also be set to exact same value.| |no\\n\\n#### Search nodes\\nProperty  | Description | Default | Required\\n---|---|---|---\\n`sonar.cluster.search.password`|Password for Elasticsearch built-in user (elastic) which will be set in ES. If provided, it enables authentication, and the instance will require additional properties to be set. If this property is set, `sonar.cluster.search.password` on the application nodes must also be set to exact same value.| |no\\n`sonar.cluster.es.ssl.keystore`|File path to a keystore in PKCS#12 format. The user running SonarQube must have READ permission to that file. Required if password provided.| |no\\n`sonar.cluster.es.ssl.truststore`|File path to a truststore in PKCS#12 format. The user running SonarQube must have READ permission to that file. Required if password provided.| |no\\n`sonar.cluster.es.ssl.keystorePassword`|Password to the keystore.| |no\\n`sonar.cluster.es.ssl.truststorePassword`|Password to the truststore.| | no\\n\\nWhen you're using the SonarSource Docker images, the truststore/keystore should be provided as volumes. \\nOn Kubernetes, you need to create a new Secret from the truststore/keystore and provide the name to the Helm chart.\\n\\n## Secure your Network\\n\\nTo further lock down the communication in between the nodes in your SonarQube Cluster, you can define the following network rules:\\n\\nProtocol | Source | Destination | Port | default\\n---|---|---|---|---\\nTCP | Reverse Proxy | App Node | `sonar.web.port` | 9000\\nTCP | App Node | Search Node | `sonar.cluster.node.search` | 9001\\nTCP | Search Node | Search Node | `sonar.cluster.node.es.port` | 9002\\nTCP | App Node | App Node | `sonar.cluster.node.port` | 9003\\n\\nyou can further segrement your network configuration if you specify a frontend, a backend and a search network.  \\n\\nNetwork | Parameter | Description\\n---|---|---\\nFrontend | `sonar.web.host` \\t\\t\\t\\t| Frontend HTTP Network\\nBackend  | `sonar.cluster.node.host` \\t\\t| Backend App to App Network\\nBackend  | `sonar.cluster.search.hosts`     | Backend App to Search Network\\nSearch   | `sonar.cluster.node.search.host` | Backend Search to Search Network\\n\\n## Limitations\\n* Cluster downtime is required for SonarQube upgrades or plugin installations.\\n* All application nodes must be stopped when installing, uninstalling, or upgrading a plugin.\\n* Plugins are not shared, meaning if you install/uninstall/upgrade a given plugin on one application node, you need to perform the same actions on the other application node.\\n* There is no way to perform actions on the cluster from a central app - all operations must be done manually on each node of the cluster.\\n\\n## Frequently Asked Questions\\n\\n### Does Elasticsearch discover automatically other ES nodes? \\nNo. Multicast is disabled. All hosts (IP+port) must be listed.\\n\\n### Can different nodes run on the same machine? \\nYes, but it's best to have one machine for each node to be resilient to failures. To maintain an even higher level of availability, each of your three search nodes can be located in a separate availability zone *within the same region*.\\n\\n### Can the members of a cluster be discovered automatically? \\nNo, all nodes must be configured in _$SONARQUBE-HOME/conf/sonar.properties_\\n\\n### My keystore/truststore cannot be read by SonarQube\\nMake sure that the keystore/truststore in question was generated with an algorithm that is known to Java 11. See [JDK-8267599](https://bugs.openjdk.java.net/browse/JDK-8267599) for reference\"},{\"path\":\"setup/operate-server\",\"content\":\"---\\ntitle: Operating the Server\\nurl: /setup/operate-server/\\n---\\n\\n## Running SonarQube as a Service on Windows\\n\\n### Installing SonarQube as a service\\n\\n[[warning]]\\n| When installing SonarQube as a service on Windows, the path to the executable should be quoted to prevent unquoted service path attacks. \\n\\n```\\n> sc create SonarQube binPath= \\\"\\\\\\\"%SONAR_HOME%\\\\bin\\\\windows-x86-64\\\\wrapper.exe\\\\\\\" -s \\\\\\\"%SONAR_HOME%\\\\conf\\\\wrapper.conf\\\\\\\"\\\"\\n```\\n\\n### Start or Stop the Service\\n\\n```\\n> \\\"%SONAR_HOME%\\\\bin\\\\windows-x86-64\\\\StartNTService.bat\\\"\\n> \\\"%SONAR_HOME%\\\\bin\\\\windows-x86-64\\\\StopNTService.bat\\\"\\n```\\n**Note:** `> \\\"%SONAR_HOME%\\\\bin\\\\windows-x86-64\\\\StopNTService.bat\\\"` does a graceful shutdown where no new analysis report processing can start, but the tasks in progress are allowed to finish. The time a stop will take depends on the processing time of the tasks in progress. You'll need to kill all SonarQube processes manually to force a stop.\\n\\n## Running SonarQube Manually on Linux\\n\\n### Start or Stop the Instance\\n\\n```\\nStart:\\n$SONAR_HOME/bin/linux-x86-64/sonar.sh start\\n\\nGraceful shutdown:\\n$SONAR_HOME/bin/linux-x86-64/sonar.sh stop\\n\\nHard stop:\\n$SONAR_HOME/bin/linux-x86-64/sonar.sh force-stop\\n```\\n**Note:** Stop does a graceful shutdown where no new analysis report processing can start, but the tasks in progress are allowed to finish. The time a stop will take depends on the processing time of the tasks in progress. Use force stop for a hard stop. \\n\\n## Running SonarQube as a Service on Linux with SystemD\\n\\nOn a Unix system using SystemD, you can install SonarQube as a service. You cannot run SonarQube as `root` in 'nix systems. Ideally, you will created a new account dedicated to the purpose of running SonarQube.\\nLet's suppose:\\n\\n* The user used to start the service is `sonarqube`\\n* The group used to start the service is `sonarqube`\\n* The Java Virtual Machine is installed in `/opt/java/`\\n* SonarQube has been unzipped into `/opt/sonarqube/`\\n\\nThen create the file `/etc/systemd/system/sonarqube.service` _based on_ the following \\n\\n```\\n[Unit]\\nDescription=SonarQube service\\nAfter=syslog.target network.target\\n\\n[Service]\\nType=simple\\nUser=sonarqube\\nGroup=sonarqube\\nPermissionsStartOnly=true\\nExecStart=/bin/nohup /opt/java/bin/java -Xms32m -Xmx32m -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/lib/sonar-application-8.5.jar\\nStandardOutput=syslog\\nLimitNOFILE=131072\\nLimitNPROC=8192\\nTimeoutStartSec=5\\nRestart=always\\nSuccessExitStatus=143\\n\\n[Install]\\nWantedBy=multi-user.target\\n```\\n**Note**\\n* Because the sonar-application jar name ends with the version of SonarQube, you will need to adjust the `ExecStart` command accordingly on install and at each upgrade.\\n* The SonarQube data directory, `/opt/sonarqube/data`, and the extensions directory, `/opt/sonarqube/extensions` should be owned by the `sonarqube` user. As a good practice, the rest should be owned by `root`\\n\\nOnce your `sonarqube.service` file is created and properly configured, run:\\n```\\nsudo systemctl enable sonarqube.service\\nsudo systemctl start sonarqube.service\\n```\\n\\n## Running SonarQube as a Service on Linux with initd\\n\\nThe following has been tested on Ubuntu 8.10 and CentOS 6.2.\\n\\nCreate the file /etc/init.d/sonar with this content:\\n\\n```\\n#!/bin/sh\\n#\\n# rc file for SonarQube\\n#\\n# chkconfig: 345 96 10\\n# description: SonarQube system (www.sonarsource.org)\\n#\\n### BEGIN INIT INFO\\n# Provides: sonar\\n# Required-Start: $network\\n# Required-Stop: $network\\n# Default-Start: 3 4 5\\n# Default-Stop: 0 1 2 6\\n# Short-Description: SonarQube system (www.sonarsource.org)\\n# Description: SonarQube system (www.sonarsource.org)\\n### END INIT INFO\\n \\n/usr/bin/sonar $*\\n```\\n\\nRegister SonarQube at boot time (RedHat, CentOS, 64 bit):\\n\\n```\\nsudo ln -s $SONAR_HOME/bin/linux-x86-64/sonar.sh /usr/bin/sonar\\nsudo chmod 755 /etc/init.d/sonar\\nsudo chkconfig --add sonar\\n```\\nOnce registration is done, run:\\n```\\nsudo service sonar start\\n```\\n\\n## Securing the Server Behind a Proxy\\n\\nThis section helps you configure the SonarQube Server if you want to run it behind a proxy. This can be done for security concerns or to consolidate multiple disparate applications. To run the SonarQube server over HTTPS, see the HTTPS Configuration section below.\\n\\n[[warning]]\\n|For security reasons, we recommend only giving external access to the main port.\\n\\n### Using an Apache Proxy\\n\\nWe assume that you've already installed Apache 2 with module mod\\\\_proxy, that SonarQube is running and available on `http://private_sonar_host:sonar_port/`, and that you want to configure a Virtual Host for `www.public_sonar.com`.\\n\\nAt this point, edit the HTTPd configuration file for the `www.public_sonar.com` virtual host. Include the following to expose SonarQube via `mod_proxy` at `http://www.public_sonar.com/`:\\n\\n```\\nProxyRequests Off\\nProxyPreserveHost On\\n<VirtualHost *:80>\\n  ServerName www.public_sonar.com\\n  ServerAdmin admin@somecompany.com\\n  ProxyPass / http://private_sonar_host:sonar_port/\\n  ProxyPassReverse / http://www.public_sonar.com/\\n  ErrorLog logs/somecompany/sonar/error.log\\n  CustomLog logs/somecompany/sonar/access.log common\\n</VirtualHost>\\n```\\n\\nApache configuration is going to vary based on your own application's requirements and the way you intend to expose SonarQube to the outside world. If you need more details about Apache HTTPd and mod\\\\_proxy, please see [http://httpd.apache.org](http://httpd.apache.org).\\n\\n### Using Nginx\\n\\nWe assume that you've already installed Nginx, that you are using a Virtual Host for www.somecompany.com and that SonarQube is running and available on `http://sonarhost:sonarport/`.\\n\\nAt this point, edit the Nginx configuration file. Include the following to expose SonarQube at http://www.somecompany.com/:\\n\\n```\\n# the server directive is Nginx's virtual host directive\\nserver {\\n  # port to listen on. Can also be set to an IP:PORT\\n  listen 80;\\n  # sets the domain[s] that this vhost server requests for\\n  server_name www.somecompany.com;\\n  location / {\\n    proxy_pass http://sonarhost:sonarport;\\n  }\\n}\\n```\\n\\nNginx configuration will vary based on your own application's requirements and the way you intend to expose SonarQube to the outside world. If you need more details about Nginx, please see [https://www.nginx.com/resources/admin-guide/reverse-proxy/](https://www.nginx.com/resources/admin-guide/reverse-proxy/).\\n\\nNote that you may need to increase the max URL length since SonarQube requests can have URLs longer than 2048.\\n\\n### Using IIS\\n\\nPlease see: [http://blog.jessehouwing.nl/2016/02/configure-ssl-for-sonarqube-on-windows.html](http://blog.jessehouwing.nl/2016/02/configure-ssl-for-sonarqube-on-windows.html)\\n\\nNote that the setup described in this blog post is not appropriate for SAML through IIS.\\n\\n### HTTPS Configuration\\n\\nThe reverse proxy must be configured to set the value `X_FORWARDED_PROTO: https` in each HTTP request header. Without this property, redirection initiated by the SonarQube server will fall back on HTTP.\\n\\nFor example, with Nginx as a reverse proxy, you can paste the following or a similar snippet into the configuration file: \\n\\n ```\\n# the server directive is Nginx's virtual host directive\\nserver { \\n  # port to listen on. Can also be set to an IP:PORT\\t\\n  listen 443 ssl;\\n  ssl_certificate ${path_to_your_certificate_file}\\n  ssl_certificate_key ${path_to_your_certificate_key_file}\\n  location / {\\n    proxy_pass ${address_of_your_sonarqube_instance_behind_proxy}\\n    proxy_set_header Host $host;\\n    proxy_set_header X-Forwarded-For $remote_addr;\\n    proxy_set_header X-Forwarded-Proto https;\\n  }\\n}\\n```\\n\\n## Secure your Network\\n\\nTo further lock down the communication in between the reverse proxy and SonarQube, you can define the following network rules: \\n\\nProtocol | Source | Destination | Port | default\\n---|---|---|---|---\\nTCP | Reverse Proxy | SonarQube | `sonar.web.port` | 9000\\nTCP | SonarQube | SonarQube | `sonar.search.port` | 9001\\nTCP | SonarQube | SonarQube | `sonar.es.port` | random\\n\\nyou can further segrement your network configuration if you specify a frontend network and keep Elasticsearch restricted to the loopback NiC.  \\n\\nNetwork | Parameter | Description | default\\n---|---|---|---\\nFrontend       | `sonar.web.host` \\t\\t\\t| Frontend HTTP Network | 0.0.0.0\\nElasticsearch  | `sonar.search.host` \\t\\t| Elasticsearch Network | 127.0.0.1\"},{\"path\":\"setup/overview\",\"content\":\"---\\ntitle: Overview\\nurl: /setup/overview/\\n---\\n\\n### Try out SonarQube\\nTo try out the SonarQube platform, follow the [Try Out SonarQube](/setup/get-started-2-minutes/) guide.\\n\\n### Install a production instance\\nTo install a production instance, read the [Requirements](/requirements/requirements/), and then follow the [Installation Guide](/setup/install-server/).\\n\\n### After the installation\\nAfter your server is up and running, you'll need to install one or more [SonarScanners](/analysis/overview/) on the machines where analysis will be performed.\\n\\n### Upgrade your production instance\\nTo upgrade your production instance, read the [Upgrade Guide](/setup/upgrading/) and the relevant, version-specific upgrade notes.\\n\"},{\"path\":\"setup/sonar-properties\",\"content\":\"---\\ntitle: Environment Variables\\nurl: /setup/environment-variables/\\n---\\n\\nThis page provides environment variables used for configuring SonarQube with Docker. The values provided in the following environment variables are the default values.\\n\\n## Database\\n\\n[[info]]\\n|- The embedded H2 database is used by default. It is recommended for tests but not for production use. Supported databases are Oracle, PostgreSQL, and Microsoft SQLServer.\\n|- Changes to the database connection URL (sonar.jdbc.url) can affect SonarSource licensed products.\\n\\n### User Credentials\\n\\n**`SONAR_JDBC_USERNAME=`**  \\n**`SONAR_JDBC_PASSWORD=`**  \\nPermissions to create tables, indices, and triggers must be granted to JDBC user. The schema must be created first.  \\n\\n### Embedded Database (default)\\n\\n**`SONAR_EMBEDDEDDATABASE_PORT=9092`**  \\nH2 embedded database server listening port, defaults to 9092.  \\n\\n### Oracle 12c/18c/19c\\n\\n**`SONAR_JDBC_URL=jdbc:oracle:thin:@localhost:1521/XE`**  \\nThe Oracle JDBC driver must be copied into the directory extensions/jdbc-driver/oracle/. Only the thin client is supported, and we recommend using the latest Oracle JDBC driver. See https://jira.sonarsource.com/browse/SONAR-9758 for more details. If you need to set the schema, please refer to http://jira.sonarsource.com/browse/SONAR-5000.\\n\\n### PostgreSQL 9.6 or greater\\n\\n**`SONAR_JDBC_URL=jdbc:postgresql://localhost/sonarqube?currentSchema=my_schema`**  \\nBy default the schema named \\\"public\\\" is used. It can be overridden with the parameter \\\"currentSchema\\\".\\n\\n### Microsoft SQLServer 2014/2016/2017/2019 and SQL Azure\\n\\n**`SONAR_JDBC_URL=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true`**  \\nA database named sonar must exist and its collation must be case-sensitive (CS) and accent-sensitive (AS). Use this connection string if you want to use integrated security with Microsoft Sql Server. Do not set the `SONAR_JDBC_USERNAME` or `SONAR_JDBC_PASSWORD` property if you are using Integrated Security. \\n\\nFor Integrated Security to work, you have to download the Microsoft SQL JDBC Driver 9.2.0 package [here](https://docs.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver15#92) and copy mssql-jdbc_auth-9.2.0.x64.dll to your path.\\n\\n**`SONAR_JDBC_URL=jdbc:sqlserver://localhost;databaseName=sonar`**  \\nUse this connection string if you want to use SQL Auth while connecting to MS Sql Server. Set the `SONAR_JDBC_USERNAME` and `SONAR_JDBC_PASSWORD` appropriately.\\n\\n### Connection pool settings\\n\\n**`SONAR_JDBC_MAXACTIVE=60`**   \\nThe maximum number of active connections that can be allocated at the same time, or negative for no limit. The recommended value is 1.2 * max sizes of HTTP pools. For example, if HTTP ports are enabled with default sizes (50, see property `sonar.web.http.maxThreads`) then `SONAR_JDBC_MAXACTIVE` should be 1.2 * 50 = 60.\\n\\n**`SONAR_JDBC_MAXIDLE=5`**  \\nThe maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit.\\n\\n**`SONAR_JDBC_MINIDLE=2`**  \\nThe minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none.\\n\\n**`SONAR_JDBC_MAXWAIT=5000`**  \\nThe maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or <= 0 to wait indefinitely.\\n\\n**`SONAR_JDBC_MINEVICTABLEIDLETIMEMILLIS=600000`**  \\n**`SONAR_JDBC_TIMEBETWEENEVICTIONRUNSMILLIS=30000`**\\n\\n## Web Server\\n\\n**`SONAR_WEB_JAVAOPTS=`**  \\nthe web server is executed in a dedicated Java process. Use this property to customize JVM options.\\n\\n[[info]]\\n| The HotSpot Server VM is recommended. The property -server should be added if server mode\\n| is not enabled by default on your environment. See [here](http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html).\\n|\\n| Startup can be long if the entropy source is short of entropy. Adding\\n| -Djava.security.egd=file:/dev/./urandom is an option to resolve the problem. See [Here](https://cwiki.apache.org/confluence/display/TOMCAT/HowTo+FasterStartUp#HowToFasterStartUp-EntropySource)\\n\\n**`SONAR_WEB_JAVAADDITIONALOPTS=`**  \\nSame as previous property, but allows to not repeat all other settings like -Xmx\\n\\n**`SONAR_WEB_HOST=0.0.0.0`**  \\nBinding IP address. For servers with more than one IP address, this property specifies which address will be used for listening on the specified ports. By default, ports will be used on all IP addresses associated with the server.\\n\\n**`SONAR_WEB_CONTEXT=`**\\nWeb context. When set, it must start with a forward slash (for example /sonarqube).\\nThe default value is root context (empty value).\\n\\n**`SONAR_WEB_PORT=9000`**  \\nTCP port for incoming HTTP connections. Default value is 9000.\\n\\n**`SONAR_WEB_HTTP_MAXTHREADS=50`**  \\nThe maximum number of connections that the server will accept and process at any given time. When this number has been reached, the server will not accept any more connections until the number of connections falls below this value. The operating system may still accept connections based on the `SONAR_WEB_CONNECTIONS_ACCEPTCOUNT` property. The default value is 50.\\n\\n**`SONAR_WEB_HTTP_MINTHREADS=5`**  \\nThe minimum number of threads always kept running. The default value is 5.\\n\\n**`SONAR_WEB_HTTP_ACCEPTCOUNT=25`**  \\nThe maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 25.\\n\\n**`SONAR_AUTH_JWTBASE64HS256SECRET=`**  \\nBy default users are logged out and sessions closed when server is restarted. If you prefer keeping user sessions open, a secret should be defined. Value is HS256 key encoded with base64. It must be unique for each installation of SonarQube. Example of command-line:  \\necho -n \\\"type_what_you_want\\\" | openssl dgst -sha256 -hmac \\\"key\\\" -binary | base64\\n\\n**`SONAR_WEB_SESSIONTIMEOUTINMINUTES=4320`**  \\nThe inactivity timeout duration of user sessions, in minutes. After the configured period of time, the user is logged out. The default value is 3 days (4320 minutes). The value cannot be less than 6 minutes or greater than 3 months (129600 minutes). Value must be strictly positive.\\n\\n**`SONAR_WEB_SYSTEMPASSCODE=`**  \\nA passcode can be defined to access some web services from monitoring tools without having to use the credentials of a system administrator. Check the Web API documentation to know which web services are supporting this authentication mode. The passcode should be provided in HTTP requests with the header \\\"X-Sonar-Passcode\\\". By default feature is disabled.\\n\\n## SSO Authentication\\n\\n**`SONAR_WEB_SSO_ENABLE=false`**  \\nEnable authentication using HTTP headers  \\n\\n**`SONAR_WEB_SSO_LOGINHEADER=X-Forwarded-Login`**  \\nName of the header to get the user login. Only alphanumeric, '.' and '@' characters are allowed  \\n\\n**`SONAR_WEB_SSO_NAMEHEADER=X-Forwarded-Name`**  \\nName of the header to get the user name  \\n\\n**`SONAR_WEB_SSO_EMAILHEADER=X-Forwarded-Email`**  \\nName of the header to get the user email (optional)  \\n\\n**`SONAR_WEB_SSO_GROUPSHEADER=X-Forwarded-Groups`**  \\nName of the header to get the list of user groups, separated by comma (optional). If the SONAR_SSO_GROUPSHEADER is set, the user will belong to those groups if groups exist in SonarQube. If none of the provided groups exists in SonarQube, the user will only belong to the default group. Note that the default group will always be set.  \\n \\n**`SONAR_WEB_SSO_REFRESHINTERVALINMINUTES=5`**  \\nInterval used to know when to refresh name, email, and groups. During this interval, if for instance the name of the user is changed in the header, it will only be updated after X minutes. \\n\\n## LDAP Configuration\\n\\n**`SONAR_SECURITY_REALM=LDAP`**  \\nEnable the LDAP feature\\n\\n**`SONAR_AUTHENTICATOR_DOWNCASE=true`**  \\nSet to true when connecting to a LDAP server using a case-insensitive setup.\\n\\n**`LDAP_URL=ldap://localhost:10389`**  \\nURL of the LDAP server. Note that if you are using LDAPS, then you should install the server certificate into the Java truststore.\\n\\n**`LDAP_BINDDN=cn=sonar,ou=users,o=mycompany`**  \\nBind DN is the username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory (optional)\\n\\n**`LDAP_BINDPASSWORD=secret`**  \\nBind Password is the password of the user to connect with. Leave this blank for anonymous access to the LDAP directory (optional)\\n\\n**`LDAP_AUTHENTICATION=simple`**  \\nPossible values: simple | CRAM-MD5 | DIGEST-MD5 | GSSAPI See http://java.sun.com/products/jndi/tutorial/ldap/security/auth.html (default: simple)\\n\\n**`LDAP_REALM=example.org`**  \\nSee :\\n  * http://java.sun.com/products/jndi/tutorial/ldap/security/digest.html\\n  * http://java.sun.com/products/jndi/tutorial/ldap/security/crammd5.html\\n(optional)\\n\\n**`LDAP_CONTEXTFACTORYCLASS=com.sun.jndi.ldap.LdapCtxFactory`**  \\nContext factory class (optional)\\n\\n**`LDAP_STARTTLS=true`**  \\nEnable usage of StartTLS (default : false)\\n\\n**`LDAP_FOLLOWREFERRALS=false`**\\nFollow or not referrals. See http://docs.oracle.com/javase/jndi/tutorial/ldap/referral/jndi.html (default: true)\\n\\n### User Mapping\\n\\n**`LDAP_USER_BASEDN=cn=users,dc=example,dc=org`**  \\nDistinguished Name (DN) of the root node in LDAP from which to search for users (mandatory)\\n\\n**`LDAP_USER_REQUEST=(&(objectClass=user)(sAMAccountName={login}))`**  \\nLDAP user request. (default: (&(objectClass=inetOrgPerson)(uid={login})) )\\n\\n**`LDAP_USER_REALNAMEATTRIBUTE=name`**\\nAttribute in LDAP defining the user\u2019s real name. (default: cn)\\n\\n**`LDAP_USER_EMAILATTRIBUTE=email`**  \\nAttribute in LDAP defining the user\u2019s email. (default: mail)\\n\\n### Group Mapping\\n\\n**`LDAP_GROUP_BASEDN=cn=groups,dc=example,dc=org`**  \\nDistinguished Name (DN) of the root node in LDAP from which to search for groups. (optional, default: empty)\\n\\n**`LDAP_GROUP_REQUEST=(&(objectClass=group)(member={dn}))`**  \\nLDAP group request (default: (&(objectClass=groupOfUniqueNames)(uniqueMember={dn})) )\\n\\n**`LDAP_GROUP_IDATTRIBUTE=sAMAccountName`**  \\nProperty used to specifiy the attribute to be used for returning the list of user groups in the compatibility mode. (default: cn)\\n\\n## Compute Engine\\n\\n**`SONAR_CE_JAVAOPTS=**  \\nThe Compute Engine is responsible for processing background tasks.  \\nCompute Engine is executed in a dedicated Java process.  \\nUse the following property to customize JVM options.\\n\\n[[info]]\\n| The HotSpot Server VM is recommended. The property -server should be added if server mode\\n| is not enabled by default on your environment:\\n| http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html\\n\\n**`SONAR_CE_JAVAADDITIONALOPTS=`**  \\nSame as previous property, but allows to not repeat all other settings like -Xmx\\n\\n## Elasticsearch\\n\\nElasticsearch is used to facilitate fast and accurate information retrieval.\\nIt is executed in a dedicated Java process. \\n\\n[[warning]]\\n| Linux users on 64-bit systems, ensure Virtual Memory on your system is correctly configured for Elasticsearch to run properly (see [here](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/vm-max-map-count.html) for details).\\n|\\n| When SonarQube runs standalone, a warning such as the following may appear in logs/es.log:\\n|     \\\"max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]\\\"\\n|\\n| When SonarQube runs as a cluster, however, Elasticsearch will refuse to start.\\n\\n**`SONAR_SEARCH_JAVAOPTS=`**  \\nJVM options of Elasticsearch process\\n\\n**`SONAR_SEARCH_JAVAADDITIONALOPTS=`**  \\nSame as previous property, but allows to not repeat all other settings like -Xmx\\n\\n**`SONAR_SEARCH_PORT=9001`**  \\nElasticsearch port. Default is 9001. Use 0 to get a free port.\\nAs a security precaution, should be blocked by a firewall and not exposed to the Internet.\\n\\n**`SONAR_SEARCH_HOST=`**  \\nElasticsearch host. The search server will bind this address and the search client will connect to it.\\nDefault is loopback address.\\nAs a security precaution, should NOT be set to a publicly available address.\\n\\n## Update Center\\n\\n**`SONAR_UPDATECENTER_ACTIVATE=true`**  \\nUpdate Center requires an internet connection to request https://update.sonarsource.org\\nIt is enabled by default.\\n\\n**`HTTP_PROXYHOST=`**  \\n**`HTTP_PROXYPORT=`**  \\nHTTP proxy (default none)  \\n\\n**`HTTPS_PROXYHOST=`**  \\n**`HTTPS_PROXYPORT=`**  \\nHTTPS proxy (defaults are values of HTTP_PROXYHOST and HTTP_PROXYPORT)  \\n  \\n**`HTTP_AUTH_NTLM_DOMAIN=`**  \\nNT domain name if NTLM proxy is used  \\n\\n**`SOCKSPROXYHOST=`**  \\n**`SOCKSPROXYPORT=`**  \\nSOCKS proxy (default none)  \\n\\n**`HTTP_PROXYUSER=`**  \\n**`HTTP_PROXYPASSWORD=`**  \\nProxy authentication (used for HTTP, HTTPS and SOCKS proxies)  \\n  \\n**`HTTP_NONPROXYHOSTS=`**  \\nProxy exceptions: list of hosts that can be accessed without going through the proxy separated by the '|' character, wildcard character '*' can be used for pattern matching used for HTTP and HTTPS (default none) (note: localhost and its literal notations (127.0.0.1, ...) are always excluded).\\n\\n## Logging\\n\\nSonarQube produces logs in four logs files located in the same directory (see property `SONAR_PATH_LOGS` below),\\none per process:\\n* Main process (aka. App) logs in sonar.log\\n* Web Server (aka. Web) logs in web.log\\n* Compute Engine (aka. CE) logs in ce.log\\n* Elasticsearch (aka. ES) logs in es.log\\n\\nAll four files follow the same rolling policy (see `SONAR_LOG_ROLLINGPOLICY` and `SONAR_LOG_MAXFILES`) but it applies\\nindividually (eg. if `SONAR_LOG_MAXFILES=4`, there can be at most 4 of each files, ie. 16 files in total).\\n\\nAll four files have logs in the same format:\\n\\n|1|2|3|\\n|----|----|-|--------------------|------------------------------|----|\\n2016.11.16 16:47:00 INFO  ce[AVht0dNXFcyiYejytc3m][o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=org.sonarqube:example-java-maven | type=REPORT |\\n\\n|4|5|6|\\n|--------------------|----------------------|-------------|\\n| id=AVht0dNXFcyiYejytc3m | submitter=admin | time=1699ms|\\n\\n**1**: timestamp. Format is YYYY.MM.DD HH:MM:SS  \\n   YYYY: year on 4 digits  \\n   MM: month on 2 digits  \\n   DD: day on 2 digits  \\n   HH: hour of day on 2 digits in 24 hours format  \\n   MM: minutes on 2 digits  \\n   SS: seconds on 2 digits  \\n   \\n**2**: log level.  \\n   Possible values (in order of descending criticality): ERROR, WARN, INFO, DEBUG and TRACE  \\n   \\n**3**: process identifier. Possible values: app (main), web (Web Server), ce (Compute Engine) and es (Elasticsearch)  \\n\\n**4**: SQ thread identifier. Can be empty. In the Web Server, if present, it will be the HTTP request ID. In the Compute Engine, if present, it will be the task ID.\\n   \\n**5**: logger name. Usually a class canonical name. Package names are truncated to keep the whole field to 20 characters max\\n   \\n**6**: log payload. Content of this field does not follow any specific format, can vary in length and include line returns. Some logs, however, will follow the convention to provide data in payload in the format \\\"| key=value\\\"  Especially, log of profiled pieces of code will end with \\\"| time=XXXXms\\\".  \\n\\n**`SONAR_LOG_LEVEL=INFO`**  \\nGlobal level of logs (applies to all 4 processes). Supported values are INFO (default), DEBUG and TRACE\\n\\n**`SONAR_LOG_LEVEL_APP=INFO`**  \\n**`SONAR_LOG_LEVEL_WEB=INFO`**  \\n**`SONAR_LOG_LEVEL_CE=INFO`**  \\n**`SONAR_LOG_LEVEL_ES=INFO`**  \\nLevel of logs of each process can be controlled individually with their respective properties. When specified, they overwrite the level defined at global level. Supported values are INFO, DEBUG and TRACE\\n\\n**`SONAR_PATH_LOGS=logs`**  \\nPath to log files. Can be absolute or relative to installation directory. Default is <installation home>/logs\\n\\n**`SONAR_LOG_ROLLINGPOLICY=time:yyyy-MM-dd`**  \\nRolling policy of log files:\\n* based on time if value starts with \\\"time:\\\", for example by day (\\\"time:yyyy-MM-dd\\\") or by month (\\\"time:yyyy-MM\\\")  \\n* based on size if value starts with \\\"size:\\\", for example \\\"size:10MB\\\"  \\n* disabled if value is \\\"none\\\".  That needs logs to be managed by an external system like logrotate.  \\n\\n**`SONAR_LOG_MAXFILES=7`**  \\nMaximum number of files to keep if a rolling policy is enabled.\\n* maximum value is 20 on size rolling policy  \\n* unlimited on time rolling policy. Set to zero to disable old file purging.\\n\\n**`SONAR_WEB_ACCESSLOGS_ENABLE=true`**\\nAccess log is the list of all the HTTP requests received by server. If enabled, it is stored\\nin the file {`SONAR_PATH_LOGS`}/access.log. This file follows the same rolling policy as other log file\\n(see `SONAR_LOG_ROLLINGPOLICY` and `SONAR_LOG_MAXFILES`).\\n\\n**`SONAR_WEB_ACCESSLOGS_PATTERN=%i{X-Forwarded-For} %l %u [%t] \\\"%r\\\" %s %b \\\"%i{Referer}\\\" \\\"%i{User-Agent}\\\" \\\"%reqAttribute{ID}\\\"`**  \\nFormat of access log. It is ignored if `SONAR_WEB_ACCESSLOGS_ENABLE=false`.   \\n\\nPossible values are:\\n   - \\\"common\\\" is the Common Log Format, shortcut to: %h %l %u %user %date \\\"%r\\\" %s %b\\n   - \\\"combined\\\" is another format widely recognized, shortcut to: %h %l %u [%t] \\\"%r\\\" %s %b \\\"%i{Referer}\\\" \\\"%i{User-Agent}\\\"\\n   - else a custom pattern. See http://logback.qos.ch/manual/layouts.html#AccessPatternLayout.\\n   \\nThe login of authenticated user is not implemented with \\\"%u\\\" but with \\\"%reqAttribute{LOGIN}\\\" (since version 6.1).  \\nThe value displayed for anonymous users is \\\"-\\\".  \\n\\nThe SonarQube's HTTP request ID can be added to the pattern with \\\"%reqAttribute{ID}\\\" (since version 6.2).  \\n\\nIf SonarQube is behind a reverse proxy, then the following value allows to display the correct remote IP address:\\n\\nDefault value (which was \\\"combined\\\" before version 6.2) is equivalent to \\\"combined + SQ HTTP request ID\\\":\\n`SONAR_WEB_ACCESSLOGS_PATTERN=%h %l %u [%t] \\\"%r\\\" %s %b \\\"%i{Referer}\\\" \\\"%i{User-Agent}\\\" \\\"%reqAttribute{ID}\\\"`\\n\\n## DataCenter Edition\\n\\n**`SONAR_CLUSTER_NAME=sonarqube`**\\n\\nThe name of the cluster. Required if multiple clusters are present on the same network. For example, this prevents mixing Production and Preproduction clusters. This will be the name stored in the Hazelcast cluster and used as the name of the Elasticsearch cluster.\\n\\n**`SONAR_CLUSTER_SEARCH_HOSTS`**\\n\\nComma-delimited list of search hosts in the cluster. The list can contain either the host or the host and port, but not both. The item format is `ip/hostname` for host only or`ip/hostname:port` for host and port. `ip/hostname` can also be set to the service name of the search containers .\\n\\n**`SONAR_CLUSTER_SEARCH_PASSWORD`**\\n\\nPassword for Elasticsearch built-in user (elastic) which will be used on the client site. If provided, it enables authentication. This property needs to be set to the same value throughout the cluster.\\n\\n### Search Nodes Only\\n\\n**`SONAR_CLUSTER_ES_HOSTS`**\\n\\nComma-delimited list of search hosts in the cluster. The list can contain either the host or the host and port but not both. The item format is `ip/hostname` for host only or`ip/hostname:port` for host and port, while `ip/hostname` can also be set to the service name of the search containers.\\n\\n**`SONAR_CLUSTER_NODE_NAME`**\\n\\nThe name of the node that is used on Elasticsearch and stored in Hazelcast member attribute (NODE_NAME)\\n\\n**`SONAR_CLUSTER_ES_SSL_KEYSTORE`**\\n\\nFile path to a keystore in PKCS#12 format. Can be the same PKCS#12 container as the `SONAR_CLUSTER_ES_SSL_TRUSTSTORE`. The user running SonarQube must have READ permission to that file. Required if password provided.\\n\\n**`SONAR_CLUSTER_ES_SSL_KEYSTOREPASSWORD`**\\n\\nPassword to the keystore.\\n\\n**`SONAR_CLUSTER_ES_SSL_TRUSTSTORE`**\\n\\nFile path to a truststore in PKCS#12 format. Can be the same PKCS#12 container as the `SONAR_CLUSTER_ES_SSL_KEYSTORE`. The user running SonarQube must have READ permission to that file. Required if password provided.\\t\\n\\n**`SONAR_CLUSTER_ES_SSL_TRUSTSTOREPASSWORD`**\\n\\nPassword to the truststore.\\n\\n### Application Nodes Only\\n\\n**`SONAR_CLUSTER_HOSTS`**\\n\\nComma-delimited list of all **application** hosts in the cluster. This value must contain **only application hosts**. Each item in the list must contain the port if the default `SONAR_CLUSTER_NODE_PORT` value is not used. Item format is `ip/hostname`, `ip/hostname:port`. `ip/hostname` can also be set to the service name of the application containers.\\n\\n**`SONAR_CLUSTER_NODE_PORT`**\\n\\nThe Hazelcast port for communication with each application member of the cluster. Default: `9003`\\n\\n## Others\\n\\n**`SONAR_NOTIFICATIONS_DELAY=60`**  \\nDelay in seconds between processing of notification queue. Default is 60 seconds.\\n\\n**`SONAR_PATH_DATA=data`**  \\n**`SONAR_PATH_TEMP=temp`**  \\nPaths to persistent data files (embedded database and search index) and temporary files. Can be absolute or relative to installation directory. Defaults are respectively <installation home>/data and <installation home>/temp\\n\\n**`SONAR_TELEMETRY_ENABLE=true`**\\nTelemetry - Share anonymous SonarQube statistics. By sharing anonymous SonarQube statistics, you help us understand how SonarQube is used so we can improve the product to work even better for you. We don't collect source code or IP addresses. And we don't share the data with anyone else. To see an example of the data shared: login as a global administrator, call the WS api/system/info and check the Statistics field.\\n\\n## Development \u2013 only for developers\\n[[warning]]\\n| The following properties MUST NOT be used in production environments.\\n\\n**`SONAR_SEARCH_HTTPPORT=-1`**  \\nElasticsearch HTTP connector\\n\"},{\"path\":\"setup/sonarqube-cluster-on-kubernetes\",\"content\":\"---\\ntitle: Deploy a SonarQube Cluster on Kubernetes\\nurl: /setup/sonarqube-cluster-on-kubernetes/\\n---\\n\\n_This page applies to deploying SonarQube Data Center Edition on Kubernetes. For information on deploying Community, Developer, and Enterprise editions of SonarQube on Kubernetes, see [this](/setup/sonarqube-on-kubernetes/) documentation._\\n\\n# Overview \\n\\n[[info]]\\n| Deploying and operating SonarQube Data Center Edition on Kubernetes is available starting SonarQube 9.1 and is currently in Beta status.\\n\\nYou can find the SonarQube DCE Helm chart on [GitHub](https://github.com/SonarSource/helm-chart-sonarqube/tree/master/charts/sonarqube-dce).\\n\\nYour feedback is welcome at [our community forum](https://community.sonarsource.com/).\\n\\n## Kubernetes Environment Recommendations\\n\\nWhen you want to operate SonarQube on Kubernetes, consider the following recommendations.\\n\\n### Prerequisites\\n\\n| Kubernetes Version  | Helm Chart Version | SonarQube Version |\\n| -------- | ----------------------------- | ----------------- |\\n| 1.19 | 0.1.x | 9.1 |\\n| 1.20 | 0.1.x | 9.1 |\\n| 1.21 | 0.1.x | 9.1 |\\n\\n### Pod Security Policies\\n\\nThe following widely-used Pod Security Policies cannot be used in combination with SonarQube:\\n* **[Privileged](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#privileged)** - The SonarQube images are currently intended to start as root in order to provision the PVC and drop to lower privileges after that.\\n* **[ReadOnlyFileSystem](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems)** - SonarQube is doing some filesystem operations to the container filesystem in order to deploy the correct language analyzers and community plugins.\\n* **[MustRunAsNonRoot](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#example-policies)** - There is a init container that needs to run privileged to ensure that the [Elasticsearch requirements](/requirements/requirements/) to the specific node are fulfilled.\\n\\n## Helm chart specifics\\n\\nWe try to provide a good default with the Helm chart, but there are some points to consider while working with SonarQube on Kubernetes. Please read the following sections carefully to make the correct decisions for your environment.\\n\\n### Installation\\n\\nCurrently only helm3 is supported.\\n\\nTo install the Helm Chart from Helm Repository, you can use the following commands:\\n\\n```bash \\nhelm repo add sonarqube https://SonarSource.github.io/helm-chart-sonarqube\\nhelm repo update\\nkubectl create namespace sonarqube-dce\\nexport JWT_SECRET=$(echo -n \\\"your_secret\\\" | openssl dgst -sha256 -hmac \\\"your_key\\\" -binary | base64)\\nhelm upgrade --install -n sonarqube-dce sonarqube-dce --set ApplicationNodes.jwtSecret=$JWT_SECRET sonarqube/sonarqube-dce\\n```\\n\\n### Ingress Creation\\n\\nTo make the SonarQube service accessible from outside of your cluster, you most likely need an ingress. Creating a new ingress is also covered by the Helm chart. See the following section for help with creating one.\\n\\n#### Ingress Class\\n\\nThe SonarSource Helm chart has an optional dependency to the [NGINX-ingress helm chart](https://kubernetes.github.io/ingress-nginx). If you already have NGINX-ingress present in your cluster, you can use it. \\n\\nIf you want to install NGINX as well, add the following to your `values.yaml`.\\n\\n```yaml\\nnginx:\\n  enabled: true\\n```\\n\\nWe recommend using the `ingress-class` NGINX with a body size of at least 8MB. This can be achieved with the following changes to your `values.yaml`:\\n\\n```yaml\\ningress:\\n  enabled: true\\n  # Used to create an Ingress record.\\n  hosts:\\n    - name: <Your Sonarqube FQDN>\\n      # Different clouds or configurations might need /* as the default path\\n      path: /\\n      # For additional control over serviceName and servicePort\\n      # serviceName: someService\\n      # servicePort: somePort\\n  annotations: \\n    kubernetes.io/ingress.class: nginx\\n    nginx.ingress.kubernetes.io/proxy-body-size: \\\"8m\\\"\\n```\\n\\n### Monitoring\\n\\nCurrently, no cloud-native monitoring solutions play nicely with SonarQube or are supported by SonarSource. It is, however, possible to expose at least the JMX metrics to Prometheus with the help of the Prometheus JMX exporter for the Application Nodes.\\nTo use this option, set the following values in your `values.yaml` file:\\n\\n```yaml\\nprometheusExporter:\\n  enabled: true\\n  config:\\n    rules:\\n      - pattern: \\\".*\\\"\\n```\\n\\nThis downloads the Prometheus JMX exporter agent and adds it to the startup options of SonarQube. With this default configuration, the JMX metrics will be exposed on /metrics for Prometheus to scrape.\\n\\nThe config scope here defines a configuration that is understandable by the Prometheus JMX exporter. For more information, please see the [documentation](https://github.com/prometheus/jmx_exporter).\\n\\n#### PodMonitor\\n\\nYou can collect metrics on application nodes using PodMonitor for Prometheus. Search node monitoring is not currently supported. To monitor applications nodes, define PodMonitor as follows:\\n\\n```yaml\\napiVersion: monitoring.coreos.com/v1\\nkind: PodMonitor\\nmetadata:\\n  name: sonarqube\\n  namespace: monitoring\\nspec:\\n  namespaceSelector:\\n    matchNames:\\n    - sonarqube-dce\\n  podMetricsEndpoints:\\n  - interval: 30s\\n    path: /\\n    scheme: http\\n    targetPort: monitoring-ce\\n  - interval: 30s\\n    path: /\\n    scheme: http\\n    targetPort: monitoring-web\\n  selector:\\n    matchLabels:\\n      app: sonarqube-dce\\n```\\n\\n### Log Format\\n\\nSonarQube prints all logs in plain-text to stdout/stderr. It can print logs as JSON-String if the variable `logging.jsonOutput` is set to `true`. This will enable log collection tools like [Loki](https://grafana.com/oss/loki/) to do post processing on the information that are provided by the application.\\n\\n#### LogQL Example\\n\\nWith JSON Logging enabled, you can define a LogQL Query like this to filter only logs with the severity \\\"ERROR\\\" and display the Name of the Pod as well as the Message:\\n\\n```\\n{namespace=\\\"sonarqube-dce\\\", app=\\\"sonarqube-dce\\\"}| json | severity=\\\"ERROR\\\" | line_format \\\"{{.nodename}} {{.message}}\\\"\\n```\\n\\n### ES Cluster Authentication\\n\\nSince SonarQube 8.9, you can enable basic security for the Search Cluster in SonarQube. To benefit from this additional layer of security on Kubernetes as well, you need to provide a PKCS#11 Container with the required certificates to our Helm chart.\\nThe required secret can be created like this: \\n\\n```bash\\nkubectl create secret generic <NAME OF THE SECRET> --from-file=/PATH/TO/YOUR/PKCS12.container=elastic-stack-ca.p12 -n <NAMESPACE>\\n```\\n\\n### Other Configuration Options\\n\\nThis documentation only contains the most important Helm chart customizations. See the [Customize the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing) documentation and the Helm chart [README](https://github.com/SonarSource/helm-chart-sonarqube/tree/master/charts/sonarqube-dce) for more possibilities on customizing the Helm chart. \\n## Known Limitations\\n\\nAs SonarQube is intended to be run anywhere, there are some drawbacks that are currently known when operating in Kubernetes. This list is not comprehensive, but something to keep in mind and points for us to improve on.\\n\\n### No Sidecar Support\\n\\nThere is currently no support for additional sidecar containers.\\nIf you want to use a sidecar container with the SonarQube deployment, you have to manually alter the deployment.\\n\\n### Problems with Azure Fileshare PVC\\n\\nCurrently, there is a known limitation when working on AKS that resonates around the use of Azure Fileshare. We recommend using another storage class for persistency on AKS.\\n\"},{\"path\":\"setup/sonarqube-on-kubernetes\",\"content\":\"---\\ntitle: Deploy SonarQube on Kubernetes\\nurl: /setup/sonarqube-on-kubernetes/\\n---\\n\\n_This part of the Documentation is only valid for Community, Developer, and Enterprise Editions. For information on deploying the Data Center Edition of SonarQube on Kubernetes, see [this](/setup/sonarqube-cluster-on-kubernetes/) documentation._\\n\\n# Overview \\n\\nYou can find the SonarQube Helm chart on [GitHub](https://github.com/SonarSource/helm-chart-sonarqube/tree/master/charts/sonarqube).\\n\\nYour feedback is welcome at [our community forum](https://community.sonarsource.com/).\\n\\n## Kubernetes Environment Recommendations\\n\\nWhen you want to operate SonarQube on Kubernetes, consider the following recommendations.\\n\\n### Prerequisites\\n\\n#### SonarQube Helm Chart\\n\\n| Kubernetes Version  | Helm Chart Version | SonarQube Version |\\n| -------- | ----------------------------- | ----------------- |\\n| 1.19 | 1.1 | 9.1 |\\n| 1.20 | 1.1 | 9.1 |\\n| 1.21 | 1.1 | 9.1 |\\n\\n\\n### Pod Security Policies\\n\\nThe following widely-used Pod Security Policies cannot be used in combination with SonarQube:\\n* **[Privileged](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#privileged)** - The SonarQube images are currently intended to start as root in order to provision the PVC and drop to lower privileges after that.\\n* **[ReadOnlyFileSystem](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems)** - SonarQube is doing some filesystem operations to the container filesystem in order to deploy the correct language analyzers and community plugins.\\n* **[MustRunAsNonRoot](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#example-policies)** - There is a init container that needs to run privileged to ensure that the [Elasticsearch requirements](/requirements/requirements/) to the specific node are fulfilled.\\n\\n### Taints and Tolerations\\n\\nWe recommend binding SonarQube to a specific node and reserving this node for SonarQube. It greatly increases the stability of the service.\\nThe following sections detail creating a taint on a specific node and letting the SonarQube deployment ignore this taint using a flag in the `values.yaml` of the Helm Chart.\\n\\n#### Creating a taint\\n\\nIn order to create a taint, you need to select a node that you want to reserve for SonarQube. Use the following command to get a list of all nodes attached to your Kubernetes Cluster:\\n\\n```bash\\nkubectl get nodes\\n```\\n\\nSelect a node from the output of this command, and create a custom taint using the following command: \\n\\n```bash\\nkubectl taint nodes <node> sonarqube=true:NoSchedule\\n```\\n\\nThis taint ensures that no additional pods are scheduled on this node.\\n\\n#### Ignoring this Taint for SonarQube\\n\\nTo let the SonarQube deployment ignore the previously created taint, add the following section to the `values.yaml`:\\n\\n```yaml\\ntolerations: \\n  - key: \\\"sonarqube\\\"\\n    operator: \\\"Equal\\\"\\n    value: \\\"true\\\"\\n    effect: \\\"NoSchedule\\\"\\n```\\nDepending on your taint's name, you may need to adjust the key accordingly.\\n\\n### Node Labels\\n\\nAs described in the **Taints and Tolerations** section above, for stability, we recommend binding the SonarQube deployment to one node in your cluster. With one node now reserved for SonarQube, you need to label this node to be selected by the Kube-scheduler in the pod assignment.\\n\\n#### Label a Node\\n\\nLabel the node for which you previously defined a taint with the following command:\\n\\n```bash\\nkubectl label node <node> sonarqube=true\\n```\\n\\n#### Bind Deployment to Label\\n\\nTo only let SonarQube be scheduled on nodes with this specific label, add the following section to the `values.yaml`:\\n\\n```yaml\\nnodeSelector: \\n  sonarqube: \\\"true\\\"\\n```\\n\\nBy combining node selection with taints and tolerations, SonarQube can run alone on one specific node independently from the rest of your software in your Kubernetes cluster. This results in better stability and performance of SonarQube. \\nFor more information, see the official [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).\\n\\n### Affinity\\n\\nNode affinity and anti-affinity can be used in a way similar to node selectors but with more operators to choose from. However, we generally don\u2019t recommend using this in combination with SonarQube as it can lead to recurring rescheduling of the SonarQube pod. \\nIf you still want to use affinity and anti-affinity, see the official [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity). \\n\\n## Helm chart specifics\\n\\nWe try to provide a good default with the Helm chart, but there are some points to consider while working with SonarQube on Kubernetes. Please read the following sections carefully to make the correct decisions for your environment.\\n\\n### Installation\\n\\nCurrently only helm3 is supported.\\n\\nTo install the Helm Chart from our Helm Repository, you can use the following commands:\\n\\n```bash \\nhelm repo add sonarqube https://SonarSource.github.io/helm-chart-sonarqube\\nhelm repo update\\nkubectl create namespace sonarqube\\nhelm upgrade --install -n sonarqube sonarqube sonarqube/sonarqube\\n```\\n\\n### Persistency \\n\\nSonarQube comes with a bundled Elasticsearch and, as Elasticsearch is stateful, so is SonarQube. There is an option to persist the Elasticsearch indexes in a Persistent Volume, but with regular killing operations by the Kubernetes Cluster, these indexes can be corrupted. By default, persistency is disabled in the Helm chart.  \\nEnabling persistency decreases the startup time of the SonarQube Pod significantly, but you are risking corrupting your Elasticsearch index. You can enable persistency by adding the following to the `values.yaml`:\\n\\n```yaml\\npersistence:\\n  enabled: true\\n```\\n\\nLeaving persistency disabled results in a longer startup time until SonarQube is fully available, but you won't lose any data as SonarQube will persist all data in the database.\\n\\n### Custom Certificate\\n\\nWhen you're working with your own CA or in an environment that uses self-signed certificates for your code repository platform, you can create a secret containing this certificate and add this certificate to the java truststore inside the SonarQube deployment directly during the deployment.\\n\\nTo enable this behavior, add the following to your `value.yaml` file:\\n\\n```yaml\\ncaCerts:\\n  secret: <secret name>\\n```\\n\\n#### Get Certificate via openssl\\n\\nIf you already have a running installation of your code repository platform, you can extract the certificate with the following snippet using `openssl`\\n\\n```bash\\necho -n | openssl s_client -connect <server url>:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > cert.pem\\n```\\n\\nThis certificate needs to be Base64 encoded in order to be added as secret data.  \\n\\n```bash\\nCreate base64 string\\ncat cert.pem | base64 | tr -d \\\"\\\\n\\\"\\n```\\n\\nNote that you can also use `string-data` here if you don't want to encode your certificate.\\n\\n#### Create secret\\n\\nThe Base64 encoded certificate can be added to the secret's data:\\n\\n```yaml\\napiVersion: v1\\nkind: Secret\\nmetadata:\\n  name: <secret name>\\n  namespace: <sonarqube namespace>\\ndata:\\n  cert: <base64 string>\\n```\\n\\nThen, create the secret in your Kubernetes cluster with the following command:\\n\\n```bash\\nkubectl apply -f secret.yaml\\n```\\n\\n### Ingress Creation\\n\\nTo make the SonarQube service accessible from outside of your cluster, you most likely need an ingress. Creating a new ingress is also covered by the Helm chart. See the following section for help with creating one.\\n\\n#### Ingress Class\\n\\nThe SonarSource Helm chart has an optional dependency to the [NGINX-ingress helm chart](https://kubernetes.github.io/ingress-nginx). If you already have NGINX-ingress present in your cluster, you can use it. \\n\\nIf you want to install NGINX as well, add the following to your `values.yaml`.\\n\\n```yaml\\nnginx:\\n  enabled: true\\n```\\n\\nWe recommend using the `ingress-class` NGINX with a body size of at least 8MB. This can be achieved with the following changes to your `values.yaml`:\\n\\n```yaml\\ningress:\\n  enabled: true\\n  # Used to create an Ingress record.\\n  hosts:\\n    - name: <Your Sonarqube FQDN>\\n      # Different clouds or configurations might need /* as the default path\\n      path: /\\n      # For additional control over serviceName and servicePort\\n      # serviceName: someService\\n      # servicePort: somePort\\n  annotations: \\n    kubernetes.io/ingress.class: nginx\\n    nginx.ingress.kubernetes.io/proxy-body-size: \\\"8m\\\"\\n```\\n\\n### Monitoring\\n\\nCurrently, no cloud-native monitoring solutions play nicely with SonarQube or are supported by SonarSource. It is, however, possible to expose at least the JMX metrics to Prometheus with the help of the Prometheus JMX exporter for the Application Nodes.\\nTo use this option, set the following values in your `values.yaml` file:\\n\\n```yaml\\nprometheusExporter:\\n  enabled: true\\n  config:\\n    rules:\\n      - pattern: \\\".*\\\"\\n```\\n\\nThis downloads the Prometheus JMX exporter agent and adds it to the startup options of SonarQube. With this default configuration, the JMX metrics will be exposed on /metrics for Prometheus to scrape.\\n\\nThe config scope here defines a configuration that is understandable by the Prometheus JMX exporter. For more information, please see the [documentation](https://github.com/prometheus/jmx_exporter).\\n\\n#### PodMonitor\\n\\nYou can collect metrics on application nodes using PodMonitor for Prometheus. Search node monitoring is not currently supported. To monitor applications nodes, define PodMonitor as follows:\\n\\n```yaml\\napiVersion: monitoring.coreos.com/v1\\nkind: PodMonitor\\nmetadata:\\n  name: sonarqube\\n  namespace: monitoring\\nspec:\\n  namespaceSelector:\\n    matchNames:\\n    - sonarqube\\n  podMetricsEndpoints:\\n  - interval: 30s\\n    path: /\\n    scheme: http\\n    targetPort: monitoring-ce\\n  - interval: 30s\\n    path: /\\n    scheme: http\\n    targetPort: monitoring-web\\n  selector:\\n    matchLabels:\\n      app: sonarqube\\n```\\n\\n### Other Configuration Options\\n\\nWhile we only document the most pressing Helm chart customizations in this documentation, there are other possibilities for you to choose to [Customize the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). Please see the Helm chart [README](https://github.com/SonarSource/helm-chart-sonarqube/tree/master/charts/sonarqube) file for more information on these.\\n\\n## Known Limitations\\n\\nAs SonarQube is intended to be run anywhere, there are some drawbacks that are currently known when operating in Kubernetes. This list is not comprehensive, but something to keep in mind and points for us to improve on.\\n\\n### Readiness and Startup delays\\n\\nWhen persistence is disabled, SonarQube startup takes significantly longer as the Elasticsearch indexes need to be rebuilt. As this delay depends on the amount of data in your SonarQube instance, the values for the startup/readiness and liveness probes need to be adjusted to your environment. \\nWe also recommend taking a look at the default limits for the SonarQube deployment as the amount of CPU available to SonarQube also impacts the startup time.\\n\\n### Problems with Azure Fileshare PVC\\n\\nCurrently, there is a known limitation when working on AKS that resonates around the use of Azure Fileshare. We recommend using another storage class for persistency on AKS.\\n\\n\"},{\"path\":\"setup/troubleshooting\",\"content\":\"---\\ntitle: Troubleshooting\\nurl: /setup/troubleshooting/\\n---\\n\\n## Checking the logs\\n\\nIf you're having trouble starting your server for the first time (or any subsequent time!) the first thing to do is check your server logs. You'll find them in `$SONARQUBE_HOME/logs`:\\n\\n* sonar.log - Log for the main process. Holds general information about startup and shutdown. You'll get overall status here but not details. Look to the other logs for that.\\n* web.log - Information about initial connection to the database, database migration and reindexing, and the processing of HTTP requests. This includes database and search engine logs related to those requests.\\n* ce.log - Information about background task processing and the database and search engine logs related to those tasks.\\n* es.log - Ops information from the search engine, such as Elasticsearch startup, health status changes, cluster-, node- and index-level operations, etc.\\n\\n## Understanding the logs\\n\\nWhen there's an error, you'll very often find a stacktrace in the logs. If you're not familiar stacktraces, they can be intimidatingly tall walls of incomprehensible text. As a sample, here's a fairly short one:\\n\\n```\\njava.lang.IllegalStateException: Unable to blame file **/**/foo.java\\n    at org.sonarsource.scm.git.JGitBlameCommand.blame(JGitBlameCommand.java:128)\\n    at org.sonarsource.scm.git.JGitBlameCommand.access$000(JGitBlameCommand.java:44)\\n    at org.sonarsource.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:112)\\n    at org.sonarsource.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:109)\\n    at java.util.concurrent.FutureTask.run(Unknown Source)\\n    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\\n    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\\n    at java.lang.Thread.run(Unknown Source)\\nCaused by: java.lang.NullPointerException\\n    at org.eclipse.jgit.treewalk.filter.PathFilter.create(PathFilter.java:77)\\n    at org.eclipse.jgit.blame.BlameGenerator.<init>(BlameGenerator.java:161)\\n    at org.eclipse.jgit.api.BlameCommand.call(BlameCommand.java:203)\\n    at org.sonarsource.scm.git.JGitBlameCommand.blame(JGitBlameCommand.java:126)\\n    ... 7 more\\n```\\n\\nUnless you wrote the code that produced this error, you really only care about:\\n* the first line, which ought to have a human-readable message after the colon. In this case, it's Unable to blame file `**/**/foo.java`\\n* and any line that starts with `Caused by:`. There are often several `Caused by` lines, and indentation makes them easy to find as you scroll through the error. Be sure to read each of these lines. Very often one of them - the last one or next to last one - contains the real problem.\\n\\n## Recovering from Elasticsearch read-only indices\\n\\nYou may encounter issues with Elasticsearch (ES) indices becoming locked in read-only mode. ES requires free disk space available and implements a safety mechanism to prevent the disk from being flooded with index data that:\\n\\n* **For non-DCE** \u2013  locks all indices in read-only mode when the 95% used disk usage watermark is reached.  \\n* **For DCE** \u2013 locks all or some indices in read-only mode when one or more node reaches the 95% used disk usage watermark.\\n\\nES shows warnings in the logs as soon as disk usage reaches 85% and 90%. At 95% usage and above, indices turning read-only causes errors in the web and compute engine.\\n\\nFreeing disk space will *not* automatically make the indices return to read-write. To make indices read-write, you also need to:\\n\\n* **For non-DCE** \u2013 restart SonarQube.\\n* **For DCE** \u2013 restart *ALL* application nodes (the first application node restarted after all have been stopped will make the indices read-write).  \\n\\nSonarQube's built-in resilience mechanism allows SonarQube to eventually recover from the indices being behind data in the DB (this process can take a while).\\n\\nIf you still have inconsistencies, you'll need to rebuild the indices (this operation can take a long time depending on the number of issues and components):\\n\\n**non-DCE:**  \\n\\n1. Stop SonarQube  \\n1. Delete the data/es7 directory  \\n1. Restart SonarQube  \\n\\n**DCE:**  \\n\\n1. Stop the whole cluster (ES and application nodes)  \\n1. Delete the data/es7 directory on each ES node  \\n1. Restart the whole cluster  \\n    \\n**Note:** See [Configure & Operate a Cluster](/setup/operate-cluster/) for information on stopping and starting a cluster.\\n\\n## Failed tasks during reindexing\\n\\nDuring Elasticsearch reindexing due to disaster recovery or an upgrade, you may have a failed tasks in your branches or Pull Requests. If you only have a few failed tasks, you can reanalyze your branch or Pull Request. You may want to use web services to remove branches and Pull Requests that can't be reanalyzed because they have been removed from version control. If you have many failed tasks, you may want to delete your Elasticsearch directory and reindex again. To delete your Elasticsearch directory:\\n\\n**non-DCE:**  \\n\\n1. Stop SonarQube  \\n1. Delete the data/es7 directory  \\n1. Restart SonarQube  \\n\\n**DCE:**  \\n\\n1. Stop the whole cluster (ES and application nodes)  \\n1. Delete the data/es7 directory on each ES node  \\n1. Restart the whole cluster  \\n\"},{\"path\":\"setup/upgrade-notes\",\"content\":\"---\\ntitle: Release Upgrade Notes\\nurl: /setup/upgrade-notes/\\n---\\n\\n## Release 9.2 Upgrade Notes\\n**Bitbucket Cloud authentication now built-in**  \\nSupport for Bitbucket Cloud authentication is now built-in. If you were using the Bitbucket Cloud authentication plugin before, you need to remove it from SonarQube before upgrading.\\n\\nSonarQube uses the same settings as the plugin, so you do not need to update them. The Teams restriction has been replaced with the Workspaces restriction and is migrated accordingly. ([MMF-2512](https://jira.sonarsource.com/browse/MMF-2512)).\\n\\n[Full release notes](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16959)\\n\\n## Release 9.1 Upgrade Notes  \\n**Secured settings no longer available in web services and on the scanner side**  \\nThis change especially affects the analysis of SVN projects but also, possibly, the use of some 3rd-party plugins. Secured settings required to perform the analysis now need to be passed to the scanner as parameters. ([MMF-2407](https://jira.sonarsource.com/browse/MMF-2407)).\\n\\n**Custom measures feature has been dropped**  \\nThe custom measures feature, which was previously deprecated, has been removed. ([SONAR-10762](https://jira.sonarsource.com/browse/SONAR-10762)).\\n\\n**Deprecated WebAPI endpoints and parameters removed**  \\nThe WebAPI endpoints and parameters deprecated during the 7.X release cycle have been removed. For a complete list of removed endpoints and parameters see [SONAR-15313](https://jira.sonarsource.com/browse/SONAR-15313).\\n\\n[Full release notes](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16792)\\n\\n## Release 9.0 Upgrade Notes  \\n**Scanners require Java 11**  \\nJava 11 is required for SonarQube scanners. Use of Java 8 is no longer supported. See the documentation on [Moving Analysis to Java 11](/analysis/analysis-with-java-11/) for more information. ([MMF-2051](https://jira.sonarsource.com/browse/MMF-2051)).\\n\\n**Support for Internet Explorer 11 dropped**  \\nSupport for Internet Explorer 11 and other legacy browsers has been dropped. ([SONAR-14387](https://jira.sonarsource.com/browse/SONAR-14387)).\\n\\n**Reporting Quality Gate status on GitHub branches requires an additional permission**  \\nWhen working in private GitHub repositories, you need to grant read-only access to the **Contents** permission on the GitHub application that you're using for SonarQube integration. See the [GitHub integration documentation](/analysis/github-integration/) for more information.\\n\\n**JavaScript custom rule API removed**  \\nThe JavaScript custom rule API, which was previously deprecated, has been removed. Plugins can no longer use this API to implement custom rules. See the [JavaScript documentation](/analysis/languages/javascript/) for more information. ([SONAR-14928](https://jira.sonarsource.com/browse/SONAR-14928)).\\n\\n**Deprecated Plugin Java API dropped**  \\nParts of the Java API for plugins that were deprecated before SonarQube 7.0 have been dropped. You should compile plugins against SonarQube 9.0 to ensure they're compatible and to check if they're using a deprecated API that has been dropped. ([SONAR-14925](https://jira.sonarsource.com/browse/SONAR-14925), [SONAR-14885](https://jira.sonarsource.com/browse/SONAR-14885)).\\n\\n[Full release notes](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15682)\\n\\n## Release 8.9 LTS Upgrade Notes  \\nUpgrading directly from SonarQube _v7.9 LTS to v8.9 LTS_? Refer to the [LTS to LTS Release Upgrade Notes](/setup/lts-to-lts-upgrade-notes/).\\n\\n**GitHub Enterprise compatibility**  \\nSonarQube 8.9 only supports GitHub Enterprise 2.21+ for pull request decoration (the previous minimum version was 2.15).\\n\\n**Plugins require risk consent**  \\nWhen upgrading, if you're using plugins, a SonarQube administrator needs to acknowledge the risk involved with plugin installation when prompted in SonarQube. ([MMF-2301](https://jira.sonarsource.com/browse/MMF-2301)).\\n\\n**Database support updated**  \\nSonarQube 8.9 supports the following database versions:\\n\\n* PostgreSQL versions 9.6 to 13. PostgreSQL versions <9.6 are no longer supported.\\n* MSSQL Server 2014, 2016, 2017, and 2019.\\n* Oracle XE, 12C, 18C, and 19C. Oracle 11G is no longer supported.\\n\\n**Webhooks aren't allowed to target the instance**  \\nTo improve security, webhooks, by default, aren't allowed to point to the SonarQube server. You can change this behavior in the configuration. ([SONAR-14682](https://jira.sonarsource.com/browse/SONAR-14682)).\\n\\n[Full release notes](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16710)\\n\"},{\"path\":\"setup/upgrading\",\"content\":\"---\\ntitle: Upgrade Guide\\nurl: /setup/upgrading/\\n---\\nThis is a generic guide for upgrading across versions of SonarQube. Carefully read the [Release Upgrade Notes](/setup/upgrade-notes/) of your target version and of any intermediate version(s).\\n\\nBefore upgrading, we recommend practicing your upgrade on a staging environment that's as similar to your production environment as possible. For more on this and other important upgrading concepts, read through the [Before You Upgrade](/setup/before-you-upgrade/) page. \\n\\n[[warning]]\\n| Before upgrading, back up your SonarQube database. Upgrade problems are rare, but you'll want the backup if anything does happen.\\n\\n## Database disk usage recommendations\\nDuring your upgrade, tables may be duplicated to speed up the migration process. This could cause your database disk usage to temporarily increase to as much as double the normal usage. Because of this, we recommend that your database disk usage is below 50% before starting a migration.\\n\\n## Upgrading Instructions\\nYou can upgrade your SonarQube instance using the ZIP file, Docker image, or Helm Chart. To expand the upgrading instructions, click the option below that corresponds to your set up.\\n\\n[[info]]\\n|If your upgrade requires the rebuild of Elasticsearch indexes, your projects and applications will become available as they are reindexed. Portfolios won't be available until all projects are indexed.\\n\\n[[collapse]]\\n| ## Upgrading from the ZIP file\\n| \\n| 1. Download and unzip the SonarQube distribution of your edition in a fresh directory, let's say `$NEW_SONAR_HOME`\\n| 2. If you're using third-party plugins, Manually install plugins that are compatible with your version of SonarQube. Use the [Plugin Version Matrix](/instance-administration/plugin-version-matrix/) to ensure that the versions you install are compatible with your server version. Simply copying plugins from the old server to the new is not recommended; incompatible or duplicate plugins could cause startup errors. Analysis of all languages provided by your edition is available by default without plugins.\\n| 3. Update the contents of `sonar.properties` and `wrapper.conf` files (in `$NEW_SONAR_HOME/conf`) with the settings of the related files in the `$OLD_SONAR_HOME/conf` directory (web server URL, database, ldap settings, etc.). Do not copy-paste the old files.\\n| If you are using the Oracle DB, copy its JDBC driver into `$NEW_SONAR_HOME/extensions/jdbc-driver/oracle`\\n| 4. Stop your old SonarQube Server\\n| 5. Start your new SonarQube Server\\n| 6. Browse to `http://yourSonarQubeServerURL/setup` and follow the setup instructions\\n| 7. Reanalyze your projects to get fresh data\\n\\n[[collapse]]\\n| ## Upgrading from the Docker image\\n| \\n| [[info]]\\n| | If you're upgrading with an Oracle database or you're using plugins, you can reuse your extensions volume from the previous version to avoid moving plugins or drivers. Use the [Plugin Version Matrix](/instance-administration/plugin-version-matrix/) to ensure that your plugins are compatible with your version. Analysis of all languages provided by your edition is available by default without plugins.\\n| \\n| To upgrade SonarQube using the Docker image:\\n| \\n| 1. Stop and remove the existing SonarQube container (a restart from the UI is not enough as the environment variables are only evaluated during the first run, not during a restart):\\n|     \\n| \\t```console\\n|     $ docker stop <container_id>\\n|     $ docker rm <container_id>\\n| \\t```\\n| \\n| 2. Run docker:\\n| \\n| \\t```bash\\n| \\t$> docker run -d --name sonarqube \\\\\\n| \\t\\t-p 9000:9000 \\\\\\n| \\t\\t-e SONAR_JDBC_URL=... \\\\\\n| \\t\\t-e SONAR_JDBC_USERNAME=... \\\\\\n| \\t\\t-e SONAR_JDBC_PASSWORD=... \\\\\\n| \\t\\t-v sonarqube_data:/opt/sonarqube/data \\\\\\n| \\t\\t-v sonarqube_extensions:/opt/sonarqube/extensions \\\\\\n| \\t\\t-v sonarqube_logs:/opt/sonarqube/logs \\\\\\n| \\t\\t<image_name>\\n| \\t```\\n| \\n| 3. Go to `http://yourSonarQubeServerURL/setup` and follow the setup instructions.\\n| \\n| 4. Reanalyze your projects to get fresh data.\\n| \\n| ### **From 8.9.x LTS to another 8.9.x LTS**\\n| \\n| No specific Docker operations are needed, just use the new tag.\\n\\n[[collapse]]\\n| ## Upgrading from the Helm Chart \\n| \\n| [[info]]\\n| | If you're upgrading with an Oracle database or you're using plugins, you can reuse your extensions PVC from the previous version to avoid moving plugins or drivers. Use the [Plugin Version Matrix](/instance-administration/plugin-version-matrix/) to ensure that your plugins are compatible with your version. Analysis of all languages provided by your edition is available by default without plugins.\\n| \\n| To upgrade SonarQube using our official Helm Chart:\\n| \\n| 1. Change the SonarQube version on your `values.yaml`.\\n| \\n| 2. Redeploy SonarQube with the same helm chart:\\n| \\n| \\t```bash\\n| \\thelm upgrade --install -f values.yaml -n <your namespace> <your release name> <path to sonarqube helm chart>\\n| \\t```\\n| \\n| 3. Go to `http://yourSonarQubeServerURL/setup` and follow the setup instructions.\\n| \\n| 4. Reanalyze your projects to get fresh data.\\n \\n## Reverting to the previous version\\n \\nIf you need to revert to the previous version of SonarQube, the high-level rollback procedure for all deployments is as follows: \\n \\n1. Shutdown your SonarQube instance or cluster.\\n \\n2. Roll back your database to the backup you took before starting the upgrade.\\n \\n3. Switch back to the previous version of your SonarQube installation.\\n\\n4. Start your SonarQube instance or cluster.\\n \\n## Changing your edition\\nYou can move to a different SonarQube edition (for example, moving from Community Edition to a commercial edition) while you're upgrading your version. Just use the appropriate edition file or Docker image tag in the upgrade instructions above.\\n\\nIf you want to move to a different edition without upgrading your SonarQube version, the steps are exactly the same as in the upgrading instructions above without needing to navigate to `http://yourSonarQubeServerURL/setup` or reanalyze your projects. \\n\\n## Migrating from a ZIP file instance to a Docker instance\\nTo migrate from the ZIP file to Docker:\\n1. Configure your Docker instance to point to your existing database.\\n2. Shut down your ZIP instance.\\n3. Start your Docker instance.\\n\\n## Additional steps and information\\n\\n### Oracle clean-up\\n\\nStarting with version 6.6, there's an additional step you may want to perform if you're using Oracle. On Oracle, the database columns to be dropped are now marked as UNUSED and are not physically dropped anymore. To reclaim disk space, Oracle administrators must drop these unused columns manually. The SQL request is `ALTER TABLE foo DROP UNUSED COLUMNS`. The relevant tables are listed in the system table `all_unused_col_tabs`.\\n\\n### Additional database maintenance\\n\\nWe recommend refreshing your database's statistics and rebuilding your database's indices once you've finished the technical upgrade, but before you reanalyze your projects.\\n\\nFor PostgreSQL, that means executing `VACUUM FULL`. According to the PostgreSQL documentation:\\n\\n```\\nIn normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done.\\n```\\n\\n### Scanner update\\n\\nWhen upgrading SonarQube, you should also make sure you\u2019re using the latest versions of the SonarQube scanners to take advantage of features and fixes on the scanner side. Please check the documentation pages of the scanners you use for the most recent version compatible with SonarQube and your build tools.\\n\\n### SonarQube as a Linux or Windows service\\n\\nIf you use an external configuration, such as a script or Windows Service to control your server, you'll need to update it to point to `$NEW_SONAR_HOME`.\\n- For Linux it depends how you implemented the service\\n- For Windows you can update your service by running:\\n```\\nsc config SonarQube binPath= \\\"\\\\\\\"$NEW_SONAR_HOME\\\\bin\\\\windows-x86-64\\\\wrapper.exe\\\\\\\" -s \\\\\\\"$NEW_SONAR_HOME\\\\conf\\\\wrapper.conf\\\\\\\"\\\"\\n```\\n\\n\\n\"},{\"path\":\"sonarcloud/autoscan\",\"content\":\"---\\ntitle: AutoScan Beta Feature\\nnav: AutoScan\\nurl: /autoscan/\\n---\\n\\nSonarCloud can autonomously scan your code, by simply reading it from your repository! We call that AutoScan.\\n\\n[[info]]\\n| This is currently a Beta feature, with a limited scope and some caveats. Those limitations will be removed along the way.\\n\\n\\n## Prerequisites\\n\\n* The first version of this Beta feature works only for GitHub repositories. \\n* The automatic analysis can be activated only on projects which are bound to their remote repository. This implies that the the project was set up through the SonarCloud web interface by selecting a repository (i.e. not \\\"manually\\\").\\n\\n## What to expect\\n\\nOnce activated, SonarCloud will automatically analyze: \\n* the default branch of the repository\\n* the pull requests (PR)\\n\\nIt will take care of doing it whenever you push on your repository.\\n\\nThe following languages are currently supported: \\n* ABAP\\n* Apex\\n* CSS\\n* Flex\\n* Go\\n* HTML\\n* JS\\n* Kotlin\\n* PHP\\n* Python\\n* Ruby\\n* Scala\\n* Swift\\n* TypeScript\\n* TSQL\\n* XML\\n\\n## How to activate the feature?\\n\\nTo enable the automatic analysis, you need to add a `.sonarcloud.properties` file in your repository.\\n\\nIf you're starting from scratch:\\n\\n1. Do the [setup for your project](/#sonarcloud#/projects/create) (from the `+ > Analyze new project` top right menu)\\n    * ![](/images/exclamation.svg) Remember that your project must absolutely be created by selecting a GitHub repository - otherwise it won't work.\\n1. Once the setup is done on SonarCloud, you end up on the project home page which shows a tutorial. Ignore it and simply add a `.sonarcloud.properties` file in the base directory of your default branch or on a PR. \\n1. After a while, the analysis results will be visible in SonarCloud (and your PR will be annotated with comments if you pushed the file on a PR)\\n\\nHere are the supported optional settings for the `.sonarcloud.properties` file:\\n```\\n# Path to sources\\n#sonar.sources=.\\n#sonar.exclusions=\\n#sonar.inclusions=\\n\\n# Path to tests\\n#sonar.tests=\\n#sonar.test.exclusions=\\n#sonar.test.inclusions=\\n\\n# Source encoding\\n#sonar.sourceEncoding=UTF-8\\n\\n# Exclusions for copy-paste detection\\n#sonar.cpd.exclusions=\\n```\\n\\nNote that you can just push an empty `.sonarcloud.properties` file, this will work fine. In this case, every file in the repository will be considered as a source file.\\n\\n## Current limitations/caveats\\n\\n* There is no visual feedback (yet) in the UI when SonarCloud runs an analysis.\\n* A consequence of the previous point is that if - for any reason, SonarCloud fails to successfully run the analysis, nothing will be displayed. In that case, just come on [the forum](https://community.sonarsource.com/tags/c/help/sc/autoscan) and ask a question, we'll monitor that closely.\\n* Code coverage information is not supported\\n* Import of external rule engine reports is not supported\\n\\n## Noteworthy\\n\\n* This Beta feature works for any project - public or private.\\n* It can be activated with no extra cost.\\n* Sources are cloned only during the analysis, and only when the `.sonarcloud.properties` file exists (i.e. when the feature is activated). The cloned repository is fully deleted at the end of the analysis, and SonarCloud does not keep a copy of it.\\n* Non supported languages (Java, C#, VB.NET, C/C++, ObjectiveC) are not analyzed at all.\\n\\n## How to give feedback?\\n\\nCreate a new thread on the forum, under [\\\"Get Help > SonarCloud\\\"](https://community.sonarsource.com/tags/c/help/sc/autoscan), with the \\\"autoscan\\\" tag.\\n\\nWe'd love to hear your feedback about this new upcoming feature, may it be about bugs, improvements, or anything you want to share with us!\\n\"},{\"path\":\"sonarcloud/integrations/bitbucketcloud-azurepipelines\",\"content\":\"---\\ntitle: Analyze your repository with Azure Pipelines\\nnav: With Azure Pipelines\\nurl: /integrations/bitbucketcloud/azure-pipelines/\\n---\\n\\nIf you are analyzing .NET applications and want to benefit from the Azure DevOps / Pipelines experience and features, you have the possibility to setup a build pipeline, targeting your Bitbucket Cloud repository, and connected to SonarCloud.\\n\\n## Analyzing branches\\n\\nPlease be advised that the team where the Bitbucket Cloud repository is has to be bound to your SonarCloud organization in order to get this work.\\n\\n1. Install the SonarCloud extension for Azure DevOps in your Azure DevOps organization : [SonarCloud extension](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud). You can have a look a [this chapter](https://docs.microsoft.com/en-us/labs/devops/sonarcloudlab/index?tutorial-step=1) of the global tutorial for Azure DevOps.\\n\\n2. Configure a new build pipeline (YAML or classic editor), targeting your Bitbucket Cloud repository. You will have to create a new service connection to that repository.\\n\\n3. Configure the Prepare SonarCloud configuration task just the way you will do for a regular Azure Git Repository.\\n\\n4. Go to the triggers tab of the pipeline configuration, click on the repository below `Continuous Integration` then click on `Enable continuous integration`, add a new branch filter with following configuration :\\n   * Type : Include\\n   * Branch specification : master\\n\\nWant to see how it is working ? Have a look at our [sample .NET project](https://bitbucket.org/sonarsource/sample-dotnet-project-azuredevops)\\n\\n## Analyzing pull requests\\n\\nPre-requisites :\\n\\n* Follow the initiation steps of Analyzing branches with Azure pipelines above.\\n* Version 1.6.4+ of the Azure DevOps extension is needed.\\n\\nAs for branches, you can trigger an analysis for Pull requests with an Azure DevOps pipeline and get your PR decorated.\\n\\n1. On the Azure pipeline that will be used, click on the `Triggers` tab, then click on the repository below `Pull request validation`\\n\\n2. Click on `Enable pull request validation` then configure the proper branch filters.\\n\"},{\"path\":\"sonarcloud/integrations/bitbucketcloud-bitbucketpipelines\",\"content\":\"---\\ntitle: Analyze your repository with Bitbucket Pipelines\\nnav: With Bitbucket Pipelines\\nurl: /integrations/bitbucketcloud/bitbucket-pipelines/\\n---\\n\\n## Analyzing branches\\n\\nOnce your project is created and initiated from the repository you selected:\\n\\n1. Generate a token to allow to publish analysis from Bitbucket Pipelines. To generate a token, follow the first step of the tutorial on the dashboard of the project, or go to your user security page.\\n\\n2. On Bitbucket Cloud, go to the \\\"Settings > Pipelines > Account variables\\\" page of your team, and add a new SONAR_TOKEN variable that contains the value of the SonarCloud token (something like `9ad01c85336b265406fa6554a9a681a4b281135f`).\\n   * **Make sure that you click on the \\\"Lock\\\" icon to encrypt and hide this token.**\\n\\n3. Edit the `bitbucket-pipelines.yml` file of your repository to trigger the SonarCloud analysis.\\n\\nOnce those changes are pushed, Pipelines will automatically trigger analyses on the repository.\\n\\nYou can see our multiple sample projects to see how it is working :\\n\\n  * [Built with Gradle](https://bitbucket.org/sonarsource/sample-gradle-project)\\n  * [Built with Maven](https://bitbucket.org/sonarsource/sample-maven-project)\\n  * [Javascript project](https://bitbucket.org/sonarsource/sample-nodejs-project)\\n\\nIf you target a .NET application, see a [sample .NET project](https://bitbucket.org/sonarsource/sample-dotnet-project-azuredevops) built with Azure Pipelines\\n\\n## Analyzing pull requests\\n\\nIn order to trigger SonarCloud analysis on each pull request update, you have to supply the same command in the `pull-requests` section of `bitbucket-pipelines.yml` (check [Configure bitbucket-pipelines.yml](https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html#Configurebitbucket-pipelines.yml-ci_pull-requests) for more details about that section). Here is a sample configuration:\\n```\\npipelines:\\n  ...\\n  pull-requests:\\n    feature/*:\\n      - step:\\n          script:\\n            - mvn sonar:sonar\\n  ...\\n```\\n\\nIn order to avoid duplication between the different sections of your `bitbucket-pipelines.yml`, you can use [yaml anchors and aliases](https://confluence.atlassian.com/bitbucket/yaml-anchors-960154027.html).\\n\"},{\"path\":\"sonarcloud/integrations/bitbucketcloud\",\"content\":\"---\\ntitle: Get started with Bitbucket Cloud\\nnav: Bitbucket Cloud\\nurl: /integrations/bitbucketcloud/\\n---\\n\\n## Sign up and set up your first project\\n1. On the [login page](/#sonarcloud#/sessions/new), click on the \\\"Log in with Bitbucket\\\" button and connect to SonarCloud using your Bitbucket Cloud account.\\n2. Click on \\\"Analyze your code\\\" and follow the path to set up a first project\\n3. You will be asked to install the SonarCould application on your team or user account, which will allow you to \\n  choose which repositories you want to analyze.\\n\\n## Analyzing your repository\\n\\n* [With Bitbucket Pipelines](/integrations/bitbucketcloud/bitbucket-pipelines/)\\n* [With Azure Pipelines](/integrations/bitbucketcloud/azure-pipelines/), if you analyze .NET applications and want to benefit from Azure DevOps features.\\n\\n## Quality widget\\n\\nSonarCloud can provide a widget that shows the current quality metrics of your project directly on the repository's Overview page on Bitbucket Cloud.\\n\\nIf you want to see this widget, you can go to the \\\"Settings > SonarCloud\\\" page of your repository and check \\\"Show repository overview widget\\\".\\n\\n## FAQ\\n\\n**Do you have sample projects on Bitbucket Cloud?**\\nYou can take a look at these various projects: [Sample projects analyzed on SonarCloud](https://bitbucket.org/account/user/sonarsource/projects/SAMPLES)\\n\\n**I don't see the widget with quality information whereas I configured everything**\\nMake sure that your browser is not using some extensions like AdBlocks. They tend to break the integration of third-party applications in BitBucket Cloud.\\n\\n## Upcoming features and improvements\\n\\nThere are various areas in which you can expect new features and improvements:\\n\\n* Pull request decoration with inline comments to show the issues within the PR\\n* Better and easier team onboarding\\n* Automatic analysis (i.e. no need to configure anything from Pipelines)\\n\"},{\"path\":\"sonarcloud/integrations/github\",\"content\":\"---\\ntitle: Get started with GitHub.com\\nnav: GitHub\\nurl: /integrations/github/\\n---\\n\\n## Sign up and set up your first project\\n\\n1. On the [login page](/#sonarcloud#/sessions/new), click on the \\\"Log in with GitHub\\\" button and connect to SonarCloud using your GitHub account.\\n2. Click on \\\"Analyze your code\\\" and follow the path to set up a first project\\n3. You will be asked to install the SonarCould application on your organization, which will allow you to choose which\\n   repository you want to analyze.\\n\\n## Trigger analyses\\n\\nFor GitHub repositories, there are 2 ways to have your code analyzed:\\n\\n### ... with AutoScan\\n\\nWith AutoScan, SonarCloud will autonomously pull your code and scan your default branch and your pull requests.\\nPlease read the [\\\"AutoScan Beta Feature\\\"](/autoscan/) documentation page to get the details.\\n\\n[[warning]]\\n| This is currently a Beta feature which does not work for all languages and comes with limitations. \\n\\n### ... using your CI service\\n\\nIf AutoScan does not make sense yet for your repository, you need to configure your CI service to trigger the analysis.\\n\\n**If you are using Travis CI**, the SonarCloud Travis Add-on will make it easier to activate analyses:\\n\\n* Read the [guide to integrate with Travis CI](https://docs.travis-ci.com/user/sonarcloud/)\\n* Check out the [various sample projects](https://github.com/SonarSource/sonarcloud_examples) (Java, TypeScript, C/C++, Go, ... etc) that are analyzed on SonarCloud on a frequent basis\\n\\n**If you are using another CI service**, you will need to read:\\n\\n* the [\\\"Analyzing Source Code\\\" overview page](/analysis/overview/)\\n* the [\\\"Branches\\\" overview page](/branches/overview/)\\n* the [\\\"Pull Request Analysis\\\" page](/analysis/pull-request/)\\n\\nHere is an example of configuration for pull requests when you are not on Travis CI and you need to configure your CI jobs:\\n```\\nsonar.pullrequest.base=main\\nsonar.pullrequest.branch=feature/my-new-feature\\nsonar.pullrequest.key=5\\nsonar.pullrequest.provider=GitHub\\nsonar.pullrequest.github.repository=my-company/my-repo\\n```\\n\\n[[info]]\\n| Pull request decoration works only if [the SonarCloud application](https://github.com/apps/sonarcloud) is installed on your GitHub organization(s) and configured to have acccess to the repositories.\\n\"},{\"path\":\"sonarcloud/integrations/vsts\",\"content\":\"---\\ntitle: Get started with Azure DevOps Services\\nnav: Azure DevOps Services\\nurl: /integrations/vsts/\\n---\\n\\n[[info]]\\n| This page is about Azure DevOps Services, formerly known as VSTS.\\n\\nYou can connect to SonarCloud using your Azure DevOps account. On the [login page](/#sonarcloud#/sessions/new), just click on the \\\"Log in with Azure DevOps\\\" button.\\n\\n[[warning]]\\n| Only work and school Azure DevOps accounts are authorized to login on SonarCloud.\\n\\n## Install the SonarCloud Azure DevOps extension\\n\\nThe SonarCloud Azure DevOps extension brings everything you need to have your projects analyzed on SonarCloud \\nvery quickly:\\n* Integration with the Build definitions to easily trigger the analysis\\n* Pull request decoration to get quick feedback on the code changes\\n* Widget to have the overview quality of your projects inside Azure DevOps dashboards\\n\\nInstall [SonarCloud extension for Azure DevOps](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud)by clicking on the \\\"Get it free\\\" button.\\n\\nThen follow the comprehensive [Microsoft lab on how to integrate Azure DevOps with SonarCloud](https://aka.ms/sonarcloudlab).\\n\\n## Quality Gate Status widget \\n\\nYou can monitor the Quality Gate status of your projects directly in your Azure DevOps dashboard. Follow these simple steps to configure your widget:\\n\\n1. Once the Azure DevOps extension is installed and your project has been successfully analyzed, go to one of your Azure DevOps dashboards (or create one). Click on the pen icon in the bottom right corner of the screen, and then on the \\\"+\\\" icon to add a widget. \\n\\n2. In the list of widgets, select the \\\"Code Quality\\\" one and then click on the \\\"Add\\\" button. An empty widget is added to your dashboard. \\n\\n3. You can then click on the widget's cogwheel icon to configure it.\\n\\n    * **For public projects:** you can simply select your project from the dropdown. A searchbar inside the dropdown will help you find it easily. Just select it and click on the \\\"Save\\\" button.\\n\\n    * **For private projects:** you'll have to log in using the links provided under the dropdown. Once logged in, your private projects will appear in the dropdown. Select the one you are interested in, and click on \\\"Save\\\".\\n\\n## FAQ\\n\\n1. Which kind of analysis scenario are supported for .Net projects ?\\n\\n    * Using Sonar Scanner for MSBuild, you can build multiple .Net projects / solutions between the \\\"Prepare Analysis on SonarCloud\\\" and \\\"Run Analysis\\\" tasks. You will have full support of Issues and Code Coverage on both branches and PR Analysis. Other kind of scenarios are not yet supported.\"},{\"path\":\"sonarcloud/organizations/index\",\"content\":\"---\\ntitle: Organizations\\nurl: /organizations/overview/\\n---\\n\\n## Overview\\n\\nAn organization is a space where a team or a whole company can collaborate across many projects.\\n\\nAn organization consists of:\\n\\n- Projects, on which users collaborate\\n- [Members](/organizations/manage-team/), who can have different permissions on the projects\\n- [Quality Profiles](/instance-administration/quality-profiles/) and [Quality Gates](/user-guide/quality-gates/), which can be customized and shared accross projects\\n\\nOrganizations can be on:\\n\\n- **Free plan**. This is the default plan. Every project in an organization on the free plan is public.\\n- **Paid plan**. This plan unlocks the ability to have private projects. Go to the \\\"Billing\\\" page of your organization to upgrade it to the paid plan.\\n\\nDepending on which plan the organization is in, its [visibility](/organizations/organization-visibility/) will change.\\n\\nYou can create organizations from the top right menu \\\"+ > Create new organization\\\"\\n\\n## FAQ\\n\\n### How to bind an existing organization to GitHub or Bitbucket Cloud?\\n\\nYou might notice the following warning message on your pull requests inside SonarCloud:\\n\\n    The SonarCloud GitHub application is installed on your GitHub organization, but the\\n    SonarCloud organization is not bound to it. Please read \\\"How to bind an existing\\n    organization?\\\" section in the \\\"Organizations\\\" documentation page to fix your setup.\\n\\nThis means that your SonarCloud organization is not bound to GitHub or Bitbucket Cloud whereas you had already installed the SonarCloud application (probably to annotate pull requests). To fix your setup, here are the steps to follow.\\n\\n**For GitHub:**\\n\\n1. Click your profile picture in the top right menu and select the organization.\\n2. In the organization menu, click \\\"Administration > Organization settings\\\"\\n3. Click on \\\"Choose an organization on GitHub\\\".\\n4. On GitHub page, you should see a list of organization you are admin of. The organization you want to bind is marked as already configured. Click on it.\\n5. Click on \\\"Uninstall\\\" at the bottom of the page.\\n6. Go back to SonarCloud, to the settings page of your organization, and click on \\\"Choose an organization on GitHub\\\" again. The organization you want to bind should not be marked as configured anymore. Click on it, and then on \\\"Install\\\". After the installation, you will be redirected to SonarCloud.\\n7. You are all set! You should see a GitHub icon close to the name of your organization at the top of the page.\\n\\n**For Bitbucket Cloud:**\\n\\n1. Click your profile picture in the top right menu and select the organization.\\n2. In the organization menu, click \\\"Administration > Organization settings\\\"\\n3. Click on \\\"Choose a team on Bitbucket\\\".\\n4. On Bitbucket Cloud page, select the name of the team you want to bind and click on \\\"Grant access\\\". You will then be redirected to SonarCloud.\\n   [[warning]]\\n   | If you get a 405 error page from Bitbucket Cloud at this stage, this means that you did not approve a recent scope change - for which you should have received an email from Bitbucket Cloud. The easiest way to get around this is to uninstall the SonarCloud application in your Bitbucket Cloud \\\"Install apps\\\" settings, and reinstall it.\\n5. You are all set! You should see a Bitbucket Cloud icon close to the name of your organization at the top of the page.\\n\\n### How to transfer ownership of an organization?\\n\\nYou may want to transfer ownership of you organization when you want to delete your account, or when you are leaving a team or company.  \\nYou can manage your organization members permissions in: \\\"Administration > Permissions\\\" and [grant \\\"Administer Organization\\\" permission](/organizations/manage-team/#granting-permissions) to another member.\\n\\n### How to delete an organization?\\n\\nYou can delete your organization in: \\\"Administration > Organization Settings > Delete Organization\\\".\\n\"},{\"path\":\"sonarcloud/organizations/manage-team\",\"content\":\"---\\ntitle: Manage a Team\\nurl: /organizations/manage-team/\\n---\\n\\nMembers can collaborate on the projects in the organizations to which they belong. Depending on their permisssions within the organization, members can:\\n* Analyze projects\\n* Manage project settings (permissions, visibility, Quality Profiles, ...)\\n* Update issues\\n* Manage quality gates and Quality Profiles\\n* Administer the organization itself\\n\\nMembers are managed on the \\\"Members\\\" page of the organization. Only organization administrators can manage members. \\n\\n## Managing Members Manually\\nMembers are managed manually when synchronization is not available (for Bitbucket Cloud or Azure Devops for example) or when synchronization is deactivated.\\n\\n### Adding Members\\nYou can add members to an organization using the \\\"Add a member\\\" button. Administrators can search manually for SonarCloud users and add them as members.\\n\\n## Managing Members in GitHub\\nFor organizations that are bound to GitHub, members can be synchronized with GitHub organizations or managed manually. \\n\\nNote that in all cases, members should have a SonarCloud account before being synchronized with GitHub or added manually.\\n\\n### Synchronizing Members with your GitHub Organization\\nWhen [importing](/organizations/overview/) a GitHub organization into SonarCloud, members are automatically synchronized with your GitHub organization.  \\nThis means that each member of your GitHub organization who has a SonarCloud account will be automatically added to the SonarCloud organization, \\nand will have direct access in SonarCloud to the organizations they've been added to. \\n\\nYou can synchronize a bound organization with manually managed members using the \\\"Configure synchronization\\\" button. \\nDuring synchronization, members of the SonarCloud organization who are not part of the GitHub organization are removed from the SonarCloud \\norganization and members of the GitHub organization who are not members of the SonarCloud organization are added to the SonarCloud organization.\\n\\nAfter creating an organization or activating synchronization, SonarCloud users that are added or removed from the GitHub organization are automatically added or removed from \\nthe SonarCloud organization. It's not possible to manually add or remove a member when synchronization is activated.\\n\\nPermissions are not synchronized and must be managed manually (see below).\\n\\n### Deactivating Member Synchronization\\nYou can deactivate member synchronization using the \\\"Configure synchronization\\\" button. \\nWhen you deactivate member synchronization, no members will be added or removed automatically.\\nAfter deactivating synchronization, members will be managed manually.\\n\\n\\n## Granting permissions\\nOnce users are added or synchronized, organization administrators can grant them permissions to perform specific operations in the organization. It is up to the \\nadministrators to make sure each member gets the relevant permissions.\\n\\nTo avoid having to manage individual permissions at a project level, organization admins can create groups to manage permissions \\nand add new users to those groups on the \\\"Members\\\" page.\\n\\n## Future evolutions\\nFuture versions of SonarCloud will make this onboarding process easier for BitBucket Cloud, Azure Devops, and others. \\nUsers' permissions will be retrieved from systems and mapped to SonarCloud permissions on a best-effort basis.\"},{\"path\":\"sonarcloud/organizations/organization-visibility\",\"content\":\"---\\ntitle: Organization Visibility\\nurl: /organizations/organization-visibility/\\n---\\n\\n## Free plan organization\\n\\nFree plan organizations are public. This means that almost everything is visible to any user - even anonymous ones:\\n\\n* Projects\\n* Issues\\n* Quality Profiles\\n* Quality Gates\\n* Rules\\n\\nThe following pages are restricted:\\n\\n* Members: to members of the organization\\n* Administration pages: to administrators of the organization\\n\\n## Paid plan organization\\n\\nPaid plan organizations are private. This means that nothing is visible to non-members of the organization. In other words, you need to be a member of the organization to see:\\n\\n* Projects - which are private by default\\n* Issues\\n* Quality Profiles\\n* Quality Gates\\n* Rules\\n* Members\\n\\nThe administration pages are obviously also restricted to administrators of the organization.\\n\\n### Want to make one project public?\\n\\nIf you are on a paid plan organization but want to make a project public (for instance because you are developing an open-source library), this is possible. You will have to manually make the project public in its **Administration > Permissions** page. Once done, you will notice the \\\"Public\\\" badge on the project.\\n\\nAs soon as you have one public project, the following pages will become visible to any user:\\n\\n* Projects\\n* Issues\\n* Rules\\n\\n\\\"Quality Profiles\\\" and \\\"Quality Gates\\\" pages will remain restricted to members only - since you might not want to unveil some information used by your private projects.\\n\"},{\"path\":\"sonarcloud/privacy\",\"content\":\"---\\ntitle: Privacy Policy\\nurl: /privacy/\\n---\\n\\nThe privacy policy specifies how data collected on this website is used. Thank you for visiting our website and your interest in our services and products. As the protection of your personal data is an important concern for us, we will explain below what information we collect during your visit to our website, as they are processed and whether or how these may be used.\\n\\n## PERSONAL DATA\\n\\nPersonal information is data about personal or material circumstances of an identified or identifiable natural person. This includes information such as your first and last name, your postal or residential address, telephone numbers and date of birth. Information that can not be directly related to your real identity \u2013 such as your favorite websites or the number of users of a page \u2013 are not considered as personal data.\\n\\n## COLLECTION AND PROCESSING OF PERSONAL DATA\\n\\nAs the operator and creator of the website, we do not store personal data itself automatically. If you go to our website, the provider \u2013 where the web server is hosted \u2013 may temporarily store data for the purpose of system security such as the connection of the computer, the web pages you visit, the date and duration of the visit, data about the used browser software and operating system and the web page from which you visit us. In addition to that, personal information such as your name, address, phone number or e-mail will only be stored, if you have provided this information voluntarily, eg. as part of a registration, a survey, a contest, to carry out an order or contract or an information request.\\n\\n## USE AND DISCLOSURE OF PERSONAL DATA\\n\\nPersonal data you provided may be used solely for the purpose of technical website administration and to fulfill your wishes and requirements, thus primarily to processing the order with you or to respond to your request. Only if you have previously given your consent or \u2013 if stipulated by legal regulations \u2013 you entered no objection, we use this data for product surveys and marketing purposes. We don\u2019t share, sell or transfer your personal data to third parties, unless this is necessary for the purpose of the contract or unless you have explicitly consented. For example it may be necessary, that in case of an product order we share your address and order with our suppliers.\\n\\n## USE OF WEB ANALYSIS SOFTWARE\\n\\nTo improve the structure and the data we offer on our website, we might use open source or proprietary web analysis software. Our evaluations will be based on summary or averaged information amalgamated for the large numbers of people visiting the vebsite. The data provided by won\u2019t be matched with any individual\u2019s data from other sources.\\n\\nData collected might include IP, time and duration of the visit, what pages are visited, used browser and add-ons/plugins, search-engines and referrer. While statistic tools might use a \u201Ccookie\u201D to distinguish between individual visitors, the collected data doesn\u2019t allow to identify individuals.\\n\\n## INFORMATION USED DURING AUTHENTICATION\\n\\nWe use the following information for authentication with GitHub / Bitbucket / Azure DevOps.\\n\\n### GitHub\\n* ID\\n* Login\\n* Name\\n* Email\\n* List of organizations the user is member of\\n\\nFor more information:\\n* https://developer.github.com/v3/users/#get-the-authenticated-user\\n* https://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user\\n* https://developer.github.com/v3/orgs/#list-your-organizations\\n\\n### Bitbucket\\n* UUID\\n* Username\\n* Display name\\n* Email\\n* Is email defined as primary\\n\\nFor more information:\\n* https://developer.atlassian.com/bitbucket/api/2/reference/resource/user\\n* https://developer.atlassian.com/bitbucket/api/2/reference/resource/user/emails\\n\\n### Azure DevOps\\n* Tenant ID\\n* Object ID\\n* Display name\\n* User Principal Name\\n* Email\\n\\nFor more information:\\n* https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0\\n\\n## SECURITY\\n\\nWe take all the necessary technical and organisational security measures to protect your personal data from loss and misuse. Your data is stored in a secure operating environment that is not accessible to the public. If you communicate with us via e-mail, please note that the confidentiality of the information is not guaranteed. The contents of e-mails can be intercepted by third parties. In case of doubt we therefore recommend to send confidential information only by snail mail.\\n\\n## RIGHT OF ACCESS TO PERSONAL DATA\\n\\nUpon written request you will be informed by us what information we stored about you (such as name or address).\\n\\n## CONTACT\\n\\nIf you have questions regarding the processing of personal data or in case of requests for information, suggestions or complaints, please [contact us](/#sonarcloud#/about/contact) directly.\\n\"},{\"path\":\"sonarcloud/security\",\"content\":\"---\\ntitle: Security Statement\\nurl: /security/\\n---\\n\\nWe know that your code is very important to you and your business. We also know that no one wants proven bugs or vulnerabilities found on their source code to be unveiled to third-parties. This is why we take security extremely seriously.\\n\\n## Hosting\\n\\nSonarCloud runs primarily off the AWS Frankfurt region. It also uses marginally services located in the AWS Ireland region when they are not available in Frankfurt.\\n\\n## System security\\n\\nSonarCloud uses its own Virtual Private Cloud (AWS VPC). Accesses to the infrastructure are restricted through firewalls, allowing accesses from SonarSource networks only. Secure protocols are required for accesses and SSL keys are used for authentication. Access to the infrastructure, inclusive of storage, is restricted to the Technology Operations team.\\n\\n\\n## Data security\\n\\nAt the infrastructure level, access to data is controlled by virtue of being hosted in network zones which only the Technology Operations have access to. \\n\\nTo insure data availability, the SonarCloud database is replicated in quasi real time between 2 availability zones both within the Frankfurt region. In addition, the database is fully backed up every day with a 7 days retention. \\n\\nAt the software level, SonarCloud ensures private source code is accessible to organization members only, in addition to SonarSource Technology Operations team for support purposes only.\\n\\n\\n\\n## Software security\\n\\nSonarCloud UI and APIs regularly pass penetration testing conducted by a an external company, specialized in cyber and application security, certified in accordance to ISO-27001 and which is also member of the OWASP.\\n\\nIn case you find a vulnerability, please follow our [Responsible Vulnerability Disclosure process](https://community.sonarsource.com/t/responsible-vulnerability-disclosure/9317) to report it to our Security team.\\n\\n## Communications\\n\\nAll communications are done over TLS and support TLS 1.2:\\n* Navigating in the Web application\\n* Using WS APIs\\n* Running analysis (by the scanners) from CI services and pushing analysis reports to SonarCloud\\n\\n## SonarCloud Webhooks \\n\\nYou can use secrets to secure webhooks and ensure they are coming from SonarCloud (see the \\\"Securing your webhooks\\\" section of the [Webhooks](/project-administration/webhooks/#securing-your-webhooks) page for more information). \\n\\n\\n## Authentication\\n\\nPrimary authentication on the system is available through the SonarCloud GitHub application, through OAuth authentication with Bitbucket Cloud and Microsoft Azure DevOps. As a consequence, users don\u2019t have a password on SonarCloud, and are as protected as what they expect (especially with 2FA activated on those systems). \\n \\nFor WS API calls or source code analysis triggered from CI services, only revocable user tokens are accepted.\\n\\n## Payment\\n\\nWhen you subscribe to the paid plan on SonarCloud, your credit card information never transit through our system nor it gets stored on the server. It's handed off to [Braintree Payment Solutions](https://www.braintreepayments.com), a company dedicated to storing your sensitive data on [PCI-Compliant](http://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard) servers.\\n\"},{\"path\":\"sonarcloud/sonarcloud-pricing\",\"content\":\"---\\ntitle: Pricing\\nurl: /sonarcloud-pricing/\\n---\\n\\nSubscribing to a paid plan on SonarCloud allows you to analyze unlimited private projects, to know more about all the advantages of a paid plan check our [pricing page](/#sonarcloud#/about/pricing).\\n\\n## How do I activate the paid plan?\\n\\nYou can activate the paid plan on the **Administration > Billing** page of your organization.\\n\\n## How do I get invoices?\\n\\nYou can download PDF invoices for every payment from the **Administration > Billing** page of your organization.\\n\\nIf you want to get invoices by email, go to **Administration > Billing > Edit billing info** and check \\\"Send the monthly receipt to this email\\\".\\n\"},{\"path\":\"sonarcloud/supported-languages\",\"content\":\"---\\ntitle: Supported languages\\nurl: /analysis/supported-languages/\\n---\\n\\nHere is the list of all the languages currently supported in SonarCloud :\\n\\n* [ABAP](https://redirect.sonarsource.com/plugins/abap.html)\\n* [Apex](https://redirect.sonarsource.com/plugins/apex.html)\\n* [C](https://redirect.sonarsource.com/plugins/cpp.html)\\n* [C++](https://redirect.sonarsource.com/plugins/cpp.html)\\n* [C#](https://redirect.sonarsource.com/plugins/csharp.html)\\n* [Objective-C](https://redirect.sonarsource.com/plugins/objectivec.html)\\n* [COBOL](https://redirect.sonarsource.com/plugins/cobol.html)\\n* [CSS](https://redirect.sonarsource.com/plugins/css.html)\\n* [Flex](https://redirect.sonarsource.com/plugins/flex.html)\\n* [Go](https://redirect.sonarsource.com/plugins/go.html)\\n* [HTML](https://redirect.sonarsource.com/plugins/web.html)\\n* [Java](https://redirect.sonarsource.com/plugins/java.html)\\n* [JavaScript](https://redirect.sonarsource.com/plugins/javascript.html)\\n* [Kotlin](https://redirect.sonarsource.com/plugins/kotlin.html)\\n* [PHP](https://redirect.sonarsource.com/plugins/php.html)\\n* [PL/SQL](https://redirect.sonarsource.com/plugins/plsql.html)\\n* [Python](https://redirect.sonarsource.com/plugins/python.html)\\n* [Ruby](https://redirect.sonarsource.com/plugins/ruby.html)\\n* [Scala](https://redirect.sonarsource.com/plugins/scala.html)\\n* [Swift](https://redirect.sonarsource.com/plugins/swift.html)\\n* [TypeScript](https://redirect.sonarsource.com/plugins/typescript.html)\\n* [T-SQL](https://redirect.sonarsource.com/plugins/tsql.html)\\n* [Visual Basic .NET](https://redirect.sonarsource.com/plugins/vbnet.html)\\n* [XML](https://redirect.sonarsource.com/plugins/xml.html)\\n\"},{\"path\":\"user-guide/activity-history\",\"content\":\"---\\ntitle: Activity and History\\nurl: /user-guide/activity-history/\\n---\\n\\nThe Project Activity page offers a comprehensive list of the analyses on file for a project (subject to [Housekeeping](/instance-administration/housekeeping/)), and the ability to see the evolution of project measures over time.\\n\\nGraphs on the activity page help you understand the evolution of up to three measures of your choice against each other. Graph mouseovers show the measure values and events associated with particular analyses.\\n\\n## Events\\nThere are four types of events:\\n\\n* Quality Gate - the status of the [quality gate](/user-guide/quality-gates/) changed.\\n* Profile - the [Quality Profile](/instance-administration/quality-profiles/) used to analyze the project changed - either the profile was edited, or a different profile was used to analyze the project.\\n* Version - the project's version changed.\\n* Other - an event was manually created on a snapshot. See [Managing History](/project-administration/managing-project-history/)\\n\\nEvents are shown on the [project front page](/user-guide/project-page/) and in the project Activity page. \\n\"},{\"path\":\"user-guide/applications\",\"content\":\"---\\ntitle: Applications\\nurl: /user-guide/applications/\\n---\\n\\n*Applications are available starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html).*\\n\\n## Using Applications\\n\\nAn Application aggregates projects into a synthetic project. Assume you have a set of projects which has been split for technical reasons, but which shares a life cycle; they interact directly in production and are always released together. With an Application, they can be treated as a single entity in {instance} with a unified Project Homepage, Issues list, Measures space, and most importantly: Quality Gate.\\n\\n### Applications vs. Portfolios\\n\\nApplications and Portfolios are both aggregations of projects, but they have different goals and therefore different presentations. A Portfolio is designed to be a very high-level, executive overview that shows how a package of projects that may only be tangentially related are doing quality-wise, and what the trends are. Applications allow you to see your set of projects as a larger, overall meta-project. For instance, because all the projects in an application ship together, if one of them isn't releasable then none of them are, and an Application's consolidated Quality Gate gives you an immediate summary of what must be fixed across all projects in order to allow you to release the set.\\n\\n## Application Setup\\n\\nYou can create an Application by clicking the **Create Application** button in the upper-right corner of the **Projects** homepage. \\n\\nStarting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html), you can also create and edit applications in the global Portfolio administration interface at **Administration > Configuration > Portfolios**. \\n\\nFor more information on setting up Applications, see [Managing Applications](/project-administration/managing-applications/). \\n\\n### Populating Application Data\\n\\nAn Application is automatically re-calculated after each analysis of one of its projects. If you want immediate (re)calculation, a user with administration rights on the Application can use the **Recompute** button in the Application-level **Application Settings > Edit Definition** interface. \\n\\nStarting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html), the global Portfolio administration interface: **Administration > Configuration > Portfolios** offers the ability to queue re-computation of all Applications and Portfolios at once.\\n\\n## Applications and Branch Analysis\\n\\nBranches are available for Applications. They allow you to aggregate branches from the projects in an Application.\\n\\n**Note:** Avoid adding branches to your application that will be deleted to prevent issues with your Application status.\\n\\nOnce an Application has been set up, anyone with administration rights on the Application can manually create a new branch in the **Application Settings > Edit Definition** interface. In Enterprise Edition and above, you can also manage branches from the global **Administration > Configuration > Portfolios** interface. For each Application branch you can choose which project branch should be included, or whether the project should be represented in the branch at all.\"},{\"path\":\"user-guide/built-in-rule-tags\",\"content\":\"---\\ntitle: Built-in Rule Tags\\nurl: /user-guide/built-in-rule-tags/\\n---\\nTags are a way to categorize rules and issues. Issues inherit the tags on the rules that raised them. Some tags are language-specific, but many more appear across languages. Users can add tags to rules and issues, but most rules have some tags out of the box. Here is a non-comprehensive list of what some of those built-in tags mean:\\n\\n*NOTE : Links below to [rules.sonarsource.com](https://rules.sonarsource.com) will be initially filtered for Java language rules*\\n\\n* [brain-overload](https://rules.sonarsource.com/java/tag/brain-overload) - there is too much to keep in your head at one time\\n* [bad-practice](https://rules.sonarsource.com/java/tag/bad-practice) - the code likely works as designed, but the way it was designed is widely recognized as being a bad idea.\\n* [cert](https://rules.sonarsource.com/java/tag/cert) - relates to a rule in a [CERT](https://www.securecoding.cert.org/confluence/x/BgE) standard. There are currently three CERT standards: [C](https://www.securecoding.cert.org/confluence/x/HQE), [C++](https://www.securecoding.cert.org/confluence/x/fQI), and [Java](https://www.securecoding.cert.org/confluence/x/Ux). Many of these rules are not language-specific, but are good programming practices. That's why you'll see this tag on non-C/C++, Java rules.\\n* [clumsy](https://rules.sonarsource.com/java/tag/clumsy) - extra steps are used to accomplish something that could be done more clearly and concisely. (E.G. calling .toString() on a String).\\n* [confusing](https://rules.sonarsource.com/java/tag/confusing) - will take maintainers longer to understand than is really justified by what the code actually does.\\n* [convention](https://rules.sonarsource.com/java/tag/convention) - coding convention - typically formatting, naming, whitespace...\\n* [cwe](https://rules.sonarsource.com/java/tag/cwe) - relates to a rule in the [Common Weakness Enumeration](http://cwe.mitre.org/). For more on CWE and on security-related rules in general, see [Security-related rules](/user-guide/security-rules/).\\n* [design](https://rules.sonarsource.com/java/tag/design) - there is something questionable about the design of the code\\n* [lock-in](https://rules.sonarsource.com/java/tag/lock-in) - environment-specific features are used\\n* [owasp](https://rules.sonarsource.com/java/tag/owasp) - relates to a rule in the [OWASP Top Ten](https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project) security standards. Note, that the OWASP Top Ten is a list of high-level vulnerabilities which translates to many, many potential rules.\\n* [pitfall](https://rules.sonarsource.com/java/tag/pitfall) - nothing is wrong yet, but something could go wrong in the future; a trap has been set for the next person, and they'll probably fall into it and screw up the code.\\n* [sans-top25](https://rules.sonarsource.com/java/tag/sans-top25) - This tag is based on outdated statistics and should no longer be used. Instead, it's recommended to rely on the \\\"CWE Top 25\\\" reports, which are available in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html).\\n* [suspicious](https://rules.sonarsource.com/java/tag/suspicious) - it's not guaranteed that this is a **bug**, but it looks suspiciously like one. At the very least, the code should be re-examined & likely refactored for clarity.\\n* [unpredictable](https://rules.sonarsource.com/java/tag/unpredictable) - the code may work fine under current conditions, but may fail erratically if conditions change.\\n* [unused](https://rules.sonarsource.com/java/tag/unused) - unused code, E.G. a private variable that is never used.\\n* [user-experience](https://rules.sonarsource.com/java/tag/user-experience) - there's nothing technically wrong with your code, but it may make some or all of your users hate you.\\n\"},{\"path\":\"user-guide/clean-as-you-code\",\"content\":\"---\\ntitle: Clean as You Code\\nurl: /user-guide/clean-as-you-code/\\n---\\n\\n## What is Clean as You Code?\\n\\nClean as You Code is an approach to Code Quality that eliminates a lot of the challenges that come with traditional approaches. As a developer, you focus on maintaining high standards and taking responsibility specifically in the New Code you're working on. SonarQube gives you the tools that let you set high standards and take pride in knowing that your code meets those standards.\\n\\n## Focus on New Code\\n\\nWith Clean as You Code, your focus is always on New Code (code that has been added or changed according to your New Code definition) and making sure the code you write today is clean and safe.\\n\\nThe New Code definition can be set at different levels (global, project, and starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) at the branch level). Depending on the level at which your New Code definition is set, you can change the starting point to fit your situation.\\n\\nFor more information on setting your New Code definition, check out [Defining New Code](/project-administration/new-code-period/).\\n\\n## Personal Responsibility\\n\\nWith Clean as You Code, you aren't responsible for anyone else's code. You own the quality and security of the New Code you are working on today. If you add new issues, SonarQube automatically assigns them to you so you can maintain quality in your code.\\n\\nFor more information on issues and how they are assigned, check out the [Issues](/user-guide/issues/) documentation.\\n\\n## Quality Gate\\n\\nYour Quality Gate is a set of conditions that tells you whether or not your project is ready for release. With the Clean as You Code approach, your Quality Gate should:\\n\\n- **Focus on New Code metrics** \u2013 When your Quality Gate is set to focus on New Code metrics (like the built-in Sonar way Quality Gate), new features will be delivered cleanly. As long as your Quality gate is green, your releases will continue to improve.\\n- **Set and enforce high standards** \u2013 When standards are set and enforced on New Code, you aren't worried about having to meet those standards in old code and having to clean up someone else's code. You can take pride in meeting high standards on _your_ code. If a project doesn't meet these high standards, it won't pass the Quality Gate, and it's obviously not ready to be released.\\n\\nFor more information on Quality Gates and making sure your Quality Gate is enforcing your standards, check out the [Quality Gates](/user-guide/quality-gates/) documentation.\\n\\n## Pull Request Analysis\\n\\nYou can use Pull Request analysis and decoration to make sure your code is meeting your standards before you merge. Pull Request analysis lets you see your Pull Request's Quality Gate in the SonarQube UI. You can then decorate your Pull Requests with SonarQube issues directly in your DevOps Platform's interface.\\n\\nFor more information on setting up Pull Request analysis and decoration, see the [Pull Request](/analysis/pull-request/) documentation.\\n\"},{\"path\":\"user-guide/concepts\",\"content\":\"---\\ntitle: Concepts\\nurl: /user-guide/concepts/\\n---\\n\\n## Architecture\\n| Concept  | Definition                                                                            |\\n| -------- | ------------------------------------------------------------------------------------- |\\n| Analyzer | A client application that analyzes the source code to compute **snapshots**.          |\\n| Database | Stores configuration and **snapshots**                                                |\\n| Server   | Web interface that is used to browse **snapshot** data and make configuration changes | \\n\\n## Quality\\n| Concept                    | Definition                                                                                                                                                                                                                                                                                                                                                                                                         |\\n| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\\n| Bug                        | An issue that represents something wrong in the code. If this has not broken yet, it will, and probably at the worst possible moment. This needs to be fixed. Yesterday.                                                                                                                                                                                                                                           |\\n| Code Smell                 | A maintainability-related issue in the code. Leaving it as-is means that at best maintainers will have a harder time than they should making changes to the code. At worst, they'll be so confused by the state of the code that they'll introduce additional errors as they make changes.                                                                                                                         |\\n| Cost                       | See Remediation Cost                                                                                                                                                                                                                                                                                                                                                                                               |\\n| Debt                       | See Technical Debt                                                                                                                                                                                                                                                                                                                                                                                                 |\\n| Issue                      | When a piece of code does not comply with a rule, an issue is logged on the **snapshot**. An issue can be logged on a source file or a unit test file. There are 3 types of issue: **Bugs**, **Code Smells** and **Vulnerabilities**                                                                                                                                                                    |\\n| Measure                    | The value of a **metric** for a given file or project at a given time. For example, 125 lines of code on class MyClass or density of duplicated lines of 30.5% on project myProject                                                                                                                                                                                                                                  |\\n| Metric                     | A type of measurement. Metrics can have varying values, or **measures**, over time. Examples: number of lines of code, complexity, etc. A metric may be either _qualitative_ (gives a quality indication on the component, E.G. density of duplicated lines, line coverage by tests, etc.) or _quantitative_ (does not give a quality indication on the component, E.G. number of lines of code, complexity, etc.) |\\n| New Code definition                | A changeset or period that you're keeping a close watch on for the introduction of new problems in the code. Ideally this is since the `previous_version`, but if you don't use a Maven-like versioning scheme you may need to set a time period such as 21 days, since a specific analysis, or use a reference branch.                                                                                                            |\\n| Quality Profile            | A set of **rules**. Each **snapshot** is based on a single Quality Profile. See also [Quality Profiles](/instance-administration/quality-profiles/)                                                                                                                                                                                                                                                         | \\n| Rule                | A coding standard or practice which should be followed. Not complying with coding rules leads to **Bugs**, **Vulnerabilities**, **Security Hotspots**, and **Code Smells**. Rules can check quality on code files or unit tests.                                                                                                                                                                                                                                 |\\n| Remediation Cost           | The estimated time required to fix Vulnerability and Reliability Issues.                                                                                                                                                                                                                                                                                                                                           |\\n| Snapshot                   | A set of **measures** and **issues** on a given project at a given time. A snapshot is generated for each analysis.                                                                                                                                                                                                                                                                                          |\\n| Security Hotspot           | Security-sensitive pieces of code that need to be manually reviewed. Upon review, you'll either find that there is no threat or that there is vulnerable code that needs to be fixed.                                                                                               |\\n| Technical Debt             | The estimated time required to fix all Maintainability Issues / code smells                                                                                                                                                                                                                                                                                                                                        |\\n| Vulnerability              | A security-related issue which represents a backdoor for attackers. See also [Security-related rules](/user-guide/security-rules/).                                                                                                                                                                                                                                                                                |\\n\"},{\"path\":\"user-guide/connected-mode\",\"content\":\"---\\ntitle: SonarLint Connected Mode\\nurl: /user-guide/connected-mode/\\n---\\nSonarLint Connected Mode connects SonarLint to your SonarQube project and provides additional benefits you won't get by using SonarLint or SonarQube alone.\\n\\n**Shared code quality and security expectations**  \\nWhen using SonarLint alone, the Sonar way Quality Profile is used by default. If you're using a different Quality Profile in SonarQube, new issues may be raised in SonarQube even though your commit looked clean in SonarLint. With Connected Mode, the same customized rule set is applied in both your IDE and in SonarQube, and you're notified in your IDE when your project isn't meeting [Quality Gate](/user-guide/quality-gates/) standards.\\n\\n**More security**  \\nWhen using SonarLint alone, taint analysis issues found by commercial editions of SonarQube aren't raised in SonarLint for performance reasons (we don't want to slow down your editing). In Connected Mode, you'll see the taint analysis issues SonarQube raised in your project. You'll get all of the context in your IDE that you need to triage and fix security problems and make sure the code you commit is safe.\\n\\n**Smart Notifications**  \\nConnected mode sends smart alerts to individuals or teams when new issues are discovered. With everyone in the loop, issues can be addressed promptly, improving the overall software quality and delivery. You'll receive Smart Notifications in your IDE when:\\n\\n* the [Quality Gate](/user-guide/quality-gates/) status of a project _open in your IDE_ changes\\n* a SonarQube analysis raises new issues _that you've introduced in a project open in your IDE_\\n\\nYou can activate or deactivate Smart Notifications in SonarLint on the IDE side on a server-by-server basis.\\n\\n## Setting up Connected Mode\\nSee the following links for instructions on setting up Connected Mode for each supported IDE:\\n\\n* [Eclipse](https://github.com/SonarSource/sonarlint-eclipse/wiki/Connected-Mode)\\n* [IntelliJ IDEA](https://www.sonarlint.org/intellij/#intellij-connected-mode)\\n* [Visual Studio](https://github.com/SonarSource/sonarlint-visualstudio/wiki/Connected-Mode)\\n* [VS Code](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarlint-vscode#connected-mode)\"},{\"path\":\"user-guide/issues\",\"content\":\"---\\ntitle: Issues\\nurl: /user-guide/issues/\\n---\\n\\nWhile running an analysis, SonarQube raises an issue every time a piece of code breaks a coding rule. The set of coding rules is defined through the associated [Quality Profile](/instance-administration/quality-profiles/) for each language in the project. \\n\\n### Issue Types\\n\\nThere are three types of issues:\\n\\n1. **Bug** \u2013 A coding mistake that can lead to an error or unexpected behavior at runtime.\\n1. **Vulnerability** \u2013 A point in your code that's open to attack.\\n1. **Code Smell** \u2013 A maintainability issue that makes your code confusing and difficult to maintain.\\n\\n### Issue Severity\\n\\nEach issue has one of five severities:\\n\\n1. **BLOCKER**  \\nBug with a high probability to impact the behavior of the application in production: memory leak, unclosed JDBC connection, .... The code MUST be fixed immediately.\\n1. **CRITICAL**  \\nEither a bug with a low probability to impact the behavior of the application in production or an issue which represents a security flaw: empty catch block, SQL injection, ... The code MUST be immediately reviewed. \\n1. **MAJOR**  \\nQuality flaw which can highly impact the developer productivity: uncovered piece of code, duplicated blocks, unused parameters, ...\\n1. **MINOR**  \\nQuality flaw which can slightly impact the developer productivity: lines should not be too long, \\\"switch\\\" statements should have at least 3 cases, ...\\n1. **INFO**  \\nNeither a bug nor a quality flaw, just a finding.\\n\\nIdeally, the team wouldn't introduce any new issues (any new technical debt). [SonarLint](https://sonarlint.org) can help developers by letting you perform local analyses to check your code before pushing it back to the SCM. But in real life, it's not always possible to code without any new technical debt, and sometimes it's not worth it.\\n\\nSo new issues get introduced.\\n\\n## Understanding issue context\\nSometimes, issues are self-evident once they're pointed out. For instance, if your team has agreed to a init-lower, camelCase variable naming convention, and an issue is raised on `My_variable`, you don't need a lot of context to understand the problem. But in other situations context may be essential to understanding why an issue was raised. That's why SonarQube supports not just the primary issue location where the issue message is shown, but also secondary issue locations. For instance, secondary issues locations are used to mark the pieces of code in a method which add Cognitive Complexity to a method. \\n\\nHowever, there are times when a simple laundry list of contributing locations isn't enough to understand an issue. For instance, when a null pointer can be dereferenced on some paths through the code, what you really need are issue flows. Each flow is a _set_ of secondary locations ordered to show the exact path through the code on which a problem can happen. And because there can be multiple paths through the code on which, for instance a resource is not released, SonarQube supports multiple flows.\\n\\nCheck out this [![YouTube link](/images/youtube.png) video](https://youtu.be/17G-aZcuMKw) for more on issues with multiple locations.\\n\\n## Issues lifecycle  \\n\\n### Statuses\\nAfter creation, issues flow through a lifecycle, taking one of the following statuses:\\n\\n* **Open** - set by SonarQube on new issues\\n* **Confirmed** - set manually to indicate that the issue is valid\\n* **Resolved** - set manually to indicate that the next analysis should Close the issue\\n* **Reopened** - set automatically by SonarQube when a Resolved issue hasn't actually been corrected\\n* **Closed** - set automatically by SonarQube for automatically created issues. \\n\\n### Resolutions\\nClosed issues will have one of the following resolutions:\\n\\n* **Fixed** - set automatically when a subsequent analysis shows that the issue has been corrected or the file is no longer available (removed from the project, excluded or renamed)\\n* **Removed** - set automatically when the related rule is no longer available. The rule may not be available either because it has been removed from the Quality Profile or because the underlying plugin has been uninstalled.\\n\\nResolved issues will have one the following resolutions:\\n* **False Positive** - set manually\\n* **Won't Fix** - set manually\\n\\n### Issue Workflow \\nIssues are automatically closed (status: Closed) when:\\n* an issue (of any status) has been properly fixed = Resolution: Fixed\\n* an issue no longer exists because the related coding rule has been deactived or is no longer available (ie: plugin has been removed) = Resolution: Removed\\n\\nIssues are automatically reopened (status: Reopened) when:\\n* an issue that was manually Resolved as Fixed(but Resolution is not False positive) is shown by a subsequent analysis to still exist.\\n\\n## Understanding which Issues are \\\"New\\\"\\nTo determine the creation date of an issue, an algorithm is executed during each analysis to determine whether an issue is new or existed previously. This algorithm relies on content hashes (excluding whitespace) for the line the issue is reported on. For multi-line issues, the hash of the first line is used. For each file (after detection of file renaming), the algorithm takes the base list of issues from the previous analysis, and tries to match those issues with the raw issue list reported by the new analysis. The algorithm tries to first match using the strongest evidence, and then falls back to weaker heuristics.\\n\\n* if the issue is on the same rule, with the same line number and with the same line hash (but not necessarily with the same message) > MATCH\\n* detect block move inside file, then if the issue is on the same (moved) line and on the same rule (but not necessarily with the same message) > MATCH\\n* on the same rule, with the same message and with the same line hash (but not necessarily with the same line) > MATCH\\n* on the same rule, with the same message and with the same line number (but not necessarily with the same line hash) > MATCH\\n* on the same rule and with the same line hash (but not the same message and not the same line) > MATCH\\n* is there a matching **CLOSED** issue > MATCH and Reopen\\n\\nUnmatched \\\"base\\\" issues are closed as fixed.\\n\\nUnmatched \\\"raw\\\" issues are new.\\n\\n## Understanding Issue Backdating\\nOnce an issue has been determined to be \\\"new\\\", as described above, the next question is what date to give it. For instance, what if it has existed in code for a long time but was only found in the most recent analysis because new rules were added to the profile? Should this issue be given the date of the last change on its line, or the date of the analysis where it was first raised? That is, should it be backdated? If the date of the last change to the line is available (this requires [SCM integration](/analysis/scm-integration/)) then under certain circumstances, the issue will be backdated:\\n\\n* On first analysis of a project or branch\\n* When the rule is new in the profile (a brand new rule activated or a rule that was deactivated and is now activated)\\n* When SonarQube has just been upgraded (because rule implementations could be smarter now)\\n* When the rule is external\\n\\nAs a consequence, it is possible that backdating will keep newly raised issues out of New Code.\\n\\n\\n## Automatic Issue Assignment\\n### For Bug, Vulnerability and Code Smell\\nNew issues are automatically assigned during analysis to the last committer on the issue line if the committer can be correlated to a SonarQube user. Note that currently, issues on any level above a file, e.g. directory / project, cannot be automatically assigned.\\n\\n### User Correlation\\nLogin and email correlations are made automatically. For example, if the user commits with their email address and that email address is part of their SonarQube profile, then new issues raised on lines where the user was the last committer will be automatically assigned to the user.\\n\\nAdditional correlations can be made manually in the user's profile (see \\\"SCM accounts\\\" in Authorization for more).\\n\\n### Known Limitation\\nIf the SCM login associated with an issue is longer than 255 characters allowed for an issue author, the author will be left blank.\\n\\n## Issue edits\\nSonarQube's issues workflow can help you manage your issues. There are seven different things you can do to an issue (other than fixing it in the code!): Comment, Assign, Confirm, Change Severity, Resolve, Won't Fix, and False Positive.\\n\\nThese actions break out into three different categories. First up is the \\\"technical review\\\" category.\\n\\n### Technical Review\\nThe Confirm, False Positive, Won't Fix, Severity change, and Resolve actions all fall into this category, which presumes an initial review of an issue to verify its validity. Assume it's time to review the technical debt added in the last review period - whether that's a day, a week, or an entire sprint. You go through each new issue and do one:\\n\\n* **Confirm** - By confirming an issue, you're basically saying \\\"Yep, that's a problem.\\\" Doing so moves it out of \\\"Open\\\" status to \\\"Confirmed\\\".\\n* **False Positive** - Looking at the issue in context, you realize that for whatever reason, this issue isn't actually a problem. So you mark it False Positive and move on. Requires Administer Issues permission on the project.\\n* **Won't Fix** - Looking at the issue in context, you realize that while it's a valid issue it's not one that actually needs fixing. In other words, it represents accepted technical debt. So you mark it Won't Fix and move on. Requires Administer Issues permission on the project.\\n* **Severity change** - This is the middle ground between the first two options. Yes, it's a problem, but it's not as bad a problem as the rule's default severity makes it out to be. Or perhaps it's actually far worse. Either way, you adjust the severity of the issue to bring it in line with what you feel it deserves.  Requires Administer Issues permission on the project.\\n* **Resolve** - If you think you've fixed an open issue, you can Resolve it. If you're right, the next analysis will move it to closed status. If you're wrong, its status will go to re-opened.\\n\\nIf you tend to mark a lot of issues False Positive or Won't Fix, it means that some coding rules are not appropriate for your context. So, you can either completely deactivate them in the Quality Profile or use issue exclusions to narrow the focus of the rules so they are not used on specific parts (or types of object) of your application. Similarly, making a lot of severity changes should prompt you to consider updating the rule severities in your profiles.\\n\\nAs you edit issues, the related metrics (e.g. New Bugs), will update automatically, as will the Quality Gate status if it's relevant.\\n\\n### Dispositioning\\nOnce issues have been through technical review, it's time to decide who's going to deal them. By default they're assigned to the last committer on the issue line (at the time the issue is raised), but you can certainly reassign them to yourself or someone else. The assignee will receive email notification of the assignment if they signed up for notifications, and the assignment will show up everywhere the issue is displayed, including in the My Issues list in the My Account space.\\n\\n### General\\nAt any time during the lifecycle of an issue, you can log a comment on it. Comments are displayed in the issue detail in a running log. You have the ability to edit or delete the comments you made.\\n\\nYou can also edit an issue's tags. Issues inherit the tags of the rules that created them, but the tag set on an issue is fully editable. Tags can be created, added and removed at will for users with the Browse permission on the project.\\n\\nAlthough they are initially inherited from the relevant rule, the tags on an issue are not synchronized with the rule, so adding tags to a rule will not add those tags to the rule's issues. \\n\\n### Bulk Change\\nAll of these changes and more can be made to multiple issues at once using the Bulk Change option in the issues search results pane.\\n\\n\\n## Purging Closed Issues\\nBy default, Closed issues are kept for 30 days. For more details, see [Housekeeping](/instance-administration/housekeeping/).\\n\\n\"},{\"path\":\"user-guide/keyboard-shortcuts\",\"content\":\"---\\ntitle: Keyboard Shortcuts\\nurl: /user-guide/keyboard-shortcuts/\\n---\\n\\n## Global\\n\\n| Shortcut | Action          |\\n| -------- | --------------- |\\n| `s`      | open search bar |\\n| `?`      | open help       |\\n\\n## Code Page\\n\\n| Shortcut | Action                                        |\\n| -------- | --------------------------------------------- |\\n| `\u2191` `\u2193`  | select files                                  |\\n| `\u2192`      | open file                                     |\\n| `\u2190`      | return back to the list                       |\\n\\n## Issues Page\\n\\n| Shortcut         | Action                                        |\\n| ---------------- | --------------------------------------------- |\\n| `\u2191` `\u2193`          | navigate between issues                       |\\n| `\u2192`              | go from the list of issues to the source code |\\n| `\u2190`              | return back to the list                       |\\n| `alt` + `\u2191` `\u2193`  | to navigate issue locations                   |\\n| `alt` + `\u2190` `\u2192`  | to switch flows                               |\\n| `f`              | do an issue transition                        |\\n| `a`              | assign issue                                  |\\n| `m`              | assign issue to the current user              |\\n| `i`              | change severity of issue                      |\\n| `c`              | comment issue                                 |\\n| `ctrl` + `enter` | submit comment                                |\\n| `t`              | change tags of issue                          |\\n\\n## Measures Page\\n\\n| Shortcut | Action                                        |\\n| -------- | --------------------------------------------- |\\n| `\u2191` `\u2193`  | select files                                  |\\n| `\u2192`      | open file                                     |\\n| `\u2190`      | return back to the list                       |\\n\\n## Rules Page\\n\\n| Shortcut | Action                                        |\\n| -------- | --------------------------------------------- |\\n| `\u2191` `\u2193`  | navigate between rules                        |\\n| `\u2192`      | go from the list of rules to the rule details |\\n| `\u2190`      | return back to the list                       |\\n\"},{\"path\":\"user-guide/metric-definitions\",\"content\":\"---\\ntitle: Metric Definitions\\nurl: /user-guide/metric-definitions/\\n---\\n\\n   \\n## Complexity\\n**Complexity** (`complexity`)  \\nIt is the Cyclomatic Complexity calculated based on the number of paths through the code. Whenever the control flow of a function splits, the complexity counter gets incremented by one. Each function has a minimum complexity of 1. This calculation varies slightly by language because keywords and functionalities do.\\n\\n[[collapse]]\\n| ## Language-specific details\\n| Language | Notes\\n| ---|---\\n| ABAP | The following keywords increase the complexity by one: `AND`, `CATCH`, `CONTINUE`, `DO`, `ELSEIF`, `IF`, `LOOP`, `LOOPAT`, `OR`, `PROVIDE`, `SELECT\u2026ENDSELECT`, `TRY`, `WHEN`, `WHILE`\\n| C/C++/Objective-C | The complexity gets incremented by one for: function definitions, `while`, `do while`, `for`, `throw` statements, `switch`, `case`, `default`, `&&` operator, `||` operator, `?` ternary operator, `catch`, `break`, `continue`, `goto`.\\n| COBOL | The following commands increase the complexity by one (except when they are used in a copybook): `ALSO`, `ALTER`, `AND`, `DEPENDING`, `END_OF_PAGE`, `ENTRY`, `EOP`, `EXCEPTION`, `EXIT`, `GOBACK`, `CONTINUE`, `IF`, `INVALID`, `OR`, `OVERFLOW`, `SIZE`, `STOP`, `TIMES`, `UNTIL`, `USE`, `VARYING`, `WHEN`, `EXEC CICS HANDLE`, `EXEC CICS LINK`, `EXEC CICS XCTL`, `EXEC CICS RETURN`\\n| Java | Keywords incrementing the complexity: `if`, `for`, `while`, `case`, `catch`, `throw`, `&&`, `||`, `?`\\n| JavaScript, PHP | Complexity is incremented by one for each: function (i.e non-abstract and non-anonymous constructors, functions, procedures or methods), `if`, short-circuit (AKA lazy) logical conjunction (`&&`), short-circuit (AKA lazy) logical disjunction (`||`), ternary conditional expressions, loop, `case` clause of a `switch` statement, `throw` and `catch` statement, `go to` statement (only for PHP)\\n| PL/I | The following keywords increase the complexity by one: `PROC`, `PROCEDURE`, `GOTO`, `GO TO`, `DO`, `IF`, `WHEN`, `|`, `!`, `|=`, `!=`, `&`, `&=`\\n| PL/SQL | The complexity gets incremented by one for: the main PL/SQL anonymous block (not inner ones), create procedure, create trigger, procedure_definition, basic loop statement, when_clause_statement (the \u201Cwhen\u201D of simple_case_statement and searched_case_statement), continue_statement, cursor_for_loop_statement, continue_exit_when_clause (The \u201CWHEN\u201D part of the continue and exit statements), exception_handler (every individual \u201CWHEN\u201D), exit_statement, for_loop_statement, forall_statement, if_statement, elsif_clause, raise_statement, return_statement, while_loop_statement, and_expression (\u201Cand\u201D reserved word used within PL/SQL expressions), or_expression (\u201Cor\u201D reserved word used within PL/SQL expressions), when_clause_expression (the \u201Cwhen\u201D of simple_case_expression and searched_case_expression)\\n| VB.NET | The complexity gets incremented by one for: method or constructor declaration (Sub, Function), `AndAlso`, `Case`, `Continue`, `End`, `Error`, `Exit`, `If`, `Loop`, `On Error`, `GoTo`, `OrElse`, `Resume`, `Stop`, `Throw`, `Try`.\\n\\n**Cognitive Complexity** (`cognitive_complexity`)  \\nHow hard it is to understand the code's control flow. See [the Cognitive Complexity white paper](https://www.sonarsource.com/resources/white-papers/cognitive-complexity/) for a complete description of the mathematical model applied to compute this measure.\\n\\n---\\n## Duplications\\n**Duplicated blocks** (`duplicated_blocks`)  \\nNumber of duplicated blocks of lines.\\n\\n[[collapse]]\\n| ## Language-specific details\\n| For a block of code to be considered as duplicated:\\n|\\n| Non-Java projects:  \\n| * There should be at least 100 successive and duplicated tokens.\\n| * Those tokens should be spread at least on:\\n| * 30 lines of code for COBOL\\n| * 20 lines of code for ABAP\\n| * 10 lines of code for other languages\\n|\\n|Java projects:  \\n| There should be at least 10 successive and duplicated statements whatever the number of tokens and lines. Differences in indentation and in string literals are ignored while detecting duplications.\\n \\n**Duplicated files** (`duplicated_files`)  \\nNumber of files involved in duplications.\\n\\n**Duplicated lines** (`duplicated_lines`)  \\nNumber of lines involved in duplications.\\n\\n**Duplicated lines (%)** (`duplicated_lines_density`)  \\n= `duplicated_lines` / `lines` * 100\\n\\n---\\n## Issues\\n**New issues** (`new_violations`)  \\nNumber of issues raised for the first time on New Code.\\n\\n**New xxx issues** (`new_xxx_violations`)  \\nNumber of issues of the specified severity raised for the first time on New Code, where xxx is one of: `blocker`, `critical`, `major`, `minor`, `info`.\\n\\n**Issues** (`violations`)  \\nTotal count of issues in all states.\\n\\n**xxx issues** (`xxx_violations`)  \\nTotal count of issues of the specified severity, where xxx is one of: `blocker`, `critical`, `major`, `minor`, `info`.\\n\\n**False positive issues** (`false_positive_issues`)  \\nTotal count of issues marked False Positive\\n\\n**Open issues** (`open_issues`)  \\nTotal count of issues in the Open state.\\n\\n**Confirmed issues** (`confirmed_issues`)  \\nTotal count of issues in the Confirmed state.\\n\\n**Reopened issues** (`reopened_issues`)  \\nTotal count of issues in the Reopened state\\n\\n---\\n## Maintainability\\n**Code Smells** (`code_smells`)   \\nTotal count of Code Smell issues.\\n\\n**New Code Smells** (`new_code_smells`)  \\nTotal count of Code Smell issues raised for the first time on New Code.\\n\\n**Maintainability Rating** (`sqale_rating`)  \\n(Formerly the SQALE rating.)\\nRating given to your project related to the value of your Technical Debt Ratio. The default Maintainability Rating grid is:\\n\\nA=0-0.05, B=0.06-0.1, C=0.11-0.20, D=0.21-0.5, E=0.51-1\\n\\nThe Maintainability Rating scale can be alternately stated by saying that if the outstanding remediation cost is:\\n\\n* <=5% of the time that has already gone into the application, the rating is A\\n* between 6 to 10% the rating is a B\\n* between 11 to 20% the rating is a C\\n* between 21 to 50% the rating is a D\\n* anything over 50% is an E\\n\\n**Technical Debt** (`sqale_index`)  \\nEffort to fix all Code Smells. The measure is stored in minutes in the database. An 8-hour day is assumed when values are shown in days.\\n\\n**Technical Debt on New Code** (`new_technical_debt`)  \\nEffort to fix all Code Smells raised for the first time on New Code.\\n\\n**Technical Debt Ratio** (`sqale_debt_ratio`)  \\nRatio between the cost to develop the software and the cost to fix it. The Technical Debt Ratio formula is:  \\n\\t`Remediation cost / Development cost`  \\nWhich can be restated as:  \\n\\t`Remediation cost / (Cost to develop 1 line of code * Number of lines of code)`  \\nThe value of the cost to develop a line of code is 0.06 days.\\n\\n**Technical Debt Ratio on New Code** (`new_sqale_debt_ratio`)  \\nRatio between the cost to develop the code changed on New Code and the cost of the issues linked to it.\\n\\n---\\n## Quality Gates\\n**Quality Gate Status** (`alert_status`)  \\nState of the Quality Gate associated to your Project. Possible values are : `ERROR`, `OK`\\nWARN value has been removed since 7.6.\\n\\n**Quality Gate Details** (`quality_gate_details`)  \\nFor all the conditions of your Quality Gate, you know which condition is failing and which is not.\\n\\n---\\n## Reliability\\n**Bugs** (`bugs`)  \\nNumber of bug issues.\\n\\n**New Bugs** (`new_bugs`)  \\nNumber of new bug issues.\\n\\n**Reliability Rating** (`reliability_rating`)  \\nA = 0 Bugs  \\nB = at least 1 Minor Bug  \\nC = at least 1 Major Bug  \\nD = at least 1 Critical Bug  \\nE = at least 1 Blocker Bug  \\n\\n**Reliability remediation effort** (`reliability_remediation_effort`)  \\nEffort to fix all bug issues. The measure is stored in minutes in the DB. An 8-hour day is assumed when values are shown in days.\\n\\n**Reliability remediation effort on new code** (`new_reliability_remediation_effort`)  \\nSame as _Reliability remediation effort_ but on the code changed on New Code.\\n\\n---\\n## Security\\n**Vulnerabilities** (`vulnerabilities`)  \\nNumber of vulnerability issues.\\n\\n**Vulnerabilities on new code** (`new_vulnerabilities`)  \\nNumber of new vulnerability issues.\\n\\n**Security Rating** (`security_rating`)  \\nA = 0 Vulnerabilities  \\nB = at least 1 Minor Vulnerability  \\nC = at least 1 Major Vulnerability  \\nD = at least 1 Critical Vulnerability  \\nE = at least 1 Blocker Vulnerability  \\n\\n**Security remediation effort** (`security_remediation_effort`)  \\nEffort to fix all vulnerability issues. The measure is stored in minutes in the DB. An 8-hour day is assumed when values are shown in days.\\n\\n**Security remediation effort on new code** (`new_security_remediation_effort`)  \\nSame as _Security remediation effort_ but on the code changed on New Code.\\n\\n**Security Hotspots** (`security_hotspots`)\\nNumber of Security Hotspots\\n\\n**Security Hotspots on new code** (`new_security_hotspots`)\\nNumber of new Security Hotspots on New Code.\\n\\n**Security Review Rating** (`security_review_rating`)\\n\\nThe Security Review Rating is a letter grade based on the percentage of Reviewed (Fixed or Safe) Security Hotspots.\\t\\n\\nA = >= 80%  \\nB = >= 70% and <80%  \\nC = >= 50% and <70%  \\nD = >= 30% and <50%  \\nE = < 30%  \\n\\n**Security Review Rating on new code** (`new_security_review_rating`)\\n\\nSecurity Review Rating for New Code.\\n\\n**Security Hotspots Reviewed** (`security_hotspots_reviewed`)\\n\\nPercentage of Reviewed (Fixed or Safe) Security Hotspots.\\n\\nRatio Formula: \\n`Number of Reviewed (Fixed or Safe) Hotspots x 100 / (To_Review Hotspots + Reviewed Hotspots)`\\n\\n**New Security Hotspots Reviewed**\\n\\nPercentage of Reviewed Security Hotspots (Fixed or Safe) on New Code.\\n\\n---\\n## Size\\n**Classes** (`classes`)  \\nNumber of classes (including nested classes, interfaces, enums and annotations).\\n\\n**Comment lines** (`comment_lines`)  \\nNumber of lines containing either comment or commented-out code.\\n\\nNon-significant comment lines (empty comment lines, comment lines containing only special characters, etc.) do not increase the number of comment lines.\\n\\nThe following piece of code contains 9 comment lines:\\n```\\n/**                                    +0 => empty comment line\\n *                                     +0 => empty comment line\\n * This is my documentation            +1 => significant comment\\n * although I don't                    +1 => significant comment\\n * have much                           +1 => significant comment\\n * to say                              +1 => significant comment\\n *                                     +0 => empty comment line\\n ***************************           +0 => non-significant comment\\n *                                     +0 => empty comment line\\n * blabla...                           +1 => significant comment\\n */                                    +0 => empty comment line\\n  \\n/**                                    +0 => empty comment line\\n * public String foo() {               +1 => commented-out code\\n *   System.out.println(message);      +1 => commented-out code\\n *   return message;                   +1 => commented-out code\\n * }                                   +1 => commented-out code\\n */                                    +0 => empty comment line\\n ```\\n[[collapse]]\\n| ## Language-specific details\\n| Language | Note\\n| ---|---\\n| COBOL | Lines containing the following instructions are counted both as comments and lines of code: `AUTHOR`, `INSTALLATION`, `DATE-COMPILED`, `DATE-WRITTEN`, `SECURITY`.\\n| Java | File headers are not counted as comment lines (becuase they usually define the license).\\n\\n**Comments (%)** (`comment_lines_density`)  \\nDensity of comment lines = Comment lines / (Lines of code + Comment lines) * 100\\n\\nWith such a formula:\\n* 50% means that the number of lines of code equals the number of comment lines  \\n* 100% means that the file only contains comment lines  \\n\\n**Directories** (`directories`)  \\nNumber of directories.\\n\\n**Files** (`files`)  \\nNumber of files.\\n\\n**Lines** (`lines`)  \\nNumber of physical lines (number of carriage returns).\\n\\n**Lines of code** (`ncloc`)  \\nNumber of physical lines that contain at least one character which is neither a whitespace nor a tabulation nor part of a comment.\\n[[collapse]]\\n| ## Language-specific details\\n| Language | Note\\n| --- | ---\\n| COBOL | Generated lines of code and pre-processing instructions (`SKIP1`, `SKIP2`, `SKIP3`, `COPY`, `EJECT`, `REPLACE`) are not counted as lines of code.\\n\\n**Lines of code per language** (`ncloc_language_distribution`)  \\nNon Commenting Lines of Code Distributed By Language\\n\\n**Functions** (`functions`)  \\nNumber of functions. Depending on the language, a function is either a function or a method or a paragraph.\\n[[collapse]]\\n| ## Language-specific details\\n| Language | Note\\n| ---|---\\n| COBOL | It is the number of paragraphs.\\n| Java | Methods in anonymous classes are ignored.\\n| VB.NET | Accesors are not considered to be methods.\\n\\n**Projects** (`projects`)  \\nNumber of projects in a Portfolio.\\n\\n**Statements** (`statements`)  \\nNumber of statements.\\n\\n---\\n## Tests\\n**Condition coverage** (`branch_coverage`)  \\nOn each line of code containing some boolean expressions, the condition coverage simply answers the following question: 'Has each boolean expression been evaluated both to true and false?'. This is the density of possible conditions in flow control structures that have been followed during unit tests execution.\\n\\n`Condition coverage = (CT + CF) / (2*B)`   \\nwhere  \\n* CT = conditions that have been evaluated to 'true' at least once\\n* CF = conditions that have been evaluated to 'false' at least once\\n* B = total number of conditions\\n\\n**Condition coverage on new code** (`new_branch_coverage`)  \\nIdentical to Condition coverage but restricted to new / updated source code.\\n\\n**Condition coverage hits** (`branch_coverage_hits_data`)  \\nList of covered conditions.\\n\\n**Conditions by line** (`conditions_by_line`)  \\nNumber of conditions by line.\\n\\n**Covered conditions by line** (`covered_conditions_by_line`)  \\nNumber of covered conditions by line.\\n\\n**Coverage** (`coverage`)  \\nIt is a mix of Line coverage and Condition coverage. Its goal is to provide an even more accurate answer to the following question: How much of the source code has been covered by the unit tests?\\n\\n`Coverage = (CT + CF + LC)/(2*B + EL)`  \\nwhere  \\n* CT = conditions that have been evaluated to 'true' at least once\\n* CF = conditions that have been evaluated to 'false' at least once\\n* LC = covered lines = lines_to_cover - uncovered_lines\\n* B = total number of conditions\\n* EL = total number of executable lines (`lines_to_cover`)\\n\\n**Coverage on new code** (`new_coverage`)  \\nIdentical to Coverage but restricted to new / updated source code.\\n\\n**Line coverage** (`line_coverage`)  \\nOn a given line of code, Line coverage simply answers the following question: Has this line of code been executed during the execution of the unit tests?. It is the density of covered lines by unit tests:\\n\\n`Line coverage = LC / EL`  \\nwhere\\n* LC = covered lines (`lines_to_cover` - `uncovered_lines`)\\n* EL = total number of executable lines (`lines_to_cover`)\\n\\n**Line coverage on new code** (`new_line_coverage`)  \\nIdentical to Line coverage but restricted to new / updated source code.\\n\\n**Line coverage hits** (`coverage_line_hits_data`)  \\nList of covered lines.\\n\\n**Lines to cover** (`lines_to_cover`)  \\nNumber of lines of code which could be covered by unit tests (for example, blank lines or full comments lines are not considered as lines to cover).\\n\\n**Lines to cover on new code** (`new_lines_to_cover`)  \\nIdentical to Lines to cover but restricted to new / updated source code.\\n\\n**Skipped unit tests** (`skipped_tests`)  \\nNumber of skipped unit tests.\\n\\n**Uncovered conditions** (`uncovered_conditions`)  \\nNumber of conditions which are not covered by unit tests.\\n\\n**Uncovered conditions on new code** (`new_uncovered_conditions`)  \\nIdentical to Uncovered conditions but restricted to new / updated source code.\\n\\n**Uncovered lines** (`uncovered_lines`)  \\nNumber of lines of code which are not covered by unit tests.\\n\\n**Uncovered lines on new code** (`new_uncovered_lines`)  \\nIdentical to Uncovered lines but restricted to new / updated source code.\\n\\n**Unit tests** (`tests`)  \\nNumber of unit tests.\\n\\n**Unit tests duration** (`test_execution_time`)  \\nTime required to execute all the unit tests.\\n\\n**Unit test errors** (`test_errors`)  \\nNumber of unit tests that have failed.\\n\\n**Unit test failures** (`test_failures`)  \\nNumber of unit tests that have failed with an unexpected exception.\\n\\n**Unit test success density (%)** (`test_success_density`)  \\n`Test success density = (Unit tests - (Unit test errors + Unit test failures)) / Unit tests * 100`\\n\"},{\"path\":\"user-guide/portfolios\",\"content\":\"---\\ntitle: Portfolios\\nurl: /user-guide/portfolios/\\n---\\n\\n*Portfolios are available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html).*\\n\\n## Portfolios Home Page\\n\\nThe Portfolio Home Page is the central place for managers and tech leads to keep an eye on the Releasability of the projects under their supervision. Releasability is based on the project's quality gate: Passed is releasable and Failed is not. Each Portfolio home page offers an aggregate view of the releasability of all projects in the Portfolio.\\n\\nAt the top of the page, you can easily see whether the overall Portfolio is currently rated as releasable and if any projects in the Portfolio have failed their Quality Gate. And the Reliability, Security Vulnerabilities, Security Review, and Maintainability ratings show the overall health of the Portfolio in these three domains, along with an indicator of the worst-performing project(s) in each domain. Note that Portfolios only focus on projects' main branches.\\n\\nFor each domain, you'll see:\\n\\n* the rating (see [Metric Definitions](/user-guide/metric-definitions/) for more details about how they are computed)\\n* an indicator of when the rating last changed\\n* an indicator of the worst-performing project(s) in the domain\\n\\n## Releasability Rating\\n\\nThe Releasability rating is the ratio of projects in the Portfolio that have a **Passed** Quality Gate:\\n\\n**A**: > 80%  \\n**B**: > 60%  \\n**C**: > 40%  \\n**D**: > 20%  \\n**E**: <= 20%  \\n\\n## Reliability, Security Vulnerabilities, Security Review, and Maintainability Ratings\\n\\nThe Reliability, Security Vulnerabilities, Security Review, and Maintainability ratings for a Portfolio are calculated as the average of the ratings for all projects included in the Portfolio. \\n\\nSonarQube converts each project's letter rating to a number (see conversion table below), calculates an average number for the projects in the portfolio, and converts that average to a letter rating. Averages ending with .5 are rounded up resulting in the \\\"lower\\\" of the two possible ratings, so an average of 2.5 would be rounded up to 3 and result in a \\\"C\\\" rating).\\n\\nThis gives an \\\"problem density\\\" measure on the four axes of Reliability, Security Vulnerabilities, Security Review, and Maintainability for your Portfolio.\\n\\nRating conversion:\\n\\n**E**: 5  \\n**D**: 4  \\n**C**: 3  \\n**B**: 2  \\n**A**: 1  \\n\\n*Note: the Portfolio Home Page is also available at Sub-Portfolio level*\\n\\n## Portfolio PDF Report\\n\\nOn a Portfolio Home Page, you can download a PDF overview of the Portfolio by selecting **Download as PDF** from the \\\"Portfolio PDF Report\\\" dropdown menu in the upper-right corner. This is really convenient, for example, if you're going into a meeting where you may not have access to your SonarQube instance.\\n\\nYou can subscribe to receive a PDF by email by selecting **Subscribe** from the \\\"Portfolio PDF Report\\\" dropdown. You can set the frequency of the report at the portfolio and global levels to **daily**, **weekly**, or **monthly**. The default frequency is monthly.\\n\\n**Note:** You will only receive the PDF if the Portfolio is computed.\\n\\nPortfolios are created and edited in the global Portfolio administration interface: **Administration > Configuration > Portfolios**. For more information, see [Managing Portfolios](/project-administration/managing-portfolios/).\"},{\"path\":\"user-guide/project-page\",\"content\":\"---\\ntitle: Project Page\\nurl: /user-guide/project-page/\\n---\\n\\n\\nThe Project Homepage is the entry point of any project showing:\\n* the releasability status of the project\\n* the current state of its quality\\n* the quality of what has been produced since the start of the [New Code](/user-guide/clean-as-you-code/).\\n \\n\\nThe Project Page answers two questions:\\n* can I release my project today?\\n* if not, what should I improve to make the project pass the Quality Gate? \\n\\n## Quality Gate\\nSince the [Quality Gate](/user-guide/quality-gates/) is your most powerful tool to enforce your quality policy, the page starts with the project's current Quality Gate status. If the project passes, a simple, green all-clear is shown.\\n\\nIf not, details and drill-downs are immediately available to quickly identify what went wrong, with a section for each error condition showing what the current project value is and what it should be. As usual, you'll be able to click through on current values to get to drilldowns.\\n\\n## Prioritizing issues\\nBecause the best way to improve a project's quality is to catch and fix new problems before they become entrenched, the first view of a project is centered around New Code, which is highlighted in yellow on the right of the project homepage. The project space page shows a high-level summary of critical metrics, both current values and their New Code values.\\n\\nJust below the Quality Gate information, you have the numbers of old and new Issues in the Reliability and Security domains and then the Maintainability domain. Clicking on any figure on the page will take you to a detailed view, either in the Measures Page or the Issues Page.\\n\\nThe most important thing a developer must do is to ensure the new Issues in the yellow part of the screen are acknowledged, reviewed and fixed and to make sure that new code is covered by tests to help prevent future regressions. Regardless of how many Issues were introduced in the past or how little test coverage there is overall, a focus on the newly added Issues will ensure that the situation won't degrade versus the version you previously released in production.\\n\\nSo, which issues should you go after first: Bugs, Vulnerabilities or Code Smells? It depends, because the answer is dependent on the nature of your Issues. Let's say you have issues for a block of code that is duplicated 5 times, and inside this duplicated block of code, you have 3 Bugs and 5 Security Issues. The best approach is probably to fix the duplication first and then resolve the Bugs and Vulnerabilities in the newly centralized location, rather than fixing them 5 times.\\n\\nThat's why you need to review your new Issues before jumping into resolving them. \\n\\n## Viewing project measures at a lower level\\nThe project-level **Measures** menu item takes you to a dedicated sub-space where you see all project measures. Choose a measure for more details. Both list and tree views are available for each measure, and treemaps are available for percentages and ratings.\\n\\n### Viewing all issues in a project\\nThe project-level **Issues** menu item takes you to a project-specific Issues page, where you can perform all the same actions you can at the higher level.\\nOn this page, you can easily narrow the list to the New Issues as set by your New Code definition, by selecting `New Code` in **Creation Date** facet.\\n\\n## Viewing project structure and code\\nThe project-level **Code** menu item takes you to an outline of your project structure. Drill down to see files in a directory, and choose a file to see its code.\\n\\nIf your project is too large for easy exploration via drilling, the search feature on this page will help. While the global search in the main menu returns results from throughout the {instance} instance, the localized search on the code page is restricted to files and directories in the current project.\\n\\n## Viewing project activity and history\\nThe project-level **Activity** menu item takes you to the full list of code scans performed on your project since it was created in {instance}. By going there you can follow the evolution of the Quality Gate, see the changes of Quality Profiles and know when a given version of your code has been scanned.\\n\\n## Spotting risks with visualizations\\nVisualizations allow you to compare project components and quickly spot the ones that represent the greatest risks. The **Activity** page offers several pre-defined visualizations, and you can also create Custom visualizations with the metrics of your choice.\\n\\n## Using project badges to promote project health\\nYou can promote your project's status in third-party tools and external websites using project badges. You can find the project badges by opening the **Project Information** menu in the upper-right corner of the project home page and clicking **Get project badges**. From here, you can choose and fine-tune your badge then copy the markdown text or image URL for it. Each project badge has a unique security token, which is required to make it accessible from third-party tools.\\n\\nUsing project badges can expose sensitive information like your security rating and other metrics. Because of this, you should only use them in trusted environments. If a project badge URL is accessed by someone who should not have access to it, a project administrator can renew the project badge\u2019s unique token by clicking the **Renew token** button. This invalidates any existing project badge URLs, and you'll have to update all locations where the badge is being used. \\n\"},{\"path\":\"user-guide/quality-gates\",\"content\":\"---\\ntitle: Quality Gates\\nurl: /user-guide/quality-gates/\\n---\\n\\n## Overview\\n\\nQuality Gates enforce a quality policy in your organization by answering one question: is my project ready for release?\\n\\nTo answer this question, you define a set of conditions against which projects are measured. For example:\\n\\n* No new blocker issues\\n* Code coverage on new code greater than 80%\\n\\nSee the **Defining Quality Gates** section below for more information on defining conditions.\\n\\nIdeally, all projects will use the same quality gate, but that's not always practical. For instance, you may find that:\\n\\n* Technological implementation differs from one application to another (you might not require the same code coverage on new code for Web or Java applications).\\n* You want to ensure stronger requirements on some of your applications (internal frameworks for example).\\n\\nWhich is why you can define as many quality gates as you need. You can access the **[Quality Gates](/#sonarqube#/quality_gates)** page from the top menu. From here you can define and manage your Quality Gates.\\n\\n## Quality Gate permissions\\nBy default, only users with the global **Administer Quality Gates** permission can edit Quality Gates. This is set at **Administration > Security > Global Permissions**.\\n\\nSonarQube also allows users with the global **Administer Quality Gates** permission to give an expert or group of experts permission to manage a specific Quality Gate. These experts only have permission for that Quality Gate, not all Quality Gates. Grant permissions to specific Quality Gate on the Quality Gate's page (**Quality Gates > [Quality Gate name]**) under the **Permissions** heading by clicking the **Grant permissions to more users** button.\\n\\n## Use the best Quality Gate configuration\\n\\nThe \\\"Sonar way\\\" Quality Gate is provided by SonarSource, activated by default, and considered as built-in and read-only. This Quality Gate represents the best way to implement the [Clean as You Code](/user-guide/clean-as-you-code/) concept by focusing on new code. With each SonarQube release, we automatically adjust this default quality gate according to SonarQube's capabilities.\\n\\nWith the Quality Gate, you can enforce ratings (reliability, security, security review, and maintainability) based on metrics on overall code and new code. These metrics are part of the default quality gate. Note that, while test code quality impacts your Quality Gate, it's only measured based on the maintainability and reliability metrics. Duplication and security issues aren't measured on test code.\\n\\nYou should adjust your quality gates so they provide clear feedback to developers looking at their project page.\\n\\nDon't forget that Quality Gate conditions must use differential values. For example, there's no point in checking an absolute value such as: `Number of Lines of Code is greater than 1000`.\\n\\n### Recommended Quality Gate\\n\\nWe recommend the built-in `Sonar way` quality gate for most projects. It focuses on keeping new code clean, rather than spending a lot of effort remediating old code. Out of the box, it's already set as the default profile.\\n\\n## Quality Gate status\\n\\nThe current status is displayed prominently at the top of the Project Page:\\n\\n![Quality Gate Status](/images/quality-gate-status.jpeg)\\n\\n## Getting notified when a Quality Gate fails\\n\\nThanks to the notification mechanism, users can be notified when a quality gate fails. To do so, subscribe to the **New quality gate status** notification either for all projects or a set of projects you're interested in.\\n\\n## Security\\n\\nQuality Gates can be accessed by any user (even anonymous users). All users can view every aspect of a quality gate.\\n\\nTo make changes (create, edit or delete) users must be granted the **Administer Quality Profiles and Gates** permission.\\n\\nA **project administrator** can choose which quality gates their project is associated with. See Project Settings for more.\\n\\n## Defining Quality Gates\\n\\nEach Quality Gate condition is a combination of:\\n\\n* a measure\\n* a comparison operator\\n* an error value\\n\\nFor instance, a condition might be:\\n\\n* measure: Blocker issue\\n* comparison operator: >\\n* error value: 0\\n\\nWhich can be stated as: No blocker issues.\\n\"},{\"path\":\"user-guide/rules\",\"content\":\"---\\ntitle: Rules\\nurl: /user-guide/rules/\\n---\\n## Overview\\nSonarQube executes rules on source code to generate issues. There are four types of rules:\\n* Code Smell (Maintainability domain)\\n* Bug (Reliability domain)\\n* Vulnerability (Security domain)\\n* Security Hotspot (Security domain)\\n\\nFor Code Smells and Bugs, zero false-positives are expected. At least this is the target so that developers don't have to wonder if a fix is required.\\n\\nFor Vulnerabilities, the target is to have more than 80% of issues be true-positives.\\n\\nSecurity Hotspot rules draw attention to code that is security-sensitive. It is expected that more than 80% of the issues will be quickly resolved as \\\"Reviewed\\\" after review by a developer.\\n\\nThe Rules page is the entry point where you can discover all the existing rules or create new ones based on provided templates.\\n\\n## Rules\\n\\nBy default, when entering the top menu item \\\"Rules\\\", you will see all the available rules installed on your SonarQube instance. You have the ability to narrow the selection based on search criteria in the left pane:\\n\\n* **Language**: the language to which a rule applies.\\n* **Type**: Bug, Vulnerability, Code Smell or Security Hotspot rules.\\n* **Tag**: it is possible to add tags to rules in order to classify them and to help discover them more easily.\\n* **Repository**: the engine/analyzer that contributes rules to SonarQube.\\n* **Default Severity**: the original severity of the rule - as defined by SonarQube.\\n* **Status**: rules can have 3 different statuses:\\n  * **Beta**: The rule has been recently implemented and we haven't gotten enough feedback from users yet, so there may be false positives or false negatives.\\n  * **Deprecated**: The rule should no longer be used because a similar, but more powerful and accurate rule exists.\\n  * **Ready**: The rule is ready to be used in production.\\n* **Available Since**: date when a rule was first added on SonarQube. This is useful to list all the new rules since the last upgrade of a plugin for instance.\\n* **Template**: display rule templates that allow to create custom rules (see later on this page).\\n* **Quality Profile**: inclusion in or exclusion from a specific profile\\n\\nIf a Quality Profile is selected, it is also possible to check for its active severity and whether it is inherited or not. See the Quality Profile documentation for more.\\n\\n## Rule Details\\n\\nTo see the details of a rule, either click on it, or use the right arrow key. Along with basic rule data, you'll also be able to see which, if any, profiles it's active in and how many open issues have been raised with it.\\n\\nThe following actions are available only if you have the right permissions (\\\"Administer Quality Profiles and Gates\\\"):\\n\\n* **Add/Remove Tags**:\\n  * It is possible to add existing tags on a rule, or to create new ones (just enter a new name while typing in the text field).\\n  * Note that some rules have built-in tags that you cannot remove - they are provided by the plugins which contribute the rules.\\n* **Extend Description**:\\n  * You can extend rule descriptions to let users know how your organization is using a particular rule or to give more insight on a rule.\\n  * Note that the extension will be available to non-admin users as a normal part of the rule details.\\n\\n<!-- sonarqube -->\\n## Rule Templates and Custom Rules\\n\\nRule Templates are provided by plugins as a basis for users to define their own custom rules in {instance}. To find templates, select the **Show Templates Only** facet from the the \\\"Template\\\" dropdown:\\n\\n![Rule templates.](/images/rule-templates.png)\\n\\nTo create a custom rule from a template click the **Create** button next to the \\\"Custom Rules\\\" heading and fill in the following information:\\n* Name\\n* Key (auto-suggested)\\n* Description (Markdown format is supported)\\n* Default Severity\\n* Status\\n* The parameters specified by the template\\n\\nYou can navigate from a template to the details of custom rules defined from it by clicking the link in the \\\"Custom Rules\\\" section.\\n\\n![Rule template details.](/images/rule-template-details.png)\\n\\n### Custom Rules\\nCustom Rules are considered like any other rule, except that you can edit or delete them:\\n\\n![Custom rules.](/images/rules-custom.png)\\n\\n**Note:** When deleting a custom rule, it is not physically removed from the {instance} instance. Instead, its status is set to \\\"REMOVED\\\". This allows current or old issues related to this rule to be displayed properly in {instance} until they are fully removed.\\n\\n## Extending Coding Rules\\n\\nCustom coding rules can be added. See [Adding Coding Rules](/extend/adding-coding-rules/) for detailed information and tutorials.\\n<!-- /sonarqube -->\\n\\n## Rule Types and Severities\\n\\n### How are rules categorized?\\n\\nThe {instance} Quality Model divides rules into four categories: Bugs, Vulnerabilities, Security Hotspots, and Code Smells. Rules are assigned to categories based on the answers to these questions:\\n\\n**Is the rule about code that is demonstrably wrong, or more likely wrong than not?**  \\nIf the answer is \\\"yes\\\", then it's a Bug rule.  \\nIf not...\\n\\n**Is the rule about code that could be exploited by a hacker?**  \\nIf so, then it's a Vulnerability rule.  \\nIf not...\\n\\n**Is the rule about code that is security-sensitive?**  \\nIf so, then it's a Security Hotspot rule.  \\nIf not...\\n\\n**Is the rule neither a Bug nor a Vulnerability?**  \\nIf so, then it's a Code Smell rule.\\n\\n## How are severities assigned?\\nTo assign severity to a rule, we ask a further series of questions. The first one is basically:\\n\\n**What's the worst thing that could happen?**\\n\\nIn answering this question, we try to factor in Murphy's Law without predicting Armageddon.\\n\\nThen we assess whether the impact and likelihood of the Worst Thing (see _How are severity and likelihood decided?_, below) are high or low, and plug the answers into a truth table:\\n\\n|          | Impact                 | Likelihood             |\\n| -------- | ---------------------- | ---------------------- |\\n| Blocker  | ![](/images/check.svg) | ![](/images/check.svg) |\\n| Critical | ![](/images/check.svg) | ![](/images/cross.svg) |\\n| Major    | ![](/images/cross.svg) | ![](/images/check.svg) |\\n| Minor    | ![](/images/cross.svg) | ![](/images/cross.svg) |\\n\\n## How are severity and likelihood decided?\\nTo assess the severity of a rule, we start from the Worst Thing (see _How are severities assigned?_, above) and ask category-specific questions.\\n\\n### Bugs\\nImpact: **Could the Worst Thing cause the application to crash or to corrupt stored data?**\\n\\nLikelihood: **What's the probability that the Worst Thing will happen?**\\n\\n### Vulnerabilities\\nImpact: **Could the exploitation of the Worst Thing result in significant damage to your assets or your users?**\\n\\nLikelihood: **What is the probability that a hacker will be able to exploit the Worst Thing?**\\n\\n### Security Hotspots\\nSecurity Hotspots are not assigned severities as it is unknown whether there is truly an underlying vulnerability until they are reviewed.\\n\"},{\"path\":\"user-guide/security-hotspots\",\"content\":\"---\\ntitle: Security Hotspots\\nurl: /user-guide/security-hotspots/\\n---\\n\\n## What is a Security Hotspot?\\nA Security Hotspot highlights a security-sensitive piece of code that the developer needs to review. Upon review, you'll either find there is no threat or you need to apply a fix to secure the code. \\n\\nAnother way of looking at hotspots may be [the concept of defense in depth](https://en.wikipedia.org/wiki/Defense_in_depth_(computing)) in which several redundant protection layers are placed in an application so that it becomes more resilient in the event of an attack.\\n\\n## Vulnerability or Hotspot?\\nThe main difference between a hotspot and a vulnerability is **the need of a review** before deciding whether to apply a fix:\\n\\n* With a Hotspot, a security-sensitive piece of code is highlighted, but the overall application security may not be impacted. It's up to the developer to review the code to determine whether or not a fix is needed to secure the code.\\n* With a vulnerability, a problem that impacts the application's security has been discovered that needs to be fixed immediately.\\n\\nAn example is the [RSPEC-2092](https://jira.sonarsource.com/browse/RSPEC-2092) where the use of *cookie secure flag* is recommended to prevent cookies from being sent over non-HTTPS connections but a review is needed because:\\n* HTTPS is the main protection against MITM attacks and so the secure flag is only an additional protection in case of some failures of network security. \\n* The cookie may be designed to be sent everywhere (non-HTTPS websites included) because it's a tracking cookie or similar.\\n\\nWith hotspots we try to give some freedom to users and to educate them on how to choose the most relevant/appropriate protections depending on the context (budget, threats, etc).\\n\\n## Why are Security Hotspots Important?\\nWhile the need to fix individual hotspots depends on the context, you should view Security Hotspots as an essential part of improving an application's robustness. The more fixed hotspots there are, the more secure your code is in the event of an attack. Reviewing Security Hotspots allows you to:\\n\\n* **Understand the risk** \u2013 Understanding when and why you need to apply a fix in order to reduce an information security risk (threats and impacts).\\n* **Identify protections** \u2013 While reviewing Hotspots, you'll see how to avoid writing code that's at risk, determine which fixes are in place, and determine which fixes still need to be implemented to fix the highlighted code.\\n* **Identify impacts** \u2013 With hotspots you'll learn how to apply fixes to secure your code based on the impact on overall application security. Recommended secure coding practices are included on the Hotspots page to assist you during your review.\\n\\n## Lifecycle\\nSecurity Hotspots have a dedicated lifecycle. To make status changes, the user needs the **Administer Security Hotspots** permission. This permission is enabled by default. Users with the **Browse** permission can comment on or change the user assigned to a Security Hotspot.\\n\\n### Statuses  \\nThrough the lifecycle, a Security Hotspot takes one of the following statuses:\\n\\n* **To Review** \u2013 the default status of new Security Hotspots set by SonarQube. A Security Hotspot has been reported and needs to be checked.\\n* **Reviewed** \u2013 a developer has manually assessed the Security Hotspot and decided whether or not to apply a fix.\\n\\n## Workflow  \\nFollow this workflow to review Security Hotspots and apply any fixes needed to secure your code.\\n\\n### Review Priority\\nWhen SonarQube detects a Security Hotspot, it's added to the list of Security Hotspots according to its review priority from High to Low. Hotspots with a High Review Priority are the most likely to contain code that needs to be secured and require your attention first. \\n\\nReview Priority is determined by the security category of each security rule. Rules in categories that are ranked high on the OWASP Top 10 and CWE Top 25 standards are considered to have a High Review Priority. Rules in categories that aren't ranked high or aren't mentioned on the OWASP Top 10 or CWE Top 25 standards are rated as Medium or Low.\\n\\n### Reviewing Hotspots  \\nWhen reviewing a Hotspot, you should:\\n\\n1. Review the **What's the risk** tab to understand why the Security Hotspot was raised.\\n1. From the **Are you at risk** tab, read the **Ask Yourself Whether** section to determine if you need to apply a fix to secure the code highlighted in the Hotspot.\\n1. From the **How can you fix it** tab, follow the **Recommended Secure Coding Practices** to fix your code if you've determined it's unsafe.\\n\\nAfter following these steps, set the Security Hotspot to one of the following:\\n\\n* **Fixed** \u2013 if you have applied a fix to secure the code highlighted by the Hotspot.\\n* **Safe** \u2013 if the code is already secure and doesn't need to be fixed. (for example, other more relevant protections are already in place).\\n* **To review** \u2013 if you need another user's review.\\n\\n### Review History\\n\\nThe **Review history** tab shows the history of the Security Hotspot including the status it's been assigned and any comments the reviewer had regarding the Hotspot.\\n\\n### Reviewing Hotspots in your IDE\\n\\nSeeing a Security Hotspot directly in the IDE can help you better understand its context and decide whether it is safe or not. This is the purpose of the **Open in IDE** button that you'll see as an authenticated user.\\n\\nThis feature is available to users of:\\n* [SonarLint for Visual Studio](https://www.sonarlint.org/visualstudio) 4.29 and above \\n* [SonarLint for IntelliJ](https://www.sonarlint.org/intellij) 4.13 and above\\n* [SonarLint for VS Code](https://www.sonarlint.org/vscode) 1.20 and above\\n* [SonarLint for Eclipse](https://www.sonarlint.org/eclipse) 5.7 and above\\n\\nThe project needs to be open in the appropriate IDE and bound to the server through SonarLint's connected mode.\\n\\nKeep in mind that the revision or branch analyzed by SonarQube may not be the same as what you have opened in the IDE. In this case, SonarLint will do its best to locate the Security Hotspot in your local code.\\n\"},{\"path\":\"user-guide/security-reports\",\"content\":\"---\\ntitle: Security Reports\\nurl: /user-guide/security-reports/\\n---\\n\\n*Security Reports are available starting in [Enterprise Edition](https://redirect.sonarsource.com/editions/enterprise.html).*\\n\\n## What do Security Reports show?\\nSecurity Reports quickly give you the big picture on your application's security, with breakdowns of just where you stand in regard to each of the [OWASP Top 10](https://www.owasp.org/index.php/Top_10-2017_Top_10), both [CWE Top 25 2019](https://cwe.mitre.org/top25/archive/2019/2019_cwe_top25.html) and [CWE Top 25 2020](https://cwe.mitre.org/top25/archive/2020/2020_cwe_top25.html), and [CWE](https://cwe.mitre.org/) -specific details.\\n\\n[[warning]]\\n| The SANS Top 25 report is based on outdated statistics and should no longer be used. Instead, we recommend using the CWE Top 25 reports.\\n\\nSecurity Reports rely on the rules activated in your Quality Profiles to raise security issues. If there are no rules corresponding to a given OWASP category activated in your Quality Profile, you won't get issues linked to that specific category and the rating displayed will be **A**. That doesn't mean you are safe for that category, but that you need to activate more rules (assuming some exist) in your Quality Profile.\\n\\n## What's the difference between a Security Hotspot and a Vulnerability?\\n\\nSecurity Hotspots and Vulnerabilities differ in that:\\n\\n* A Security Hotspot is a security-sensitive piece of code that is highlighted but doesn't necessarily impact the overall application security. It's up to the developer to review the code to determine whether or not a fix is needed to secure the code.\\n* A vulnerability is a problem that impacts the application's security that needs to be fixed immediately.\\n\\nFor more details, see the [Security Hotspots](/user-guide/security-hotspots/) page. \\n\\n## Why don't I see any Vulnerabilities or Security Hotspots?\\nYou might not see any Vulnerabilities or Security Hotspots for the following reasons:\\n* Your code has been written without using any security-sensitive API. \\n* Vulnerability or Security Hotspot rules are available but not activated in your Quality Profile so no Security Hotspots or Vulnerabilities are raised.\\n* SonarQube might not currently have many rules for your language, so it won't raise any or only a few Vulnerabilities or Security Hotspots.\\n\\n## Downloading a PDF copy\\nYou can download a PDF copy of your Security Reports by clicking the **Download as PDF** button in the upper-right corner of the **Security Reports** page. \\n\\nThe PDF contains:\\n\\n- the number of open Vulnerabilities and the Security Rating on both overall code and new code.\\n- the number of Security Hotspots, the percentage of reviewed Security Hotspots, and the Security Review rating on both overall and new code. \\n- your SonarSource, OWASP Top 10, and CWE Top 25 2020 reports.\"},{\"path\":\"user-guide/security-rules\",\"content\":\"---\\ntitle: Security-related Rules\\nurl: /user-guide/security-rules/\\n---\\nThe {instance} Quality Model has four different types of rules: Reliability (bug), Maintainability (code smell), Security (vulnerability and hotspot) rules. There are a lot of expectations about security, so below we explain some key concepts and how the security rules differ from others.\\n\\n## What to expect from security-related rules\\nAs with other types of rules, we try to raise no false positives: you should be confident that anything reported to you as an issue is really an issue.\\n\\nUnder the hood SonarQube is based on different representations of the source code and technologies in order to be able to detect any kind of security issue:\\n* **Security-injection rules**: there is a vulnerability here when the inputs handled by your application are controlled by a user (potentially an attacker) and not validated or sanitized, when this occurs, the flow from sources (user-controlled inputs) to sinks (sensitive functions) will be presented. To do this, SonarQube uses well-known taint analysis technology on source code which allows, for example, the detection of:\\n  * [CWE-89](https://cwe.mitre.org/data/definitions/89.html): SQL Injection\\n  * [CWE-79](https://cwe.mitre.org/data/definitions/79.html): Cross-site Scripting\\n  * [CWE-94](https://cwe.mitre.org/data/definitions/94.html): Code Injection\\n* **Security-configuration rules**: here there is a security issue because the wrong parameter (eg: invalid cryptographic algorithm or TLS version) when calling a sensitive function has been set or when a check (eg: check_permissions() kind of function) was not done or not in the correct order, this problem is likely to appear often when the program is executed (no injected/complex attacks are required unlike in the previous category):\\n  * [CWE-1004](https://cwe.mitre.org/data/definitions/1004.html): Sensitive Cookie Without 'HttpOnly' Flag\\n  * [CWE-297](https://cwe.mitre.org/data/definitions/297.html): Improper Validation of Certificate with Host Mismatch\\n  * [CWE-327](https://cwe.mitre.org/data/definitions/327.html): Use of a Broken or Risky Cryptographic Algorithm\\n\\nThese security issues are then divided into two categories: vulnerabilities and hotspots (see the main differences on the [Security Hotspots](/user-guide/security-hotspots/) page). Security Hotspots have been introduced for security protections that have no direct impact on the overall application's security. Most injection rules are vulnerabilities, for example, if a SQL injection is found, it is certain that a fix (input validation) is required, so this is a vulnerability. On the contrary, the *httpOnly* flag when creating a cookie is an additional protection desired (to reduce the impact when XSS vulnerabilities appear) but not always possible to implement or relevant depending on the context of the application, so it's a hotspot. \\n\\nWith Hotspots, we want to help developers understand information security risks, threats, impacts, root causes of security issues, and the choice of relevant software protections. In short, we really want to educate developers and help them develop secure, ethical, and privacy-friendly applications.\\n\\n## Which security-standards are covered?\\nOur security rules are classified according to well-established security-standards such as:\\n* [CWE](https://cwe.mitre.org/): SonarQube is a CWE compatible product [since 2015](https://cwe.mitre.org/compatible/questionnaires/33.html).\\n* [OWASP Top 10 ](https://www.owasp.org/index.php/Top_10-2017_Top_10))\\n* [SANS Top 25 - outdated](https://www.sans.org/top25-software-errors/)\\n\\nThe standards to which a rule relates will be listed in the **See** section at the bottom of the rule description. More generally, you can search for a rule on [rules.sonarsource.com](https://rules.sonarsource.com/):\\n* [Java-vulnerability-issue-type](https://rules.sonarsource.com/java/type/Vulnerability): all vulnerability rules for Java language.\\n* [Java-hotspots-issue-type](https://rules.sonarsource.com/java/type/Security%20Hotspot): all security-hotspot rules for Java language.\\n* [Java-tag-injection](https://rules.sonarsource.com/java/tag/injection): all security-injection rules for Java language.\\n\\n## How to propose new security-rules?\\nSecurity is a lively world where new types of attacks and vulnerabilities appear very often, so we welcome any suggestions for new security-rules. You can read the [adding coding rules](/extend/adding-coding-rules/) page to see how to develop a new rule or propose a new one [on our community forum](https://community.sonarsource.com/c/suggestions/rules/13).\\n\\nRegarding the security-injection rules mentioned above, it's possible to [extend the taint analysis configuration](/analysis/security_configuration/) to allow the SonarQube engine to use new sources, sanitizers, validators and sinks of the homemade-frameworks that you use. Security Engine Custom Configuration is available as part of the Enterprise Edition and above.\\n\"},{\"path\":\"user-guide/user-account\",\"content\":\"---\\ntitle: Overview\\nurl: /user-guide/user-account/\\n---\\n\\nAs a {instance} user you have your own space where you can see the things that are relevant to you:\\n\\n## Profile\\n\\n<!-- sonarqube -->\\n\\nIt gives you a summary of:\\n\\n- your Groups\\n- your SCM accounts\\n\\n## Security\\n\\nIf your instance is not using a 3rd party authentication mechanism such as LDAP or an OAuth provider (GitHub, Google Account, ...), you can change your password from here. Additionally, you can also manage your own authentication tokens.\\n\\nYou can create as many Tokens as you want. Once a Token is created, you can use it to perform analysis on a project where you have the [Execute Analysis](/instance-administration/security/) permission.\\n\\n<!-- /sonarqube -->\\n\\n<!-- sonarcloud -->\\n\\nIt gives you a summary of your SCM accounts and allows you to delete your account.\\n\\n## Security\\n\\nYou can create as many Tokens as you want. Once a Token is created, you can use it to perform analysis on a project where you have the [Execute Analysis](/instance-administration/security/) permission.\\n\\n## Organizations\\n\\nThis is an overview of all the organizations you are member of.\\n\\n## Delete your user account\\n\\nGo to [User > My Account > Profile](/#sonarcloud#/account) and click on **Delete**. Once your account is deleted, all you data will be removed except your login that will still be displayed in different places:\\n\\n- issues assignee\\n- issues comments\\n- issues changelog\\n\\nNote that you can manually unassign yourself from all your issues and/or remove your comments before deleting your account.\\n\\nThe information used to identify yourself in SCM (name, email) are part of the SCM data and can not be removed.\\n\\n<!-- /sonarcloud -->\\n\"},{\"path\":\"user-guide/user-token\",\"content\":\"---\\ntitle: Generating and Using Tokens\\nurl: /user-guide/user-token/\\n---\\n\\nUsers can generate tokens that can be used to run analyses or invoke web services without access to the user's actual credentials.\\n\\n## Generating a token\\n\\nYou can generate new tokens at **User > My Account > Security**.\\n\\nThe form at the bottom of the page allows you to generate new tokens. Once you click the **Generate** button, you will see the token value. Copy it immediately; once you dismiss the notification you will not be able to retrieve it.\\n\\n## Revoking a token\\n\\nYou can revoke an existing token at **User > My Account > Security** by clicking the **Revoke** button next to the token.\\n\\n## Using a token\\n\\nUser tokens must replace your normal login process in the following scenarios:\\n\\n* when running analyses on your code: replace your login with the token in the `sonar.login` property. \\n* when invoking web services: just pass the token instead of your login while doing the basic authentication.\\n\\nIn both cases, you don't need to provide a password (so when running analyses on your code, the property `sonar.password` is optional). Using a token is the preferred method over using a login and password.\"},{\"path\":\"user-guide/visualizations\",\"content\":\"---\\ntitle: Visualizations\\nurl: /user-guide/visualizations/\\n---\\nVisualizations are available to help you gain deeper insights into your projects' current statuses and histories.\\n\\n## How do I compare current state for multiple projects or project components?\\nThe Projects space allows you to filter the projects in your instance by multiple, measure-based criteria. Once you've chosen your set, you don't have to stare at the raw numbers to identify the risks its projects face. Instead, several visualizations (**Projects > Perspective**) are available to help you understand each project's relative position in terms of each of the major axes:\\n\\n* Risk - Reliability and Security ratings, test coverage, technical debt, and lines of code\\n* Reliability - Reliability rating, Reliability remediation effort, lines of code, and Bug count\\n* Security - Security rating, Security remediation effort, lines of code, and Vulnerability count\\n* Maintainability - Maintainability rating, Technical debt, lines of code, and Code Smell count\\n* Coverage - Coverage, complexity, and uncovered lines\\n* Duplications - Duplicated Lines %, lines of code, and duplicated blocks\\n* At the project level these same visualizations are available in the Measures tab to help you compare project components. The Project Overview corresponds to the Risk visualization in the Projects space, For the other five graphs, choose the Overview option under the relevant domain.\\n\\nAdditionally, treemaps are also available for percentage and rating metrics at the project level. Navigate to them in the Measures tab using the perspective selector in the right pane.\\n\\n## How do I visualize metric history?\\nAt the project level, the Activity tab offers several canned line graphs of selected metrics across time, with convenient mouseovers to show graph details and the ability to easily narrow the graph to a slice of the project's history. Beyond the canned graphs, you also have the ability to map the metrics of your choice against each other in a Custom graph.\\n\\n![](/images/visualizations.png)\\n\"}];", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport remark from 'remark';\nimport visit from 'unist-util-visit';\nimport { filterContent, ParsedContent, separateFrontMatter } from '../../helpers/markdown';\nimport Docs from './documentation.directory-loader';\nimport { DocumentationEntry, DocumentationEntryScope } from './utils';\n\nexport default function getPages(\n  parsedOverrides: T.Dict<ParsedContent> = {}\n): DocumentationEntry[] {\n  // Get entries, merge with overrides if applicable.\n  const pages = ((Docs as unknown) as Array<{ content: string; path: string }>).map(file => {\n    let parsed = separateFrontMatter(file.content);\n\n    if (parsedOverrides[file.path]) {\n      const parsedOverride = parsedOverrides[file.path];\n      parsed = {\n        content: parsedOverride.content,\n        frontmatter: { ...parsed.frontmatter, ...parsedOverride.frontmatter }\n      };\n      delete parsedOverrides[file.path];\n    }\n\n    return { parsed, file };\n  });\n\n  // Add new entries.\n  Object.keys(parsedOverrides).forEach(path => {\n    const parsed = parsedOverrides[path];\n    pages.push({\n      parsed,\n      file: { content: parsed.content, path }\n    });\n  });\n\n  return pages.map(({ parsed, file }) => {\n    let content = '';\n    let text = '';\n    try {\n      content = filterContent(parsed.content);\n      text = getText(content);\n    } catch (e) {\n      /* eslint-disable-next-line no-console */\n      console.error(\n        `Documentation - an error occured while parsing page \"${parsed.frontmatter.url ||\n          file.path}\":`,\n        e\n      );\n    }\n\n    return {\n      relativeName: file.path,\n      url: parsed.frontmatter.url || `/${file.path}/`,\n      title: parsed.frontmatter.title,\n      navTitle: parsed.frontmatter.nav || undefined,\n      order: Number(parsed.frontmatter.order || -1),\n      scope: parsed.frontmatter.scope\n        ? (parsed.frontmatter.scope.toLowerCase() as DocumentationEntryScope)\n        : undefined,\n      text,\n      content\n    };\n  });\n}\n\nfunction getText(content: string) {\n  const ast = remark().parse(content);\n  const texts: string[] = [];\n  visit(ast, node => {\n    if (node.type === `text` || node.type === `inlineCode`) {\n      texts.push(node.value);\n    }\n  });\n  return texts.join(' ').replace(/\\s+/g, ' ');\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\n\nexport type DocumentationEntryScope = 'sonarqube' | 'sonarcloud' | 'static';\n\nexport interface DocumentationEntry {\n  content: string;\n  relativeName: string;\n  navTitle: string | undefined;\n  text: string;\n  title: string;\n  url: string;\n}\n\nexport function getNodeFromUrl(pages: DocumentationEntry[], url: string) {\n  return pages.find(p => p.url === url);\n}\n\nconst WORDS = 6;\n\nfunction cutLeadingWords(str: string) {\n  let words = 0;\n  for (let i = str.length - 1; i >= 0; i--) {\n    if (/\\s/.test(str[i])) {\n      words++;\n    }\n    if (words === WORDS) {\n      return i > 0 ? `...${str.substring(i + 1)}` : str;\n    }\n  }\n  return str;\n}\n\nfunction cutTrailingWords(str: string) {\n  let words = 0;\n  for (let i = 0; i < str.length; i++) {\n    if (/\\s/.test(str[i])) {\n      words++;\n    }\n    if (words === WORDS) {\n      return i < str.length - 1 ? `${str.substring(0, i)}...` : str;\n    }\n  }\n  return str;\n}\n\nexport function cutWords(tokens: Array<{ text: string; marked: boolean }>) {\n  const result: Array<{ text: string; marked: boolean }> = [];\n  let length = 0;\n\n  const highlightPos = tokens.findIndex(token => token.marked);\n  if (highlightPos > 0) {\n    const text = cutLeadingWords(tokens[highlightPos - 1].text);\n    result.push({ text, marked: false });\n    length += text.length;\n  }\n\n  result.push(tokens[highlightPos]);\n  length += tokens[highlightPos].text.length;\n\n  for (let i = highlightPos + 1; i < tokens.length; i++) {\n    if (length + tokens[i].text.length > 100) {\n      const text = cutTrailingWords(tokens[i].text);\n      result.push({ text, marked: false });\n      return result;\n    } else {\n      result.push(tokens[i]);\n      length += tokens[i].text.length;\n    }\n  }\n\n  return result;\n}\n\nexport function highlightMarks(str: string, marks: Array<{ from: number; to: number }>) {\n  const sortedMarks = sortBy(\n    [\n      ...marks.map(mark => ({ pos: mark.from, start: true })),\n      ...marks.map(mark => ({ pos: mark.to, start: false }))\n    ],\n    mark => mark.pos,\n    mark => Number(!mark.start)\n  );\n\n  const cuts: Array<{ text: string; marked: boolean }> = [];\n  let start = 0;\n  let balance = 0;\n\n  for (const mark of sortedMarks) {\n    if (mark.start) {\n      if (balance === 0 && start !== mark.pos) {\n        cuts.push({ text: str.substring(start, mark.pos), marked: false });\n        start = mark.pos;\n      }\n      balance++;\n    } else {\n      balance--;\n      if (balance === 0 && start !== mark.pos) {\n        cuts.push({ text: str.substring(start, mark.pos), marked: true });\n        start = mark.pos;\n      }\n    }\n  }\n\n  if (start < str.length - 1) {\n    cuts.push({ text: str.substr(start), marked: false });\n  }\n\n  return cuts;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { testPathAgainstUrl } from '../navTreeUtils';\nimport { DocumentationEntry } from '../utils';\n\ninterface Props {\n  depth?: number;\n  node: DocumentationEntry | undefined;\n  splat: string;\n}\n\nexport function MenuItem({ depth = 0, node, splat }: Props) {\n  if (!node) {\n    return null;\n  }\n\n  const active = testPathAgainstUrl(node.url, splat);\n  const maxDepth = Math.min(depth, 3);\n  return (\n    <Link\n      className={classNames('list-group-item', { active, [`depth-${maxDepth}`]: depth > 0 })}\n      key={node.url}\n      to={'/documentation' + node.url}>\n      <h3 className=\"list-group-item-heading\">{node.navTitle || node.title}</h3>\n    </Link>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { DocNavigationItem, DocsNavigationBlock } from 'Docs/@types/types';\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport OpenCloseIcon from '../../../components/icons/OpenCloseIcon';\nimport { isDocsNavigationBlock } from '../navTreeUtils';\nimport { DocumentationEntry, getNodeFromUrl } from '../utils';\nimport { MenuItem } from './MenuItem';\n\ninterface Props {\n  block: DocsNavigationBlock;\n  depth?: number;\n  openByDefault: boolean;\n  openChain: DocNavigationItem[];\n  pages: DocumentationEntry[];\n  splat: string;\n  title: string;\n}\n\ninterface State {\n  open: boolean;\n}\n\nexport default class MenuBlock extends React.PureComponent<Props, State> {\n  state: State;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      open: props.openByDefault !== undefined ? props.openByDefault : false\n    };\n  }\n\n  handleClick = () => {\n    this.setState(prevState => ({\n      open: !prevState.open\n    }));\n  };\n\n  renderMenuItems = (block: DocsNavigationBlock): React.ReactNode => {\n    const { depth = 0, openChain, pages, splat } = this.props;\n    return block.children.map(item => {\n      if (typeof item === 'string') {\n        return (\n          <MenuItem depth={depth + 1} key={item} node={getNodeFromUrl(pages, item)} splat={splat} />\n        );\n      } else if (isDocsNavigationBlock(item)) {\n        return (\n          <MenuBlock\n            block={item}\n            depth={depth + 1}\n            key={item.title}\n            openByDefault={openChain.includes(item)}\n            openChain={openChain}\n            pages={pages}\n            splat={splat}\n            title={item.title}\n          />\n        );\n      } else {\n        return null;\n      }\n    });\n  };\n\n  render() {\n    const { block, depth = 0, title } = this.props;\n    const { open } = this.state;\n    const maxDepth = Math.min(depth, 3);\n    return (\n      <>\n        <ButtonLink\n          className={classNames('list-group-item', { [`depth-${maxDepth}`]: depth > 0 })}\n          onClick={this.handleClick}>\n          <h3 className=\"list-group-item-heading\">\n            <OpenCloseIcon className=\"little-spacer-right\" open={open} />\n            {title}\n          </h3>\n        </ButtonLink>\n        {open && this.renderMenuItems(block)}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DetachIcon from '../../../components/icons/DetachIcon';\n\ninterface Props {\n  title: string;\n  url: string;\n}\n\nexport function MenuExternalLink({ title, url }: Props) {\n  return (\n    <a href={url} key={title} target=\"_blank\" rel=\"noopener noreferrer\">\n      <h3 className=\"list-group-item-heading\">\n        <DetachIcon className=\"spacer-right\" />\n        {title}\n      </h3>\n    </a>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { DocNavigationItem } from 'Docs/@types/types';\nimport * as React from 'react';\nimport {\n  getOpenChainFromPath,\n  isDocsNavigationBlock,\n  isDocsNavigationExternalLink\n} from '../navTreeUtils';\nimport { DocumentationEntry, getNodeFromUrl } from '../utils';\nimport MenuBlock from './MenuBlock';\nimport { MenuExternalLink } from './MenuExternalLink';\nimport { MenuItem } from './MenuItem';\n\ninterface Props {\n  navigation: DocNavigationItem[];\n  pages: DocumentationEntry[];\n  splat: string;\n}\n\ninterface State {\n  openChain: DocNavigationItem[];\n}\n\nexport default class Menu extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      openChain: getOpenChainFromPath(this.props.splat, this.props.navigation)\n    };\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    if (this.props.splat !== nextProps.splat) {\n      this.setState({ openChain: getOpenChainFromPath(nextProps.splat, nextProps.navigation) });\n    }\n  }\n\n  render() {\n    const { openChain } = this.state;\n    return (\n      <>\n        {this.props.navigation.map(item => {\n          if (isDocsNavigationBlock(item)) {\n            return (\n              <MenuBlock\n                block={item}\n                key={item.title}\n                openByDefault={openChain.includes(item)}\n                openChain={openChain}\n                pages={this.props.pages}\n                splat={this.props.splat}\n                title={item.title}\n              />\n            );\n          }\n          if (isDocsNavigationExternalLink(item)) {\n            return <MenuExternalLink key={item.title} title={item.title} url={item.url} />;\n          }\n          return (\n            <MenuItem\n              key={item}\n              node={getNodeFromUrl(this.props.pages, item)}\n              splat={this.props.splat}\n            />\n          );\n        })}\n      </>\n    );\n  }\n}\n", "/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.8\n * Copyright (C) 2019 Oliver Nightingale\n * @license MIT\n */\n\n;(function(){\n\n/**\n * A convenience function for configuring and constructing\n * a new lunr Index.\n *\n * A lunr.Builder instance is created and the pipeline setup\n * with a trimmer, stop word filter and stemmer.\n *\n * This builder object is yielded to the configuration function\n * that is passed as a parameter, allowing the list of fields\n * and other builder parameters to be customised.\n *\n * All documents _must_ be added within the passed config function.\n *\n * @example\n * var idx = lunr(function () {\n *   this.field('title')\n *   this.field('body')\n *   this.ref('id')\n *\n *   documents.forEach(function (doc) {\n *     this.add(doc)\n *   }, this)\n * })\n *\n * @see {@link lunr.Builder}\n * @see {@link lunr.Pipeline}\n * @see {@link lunr.trimmer}\n * @see {@link lunr.stopWordFilter}\n * @see {@link lunr.stemmer}\n * @namespace {function} lunr\n */\nvar lunr = function (config) {\n  var builder = new lunr.Builder\n\n  builder.pipeline.add(\n    lunr.trimmer,\n    lunr.stopWordFilter,\n    lunr.stemmer\n  )\n\n  builder.searchPipeline.add(\n    lunr.stemmer\n  )\n\n  config.call(builder, builder)\n  return builder.build()\n}\n\nlunr.version = \"2.3.8\"\n/*!\n * lunr.utils\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A namespace containing utils for the rest of the lunr library\n * @namespace lunr.utils\n */\nlunr.utils = {}\n\n/**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf lunr.utils\n * @function\n */\nlunr.utils.warn = (function (global) {\n  /* eslint-disable no-console */\n  return function (message) {\n    if (global.console && console.warn) {\n      console.warn(message)\n    }\n  }\n  /* eslint-enable no-console */\n})(this)\n\n/**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf lunr.utils\n */\nlunr.utils.asString = function (obj) {\n  if (obj === void 0 || obj === null) {\n    return \"\"\n  } else {\n    return obj.toString()\n  }\n}\n\n/**\n * Clones an object.\n *\n * Will create a copy of an existing object such that any mutations\n * on the copy cannot affect the original.\n *\n * Only shallow objects are supported, passing a nested object to this\n * function will cause a TypeError.\n *\n * Objects with primitives, and arrays of primitives are supported.\n *\n * @param {Object} obj The object to clone.\n * @return {Object} a clone of the passed object.\n * @throws {TypeError} when a nested object is passed.\n * @memberOf Utils\n */\nlunr.utils.clone = function (obj) {\n  if (obj === null || obj === undefined) {\n    return obj\n  }\n\n  var clone = Object.create(null),\n      keys = Object.keys(obj)\n\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i],\n        val = obj[key]\n\n    if (Array.isArray(val)) {\n      clone[key] = val.slice()\n      continue\n    }\n\n    if (typeof val === 'string' ||\n        typeof val === 'number' ||\n        typeof val === 'boolean') {\n      clone[key] = val\n      continue\n    }\n\n    throw new TypeError(\"clone is not deep and does not support nested objects\")\n  }\n\n  return clone\n}\nlunr.FieldRef = function (docRef, fieldName, stringValue) {\n  this.docRef = docRef\n  this.fieldName = fieldName\n  this._stringValue = stringValue\n}\n\nlunr.FieldRef.joiner = \"/\"\n\nlunr.FieldRef.fromString = function (s) {\n  var n = s.indexOf(lunr.FieldRef.joiner)\n\n  if (n === -1) {\n    throw \"malformed field ref string\"\n  }\n\n  var fieldRef = s.slice(0, n),\n      docRef = s.slice(n + 1)\n\n  return new lunr.FieldRef (docRef, fieldRef, s)\n}\n\nlunr.FieldRef.prototype.toString = function () {\n  if (this._stringValue == undefined) {\n    this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef\n  }\n\n  return this._stringValue\n}\n/*!\n * lunr.Set\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A lunr set.\n *\n * @constructor\n */\nlunr.Set = function (elements) {\n  this.elements = Object.create(null)\n\n  if (elements) {\n    this.length = elements.length\n\n    for (var i = 0; i < this.length; i++) {\n      this.elements[elements[i]] = true\n    }\n  } else {\n    this.length = 0\n  }\n}\n\n/**\n * A complete set that contains all elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.complete = {\n  intersect: function (other) {\n    return other\n  },\n\n  union: function (other) {\n    return other\n  },\n\n  contains: function () {\n    return true\n  }\n}\n\n/**\n * An empty set that contains no elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.empty = {\n  intersect: function () {\n    return this\n  },\n\n  union: function (other) {\n    return other\n  },\n\n  contains: function () {\n    return false\n  }\n}\n\n/**\n * Returns true if this set contains the specified object.\n *\n * @param {object} object - Object whose presence in this set is to be tested.\n * @returns {boolean} - True if this set contains the specified object.\n */\nlunr.Set.prototype.contains = function (object) {\n  return !!this.elements[object]\n}\n\n/**\n * Returns a new set containing only the elements that are present in both\n * this set and the specified set.\n *\n * @param {lunr.Set} other - set to intersect with this set.\n * @returns {lunr.Set} a new set that is the intersection of this and the specified set.\n */\n\nlunr.Set.prototype.intersect = function (other) {\n  var a, b, elements, intersection = []\n\n  if (other === lunr.Set.complete) {\n    return this\n  }\n\n  if (other === lunr.Set.empty) {\n    return other\n  }\n\n  if (this.length < other.length) {\n    a = this\n    b = other\n  } else {\n    a = other\n    b = this\n  }\n\n  elements = Object.keys(a.elements)\n\n  for (var i = 0; i < elements.length; i++) {\n    var element = elements[i]\n    if (element in b.elements) {\n      intersection.push(element)\n    }\n  }\n\n  return new lunr.Set (intersection)\n}\n\n/**\n * Returns a new set combining the elements of this and the specified set.\n *\n * @param {lunr.Set} other - set to union with this set.\n * @return {lunr.Set} a new set that is the union of this and the specified set.\n */\n\nlunr.Set.prototype.union = function (other) {\n  if (other === lunr.Set.complete) {\n    return lunr.Set.complete\n  }\n\n  if (other === lunr.Set.empty) {\n    return this\n  }\n\n  return new lunr.Set(Object.keys(this.elements).concat(Object.keys(other.elements)))\n}\n/**\n * A function to calculate the inverse document frequency for\n * a posting. This is shared between the builder and the index\n *\n * @private\n * @param {object} posting - The posting for a given term\n * @param {number} documentCount - The total number of documents.\n */\nlunr.idf = function (posting, documentCount) {\n  var documentsWithTerm = 0\n\n  for (var fieldName in posting) {\n    if (fieldName == '_index') continue // Ignore the term index, its not a field\n    documentsWithTerm += Object.keys(posting[fieldName]).length\n  }\n\n  var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5)\n\n  return Math.log(1 + Math.abs(x))\n}\n\n/**\n * A token wraps a string representation of a token\n * as it is passed through the text processing pipeline.\n *\n * @constructor\n * @param {string} [str=''] - The string token being wrapped.\n * @param {object} [metadata={}] - Metadata associated with this token.\n */\nlunr.Token = function (str, metadata) {\n  this.str = str || \"\"\n  this.metadata = metadata || {}\n}\n\n/**\n * Returns the token string that is being wrapped by this object.\n *\n * @returns {string}\n */\nlunr.Token.prototype.toString = function () {\n  return this.str\n}\n\n/**\n * A token update function is used when updating or optionally\n * when cloning a token.\n *\n * @callback lunr.Token~updateFunction\n * @param {string} str - The string representation of the token.\n * @param {Object} metadata - All metadata associated with this token.\n */\n\n/**\n * Applies the given function to the wrapped string token.\n *\n * @example\n * token.update(function (str, metadata) {\n *   return str.toUpperCase()\n * })\n *\n * @param {lunr.Token~updateFunction} fn - A function to apply to the token string.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.update = function (fn) {\n  this.str = fn(this.str, this.metadata)\n  return this\n}\n\n/**\n * Creates a clone of this token. Optionally a function can be\n * applied to the cloned token.\n *\n * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.clone = function (fn) {\n  fn = fn || function (s) { return s }\n  return new lunr.Token (fn(this.str, this.metadata), this.metadata)\n}\n/*!\n * lunr.tokenizer\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.separator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * This tokenizer will convert its parameter to a string by calling `toString` and\n * then will split this string on the character in `lunr.tokenizer.separator`.\n * Arrays will have their elements converted to strings and wrapped in a lunr.Token.\n *\n * Optional metadata can be passed to the tokenizer, this metadata will be cloned and\n * added as metadata to every token that is created from the object to be tokenized.\n *\n * @static\n * @param {?(string|object|object[])} obj - The object to convert into tokens\n * @param {?object} metadata - Optional metadata to associate with every token\n * @returns {lunr.Token[]}\n * @see {@link lunr.Pipeline}\n */\nlunr.tokenizer = function (obj, metadata) {\n  if (obj == null || obj == undefined) {\n    return []\n  }\n\n  if (Array.isArray(obj)) {\n    return obj.map(function (t) {\n      return new lunr.Token(\n        lunr.utils.asString(t).toLowerCase(),\n        lunr.utils.clone(metadata)\n      )\n    })\n  }\n\n  var str = obj.toString().toLowerCase(),\n      len = str.length,\n      tokens = []\n\n  for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) {\n    var char = str.charAt(sliceEnd),\n        sliceLength = sliceEnd - sliceStart\n\n    if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) {\n\n      if (sliceLength > 0) {\n        var tokenMetadata = lunr.utils.clone(metadata) || {}\n        tokenMetadata[\"position\"] = [sliceStart, sliceLength]\n        tokenMetadata[\"index\"] = tokens.length\n\n        tokens.push(\n          new lunr.Token (\n            str.slice(sliceStart, sliceEnd),\n            tokenMetadata\n          )\n        )\n      }\n\n      sliceStart = sliceEnd + 1\n    }\n\n  }\n\n  return tokens\n}\n\n/**\n * The separator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\nlunr.tokenizer.separator = /[\\s\\-]+/\n/*!\n * lunr.Pipeline\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\nlunr.Pipeline = function () {\n  this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = Object.create(null)\n\n/**\n * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token\n * string as well as all known metadata. A pipeline function can mutate the token string\n * or mutate (or add) metadata for a given token.\n *\n * A pipeline function can indicate that the passed token should be discarded by returning\n * null, undefined or an empty string. This token will not be passed to any downstream pipeline\n * functions and will not be added to the index.\n *\n * Multiple tokens can be returned by returning an array of tokens. Each token will be passed\n * to any downstream pipeline functions and all will returned tokens will be added to the index.\n *\n * Any number of pipeline functions may be chained together using a lunr.Pipeline.\n *\n * @interface lunr.PipelineFunction\n * @param {lunr.Token} token - A token from the document being processed.\n * @param {number} i - The index of this token in the complete list of tokens for this document/field.\n * @param {lunr.Token[]} tokens - All tokens for this document/field.\n * @returns {(?lunr.Token|lunr.Token[])}\n */\n\n/**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @param {String} label - The label to register this function with\n */\nlunr.Pipeline.registerFunction = function (fn, label) {\n  if (label in this.registeredFunctions) {\n    lunr.utils.warn('Overwriting existing registered function: ' + label)\n  }\n\n  fn.label = label\n  lunr.Pipeline.registeredFunctions[fn.label] = fn\n}\n\n/**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @private\n */\nlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n  var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n  if (!isRegistered) {\n    lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n  }\n}\n\n/**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised - The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n */\nlunr.Pipeline.load = function (serialised) {\n  var pipeline = new lunr.Pipeline\n\n  serialised.forEach(function (fnName) {\n    var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n    if (fn) {\n      pipeline.add(fn)\n    } else {\n      throw new Error('Cannot load unregistered function: ' + fnName)\n    }\n  })\n\n  return pipeline\n}\n\n/**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline.\n */\nlunr.Pipeline.prototype.add = function () {\n  var fns = Array.prototype.slice.call(arguments)\n\n  fns.forEach(function (fn) {\n    lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n    this._stack.push(fn)\n  }, this)\n}\n\n/**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n  lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n  var pos = this._stack.indexOf(existingFn)\n  if (pos == -1) {\n    throw new Error('Cannot find existingFn')\n  }\n\n  pos = pos + 1\n  this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n  lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n  var pos = this._stack.indexOf(existingFn)\n  if (pos == -1) {\n    throw new Error('Cannot find existingFn')\n  }\n\n  this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Removes a function from the pipeline.\n *\n * @param {lunr.PipelineFunction} fn The function to remove from the pipeline.\n */\nlunr.Pipeline.prototype.remove = function (fn) {\n  var pos = this._stack.indexOf(fn)\n  if (pos == -1) {\n    return\n  }\n\n  this._stack.splice(pos, 1)\n}\n\n/**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n */\nlunr.Pipeline.prototype.run = function (tokens) {\n  var stackLength = this._stack.length\n\n  for (var i = 0; i < stackLength; i++) {\n    var fn = this._stack[i]\n    var memo = []\n\n    for (var j = 0; j < tokens.length; j++) {\n      var result = fn(tokens[j], j, tokens)\n\n      if (result === null || result === void 0 || result === '') continue\n\n      if (Array.isArray(result)) {\n        for (var k = 0; k < result.length; k++) {\n          memo.push(result[k])\n        }\n      } else {\n        memo.push(result)\n      }\n    }\n\n    tokens = memo\n  }\n\n  return tokens\n}\n\n/**\n * Convenience method for passing a string through a pipeline and getting\n * strings out. This method takes care of wrapping the passed string in a\n * token and mapping the resulting tokens back to strings.\n *\n * @param {string} str - The string to pass through the pipeline.\n * @param {?object} metadata - Optional metadata to associate with the token\n * passed to the pipeline.\n * @returns {string[]}\n */\nlunr.Pipeline.prototype.runString = function (str, metadata) {\n  var token = new lunr.Token (str, metadata)\n\n  return this.run([token]).map(function (t) {\n    return t.toString()\n  })\n}\n\n/**\n * Resets the pipeline by removing any existing processors.\n *\n */\nlunr.Pipeline.prototype.reset = function () {\n  this._stack = []\n}\n\n/**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n */\nlunr.Pipeline.prototype.toJSON = function () {\n  return this._stack.map(function (fn) {\n    lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n    return fn.label\n  })\n}\n/*!\n * lunr.Vector\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A vector is used to construct the vector space of documents and queries. These\n * vectors support operations to determine the similarity between two documents or\n * a document and a query.\n *\n * Normally no parameters are required for initializing a vector, but in the case of\n * loading a previously dumped vector the raw elements can be provided to the constructor.\n *\n * For performance reasons vectors are implemented with a flat array, where an elements\n * index is immediately followed by its value. E.g. [index, value, index, value]. This\n * allows the underlying array to be as sparse as possible and still offer decent\n * performance when being used for vector calculations.\n *\n * @constructor\n * @param {Number[]} [elements] - The flat list of element index and element value pairs.\n */\nlunr.Vector = function (elements) {\n  this._magnitude = 0\n  this.elements = elements || []\n}\n\n\n/**\n * Calculates the position within the vector to insert a given index.\n *\n * This is used internally by insert and upsert. If there are duplicate indexes then\n * the position is returned as if the value for that index were to be updated, but it\n * is the callers responsibility to check whether there is a duplicate at that index\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @returns {Number}\n */\nlunr.Vector.prototype.positionForIndex = function (index) {\n  // For an empty vector the tuple can be inserted at the beginning\n  if (this.elements.length == 0) {\n    return 0\n  }\n\n  var start = 0,\n      end = this.elements.length / 2,\n      sliceLength = end - start,\n      pivotPoint = Math.floor(sliceLength / 2),\n      pivotIndex = this.elements[pivotPoint * 2]\n\n  while (sliceLength > 1) {\n    if (pivotIndex < index) {\n      start = pivotPoint\n    }\n\n    if (pivotIndex > index) {\n      end = pivotPoint\n    }\n\n    if (pivotIndex == index) {\n      break\n    }\n\n    sliceLength = end - start\n    pivotPoint = start + Math.floor(sliceLength / 2)\n    pivotIndex = this.elements[pivotPoint * 2]\n  }\n\n  if (pivotIndex == index) {\n    return pivotPoint * 2\n  }\n\n  if (pivotIndex > index) {\n    return pivotPoint * 2\n  }\n\n  if (pivotIndex < index) {\n    return (pivotPoint + 1) * 2\n  }\n}\n\n/**\n * Inserts an element at an index within the vector.\n *\n * Does not allow duplicates, will throw an error if there is already an entry\n * for this index.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n */\nlunr.Vector.prototype.insert = function (insertIdx, val) {\n  this.upsert(insertIdx, val, function () {\n    throw \"duplicate index\"\n  })\n}\n\n/**\n * Inserts or updates an existing index within the vector.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n * @param {function} fn - A function that is called for updates, the existing value and the\n * requested value are passed as arguments\n */\nlunr.Vector.prototype.upsert = function (insertIdx, val, fn) {\n  this._magnitude = 0\n  var position = this.positionForIndex(insertIdx)\n\n  if (this.elements[position] == insertIdx) {\n    this.elements[position + 1] = fn(this.elements[position + 1], val)\n  } else {\n    this.elements.splice(position, 0, insertIdx, val)\n  }\n}\n\n/**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n */\nlunr.Vector.prototype.magnitude = function () {\n  if (this._magnitude) return this._magnitude\n\n  var sumOfSquares = 0,\n      elementsLength = this.elements.length\n\n  for (var i = 1; i < elementsLength; i += 2) {\n    var val = this.elements[i]\n    sumOfSquares += val * val\n  }\n\n  return this._magnitude = Math.sqrt(sumOfSquares)\n}\n\n/**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The vector to compute the dot product with.\n * @returns {Number}\n */\nlunr.Vector.prototype.dot = function (otherVector) {\n  var dotProduct = 0,\n      a = this.elements, b = otherVector.elements,\n      aLen = a.length, bLen = b.length,\n      aVal = 0, bVal = 0,\n      i = 0, j = 0\n\n  while (i < aLen && j < bLen) {\n    aVal = a[i], bVal = b[j]\n    if (aVal < bVal) {\n      i += 2\n    } else if (aVal > bVal) {\n      j += 2\n    } else if (aVal == bVal) {\n      dotProduct += a[i + 1] * b[j + 1]\n      i += 2\n      j += 2\n    }\n  }\n\n  return dotProduct\n}\n\n/**\n * Calculates the similarity between this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The other vector to calculate the\n * similarity with.\n * @returns {Number}\n */\nlunr.Vector.prototype.similarity = function (otherVector) {\n  return this.dot(otherVector) / this.magnitude() || 0\n}\n\n/**\n * Converts the vector to an array of the elements within the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toArray = function () {\n  var output = new Array (this.elements.length / 2)\n\n  for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) {\n    output[j] = this.elements[i]\n  }\n\n  return output\n}\n\n/**\n * A JSON serializable representation of the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toJSON = function () {\n  return this.elements\n}\n/* eslint-disable */\n/*!\n * lunr.stemmer\n * Copyright (C) 2019 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token - The string to stem\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n * @function\n */\nlunr.stemmer = (function(){\n  var step2list = {\n      \"ational\" : \"ate\",\n      \"tional\" : \"tion\",\n      \"enci\" : \"ence\",\n      \"anci\" : \"ance\",\n      \"izer\" : \"ize\",\n      \"bli\" : \"ble\",\n      \"alli\" : \"al\",\n      \"entli\" : \"ent\",\n      \"eli\" : \"e\",\n      \"ousli\" : \"ous\",\n      \"ization\" : \"ize\",\n      \"ation\" : \"ate\",\n      \"ator\" : \"ate\",\n      \"alism\" : \"al\",\n      \"iveness\" : \"ive\",\n      \"fulness\" : \"ful\",\n      \"ousness\" : \"ous\",\n      \"aliti\" : \"al\",\n      \"iviti\" : \"ive\",\n      \"biliti\" : \"ble\",\n      \"logi\" : \"log\"\n    },\n\n    step3list = {\n      \"icate\" : \"ic\",\n      \"ative\" : \"\",\n      \"alize\" : \"al\",\n      \"iciti\" : \"ic\",\n      \"ical\" : \"ic\",\n      \"ful\" : \"\",\n      \"ness\" : \"\"\n    },\n\n    c = \"[^aeiou]\",          // consonant\n    v = \"[aeiouy]\",          // vowel\n    C = c + \"[^aeiouy]*\",    // consonant sequence\n    V = v + \"[aeiou]*\",      // vowel sequence\n\n    mgr0 = \"^(\" + C + \")?\" + V + C,               // [C]VC... is m>0\n    meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\",  // [C]VC[V] is m=1\n    mgr1 = \"^(\" + C + \")?\" + V + C + V + C,       // [C]VCVC... is m>1\n    s_v = \"^(\" + C + \")?\" + v;                   // vowel in stem\n\n  var re_mgr0 = new RegExp(mgr0);\n  var re_mgr1 = new RegExp(mgr1);\n  var re_meq1 = new RegExp(meq1);\n  var re_s_v = new RegExp(s_v);\n\n  var re_1a = /^(.+?)(ss|i)es$/;\n  var re2_1a = /^(.+?)([^s])s$/;\n  var re_1b = /^(.+?)eed$/;\n  var re2_1b = /^(.+?)(ed|ing)$/;\n  var re_1b_2 = /.$/;\n  var re2_1b_2 = /(at|bl|iz)$/;\n  var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n  var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n  var re_1c = /^(.+?[^aeiou])y$/;\n  var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n\n  var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n\n  var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n  var re2_4 = /^(.+?)(s|t)(ion)$/;\n\n  var re_5 = /^(.+?)e$/;\n  var re_5_1 = /ll$/;\n  var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n  var porterStemmer = function porterStemmer(w) {\n    var stem,\n      suffix,\n      firstch,\n      re,\n      re2,\n      re3,\n      re4;\n\n    if (w.length < 3) { return w; }\n\n    firstch = w.substr(0,1);\n    if (firstch == \"y\") {\n      w = firstch.toUpperCase() + w.substr(1);\n    }\n\n    // Step 1a\n    re = re_1a\n    re2 = re2_1a;\n\n    if (re.test(w)) { w = w.replace(re,\"$1$2\"); }\n    else if (re2.test(w)) { w = w.replace(re2,\"$1$2\"); }\n\n    // Step 1b\n    re = re_1b;\n    re2 = re2_1b;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      re = re_mgr0;\n      if (re.test(fp[1])) {\n        re = re_1b_2;\n        w = w.replace(re,\"\");\n      }\n    } else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1];\n      re2 = re_s_v;\n      if (re2.test(stem)) {\n        w = stem;\n        re2 = re2_1b_2;\n        re3 = re3_1b_2;\n        re4 = re4_1b_2;\n        if (re2.test(w)) { w = w + \"e\"; }\n        else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,\"\"); }\n        else if (re4.test(w)) { w = w + \"e\"; }\n      }\n    }\n\n    // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n    re = re_1c;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      w = stem + \"i\";\n    }\n\n    // Step 2\n    re = re_2;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = re_mgr0;\n      if (re.test(stem)) {\n        w = stem + step2list[suffix];\n      }\n    }\n\n    // Step 3\n    re = re_3;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = re_mgr0;\n      if (re.test(stem)) {\n        w = stem + step3list[suffix];\n      }\n    }\n\n    // Step 4\n    re = re_4;\n    re2 = re2_4;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = re_mgr1;\n      if (re.test(stem)) {\n        w = stem;\n      }\n    } else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1] + fp[2];\n      re2 = re_mgr1;\n      if (re2.test(stem)) {\n        w = stem;\n      }\n    }\n\n    // Step 5\n    re = re_5;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = re_mgr1;\n      re2 = re_meq1;\n      re3 = re3_5;\n      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {\n        w = stem;\n      }\n    }\n\n    re = re_5_1;\n    re2 = re_mgr1;\n    if (re.test(w) && re2.test(w)) {\n      re = re_1b_2;\n      w = w.replace(re,\"\");\n    }\n\n    // and turn initial Y back to y\n\n    if (firstch == \"y\") {\n      w = firstch.toLowerCase() + w.substr(1);\n    }\n\n    return w;\n  };\n\n  return function (token) {\n    return token.update(porterStemmer);\n  }\n})();\n\nlunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')\n/*!\n * lunr.stopWordFilter\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @function\n * @param {Array} token The token to pass through the filter\n * @returns {lunr.PipelineFunction}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\nlunr.generateStopWordFilter = function (stopWords) {\n  var words = stopWords.reduce(function (memo, stopWord) {\n    memo[stopWord] = stopWord\n    return memo\n  }, {})\n\n  return function (token) {\n    if (token && words[token.toString()] !== token.toString()) return token\n  }\n}\n\n/**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @function\n * @implements {lunr.PipelineFunction}\n * @params {lunr.Token} token - A token to check for being a stop word.\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n */\nlunr.stopWordFilter = lunr.generateStopWordFilter([\n  'a',\n  'able',\n  'about',\n  'across',\n  'after',\n  'all',\n  'almost',\n  'also',\n  'am',\n  'among',\n  'an',\n  'and',\n  'any',\n  'are',\n  'as',\n  'at',\n  'be',\n  'because',\n  'been',\n  'but',\n  'by',\n  'can',\n  'cannot',\n  'could',\n  'dear',\n  'did',\n  'do',\n  'does',\n  'either',\n  'else',\n  'ever',\n  'every',\n  'for',\n  'from',\n  'get',\n  'got',\n  'had',\n  'has',\n  'have',\n  'he',\n  'her',\n  'hers',\n  'him',\n  'his',\n  'how',\n  'however',\n  'i',\n  'if',\n  'in',\n  'into',\n  'is',\n  'it',\n  'its',\n  'just',\n  'least',\n  'let',\n  'like',\n  'likely',\n  'may',\n  'me',\n  'might',\n  'most',\n  'must',\n  'my',\n  'neither',\n  'no',\n  'nor',\n  'not',\n  'of',\n  'off',\n  'often',\n  'on',\n  'only',\n  'or',\n  'other',\n  'our',\n  'own',\n  'rather',\n  'said',\n  'say',\n  'says',\n  'she',\n  'should',\n  'since',\n  'so',\n  'some',\n  'than',\n  'that',\n  'the',\n  'their',\n  'them',\n  'then',\n  'there',\n  'these',\n  'they',\n  'this',\n  'tis',\n  'to',\n  'too',\n  'twas',\n  'us',\n  'wants',\n  'was',\n  'we',\n  'were',\n  'what',\n  'when',\n  'where',\n  'which',\n  'while',\n  'who',\n  'whom',\n  'why',\n  'will',\n  'with',\n  'would',\n  'yet',\n  'you',\n  'your'\n])\n\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')\n/*!\n * lunr.trimmer\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the beginning and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token The token to pass through the filter\n * @returns {lunr.Token}\n * @see lunr.Pipeline\n */\nlunr.trimmer = function (token) {\n  return token.update(function (s) {\n    return s.replace(/^\\W+/, '').replace(/\\W+$/, '')\n  })\n}\n\nlunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')\n/*!\n * lunr.TokenSet\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A token set is used to store the unique list of all tokens\n * within an index. Token sets are also used to represent an\n * incoming query to the index, this query token set and index\n * token set are then intersected to find which tokens to look\n * up in the inverted index.\n *\n * A token set can hold multiple tokens, as in the case of the\n * index token set, or it can hold a single token as in the\n * case of a simple query token set.\n *\n * Additionally token sets are used to perform wildcard matching.\n * Leading, contained and trailing wildcards are supported, and\n * from this edit distance matching can also be provided.\n *\n * Token sets are implemented as a minimal finite state automata,\n * where both common prefixes and suffixes are shared between tokens.\n * This helps to reduce the space used for storing the token set.\n *\n * @constructor\n */\nlunr.TokenSet = function () {\n  this.final = false\n  this.edges = {}\n  this.id = lunr.TokenSet._nextId\n  lunr.TokenSet._nextId += 1\n}\n\n/**\n * Keeps track of the next, auto increment, identifier to assign\n * to a new tokenSet.\n *\n * TokenSets require a unique identifier to be correctly minimised.\n *\n * @private\n */\nlunr.TokenSet._nextId = 1\n\n/**\n * Creates a TokenSet instance from the given sorted array of words.\n *\n * @param {String[]} arr - A sorted array of strings to create the set from.\n * @returns {lunr.TokenSet}\n * @throws Will throw an error if the input array is not sorted.\n */\nlunr.TokenSet.fromArray = function (arr) {\n  var builder = new lunr.TokenSet.Builder\n\n  for (var i = 0, len = arr.length; i < len; i++) {\n    builder.insert(arr[i])\n  }\n\n  builder.finish()\n  return builder.root\n}\n\n/**\n * Creates a token set from a query clause.\n *\n * @private\n * @param {Object} clause - A single clause from lunr.Query.\n * @param {string} clause.term - The query clause term.\n * @param {number} [clause.editDistance] - The optional edit distance for the term.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromClause = function (clause) {\n  if ('editDistance' in clause) {\n    return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance)\n  } else {\n    return lunr.TokenSet.fromString(clause.term)\n  }\n}\n\n/**\n * Creates a token set representing a single string with a specified\n * edit distance.\n *\n * Insertions, deletions, substitutions and transpositions are each\n * treated as an edit distance of 1.\n *\n * Increasing the allowed edit distance will have a dramatic impact\n * on the performance of both creating and intersecting these TokenSets.\n * It is advised to keep the edit distance less than 3.\n *\n * @param {string} str - The string to create the token set from.\n * @param {number} editDistance - The allowed edit distance to match.\n * @returns {lunr.Vector}\n */\nlunr.TokenSet.fromFuzzyString = function (str, editDistance) {\n  var root = new lunr.TokenSet\n\n  var stack = [{\n    node: root,\n    editsRemaining: editDistance,\n    str: str\n  }]\n\n  while (stack.length) {\n    var frame = stack.pop()\n\n    // no edit\n    if (frame.str.length > 0) {\n      var char = frame.str.charAt(0),\n          noEditNode\n\n      if (char in frame.node.edges) {\n        noEditNode = frame.node.edges[char]\n      } else {\n        noEditNode = new lunr.TokenSet\n        frame.node.edges[char] = noEditNode\n      }\n\n      if (frame.str.length == 1) {\n        noEditNode.final = true\n      }\n\n      stack.push({\n        node: noEditNode,\n        editsRemaining: frame.editsRemaining,\n        str: frame.str.slice(1)\n      })\n    }\n\n    if (frame.editsRemaining == 0) {\n      continue\n    }\n\n    // insertion\n    if (\"*\" in frame.node.edges) {\n      var insertionNode = frame.node.edges[\"*\"]\n    } else {\n      var insertionNode = new lunr.TokenSet\n      frame.node.edges[\"*\"] = insertionNode\n    }\n\n    if (frame.str.length == 0) {\n      insertionNode.final = true\n    }\n\n    stack.push({\n      node: insertionNode,\n      editsRemaining: frame.editsRemaining - 1,\n      str: frame.str\n    })\n\n    // deletion\n    // can only do a deletion if we have enough edits remaining\n    // and if there are characters left to delete in the string\n    if (frame.str.length > 1) {\n      stack.push({\n        node: frame.node,\n        editsRemaining: frame.editsRemaining - 1,\n        str: frame.str.slice(1)\n      })\n    }\n\n    // deletion\n    // just removing the last character from the str\n    if (frame.str.length == 1) {\n      frame.node.final = true\n    }\n\n    // substitution\n    // can only do a substitution if we have enough edits remaining\n    // and if there are characters left to substitute\n    if (frame.str.length >= 1) {\n      if (\"*\" in frame.node.edges) {\n        var substitutionNode = frame.node.edges[\"*\"]\n      } else {\n        var substitutionNode = new lunr.TokenSet\n        frame.node.edges[\"*\"] = substitutionNode\n      }\n\n      if (frame.str.length == 1) {\n        substitutionNode.final = true\n      }\n\n      stack.push({\n        node: substitutionNode,\n        editsRemaining: frame.editsRemaining - 1,\n        str: frame.str.slice(1)\n      })\n    }\n\n    // transposition\n    // can only do a transposition if there are edits remaining\n    // and there are enough characters to transpose\n    if (frame.str.length > 1) {\n      var charA = frame.str.charAt(0),\n          charB = frame.str.charAt(1),\n          transposeNode\n\n      if (charB in frame.node.edges) {\n        transposeNode = frame.node.edges[charB]\n      } else {\n        transposeNode = new lunr.TokenSet\n        frame.node.edges[charB] = transposeNode\n      }\n\n      if (frame.str.length == 1) {\n        transposeNode.final = true\n      }\n\n      stack.push({\n        node: transposeNode,\n        editsRemaining: frame.editsRemaining - 1,\n        str: charA + frame.str.slice(2)\n      })\n    }\n  }\n\n  return root\n}\n\n/**\n * Creates a TokenSet from a string.\n *\n * The string may contain one or more wildcard characters (*)\n * that will allow wildcard matching when intersecting with\n * another TokenSet.\n *\n * @param {string} str - The string to create a TokenSet from.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromString = function (str) {\n  var node = new lunr.TokenSet,\n      root = node\n\n  /*\n   * Iterates through all characters within the passed string\n   * appending a node for each character.\n   *\n   * When a wildcard character is found then a self\n   * referencing edge is introduced to continually match\n   * any number of any characters.\n   */\n  for (var i = 0, len = str.length; i < len; i++) {\n    var char = str[i],\n        final = (i == len - 1)\n\n    if (char == \"*\") {\n      node.edges[char] = node\n      node.final = final\n\n    } else {\n      var next = new lunr.TokenSet\n      next.final = final\n\n      node.edges[char] = next\n      node = next\n    }\n  }\n\n  return root\n}\n\n/**\n * Converts this TokenSet into an array of strings\n * contained within the TokenSet.\n *\n * This is not intended to be used on a TokenSet that\n * contains wildcards, in these cases the results are\n * undefined and are likely to cause an infinite loop.\n *\n * @returns {string[]}\n */\nlunr.TokenSet.prototype.toArray = function () {\n  var words = []\n\n  var stack = [{\n    prefix: \"\",\n    node: this\n  }]\n\n  while (stack.length) {\n    var frame = stack.pop(),\n        edges = Object.keys(frame.node.edges),\n        len = edges.length\n\n    if (frame.node.final) {\n      /* In Safari, at this point the prefix is sometimes corrupted, see:\n       * https://github.com/olivernn/lunr.js/issues/279 Calling any\n       * String.prototype method forces Safari to \"cast\" this string to what\n       * it's supposed to be, fixing the bug. */\n      frame.prefix.charAt(0)\n      words.push(frame.prefix)\n    }\n\n    for (var i = 0; i < len; i++) {\n      var edge = edges[i]\n\n      stack.push({\n        prefix: frame.prefix.concat(edge),\n        node: frame.node.edges[edge]\n      })\n    }\n  }\n\n  return words\n}\n\n/**\n * Generates a string representation of a TokenSet.\n *\n * This is intended to allow TokenSets to be used as keys\n * in objects, largely to aid the construction and minimisation\n * of a TokenSet. As such it is not designed to be a human\n * friendly representation of the TokenSet.\n *\n * @returns {string}\n */\nlunr.TokenSet.prototype.toString = function () {\n  // NOTE: Using Object.keys here as this.edges is very likely\n  // to enter 'hash-mode' with many keys being added\n  //\n  // avoiding a for-in loop here as it leads to the function\n  // being de-optimised (at least in V8). From some simple\n  // benchmarks the performance is comparable, but allowing\n  // V8 to optimize may mean easy performance wins in the future.\n\n  if (this._str) {\n    return this._str\n  }\n\n  var str = this.final ? '1' : '0',\n      labels = Object.keys(this.edges).sort(),\n      len = labels.length\n\n  for (var i = 0; i < len; i++) {\n    var label = labels[i],\n        node = this.edges[label]\n\n    str = str + label + node.id\n  }\n\n  return str\n}\n\n/**\n * Returns a new TokenSet that is the intersection of\n * this TokenSet and the passed TokenSet.\n *\n * This intersection will take into account any wildcards\n * contained within the TokenSet.\n *\n * @param {lunr.TokenSet} b - An other TokenSet to intersect with.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.prototype.intersect = function (b) {\n  var output = new lunr.TokenSet,\n      frame = undefined\n\n  var stack = [{\n    qNode: b,\n    output: output,\n    node: this\n  }]\n\n  while (stack.length) {\n    frame = stack.pop()\n\n    // NOTE: As with the #toString method, we are using\n    // Object.keys and a for loop instead of a for-in loop\n    // as both of these objects enter 'hash' mode, causing\n    // the function to be de-optimised in V8\n    var qEdges = Object.keys(frame.qNode.edges),\n        qLen = qEdges.length,\n        nEdges = Object.keys(frame.node.edges),\n        nLen = nEdges.length\n\n    for (var q = 0; q < qLen; q++) {\n      var qEdge = qEdges[q]\n\n      for (var n = 0; n < nLen; n++) {\n        var nEdge = nEdges[n]\n\n        if (nEdge == qEdge || qEdge == '*') {\n          var node = frame.node.edges[nEdge],\n              qNode = frame.qNode.edges[qEdge],\n              final = node.final && qNode.final,\n              next = undefined\n\n          if (nEdge in frame.output.edges) {\n            // an edge already exists for this character\n            // no need to create a new node, just set the finality\n            // bit unless this node is already final\n            next = frame.output.edges[nEdge]\n            next.final = next.final || final\n\n          } else {\n            // no edge exists yet, must create one\n            // set the finality bit and insert it\n            // into the output\n            next = new lunr.TokenSet\n            next.final = final\n            frame.output.edges[nEdge] = next\n          }\n\n          stack.push({\n            qNode: qNode,\n            output: next,\n            node: node\n          })\n        }\n      }\n    }\n  }\n\n  return output\n}\nlunr.TokenSet.Builder = function () {\n  this.previousWord = \"\"\n  this.root = new lunr.TokenSet\n  this.uncheckedNodes = []\n  this.minimizedNodes = {}\n}\n\nlunr.TokenSet.Builder.prototype.insert = function (word) {\n  var node,\n      commonPrefix = 0\n\n  if (word < this.previousWord) {\n    throw new Error (\"Out of order word insertion\")\n  }\n\n  for (var i = 0; i < word.length && i < this.previousWord.length; i++) {\n    if (word[i] != this.previousWord[i]) break\n    commonPrefix++\n  }\n\n  this.minimize(commonPrefix)\n\n  if (this.uncheckedNodes.length == 0) {\n    node = this.root\n  } else {\n    node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child\n  }\n\n  for (var i = commonPrefix; i < word.length; i++) {\n    var nextNode = new lunr.TokenSet,\n        char = word[i]\n\n    node.edges[char] = nextNode\n\n    this.uncheckedNodes.push({\n      parent: node,\n      char: char,\n      child: nextNode\n    })\n\n    node = nextNode\n  }\n\n  node.final = true\n  this.previousWord = word\n}\n\nlunr.TokenSet.Builder.prototype.finish = function () {\n  this.minimize(0)\n}\n\nlunr.TokenSet.Builder.prototype.minimize = function (downTo) {\n  for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) {\n    var node = this.uncheckedNodes[i],\n        childKey = node.child.toString()\n\n    if (childKey in this.minimizedNodes) {\n      node.parent.edges[node.char] = this.minimizedNodes[childKey]\n    } else {\n      // Cache the key for this node since\n      // we know it can't change anymore\n      node.child._str = childKey\n\n      this.minimizedNodes[childKey] = node.child\n    }\n\n    this.uncheckedNodes.pop()\n  }\n}\n/*!\n * lunr.Index\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * An index contains the built index of all documents and provides a query interface\n * to the index.\n *\n * Usually instances of lunr.Index will not be created using this constructor, instead\n * lunr.Builder should be used to construct new indexes, or lunr.Index.load should be\n * used to load previously built and serialized indexes.\n *\n * @constructor\n * @param {Object} attrs - The attributes of the built search index.\n * @param {Object} attrs.invertedIndex - An index of term/field to document reference.\n * @param {Object<string, lunr.Vector>} attrs.fieldVectors - Field vectors\n * @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens.\n * @param {string[]} attrs.fields - The names of indexed document fields.\n * @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms.\n */\nlunr.Index = function (attrs) {\n  this.invertedIndex = attrs.invertedIndex\n  this.fieldVectors = attrs.fieldVectors\n  this.tokenSet = attrs.tokenSet\n  this.fields = attrs.fields\n  this.pipeline = attrs.pipeline\n}\n\n/**\n * A result contains details of a document matching a search query.\n * @typedef {Object} lunr.Index~Result\n * @property {string} ref - The reference of the document this result represents.\n * @property {number} score - A number between 0 and 1 representing how similar this document is to the query.\n * @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match.\n */\n\n/**\n * Although lunr provides the ability to create queries using lunr.Query, it also provides a simple\n * query language which itself is parsed into an instance of lunr.Query.\n *\n * For programmatically building queries it is advised to directly use lunr.Query, the query language\n * is best used for human entered text rather than program generated text.\n *\n * At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported\n * and will be combined with OR, e.g `hello world` will match documents that contain either 'hello'\n * or 'world', though those that contain both will rank higher in the results.\n *\n * Wildcards can be included in terms to match one or more unspecified characters, these wildcards can\n * be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding\n * wildcards will increase the number of documents that will be found but can also have a negative\n * impact on query performance, especially with wildcards at the beginning of a term.\n *\n * Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term\n * hello in the title field will match this query. Using a field not present in the index will lead\n * to an error being thrown.\n *\n * Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term\n * boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported\n * to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2.\n * Avoid large values for edit distance to improve query performance.\n *\n * Each term also supports a presence modifier. By default a term's presence in document is optional, however\n * this can be changed to either required or prohibited. For a term's presence to be required in a document the\n * term should be prefixed with a '+', e.g. `+foo bar` is a search for documents that must contain 'foo' and\n * optionally contain 'bar'. Conversely a leading '-' sets the terms presence to prohibited, i.e. it must not\n * appear in a document, e.g. `-foo bar` is a search for documents that do not contain 'foo' but may contain 'bar'.\n *\n * To escape special characters the backslash character '\\' can be used, this allows searches to include\n * characters that would normally be considered modifiers, e.g. `foo\\~2` will search for a term \"foo~2\" instead\n * of attempting to apply a boost of 2 to the search term \"foo\".\n *\n * @typedef {string} lunr.Index~QueryString\n * @example <caption>Simple single term query</caption>\n * hello\n * @example <caption>Multiple term query</caption>\n * hello world\n * @example <caption>term scoped to a field</caption>\n * title:hello\n * @example <caption>term with a boost of 10</caption>\n * hello^10\n * @example <caption>term with an edit distance of 2</caption>\n * hello~2\n * @example <caption>terms with presence modifiers</caption>\n * -foo +bar baz\n */\n\n/**\n * Performs a search against the index using lunr query syntax.\n *\n * Results will be returned sorted by their score, the most relevant results\n * will be returned first.  For details on how the score is calculated, please see\n * the {@link https://lunrjs.com/guides/searching.html#scoring|guide}.\n *\n * For more programmatic querying use lunr.Index#query.\n *\n * @param {lunr.Index~QueryString} queryString - A string containing a lunr query.\n * @throws {lunr.QueryParseError} If the passed query string cannot be parsed.\n * @returns {lunr.Index~Result[]}\n */\nlunr.Index.prototype.search = function (queryString) {\n  return this.query(function (query) {\n    var parser = new lunr.QueryParser(queryString, query)\n    parser.parse()\n  })\n}\n\n/**\n * A query builder callback provides a query object to be used to express\n * the query to perform on the index.\n *\n * @callback lunr.Index~queryBuilder\n * @param {lunr.Query} query - The query object to build up.\n * @this lunr.Query\n */\n\n/**\n * Performs a query against the index using the yielded lunr.Query object.\n *\n * If performing programmatic queries against the index, this method is preferred\n * over lunr.Index#search so as to avoid the additional query parsing overhead.\n *\n * A query object is yielded to the supplied function which should be used to\n * express the query to be run against the index.\n *\n * Note that although this function takes a callback parameter it is _not_ an\n * asynchronous operation, the callback is just yielded a query object to be\n * customized.\n *\n * @param {lunr.Index~queryBuilder} fn - A function that is used to build the query.\n * @returns {lunr.Index~Result[]}\n */\nlunr.Index.prototype.query = function (fn) {\n  // for each query clause\n  // * process terms\n  // * expand terms from token set\n  // * find matching documents and metadata\n  // * get document vectors\n  // * score documents\n\n  var query = new lunr.Query(this.fields),\n      matchingFields = Object.create(null),\n      queryVectors = Object.create(null),\n      termFieldCache = Object.create(null),\n      requiredMatches = Object.create(null),\n      prohibitedMatches = Object.create(null)\n\n  /*\n   * To support field level boosts a query vector is created per\n   * field. An empty vector is eagerly created to support negated\n   * queries.\n   */\n  for (var i = 0; i < this.fields.length; i++) {\n    queryVectors[this.fields[i]] = new lunr.Vector\n  }\n\n  fn.call(query, query)\n\n  for (var i = 0; i < query.clauses.length; i++) {\n    /*\n     * Unless the pipeline has been disabled for this term, which is\n     * the case for terms with wildcards, we need to pass the clause\n     * term through the search pipeline. A pipeline returns an array\n     * of processed terms. Pipeline functions may expand the passed\n     * term, which means we may end up performing multiple index lookups\n     * for a single query term.\n     */\n    var clause = query.clauses[i],\n        terms = null,\n        clauseMatches = lunr.Set.complete\n\n    if (clause.usePipeline) {\n      terms = this.pipeline.runString(clause.term, {\n        fields: clause.fields\n      })\n    } else {\n      terms = [clause.term]\n    }\n\n    for (var m = 0; m < terms.length; m++) {\n      var term = terms[m]\n\n      /*\n       * Each term returned from the pipeline needs to use the same query\n       * clause object, e.g. the same boost and or edit distance. The\n       * simplest way to do this is to re-use the clause object but mutate\n       * its term property.\n       */\n      clause.term = term\n\n      /*\n       * From the term in the clause we create a token set which will then\n       * be used to intersect the indexes token set to get a list of terms\n       * to lookup in the inverted index\n       */\n      var termTokenSet = lunr.TokenSet.fromClause(clause),\n          expandedTerms = this.tokenSet.intersect(termTokenSet).toArray()\n\n      /*\n       * If a term marked as required does not exist in the tokenSet it is\n       * impossible for the search to return any matches. We set all the field\n       * scoped required matches set to empty and stop examining any further\n       * clauses.\n       */\n      if (expandedTerms.length === 0 && clause.presence === lunr.Query.presence.REQUIRED) {\n        for (var k = 0; k < clause.fields.length; k++) {\n          var field = clause.fields[k]\n          requiredMatches[field] = lunr.Set.empty\n        }\n\n        break\n      }\n\n      for (var j = 0; j < expandedTerms.length; j++) {\n        /*\n         * For each term get the posting and termIndex, this is required for\n         * building the query vector.\n         */\n        var expandedTerm = expandedTerms[j],\n            posting = this.invertedIndex[expandedTerm],\n            termIndex = posting._index\n\n        for (var k = 0; k < clause.fields.length; k++) {\n          /*\n           * For each field that this query term is scoped by (by default\n           * all fields are in scope) we need to get all the document refs\n           * that have this term in that field.\n           *\n           * The posting is the entry in the invertedIndex for the matching\n           * term from above.\n           */\n          var field = clause.fields[k],\n              fieldPosting = posting[field],\n              matchingDocumentRefs = Object.keys(fieldPosting),\n              termField = expandedTerm + \"/\" + field,\n              matchingDocumentsSet = new lunr.Set(matchingDocumentRefs)\n\n          /*\n           * if the presence of this term is required ensure that the matching\n           * documents are added to the set of required matches for this clause.\n           *\n           */\n          if (clause.presence == lunr.Query.presence.REQUIRED) {\n            clauseMatches = clauseMatches.union(matchingDocumentsSet)\n\n            if (requiredMatches[field] === undefined) {\n              requiredMatches[field] = lunr.Set.complete\n            }\n          }\n\n          /*\n           * if the presence of this term is prohibited ensure that the matching\n           * documents are added to the set of prohibited matches for this field,\n           * creating that set if it does not yet exist.\n           */\n          if (clause.presence == lunr.Query.presence.PROHIBITED) {\n            if (prohibitedMatches[field] === undefined) {\n              prohibitedMatches[field] = lunr.Set.empty\n            }\n\n            prohibitedMatches[field] = prohibitedMatches[field].union(matchingDocumentsSet)\n\n            /*\n             * Prohibited matches should not be part of the query vector used for\n             * similarity scoring and no metadata should be extracted so we continue\n             * to the next field\n             */\n            continue\n          }\n\n          /*\n           * The query field vector is populated using the termIndex found for\n           * the term and a unit value with the appropriate boost applied.\n           * Using upsert because there could already be an entry in the vector\n           * for the term we are working with. In that case we just add the scores\n           * together.\n           */\n          queryVectors[field].upsert(termIndex, clause.boost, function (a, b) { return a + b })\n\n          /**\n           * If we've already seen this term, field combo then we've already collected\n           * the matching documents and metadata, no need to go through all that again\n           */\n          if (termFieldCache[termField]) {\n            continue\n          }\n\n          for (var l = 0; l < matchingDocumentRefs.length; l++) {\n            /*\n             * All metadata for this term/field/document triple\n             * are then extracted and collected into an instance\n             * of lunr.MatchData ready to be returned in the query\n             * results\n             */\n            var matchingDocumentRef = matchingDocumentRefs[l],\n                matchingFieldRef = new lunr.FieldRef (matchingDocumentRef, field),\n                metadata = fieldPosting[matchingDocumentRef],\n                fieldMatch\n\n            if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) {\n              matchingFields[matchingFieldRef] = new lunr.MatchData (expandedTerm, field, metadata)\n            } else {\n              fieldMatch.add(expandedTerm, field, metadata)\n            }\n\n          }\n\n          termFieldCache[termField] = true\n        }\n      }\n    }\n\n    /**\n     * If the presence was required we need to update the requiredMatches field sets.\n     * We do this after all fields for the term have collected their matches because\n     * the clause terms presence is required in _any_ of the fields not _all_ of the\n     * fields.\n     */\n    if (clause.presence === lunr.Query.presence.REQUIRED) {\n      for (var k = 0; k < clause.fields.length; k++) {\n        var field = clause.fields[k]\n        requiredMatches[field] = requiredMatches[field].intersect(clauseMatches)\n      }\n    }\n  }\n\n  /**\n   * Need to combine the field scoped required and prohibited\n   * matching documents into a global set of required and prohibited\n   * matches\n   */\n  var allRequiredMatches = lunr.Set.complete,\n      allProhibitedMatches = lunr.Set.empty\n\n  for (var i = 0; i < this.fields.length; i++) {\n    var field = this.fields[i]\n\n    if (requiredMatches[field]) {\n      allRequiredMatches = allRequiredMatches.intersect(requiredMatches[field])\n    }\n\n    if (prohibitedMatches[field]) {\n      allProhibitedMatches = allProhibitedMatches.union(prohibitedMatches[field])\n    }\n  }\n\n  var matchingFieldRefs = Object.keys(matchingFields),\n      results = [],\n      matches = Object.create(null)\n\n  /*\n   * If the query is negated (contains only prohibited terms)\n   * we need to get _all_ fieldRefs currently existing in the\n   * index. This is only done when we know that the query is\n   * entirely prohibited terms to avoid any cost of getting all\n   * fieldRefs unnecessarily.\n   *\n   * Additionally, blank MatchData must be created to correctly\n   * populate the results.\n   */\n  if (query.isNegated()) {\n    matchingFieldRefs = Object.keys(this.fieldVectors)\n\n    for (var i = 0; i < matchingFieldRefs.length; i++) {\n      var matchingFieldRef = matchingFieldRefs[i]\n      var fieldRef = lunr.FieldRef.fromString(matchingFieldRef)\n      matchingFields[matchingFieldRef] = new lunr.MatchData\n    }\n  }\n\n  for (var i = 0; i < matchingFieldRefs.length; i++) {\n    /*\n     * Currently we have document fields that match the query, but we\n     * need to return documents. The matchData and scores are combined\n     * from multiple fields belonging to the same document.\n     *\n     * Scores are calculated by field, using the query vectors created\n     * above, and combined into a final document score using addition.\n     */\n    var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]),\n        docRef = fieldRef.docRef\n\n    if (!allRequiredMatches.contains(docRef)) {\n      continue\n    }\n\n    if (allProhibitedMatches.contains(docRef)) {\n      continue\n    }\n\n    var fieldVector = this.fieldVectors[fieldRef],\n        score = queryVectors[fieldRef.fieldName].similarity(fieldVector),\n        docMatch\n\n    if ((docMatch = matches[docRef]) !== undefined) {\n      docMatch.score += score\n      docMatch.matchData.combine(matchingFields[fieldRef])\n    } else {\n      var match = {\n        ref: docRef,\n        score: score,\n        matchData: matchingFields[fieldRef]\n      }\n      matches[docRef] = match\n      results.push(match)\n    }\n  }\n\n  /*\n   * Sort the results objects by score, highest first.\n   */\n  return results.sort(function (a, b) {\n    return b.score - a.score\n  })\n}\n\n/**\n * Prepares the index for JSON serialization.\n *\n * The schema for this JSON blob will be described in a\n * separate JSON schema file.\n *\n * @returns {Object}\n */\nlunr.Index.prototype.toJSON = function () {\n  var invertedIndex = Object.keys(this.invertedIndex)\n    .sort()\n    .map(function (term) {\n      return [term, this.invertedIndex[term]]\n    }, this)\n\n  var fieldVectors = Object.keys(this.fieldVectors)\n    .map(function (ref) {\n      return [ref, this.fieldVectors[ref].toJSON()]\n    }, this)\n\n  return {\n    version: lunr.version,\n    fields: this.fields,\n    fieldVectors: fieldVectors,\n    invertedIndex: invertedIndex,\n    pipeline: this.pipeline.toJSON()\n  }\n}\n\n/**\n * Loads a previously serialized lunr.Index\n *\n * @param {Object} serializedIndex - A previously serialized lunr.Index\n * @returns {lunr.Index}\n */\nlunr.Index.load = function (serializedIndex) {\n  var attrs = {},\n      fieldVectors = {},\n      serializedVectors = serializedIndex.fieldVectors,\n      invertedIndex = Object.create(null),\n      serializedInvertedIndex = serializedIndex.invertedIndex,\n      tokenSetBuilder = new lunr.TokenSet.Builder,\n      pipeline = lunr.Pipeline.load(serializedIndex.pipeline)\n\n  if (serializedIndex.version != lunr.version) {\n    lunr.utils.warn(\"Version mismatch when loading serialised index. Current version of lunr '\" + lunr.version + \"' does not match serialized index '\" + serializedIndex.version + \"'\")\n  }\n\n  for (var i = 0; i < serializedVectors.length; i++) {\n    var tuple = serializedVectors[i],\n        ref = tuple[0],\n        elements = tuple[1]\n\n    fieldVectors[ref] = new lunr.Vector(elements)\n  }\n\n  for (var i = 0; i < serializedInvertedIndex.length; i++) {\n    var tuple = serializedInvertedIndex[i],\n        term = tuple[0],\n        posting = tuple[1]\n\n    tokenSetBuilder.insert(term)\n    invertedIndex[term] = posting\n  }\n\n  tokenSetBuilder.finish()\n\n  attrs.fields = serializedIndex.fields\n\n  attrs.fieldVectors = fieldVectors\n  attrs.invertedIndex = invertedIndex\n  attrs.tokenSet = tokenSetBuilder.root\n  attrs.pipeline = pipeline\n\n  return new lunr.Index(attrs)\n}\n/*!\n * lunr.Builder\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * lunr.Builder performs indexing on a set of documents and\n * returns instances of lunr.Index ready for querying.\n *\n * All configuration of the index is done via the builder, the\n * fields to index, the document reference, the text processing\n * pipeline and document scoring parameters are all set on the\n * builder before indexing.\n *\n * @constructor\n * @property {string} _ref - Internal reference to the document reference field.\n * @property {string[]} _fields - Internal reference to the document fields to index.\n * @property {object} invertedIndex - The inverted index maps terms to document fields.\n * @property {object} documentTermFrequencies - Keeps track of document term frequencies.\n * @property {object} documentLengths - Keeps track of the length of documents added to the index.\n * @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing.\n * @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing.\n * @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index.\n * @property {number} documentCount - Keeps track of the total number of documents indexed.\n * @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75.\n * @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2.\n * @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space.\n * @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index.\n */\nlunr.Builder = function () {\n  this._ref = \"id\"\n  this._fields = Object.create(null)\n  this._documents = Object.create(null)\n  this.invertedIndex = Object.create(null)\n  this.fieldTermFrequencies = {}\n  this.fieldLengths = {}\n  this.tokenizer = lunr.tokenizer\n  this.pipeline = new lunr.Pipeline\n  this.searchPipeline = new lunr.Pipeline\n  this.documentCount = 0\n  this._b = 0.75\n  this._k1 = 1.2\n  this.termIndex = 0\n  this.metadataWhitelist = []\n}\n\n/**\n * Sets the document field used as the document reference. Every document must have this field.\n * The type of this field in the document should be a string, if it is not a string it will be\n * coerced into a string by calling toString.\n *\n * The default ref is 'id'.\n *\n * The ref should _not_ be changed during indexing, it should be set before any documents are\n * added to the index. Changing it during indexing can lead to inconsistent results.\n *\n * @param {string} ref - The name of the reference field in the document.\n */\nlunr.Builder.prototype.ref = function (ref) {\n  this._ref = ref\n}\n\n/**\n * A function that is used to extract a field from a document.\n *\n * Lunr expects a field to be at the top level of a document, if however the field\n * is deeply nested within a document an extractor function can be used to extract\n * the right field for indexing.\n *\n * @callback fieldExtractor\n * @param {object} doc - The document being added to the index.\n * @returns {?(string|object|object[])} obj - The object that will be indexed for this field.\n * @example <caption>Extracting a nested field</caption>\n * function (doc) { return doc.nested.field }\n */\n\n/**\n * Adds a field to the list of document fields that will be indexed. Every document being\n * indexed should have this field. Null values for this field in indexed documents will\n * not cause errors but will limit the chance of that document being retrieved by searches.\n *\n * All fields should be added before adding documents to the index. Adding fields after\n * a document has been indexed will have no effect on already indexed documents.\n *\n * Fields can be boosted at build time. This allows terms within that field to have more\n * importance when ranking search results. Use a field boost to specify that matches within\n * one field are more important than other fields.\n *\n * @param {string} fieldName - The name of a field to index in all documents.\n * @param {object} attributes - Optional attributes associated with this field.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this field.\n * @param {fieldExtractor} [attributes.extractor] - Function to extract a field from a document.\n * @throws {RangeError} fieldName cannot contain unsupported characters '/'\n */\nlunr.Builder.prototype.field = function (fieldName, attributes) {\n  if (/\\//.test(fieldName)) {\n    throw new RangeError (\"Field '\" + fieldName + \"' contains illegal character '/'\")\n  }\n\n  this._fields[fieldName] = attributes || {}\n}\n\n/**\n * A parameter to tune the amount of field length normalisation that is applied when\n * calculating relevance scores. A value of 0 will completely disable any normalisation\n * and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b\n * will be clamped to the range 0 - 1.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\nlunr.Builder.prototype.b = function (number) {\n  if (number < 0) {\n    this._b = 0\n  } else if (number > 1) {\n    this._b = 1\n  } else {\n    this._b = number\n  }\n}\n\n/**\n * A parameter that controls the speed at which a rise in term frequency results in term\n * frequency saturation. The default value is 1.2. Setting this to a higher value will give\n * slower saturation levels, a lower value will result in quicker saturation.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\nlunr.Builder.prototype.k1 = function (number) {\n  this._k1 = number\n}\n\n/**\n * Adds a document to the index.\n *\n * Before adding fields to the index the index should have been fully setup, with the document\n * ref and all fields to index already having been specified.\n *\n * The document must have a field name as specified by the ref (by default this is 'id') and\n * it should have all fields defined for indexing, though null or undefined values will not\n * cause errors.\n *\n * Entire documents can be boosted at build time. Applying a boost to a document indicates that\n * this document should rank higher in search results than other documents.\n *\n * @param {object} doc - The document to add to the index.\n * @param {object} attributes - Optional attributes associated with this document.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this document.\n */\nlunr.Builder.prototype.add = function (doc, attributes) {\n  var docRef = doc[this._ref],\n      fields = Object.keys(this._fields)\n\n  this._documents[docRef] = attributes || {}\n  this.documentCount += 1\n\n  for (var i = 0; i < fields.length; i++) {\n    var fieldName = fields[i],\n        extractor = this._fields[fieldName].extractor,\n        field = extractor ? extractor(doc) : doc[fieldName],\n        tokens = this.tokenizer(field, {\n          fields: [fieldName]\n        }),\n        terms = this.pipeline.run(tokens),\n        fieldRef = new lunr.FieldRef (docRef, fieldName),\n        fieldTerms = Object.create(null)\n\n    this.fieldTermFrequencies[fieldRef] = fieldTerms\n    this.fieldLengths[fieldRef] = 0\n\n    // store the length of this field for this document\n    this.fieldLengths[fieldRef] += terms.length\n\n    // calculate term frequencies for this field\n    for (var j = 0; j < terms.length; j++) {\n      var term = terms[j]\n\n      if (fieldTerms[term] == undefined) {\n        fieldTerms[term] = 0\n      }\n\n      fieldTerms[term] += 1\n\n      // add to inverted index\n      // create an initial posting if one doesn't exist\n      if (this.invertedIndex[term] == undefined) {\n        var posting = Object.create(null)\n        posting[\"_index\"] = this.termIndex\n        this.termIndex += 1\n\n        for (var k = 0; k < fields.length; k++) {\n          posting[fields[k]] = Object.create(null)\n        }\n\n        this.invertedIndex[term] = posting\n      }\n\n      // add an entry for this term/fieldName/docRef to the invertedIndex\n      if (this.invertedIndex[term][fieldName][docRef] == undefined) {\n        this.invertedIndex[term][fieldName][docRef] = Object.create(null)\n      }\n\n      // store all whitelisted metadata about this token in the\n      // inverted index\n      for (var l = 0; l < this.metadataWhitelist.length; l++) {\n        var metadataKey = this.metadataWhitelist[l],\n            metadata = term.metadata[metadataKey]\n\n        if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) {\n          this.invertedIndex[term][fieldName][docRef][metadataKey] = []\n        }\n\n        this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata)\n      }\n    }\n\n  }\n}\n\n/**\n * Calculates the average document length for this index\n *\n * @private\n */\nlunr.Builder.prototype.calculateAverageFieldLengths = function () {\n\n  var fieldRefs = Object.keys(this.fieldLengths),\n      numberOfFields = fieldRefs.length,\n      accumulator = {},\n      documentsWithField = {}\n\n  for (var i = 0; i < numberOfFields; i++) {\n    var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n        field = fieldRef.fieldName\n\n    documentsWithField[field] || (documentsWithField[field] = 0)\n    documentsWithField[field] += 1\n\n    accumulator[field] || (accumulator[field] = 0)\n    accumulator[field] += this.fieldLengths[fieldRef]\n  }\n\n  var fields = Object.keys(this._fields)\n\n  for (var i = 0; i < fields.length; i++) {\n    var fieldName = fields[i]\n    accumulator[fieldName] = accumulator[fieldName] / documentsWithField[fieldName]\n  }\n\n  this.averageFieldLength = accumulator\n}\n\n/**\n * Builds a vector space model of every document using lunr.Vector\n *\n * @private\n */\nlunr.Builder.prototype.createFieldVectors = function () {\n  var fieldVectors = {},\n      fieldRefs = Object.keys(this.fieldTermFrequencies),\n      fieldRefsLength = fieldRefs.length,\n      termIdfCache = Object.create(null)\n\n  for (var i = 0; i < fieldRefsLength; i++) {\n    var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n        fieldName = fieldRef.fieldName,\n        fieldLength = this.fieldLengths[fieldRef],\n        fieldVector = new lunr.Vector,\n        termFrequencies = this.fieldTermFrequencies[fieldRef],\n        terms = Object.keys(termFrequencies),\n        termsLength = terms.length\n\n\n    var fieldBoost = this._fields[fieldName].boost || 1,\n        docBoost = this._documents[fieldRef.docRef].boost || 1\n\n    for (var j = 0; j < termsLength; j++) {\n      var term = terms[j],\n          tf = termFrequencies[term],\n          termIndex = this.invertedIndex[term]._index,\n          idf, score, scoreWithPrecision\n\n      if (termIdfCache[term] === undefined) {\n        idf = lunr.idf(this.invertedIndex[term], this.documentCount)\n        termIdfCache[term] = idf\n      } else {\n        idf = termIdfCache[term]\n      }\n\n      score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[fieldName])) + tf)\n      score *= fieldBoost\n      score *= docBoost\n      scoreWithPrecision = Math.round(score * 1000) / 1000\n      // Converts 1.23456789 to 1.234.\n      // Reducing the precision so that the vectors take up less\n      // space when serialised. Doing it now so that they behave\n      // the same before and after serialisation. Also, this is\n      // the fastest approach to reducing a number's precision in\n      // JavaScript.\n\n      fieldVector.insert(termIndex, scoreWithPrecision)\n    }\n\n    fieldVectors[fieldRef] = fieldVector\n  }\n\n  this.fieldVectors = fieldVectors\n}\n\n/**\n * Creates a token set of all tokens in the index using lunr.TokenSet\n *\n * @private\n */\nlunr.Builder.prototype.createTokenSet = function () {\n  this.tokenSet = lunr.TokenSet.fromArray(\n    Object.keys(this.invertedIndex).sort()\n  )\n}\n\n/**\n * Builds the index, creating an instance of lunr.Index.\n *\n * This completes the indexing process and should only be called\n * once all documents have been added to the index.\n *\n * @returns {lunr.Index}\n */\nlunr.Builder.prototype.build = function () {\n  this.calculateAverageFieldLengths()\n  this.createFieldVectors()\n  this.createTokenSet()\n\n  return new lunr.Index({\n    invertedIndex: this.invertedIndex,\n    fieldVectors: this.fieldVectors,\n    tokenSet: this.tokenSet,\n    fields: Object.keys(this._fields),\n    pipeline: this.searchPipeline\n  })\n}\n\n/**\n * Applies a plugin to the index builder.\n *\n * A plugin is a function that is called with the index builder as its context.\n * Plugins can be used to customise or extend the behaviour of the index\n * in some way. A plugin is just a function, that encapsulated the custom\n * behaviour that should be applied when building the index.\n *\n * The plugin function will be called with the index builder as its argument, additional\n * arguments can also be passed when calling use. The function will be called\n * with the index builder as its context.\n *\n * @param {Function} plugin The plugin to apply.\n */\nlunr.Builder.prototype.use = function (fn) {\n  var args = Array.prototype.slice.call(arguments, 1)\n  args.unshift(this)\n  fn.apply(this, args)\n}\n/**\n * Contains and collects metadata about a matching document.\n * A single instance of lunr.MatchData is returned as part of every\n * lunr.Index~Result.\n *\n * @constructor\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n * @property {object} metadata - A cloned collection of metadata associated with this document.\n * @see {@link lunr.Index~Result}\n */\nlunr.MatchData = function (term, field, metadata) {\n  var clonedMetadata = Object.create(null),\n      metadataKeys = Object.keys(metadata || {})\n\n  // Cloning the metadata to prevent the original\n  // being mutated during match data combination.\n  // Metadata is kept in an array within the inverted\n  // index so cloning the data can be done with\n  // Array#slice\n  for (var i = 0; i < metadataKeys.length; i++) {\n    var key = metadataKeys[i]\n    clonedMetadata[key] = metadata[key].slice()\n  }\n\n  this.metadata = Object.create(null)\n\n  if (term !== undefined) {\n    this.metadata[term] = Object.create(null)\n    this.metadata[term][field] = clonedMetadata\n  }\n}\n\n/**\n * An instance of lunr.MatchData will be created for every term that matches a\n * document. However only one instance is required in a lunr.Index~Result. This\n * method combines metadata from another instance of lunr.MatchData with this\n * objects metadata.\n *\n * @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one.\n * @see {@link lunr.Index~Result}\n */\nlunr.MatchData.prototype.combine = function (otherMatchData) {\n  var terms = Object.keys(otherMatchData.metadata)\n\n  for (var i = 0; i < terms.length; i++) {\n    var term = terms[i],\n        fields = Object.keys(otherMatchData.metadata[term])\n\n    if (this.metadata[term] == undefined) {\n      this.metadata[term] = Object.create(null)\n    }\n\n    for (var j = 0; j < fields.length; j++) {\n      var field = fields[j],\n          keys = Object.keys(otherMatchData.metadata[term][field])\n\n      if (this.metadata[term][field] == undefined) {\n        this.metadata[term][field] = Object.create(null)\n      }\n\n      for (var k = 0; k < keys.length; k++) {\n        var key = keys[k]\n\n        if (this.metadata[term][field][key] == undefined) {\n          this.metadata[term][field][key] = otherMatchData.metadata[term][field][key]\n        } else {\n          this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key])\n        }\n\n      }\n    }\n  }\n}\n\n/**\n * Add metadata for a term/field pair to this instance of match data.\n *\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n */\nlunr.MatchData.prototype.add = function (term, field, metadata) {\n  if (!(term in this.metadata)) {\n    this.metadata[term] = Object.create(null)\n    this.metadata[term][field] = metadata\n    return\n  }\n\n  if (!(field in this.metadata[term])) {\n    this.metadata[term][field] = metadata\n    return\n  }\n\n  var metadataKeys = Object.keys(metadata)\n\n  for (var i = 0; i < metadataKeys.length; i++) {\n    var key = metadataKeys[i]\n\n    if (key in this.metadata[term][field]) {\n      this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key])\n    } else {\n      this.metadata[term][field][key] = metadata[key]\n    }\n  }\n}\n/**\n * A lunr.Query provides a programmatic way of defining queries to be performed\n * against a {@link lunr.Index}.\n *\n * Prefer constructing a lunr.Query using the {@link lunr.Index#query} method\n * so the query object is pre-initialized with the right index fields.\n *\n * @constructor\n * @property {lunr.Query~Clause[]} clauses - An array of query clauses.\n * @property {string[]} allFields - An array of all available fields in a lunr.Index.\n */\nlunr.Query = function (allFields) {\n  this.clauses = []\n  this.allFields = allFields\n}\n\n/**\n * Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause.\n *\n * This allows wildcards to be added to the beginning and end of a term without having to manually do any string\n * concatenation.\n *\n * The wildcard constants can be bitwise combined to select both leading and trailing wildcards.\n *\n * @constant\n * @default\n * @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour\n * @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists\n * @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example <caption>query term with trailing wildcard</caption>\n * query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING })\n * @example <caption>query term with leading and trailing wildcard</caption>\n * query.term('foo', {\n *   wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING\n * })\n */\n\nlunr.Query.wildcard = new String (\"*\")\nlunr.Query.wildcard.NONE = 0\nlunr.Query.wildcard.LEADING = 1\nlunr.Query.wildcard.TRAILING = 2\n\n/**\n * Constants for indicating what kind of presence a term must have in matching documents.\n *\n * @constant\n * @enum {number}\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example <caption>query term with required presence</caption>\n * query.term('foo', { presence: lunr.Query.presence.REQUIRED })\n */\nlunr.Query.presence = {\n  /**\n   * Term's presence in a document is optional, this is the default value.\n   */\n  OPTIONAL: 1,\n\n  /**\n   * Term's presence in a document is required, documents that do not contain\n   * this term will not be returned.\n   */\n  REQUIRED: 2,\n\n  /**\n   * Term's presence in a document is prohibited, documents that do contain\n   * this term will not be returned.\n   */\n  PROHIBITED: 3\n}\n\n/**\n * A single clause in a {@link lunr.Query} contains a term and details on how to\n * match that term against a {@link lunr.Index}.\n *\n * @typedef {Object} lunr.Query~Clause\n * @property {string[]} fields - The fields in an index this clause should be matched against.\n * @property {number} [boost=1] - Any boost that should be applied when matching this clause.\n * @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be.\n * @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline.\n * @property {number} [wildcard=lunr.Query.wildcard.NONE] - Whether the term should have wildcards appended or prepended.\n * @property {number} [presence=lunr.Query.presence.OPTIONAL] - The terms presence in any matching documents.\n */\n\n/**\n * Adds a {@link lunr.Query~Clause} to this query.\n *\n * Unless the clause contains the fields to be matched all fields will be matched. In addition\n * a default boost of 1 is applied to the clause.\n *\n * @param {lunr.Query~Clause} clause - The clause to add to this query.\n * @see lunr.Query~Clause\n * @returns {lunr.Query}\n */\nlunr.Query.prototype.clause = function (clause) {\n  if (!('fields' in clause)) {\n    clause.fields = this.allFields\n  }\n\n  if (!('boost' in clause)) {\n    clause.boost = 1\n  }\n\n  if (!('usePipeline' in clause)) {\n    clause.usePipeline = true\n  }\n\n  if (!('wildcard' in clause)) {\n    clause.wildcard = lunr.Query.wildcard.NONE\n  }\n\n  if ((clause.wildcard & lunr.Query.wildcard.LEADING) && (clause.term.charAt(0) != lunr.Query.wildcard)) {\n    clause.term = \"*\" + clause.term\n  }\n\n  if ((clause.wildcard & lunr.Query.wildcard.TRAILING) && (clause.term.slice(-1) != lunr.Query.wildcard)) {\n    clause.term = \"\" + clause.term + \"*\"\n  }\n\n  if (!('presence' in clause)) {\n    clause.presence = lunr.Query.presence.OPTIONAL\n  }\n\n  this.clauses.push(clause)\n\n  return this\n}\n\n/**\n * A negated query is one in which every clause has a presence of\n * prohibited. These queries require some special processing to return\n * the expected results.\n *\n * @returns boolean\n */\nlunr.Query.prototype.isNegated = function () {\n  for (var i = 0; i < this.clauses.length; i++) {\n    if (this.clauses[i].presence != lunr.Query.presence.PROHIBITED) {\n      return false\n    }\n  }\n\n  return true\n}\n\n/**\n * Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause}\n * to the list of clauses that make up this query.\n *\n * The term is used as is, i.e. no tokenization will be performed by this method. Instead conversion\n * to a token or token-like string should be done before calling this method.\n *\n * The term will be converted to a string by calling `toString`. Multiple terms can be passed as an\n * array, each term in the array will share the same options.\n *\n * @param {object|object[]} term - The term(s) to add to the query.\n * @param {object} [options] - Any additional properties to add to the query clause.\n * @returns {lunr.Query}\n * @see lunr.Query#clause\n * @see lunr.Query~Clause\n * @example <caption>adding a single term to a query</caption>\n * query.term(\"foo\")\n * @example <caption>adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard</caption>\n * query.term(\"foo\", {\n *   fields: [\"title\"],\n *   boost: 10,\n *   wildcard: lunr.Query.wildcard.TRAILING\n * })\n * @example <caption>using lunr.tokenizer to convert a string to tokens before using them as terms</caption>\n * query.term(lunr.tokenizer(\"foo bar\"))\n */\nlunr.Query.prototype.term = function (term, options) {\n  if (Array.isArray(term)) {\n    term.forEach(function (t) { this.term(t, lunr.utils.clone(options)) }, this)\n    return this\n  }\n\n  var clause = options || {}\n  clause.term = term.toString()\n\n  this.clause(clause)\n\n  return this\n}\nlunr.QueryParseError = function (message, start, end) {\n  this.name = \"QueryParseError\"\n  this.message = message\n  this.start = start\n  this.end = end\n}\n\nlunr.QueryParseError.prototype = new Error\nlunr.QueryLexer = function (str) {\n  this.lexemes = []\n  this.str = str\n  this.length = str.length\n  this.pos = 0\n  this.start = 0\n  this.escapeCharPositions = []\n}\n\nlunr.QueryLexer.prototype.run = function () {\n  var state = lunr.QueryLexer.lexText\n\n  while (state) {\n    state = state(this)\n  }\n}\n\nlunr.QueryLexer.prototype.sliceString = function () {\n  var subSlices = [],\n      sliceStart = this.start,\n      sliceEnd = this.pos\n\n  for (var i = 0; i < this.escapeCharPositions.length; i++) {\n    sliceEnd = this.escapeCharPositions[i]\n    subSlices.push(this.str.slice(sliceStart, sliceEnd))\n    sliceStart = sliceEnd + 1\n  }\n\n  subSlices.push(this.str.slice(sliceStart, this.pos))\n  this.escapeCharPositions.length = 0\n\n  return subSlices.join('')\n}\n\nlunr.QueryLexer.prototype.emit = function (type) {\n  this.lexemes.push({\n    type: type,\n    str: this.sliceString(),\n    start: this.start,\n    end: this.pos\n  })\n\n  this.start = this.pos\n}\n\nlunr.QueryLexer.prototype.escapeCharacter = function () {\n  this.escapeCharPositions.push(this.pos - 1)\n  this.pos += 1\n}\n\nlunr.QueryLexer.prototype.next = function () {\n  if (this.pos >= this.length) {\n    return lunr.QueryLexer.EOS\n  }\n\n  var char = this.str.charAt(this.pos)\n  this.pos += 1\n  return char\n}\n\nlunr.QueryLexer.prototype.width = function () {\n  return this.pos - this.start\n}\n\nlunr.QueryLexer.prototype.ignore = function () {\n  if (this.start == this.pos) {\n    this.pos += 1\n  }\n\n  this.start = this.pos\n}\n\nlunr.QueryLexer.prototype.backup = function () {\n  this.pos -= 1\n}\n\nlunr.QueryLexer.prototype.acceptDigitRun = function () {\n  var char, charCode\n\n  do {\n    char = this.next()\n    charCode = char.charCodeAt(0)\n  } while (charCode > 47 && charCode < 58)\n\n  if (char != lunr.QueryLexer.EOS) {\n    this.backup()\n  }\n}\n\nlunr.QueryLexer.prototype.more = function () {\n  return this.pos < this.length\n}\n\nlunr.QueryLexer.EOS = 'EOS'\nlunr.QueryLexer.FIELD = 'FIELD'\nlunr.QueryLexer.TERM = 'TERM'\nlunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE'\nlunr.QueryLexer.BOOST = 'BOOST'\nlunr.QueryLexer.PRESENCE = 'PRESENCE'\n\nlunr.QueryLexer.lexField = function (lexer) {\n  lexer.backup()\n  lexer.emit(lunr.QueryLexer.FIELD)\n  lexer.ignore()\n  return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexTerm = function (lexer) {\n  if (lexer.width() > 1) {\n    lexer.backup()\n    lexer.emit(lunr.QueryLexer.TERM)\n  }\n\n  lexer.ignore()\n\n  if (lexer.more()) {\n    return lunr.QueryLexer.lexText\n  }\n}\n\nlunr.QueryLexer.lexEditDistance = function (lexer) {\n  lexer.ignore()\n  lexer.acceptDigitRun()\n  lexer.emit(lunr.QueryLexer.EDIT_DISTANCE)\n  return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexBoost = function (lexer) {\n  lexer.ignore()\n  lexer.acceptDigitRun()\n  lexer.emit(lunr.QueryLexer.BOOST)\n  return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexEOS = function (lexer) {\n  if (lexer.width() > 0) {\n    lexer.emit(lunr.QueryLexer.TERM)\n  }\n}\n\n// This matches the separator used when tokenising fields\n// within a document. These should match otherwise it is\n// not possible to search for some tokens within a document.\n//\n// It is possible for the user to change the separator on the\n// tokenizer so it _might_ clash with any other of the special\n// characters already used within the search string, e.g. :.\n//\n// This means that it is possible to change the separator in\n// such a way that makes some words unsearchable using a search\n// string.\nlunr.QueryLexer.termSeparator = lunr.tokenizer.separator\n\nlunr.QueryLexer.lexText = function (lexer) {\n  while (true) {\n    var char = lexer.next()\n\n    if (char == lunr.QueryLexer.EOS) {\n      return lunr.QueryLexer.lexEOS\n    }\n\n    // Escape character is '\\'\n    if (char.charCodeAt(0) == 92) {\n      lexer.escapeCharacter()\n      continue\n    }\n\n    if (char == \":\") {\n      return lunr.QueryLexer.lexField\n    }\n\n    if (char == \"~\") {\n      lexer.backup()\n      if (lexer.width() > 0) {\n        lexer.emit(lunr.QueryLexer.TERM)\n      }\n      return lunr.QueryLexer.lexEditDistance\n    }\n\n    if (char == \"^\") {\n      lexer.backup()\n      if (lexer.width() > 0) {\n        lexer.emit(lunr.QueryLexer.TERM)\n      }\n      return lunr.QueryLexer.lexBoost\n    }\n\n    // \"+\" indicates term presence is required\n    // checking for length to ensure that only\n    // leading \"+\" are considered\n    if (char == \"+\" && lexer.width() === 1) {\n      lexer.emit(lunr.QueryLexer.PRESENCE)\n      return lunr.QueryLexer.lexText\n    }\n\n    // \"-\" indicates term presence is prohibited\n    // checking for length to ensure that only\n    // leading \"-\" are considered\n    if (char == \"-\" && lexer.width() === 1) {\n      lexer.emit(lunr.QueryLexer.PRESENCE)\n      return lunr.QueryLexer.lexText\n    }\n\n    if (char.match(lunr.QueryLexer.termSeparator)) {\n      return lunr.QueryLexer.lexTerm\n    }\n  }\n}\n\nlunr.QueryParser = function (str, query) {\n  this.lexer = new lunr.QueryLexer (str)\n  this.query = query\n  this.currentClause = {}\n  this.lexemeIdx = 0\n}\n\nlunr.QueryParser.prototype.parse = function () {\n  this.lexer.run()\n  this.lexemes = this.lexer.lexemes\n\n  var state = lunr.QueryParser.parseClause\n\n  while (state) {\n    state = state(this)\n  }\n\n  return this.query\n}\n\nlunr.QueryParser.prototype.peekLexeme = function () {\n  return this.lexemes[this.lexemeIdx]\n}\n\nlunr.QueryParser.prototype.consumeLexeme = function () {\n  var lexeme = this.peekLexeme()\n  this.lexemeIdx += 1\n  return lexeme\n}\n\nlunr.QueryParser.prototype.nextClause = function () {\n  var completedClause = this.currentClause\n  this.query.clause(completedClause)\n  this.currentClause = {}\n}\n\nlunr.QueryParser.parseClause = function (parser) {\n  var lexeme = parser.peekLexeme()\n\n  if (lexeme == undefined) {\n    return\n  }\n\n  switch (lexeme.type) {\n    case lunr.QueryLexer.PRESENCE:\n      return lunr.QueryParser.parsePresence\n    case lunr.QueryLexer.FIELD:\n      return lunr.QueryParser.parseField\n    case lunr.QueryLexer.TERM:\n      return lunr.QueryParser.parseTerm\n    default:\n      var errorMessage = \"expected either a field or a term, found \" + lexeme.type\n\n      if (lexeme.str.length >= 1) {\n        errorMessage += \" with value '\" + lexeme.str + \"'\"\n      }\n\n      throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n  }\n}\n\nlunr.QueryParser.parsePresence = function (parser) {\n  var lexeme = parser.consumeLexeme()\n\n  if (lexeme == undefined) {\n    return\n  }\n\n  switch (lexeme.str) {\n    case \"-\":\n      parser.currentClause.presence = lunr.Query.presence.PROHIBITED\n      break\n    case \"+\":\n      parser.currentClause.presence = lunr.Query.presence.REQUIRED\n      break\n    default:\n      var errorMessage = \"unrecognised presence operator'\" + lexeme.str + \"'\"\n      throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n  }\n\n  var nextLexeme = parser.peekLexeme()\n\n  if (nextLexeme == undefined) {\n    var errorMessage = \"expecting term or field, found nothing\"\n    throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n  }\n\n  switch (nextLexeme.type) {\n    case lunr.QueryLexer.FIELD:\n      return lunr.QueryParser.parseField\n    case lunr.QueryLexer.TERM:\n      return lunr.QueryParser.parseTerm\n    default:\n      var errorMessage = \"expecting term or field, found '\" + nextLexeme.type + \"'\"\n      throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n  }\n}\n\nlunr.QueryParser.parseField = function (parser) {\n  var lexeme = parser.consumeLexeme()\n\n  if (lexeme == undefined) {\n    return\n  }\n\n  if (parser.query.allFields.indexOf(lexeme.str) == -1) {\n    var possibleFields = parser.query.allFields.map(function (f) { return \"'\" + f + \"'\" }).join(', '),\n        errorMessage = \"unrecognised field '\" + lexeme.str + \"', possible fields: \" + possibleFields\n\n    throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n  }\n\n  parser.currentClause.fields = [lexeme.str]\n\n  var nextLexeme = parser.peekLexeme()\n\n  if (nextLexeme == undefined) {\n    var errorMessage = \"expecting term, found nothing\"\n    throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n  }\n\n  switch (nextLexeme.type) {\n    case lunr.QueryLexer.TERM:\n      return lunr.QueryParser.parseTerm\n    default:\n      var errorMessage = \"expecting term, found '\" + nextLexeme.type + \"'\"\n      throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n  }\n}\n\nlunr.QueryParser.parseTerm = function (parser) {\n  var lexeme = parser.consumeLexeme()\n\n  if (lexeme == undefined) {\n    return\n  }\n\n  parser.currentClause.term = lexeme.str.toLowerCase()\n\n  if (lexeme.str.indexOf(\"*\") != -1) {\n    parser.currentClause.usePipeline = false\n  }\n\n  var nextLexeme = parser.peekLexeme()\n\n  if (nextLexeme == undefined) {\n    parser.nextClause()\n    return\n  }\n\n  switch (nextLexeme.type) {\n    case lunr.QueryLexer.TERM:\n      parser.nextClause()\n      return lunr.QueryParser.parseTerm\n    case lunr.QueryLexer.FIELD:\n      parser.nextClause()\n      return lunr.QueryParser.parseField\n    case lunr.QueryLexer.EDIT_DISTANCE:\n      return lunr.QueryParser.parseEditDistance\n    case lunr.QueryLexer.BOOST:\n      return lunr.QueryParser.parseBoost\n    case lunr.QueryLexer.PRESENCE:\n      parser.nextClause()\n      return lunr.QueryParser.parsePresence\n    default:\n      var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n      throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n  }\n}\n\nlunr.QueryParser.parseEditDistance = function (parser) {\n  var lexeme = parser.consumeLexeme()\n\n  if (lexeme == undefined) {\n    return\n  }\n\n  var editDistance = parseInt(lexeme.str, 10)\n\n  if (isNaN(editDistance)) {\n    var errorMessage = \"edit distance must be numeric\"\n    throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n  }\n\n  parser.currentClause.editDistance = editDistance\n\n  var nextLexeme = parser.peekLexeme()\n\n  if (nextLexeme == undefined) {\n    parser.nextClause()\n    return\n  }\n\n  switch (nextLexeme.type) {\n    case lunr.QueryLexer.TERM:\n      parser.nextClause()\n      return lunr.QueryParser.parseTerm\n    case lunr.QueryLexer.FIELD:\n      parser.nextClause()\n      return lunr.QueryParser.parseField\n    case lunr.QueryLexer.EDIT_DISTANCE:\n      return lunr.QueryParser.parseEditDistance\n    case lunr.QueryLexer.BOOST:\n      return lunr.QueryParser.parseBoost\n    case lunr.QueryLexer.PRESENCE:\n      parser.nextClause()\n      return lunr.QueryParser.parsePresence\n    default:\n      var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n      throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n  }\n}\n\nlunr.QueryParser.parseBoost = function (parser) {\n  var lexeme = parser.consumeLexeme()\n\n  if (lexeme == undefined) {\n    return\n  }\n\n  var boost = parseInt(lexeme.str, 10)\n\n  if (isNaN(boost)) {\n    var errorMessage = \"boost must be numeric\"\n    throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n  }\n\n  parser.currentClause.boost = boost\n\n  var nextLexeme = parser.peekLexeme()\n\n  if (nextLexeme == undefined) {\n    parser.nextClause()\n    return\n  }\n\n  switch (nextLexeme.type) {\n    case lunr.QueryLexer.TERM:\n      parser.nextClause()\n      return lunr.QueryParser.parseTerm\n    case lunr.QueryLexer.FIELD:\n      parser.nextClause()\n      return lunr.QueryParser.parseField\n    case lunr.QueryLexer.EDIT_DISTANCE:\n      return lunr.QueryParser.parseEditDistance\n    case lunr.QueryLexer.BOOST:\n      return lunr.QueryParser.parseBoost\n    case lunr.QueryLexer.PRESENCE:\n      parser.nextClause()\n      return lunr.QueryParser.parsePresence\n    default:\n      var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n      throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n  }\n}\n\n  /**\n   * export the module via AMD, CommonJS or as a browser global\n   * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js\n   */\n  ;(function (root, factory) {\n    if (typeof define === 'function' && define.amd) {\n      // AMD. Register as an anonymous module.\n      define(factory)\n    } else if (typeof exports === 'object') {\n      /**\n       * Node. Does not work with strict CommonJS, but\n       * only CommonJS-like enviroments that support module.exports,\n       * like Node.\n       */\n      module.exports = factory()\n    } else {\n      // Browser globals (root is window)\n      root.lunr = factory()\n    }\n  }(this, function () {\n    /**\n     * Just return a value to define the module export.\n     * This example returns an object, but the module\n     * can return a function as the exported value.\n     */\n    return lunr\n  }))\n})();\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { cutWords, DocumentationEntry, highlightMarks } from '../utils';\n\nexport interface SearchResult {\n  exactMatch?: boolean;\n  highlights: T.Dict<[number, number][]>;\n  longestTerm: string;\n  page: DocumentationEntry;\n  query: string;\n}\n\ninterface Props {\n  active: boolean;\n  result: SearchResult;\n}\n\nexport default function SearchResultEntry({ active, result }: Props) {\n  return (\n    <Link\n      className={classNames('list-group-item', { active })}\n      to={'/documentation' + result.page.url}>\n      <SearchResultTitle result={result} />\n      <SearchResultText result={result} />\n    </Link>\n  );\n}\n\nexport function SearchResultTitle({ result }: { result: SearchResult }) {\n  let titleWithMarks: React.ReactNode;\n\n  const titleHighlights = result.highlights.title;\n  if (titleHighlights && titleHighlights.length > 0) {\n    const { title } = result.page;\n    const tokens = highlightMarks(\n      title,\n      titleHighlights.map(h => ({ from: h[0], to: h[0] + h[1] }))\n    );\n    titleWithMarks = <SearchResultTokens tokens={tokens} />;\n  } else {\n    titleWithMarks = result.page.title;\n  }\n\n  return (\n    <h3 className=\"list-group-item-heading\" style={{ fontWeight: 'normal' }}>\n      {titleWithMarks}\n    </h3>\n  );\n}\n\nexport function SearchResultText({ result }: { result: SearchResult }) {\n  const textHighlights = result.highlights.text;\n  const { text } = result.page;\n  let tokens: {\n    text: string;\n    marked: boolean;\n  }[] = [];\n\n  if (result.exactMatch) {\n    const pageText = result.page.text.toLowerCase();\n    const highlights: { from: number; to: number }[] = [];\n    let start = 0;\n    let index = pageText.indexOf(result.query, start);\n    let loopCount = 0;\n\n    while (index > -1 && loopCount < 10) {\n      loopCount++;\n      highlights.push({ from: index, to: index + result.query.length });\n      start = index + 1;\n      index = pageText.indexOf(result.query, start);\n    }\n\n    if (highlights.length) {\n      tokens = highlightMarks(text, highlights);\n    }\n  }\n\n  if (tokens.length === 0 && textHighlights && textHighlights.length > 0) {\n    tokens = highlightMarks(\n      text,\n      textHighlights.map(h => ({ from: h[0], to: h[0] + h[1] }))\n    );\n  }\n\n  if (tokens.length) {\n    return (\n      <div className=\"note\">\n        <SearchResultTokens tokens={cutWords(tokens)} />\n      </div>\n    );\n  } else {\n    return null;\n  }\n}\n\nexport function SearchResultTokens({\n  tokens\n}: {\n  tokens: Array<{ text: string; marked: boolean }>;\n}) {\n  return (\n    <>\n      {tokens.map((token, index) => (\n        <React.Fragment key={index}>\n          {token.marked ? <mark key={index}>{token.text}</mark> : token.text}\n        </React.Fragment>\n      ))}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { DocNavigationItem } from 'Docs/@types/types';\nimport { sortBy } from 'lodash';\nimport lunr, { LunrBuilder, LunrIndex, LunrToken } from 'lunr';\nimport * as React from 'react';\nimport { isDefined } from '../../../helpers/types';\nimport { getUrlsList } from '../navTreeUtils';\nimport { DocumentationEntry } from '../utils';\nimport SearchResultEntry from './SearchResultEntry';\n\ninterface Props {\n  navigation: DocNavigationItem[];\n  pages: DocumentationEntry[];\n  query: string;\n  splat: string;\n}\n\nexport default class SearchResults extends React.PureComponent<Props> {\n  index: LunrIndex;\n\n  constructor(props: Props) {\n    super(props);\n    this.index = lunr(function() {\n      this.use(tokenContextPlugin);\n      this.ref('relativeName');\n      this.field('title', { boost: 10 });\n      this.field('text');\n\n      this.metadataWhitelist = ['position', 'tokenContext'];\n\n      props.pages\n        .filter(page => getUrlsList(props.navigation).includes(page.url))\n        .forEach(page => this.add(page));\n    });\n  }\n\n  render() {\n    const query = this.props.query.toLowerCase();\n    const results = this.index\n      .search(\n        query\n          .replace(/[\\^\\-+:~*]/g, '')\n          .split(/\\s+/)\n          .map(s => `${s}~1 ${s}*`)\n          .join(' ')\n      )\n      .map(match => {\n        const page = this.props.pages.find(page => page.relativeName === match.ref);\n\n        if (!page) {\n          return null;\n        }\n\n        const highlights: T.Dict<[number, number][]> = {};\n        let longestTerm = '';\n        let exactMatch = false;\n\n        // Loop over all matching terms/tokens.\n        Object.keys(match.matchData.metadata).forEach(term => {\n          // Remember the longest term that matches the query as close as possible.\n          if (query.includes(term.toLowerCase()) && longestTerm.length < term.length) {\n            longestTerm = term;\n          }\n\n          Object.keys(match.matchData.metadata[term]).forEach(fieldName => {\n            const { position: positions, tokenContext: tokenContexts } = match.matchData.metadata[\n              term\n            ][fieldName];\n\n            highlights[fieldName] = [...(highlights[fieldName] || []), ...positions];\n\n            // Check if we have an *exact match*.\n            if (!exactMatch && tokenContexts) {\n              tokenContexts.forEach((tokenContext: string) => {\n                if (!exactMatch && tokenContext.includes(query)) {\n                  exactMatch = true;\n                }\n              });\n            }\n          });\n        });\n\n        return { exactMatch, highlights, longestTerm, page, query };\n      })\n      .filter(isDefined);\n\n    // Re-order results by the length of the longest matched term and by exact\n    // match (if applicable). The longer the matched term is, the higher the\n    // chance the result is more relevant.\n    const sortedResults = sortBy(\n      // Sort by longest term.\n      sortBy(results, result => -result.longestTerm.length),\n      // Sort by exact match.\n      result => result.exactMatch && -1\n    );\n\n    return (\n      <>\n        {sortedResults.map(result => (\n          <SearchResultEntry\n            active={result.page.relativeName === this.props.splat}\n            key={result.page.relativeName}\n            result={result}\n          />\n        ))}\n      </>\n    );\n  }\n}\n\n// Lunr doesn't support exact multiple-term matching. Meaning \"foo bar\" will not\n// boost a sentence like \"Foo bar baz\" more than \"Baz bar foo\". In order to\n// provide more accurate results, we store the token context, to see if we can\n// perform an \"exact match\". Unfortunately, we cannot extend the search logic,\n// only the tokenizer at *index time*. This is why we store the context as\n// meta-data, and post-process the matches before rendering (see above). For\n// performance reasons, we only add 2 extra tokens, one in front, one after.\n// This means we support \"exact macthing\" for up to 3 terms. More search terms\n// would fallback to the regular matching algorithm, which is OK: the more terms\n// searched for, the better the standard algorithm will perform anyway. In the\n// end, the best would be for Lunr to support multi-term matching, as extending\n// the search algorithm for this would be way too complicated.\nfunction tokenContextPlugin(builder: LunrBuilder) {\n  const pipelineFunction = (token: LunrToken, index: number, tokens: LunrToken[]) => {\n    const prevToken = tokens[index - 1] || '';\n    const nextToken = tokens[index + 1] || '';\n    token.metadata['tokenContext'] = [prevToken.toString(), token.toString(), nextToken.toString()]\n      .filter(s => s.length)\n      .join(' ')\n      .toLowerCase();\n    return token;\n  };\n\n  (lunr as any).Pipeline.registerFunction(pipelineFunction, 'tokenContext');\n  builder.pipeline.before((lunr as any).stemmer, pipelineFunction);\n  builder.metadataWhitelist.push('tokenContext');\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { DocNavigationItem } from 'Docs/@types/types';\nimport * as React from 'react';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { DocumentationEntry } from '../utils';\nimport Menu from './Menu';\nimport SearchResults from './SearchResults';\n\ninterface Props {\n  navigation: DocNavigationItem[];\n  pages: DocumentationEntry[];\n  splat: string;\n}\n\ninterface State {\n  query: string;\n}\n\nexport default class Sidebar extends React.PureComponent<Props, State> {\n  state: State = { query: '' };\n\n  handleSearch = (query: string) => {\n    this.setState({ query: query.trim() });\n  };\n\n  render() {\n    return (\n      <>\n        <SearchBox\n          className=\"big-spacer-top spacer-bottom\"\n          minLength={2}\n          onChange={this.handleSearch}\n          placeholder=\"Search for pages or keywords\"\n          value={this.state.query}\n        />\n        <div className=\"documentation-results panel\">\n          <div className=\"list-group\">\n            {this.state.query ? (\n              <SearchResults\n                navigation={this.props.navigation}\n                pages={this.props.pages}\n                query={this.state.query}\n                splat={this.props.splat}\n              />\n            ) : (\n              <Menu\n                navigation={this.props.navigation}\n                pages={this.props.pages}\n                splat={this.props.splat}\n              />\n            )}\n          </div>\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as navigationTreeSonarQube from 'Docs/../static/SonarQubeNavigationTree.json';\nimport { DocNavigationItem } from 'Docs/@types/types';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router';\nimport { getInstalledPlugins } from '../../../api/plugins';\nimport { getPluginStaticFileContent } from '../../../api/static';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport NotFound from '../../../app/components/NotFound';\nimport ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';\nimport DocMarkdownBlock from '../../../components/docs/DocMarkdownBlock';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { ParsedContent, separateFrontMatter } from '../../../helpers/markdown';\nimport { addSideBarClass, removeSideBarClass } from '../../../helpers/pages';\nimport { isDefined } from '../../../helpers/types';\nimport { InstalledPlugin, PluginType } from '../../../types/plugins';\nimport { getUrlsList } from '../navTreeUtils';\nimport getPages from '../pages';\nimport '../styles.css';\nimport { DocumentationEntry } from '../utils';\nimport Sidebar from './Sidebar';\n\ninterface Props {\n  params: { splat?: string };\n  location: { hash: string };\n}\n\ninterface State {\n  loading: boolean;\n  pages: DocumentationEntry[];\n  tree: DocNavigationItem[];\n}\n\nconst LANGUAGES_BASE_URL = 'analysis/languages';\n\nexport default class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    loading: false,\n    pages: [],\n    tree: []\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    addSideBarClass();\n\n    this.setState({ loading: true });\n\n    const tree = (navigationTreeSonarQube as any).default as DocNavigationItem[];\n\n    this.getLanguagePluginsDocumentation(tree).then(\n      overrides => {\n        if (this.mounted) {\n          this.setState({\n            loading: false,\n            pages: getPages(overrides),\n            tree\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({\n            loading: false\n          });\n        }\n      }\n    );\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    removeSideBarClass();\n  }\n\n  getLanguagePluginsDocumentation = async (tree: DocNavigationItem[]) => {\n    const plugins = await getInstalledPlugins(PluginType.Bundled).catch(\n      () => [] as InstalledPlugin[]\n    );\n\n    const pluginsWithDoc = await Promise.all(\n      plugins.map(plugin => {\n        if (plugin.documentationPath) {\n          const matchArray = /^static\\/(.*)/.exec(plugin.documentationPath);\n\n          if (matchArray && matchArray.length > 1) {\n            return getPluginStaticFileContent(plugin.key, matchArray[1]).then(\n              content => ({ ...plugin, content }),\n              () => undefined\n            );\n          }\n        }\n\n        return undefined;\n      })\n    );\n\n    const regex = new RegExp(`/${LANGUAGES_BASE_URL}/\\\\w+/$`);\n    const overridablePaths = getUrlsList(tree).filter(\n      path => regex.test(path) && path !== `/${LANGUAGES_BASE_URL}/overview/`\n    );\n\n    const parsedContent: T.Dict<ParsedContent> = {};\n\n    pluginsWithDoc.filter(isDefined).forEach(plugin => {\n      const parsed = separateFrontMatter(plugin.content);\n\n      if (plugin.issueTrackerUrl) {\n        // Inject issue tracker link\n        let issueTrackerLink = '## Issue Tracker';\n        issueTrackerLink += '\\r\\n';\n        issueTrackerLink += `Check the [issue tracker](${plugin.issueTrackerUrl}) for this language.`;\n        parsed.content = `${parsed.content}\\r\\n${issueTrackerLink}`;\n      }\n\n      if (\n        parsed?.frontmatter?.key &&\n        overridablePaths.includes(`/${LANGUAGES_BASE_URL}/${parsed.frontmatter.key}/`)\n      ) {\n        parsedContent[`${LANGUAGES_BASE_URL}/${parsed.frontmatter.key}`] = parsed;\n      }\n    });\n\n    return parsedContent;\n  };\n\n  render() {\n    const { loading, pages, tree } = this.state;\n    const {\n      params: { splat = '' },\n      location: { hash }\n    } = this.props;\n\n    if (loading) {\n      return (\n        <div className=\"page page-limited\">\n          <DeferredSpinner />\n        </div>\n      );\n    }\n\n    const page = pages.find(p => p.url === `/${splat}`);\n    const mainTitle = translate('documentation.page_title.sonarqube');\n    const isIndex = splat === 'index';\n\n    if (!page) {\n      return (\n        <>\n          <Helmet title={mainTitle}>\n            <meta content=\"noindex nofollow\" name=\"robots\" />\n          </Helmet>\n          <A11ySkipTarget anchor=\"documentation_main\" />\n          <NotFound withContainer={false} />\n        </>\n      );\n    }\n\n    return (\n      <div className=\"layout-page\">\n        <Helmet\n          defer={false}\n          title={isIndex || !page.title ? mainTitle : `${page.title} | ${mainTitle}`}>\n          <meta content=\"noindex nofollow\" name=\"robots\" />\n        </Helmet>\n\n        <ScreenPositionHelper className=\"layout-page-side-outer\">\n          {({ top }) => (\n            <div className=\"layout-page-side\" style={{ top }}>\n              <div className=\"layout-page-side-inner\">\n                <div className=\"layout-page-filters\">\n                  <div className=\"documentation-page-header\">\n                    <A11ySkipTarget\n                      anchor=\"documentation_menu\"\n                      label={translate('documentation.skip_to_nav')}\n                      weight={10}\n                    />\n\n                    <Link to=\"/documentation/\">\n                      <h1>{translate('documentation.page')}</h1>\n                    </Link>\n                  </div>\n                  <Sidebar navigation={tree} pages={pages} splat={splat} />\n                </div>\n              </div>\n            </div>\n          )}\n        </ScreenPositionHelper>\n\n        <div className=\"layout-page-main\">\n          <div className=\"layout-page-main-inner\">\n            <div className=\"boxed-group\">\n              <A11ySkipTarget anchor=\"documentation_main\" />\n\n              <DocMarkdownBlock\n                className=\"documentation-content cut-margins boxed-group-inner\"\n                content={page.content}\n                stickyToc={true}\n                title={page.title}\n                scrollToHref={hash}\n              />\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst App = lazyLoadComponent(() => import(/* webpackChunkName: \"docs\" */ './components/App'));\n\nconst routes = [{ indexRoute: { component: App } }, { path: '**', indexRoute: { component: App } }];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON } from '../helpers/request';\n\nexport function searchUsersGroups(data: {\n  f?: string;\n  p?: number;\n  ps?: number;\n  q?: string;\n}): Promise<{ groups: T.Group[]; paging: T.Paging }> {\n  return getJSON('/api/user_groups/search', data).catch(throwGlobalError);\n}\n\nexport function getUsersInGroup(data: {\n  id?: number;\n  name?: string;\n  p?: number;\n  ps?: number;\n  q?: string;\n  selected?: string;\n}): Promise<T.Paging & { users: T.UserSelected[] }> {\n  return getJSON('/api/user_groups/users', data).catch(throwGlobalError);\n}\n\nexport function addUserToGroup(data: { id?: string; name?: string; login?: string }) {\n  return post('/api/user_groups/add_user', data).catch(throwGlobalError);\n}\n\nexport function removeUserFromGroup(data: { id?: string; name?: string; login?: string }) {\n  return post('/api/user_groups/remove_user', data).catch(throwGlobalError);\n}\n\nexport function createGroup(data: { description?: string; name: string }): Promise<T.Group> {\n  return postJSON('/api/user_groups/create', data).then(r => r.group, throwGlobalError);\n}\n\nexport function updateGroup(data: { description?: string; id: number; name?: string }) {\n  return post('/api/user_groups/update', data).catch(throwGlobalError);\n}\n\nexport function deleteGroup(data: { name: string }) {\n  return post('/api/user_groups/delete', data).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\ninterface Props {\n  group: T.Group;\n  onClose: () => void;\n  onSubmit: () => Promise<void>;\n}\n\nexport default function DeleteForm({ group, onClose, onSubmit }: Props) {\n  const header = translate('groups.delete_group');\n\n  return (\n    <SimpleModal header={header} onClose={onClose} onSubmit={onSubmit}>\n      {({ onCloseClick, onFormSubmit, submitting }) => (\n        <form onSubmit={onFormSubmit}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n          </header>\n\n          <div className=\"modal-body\">\n            {translateWithParameters('groups.delete_group.confirmation', group.name)}\n          </div>\n\n          <footer className=\"modal-foot\">\n            <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n            <SubmitButton className=\"button-red\" disabled={submitting}>\n              {translate('delete')}\n            </SubmitButton>\n            <ResetButtonLink disabled={submitting} onClick={onCloseClick}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </footer>\n        </form>\n      )}\n    </SimpleModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  confirmButtonText: string;\n  group?: T.Group;\n  header: string;\n  onClose: () => void;\n  onSubmit: (data: { description: string; name: string }) => Promise<void>;\n}\n\ninterface State {\n  description: string;\n  name: string;\n}\n\nexport default class Form extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      description: (props.group && props.group.description) || '',\n      name: (props.group && props.group.name) || ''\n    };\n  }\n\n  handleSubmit = () => {\n    return this.props\n      .onSubmit({ description: this.state.description, name: this.state.name })\n      .then(this.props.onClose);\n  };\n\n  handleDescriptionChange = (event: React.SyntheticEvent<HTMLTextAreaElement>) => {\n    this.setState({ description: event.currentTarget.value });\n  };\n\n  handleNameChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  render() {\n    return (\n      <SimpleModal\n        header={this.props.header}\n        onClose={this.props.onClose}\n        onSubmit={this.handleSubmit}\n        size=\"small\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form onSubmit={onFormSubmit}>\n            <header className=\"modal-head\">\n              <h2>{this.props.header}</h2>\n            </header>\n\n            <div className=\"modal-body\">\n              <MandatoryFieldsExplanation className=\"modal-field\" />\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-group-name\">\n                  {translate('name')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  autoFocus={true}\n                  id=\"create-group-name\"\n                  maxLength={255}\n                  name=\"name\"\n                  onChange={this.handleNameChange}\n                  required={true}\n                  size={50}\n                  type=\"text\"\n                  value={this.state.name}\n                />\n              </div>\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-group-description\">{translate('description')}</label>\n                <textarea\n                  id=\"create-group-description\"\n                  name=\"description\"\n                  onChange={this.handleDescriptionChange}\n                  value={this.state.description}\n                />\n              </div>\n            </div>\n\n            <footer className=\"modal-foot\">\n              <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n              <SubmitButton disabled={submitting}>{this.props.confirmButtonText}</SubmitButton>\n              <ResetButtonLink onClick={onCloseClick}>{translate('cancel')}</ResetButtonLink>\n            </footer>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport Form from './Form';\n\ninterface Props {\n  onCreate: (data: { description: string; name: string }) => Promise<void>;\n}\n\ninterface State {\n  createModal: boolean;\n}\n\nexport default class Header extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { createModal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleCreateClick = () => {\n    this.setState({ createModal: true });\n  };\n\n  handleClose = () => {\n    if (this.mounted) {\n      this.setState({ createModal: false });\n    }\n  };\n\n  handleSubmit = (data: { name: string; description: string }) => {\n    return this.props.onCreate(data);\n  };\n\n  render() {\n    return (\n      <>\n        <header className=\"page-header\" id=\"groups-header\">\n          <h1 className=\"page-title\">{translate('user_groups.page')}</h1>\n\n          <div className=\"page-actions\">\n            <Button id=\"groups-create\" onClick={this.handleCreateClick}>\n              {translate('groups.create_group')}\n            </Button>\n          </div>\n\n          <p className=\"page-description\">{translate('user_groups.page.description')}</p>\n        </header>\n        {this.state.createModal && (\n          <Form\n            confirmButtonText={translate('create')}\n            header={translate('groups.create_group')}\n            onClose={this.handleClose}\n            onSubmit={this.handleSubmit}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function BulletListIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M2.968 11.274v1.51q0 0.102-0.075 0.177t-0.177 0.075h-1.51q-0.102 0-0.177-0.075t-0.075-0.177v-1.51q0-0.102 0.075-0.177t0.177-0.075h1.51q0.102 0 0.177 0.075t0.075 0.177zM2.968 8.255v1.51q0 0.102-0.075 0.177t-0.177 0.075h-1.51q-0.102 0-0.177-0.075t-0.075-0.177v-1.51q0-0.102 0.075-0.177t0.177-0.075h1.51q0.102 0 0.177 0.075t0.075 0.177zM2.968 5.235v1.51q0 0.102-0.075 0.177t-0.177 0.075h-1.51q-0.102 0-0.177-0.075t-0.075-0.177v-1.51q0-0.102 0.075-0.177t0.177-0.075h1.51q0.102 0 0.177 0.075t0.075 0.177zM15.045 11.274v1.51q0 0.102-0.075 0.177t-0.177 0.075h-10.568q-0.102 0-0.177-0.075t-0.075-0.177v-1.51q0-0.102 0.075-0.177t0.177-0.075h10.568q0.102 0 0.177 0.075t0.075 0.177zM2.968 2.216v1.51q0 0.102-0.075 0.177t-0.177 0.075h-1.51q-0.102 0-0.177-0.075t-0.075-0.177v-1.51q0-0.102 0.075-0.177t0.177-0.075h1.51q0.102 0 0.177 0.075t0.075 0.177zM15.045 8.255v1.51q0 0.102-0.075 0.177t-0.177 0.075h-10.568q-0.102 0-0.177-0.075t-0.075-0.177v-1.51q0-0.102 0.075-0.177t0.177-0.075h10.568q0.102 0 0.177 0.075t0.075 0.177zM15.045 5.235v1.51q0 0.102-0.075 0.177t-0.177 0.075h-10.568q-0.102 0-0.177-0.075t-0.075-0.177v-1.51q0-0.102 0.075-0.177t0.177-0.075h10.568q0.102 0 0.177 0.075t0.075 0.177zM15.045 2.216v1.51q0 0.102-0.075 0.177t-0.177 0.075h-10.568q-0.102 0-0.177-0.075t-0.075-0.177v-1.51q0-0.102 0.075-0.177t0.177-0.075h10.568q0.102 0 0.177 0.075t0.075 0.177z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { find, without } from 'lodash';\nimport * as React from 'react';\nimport { addUserToGroup, getUsersInGroup, removeUserFromGroup } from '../../../api/user_groups';\nimport { ResetButtonLink } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport SelectList, {\n  SelectListFilter,\n  SelectListSearchParams\n} from '../../../components/controls/SelectList';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  group: T.Group;\n  onClose: () => void;\n}\n\ninterface State {\n  lastSearchParams?: SelectListSearchParams;\n  needToReload: boolean;\n  users: T.UserSelected[];\n  usersTotalCount?: number;\n  selectedUsers: string[];\n}\n\nexport default class EditMembersModal extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      needToReload: false,\n      users: [],\n      selectedUsers: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchUsers = (searchParams: SelectListSearchParams) =>\n    getUsersInGroup({\n      name: this.props.group.name,\n      p: searchParams.page,\n      ps: searchParams.pageSize,\n      q: searchParams.query !== '' ? searchParams.query : undefined,\n      selected: searchParams.filter\n    }).then(data => {\n      if (this.mounted) {\n        this.setState(prevState => {\n          const more = searchParams.page != null && searchParams.page > 1;\n\n          const users = more ? [...prevState.users, ...data.users] : data.users;\n          const newSelectedUsers = data.users.filter(user => user.selected).map(user => user.login);\n          const selectedUsers = more\n            ? [...prevState.selectedUsers, ...newSelectedUsers]\n            : newSelectedUsers;\n\n          return {\n            needToReload: false,\n            lastSearchParams: searchParams,\n            loading: false,\n            users,\n            usersTotalCount: data.total,\n            selectedUsers\n          };\n        });\n      }\n    });\n\n  handleSelect = (login: string) =>\n    addUserToGroup({\n      name: this.props.group.name,\n      login\n    }).then(() => {\n      if (this.mounted) {\n        this.setState((state: State) => ({\n          needToReload: true,\n          selectedUsers: [...state.selectedUsers, login]\n        }));\n      }\n    });\n\n  handleUnselect = (login: string) =>\n    removeUserFromGroup({\n      name: this.props.group.name,\n      login\n    }).then(() => {\n      if (this.mounted) {\n        this.setState((state: State) => ({\n          needToReload: true,\n          selectedUsers: without(state.selectedUsers, login)\n        }));\n      }\n    });\n\n  renderElement = (login: string): React.ReactNode => {\n    const user = find(this.state.users, { login });\n    return (\n      <div className=\"select-list-list-item\">\n        {user === undefined ? (\n          login\n        ) : (\n          <>\n            {user.name}\n            <br />\n            <span className=\"note\">{user.login}</span>\n          </>\n        )}\n      </div>\n    );\n  };\n\n  render() {\n    const modalHeader = translate('users.update');\n    return (\n      <Modal contentLabel={modalHeader} onRequestClose={this.props.onClose}>\n        <header className=\"modal-head\">\n          <h2>{modalHeader}</h2>\n        </header>\n\n        <div className=\"modal-body modal-container\">\n          <SelectList\n            elements={this.state.users.map(user => user.login)}\n            elementsTotalCount={this.state.usersTotalCount}\n            needToReload={\n              this.state.needToReload &&\n              this.state.lastSearchParams &&\n              this.state.lastSearchParams.filter !== SelectListFilter.All\n            }\n            onSearch={this.fetchUsers}\n            onSelect={this.handleSelect}\n            onUnselect={this.handleUnselect}\n            renderElement={this.renderElement}\n            selectedElements={this.state.selectedUsers}\n            withPaging={true}\n          />\n        </div>\n\n        <footer className=\"modal-foot\">\n          <ResetButtonLink onClick={this.props.onClose}>{translate('Done')}</ResetButtonLink>\n        </footer>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonIcon } from '../../../components/controls/buttons';\nimport BulletListIcon from '../../../components/icons/BulletListIcon';\nimport { translate } from '../../../helpers/l10n';\nimport EditMembersModal from './EditMembersModal';\n\ninterface Props {\n  group: T.Group;\n  onEdit: () => void;\n}\n\ninterface State {\n  modal: boolean;\n}\n\nexport default class EditMembers extends React.PureComponent<Props, State> {\n  container?: HTMLElement | null;\n  mounted = false;\n  state: State = { modal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleMembersClick = () => {\n    this.setState({ modal: true });\n  };\n\n  handleModalClose = () => {\n    if (this.mounted) {\n      this.setState({ modal: false });\n      this.props.onEdit();\n    }\n  };\n\n  render() {\n    return (\n      <>\n        <ButtonIcon\n          aria-label={translate('groups.users.edit')}\n          className=\"button-small\"\n          onClick={this.handleMembersClick}\n          title={translate('groups.users.edit')}>\n          <BulletListIcon />\n        </ButtonIcon>\n        {this.state.modal && (\n          <EditMembersModal group={this.props.group} onClose={this.handleModalClose} />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ActionsDropdown, {\n  ActionsDropdownDivider,\n  ActionsDropdownItem\n} from '../../../components/controls/ActionsDropdown';\nimport { translate } from '../../../helpers/l10n';\nimport EditMembers from './EditMembers';\n\nexport interface ListItemProps {\n  group: T.Group;\n  onDelete: (group: T.Group) => void;\n  onEdit: (group: T.Group) => void;\n  onEditMembers: () => void;\n}\n\nexport default function ListItem(props: ListItemProps) {\n  const { group } = props;\n\n  return (\n    <tr data-id={group.name}>\n      <td className=\"width-20\">\n        <strong className=\"js-group-name\">{group.name}</strong>\n        {group.default && <span className=\"little-spacer-left\">({translate('default')})</span>}\n      </td>\n\n      <td className=\"thin text-middle text-right little-padded-right\">{group.membersCount}</td>\n      <td className=\"little-padded-left\">\n        {!group.default && <EditMembers group={group} onEdit={props.onEditMembers} />}\n      </td>\n\n      <td className=\"width-40\">\n        <span className=\"js-group-description\">{group.description}</span>\n      </td>\n\n      <td className=\"thin nowrap text-right\">\n        {!group.default && (\n          <ActionsDropdown>\n            <ActionsDropdownItem className=\"js-group-update\" onClick={() => props.onEdit(group)}>\n              {translate('update_details')}\n            </ActionsDropdownItem>\n            <ActionsDropdownDivider />\n            <ActionsDropdownItem\n              className=\"js-group-delete\"\n              destructive={true}\n              onClick={() => props.onDelete(group)}>\n              {translate('delete')}\n            </ActionsDropdownItem>\n          </ActionsDropdown>\n        )}\n      </td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport ListItem from './ListItem';\n\ninterface Props {\n  groups: T.Group[];\n  onDelete: (group: T.Group) => void;\n  onEdit: (group: T.Group) => void;\n  onEditMembers: () => void;\n  showAnyone: boolean;\n}\n\nexport default function List(props: Props) {\n  return (\n    <div className=\"boxed-group boxed-group-inner\">\n      <table className=\"data zebra zebra-hover\" id=\"groups-list\">\n        <thead>\n          <tr>\n            <th />\n            <th className=\"nowrap width-10\" colSpan={2}>\n              {translate('members')}\n            </th>\n            <th className=\"nowrap\">{translate('description')}</th>\n            <th />\n          </tr>\n        </thead>\n        <tbody>\n          {props.showAnyone && (\n            <tr className=\"js-anyone\" key=\"anyone\">\n              <td className=\"width-20\">\n                <strong className=\"js-group-name\">{translate('groups.anyone')}</strong>\n              </td>\n              <td className=\"width-10\" colSpan={2} />\n              <td className=\"width-40\" colSpan={2}>\n                <span className=\"js-group-description\">\n                  {translate('user_groups.anyone.description')}\n                </span>\n              </td>\n            </tr>\n          )}\n\n          {sortBy(props.groups, group => group.name.toLowerCase()).map(group => (\n            <ListItem\n              group={group}\n              key={group.name}\n              onDelete={props.onDelete}\n              onEdit={props.onEdit}\n              onEditMembers={props.onEditMembers}\n            />\n          ))}\n        </tbody>\n      </table>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { createGroup, deleteGroup, searchUsersGroups, updateGroup } from '../../../api/user_groups';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { translate } from '../../../helpers/l10n';\nimport { omitNil } from '../../../helpers/request';\nimport DeleteForm from './DeleteForm';\nimport Form from './Form';\nimport Header from './Header';\nimport List from './List';\n\ninterface State {\n  groups?: T.Group[];\n  editedGroup?: T.Group;\n  groupToBeDeleted?: T.Group;\n  loading: boolean;\n  paging?: T.Paging;\n  query: string;\n}\n\nexport default class App extends React.PureComponent<{}, State> {\n  mounted = false;\n  state: State = { loading: true, query: '' };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchGroups();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  makeFetchGroupsRequest = (data?: { p?: number; q?: string }) => {\n    this.setState({ loading: true });\n    return searchUsersGroups({\n      q: this.state.query,\n      ...data\n    });\n  };\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  fetchGroups = async (data?: { p?: number; q?: string }) => {\n    try {\n      const { groups, paging } = await this.makeFetchGroupsRequest(data);\n      if (this.mounted) {\n        this.setState({ groups, loading: false, paging });\n      }\n    } catch {\n      this.stopLoading();\n    }\n  };\n\n  fetchMoreGroups = async () => {\n    const { paging: currentPaging } = this.state;\n    if (currentPaging && currentPaging.total > currentPaging.pageIndex * currentPaging.pageSize) {\n      try {\n        const { groups, paging } = await this.makeFetchGroupsRequest({\n          p: currentPaging.pageIndex + 1\n        });\n        if (this.mounted) {\n          this.setState(({ groups: existingGroups = [] }) => ({\n            groups: [...existingGroups, ...groups],\n            loading: false,\n            paging\n          }));\n        }\n      } catch {\n        this.stopLoading();\n      }\n    }\n  };\n\n  search = (query: string) => {\n    this.fetchGroups({ q: query });\n    this.setState({ query });\n  };\n\n  refresh = async () => {\n    const { paging, query } = this.state;\n\n    await this.fetchGroups({ q: query });\n\n    // reload all pages in order\n    if (paging && paging.pageIndex > 1) {\n      for (let p = 1; p < paging.pageIndex; p++) {\n        // eslint-disable-next-line no-await-in-loop\n        await this.fetchMoreGroups(); // This is a intentional promise chain\n      }\n    }\n  };\n\n  closeDeleteForm = () => {\n    this.setState({ groupToBeDeleted: undefined });\n  };\n\n  closeEditForm = () => {\n    this.setState({ editedGroup: undefined });\n  };\n\n  openDeleteForm = (group: T.Group) => {\n    this.setState({ groupToBeDeleted: group });\n  };\n\n  openEditForm = (group: T.Group) => {\n    this.setState({ editedGroup: group });\n  };\n\n  handleCreate = async (data: { description: string; name: string }) => {\n    await createGroup({ ...data });\n\n    await this.refresh();\n  };\n\n  handleDelete = async () => {\n    const { groupToBeDeleted } = this.state;\n\n    if (!groupToBeDeleted) {\n      return;\n    }\n\n    await deleteGroup({ name: groupToBeDeleted.name });\n\n    await this.refresh();\n\n    if (this.mounted) {\n      this.setState({ groupToBeDeleted: undefined });\n    }\n  };\n\n  handleEdit = async ({ name, description }: { name?: string; description: string }) => {\n    const { editedGroup } = this.state;\n\n    if (!editedGroup) {\n      return;\n    }\n\n    const data = {\n      description,\n      id: editedGroup.id,\n      // pass `name` only if it has changed, otherwise the WS fails\n      ...omitNil({ name: name !== editedGroup.name ? name : undefined })\n    };\n\n    await updateGroup(data);\n\n    if (this.mounted) {\n      this.setState(({ groups = [] }: State) => ({\n        editedGroup: undefined,\n        groups: groups.map(group =>\n          group.name === editedGroup.name ? { ...group, ...data } : group\n        )\n      }));\n    }\n  };\n\n  render() {\n    const { editedGroup, groupToBeDeleted, groups, loading, paging, query } = this.state;\n\n    const showAnyone = 'anyone'.includes(query.toLowerCase());\n\n    return (\n      <>\n        <Suggestions suggestions=\"user_groups\" />\n        <Helmet defer={false} title={translate('user_groups.page')} />\n        <div className=\"page page-limited\" id=\"groups-page\">\n          <Header onCreate={this.handleCreate} />\n\n          <SearchBox\n            className=\"big-spacer-bottom\"\n            id=\"groups-search\"\n            minLength={2}\n            onChange={this.search}\n            placeholder={translate('search.search_by_name')}\n            value={query}\n          />\n\n          {groups !== undefined && (\n            <List\n              groups={groups}\n              onDelete={this.openDeleteForm}\n              onEdit={this.openEditForm}\n              onEditMembers={this.refresh}\n              showAnyone={showAnyone}\n            />\n          )}\n\n          {groups !== undefined && paging !== undefined && (\n            <div id=\"groups-list-footer\">\n              <ListFooter\n                count={showAnyone ? groups.length + 1 : groups.length}\n                loading={loading}\n                loadMore={this.fetchMoreGroups}\n                ready={!loading}\n                total={showAnyone ? paging.total + 1 : paging.total}\n              />\n            </div>\n          )}\n\n          {groupToBeDeleted && (\n            <DeleteForm\n              group={groupToBeDeleted}\n              onClose={this.closeDeleteForm}\n              onSubmit={this.handleDelete}\n            />\n          )}\n\n          {editedGroup && (\n            <Form\n              confirmButtonText={translate('update_verb')}\n              group={editedGroup}\n              header={translate('groups.update_group')}\n              onClose={this.closeEditForm}\n              onSubmit={this.handleEdit}\n            />\n          )}\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/App')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport './EmptySearch.css';\n\nexport default function EmptySearch() {\n  return (\n    <div className=\"empty-search\">\n      <h3>{translate('no_results_search')}</h3>\n      <p className=\"big-spacer-top\">{translate('no_results_search.2')}</p>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { State } from './components/App';\n\nexport function enableLocationsNavigator(state: State) {\n  const { openIssue, selectedLocationIndex } = state;\n  if (openIssue && (openIssue.secondaryLocations.length > 0 || openIssue.flows.length > 0)) {\n    const selectedFlowIndex =\n      state.selectedFlowIndex || (openIssue.flows.length > 0 ? 0 : undefined);\n\n    return {\n      locationsNavigator: true,\n      selectedFlowIndex,\n      // Also reset index = -1 to 0, we don't want to start on the issue when enabling the location navigator\n      selectedLocationIndex:\n        selectedLocationIndex && selectedLocationIndex < 0 ? 0 : selectedLocationIndex\n    };\n  }\n  return null;\n}\n\nexport function disableLocationsNavigator() {\n  return { locationsNavigator: false };\n}\n\nexport function selectLocation(nextIndex: number) {\n  return (state: Pick<State, 'selectedLocationIndex' | 'openIssue'>) => {\n    const { selectedLocationIndex: index, openIssue } = state;\n    if (openIssue) {\n      if (index === nextIndex) {\n        // disable locations when selecting (clicking) the same location\n        return {\n          locationsNavigator: false,\n          selectedLocationIndex: undefined\n        };\n      } else {\n        return { locationsNavigator: true, selectedLocationIndex: nextIndex };\n      }\n    }\n    return null;\n  };\n}\n\nexport function selectNextLocation(\n  state: Pick<State, 'selectedFlowIndex' | 'selectedLocationIndex' | 'openIssue'>\n) {\n  const { selectedFlowIndex, selectedLocationIndex: index = -1, openIssue } = state;\n  if (openIssue) {\n    const locations =\n      selectedFlowIndex !== undefined\n        ? openIssue.flows[selectedFlowIndex]\n        : openIssue.secondaryLocations;\n    const lastLocationIdx = locations.length - 1;\n    if (index === lastLocationIdx) {\n      // -1 to jump back to the issue itself\n      return { selectedLocationIndex: -1 };\n    }\n    return {\n      selectedLocationIndex: index !== undefined && index < lastLocationIdx ? index + 1 : index\n    };\n  }\n  return null;\n}\n\nexport function selectPreviousLocation(state: State) {\n  const { selectedFlowIndex, selectedLocationIndex: index, openIssue } = state;\n  if (openIssue) {\n    if (index === -1) {\n      const locations =\n        selectedFlowIndex !== undefined\n          ? openIssue.flows[selectedFlowIndex]\n          : openIssue.secondaryLocations;\n      const lastLocationIdx = locations.length - 1;\n      return { selectedLocationIndex: lastLocationIdx };\n    }\n    return { selectedLocationIndex: index !== undefined && index > 0 ? index - 1 : index };\n  }\n  return null;\n}\n\nexport function selectFlow(nextIndex?: number) {\n  return () => {\n    return { locationsNavigator: true, selectedFlowIndex: nextIndex, selectedLocationIndex: 0 };\n  };\n}\n\nexport function selectNextFlow(state: State) {\n  const { openIssue, selectedFlowIndex } = state;\n  if (\n    openIssue &&\n    selectedFlowIndex !== undefined &&\n    openIssue.flows.length > selectedFlowIndex + 1\n  ) {\n    return { selectedFlowIndex: selectedFlowIndex + 1, selectedLocationIndex: 0 };\n  }\n  return null;\n}\n\nexport function selectPreviousFlow(state: State) {\n  const { openIssue, selectedFlowIndex } = state;\n  if (openIssue && selectedFlowIndex !== undefined && selectedFlowIndex > 0) {\n    return { selectedFlowIndex: selectedFlowIndex - 1, selectedLocationIndex: 0 };\n  }\n  return null;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport LocationIndex from '../../../components/common/LocationIndex';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\n\ninterface Props {\n  count: number;\n  onClick?: () => void;\n  selected: boolean;\n}\n\nexport default function ConciseIssueLocationBadge(props: Props) {\n  return (\n    <Tooltip\n      mouseEnterDelay={0.5}\n      overlay={translateWithParameters(\n        'issue.this_issue_involves_x_code_locations',\n        formatMeasure(props.count, 'INT')\n      )}>\n      <LocationIndex onClick={props.onClick} selected={props.selected}>\n        {'+'}\n        {props.count}\n      </LocationIndex>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport ConciseIssueLocationBadge from './ConciseIssueLocationBadge';\n\ninterface Props {\n  issue: Pick<T.Issue, 'flows' | 'secondaryLocations'>;\n  onFlowSelect: (index: number) => void;\n  selectedFlowIndex: number | undefined;\n}\n\ninterface State {\n  collapsed: boolean;\n}\n\nconst LIMIT = 8;\n\nexport default class ConciseIssueLocations extends React.PureComponent<Props, State> {\n  state: State = { collapsed: true };\n\n  handleExpandClick = () => {\n    this.setState({ collapsed: false });\n  };\n\n  renderExpandButton() {\n    return (\n      <Button\n        className=\"concise-issue-expand location-index link-no-underline\"\n        onClick={this.handleExpandClick}>\n        ...\n      </Button>\n    );\n  }\n\n  render() {\n    const { secondaryLocations, flows } = this.props.issue;\n\n    const badges: JSX.Element[] = [];\n\n    if (secondaryLocations.length > 0) {\n      badges.push(\n        <ConciseIssueLocationBadge\n          count={secondaryLocations.length}\n          key=\"-1\"\n          selected={!this.props.selectedFlowIndex}\n        />\n      );\n    }\n\n    flows.forEach((flow, index) => {\n      badges.push(\n        <ConciseIssueLocationBadge\n          count={flow.length}\n          key={index}\n          onClick={() => this.props.onFlowSelect(index)}\n          selected={index === this.props.selectedFlowIndex}\n        />\n      );\n    });\n\n    if (!this.state.collapsed || badges.length <= LIMIT) {\n      return badges;\n    }\n\n    return (\n      <>\n        {badges.slice(0, LIMIT - 1)}\n        {this.renderExpandButton()}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport LocationIndex from '../../../components/common/LocationIndex';\nimport LocationMessage from '../../../components/common/LocationMessage';\n\ninterface Props {\n  index: number;\n  message: string | undefined;\n  onClick: (index: number) => void;\n  scroll: (element: Element) => void;\n  selected: boolean;\n}\n\nexport default class ConciseIssueLocationsNavigatorLocation extends React.PureComponent<Props> {\n  node?: HTMLElement | null;\n\n  componentDidMount() {\n    if (this.props.selected && this.node) {\n      this.props.scroll(this.node);\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (this.props.selected && prevProps.selected !== this.props.selected && this.node) {\n      this.props.scroll(this.node);\n    }\n  }\n\n  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.props.onClick(this.props.index);\n  };\n\n  render() {\n    const { index, message, selected } = this.props;\n\n    return (\n      <div className=\"little-spacer-top\" ref={node => (this.node = node)}>\n        <a\n          className=\"concise-issue-locations-navigator-location\"\n          href=\"#\"\n          onClick={this.handleClick}>\n          <LocationIndex selected={selected}>{index + 1}</LocationIndex>\n          <LocationMessage selected={selected}>{message}</LocationMessage>\n        </a>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { collapsePath } from '../../../helpers/path';\nimport ConciseIssueLocationsNavigatorLocation from './ConciseIssueLocationsNavigatorLocation';\n\ninterface Props {\n  issue: Pick<T.Issue, 'key' | 'type'>;\n  locations: T.FlowLocation[];\n  onLocationSelect: (index: number) => void;\n  scroll: (element: Element) => void;\n  selectedLocationIndex: number | undefined;\n}\n\ninterface State {\n  collapsed: boolean;\n}\n\ninterface LocationGroup {\n  component: string | undefined;\n  componentName: string | undefined;\n  firstLocationIndex: number;\n  locations: T.FlowLocation[];\n}\n\nconst MAX_PATH_LENGTH = 15;\n\nexport default class CrossFileLocationsNavigator extends React.PureComponent<Props, State> {\n  state: State = { collapsed: true };\n\n  componentWillReceiveProps(nextProps: Props) {\n    if (nextProps.issue.key !== this.props.issue.key) {\n      this.setState({ collapsed: true });\n    }\n\n    // expand locations list as soon as a location in the middle of the list is selected\n    const { locations: nextLocations } = nextProps;\n    if (\n      nextProps.selectedLocationIndex &&\n      nextProps.selectedLocationIndex > 0 &&\n      nextLocations !== undefined &&\n      nextProps.selectedLocationIndex < nextLocations.length - 1\n    ) {\n      this.setState({ collapsed: false });\n    }\n  }\n\n  handleMoreLocationsClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.setState({ collapsed: false });\n  };\n\n  groupByFile = (locations: T.FlowLocation[]) => {\n    const groups: LocationGroup[] = [];\n\n    let currentLocations: T.FlowLocation[] = [];\n    let currentComponent: string | undefined;\n    let currentComponentName: string | undefined;\n    let currentFirstLocationIndex = 0;\n\n    for (let index = 0; index < locations.length; index++) {\n      const location = locations[index];\n      if (location.component === currentComponent) {\n        currentLocations.push(location);\n      } else {\n        if (currentLocations.length > 0) {\n          groups.push({\n            component: currentComponent,\n            componentName: currentComponentName,\n            firstLocationIndex: currentFirstLocationIndex,\n            locations: currentLocations\n          });\n        }\n        currentLocations = [location];\n        currentComponent = location.component;\n        currentComponentName = location.componentName;\n        currentFirstLocationIndex = index;\n      }\n    }\n\n    if (currentLocations.length > 0) {\n      groups.push({\n        component: currentComponent,\n        componentName: currentComponentName,\n        firstLocationIndex: currentFirstLocationIndex,\n        locations: currentLocations\n      });\n    }\n\n    return groups;\n  };\n\n  renderLocation = (index: number, message: string | undefined) => {\n    return (\n      <ConciseIssueLocationsNavigatorLocation\n        index={index}\n        key={index}\n        message={message}\n        onClick={this.props.onLocationSelect}\n        scroll={this.props.scroll}\n        selected={index === this.props.selectedLocationIndex}\n      />\n    );\n  };\n\n  renderGroup = (\n    group: LocationGroup,\n    groupIndex: number,\n    { onlyFirst = false, onlyLast = false } = {}\n  ) => {\n    const { firstLocationIndex } = group;\n    const lastLocationIndex = group.locations.length - 1;\n    return (\n      <div className=\"concise-issue-locations-navigator-file\" key={groupIndex}>\n        <div className=\"concise-issue-location-file\">\n          <i className=\"concise-issue-location-file-circle little-spacer-right\" />\n          {collapsePath(group.componentName || '', MAX_PATH_LENGTH)}\n        </div>\n        {group.locations.length > 0 && (\n          <div className=\"concise-issue-location-file-locations\">\n            {onlyFirst && this.renderLocation(firstLocationIndex, group.locations[0].msg)}\n\n            {onlyLast &&\n              this.renderLocation(\n                firstLocationIndex + lastLocationIndex,\n                group.locations[lastLocationIndex].msg\n              )}\n\n            {!onlyFirst &&\n              !onlyLast &&\n              group.locations.map((location, index) =>\n                this.renderLocation(firstLocationIndex + index, location.msg)\n              )}\n          </div>\n        )}\n      </div>\n    );\n  };\n\n  render() {\n    const { locations } = this.props;\n    const groups = this.groupByFile(locations);\n\n    if (locations.length > 2 && groups.length > 1 && this.state.collapsed) {\n      const firstGroup = groups[0];\n      const lastGroup = groups[groups.length - 1];\n      return (\n        <div className=\"concise-issue-locations-navigator spacer-top\">\n          {this.renderGroup(firstGroup, 0, { onlyFirst: true })}\n          <div className=\"concise-issue-locations-navigator-file\">\n            <div className=\"concise-issue-location-file\">\n              <i className=\"concise-issue-location-file-circle-multiple little-spacer-right\" />\n              <a\n                className=\"concise-issue-location-file-more\"\n                href=\"#\"\n                onClick={this.handleMoreLocationsClick}>\n                {translateWithParameters('issues.x_more_locations', locations.length - 2)}\n              </a>\n            </div>\n          </div>\n          {this.renderGroup(lastGroup, groups.length - 1, { onlyLast: true })}\n        </div>\n      );\n    } else {\n      return (\n        <div className=\"concise-issue-locations-navigator spacer-top\">\n          {groups.map((group, groupIndex) => this.renderGroup(group, groupIndex))}\n        </div>\n      );\n    }\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniq } from 'lodash';\nimport * as React from 'react';\nimport { getLocations } from '../utils';\nimport ConciseIssueLocationsNavigatorLocation from './ConciseIssueLocationsNavigatorLocation';\nimport CrossFileLocationsNavigator from './CrossFileLocationsNavigator';\n\ninterface Props {\n  issue: Pick<T.Issue, 'component' | 'key' | 'flows' | 'secondaryLocations' | 'type'>;\n  onLocationSelect: (index: number) => void;\n  scroll: (element: Element) => void;\n  selectedFlowIndex: number | undefined;\n  selectedLocationIndex: number | undefined;\n}\n\nexport default class ConciseIssueLocationsNavigator extends React.PureComponent<Props> {\n  render() {\n    const locations = getLocations(this.props.issue, this.props.selectedFlowIndex);\n\n    if (!locations || locations.length === 0 || locations.every(location => !location.msg)) {\n      return null;\n    }\n\n    const locationComponents = [\n      this.props.issue.component,\n      ...locations.map(location => location.component)\n    ];\n    const isCrossFile = uniq(locationComponents).length > 1;\n\n    if (isCrossFile) {\n      return (\n        <CrossFileLocationsNavigator\n          issue={this.props.issue}\n          locations={locations}\n          onLocationSelect={this.props.onLocationSelect}\n          scroll={this.props.scroll}\n          selectedLocationIndex={this.props.selectedLocationIndex}\n        />\n      );\n    } else {\n      return (\n        <div className=\"concise-issue-locations-navigator spacer-top\">\n          {locations.map((location, index) => (\n            <ConciseIssueLocationsNavigatorLocation\n              index={index}\n              key={index}\n              message={location.msg}\n              onClick={this.props.onLocationSelect}\n              scroll={this.props.scroll}\n              selected={index === this.props.selectedLocationIndex}\n            />\n          ))}\n        </div>\n      );\n    }\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport TypeHelper from '../../../components/shared/TypeHelper';\nimport ConciseIssueLocations from './ConciseIssueLocations';\nimport ConciseIssueLocationsNavigator from './ConciseIssueLocationsNavigator';\n\ninterface Props {\n  issue: T.Issue;\n  onClick: (issueKey: string) => void;\n  onFlowSelect: (index: number) => void;\n  onLocationSelect: (index: number) => void;\n  scroll: (element: Element, bottomOffset?: number) => void;\n  selected: boolean;\n  selectedFlowIndex: number | undefined;\n  selectedLocationIndex: number | undefined;\n}\n\nexport default class ConciseIssueBox extends React.PureComponent<Props> {\n  messageElement?: HTMLElement | null;\n  rootElement?: HTMLElement | null;\n\n  componentDidMount() {\n    if (this.props.selected) {\n      this.handleScroll();\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (this.props.selected && prevProps.selected !== this.props.selected) {\n      this.handleScroll();\n    }\n  }\n\n  handleClick = (event: React.MouseEvent<HTMLElement>) => {\n    event.preventDefault();\n    this.props.onClick(this.props.issue.key);\n  };\n\n  handleScroll = () => {\n    const { selectedFlowIndex } = this.props;\n    const { flows, secondaryLocations } = this.props.issue;\n\n    const locations = flows.length > 0 ? flows[selectedFlowIndex || 0] : secondaryLocations;\n\n    if (!locations || locations.length < 15) {\n      // if there are no locations, or there are just few\n      // then ensuse that the whole box is visible\n      if (this.rootElement) {\n        this.props.scroll(this.rootElement);\n      }\n    } else if (this.messageElement) {\n      // otherwise scroll until the the message element is located on top\n      this.props.scroll(this.messageElement, window.innerHeight - 250);\n    }\n  };\n\n  render() {\n    const { issue, selected } = this.props;\n\n    const clickAttributesMain = selected\n      ? {}\n      : { onClick: this.handleClick, role: 'listitem', tabIndex: 0 };\n\n    const clickAttributesTitle = selected\n      ? { onClick: this.handleClick, role: 'listitem', tabIndex: 0 }\n      : {};\n\n    return (\n      <div\n        className={classNames('concise-issue-box', 'clearfix', { selected })}\n        ref={node => (this.rootElement = node)}\n        {...clickAttributesMain}>\n        <div\n          className=\"concise-issue-box-message\"\n          {...clickAttributesTitle}\n          ref={node => (this.messageElement = node)}>\n          {issue.message}\n        </div>\n        <div className=\"concise-issue-box-attributes\">\n          <TypeHelper className=\"display-block little-spacer-right\" type={issue.type} />\n          <ConciseIssueLocations\n            issue={issue}\n            onFlowSelect={this.props.onFlowSelect}\n            selectedFlowIndex={this.props.selectedFlowIndex}\n          />\n        </div>\n        {selected && (\n          <ConciseIssueLocationsNavigator\n            issue={issue}\n            onLocationSelect={this.props.onLocationSelect}\n            scroll={this.props.scroll}\n            selectedFlowIndex={this.props.selectedFlowIndex}\n            selectedLocationIndex={this.props.selectedLocationIndex}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\ninterface Props {\n  path: string;\n}\n\nexport default function ConciseIssueComponent({ path }: Props) {\n  return (\n    <div className=\"concise-issue-component text-ellipsis note\" title={path}>\n      {path}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ConciseIssueBox from './ConciseIssueBox';\nimport ConciseIssueComponent from './ConciseIssueComponent';\n\ninterface Props {\n  issue: T.Issue;\n  onFlowSelect: (index: number) => void;\n  onLocationSelect: (index: number) => void;\n  onSelect: (issueKey: string) => void;\n  previousIssue: T.Issue | undefined;\n  scroll: (element: Element) => void;\n  selected: boolean;\n  selectedFlowIndex: number | undefined;\n  selectedLocationIndex: number | undefined;\n}\n\nexport default class ConciseIssue extends React.PureComponent<Props> {\n  render() {\n    const { issue, previousIssue, selected } = this.props;\n\n    const displayComponent = !previousIssue || previousIssue.component !== issue.component;\n\n    return (\n      <div>\n        {displayComponent && <ConciseIssueComponent path={issue.componentLongName} />}\n        <ConciseIssueBox\n          issue={issue}\n          onClick={this.props.onSelect}\n          onFlowSelect={this.props.onFlowSelect}\n          onLocationSelect={this.props.onLocationSelect}\n          scroll={this.props.scroll}\n          selected={selected}\n          selectedFlowIndex={selected ? this.props.selectedFlowIndex : undefined}\n          selectedLocationIndex={selected ? this.props.selectedLocationIndex : undefined}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport ConciseIssue from './ConciseIssue';\n\ninterface Props {\n  issues: T.Issue[];\n  onFlowSelect: (index: number) => void;\n  onIssueSelect: (issueKey: string) => void;\n  onLocationSelect: (index: number) => void;\n  selected: string | undefined;\n  selectedFlowIndex: number | undefined;\n  selectedLocationIndex: number | undefined;\n}\n\nexport default class ConciseIssuesList extends React.PureComponent<Props> {\n  handleScroll = (element: Element, bottomOffset = 100) => {\n    const scrollableElement = document.querySelector('.layout-page-side');\n    if (element && scrollableElement) {\n      scrollToElement(element, { topOffset: 150, bottomOffset, parent: scrollableElement });\n    }\n  };\n\n  render() {\n    return (\n      <div>\n        {this.props.issues.map((issue, index) => (\n          <ConciseIssue\n            issue={issue}\n            key={issue.key}\n            onFlowSelect={this.props.onFlowSelect}\n            onLocationSelect={this.props.onLocationSelect}\n            onSelect={this.props.onIssueSelect}\n            previousIssue={index > 0 ? this.props.issues[index - 1] : undefined}\n            scroll={this.handleScroll}\n            selected={issue.key === this.props.selected}\n            selectedFlowIndex={this.props.selectedFlowIndex}\n            selectedLocationIndex={this.props.selectedLocationIndex}\n          />\n        ))}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport { translate } from '../../helpers/l10n';\nimport Tooltip from './Tooltip';\n\ninterface Props {\n  className?: string;\n  disabled?: boolean;\n  onClick: () => void;\n  tooltip?: string;\n}\n\nexport default class BackButton extends React.PureComponent<Props> {\n  handleClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    if (!this.props.disabled) {\n      this.props.onClick();\n    }\n  };\n\n  renderIcon = () => (\n    <svg height=\"24\" viewBox=\"0 0 21 24\" width=\"21\">\n      <path\n        d=\"M3.845 12.9992l5.993 5.993.052.056c.049.061.093.122.129.191.082.159.121.339.111.518-.006.102-.028.203-.064.298-.149.39-.537.652-.954.644-.102-.002-.204-.019-.301-.052-.148-.05-.273-.135-.387-.241l-8.407-8.407 8.407-8.407.056-.052c.061-.048.121-.092.19-.128.116-.06.237-.091.366-.108.076-.004.075-.004.153-.003.155.015.3.052.437.129.088.051.169.115.239.19.246.266.33.656.214.999-.051.149-.135.273-.241.387l-5.983 5.984c5.287-.044 10.577-.206 15.859.013.073.009.091.009.163.027.187.047.359.15.49.292.075.081.136.175.18.276.044.101.072.209.081.319.032.391-.175.775-.521.962-.097.052-.202.089-.311.107-.073.012-.091.01-.165.013H3.845z\"\n        fill={this.props.disabled ? colors.disableGrayText : colors.secondFontColor}\n      />\n    </svg>\n  );\n\n  render() {\n    const { tooltip = translate('issues.return_to_list') } = this.props;\n    return (\n      <Tooltip overlay={tooltip}>\n        <a\n          className={classNames(\n            'link-no-underline',\n            { 'cursor-not-allowed': this.props.disabled },\n            this.props.className\n          )}\n          href=\"#\"\n          onClick={this.handleClick}>\n          {this.renderIcon()}\n        </a>\n      </Tooltip>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BackButton from '../../../components/controls/BackButton';\nimport PageShortcutsTooltip from '../../../components/ui/PageShortcutsTooltip';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface ConciseIssuesListHeaderProps {\n  displayBackButton: boolean;\n  loading: boolean;\n  onBackClick: () => void;\n}\n\nexport default function ConciseIssuesListHeader(props: ConciseIssuesListHeaderProps) {\n  const { displayBackButton, loading } = props;\n\n  return (\n    <header className=\"layout-page-header-panel concise-issues-list-header\">\n      <div className=\"layout-page-header-panel-inner concise-issues-list-header-inner display-flex-center display-flex-space-between\">\n        {displayBackButton && <BackButton disabled={loading} onClick={props.onBackClick} />}\n        <PageShortcutsTooltip\n          leftLabel={translate('issues.to_navigate_back')}\n          upAndDownLabel={translate('issues.to_select_issues')}\n          metaModifierLabel={translate('issues.to_navigate_issue_locations')}\n        />\n        {loading && <i className=\"spinner\" />}\n      </div>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit, sortBy, without } from 'lodash';\nimport * as React from 'react';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport Avatar from '../../../components/ui/Avatar';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { highlightTerm } from '../../../helpers/search';\nimport { isUserActive } from '../../../helpers/users';\nimport { Facet } from '../../../types/issues';\nimport { Query, searchAssignees } from '../utils';\n\ninterface Props {\n  assigned: boolean;\n  assignees: string[];\n  fetching: boolean;\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  query: Query;\n  stats: T.Dict<number> | undefined;\n  referencedUsers: T.Dict<T.UserBase>;\n}\n\nexport default class AssigneeFacet extends React.PureComponent<Props> {\n  handleSearch = (query: string, page?: number) => {\n    return searchAssignees(query, page);\n  };\n\n  handleItemClick = (itemValue: string, multiple: boolean) => {\n    const { assignees } = this.props;\n    if (itemValue === '') {\n      // unassigned\n      this.props.onChange({ assigned: !this.props.assigned, assignees: [] });\n    } else if (multiple) {\n      const newValue = sortBy(\n        assignees.includes(itemValue) ? without(assignees, itemValue) : [...assignees, itemValue]\n      );\n      this.props.onChange({ assigned: true, assignees: newValue });\n    } else {\n      this.props.onChange({\n        assigned: true,\n        assignees: assignees.includes(itemValue) && assignees.length < 2 ? [] : [itemValue]\n      });\n    }\n  };\n\n  handleClear = () => {\n    this.props.onChange({ assigned: true, assignees: [] });\n  };\n\n  getAssigneeName = (assignee: string) => {\n    if (assignee === '') {\n      return translate('unassigned');\n    } else {\n      const user = this.props.referencedUsers[assignee];\n      if (!user) {\n        return assignee;\n      }\n      return isUserActive(user) ? user.name : translateWithParameters('user.x_deleted', user.login);\n    }\n  };\n\n  loadSearchResultCount = (assignees: T.UserBase[]) => {\n    return this.props.loadSearchResultCount('assignees', {\n      assigned: undefined,\n      assignees: assignees.map(assignee => assignee.login)\n    });\n  };\n\n  getSortedItems = () => {\n    const { stats = {} } = this.props;\n    return sortBy(\n      Object.keys(stats),\n      // put \"not assigned\" first\n      key => (key === '' ? 0 : 1),\n      // the sort by number\n      key => -stats[key]\n    );\n  };\n\n  renderFacetItem = (assignee: string) => {\n    if (assignee === '') {\n      return translate('unassigned');\n    }\n\n    const user = this.props.referencedUsers[assignee];\n\n    if (!user) {\n      return assignee;\n    }\n\n    const userName = user.name || user.login;\n\n    return (\n      <>\n        <Avatar className=\"little-spacer-right\" hash={user.avatar} name={userName} size={16} />\n        {isUserActive(user) ? userName : translateWithParameters('user.x_deleted', userName)}\n      </>\n    );\n  };\n\n  renderSearchResult = (result: T.UserBase, query: string) => {\n    const displayName = isUserActive(result)\n      ? result.name\n      : translateWithParameters('user.x_deleted', result.login);\n    return (\n      <>\n        <Avatar\n          className=\"little-spacer-right\"\n          hash={result.avatar}\n          name={result.name || result.login}\n          size={16}\n        />\n        {highlightTerm(displayName, query)}\n      </>\n    );\n  };\n\n  render() {\n    const values = [...this.props.assignees];\n    if (!this.props.assigned) {\n      values.push('');\n    }\n\n    return (\n      <ListStyleFacet<T.UserBase>\n        facetHeader={translate('issues.facet.assignees')}\n        fetching={this.props.fetching}\n        getFacetItemText={this.getAssigneeName}\n        getSearchResultKey={user => user.login}\n        getSearchResultText={user => user.name || user.login}\n        // put \"not assigned\" item first\n        getSortedItems={this.getSortedItems}\n        loadSearchResultCount={this.loadSearchResultCount}\n        onChange={this.props.onChange}\n        onClear={this.handleClear}\n        onItemClick={this.handleItemClick}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"assignees\"\n        query={omit(this.props.query, 'assigned', 'assignees')}\n        renderFacetItem={this.renderFacetItem}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_users')}\n        stats={this.props.stats}\n        values={values}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit } from 'lodash';\nimport * as React from 'react';\nimport { searchIssueAuthors } from '../../../api/issues';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport { translate } from '../../../helpers/l10n';\nimport { highlightTerm } from '../../../helpers/search';\nimport { Facet } from '../../../types/issues';\nimport { Query } from '../utils';\n\ninterface Props {\n  component: T.Component | undefined;\n  fetching: boolean;\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  query: Query;\n  stats: T.Dict<number> | undefined;\n  author: string[];\n}\n\nconst SEARCH_SIZE = 100;\n\nexport default class AuthorFacet extends React.PureComponent<Props> {\n  identity = (author: string) => {\n    return author;\n  };\n\n  handleSearch = (query: string, _page: number) => {\n    const { component } = this.props;\n    const project =\n      component && ['TRK', 'VW', 'APP'].includes(component.qualifier) ? component.key : undefined;\n    return searchIssueAuthors({\n      project,\n      ps: SEARCH_SIZE, // maximum\n      q: query\n    }).then(authors => ({ maxResults: authors.length === SEARCH_SIZE, results: authors }));\n  };\n\n  loadSearchResultCount = (author: string[]) => {\n    return this.props.loadSearchResultCount('author', { author });\n  };\n\n  renderSearchResult = (author: string, term: string) => {\n    return highlightTerm(author, term);\n  };\n\n  render() {\n    return (\n      <ListStyleFacet<string>\n        facetHeader={translate('issues.facet.authors')}\n        fetching={this.props.fetching}\n        getFacetItemText={this.identity}\n        getSearchResultKey={this.identity}\n        getSearchResultText={this.identity}\n        loadSearchResultCount={this.loadSearchResultCount}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"author\"\n        query={omit(this.props.query, 'author')}\n        renderFacetItem={this.identity}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_authors')}\n        stats={this.props.stats}\n        values={this.props.author}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { max } from 'd3-array';\nimport { scaleBand, ScaleBand, scaleLinear, ScaleLinear } from 'd3-scale';\nimport * as React from 'react';\nimport Tooltip from '../controls/Tooltip';\nimport './BarChart.css';\n\ninterface DataPoint {\n  tooltip?: React.ReactNode;\n  x: number;\n  y: number;\n}\n\ninterface Props<T> {\n  barsWidth: number;\n  data: Array<DataPoint & T>;\n  height: number;\n  onBarClick?: (point: DataPoint & T) => void;\n  padding?: [number, number, number, number];\n  width: number;\n  xTicks?: string[];\n  xValues?: string[];\n}\n\nexport default class BarChart<T> extends React.PureComponent<Props<T>> {\n  handleClick = (point: DataPoint & T) => {\n    if (this.props.onBarClick) {\n      this.props.onBarClick(point);\n    }\n  };\n\n  renderXTicks = (xScale: ScaleBand<number>, yScale: ScaleLinear<number, number>) => {\n    const { data, xTicks = [] } = this.props;\n\n    if (!xTicks.length) {\n      return null;\n    }\n\n    const ticks = xTicks.map((tick, index) => {\n      const point = data[index];\n      const x = Math.round((xScale(point.x) as number) + xScale.bandwidth() / 2);\n      const y = yScale.range()[0];\n      const d = data[index];\n      const text = (\n        <text\n          className=\"bar-chart-tick\"\n          dy=\"1.5em\"\n          // eslint-disable-next-line react/no-array-index-key\n          key={index}\n          onClick={() => this.handleClick(point)}\n          style={{ cursor: this.props.onBarClick ? 'pointer' : 'default' }}\n          x={x}\n          y={y}>\n          {tick}\n        </text>\n      );\n      return (\n        // eslint-disable-next-line react/no-array-index-key\n        <Tooltip key={index} overlay={d.tooltip || undefined}>\n          {text}\n        </Tooltip>\n      );\n    });\n    return <g>{ticks}</g>;\n  };\n\n  renderXValues = (xScale: ScaleBand<number>, yScale: ScaleLinear<number, number>) => {\n    const { data, xValues = [] } = this.props;\n\n    if (!xValues.length) {\n      return null;\n    }\n\n    const ticks = xValues.map((value, index) => {\n      const point = data[index];\n      const x = Math.round((xScale(point.x) as number) + xScale.bandwidth() / 2);\n      const y = yScale(point.y);\n      const text = (\n        <text\n          className=\"bar-chart-tick\"\n          dy=\"-1em\"\n          // eslint-disable-next-line react/no-array-index-key\n          key={index}\n          onClick={() => this.handleClick(point)}\n          style={{ cursor: this.props.onBarClick ? 'pointer' : 'default' }}\n          x={x}\n          y={y}>\n          {value}\n        </text>\n      );\n      return (\n        // eslint-disable-next-line react/no-array-index-key\n        <Tooltip key={index} overlay={point.tooltip || undefined}>\n          {text}\n        </Tooltip>\n      );\n    });\n    return <g>{ticks}</g>;\n  };\n\n  renderBars = (xScale: ScaleBand<number>, yScale: ScaleLinear<number, number>) => {\n    const bars = this.props.data.map((point, index) => {\n      const x = Math.round(xScale(point.x) as number);\n      const maxY = yScale.range()[0];\n      const y = Math.round(yScale(point.y)) - /* minimum bar height */ 1;\n      const height = maxY - y;\n      const rect = (\n        <rect\n          className=\"bar-chart-bar\"\n          height={height}\n          // eslint-disable-next-line react/no-array-index-key\n          key={index}\n          onClick={() => this.handleClick(point)}\n          style={{ cursor: this.props.onBarClick ? 'pointer' : 'default' }}\n          width={this.props.barsWidth}\n          x={x}\n          y={y}\n        />\n      );\n      return (\n        // eslint-disable-next-line react/no-array-index-key\n        <Tooltip key={index} overlay={point.tooltip || undefined}>\n          {rect}\n        </Tooltip>\n      );\n    });\n    return <g>{bars}</g>;\n  };\n\n  render() {\n    const { barsWidth, data, width, height, padding = [10, 10, 10, 10] } = this.props;\n\n    const availableWidth = width - padding[1] - padding[3];\n    const availableHeight = height - padding[0] - padding[2];\n\n    const innerPadding = (availableWidth - barsWidth * data.length) / (data.length - 1);\n    const relativeInnerPadding = innerPadding / (innerPadding + barsWidth);\n\n    const maxY = max(data, d => d.y) as number;\n    const xScale = scaleBand<number>()\n      .domain(data.map(d => d.x))\n      .range([0, availableWidth])\n      .paddingInner(relativeInnerPadding);\n    const yScale = scaleLinear()\n      .domain([0, maxY])\n      .range([availableHeight, 0]);\n\n    return (\n      <svg className=\"bar-chart\" height={height} width={width}>\n        <g transform={`translate(${padding[3]}, ${padding[0]})`}>\n          {this.renderXTicks(xScale, yScale)}\n          {this.renderXValues(xScale, yScale)}\n          {this.renderBars(xScale, yScale)}\n        </g>\n      </svg>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isSameDay } from 'date-fns';\nimport { max } from 'lodash';\nimport * as React from 'react';\nimport { injectIntl, WrappedComponentProps } from 'react-intl';\nimport BarChart from '../../../components/charts/BarChart';\nimport DateRangeInput from '../../../components/controls/DateRangeInput';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport { longFormatterOption } from '../../../components/intl/DateFormatter';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport DateTimeFormatter, {\n  formatterOption as dateTimeFormatterOption\n} from '../../../components/intl/DateTimeFormatter';\nimport { parseDate } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { isPortfolioLike } from '../../../types/component';\nimport { Query } from '../utils';\n\ninterface Props {\n  component: T.Component | undefined;\n  createdAfter: Date | undefined;\n  createdAfterIncludesTime: boolean;\n  createdAt: string;\n  createdBefore: Date | undefined;\n  createdInLast: string;\n  fetching: boolean;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  sinceLeakPeriod: boolean;\n  stats: T.Dict<number> | undefined;\n}\n\nexport class CreationDateFacet extends React.PureComponent<Props & WrappedComponentProps> {\n  property = 'createdAt';\n\n  static defaultProps = {\n    open: true\n  };\n\n  hasValue = () =>\n    this.props.createdAfter !== undefined ||\n    this.props.createdAt.length > 0 ||\n    this.props.createdBefore !== undefined ||\n    this.props.createdInLast.length > 0 ||\n    this.props.sinceLeakPeriod;\n\n  handleHeaderClick = () => {\n    this.props.onToggle(this.property);\n  };\n\n  handleClear = () => {\n    this.resetTo({});\n  };\n\n  resetTo = (changes: Partial<Query>) => {\n    this.props.onChange({\n      createdAfter: undefined,\n      createdAt: undefined,\n      createdBefore: undefined,\n      createdInLast: undefined,\n      sinceLeakPeriod: undefined,\n      ...changes\n    });\n  };\n\n  handleBarClick = ({\n    createdAfter,\n    createdBefore\n  }: {\n    createdAfter: Date;\n    createdBefore?: Date;\n  }) => {\n    this.resetTo({ createdAfter, createdBefore });\n  };\n\n  handlePeriodChange = ({ from, to }: { from?: Date; to?: Date }) => {\n    this.resetTo({ createdAfter: from, createdBefore: to });\n  };\n\n  handlePeriodClick = (period: string) => this.resetTo({ createdInLast: period });\n\n  handleLeakPeriodClick = () => this.resetTo({ sinceLeakPeriod: true });\n\n  getValues() {\n    const {\n      createdAfter,\n      createdAfterIncludesTime,\n      createdAt,\n      createdBefore,\n      createdInLast,\n      sinceLeakPeriod\n    } = this.props;\n    const { formatDate } = this.props.intl;\n    const values = [];\n    if (createdAfter) {\n      values.push(\n        formatDate(\n          createdAfter,\n          createdAfterIncludesTime ? dateTimeFormatterOption : longFormatterOption\n        )\n      );\n    }\n    if (createdAt) {\n      values.push(formatDate(createdAt, longFormatterOption));\n    }\n    if (createdBefore) {\n      values.push(formatDate(createdBefore, longFormatterOption));\n    }\n    if (createdInLast === '1w') {\n      values.push(translate('issues.facet.createdAt.last_week'));\n    }\n    if (createdInLast === '1m') {\n      values.push(translate('issues.facet.createdAt.last_month'));\n    }\n    if (createdInLast === '1y') {\n      values.push(translate('issues.facet.createdAt.last_year'));\n    }\n    if (sinceLeakPeriod) {\n      values.push(translate('issues.new_code'));\n    }\n    return values;\n  }\n\n  renderBarChart() {\n    const { createdBefore, stats } = this.props;\n\n    if (!stats) {\n      return null;\n    }\n\n    const periods = Object.keys(stats);\n\n    if (periods.length < 2 || periods.every(period => !stats[period])) {\n      return null;\n    }\n\n    const { formatDate } = this.props.intl;\n    const data = periods.map((start, index) => {\n      const startDate = parseDate(start);\n      let endDate;\n      if (index < periods.length - 1) {\n        endDate = parseDate(periods[index + 1]);\n        endDate.setDate(endDate.getDate() - 1);\n      } else {\n        endDate = createdBefore ? parseDate(createdBefore) : undefined;\n      }\n\n      const tooltipEndDate = endDate || new Date();\n      const tooltip = (\n        // eslint-disable-next-line react/jsx-fragments\n        <React.Fragment>\n          {formatMeasure(stats[start], 'SHORT_INT')}\n          <br />\n          {formatDate(startDate, longFormatterOption)}\n          {!isSameDay(tooltipEndDate, startDate) &&\n            ` - ${formatDate(tooltipEndDate, longFormatterOption)}`}\n        </React.Fragment>\n      );\n\n      return {\n        createdAfter: startDate,\n        createdBefore: endDate,\n        tooltip,\n        x: index,\n        y: stats[start]\n      };\n    });\n\n    const barsWidth = Math.floor(250 / data.length);\n    const width = barsWidth * data.length - 1 + 10;\n\n    const maxValue = max(data.map(d => d.y));\n    const xValues = data.map(d => (d.y === maxValue ? formatMeasure(maxValue, 'SHORT_INT') : ''));\n\n    return (\n      <BarChart\n        barsWidth={barsWidth - 1}\n        data={data}\n        height={75}\n        onBarClick={this.handleBarClick}\n        padding={[25, 0, 5, 10]}\n        width={width}\n        xValues={xValues}\n      />\n    );\n  }\n\n  renderPeriodSelectors() {\n    const { createdAfter, createdBefore } = this.props;\n    return (\n      <div className=\"search-navigator-date-facet-selection\">\n        <DateRangeInput\n          onChange={this.handlePeriodChange}\n          value={{ from: createdAfter, to: createdBefore }}\n        />\n      </div>\n    );\n  }\n\n  renderPredefinedPeriods() {\n    const { component, createdInLast, sinceLeakPeriod } = this.props;\n    return (\n      <div className=\"spacer-top issues-predefined-periods\">\n        <FacetItem\n          active={!this.hasValue()}\n          name={translate('issues.facet.createdAt.all')}\n          onClick={this.handlePeriodClick}\n          tooltip={translate('issues.facet.createdAt.all')}\n          value=\"\"\n        />\n        {component && !isPortfolioLike(component.qualifier) ? (\n          <FacetItem\n            active={sinceLeakPeriod}\n            name={translate('issues.new_code')}\n            onClick={this.handleLeakPeriodClick}\n            tooltip={translate('issues.new_code_period')}\n            value=\"\"\n          />\n        ) : (\n          <>\n            <FacetItem\n              active={createdInLast === '1w'}\n              name={translate('issues.facet.createdAt.last_week')}\n              onClick={this.handlePeriodClick}\n              tooltip={translate('issues.facet.createdAt.last_week')}\n              value=\"1w\"\n            />\n            <FacetItem\n              active={createdInLast === '1m'}\n              name={translate('issues.facet.createdAt.last_month')}\n              onClick={this.handlePeriodClick}\n              tooltip={translate('issues.facet.createdAt.last_month')}\n              value=\"1m\"\n            />\n            <FacetItem\n              active={createdInLast === '1y'}\n              name={translate('issues.facet.createdAt.last_year')}\n              onClick={this.handlePeriodClick}\n              tooltip={translate('issues.facet.createdAt.last_year')}\n              value=\"1y\"\n            />\n          </>\n        )}\n      </div>\n    );\n  }\n\n  renderInner() {\n    const { createdAfter, createdAfterIncludesTime, createdAt } = this.props;\n\n    if (createdAt) {\n      return (\n        <div className=\"search-navigator-facet-container\">\n          <DateTimeFormatter date={this.props.createdAt} />\n          <br />\n          <span className=\"note\">\n            <DateFromNow date={this.props.createdAt} />\n          </span>\n        </div>\n      );\n    }\n\n    if (createdAfter && createdAfterIncludesTime) {\n      return (\n        <div className=\"search-navigator-facet-container\">\n          <strong>{translate('after')} </strong>\n          <DateTimeFormatter date={createdAfter} />\n        </div>\n      );\n    }\n\n    return (\n      <div>\n        {this.renderBarChart()}\n        {this.renderPeriodSelectors()}\n        {this.renderPredefinedPeriods()}\n      </div>\n    );\n  }\n\n  render() {\n    return (\n      <FacetBox property={this.property}>\n        <FacetHeader\n          fetching={this.props.fetching}\n          name={translate('issues.facet', this.property)}\n          onClear={this.handleClear}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={this.getValues()}\n        />\n\n        {this.props.open && this.renderInner()}\n      </FacetBox>\n    );\n  }\n}\n\nexport default injectIntl(CreationDateFacet);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit } from 'lodash';\nimport * as React from 'react';\nimport { getDirectories } from '../../../api/components';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { collapsePath } from '../../../helpers/path';\nimport { highlightTerm } from '../../../helpers/search';\nimport { BranchLike } from '../../../types/branch-like';\nimport { TreeComponentWithPath } from '../../../types/component';\nimport { Facet } from '../../../types/issues';\nimport { Query } from '../utils';\n\ninterface Props {\n  branchLike?: BranchLike;\n  componentKey: string;\n  directories: string[];\n  fetching: boolean;\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  query: Query;\n  stats: Facet | undefined;\n}\n\nexport default class DirectoryFacet extends React.PureComponent<Props> {\n  getFacetItemText = (path: string) => {\n    return path;\n  };\n\n  getSearchResultKey = (directory: TreeComponentWithPath) => {\n    return directory.path;\n  };\n\n  getSearchResultText = (directory: TreeComponentWithPath) => {\n    return directory.path;\n  };\n\n  handleSearch = (query: string, page: number) => {\n    const { branchLike } = this.props;\n\n    return getDirectories({\n      component: this.props.componentKey,\n      ...getBranchLikeQuery(branchLike),\n      q: query,\n      p: page,\n      ps: 30\n    }).then(({ components, paging }) => ({\n      paging,\n      results: components.filter(dir => dir.path !== undefined)\n    }));\n  };\n\n  loadSearchResultCount = (directories: TreeComponentWithPath[]) => {\n    return this.props.loadSearchResultCount('directories', {\n      directories: directories.map(directory => directory.path)\n    });\n  };\n\n  renderDirectory = (directory: React.ReactNode) => (\n    <>\n      <QualifierIcon className=\"little-spacer-right\" qualifier=\"DIR\" />\n      {directory}\n    </>\n  );\n\n  renderFacetItem = (path: string) => {\n    return this.renderDirectory(collapsePath(path, 15));\n  };\n\n  renderSearchResult = (directory: TreeComponentWithPath, term: string) => {\n    return this.renderDirectory(highlightTerm(collapsePath(directory.path, 15), term));\n  };\n\n  render() {\n    return (\n      <ListStyleFacet<TreeComponentWithPath>\n        facetHeader={translate('issues.facet.directories')}\n        fetching={this.props.fetching}\n        getFacetItemText={this.getFacetItemText}\n        getSearchResultKey={this.getSearchResultKey}\n        getSearchResultText={this.getSearchResultText}\n        loadSearchResultCount={this.loadSearchResultCount}\n        minSearchLength={3}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"directories\"\n        query={omit(this.props.query, 'directories')}\n        renderFacetItem={this.renderFacetItem}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_directories')}\n        stats={this.props.stats}\n        values={this.props.directories}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit } from 'lodash';\nimport * as React from 'react';\nimport { getFiles } from '../../../api/components';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { collapsePath, splitPath } from '../../../helpers/path';\nimport { highlightTerm } from '../../../helpers/search';\nimport { isDefined } from '../../../helpers/types';\nimport { BranchLike } from '../../../types/branch-like';\nimport { TreeComponentWithPath } from '../../../types/component';\nimport { Facet } from '../../../types/issues';\nimport { Query } from '../utils';\n\ninterface Props {\n  branchLike?: BranchLike;\n  componentKey: string;\n  fetching: boolean;\n  files: string[];\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  query: Query;\n  stats: Facet | undefined;\n}\n\nconst MAX_PATH_LENGTH = 15;\nexport default class FileFacet extends React.PureComponent<Props> {\n  getFacetItemText = (path: string) => {\n    return path;\n  };\n\n  getSearchResultKey = (file: TreeComponentWithPath) => {\n    return file.path;\n  };\n\n  getSearchResultText = (file: TreeComponentWithPath) => {\n    return file.path;\n  };\n\n  handleSearch = (query: string, page: number) => {\n    const { branchLike } = this.props;\n\n    return getFiles({\n      component: this.props.componentKey,\n      ...getBranchLikeQuery(branchLike),\n      q: query,\n      p: page,\n      ps: 30\n    }).then(({ components, paging }) => ({\n      paging,\n      results: components.filter(file => file.path !== undefined)\n    }));\n  };\n\n  loadSearchResultCount = (files: TreeComponentWithPath[]) => {\n    return this.props.loadSearchResultCount('files', {\n      files: files\n        .map(file => {\n          return file.path;\n        })\n        .filter(isDefined)\n    });\n  };\n\n  renderFile = (file: React.ReactNode) => (\n    <>\n      <QualifierIcon className=\"little-spacer-right\" qualifier=\"FIL\" />\n      {file}\n    </>\n  );\n\n  renderFacetItem = (path: string) => {\n    return this.renderFile(path);\n  };\n\n  renderSearchResult = (file: TreeComponentWithPath, term: string) => {\n    const { head, tail } = splitPath(collapsePath(file.path, MAX_PATH_LENGTH));\n\n    return this.renderFile(\n      <>\n        {head}/{highlightTerm(tail, term)}\n      </>\n    );\n  };\n\n  render() {\n    return (\n      <ListStyleFacet<TreeComponentWithPath>\n        facetHeader={translate('issues.facet.files')}\n        fetching={this.props.fetching}\n        getFacetItemText={this.getFacetItemText}\n        getSearchResultKey={this.getSearchResultKey}\n        getSearchResultText={this.getSearchResultText}\n        loadSearchResultCount={this.loadSearchResultCount}\n        minSearchLength={3}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"files\"\n        query={omit(this.props.query, 'files')}\n        renderFacetItem={this.renderFacetItem}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_files')}\n        stats={this.props.stats}\n        values={this.props.files}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit, uniqBy } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport { translate } from '../../../helpers/l10n';\nimport { highlightTerm } from '../../../helpers/search';\nimport { getLanguages, Store } from '../../../store/rootReducer';\nimport { Facet, ReferencedLanguage } from '../../../types/issues';\nimport { Query } from '../utils';\n\ninterface InstalledLanguage {\n  key: string;\n  name: string;\n}\n\ninterface Props {\n  fetching: boolean;\n  installedLanguages: InstalledLanguage[];\n  languages: string[];\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  query: Query;\n  referencedLanguages: T.Dict<ReferencedLanguage>;\n  stats: T.Dict<number> | undefined;\n}\n\nclass LanguageFacet extends React.PureComponent<Props> {\n  getLanguageName = (language: string) => {\n    const { referencedLanguages } = this.props;\n    return referencedLanguages[language] ? referencedLanguages[language].name : language;\n  };\n\n  handleSearch = (query: string) => {\n    const options = this.getAllPossibleOptions();\n    const results = options.filter(language =>\n      language.name.toLowerCase().includes(query.toLowerCase())\n    );\n    const paging = { pageIndex: 1, pageSize: results.length, total: results.length };\n    return Promise.resolve({ paging, results });\n  };\n\n  getAllPossibleOptions = () => {\n    const { installedLanguages, stats = {} } = this.props;\n\n    // add any language that presents in the facet, but might not be installed\n    // for such language we don't know their display name, so let's just use their key\n    // and make sure we reference each language only once\n    return uniqBy(\n      [...installedLanguages, ...Object.keys(stats).map(key => ({ key, name: key }))],\n      language => language.key\n    );\n  };\n\n  loadSearchResultCount = (languages: InstalledLanguage[]) => {\n    return this.props.loadSearchResultCount('languages', {\n      languages: languages.map(language => language.key)\n    });\n  };\n\n  renderSearchResult = ({ name }: InstalledLanguage, term: string) => {\n    return highlightTerm(name, term);\n  };\n\n  render() {\n    return (\n      <ListStyleFacet<InstalledLanguage>\n        facetHeader={translate('issues.facet.languages')}\n        fetching={this.props.fetching}\n        getFacetItemText={this.getLanguageName}\n        getSearchResultKey={language => language.key}\n        getSearchResultText={language => language.name}\n        loadSearchResultCount={this.loadSearchResultCount}\n        minSearchLength={1}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"languages\"\n        query={omit(this.props.query, 'languages')}\n        renderFacetItem={this.getLanguageName}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_languages')}\n        stats={this.props.stats}\n        values={this.props.languages}\n      />\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({\n  installedLanguages: Object.values(getLanguages(state))\n});\n\nexport default connect(mapStateToProps)(LanguageFacet);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit } from 'lodash';\nimport * as React from 'react';\nimport { getTree, searchProjects } from '../../../api/components';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { highlightTerm } from '../../../helpers/search';\nimport { ComponentQualifier } from '../../../types/component';\nimport { Facet, ReferencedComponent } from '../../../types/issues';\nimport { Query } from '../utils';\n\ninterface Props {\n  component: T.Component | undefined;\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  fetching: boolean;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  projects: string[];\n  query: Query;\n  referencedComponents: T.Dict<ReferencedComponent>;\n  stats: T.Dict<number> | undefined;\n}\n\ninterface SearchedProject {\n  key: string;\n  name: string;\n}\n\nexport default class ProjectFacet extends React.PureComponent<Props> {\n  handleSearch = (\n    query: string,\n    page = 1\n  ): Promise<{ results: SearchedProject[]; paging: T.Paging }> => {\n    const { component } = this.props;\n    if (\n      component &&\n      [\n        ComponentQualifier.Portfolio,\n        ComponentQualifier.SubPortfolio,\n        ComponentQualifier.Application\n      ].includes(component.qualifier as ComponentQualifier)\n    ) {\n      return getTree({\n        component: component.key,\n        p: page,\n        ps: 30,\n        q: query,\n        qualifiers: ComponentQualifier.Project\n      }).then(({ components, paging }) => ({\n        paging,\n        results: components.map(component => ({\n          key: component.refKey || component.key,\n          name: component.name\n        }))\n      }));\n    }\n\n    return searchProjects({\n      p: page,\n      ps: 30,\n      filter: query ? `query = \"${query}\"` : ''\n    }).then(({ components, paging }) => ({\n      paging,\n      results: components.map(component => ({\n        key: component.key,\n        name: component.name\n      }))\n    }));\n  };\n\n  getProjectName = (project: string) => {\n    const { referencedComponents } = this.props;\n    return referencedComponents[project] ? referencedComponents[project].name : project;\n  };\n\n  loadSearchResultCount = (projects: SearchedProject[]) => {\n    return this.props.loadSearchResultCount('projects', {\n      projects: projects.map(project => project.key)\n    });\n  };\n\n  renderFacetItem = (projectKey: string) => {\n    return (\n      <span>\n        <QualifierIcon className=\"little-spacer-right\" qualifier={ComponentQualifier.Project} />\n        {this.getProjectName(projectKey)}\n      </span>\n    );\n  };\n\n  renderSearchResult = (project: Pick<SearchedProject, 'name'>, term: string) => (\n    <>\n      <QualifierIcon className=\"little-spacer-right\" qualifier={ComponentQualifier.Project} />\n      {highlightTerm(project.name, term)}\n    </>\n  );\n\n  render() {\n    return (\n      <ListStyleFacet<SearchedProject>\n        facetHeader={translate('issues.facet.projects')}\n        fetching={this.props.fetching}\n        getFacetItemText={this.getProjectName}\n        getSearchResultKey={project => project.key}\n        getSearchResultText={project => project.name}\n        loadSearchResultCount={this.loadSearchResultCount}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"projects\"\n        query={omit(this.props.query, 'projects')}\n        renderFacetItem={this.renderFacetItem}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_projects')}\n        stats={this.props.stats}\n        values={this.props.projects}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { orderBy, without } from 'lodash';\nimport * as React from 'react';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint';\nimport { translate } from '../../../helpers/l10n';\nimport { formatFacetStat, Query } from '../utils';\n\ninterface Props {\n  fetching: boolean;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  resolved: boolean;\n  resolutions: string[];\n  stats: T.Dict<number> | undefined;\n}\n\nconst RESOLUTIONS = ['', 'FALSE-POSITIVE', 'FIXED', 'REMOVED', 'WONTFIX'];\n\nexport default class ResolutionFacet extends React.PureComponent<Props> {\n  property = 'resolutions';\n\n  static defaultProps = {\n    open: true\n  };\n\n  handleItemClick = (itemValue: string, multiple: boolean) => {\n    const { resolutions } = this.props;\n    if (itemValue === '') {\n      // unresolved\n      this.props.onChange({ resolved: !this.props.resolved, resolutions: [] });\n    } else if (multiple) {\n      const newValue = orderBy(\n        resolutions.includes(itemValue)\n          ? without(resolutions, itemValue)\n          : [...resolutions, itemValue]\n      );\n      this.props.onChange({ resolved: true, [this.property]: newValue });\n    } else {\n      this.props.onChange({\n        resolved: true,\n        [this.property]:\n          resolutions.includes(itemValue) && resolutions.length < 2 ? [] : [itemValue]\n      });\n    }\n  };\n\n  handleHeaderClick = () => {\n    this.props.onToggle(this.property);\n  };\n\n  handleClear = () => {\n    this.props.onChange({ resolved: false, resolutions: [] });\n  };\n\n  isFacetItemActive(resolution: string) {\n    return resolution === '' ? !this.props.resolved : this.props.resolutions.includes(resolution);\n  }\n\n  getFacetItemName(resolution: string) {\n    return resolution === '' ? translate('unresolved') : translate('issue.resolution', resolution);\n  }\n\n  getStat(resolution: string) {\n    const { stats } = this.props;\n    return stats ? stats[resolution] : undefined;\n  }\n\n  renderItem = (resolution: string) => {\n    const active = this.isFacetItemActive(resolution);\n    const stat = this.getStat(resolution);\n\n    return (\n      <FacetItem\n        active={active}\n        halfWidth={true}\n        key={resolution}\n        name={this.getFacetItemName(resolution)}\n        onClick={this.handleItemClick}\n        stat={formatFacetStat(stat)}\n        tooltip={this.getFacetItemName(resolution)}\n        value={resolution}\n      />\n    );\n  };\n\n  render() {\n    const { resolutions, stats = {} } = this.props;\n    const values = resolutions.map(resolution => this.getFacetItemName(resolution));\n\n    return (\n      <FacetBox property={this.property}>\n        <FacetHeader\n          fetching={this.props.fetching}\n          name={translate('issues.facet', this.property)}\n          onClear={this.handleClear}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={values}\n        />\n\n        {this.props.open && (\n          <>\n            <FacetItemsList>{RESOLUTIONS.map(this.renderItem)}</FacetItemsList>\n            <MultipleSelectionHint\n              options={Object.keys(stats).length}\n              values={resolutions.length}\n            />\n          </>\n        )}\n      </FacetBox>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit } from 'lodash';\nimport * as React from 'react';\nimport { searchRules } from '../../../api/rules';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet, ReferencedRule } from '../../../types/issues';\nimport { Query } from '../utils';\n\ninterface Props {\n  fetching: boolean;\n  languages: string[];\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  query: Query;\n  referencedRules: T.Dict<ReferencedRule>;\n  rules: string[];\n  stats: T.Dict<number> | undefined;\n}\n\nexport default class RuleFacet extends React.PureComponent<Props> {\n  handleSearch = (query: string, page = 1) => {\n    const { languages } = this.props;\n    return searchRules({\n      f: 'name,langName',\n      languages: languages.length ? languages.join() : undefined,\n      q: query,\n      p: page,\n      ps: 30,\n      s: 'name',\n      include_external: true\n    }).then(response => ({\n      paging: { pageIndex: response.p, pageSize: response.ps, total: response.total },\n      results: response.rules\n    }));\n  };\n\n  loadSearchResultCount = (rules: T.Rule[]) => {\n    return this.props.loadSearchResultCount('rules', { rules: rules.map(rule => rule.key) });\n  };\n\n  getRuleName = (ruleKey: string) => {\n    const rule = this.props.referencedRules[ruleKey];\n    return rule ? this.formatRuleName(rule.name, rule.langName) : ruleKey;\n  };\n\n  formatRuleName = (name: string, langName: string | undefined) => {\n    // external rules don't have a language associated\n    // see https://jira.sonarsource.com/browse/MMF-1407\n    return langName ? `(${langName}) ${name}` : name;\n  };\n\n  renderSearchResult = (rule: T.Rule) => {\n    return this.formatRuleName(rule.name, rule.langName);\n  };\n\n  render() {\n    return (\n      <ListStyleFacet<T.Rule>\n        facetHeader={translate('issues.facet.rules')}\n        fetching={this.props.fetching}\n        getFacetItemText={this.getRuleName}\n        getSearchResultKey={rule => rule.key}\n        getSearchResultText={rule => rule.name}\n        loadSearchResultCount={this.loadSearchResultCount}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"rules\"\n        query={omit(this.props.query, 'rules')}\n        renderFacetItem={this.getRuleName}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_rules')}\n        stats={this.props.stats}\n        values={this.props.rules}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { without } from 'lodash';\nimport * as React from 'react';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { SOURCE_SCOPES } from '../../../helpers/constants';\nimport { translate } from '../../../helpers/l10n';\nimport { formatFacetStat, Query } from '../utils';\n\nexport interface ScopeFacetProps {\n  fetching: boolean;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  scopes: string[];\n  stats: T.Dict<number> | undefined;\n}\n\nexport default function ScopeFacet(props: ScopeFacetProps) {\n  const { fetching, open, scopes = [], stats = {} } = props;\n  const values = scopes.map(scope => translate('issue.scope', scope));\n\n  return (\n    <FacetBox property=\"scopes\">\n      <FacetHeader\n        fetching={fetching}\n        name={translate('issues.facet.scopes')}\n        onClear={() => props.onChange({ scopes: [] })}\n        onClick={() => props.onToggle('scopes')}\n        open={open}\n        values={values}\n      />\n\n      {open && (\n        <>\n          <FacetItemsList>\n            {SOURCE_SCOPES.map(({ scope, qualifier }) => {\n              const active = scopes.includes(scope);\n              const stat = stats[scope];\n\n              return (\n                <FacetItem\n                  active={active}\n                  key={scope}\n                  name={\n                    <span className=\"display-flex-center\">\n                      <QualifierIcon className=\"little-spacer-right\" qualifier={qualifier} />{' '}\n                      {translate('issue.scope', scope)}\n                    </span>\n                  }\n                  onClick={(itemValue: string, multiple: boolean) => {\n                    if (multiple) {\n                      props.onChange({\n                        scopes: active ? without(scopes, itemValue) : [...scopes, itemValue]\n                      });\n                    } else {\n                      props.onChange({\n                        scopes: active && scopes.length === 1 ? [] : [itemValue]\n                      });\n                    }\n                  }}\n                  stat={formatFacetStat(stat)}\n                  value={scope}\n                />\n              );\n            })}\n          </FacetItemsList>\n          <MultipleSelectionHint options={Object.keys(stats).length} values={scopes.length} />\n        </>\n      )}\n    </FacetBox>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { orderBy, without } from 'lodash';\nimport * as React from 'react';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport { translate } from '../../../helpers/l10n';\nimport { formatFacetStat, Query } from '../utils';\n\ninterface Props {\n  fetching: boolean;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  severities: string[];\n  stats: T.Dict<number> | undefined;\n}\n\nconst SEVERITIES = ['BLOCKER', 'MINOR', 'CRITICAL', 'INFO', 'MAJOR'];\n\nexport default class SeverityFacet extends React.PureComponent<Props> {\n  property = 'severities';\n\n  static defaultProps = {\n    open: true\n  };\n\n  handleItemClick = (itemValue: string, multiple: boolean) => {\n    const { severities } = this.props;\n    if (multiple) {\n      const newValue = orderBy(\n        severities.includes(itemValue) ? without(severities, itemValue) : [...severities, itemValue]\n      );\n      this.props.onChange({ [this.property]: newValue });\n    } else {\n      this.props.onChange({\n        [this.property]: severities.includes(itemValue) && severities.length < 2 ? [] : [itemValue]\n      });\n    }\n  };\n\n  handleHeaderClick = () => {\n    this.props.onToggle(this.property);\n  };\n\n  handleClear = () => {\n    this.props.onChange({ [this.property]: [] });\n  };\n\n  getStat(severity: string) {\n    const { stats } = this.props;\n    return stats ? stats[severity] : undefined;\n  }\n\n  renderItem = (severity: string) => {\n    const active = this.props.severities.includes(severity);\n    const stat = this.getStat(severity);\n\n    return (\n      <FacetItem\n        active={active}\n        halfWidth={true}\n        key={severity}\n        name={<SeverityHelper severity={severity} />}\n        onClick={this.handleItemClick}\n        stat={formatFacetStat(stat)}\n        tooltip={translate('severity', severity)}\n        value={severity}\n      />\n    );\n  };\n\n  render() {\n    const { severities, stats = {} } = this.props;\n    const values = severities.map(severity => translate('severity', severity));\n\n    return (\n      <FacetBox property={this.property}>\n        <FacetHeader\n          fetching={this.props.fetching}\n          name={translate('issues.facet', this.property)}\n          onClear={this.handleClear}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={values}\n        />\n\n        {this.props.open && (\n          <>\n            <FacetItemsList>{SEVERITIES.map(this.renderItem)}</FacetItemsList>\n            <MultipleSelectionHint options={Object.keys(stats).length} values={severities.length} />\n          </>\n        )}\n      </FacetBox>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { orderBy, without } from 'lodash';\nimport * as React from 'react';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint';\nimport StatusHelper from '../../../components/shared/StatusHelper';\nimport { translate } from '../../../helpers/l10n';\nimport { formatFacetStat, Query } from '../utils';\n\ninterface Props {\n  fetching: boolean;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  stats: T.Dict<number> | undefined;\n  statuses: string[];\n}\n\nconst STATUSES = ['OPEN', 'CONFIRMED', 'REOPENED', 'RESOLVED', 'CLOSED'];\n\nexport default class StatusFacet extends React.PureComponent<Props> {\n  property = 'statuses';\n\n  static defaultProps = { open: true };\n\n  handleItemClick = (itemValue: string, multiple: boolean) => {\n    const { statuses } = this.props;\n    if (multiple) {\n      const newValue = orderBy(\n        statuses.includes(itemValue) ? without(statuses, itemValue) : [...statuses, itemValue]\n      );\n      this.props.onChange({ [this.property]: newValue });\n    } else {\n      this.props.onChange({\n        [this.property]: statuses.includes(itemValue) && statuses.length < 2 ? [] : [itemValue]\n      });\n    }\n  };\n\n  handleHeaderClick = () => {\n    this.props.onToggle(this.property);\n  };\n\n  handleClear = () => {\n    this.props.onChange({ [this.property]: [] });\n  };\n\n  getStat(status: string) {\n    const { stats } = this.props;\n    return stats ? stats[status] : undefined;\n  }\n\n  renderItem = (status: string) => {\n    const active = this.props.statuses.includes(status);\n    const stat = this.getStat(status);\n\n    return (\n      <FacetItem\n        active={active}\n        halfWidth={true}\n        key={status}\n        name={<StatusHelper resolution={undefined} status={status} />}\n        onClick={this.handleItemClick}\n        stat={formatFacetStat(stat)}\n        tooltip={translate('issue.status', status)}\n        value={status}\n      />\n    );\n  };\n\n  render() {\n    const { statuses, stats = {} } = this.props;\n    const values = statuses.map(status => translate('issue.status', status));\n\n    return (\n      <FacetBox property={this.property}>\n        <FacetHeader\n          fetching={this.props.fetching}\n          name={translate('issues.facet', this.property)}\n          onClear={this.handleClear}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={values}\n        />\n\n        {this.props.open && (\n          <>\n            <FacetItemsList>{STATUSES.map(this.renderItem)}</FacetItemsList>\n            <MultipleSelectionHint options={Object.keys(stats).length} values={statuses.length} />\n          </>\n        )}\n      </FacetBox>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit } from 'lodash';\nimport * as React from 'react';\nimport { searchIssueTags } from '../../../api/issues';\nimport { colors } from '../../../app/theme';\nimport ListStyleFacet from '../../../components/facet/ListStyleFacet';\nimport TagsIcon from '../../../components/icons/TagsIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { highlightTerm } from '../../../helpers/search';\nimport { Facet } from '../../../types/issues';\nimport { Query } from '../utils';\n\ninterface Props {\n  component: T.Component | undefined;\n  branch?: string;\n  fetching: boolean;\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  query: Query;\n  stats: T.Dict<number> | undefined;\n  tags: string[];\n}\n\nconst SEARCH_SIZE = 100;\n\nexport default class TagFacet extends React.PureComponent<Props> {\n  handleSearch = (query: string) => {\n    const { component, branch } = this.props;\n    const project =\n      component && ['TRK', 'VW', 'APP'].includes(component.qualifier) ? component.key : undefined;\n    return searchIssueTags({\n      project,\n      branch,\n      ps: SEARCH_SIZE,\n      q: query\n    }).then(tags => ({ maxResults: tags.length === SEARCH_SIZE, results: tags }));\n  };\n\n  getTagName = (tag: string) => {\n    return tag;\n  };\n\n  loadSearchResultCount = (tags: string[]) => {\n    return this.props.loadSearchResultCount('tags', { tags });\n  };\n\n  renderTag = (tag: string) => {\n    return (\n      <>\n        <TagsIcon className=\"little-spacer-right\" fill={colors.gray60} />\n        {tag}\n      </>\n    );\n  };\n\n  renderSearchResult = (tag: string, term: string) => (\n    <>\n      <TagsIcon className=\"little-spacer-right\" fill={colors.gray60} />\n      {highlightTerm(tag, term)}\n    </>\n  );\n\n  render() {\n    return (\n      <ListStyleFacet<string>\n        facetHeader={translate('issues.facet.tags')}\n        fetching={this.props.fetching}\n        getFacetItemText={this.getTagName}\n        getSearchResultKey={tag => tag}\n        getSearchResultText={tag => tag}\n        loadSearchResultCount={this.loadSearchResultCount}\n        onChange={this.props.onChange}\n        onSearch={this.handleSearch}\n        onToggle={this.props.onToggle}\n        open={this.props.open}\n        property=\"tags\"\n        query={omit(this.props.query, 'tags')}\n        renderFacetItem={this.renderTag}\n        renderSearchResult={this.renderSearchResult}\n        searchPlaceholder={translate('search.search_for_tags')}\n        stats={this.props.stats}\n        values={this.props.tags}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { orderBy, without } from 'lodash';\nimport * as React from 'react';\nimport FacetBox from '../../../components/facet/FacetBox';\nimport FacetHeader from '../../../components/facet/FacetHeader';\nimport FacetItem from '../../../components/facet/FacetItem';\nimport FacetItemsList from '../../../components/facet/FacetItemsList';\nimport MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport { ISSUE_TYPES } from '../../../helpers/constants';\nimport { translate } from '../../../helpers/l10n';\nimport { formatFacetStat, Query } from '../utils';\n\ninterface Props {\n  fetching: boolean;\n  onChange: (changes: Partial<Query>) => void;\n  onToggle: (property: string) => void;\n  open: boolean;\n  stats: T.Dict<number> | undefined;\n  types: string[];\n}\n\nexport default class TypeFacet extends React.PureComponent<Props> {\n  property = 'types';\n\n  static defaultProps = {\n    open: true\n  };\n\n  handleItemClick = (itemValue: string, multiple: boolean) => {\n    const { types } = this.props;\n    if (multiple) {\n      const newValue = orderBy(\n        types.includes(itemValue) ? without(types, itemValue) : [...types, itemValue]\n      );\n      this.props.onChange({ [this.property]: newValue });\n    } else {\n      this.props.onChange({\n        [this.property]: types.includes(itemValue) && types.length < 2 ? [] : [itemValue]\n      });\n    }\n  };\n\n  handleHeaderClick = () => {\n    this.props.onToggle(this.property);\n  };\n\n  handleClear = () => {\n    this.props.onChange({ [this.property]: [] });\n  };\n\n  getStat(type: string) {\n    const { stats } = this.props;\n    return stats ? stats[type] : undefined;\n  }\n\n  isFacetItemActive(type: string) {\n    return this.props.types.includes(type);\n  }\n\n  renderItem = (type: string) => {\n    const active = this.isFacetItemActive(type);\n    const stat = this.getStat(type);\n\n    return (\n      <FacetItem\n        active={active}\n        key={type}\n        name={\n          <span className=\"display-flex-center\">\n            <IssueTypeIcon className=\"little-spacer-right\" query={type} />{' '}\n            {translate('issue.type', type)}\n          </span>\n        }\n        onClick={this.handleItemClick}\n        stat={formatFacetStat(stat)}\n        value={type}\n      />\n    );\n  };\n\n  render() {\n    const { types, stats = {} } = this.props;\n    const values = types.map(type => translate('issue.type', type));\n\n    return (\n      <FacetBox property={this.property}>\n        <FacetHeader\n          fetching={this.props.fetching}\n          name={translate('issues.facet', this.property)}\n          onClear={this.handleClear}\n          onClick={this.handleHeaderClick}\n          open={this.props.open}\n          values={values}\n        />\n\n        {this.props.open && (\n          <>\n            <FacetItemsList>\n              {ISSUE_TYPES.filter(t => t !== 'SECURITY_HOTSPOT').map(this.renderItem)}\n            </FacetItemsList>\n            <MultipleSelectionHint options={Object.keys(stats).length} values={types.length} />\n          </>\n        )}\n      </FacetBox>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getGlobalSettingValue, Store } from '../../../store/rootReducer';\nimport { BranchLike } from '../../../types/branch-like';\nimport { isBranch, isPullRequest } from '../../../helpers/branch-like';\nimport { ComponentQualifier, isApplication, isPortfolioLike } from '../../../types/component';\nimport {\n  Facet,\n  ReferencedComponent,\n  ReferencedLanguage,\n  ReferencedRule\n} from '../../../types/issues';\nimport { Query } from '../utils';\nimport AssigneeFacet from './AssigneeFacet';\nimport AuthorFacet from './AuthorFacet';\nimport CreationDateFacet from './CreationDateFacet';\nimport DirectoryFacet from './DirectoryFacet';\nimport FileFacet from './FileFacet';\nimport LanguageFacet from './LanguageFacet';\nimport ProjectFacet from './ProjectFacet';\nimport ResolutionFacet from './ResolutionFacet';\nimport RuleFacet from './RuleFacet';\nimport ScopeFacet from './ScopeFacet';\nimport SeverityFacet from './SeverityFacet';\nimport StandardFacet from './StandardFacet';\nimport StatusFacet from './StatusFacet';\nimport TagFacet from './TagFacet';\nimport TypeFacet from './TypeFacet';\n\nexport interface Props {\n  branchLike?: BranchLike;\n  component: T.Component | undefined;\n  createdAfterIncludesTime: boolean;\n  facets: T.Dict<Facet | undefined>;\n  loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>;\n  loadingFacets: T.Dict<boolean>;\n  myIssues: boolean;\n  onFacetToggle: (property: string) => void;\n  onFilterChange: (changes: Partial<Query>) => void;\n  openFacets: T.Dict<boolean>;\n  query: Query;\n  referencedComponentsById: T.Dict<ReferencedComponent>;\n  referencedComponentsByKey: T.Dict<ReferencedComponent>;\n  referencedLanguages: T.Dict<ReferencedLanguage>;\n  referencedRules: T.Dict<ReferencedRule>;\n  referencedUsers: T.Dict<T.UserBase>;\n  disableDeveloperAggregatedInfo: boolean;\n}\n\nexport class Sidebar extends React.PureComponent<Props> {\n  renderComponentFacets() {\n    const { component, facets, loadingFacets, openFacets, query, branchLike } = this.props;\n    const hasFileOrDirectory =\n      !isApplication(component?.qualifier) && !isPortfolioLike(component?.qualifier);\n    if (!component || !hasFileOrDirectory) {\n      return null;\n    }\n    const commonProps = {\n      componentKey: component.key,\n      loadSearchResultCount: this.props.loadSearchResultCount,\n      onChange: this.props.onFilterChange,\n      onToggle: this.props.onFacetToggle,\n      query\n    };\n    return (\n      <>\n        {component.qualifier !== ComponentQualifier.Directory && (\n          <DirectoryFacet\n            branchLike={branchLike}\n            directories={query.directories}\n            fetching={loadingFacets.directories === true}\n            open={!!openFacets.directories}\n            stats={facets.directories}\n            {...commonProps}\n          />\n        )}\n        <FileFacet\n          branchLike={branchLike}\n          fetching={loadingFacets.files === true}\n          files={query.files}\n          open={!!openFacets.files}\n          stats={facets.files}\n          {...commonProps}\n        />\n      </>\n    );\n  }\n\n  render() {\n    const {\n      component,\n      createdAfterIncludesTime,\n      facets,\n      openFacets,\n      query,\n      branchLike\n    } = this.props;\n\n    const branch =\n      (isBranch(branchLike) && branchLike.name) ||\n      (isPullRequest(branchLike) && branchLike.branch) ||\n      undefined;\n\n    const displayProjectsFacet =\n      !component || !['TRK', 'BRC', 'DIR', 'DEV_PRJ'].includes(component.qualifier);\n    const displayAuthorFacet = !component || component.qualifier !== 'DEV';\n\n    return (\n      <>\n        <TypeFacet\n          fetching={this.props.loadingFacets.types === true}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.types}\n          stats={facets.types}\n          types={query.types}\n        />\n        <SeverityFacet\n          fetching={this.props.loadingFacets.severities === true}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.severities}\n          severities={query.severities}\n          stats={facets.severities}\n        />\n        <ScopeFacet\n          fetching={this.props.loadingFacets.scopes === true}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.scopes}\n          stats={facets.scopes}\n          scopes={query.scopes}\n        />\n        <ResolutionFacet\n          fetching={this.props.loadingFacets.resolutions === true}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.resolutions}\n          resolutions={query.resolutions}\n          resolved={query.resolved}\n          stats={facets.resolutions}\n        />\n        <StatusFacet\n          fetching={this.props.loadingFacets.statuses === true}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.statuses}\n          stats={facets.statuses}\n          statuses={query.statuses}\n        />\n        <StandardFacet\n          cwe={query.cwe}\n          cweOpen={!!openFacets.cwe}\n          cweStats={facets.cwe}\n          fetchingCwe={this.props.loadingFacets.cwe === true}\n          fetchingOwaspTop10={this.props.loadingFacets.owaspTop10 === true}\n          fetchingSansTop25={this.props.loadingFacets.sansTop25 === true}\n          fetchingSonarSourceSecurity={this.props.loadingFacets.sonarsourceSecurity === true}\n          loadSearchResultCount={this.props.loadSearchResultCount}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.standards}\n          owaspTop10={query.owaspTop10}\n          owaspTop10Open={!!openFacets.owaspTop10}\n          owaspTop10Stats={facets.owaspTop10}\n          query={query}\n          sansTop25={query.sansTop25}\n          sansTop25Open={!!openFacets.sansTop25}\n          sansTop25Stats={facets.sansTop25}\n          sonarsourceSecurity={query.sonarsourceSecurity}\n          sonarsourceSecurityOpen={!!openFacets.sonarsourceSecurity}\n          sonarsourceSecurityStats={facets.sonarsourceSecurity}\n        />\n        <CreationDateFacet\n          component={component}\n          createdAfter={query.createdAfter}\n          createdAfterIncludesTime={createdAfterIncludesTime}\n          createdAt={query.createdAt}\n          createdBefore={query.createdBefore}\n          createdInLast={query.createdInLast}\n          fetching={this.props.loadingFacets.createdAt === true}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.createdAt}\n          sinceLeakPeriod={query.sinceLeakPeriod}\n          stats={facets.createdAt}\n        />\n        <LanguageFacet\n          fetching={this.props.loadingFacets.languages === true}\n          languages={query.languages}\n          loadSearchResultCount={this.props.loadSearchResultCount}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.languages}\n          query={query}\n          referencedLanguages={this.props.referencedLanguages}\n          stats={facets.languages}\n        />\n        <RuleFacet\n          fetching={this.props.loadingFacets.rules === true}\n          languages={query.languages}\n          loadSearchResultCount={this.props.loadSearchResultCount}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.rules}\n          query={query}\n          referencedRules={this.props.referencedRules}\n          rules={query.rules}\n          stats={facets.rules}\n        />\n        <TagFacet\n          component={component}\n          branch={branch}\n          fetching={this.props.loadingFacets.tags === true}\n          loadSearchResultCount={this.props.loadSearchResultCount}\n          onChange={this.props.onFilterChange}\n          onToggle={this.props.onFacetToggle}\n          open={!!openFacets.tags}\n          query={query}\n          stats={facets.tags}\n          tags={query.tags}\n        />\n        {displayProjectsFacet && (\n          <ProjectFacet\n            component={component}\n            fetching={this.props.loadingFacets.projects === true}\n            loadSearchResultCount={this.props.loadSearchResultCount}\n            onChange={this.props.onFilterChange}\n            onToggle={this.props.onFacetToggle}\n            open={!!openFacets.projects}\n            projects={query.projects}\n            query={query}\n            referencedComponents={this.props.referencedComponentsByKey}\n            stats={facets.projects}\n          />\n        )}\n        {this.renderComponentFacets()}\n        {!this.props.myIssues && !this.props.disableDeveloperAggregatedInfo && (\n          <AssigneeFacet\n            assigned={query.assigned}\n            assignees={query.assignees}\n            fetching={this.props.loadingFacets.assignees === true}\n            loadSearchResultCount={this.props.loadSearchResultCount}\n            onChange={this.props.onFilterChange}\n            onToggle={this.props.onFacetToggle}\n            open={!!openFacets.assignees}\n            query={query}\n            referencedUsers={this.props.referencedUsers}\n            stats={facets.assignees}\n          />\n        )}\n        {displayAuthorFacet && !this.props.disableDeveloperAggregatedInfo && (\n          <AuthorFacet\n            author={query.author}\n            component={component}\n            fetching={this.props.loadingFacets.author === true}\n            loadSearchResultCount={this.props.loadSearchResultCount}\n            onChange={this.props.onFilterChange}\n            onToggle={this.props.onFacetToggle}\n            open={!!openFacets.author}\n            query={query}\n            stats={facets.author}\n          />\n        )}\n      </>\n    );\n  }\n}\n\nexport const mapStateToProps = (state: Store) => {\n  const disableDeveloperAggregatedInfo = getGlobalSettingValue(\n    state,\n    'sonar.developerAggregatedInfo.disabled'\n  );\n  return {\n    disableDeveloperAggregatedInfo: disableDeveloperAggregatedInfo?.value === true.toString()\n  };\n};\n\nexport default connect(mapStateToProps)(Sidebar);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport Select, { Creatable } from './Select';\n\ninterface Props<T> {\n  autofocus?: boolean;\n  canCreate?: boolean;\n  className?: string;\n  clearable?: boolean;\n  defaultOptions?: T[];\n  minimumQueryLength?: number;\n  multi?: boolean;\n  onSearch: (query: string) => Promise<T[]>;\n  onSelect?: (option: T) => void;\n  onMultiSelect?: (options: T[]) => void;\n  promptTextCreator?: (label: string) => string;\n  renderOption?: (option: T) => JSX.Element;\n  resetOnBlur?: boolean;\n  value?: T | T[];\n}\n\ninterface State<T> {\n  loading: boolean;\n  options: T[];\n  query: string;\n}\n\nexport default class SearchSelect<T extends { value: string }> extends React.PureComponent<\n  Props<T>,\n  State<T>\n> {\n  mounted = false;\n\n  constructor(props: Props<T>) {\n    super(props);\n    this.state = { loading: false, options: props.defaultOptions || [], query: '' };\n    this.handleSearch = debounce(this.handleSearch, 250);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  get autofocus() {\n    return this.props.autofocus !== undefined ? this.props.autofocus : true;\n  }\n\n  get minimumQueryLength() {\n    return this.props.minimumQueryLength !== undefined ? this.props.minimumQueryLength : 2;\n  }\n\n  get resetOnBlur() {\n    return this.props.resetOnBlur !== undefined ? this.props.resetOnBlur : true;\n  }\n\n  handleSearch = (query: string) => {\n    // Ignore the result if the query changed\n    const currentQuery = query;\n    this.props.onSearch(currentQuery).then(\n      options => {\n        if (this.mounted) {\n          this.setState(state => ({\n            loading: false,\n            options: state.query === currentQuery ? options : state.options\n          }));\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleChange = (option: T | T[]) => {\n    if (Array.isArray(option)) {\n      if (this.props.onMultiSelect) {\n        this.props.onMultiSelect(option);\n      }\n    } else if (this.props.onSelect) {\n      this.props.onSelect(option);\n    }\n  };\n\n  handleInputChange = (query: string) => {\n    if (query.length >= this.minimumQueryLength) {\n      this.setState({ loading: true, query });\n      this.handleSearch(query);\n    } else {\n      // `onInputChange` is called with an empty string after a user selects a value\n      // in this case we shouldn't reset `options`, because it also resets select value :(\n      const options = (query.length === 0 && this.props.defaultOptions) || [];\n      this.setState({ options, query });\n    }\n  };\n\n  // disable internal filtering\n  handleFilterOption = () => true;\n\n  render() {\n    const Component = this.props.canCreate ? Creatable : Select;\n    return (\n      <Component\n        autoFocus={this.autofocus}\n        className={this.props.className}\n        clearable={this.props.clearable}\n        escapeClearsValue={false}\n        filterOption={this.handleFilterOption}\n        isLoading={this.state.loading}\n        multi={this.props.multi}\n        noResultsText={\n          this.state.query.length < this.minimumQueryLength\n            ? translateWithParameters('select2.tooShort', this.minimumQueryLength)\n            : translate('select2.noMatches')\n        }\n        onBlurResetsInput={this.resetOnBlur}\n        onChange={this.handleChange}\n        onInputChange={this.handleInputChange}\n        optionRenderer={this.props.renderOption}\n        options={this.state.options}\n        placeholder={translate('search_verb')}\n        promptTextCreator={this.props.promptTextCreator}\n        searchable={true}\n        value={this.props.value}\n        valueRenderer={this.props.renderOption}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { pickBy, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { bulkChangeIssues, searchIssueTags } from '../../../api/issues';\nimport throwGlobalError from '../../../app/utils/throwGlobalError';\nimport FormattingTips from '../../../components/common/FormattingTips';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport Modal from '../../../components/controls/Modal';\nimport Radio from '../../../components/controls/Radio';\nimport SearchSelect from '../../../components/controls/SearchSelect';\nimport Select from '../../../components/controls/Select';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport { Alert } from '../../../components/ui/Alert';\nimport Avatar from '../../../components/ui/Avatar';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { isLoggedIn, isUserActive } from '../../../helpers/users';\nimport { searchAssignees } from '../utils';\n\ninterface AssigneeOption {\n  avatar?: string;\n  email?: string;\n  label: string;\n  value: string;\n}\n\ninterface TagOption {\n  label: string;\n  value: string;\n}\n\ninterface Props {\n  component: T.Component | undefined;\n  currentUser: T.CurrentUser;\n  fetchIssues: (x: {}) => Promise<{ issues: T.Issue[]; paging: T.Paging }>;\n  onClose: () => void;\n  onDone: () => void;\n}\n\ninterface FormFields {\n  addTags?: Array<{ label: string; value: string }>;\n  assignee?: AssigneeOption;\n  comment?: string;\n  notifications?: boolean;\n  removeTags?: Array<{ label: string; value: string }>;\n  severity?: string;\n  transition?: string;\n  type?: string;\n}\n\ninterface State extends FormFields {\n  initialTags: Array<{ label: string; value: string }>;\n  issues: T.Issue[];\n  // used for initial loading of issues\n  loading: boolean;\n  paging?: T.Paging;\n  // used when submitting a form\n  submitting: boolean;\n}\n\ntype AssigneeSelectType = new () => SearchSelect<AssigneeOption>;\nconst AssigneeSelect = SearchSelect as AssigneeSelectType;\n\ntype TagSelectType = new () => SearchSelect<TagOption>;\nconst TagSelect = SearchSelect as TagSelectType;\n\nexport const MAX_PAGE_SIZE = 500;\n\nexport default class BulkChangeModal extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = { initialTags: [], issues: [], loading: true, submitting: false };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n\n    Promise.all([this.loadIssues(), searchIssueTags({})]).then(\n      ([{ issues, paging }, tags]) => {\n        if (this.mounted) {\n          if (issues.length > MAX_PAGE_SIZE) {\n            issues = issues.slice(0, MAX_PAGE_SIZE);\n          }\n\n          this.setState({\n            initialTags: tags.map(tag => ({ label: tag, value: tag })),\n            issues,\n            loading: false,\n            paging\n          });\n        }\n      },\n      () => {}\n    );\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadIssues = () => {\n    return this.props.fetchIssues({ additionalFields: 'actions,transitions', ps: MAX_PAGE_SIZE });\n  };\n\n  getDefaultAssignee = () => {\n    const { currentUser } = this.props;\n    const { issues } = this.state;\n    const options = [];\n\n    if (isLoggedIn(currentUser)) {\n      const canBeAssignedToMe =\n        issues.filter(issue => issue.assignee !== currentUser.login).length > 0;\n      if (canBeAssignedToMe) {\n        options.push({\n          avatar: currentUser.avatar,\n          label: currentUser.name,\n          value: currentUser.login\n        });\n      }\n    }\n\n    const canBeUnassigned = issues.filter(issue => issue.assignee).length > 0;\n    if (canBeUnassigned) {\n      options.push({ label: translate('unassigned'), value: '' });\n    }\n\n    return options;\n  };\n\n  handleAssigneeSearch = (query: string) => {\n    return searchAssignees(query).then(({ results }) =>\n      results.map(r => {\n        const userInfo = r.name || r.login;\n\n        return {\n          avatar: r.avatar,\n          label: isUserActive(r) ? userInfo : translateWithParameters('user.x_deleted', userInfo),\n          value: r.login\n        };\n      })\n    );\n  };\n\n  handleAssigneeSelect = (assignee: AssigneeOption) => {\n    this.setState({ assignee });\n  };\n\n  handleTagsSearch = (query: string) => {\n    return searchIssueTags({ q: query }).then(tags =>\n      tags.map(tag => ({ label: tag, value: tag }))\n    );\n  };\n\n  handleTagsSelect = (field: 'addTags' | 'removeTags') => (\n    options: Array<{ label: string; value: string }>\n  ) => {\n    this.setState<keyof FormFields>({ [field]: options });\n  };\n\n  handleFieldCheck = (field: keyof FormFields) => (checked: boolean) => {\n    if (!checked) {\n      this.setState<keyof FormFields>({ [field]: undefined });\n    } else if (field === 'notifications') {\n      this.setState<keyof FormFields>({ [field]: true });\n    }\n  };\n\n  handleRadioTransitionChange = (transition: string) => {\n    this.setState({ transition });\n  };\n\n  handleCommentChange = (event: React.SyntheticEvent<HTMLTextAreaElement>) => {\n    this.setState({ comment: event.currentTarget.value });\n  };\n\n  handleSelectFieldChange = (field: 'severity' | 'type') => (data: { value: string } | null) => {\n    if (data) {\n      this.setState<keyof FormFields>({ [field]: data.value });\n    } else {\n      this.setState<keyof FormFields>({ [field]: undefined });\n    }\n  };\n\n  handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n\n    const query = pickBy(\n      {\n        add_tags: this.state.addTags && this.state.addTags.map(t => t.value).join(),\n        assign: this.state.assignee ? this.state.assignee.value : null,\n        comment: this.state.comment,\n        do_transition: this.state.transition,\n        remove_tags: this.state.removeTags && this.state.removeTags.map(t => t.value).join(),\n        sendNotifications: this.state.notifications,\n        set_severity: this.state.severity,\n        set_type: this.state.type\n      },\n      x => x !== undefined\n    );\n\n    const issueKeys = this.state.issues.map(issue => issue.key);\n\n    this.setState({ submitting: true });\n    bulkChangeIssues(issueKeys, query).then(\n      () => {\n        this.setState({ submitting: false });\n        this.props.onDone();\n      },\n      error => {\n        this.setState({ submitting: false });\n        throwGlobalError(error);\n      }\n    );\n  };\n\n  getAvailableTransitions(issues: T.Issue[]) {\n    const transitions: T.Dict<number> = {};\n    issues.forEach(issue => {\n      if (issue.transitions) {\n        issue.transitions.forEach(t => {\n          if (transitions[t] !== undefined) {\n            transitions[t]++;\n          } else {\n            transitions[t] = 1;\n          }\n        });\n      }\n    });\n    return sortBy(Object.keys(transitions)).map(transition => ({\n      transition,\n      count: transitions[transition]\n    }));\n  }\n\n  canSubmit = () => {\n    const { addTags, assignee, removeTags, severity, transition, type } = this.state;\n\n    return Boolean(\n      (addTags && addTags.length > 0) ||\n        (removeTags && removeTags.length > 0) ||\n        assignee ||\n        severity ||\n        transition ||\n        type\n    );\n  };\n\n  renderLoading = () => (\n    <div>\n      <div className=\"modal-head\">\n        <h2>{translate('bulk_change')}</h2>\n      </div>\n      <div className=\"modal-body\">\n        <div className=\"text-center\">\n          <i className=\"spinner spacer\" />\n        </div>\n      </div>\n      <div className=\"modal-foot\">\n        <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n      </div>\n    </div>\n  );\n\n  renderAffected = (affected: number) => (\n    <div className=\"pull-right note\">\n      ({translateWithParameters('issue_bulk_change.x_issues', affected)})\n    </div>\n  );\n\n  renderField = (\n    field: 'addTags' | 'assignee' | 'removeTags' | 'severity' | 'type',\n    label: string,\n    affected: number | undefined,\n    input: React.ReactNode\n  ) => (\n    <div className=\"modal-field\" id={`issues-bulk-change-${field}`}>\n      <label htmlFor={field}>{translate(label)}</label>\n      {input}\n      {affected !== undefined && this.renderAffected(affected)}\n    </div>\n  );\n\n  renderAssigneeOption = (option: AssigneeOption) => {\n    return (\n      <span>\n        {option.avatar !== undefined && (\n          <Avatar className=\"spacer-right\" hash={option.avatar} name={option.label} size={16} />\n        )}\n        {option.label}\n      </span>\n    );\n  };\n\n  renderAssigneeField = () => {\n    const affected = this.state.issues.filter(hasAction('assign')).length;\n\n    if (affected === 0) {\n      return null;\n    }\n\n    const input = (\n      <AssigneeSelect\n        className=\"input-super-large\"\n        clearable={true}\n        defaultOptions={this.getDefaultAssignee()}\n        onSearch={this.handleAssigneeSearch}\n        onSelect={this.handleAssigneeSelect}\n        renderOption={this.renderAssigneeOption}\n        resetOnBlur={false}\n        value={this.state.assignee}\n      />\n    );\n\n    return this.renderField('assignee', 'issue.assign.formlink', affected, input);\n  };\n\n  renderTypeField = () => {\n    const affected = this.state.issues.filter(hasAction('set_type')).length;\n\n    if (affected === 0) {\n      return null;\n    }\n\n    const types: T.IssueType[] = ['BUG', 'VULNERABILITY', 'CODE_SMELL'];\n    const options = types.map(type => ({ label: translate('issue.type', type), value: type }));\n\n    const optionRenderer = (option: { label: string; value: string }) => (\n      <>\n        <IssueTypeIcon query={option.value} />\n        <span className=\"little-spacer-left\">{option.label}</span>\n      </>\n    );\n\n    const input = (\n      <Select\n        className=\"input-super-large\"\n        clearable={true}\n        onChange={this.handleSelectFieldChange('type')}\n        optionRenderer={optionRenderer}\n        options={options}\n        searchable={false}\n        value={this.state.type}\n        valueRenderer={optionRenderer}\n      />\n    );\n\n    return this.renderField('type', 'issue.set_type', affected, input);\n  };\n\n  renderSeverityField = () => {\n    const affected = this.state.issues.filter(hasAction('set_severity')).length;\n\n    if (affected === 0) {\n      return null;\n    }\n\n    const severities = ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'];\n    const options = severities.map(severity => ({\n      label: translate('severity', severity),\n      value: severity\n    }));\n\n    const input = (\n      <Select\n        className=\"input-super-large\"\n        clearable={true}\n        onChange={this.handleSelectFieldChange('severity')}\n        optionRenderer={(option: { value: string }) => <SeverityHelper severity={option.value} />}\n        options={options}\n        searchable={false}\n        value={this.state.severity}\n        valueRenderer={(option: { value: string }) => <SeverityHelper severity={option.value} />}\n      />\n    );\n\n    return this.renderField('severity', 'issue.set_severity', affected, input);\n  };\n\n  renderTagOption = (option: TagOption) => {\n    return <span>{option.label}</span>;\n  };\n\n  renderTagsField = (field: 'addTags' | 'removeTags', label: string, allowCreate: boolean) => {\n    const { initialTags } = this.state;\n    const affected = this.state.issues.filter(hasAction('set_tags')).length;\n\n    if (initialTags === undefined || affected === 0) {\n      return null;\n    }\n\n    const input = (\n      <TagSelect\n        canCreate={allowCreate}\n        className=\"input-super-large\"\n        clearable={true}\n        defaultOptions={this.state.initialTags}\n        minimumQueryLength={0}\n        multi={true}\n        onMultiSelect={this.handleTagsSelect(field)}\n        onSearch={this.handleTagsSearch}\n        promptTextCreator={promptCreateTag}\n        renderOption={this.renderTagOption}\n        resetOnBlur={false}\n        value={this.state[field]}\n      />\n    );\n\n    return this.renderField(field, label, affected, input);\n  };\n\n  renderTransitionsField = () => {\n    const transitions = this.getAvailableTransitions(this.state.issues);\n\n    if (transitions.length === 0) {\n      return null;\n    }\n\n    return (\n      <div className=\"modal-field\">\n        <label>{translate('issue.transition')}</label>\n        {transitions.map(transition => (\n          <span\n            className=\"bulk-change-radio-button display-flex-center display-flex-space-between\"\n            key={transition.transition}>\n            <Radio\n              checked={this.state.transition === transition.transition}\n              onCheck={this.handleRadioTransitionChange}\n              value={transition.transition}>\n              {translate('issue.transition', transition.transition)}\n            </Radio>\n            {this.renderAffected(transition.count)}\n          </span>\n        ))}\n      </div>\n    );\n  };\n\n  renderCommentField = () => {\n    const affected = this.state.issues.filter(hasAction('comment')).length;\n\n    if (affected === 0) {\n      return null;\n    }\n\n    return (\n      <div className=\"modal-field\">\n        <label htmlFor=\"comment\">\n          <span className=\"text-middle\">{translate('issue.comment.formlink')}</span>\n          <HelpTooltip\n            className=\"spacer-left\"\n            overlay={translate('issue_bulk_change.comment.help')}\n          />\n        </label>\n        <textarea\n          id=\"comment\"\n          onChange={this.handleCommentChange}\n          rows={4}\n          value={this.state.comment || ''}\n        />\n        <FormattingTips className=\"modal-field-descriptor text-right\" />\n      </div>\n    );\n  };\n\n  renderNotificationsField = () => (\n    <Checkbox\n      checked={this.state.notifications !== undefined}\n      className=\"display-inline-block spacer-top\"\n      id=\"send-notifications\"\n      onCheck={this.handleFieldCheck('notifications')}\n      right={true}>\n      <strong className=\"little-spacer-right\">{translate('issue.send_notifications')}</strong>\n    </Checkbox>\n  );\n\n  renderForm = () => {\n    const { issues, paging, submitting } = this.state;\n\n    const limitReached = paging && paging.total > MAX_PAGE_SIZE;\n    const canSubmit = this.canSubmit();\n\n    return (\n      <form id=\"bulk-change-form\" onSubmit={this.handleSubmit}>\n        <div className=\"modal-head\">\n          <h2>{translateWithParameters('issue_bulk_change.form.title', issues.length)}</h2>\n        </div>\n\n        <div className=\"modal-body modal-container\">\n          {limitReached && (\n            <Alert variant=\"warning\">\n              <FormattedMessage\n                defaultMessage={translate('issue_bulk_change.max_issues_reached')}\n                id=\"issue_bulk_change.max_issues_reached\"\n                values={{ max: <strong>{MAX_PAGE_SIZE}</strong> }}\n              />\n            </Alert>\n          )}\n\n          {this.renderAssigneeField()}\n          {this.renderTypeField()}\n          {this.renderSeverityField()}\n          {this.renderTagsField('addTags', 'issue.add_tags', true)}\n          {this.renderTagsField('removeTags', 'issue.remove_tags', false)}\n          {this.renderTransitionsField()}\n          {this.renderCommentField()}\n          {issues.length > 0 && this.renderNotificationsField()}\n          {issues.length === 0 && (\n            <Alert variant=\"warning\">{translate('issue_bulk_change.no_match')}</Alert>\n          )}\n        </div>\n\n        <div className=\"modal-foot\">\n          {submitting && <i className=\"spinner spacer-right\" />}\n          <Tooltip overlay={!canSubmit ? translate('issue_bulk_change.no_change_selected') : null}>\n            <SubmitButton\n              disabled={!canSubmit || submitting || issues.length === 0}\n              id=\"bulk-change-submit\">\n              {translate('apply')}\n            </SubmitButton>\n          </Tooltip>\n          <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n        </div>\n      </form>\n    );\n  };\n\n  render() {\n    return (\n      <Modal contentLabel=\"modal\" onRequestClose={this.props.onClose} size=\"small\">\n        {this.state.loading ? this.renderLoading() : this.renderForm()}\n      </Modal>\n    );\n  }\n}\n\nfunction hasAction(action: string) {\n  return (issue: T.Issue) => issue.actions && issue.actions.includes(action);\n}\n\nfunction promptCreateTag(label: string) {\n  return `+ ${label}`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BranchIcon from '../../../components/icons/BranchIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { collapsePath, limitComponentName } from '../../../helpers/path';\nimport { ComponentQualifier, isView } from '../../../types/component';\nimport { getSelectedLocation } from '../utils';\n\ninterface Props {\n  component?: T.Component;\n  issue: T.Issue;\n  selectedFlowIndex?: number;\n  selectedLocationIndex?: number;\n}\n\nexport default function ComponentBreadcrumbs({\n  component,\n  issue,\n  selectedFlowIndex,\n  selectedLocationIndex\n}: Props) {\n  const displayProject =\n    !component ||\n    ![\n      ComponentQualifier.Project,\n      ComponentQualifier.SubProject,\n      ComponentQualifier.Directory\n    ].includes(component.qualifier as ComponentQualifier);\n  const displaySubProject =\n    !component ||\n    ![ComponentQualifier.SubProject, ComponentQualifier.Directory].includes(\n      component.qualifier as ComponentQualifier\n    );\n  const displayBranchInformation = isView(component?.qualifier);\n\n  const selectedLocation = getSelectedLocation(issue, selectedFlowIndex, selectedLocationIndex);\n  const componentName = selectedLocation ? selectedLocation.componentName : issue.componentLongName;\n  const projectName = [issue.projectName, issue.branch].filter(s => !!s).join(' - ');\n\n  return (\n    <div\n      aria-label={translateWithParameters(\n        'issues.on_file_x',\n        `${displayProject ? issue.projectName + ', ' : ''}${componentName}`\n      )}\n      className=\"component-name text-ellipsis\">\n      <QualifierIcon className=\"spacer-right\" qualifier={issue.componentQualifier} />\n\n      {displayProject && (\n        <span title={projectName}>\n          {limitComponentName(issue.projectName)}\n          {displayBranchInformation && (\n            <>\n              {' - '}\n              {issue.branch ? (\n                <>\n                  <BranchIcon />\n                  <span>{issue.branch}</span>\n                </>\n              ) : (\n                <span className=\"badge\">{translate('branches.main_branch')}</span>\n              )}\n            </>\n          )}\n          <span className=\"slash-separator\" />\n        </span>\n      )}\n\n      {displaySubProject && issue.subProject !== undefined && issue.subProjectName !== undefined && (\n        <span title={issue.subProjectName}>\n          {limitComponentName(issue.subProjectName)}\n          <span className=\"slash-separator\" />\n        </span>\n      )}\n\n      <span title={componentName}>{collapsePath(componentName || '')}</span>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Issue from '../../../components/issue/Issue';\nimport { BranchLike } from '../../../types/branch-like';\nimport { Query } from '../utils';\nimport ComponentBreadcrumbs from './ComponentBreadcrumbs';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  checked: boolean;\n  component: T.Component | undefined;\n  issue: T.Issue;\n  onChange: (issue: T.Issue) => void;\n  onCheck: ((issueKey: string) => void) | undefined;\n  onClick: (issueKey: string) => void;\n  onFilterChange: (changes: Partial<Query>) => void;\n  onPopupToggle: (issue: string, popupName: string, open?: boolean) => void;\n  openPopup: string | undefined;\n  previousIssue: T.Issue | undefined;\n  selected: boolean;\n}\n\nexport default class ListItem extends React.PureComponent<Props> {\n  handleFilter = (property: string, issue: T.Issue) => {\n    const { onFilterChange } = this.props;\n\n    const issuesReset = { issues: [] };\n\n    if (property.startsWith('tag###')) {\n      const tag = property.substr(6);\n      onFilterChange({ ...issuesReset, tags: [tag] });\n    } else {\n      switch (property) {\n        case 'type':\n          onFilterChange({ ...issuesReset, types: [issue.type] });\n          break;\n        case 'severity':\n          onFilterChange({ ...issuesReset, severities: [issue.severity] });\n          break;\n        case 'status':\n          onFilterChange({ ...issuesReset, statuses: [issue.status] });\n          break;\n        case 'resolution':\n          if (issue.resolution) {\n            onFilterChange({ ...issuesReset, resolved: true, resolutions: [issue.resolution] });\n          } else {\n            onFilterChange({ ...issuesReset, resolved: false, resolutions: [] });\n          }\n          break;\n        case 'assignee':\n          if (issue.assignee) {\n            onFilterChange({ ...issuesReset, assigned: true, assignees: [issue.assignee] });\n          } else {\n            onFilterChange({ ...issuesReset, assigned: false, assignees: [] });\n          }\n          break;\n        case 'rule':\n          onFilterChange({ ...issuesReset, rules: [issue.rule] });\n          break;\n        case 'project':\n          onFilterChange({ ...issuesReset, projects: [issue.projectKey] });\n          break;\n        case 'file':\n          onFilterChange({ ...issuesReset, files: [issue.componentUuid] });\n      }\n    }\n  };\n\n  render() {\n    const { branchLike, component, issue, previousIssue } = this.props;\n\n    const displayComponent =\n      !previousIssue ||\n      previousIssue.component !== issue.component ||\n      previousIssue.branch !== issue.branch;\n\n    return (\n      <li className=\"issues-workspace-list-item\">\n        {displayComponent && (\n          <div className=\"issues-workspace-list-component note\">\n            <ComponentBreadcrumbs component={component} issue={this.props.issue} />\n          </div>\n        )}\n        <Issue\n          branchLike={branchLike}\n          checked={this.props.checked}\n          issue={issue}\n          onChange={this.props.onChange}\n          onCheck={this.props.onCheck}\n          onClick={this.props.onClick}\n          onFilter={this.handleFilter}\n          onPopupToggle={this.props.onPopupToggle}\n          openPopup={this.props.openPopup}\n          selected={this.props.selected}\n        />\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { BranchLike } from '../../../types/branch-like';\nimport { Query, scrollToIssue } from '../utils';\nimport ListItem from './ListItem';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  checked: string[];\n  component: T.Component | undefined;\n  issues: T.Issue[];\n  onFilterChange: (changes: Partial<Query>) => void;\n  onIssueChange: (issue: T.Issue) => void;\n  onIssueCheck: ((issueKey: string) => void) | undefined;\n  onIssueClick: (issueKey: string) => void;\n  onPopupToggle: (issue: string, popupName: string, open?: boolean) => void;\n  openPopup: { issue: string; name: string } | undefined;\n  selectedIssue: T.Issue | undefined;\n}\n\ninterface State {\n  prerender: boolean;\n}\n\nexport default class IssuesList extends React.PureComponent<Props, State> {\n  state: State = {\n    prerender: true\n  };\n\n  componentDidMount() {\n    // ! \\\\ This prerender state variable is to enable the page to be displayed\n    //      immediately, displaying a loader before attempting to render the\n    //      list of issues. See https://jira.sonarsource.com/browse/SONAR-11681\n    setTimeout(() => {\n      this.setState({ prerender: false });\n      if (this.props.selectedIssue) {\n        scrollToIssue(this.props.selectedIssue.key, false);\n      }\n    }, 42);\n  }\n\n  render() {\n    const { branchLike, checked, component, issues, openPopup, selectedIssue } = this.props;\n    const { prerender } = this.state;\n\n    if (prerender) {\n      return (\n        <div>\n          <i className=\"spinner\" />\n        </div>\n      );\n    }\n\n    return (\n      <ul>\n        {issues.map((issue, index) => (\n          <ListItem\n            branchLike={branchLike}\n            checked={checked.includes(issue.key)}\n            component={component}\n            issue={issue}\n            key={issue.key}\n            onChange={this.props.onIssueChange}\n            onCheck={this.props.onIssueCheck}\n            onClick={this.props.onIssueClick}\n            onFilterChange={this.props.onFilterChange}\n            onPopupToggle={this.props.onPopupToggle}\n            openPopup={openPopup && openPopup.issue === issue.key ? openPopup.name : undefined}\n            previousIssue={index > 0 ? issues[index - 1] : undefined}\n            selected={selectedIssue != null && selectedIssue.key === issue.key}\n          />\n        ))}\n      </ul>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nconst LINES_ABOVE = 5;\nconst LINES_BELOW = 5;\nexport const MERGE_DISTANCE = 11; // Merge if snippets are eleven lines away (separated by 10 lines) or fewer\nexport const LINES_BELOW_ISSUE = 9;\nexport const EXPAND_BY_LINES = 50;\n\nfunction unknownComponent(key: string): T.SnippetsByComponent {\n  return {\n    component: {\n      key,\n      measures: {},\n      path: '',\n      project: '',\n      projectName: '',\n      q: 'FIL',\n      uuid: ''\n    },\n    sources: []\n  };\n}\n\nfunction collision([startA, endA]: number[], [startB, endB]: number[]) {\n  return !(startA > endB + MERGE_DISTANCE || endA < startB - MERGE_DISTANCE);\n}\n\nexport function getPrimaryLocation(issue: T.Issue): T.FlowLocation {\n  return {\n    component: issue.component,\n    textRange: issue.textRange || {\n      endLine: 0,\n      endOffset: 0,\n      startLine: 0,\n      startOffset: 0\n    }\n  };\n}\n\nfunction addLinesBellow(params: { issue: T.Issue; locationEnd: number }) {\n  const { issue, locationEnd } = params;\n  const issueEndLine = (issue.textRange && issue.textRange.endLine) || 0;\n\n  if (!issueEndLine || issueEndLine === locationEnd) {\n    return locationEnd + LINES_BELOW_ISSUE;\n  }\n\n  return locationEnd + LINES_BELOW;\n}\n\nexport function createSnippets(params: {\n  component: string;\n  issue: T.Issue;\n  locations: T.FlowLocation[];\n}): T.Snippet[] {\n  const { component, issue, locations } = params;\n\n  const hasSecondaryLocations = issue.secondaryLocations.length > 0;\n  const addIssueLocation =\n    hasSecondaryLocations && issue.component === component && issue.textRange !== undefined;\n\n  // For each location: compute its range, and then compare with other ranges\n  // to merge snippets that collide.\n  const ranges = (addIssueLocation ? [getPrimaryLocation(issue), ...locations] : locations).reduce(\n    (snippets: T.Snippet[], loc, index) => {\n      const startIndex = Math.max(1, loc.textRange.startLine - LINES_ABOVE);\n      const endIndex = addLinesBellow({ issue, locationEnd: loc.textRange.endLine });\n\n      let firstCollision: { start: number; end: number } | undefined;\n\n      // Remove ranges that collide into the first collision\n      snippets = snippets.filter(snippet => {\n        if (collision([snippet.start, snippet.end], [startIndex, endIndex])) {\n          let keep = false;\n          // Check if we've already collided\n          if (!firstCollision) {\n            firstCollision = snippet;\n            keep = true;\n          }\n          // Merge with first collision:\n          firstCollision.start = Math.min(startIndex, snippet.start, firstCollision.start);\n          firstCollision.end = Math.max(endIndex, snippet.end, firstCollision.end);\n\n          // remove the range if it was not the first collision\n          return keep;\n        }\n        return true;\n      });\n\n      if (firstCollision === undefined) {\n        snippets.push({\n          start: startIndex,\n          end: endIndex,\n          index\n        });\n      }\n\n      return snippets;\n    },\n    []\n  );\n\n  // Sort snippets by line number in the case of secondary locations\n  // Preserve location order for flows!\n  return hasSecondaryLocations ? ranges.sort((a, b) => a.start - b.start) : ranges;\n}\n\nexport function linesForSnippets(snippets: T.Snippet[], componentLines: T.LineMap) {\n  return snippets\n    .map(snippet => {\n      const lines = [];\n      for (let i = snippet.start; i <= snippet.end; i++) {\n        if (componentLines[i]) {\n          lines.push(componentLines[i]);\n        }\n      }\n      return lines;\n    })\n    .filter(snippet => snippet.length > 0);\n}\n\nexport function groupLocationsByComponent(\n  issue: T.Issue,\n  locations: T.FlowLocation[],\n  components: { [key: string]: T.SnippetsByComponent }\n) {\n  let currentComponent = '';\n  let currentGroup: T.SnippetGroup;\n  const groups: T.SnippetGroup[] = [];\n\n  const addGroup = (componentKey: string) => {\n    currentGroup = {\n      ...(components[componentKey] || unknownComponent(componentKey)),\n      locations: []\n    };\n    groups.push(currentGroup);\n    currentComponent = componentKey;\n  };\n\n  if (\n    issue.secondaryLocations.length > 0 &&\n    locations.every(loc => loc.component !== issue.component)\n  ) {\n    addGroup(issue.component);\n  }\n\n  locations.forEach((loc, index) => {\n    if (loc.component !== currentComponent) {\n      addGroup(loc.component);\n    }\n    loc.index = index;\n    currentGroup.locations.push(loc);\n  });\n\n  return groups;\n}\n\nexport function expandSnippet({\n  direction,\n  snippetIndex,\n  snippets\n}: {\n  direction: T.ExpandDirection;\n  snippetIndex: number;\n  snippets: T.Snippet[];\n}) {\n  const snippetToExpand = snippets.find(s => s.index === snippetIndex);\n  if (!snippetToExpand) {\n    throw new Error(`Snippet ${snippetIndex} not found`);\n  }\n\n  snippetToExpand.start = Math.max(\n    0,\n    snippetToExpand.start - (direction === 'up' ? EXPAND_BY_LINES : 0)\n  );\n  snippetToExpand.end += direction === 'down' ? EXPAND_BY_LINES : 0;\n\n  return snippets.map(snippet => {\n    if (snippet.index === snippetIndex) {\n      return snippetToExpand;\n    }\n    if (collision([snippet.start, snippet.end], [snippetToExpand.start, snippetToExpand.end])) {\n      // Merge with expanded snippet\n      snippetToExpand.start = Math.min(snippet.start, snippetToExpand.start);\n      snippetToExpand.end = Math.max(snippet.end, snippetToExpand.end);\n      snippet.toDelete = true;\n    }\n    return snippet;\n  });\n}\n\nexport function inSnippet(line: number, snippet: T.SourceLine[]) {\n  return line >= snippet[0].line && line <= snippet[snippet.length - 1].line;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport ExpandSnippetIcon from '../../../components/icons/ExpandSnippetIcon';\nimport Line from '../../../components/SourceViewer/components/Line';\nimport { symbolsByLine } from '../../../components/SourceViewer/helpers/indexing';\nimport { getSecondaryIssueLocationsForLine } from '../../../components/SourceViewer/helpers/issueLocations';\nimport {\n  optimizeHighlightedSymbols,\n  optimizeLocationMessage,\n  optimizeSelectedIssue\n} from '../../../components/SourceViewer/helpers/lines';\nimport { translate } from '../../../helpers/l10n';\nimport { scrollHorizontally } from '../../../helpers/scrolling';\nimport { BranchLike } from '../../../types/branch-like';\nimport './SnippetViewer.css';\nimport { inSnippet, LINES_BELOW_ISSUE } from './utils';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  component: T.SourceViewerFile;\n  displayLineNumberOptions?: boolean;\n  displaySCM?: boolean;\n  duplications?: T.Duplication[];\n  duplicationsByLine?: { [line: number]: number[] };\n  expandBlock: (snippetIndex: number, direction: T.ExpandDirection) => Promise<void>;\n  handleCloseIssues: (line: T.SourceLine) => void;\n  handleOpenIssues: (line: T.SourceLine) => void;\n  handleSymbolClick: (symbols: string[]) => void;\n  highlightedLocationMessage: { index: number; text: string | undefined } | undefined;\n  highlightedSymbols: string[];\n  index: number;\n  issue: Pick<T.Issue, 'key' | 'textRange' | 'line'>;\n  issuePopup?: { issue: string; name: string };\n  issuesByLine: T.IssuesByLine;\n  lastSnippetOfLastGroup: boolean;\n  loadDuplications?: (line: T.SourceLine) => void;\n  locations: T.FlowLocation[];\n  locationsByLine: { [line: number]: T.LinearIssueLocation[] };\n  onIssueChange: (issue: T.Issue) => void;\n  onIssuePopupToggle: (issue: string, popupName: string, open?: boolean) => void;\n  onLocationSelect: (index: number) => void;\n  openIssuesByLine: T.Dict<boolean>;\n  renderDuplicationPopup: (index: number, line: number) => React.ReactNode;\n  scroll?: (element: HTMLElement, offset?: number) => void;\n  snippet: T.SourceLine[];\n}\n\nexport default class SnippetViewer extends React.PureComponent<Props> {\n  snippetNodeRef: React.RefObject<HTMLDivElement>;\n\n  constructor(props: Props) {\n    super(props);\n    this.snippetNodeRef = React.createRef();\n  }\n\n  doScroll = (element: HTMLElement) => {\n    if (this.props.scroll) {\n      this.props.scroll(element);\n    }\n    const parent = this.snippetNodeRef.current as Element;\n\n    if (parent) {\n      const offset = parent.getBoundingClientRect().width / 2;\n\n      scrollHorizontally(element, {\n        leftOffset: offset,\n        rightOffset: offset,\n        parent\n      });\n    }\n  };\n\n  scrollToLastExpandedRow = () => {\n    if (this.props.scroll) {\n      const snippetNode = this.snippetNodeRef.current as Element;\n      if (!snippetNode) {\n        return;\n      }\n      const rows = snippetNode.querySelectorAll('tr');\n      const lastRow = rows[rows.length - 1];\n      this.props.scroll(lastRow, 100);\n    }\n  };\n\n  expandBlock = (direction: T.ExpandDirection) => () =>\n    this.props.expandBlock(this.props.index, direction).then(() => {\n      if (direction === 'down') {\n        this.scrollToLastExpandedRow();\n      }\n    });\n\n  renderLine({\n    displayDuplications,\n    displaySCM,\n    index,\n    issuesForLine,\n    issueLocations,\n    line,\n    snippet,\n    symbols,\n    verticalBuffer\n  }: {\n    displayDuplications: boolean;\n    displaySCM?: boolean;\n    index: number;\n    issuesForLine: T.Issue[];\n    issueLocations: T.LinearIssueLocation[];\n    line: T.SourceLine;\n    snippet: T.SourceLine[];\n    symbols: string[];\n    verticalBuffer: number;\n  }) {\n    const secondaryIssueLocations = getSecondaryIssueLocationsForLine(line, this.props.locations);\n\n    const { displayLineNumberOptions, duplications, duplicationsByLine } = this.props;\n    const duplicationsCount = duplications ? duplications.length : 0;\n    const lineDuplications =\n      (duplicationsCount && duplicationsByLine && duplicationsByLine[line.line]) || [];\n\n    const isSinkLine = issuesForLine.some(i => i.key === this.props.issue.key);\n    const firstLineNumber = snippet && snippet.length ? snippet[0].line : 0;\n    const noop = () => {};\n\n    return (\n      <Line\n        branchLike={this.props.branchLike}\n        displayAllIssues={false}\n        displayCoverage={true}\n        displayDuplications={displayDuplications}\n        displayIssues={!isSinkLine || issuesForLine.length > 1}\n        displayLineNumberOptions={displayLineNumberOptions}\n        displayLocationMarkers={true}\n        displaySCM={displaySCM}\n        duplications={lineDuplications}\n        duplicationsCount={duplicationsCount}\n        firstLineNumber={firstLineNumber}\n        highlighted={false}\n        highlightedLocationMessage={optimizeLocationMessage(\n          this.props.highlightedLocationMessage,\n          secondaryIssueLocations\n        )}\n        highlightedSymbols={optimizeHighlightedSymbols(symbols, this.props.highlightedSymbols)}\n        issueLocations={issueLocations}\n        issuePopup={this.props.issuePopup}\n        issues={issuesForLine}\n        key={line.line}\n        last={false}\n        line={line}\n        loadDuplications={this.props.loadDuplications || noop}\n        onIssueChange={this.props.onIssueChange}\n        onIssuePopupToggle={this.props.onIssuePopupToggle}\n        onIssueSelect={noop}\n        onIssueUnselect={noop}\n        onIssuesClose={this.props.handleCloseIssues}\n        onIssuesOpen={this.props.handleOpenIssues}\n        onLocationSelect={this.props.onLocationSelect}\n        onSymbolClick={this.props.handleSymbolClick}\n        openIssues={this.props.openIssuesByLine[line.line]}\n        previousLine={index > 0 ? snippet[index - 1] : undefined}\n        renderDuplicationPopup={this.props.renderDuplicationPopup}\n        scroll={this.doScroll}\n        secondaryIssueLocations={secondaryIssueLocations}\n        selectedIssue={optimizeSelectedIssue(this.props.issue.key, issuesForLine)}\n        verticalBuffer={verticalBuffer}\n      />\n    );\n  }\n\n  render() {\n    const {\n      component,\n      displaySCM,\n      issue,\n      issuesByLine = {},\n      lastSnippetOfLastGroup,\n      locationsByLine,\n      openIssuesByLine,\n      snippet\n    } = this.props;\n    const lastLine =\n      component.measures && component.measures.lines && parseInt(component.measures.lines, 10);\n\n    const symbols = symbolsByLine(snippet);\n\n    const bottomLine = snippet[snippet.length - 1].line;\n    const issueLine = issue.textRange ? issue.textRange.endLine : issue.line;\n    const lowestVisibleIssue = Math.max(\n      ...Object.keys(issuesByLine)\n        .map(k => parseInt(k, 10))\n        .filter(l => inSnippet(l, snippet) && (l === issueLine || openIssuesByLine[l]))\n    );\n    const verticalBuffer = lastSnippetOfLastGroup\n      ? Math.max(0, LINES_BELOW_ISSUE - (bottomLine - lowestVisibleIssue))\n      : 0;\n\n    const displayDuplications =\n      Boolean(this.props.loadDuplications) && snippet.some(s => !!s.duplicated);\n\n    return (\n      <div className=\"source-viewer-code snippet\" ref={this.snippetNodeRef}>\n        <div>\n          {snippet[0].line > 1 && (\n            <div className=\"expand-block expand-block-above\">\n              <button\n                aria-label={translate('source_viewer.expand_above')}\n                onClick={this.expandBlock('up')}\n                type=\"button\">\n                <ExpandSnippetIcon />\n              </button>\n            </div>\n          )}\n          <table\n            className={classNames('source-table', {\n              'expand-up': snippet[0].line > 1,\n              'expand-down': !lastLine || snippet[snippet.length - 1].line < lastLine\n            })}>\n            <tbody>\n              {snippet.map((line, index) =>\n                this.renderLine({\n                  displayDuplications,\n                  displaySCM,\n                  index,\n                  issuesForLine: issuesByLine[line.line] || [],\n                  issueLocations: locationsByLine[line.line] || [],\n                  line,\n                  snippet,\n                  symbols: symbols[line.line],\n                  verticalBuffer: index === snippet.length - 1 ? verticalBuffer : 0\n                })\n              )}\n            </tbody>\n          </table>\n          {(!lastLine || snippet[snippet.length - 1].line < lastLine) && (\n            <div className=\"expand-block expand-block-below\">\n              <button\n                aria-label={translate('source_viewer.expand_below')}\n                onClick={this.expandBlock('down')}\n                type=\"button\">\n                <ExpandSnippetIcon />\n              </button>\n            </div>\n          )}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { noop } from 'lodash';\nimport * as React from 'react';\nimport { getSources } from '../../../api/components';\nimport Issue from '../../../components/issue/Issue';\nimport getCoverageStatus from '../../../components/SourceViewer/helpers/getCoverageStatus';\nimport { locationsByLine } from '../../../components/SourceViewer/helpers/indexing';\nimport SourceViewerHeaderSlim from '../../../components/SourceViewer/SourceViewerHeaderSlim';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { BranchLike } from '../../../types/branch-like';\nimport SnippetViewer from './SnippetViewer';\nimport {\n  createSnippets,\n  expandSnippet,\n  EXPAND_BY_LINES,\n  linesForSnippets,\n  MERGE_DISTANCE\n} from './utils';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  duplications?: T.Duplication[];\n  duplicationsByLine?: { [line: number]: number[] };\n  highlightedLocationMessage: { index: number; text: string | undefined } | undefined;\n  isLastOccurenceOfPrimaryComponent: boolean;\n  issue: T.Issue;\n  issuePopup?: { issue: string; name: string };\n  issuesByLine: T.IssuesByLine;\n  lastSnippetGroup: boolean;\n  loadDuplications: (component: string, line: T.SourceLine) => void;\n  locations: T.FlowLocation[];\n  onIssueChange: (issue: T.Issue) => void;\n  onIssuePopupToggle: (issue: string, popupName: string, open?: boolean) => void;\n  onLocationSelect: (index: number) => void;\n  renderDuplicationPopup: (\n    component: T.SourceViewerFile,\n    index: number,\n    line: number\n  ) => React.ReactNode;\n  scroll?: (element: HTMLElement, offset: number) => void;\n  snippetGroup: T.SnippetGroup;\n}\n\ninterface State {\n  additionalLines: { [line: number]: T.SourceLine };\n  highlightedSymbols: string[];\n  loading: boolean;\n  openIssuesByLine: T.Dict<boolean>;\n  snippets: T.Snippet[];\n}\n\nexport default class ComponentSourceSnippetGroupViewer extends React.PureComponent<Props, State> {\n  mounted = false;\n  rootNodeRef = React.createRef<HTMLDivElement>();\n  state: State = {\n    additionalLines: {},\n    highlightedSymbols: [],\n    loading: false,\n    openIssuesByLine: {},\n    snippets: []\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.createSnippetsFromProps();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  createSnippetsFromProps() {\n    const { issue, snippetGroup } = this.props;\n\n    const snippets = createSnippets({\n      component: snippetGroup.component.key,\n      issue,\n      locations: snippetGroup.locations\n    });\n\n    this.setState({ snippets });\n  }\n\n  getNodes(index: number): { wrapper: HTMLElement; table: HTMLElement } | undefined {\n    const root = this.rootNodeRef.current;\n    if (!root) {\n      return undefined;\n    }\n    const element = root.querySelector(`#snippet-wrapper-${index}`);\n    if (!element) {\n      return undefined;\n    }\n    const wrapper = element.querySelector<HTMLElement>('.snippet');\n    if (!wrapper) {\n      return undefined;\n    }\n    const table = wrapper.firstChild as HTMLElement;\n    if (!table) {\n      return undefined;\n    }\n\n    return { wrapper, table };\n  }\n\n  /*\n   * Clean after animation\n   */\n  cleanDom(index: number) {\n    const nodes = this.getNodes(index);\n\n    if (!nodes) {\n      return;\n    }\n\n    const { wrapper, table } = nodes;\n\n    table.style.marginTop = '';\n    wrapper.style.maxHeight = '';\n  }\n\n  setMaxHeight(index: number, value?: number, up = false) {\n    const nodes = this.getNodes(index);\n\n    if (!nodes) {\n      return;\n    }\n\n    const { wrapper, table } = nodes;\n\n    const maxHeight = value !== undefined ? value : table.getBoundingClientRect().height;\n\n    if (up) {\n      const startHeight = wrapper.getBoundingClientRect().height;\n      table.style.transition = 'none';\n      table.style.marginTop = `${startHeight - maxHeight}px`;\n\n      // animate!\n      setTimeout(() => {\n        table.style.transition = '';\n        table.style.marginTop = '0px';\n        wrapper.style.maxHeight = `${maxHeight + 20}px`;\n      }, 0);\n    } else {\n      wrapper.style.maxHeight = `${maxHeight + 20}px`;\n    }\n  }\n\n  expandBlock = (snippetIndex: number, direction: T.ExpandDirection): Promise<void> => {\n    const { branchLike, snippetGroup } = this.props;\n    const { key } = snippetGroup.component;\n    const { snippets } = this.state;\n    const snippet = snippets.find(s => s.index === snippetIndex);\n    if (!snippet) {\n      return Promise.reject();\n    }\n    // Extend by EXPAND_BY_LINES and add buffer for merging snippets\n    const extension = EXPAND_BY_LINES + MERGE_DISTANCE - 1;\n    const range =\n      direction === 'up'\n        ? {\n            from: Math.max(1, snippet.start - extension),\n            to: snippet.start - 1\n          }\n        : {\n            from: snippet.end + 1,\n            to: snippet.end + extension\n          };\n    return getSources({\n      key,\n      ...range,\n      ...getBranchLikeQuery(branchLike)\n    })\n      .then(lines =>\n        lines.reduce((lineMap: T.Dict<T.SourceLine>, line) => {\n          line.coverageStatus = getCoverageStatus(line);\n          lineMap[line.line] = line;\n          return lineMap;\n        }, {})\n      )\n      .then(newLinesMapped => this.animateBlockExpansion(snippetIndex, direction, newLinesMapped));\n  };\n\n  animateBlockExpansion(\n    snippetIndex: number,\n    direction: T.ExpandDirection,\n    newLinesMapped: T.Dict<T.SourceLine>\n  ): Promise<void> {\n    if (this.mounted) {\n      const { snippets } = this.state;\n\n      const newSnippets = expandSnippet({\n        direction,\n        snippetIndex,\n        snippets\n      });\n\n      const deletedSnippets = newSnippets.filter(s => s.toDelete);\n\n      // set max-height to current height for CSS transitions\n      deletedSnippets.forEach(s => this.setMaxHeight(s.index));\n      this.setMaxHeight(snippetIndex);\n\n      return new Promise(resolve => {\n        this.setState(\n          ({ additionalLines, snippets }) => {\n            const combinedLines = { ...additionalLines, ...newLinesMapped };\n            return {\n              additionalLines: combinedLines,\n              snippets\n            };\n          },\n          () => {\n            // Set max-height 0 to trigger CSS transitions\n            deletedSnippets.forEach(s => {\n              this.setMaxHeight(s.index, 0);\n            });\n            this.setMaxHeight(snippetIndex, undefined, direction === 'up');\n\n            // Wait for transition to finish before updating dom\n            setTimeout(() => {\n              this.setState({ snippets: newSnippets.filter(s => !s.toDelete) }, resolve);\n              this.cleanDom(snippetIndex);\n            }, 200);\n          }\n        );\n      });\n    }\n    return Promise.resolve();\n  }\n\n  expandComponent = () => {\n    const { branchLike, snippetGroup } = this.props;\n    const { key } = snippetGroup.component;\n\n    this.setState({ loading: true });\n\n    getSources({ key, ...getBranchLikeQuery(branchLike) }).then(\n      lines => {\n        if (this.mounted) {\n          this.setState(({ additionalLines }) => {\n            const combinedLines = { ...additionalLines, ...lines };\n            return {\n              additionalLines: combinedLines,\n              loading: false,\n              snippets: [{ start: 0, end: lines[lines.length - 1].line, index: -1 }]\n            };\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleOpenIssues = (line: T.SourceLine) => {\n    this.setState(state => ({\n      openIssuesByLine: { ...state.openIssuesByLine, [line.line]: true }\n    }));\n  };\n\n  handleCloseIssues = (line: T.SourceLine) => {\n    this.setState(state => ({\n      openIssuesByLine: { ...state.openIssuesByLine, [line.line]: false }\n    }));\n  };\n\n  handleSymbolClick = (clickedSymbols: string[]) => {\n    this.setState(({ highlightedSymbols }) => {\n      const newHighlightedSymbols = clickedSymbols.filter(\n        symb => !highlightedSymbols.includes(symb)\n      );\n      return { highlightedSymbols: newHighlightedSymbols };\n    });\n  };\n\n  loadDuplications = (line: T.SourceLine) => {\n    this.props.loadDuplications(this.props.snippetGroup.component.key, line);\n  };\n\n  renderDuplicationPopup = (index: number, line: number) => {\n    return this.props.renderDuplicationPopup(this.props.snippetGroup.component, index, line);\n  };\n\n  renderSnippet({\n    index,\n    issuesByLine,\n    lastSnippetOfLastGroup,\n    locationsByLine,\n    snippet\n  }: {\n    index: number;\n    issuesByLine: T.IssuesByLine;\n    lastSnippetOfLastGroup: boolean;\n    locationsByLine: { [line: number]: T.LinearIssueLocation[] };\n    snippet: T.SourceLine[];\n  }) {\n    return (\n      <SnippetViewer\n        branchLike={this.props.branchLike}\n        component={this.props.snippetGroup.component}\n        duplications={this.props.duplications}\n        duplicationsByLine={this.props.duplicationsByLine}\n        expandBlock={this.expandBlock}\n        handleCloseIssues={this.handleCloseIssues}\n        handleOpenIssues={this.handleOpenIssues}\n        handleSymbolClick={this.handleSymbolClick}\n        highlightedLocationMessage={this.props.highlightedLocationMessage}\n        highlightedSymbols={this.state.highlightedSymbols}\n        index={index}\n        issue={this.props.issue}\n        issuePopup={this.props.issuePopup}\n        issuesByLine={issuesByLine}\n        lastSnippetOfLastGroup={lastSnippetOfLastGroup}\n        loadDuplications={this.loadDuplications}\n        locations={this.props.locations}\n        locationsByLine={locationsByLine}\n        onIssueChange={this.props.onIssueChange}\n        onIssuePopupToggle={this.props.onIssuePopupToggle}\n        onLocationSelect={this.props.onLocationSelect}\n        openIssuesByLine={this.state.openIssuesByLine}\n        renderDuplicationPopup={this.renderDuplicationPopup}\n        scroll={this.props.scroll}\n        snippet={snippet}\n      />\n    );\n  }\n\n  render() {\n    const {\n      branchLike,\n      isLastOccurenceOfPrimaryComponent,\n      issue,\n      issuesByLine,\n      issuePopup,\n      lastSnippetGroup,\n      snippetGroup\n    } = this.props;\n    const { additionalLines, loading, snippets } = this.state;\n    const locations =\n      issue.component === snippetGroup.component.key && issue.textRange !== undefined\n        ? locationsByLine([issue])\n        : {};\n\n    const fullyShown =\n      snippets.length === 1 &&\n      snippetGroup.component.measures &&\n      snippets[0].end - snippets[0].start ===\n        parseInt(snippetGroup.component.measures.lines || '', 10);\n\n    const snippetLines = linesForSnippets(snippets, {\n      ...snippetGroup.sources,\n      ...additionalLines\n    });\n\n    const isFlow = issue.secondaryLocations.length === 0;\n    const includeIssueLocation = isFlow ? isLastOccurenceOfPrimaryComponent : true;\n\n    return (\n      <div className=\"component-source-container\" ref={this.rootNodeRef}>\n        <SourceViewerHeaderSlim\n          branchLike={branchLike}\n          expandable={!fullyShown}\n          loading={loading}\n          onExpand={this.expandComponent}\n          sourceViewerFile={snippetGroup.component}\n        />\n        {issue.component === snippetGroup.component.key && issue.textRange === undefined && (\n          <div className=\"padded-top padded-left padded-right\">\n            <Issue\n              issue={issue}\n              onChange={this.props.onIssueChange}\n              onClick={noop}\n              onPopupToggle={this.props.onIssuePopupToggle}\n              openPopup={issuePopup && issuePopup.issue === issue.key ? issuePopup.name : undefined}\n              selected={true}\n            />\n          </div>\n        )}\n        {snippetLines.map((snippet, index) => (\n          <div id={`snippet-wrapper-${snippets[index].index}`} key={snippets[index].index}>\n            {this.renderSnippet({\n              snippet,\n              index: snippets[index].index,\n              issuesByLine,\n              locationsByLine: includeIssueLocation ? locations : {},\n              lastSnippetOfLastGroup: lastSnippetGroup && index === snippets.length - 1\n            })}\n          </div>\n        ))}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { findLastIndex } from 'lodash';\nimport * as React from 'react';\nimport { getDuplications } from '../../../api/components';\nimport { getIssueFlowSnippets } from '../../../api/issues';\nimport throwGlobalError from '../../../app/utils/throwGlobalError';\nimport DuplicationPopup from '../../../components/SourceViewer/components/DuplicationPopup';\nimport {\n  filterDuplicationBlocksByLine,\n  getDuplicationBlocksForIndex,\n  isDuplicationBlockInRemovedComponent\n} from '../../../components/SourceViewer/helpers/duplications';\nimport {\n  duplicationsByLine as getDuplicationsByLine,\n  issuesByComponentAndLine\n} from '../../../components/SourceViewer/helpers/indexing';\nimport { SourceViewerContext } from '../../../components/SourceViewer/SourceViewerContext';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { WorkspaceContext } from '../../../components/workspace/context';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport ComponentSourceSnippetGroupViewer from './ComponentSourceSnippetGroupViewer';\nimport { groupLocationsByComponent } from './utils';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  highlightedLocationMessage?: { index: number; text: string | undefined };\n  issue: T.Issue;\n  issues: T.Issue[];\n  locations: T.FlowLocation[];\n  onIssueChange: (issue: T.Issue) => void;\n  onLoaded?: () => void;\n  onLocationSelect: (index: number) => void;\n  scroll?: (element: HTMLElement) => void;\n  selectedFlowIndex: number | undefined;\n}\n\ninterface State {\n  components: T.Dict<T.SnippetsByComponent>;\n  duplicatedFiles?: T.Dict<T.DuplicatedFile>;\n  duplications?: T.Duplication[];\n  duplicationsByLine: { [line: number]: number[] };\n  issuePopup?: { issue: string; name: string };\n  loading: boolean;\n  notAccessible: boolean;\n}\n\nexport default class CrossComponentSourceViewerWrapper extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    components: {},\n    duplicationsByLine: {},\n    loading: true,\n    notAccessible: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchIssueFlowSnippets(this.props.issue.key);\n  }\n\n  componentWillReceiveProps(newProps: Props) {\n    if (newProps.issue.key !== this.props.issue.key) {\n      this.fetchIssueFlowSnippets(newProps.issue.key);\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchDuplications = (component: string) => {\n    getDuplications({\n      key: component,\n      ...getBranchLikeQuery(this.props.branchLike)\n    }).then(\n      r => {\n        if (this.mounted) {\n          this.setState({\n            duplicatedFiles: r.files,\n            duplications: r.duplications,\n            duplicationsByLine: getDuplicationsByLine(r.duplications)\n          });\n        }\n      },\n      () => {}\n    );\n  };\n\n  fetchIssueFlowSnippets(issueKey: string) {\n    this.setState({ loading: true });\n    getIssueFlowSnippets(issueKey).then(\n      components => {\n        if (this.mounted) {\n          this.setState({\n            components,\n            issuePopup: undefined,\n            loading: false\n          });\n          if (this.props.onLoaded) {\n            this.props.onLoaded();\n          }\n        }\n      },\n      (response: Response) => {\n        if (response.status !== 403) {\n          throwGlobalError(response);\n        }\n        if (this.mounted) {\n          this.setState({ loading: false, notAccessible: response.status === 403 });\n        }\n      }\n    );\n  }\n\n  handleIssuePopupToggle = (issue: string, popupName: string, open?: boolean) => {\n    this.setState((state: State) => {\n      const samePopup =\n        state.issuePopup && state.issuePopup.name === popupName && state.issuePopup.issue === issue;\n      if (open !== false && !samePopup) {\n        return { issuePopup: { issue, name: popupName } };\n      } else if (open !== true && samePopup) {\n        return { issuePopup: undefined };\n      }\n      return null;\n    });\n  };\n\n  renderDuplicationPopup = (component: T.SourceViewerFile, index: number, line: number) => {\n    const { duplicatedFiles, duplications } = this.state;\n\n    if (!component || !duplicatedFiles) {\n      return null;\n    }\n\n    const blocks = getDuplicationBlocksForIndex(duplications, index);\n\n    return (\n      <WorkspaceContext.Consumer>\n        {({ openComponent }) => (\n          <DuplicationPopup\n            blocks={filterDuplicationBlocksByLine(blocks, line)}\n            branchLike={this.props.branchLike}\n            duplicatedFiles={duplicatedFiles}\n            inRemovedComponent={isDuplicationBlockInRemovedComponent(blocks)}\n            openComponent={openComponent}\n            sourceViewerFile={component}\n          />\n        )}\n      </WorkspaceContext.Consumer>\n    );\n  };\n\n  render() {\n    const { loading, notAccessible } = this.state;\n\n    if (loading) {\n      return (\n        <div>\n          <DeferredSpinner />\n        </div>\n      );\n    }\n\n    if (notAccessible) {\n      return (\n        <Alert className=\"spacer-top\" variant=\"warning\">\n          {translate('code_viewer.no_source_code_displayed_due_to_security')}\n        </Alert>\n      );\n    }\n\n    const { issue, locations } = this.props;\n    const { components, duplications, duplicationsByLine } = this.state;\n    const issuesByComponent = issuesByComponentAndLine(this.props.issues);\n    const locationsByComponent = groupLocationsByComponent(issue, locations, components);\n\n    const lastOccurenceOfPrimaryComponent = findLastIndex(\n      locationsByComponent,\n      ({ component }) => component.key === issue.component\n    );\n\n    return (\n      <div>\n        {locationsByComponent.map((snippetGroup, i) => {\n          return (\n            <SourceViewerContext.Provider\n              // eslint-disable-next-line react/no-array-index-key\n              key={`${issue.key}-${this.props.selectedFlowIndex || 0}-${i}`}\n              value={{ branchLike: this.props.branchLike, file: snippetGroup.component }}>\n              <ComponentSourceSnippetGroupViewer\n                branchLike={this.props.branchLike}\n                duplications={duplications}\n                duplicationsByLine={duplicationsByLine}\n                highlightedLocationMessage={this.props.highlightedLocationMessage}\n                issue={issue}\n                issuePopup={this.state.issuePopup}\n                issuesByLine={issuesByComponent[snippetGroup.component.key] || {}}\n                isLastOccurenceOfPrimaryComponent={i === lastOccurenceOfPrimaryComponent}\n                lastSnippetGroup={i === locationsByComponent.length - 1}\n                loadDuplications={this.fetchDuplications}\n                locations={snippetGroup.locations || []}\n                onIssueChange={this.props.onIssueChange}\n                onIssuePopupToggle={this.handleIssuePopupToggle}\n                onLocationSelect={this.props.onLocationSelect}\n                renderDuplicationPopup={this.renderDuplicationPopup}\n                scroll={this.props.scroll}\n                snippetGroup={snippetGroup}\n              />\n            </SourceViewerContext.Provider>\n          );\n        })}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\n\nconst CrossComponentSourceViewer = lazyLoadComponent(\n  () => import(/* webpackPrefetch: true */ './CrossComponentSourceViewerWrapper'),\n  'CrossComponentSourceViewer'\n);\n\nexport default CrossComponentSourceViewer;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SourceViewer from '../../../components/SourceViewer/SourceViewer';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { BranchLike } from '../../../types/branch-like';\nimport CrossComponentSourceViewer from '../crossComponentSourceViewer/CrossComponentSourceViewer';\nimport { getLocations, getSelectedLocation } from '../utils';\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  issues: T.Issue[];\n  loadIssues: (component: string, from: number, to: number) => Promise<T.Issue[]>;\n  locationsNavigator: boolean;\n  onIssueChange: (issue: T.Issue) => void;\n  onIssueSelect: (issueKey: string) => void;\n  onLocationSelect: (index: number) => void;\n  openIssue: T.Issue;\n  selectedFlowIndex: number | undefined;\n  selectedLocationIndex: number | undefined;\n}\n\nexport default class IssuesSourceViewer extends React.PureComponent<Props> {\n  node?: HTMLElement | null;\n\n  componentDidUpdate(prevProps: Props) {\n    const { openIssue, selectedLocationIndex } = this.props;\n\n    // Scroll back to the issue when the selected location is set to -1\n    const shouldScrollBackToIssue =\n      selectedLocationIndex === -1 && selectedLocationIndex !== prevProps.selectedLocationIndex;\n    if (\n      prevProps.openIssue.component === openIssue.component &&\n      (prevProps.openIssue !== openIssue || shouldScrollBackToIssue)\n    ) {\n      this.scrollToIssue();\n    }\n  }\n\n  scrollToIssue = (smooth = true) => {\n    if (this.node) {\n      const element = this.node.querySelector(`[data-issue=\"${this.props.openIssue.key}\"]`);\n      if (element) {\n        this.handleScroll(element, undefined, smooth);\n      }\n    }\n  };\n\n  handleScroll = (element: Element, offset = window.innerHeight / 2, smooth = true) => {\n    scrollToElement(element, { topOffset: offset - 100, bottomOffset: offset, smooth });\n  };\n\n  handleLoaded = () => {\n    this.scrollToIssue(false);\n  };\n\n  render() {\n    const { openIssue, selectedFlowIndex, selectedLocationIndex } = this.props;\n\n    const locations = getLocations(openIssue, selectedFlowIndex).map((loc, index) => {\n      loc.index = index;\n      return loc;\n    });\n    const selectedLocation = getSelectedLocation(\n      openIssue,\n      selectedFlowIndex,\n      selectedLocationIndex\n    );\n\n    const highlightedLocationMessage =\n      this.props.locationsNavigator && selectedLocationIndex !== undefined\n        ? selectedLocation && { index: selectedLocationIndex, text: selectedLocation.msg }\n        : undefined;\n\n    const startLines = locations.map(l => l.textRange.startLine);\n    const showCrossComponentSourceViewer =\n      startLines.length > 0 ? Math.max(...startLines) !== Math.min(...startLines) : false;\n\n    if (showCrossComponentSourceViewer) {\n      return (\n        <div ref={node => (this.node = node)}>\n          <CrossComponentSourceViewer\n            branchLike={this.props.branchLike}\n            highlightedLocationMessage={highlightedLocationMessage}\n            issue={openIssue}\n            issues={this.props.issues}\n            locations={locations}\n            onIssueChange={this.props.onIssueChange}\n            onLoaded={this.handleLoaded}\n            onLocationSelect={this.props.onLocationSelect}\n            scroll={this.handleScroll}\n            selectedFlowIndex={selectedFlowIndex}\n          />\n        </div>\n      );\n    } else {\n      // if location is selected, show (and load) code around it\n      // otherwise show code around the open issue\n      const aroundLine = selectedLocation\n        ? selectedLocation.textRange.startLine\n        : openIssue.textRange && openIssue.textRange.endLine;\n\n      const component = selectedLocation ? selectedLocation.component : openIssue.component;\n      const allMessagesEmpty =\n        locations !== undefined && locations.every(location => !location.msg);\n\n      const highlightedLocations = locations.filter(location => location.component === component);\n\n      // do not load issues when open another file for a location\n      const loadIssues =\n        component === openIssue.component ? this.props.loadIssues : () => Promise.resolve([]);\n      const selectedIssue = component === openIssue.component ? openIssue.key : undefined;\n\n      return (\n        <div ref={node => (this.node = node)}>\n          <SourceViewer\n            aroundLine={aroundLine}\n            branchLike={this.props.branchLike}\n            component={component}\n            displayAllIssues={true}\n            displayIssueLocationsCount={true}\n            displayIssueLocationsLink={false}\n            displayLocationMarkers={!allMessagesEmpty}\n            highlightedLocationMessage={highlightedLocationMessage}\n            highlightedLocations={highlightedLocations}\n            loadIssues={loadIssues}\n            onIssueChange={this.props.onIssueChange}\n            onIssueSelect={this.props.onIssueSelect}\n            onLoaded={this.handleLoaded}\n            onLocationSelect={this.props.onLocationSelect}\n            scroll={this.handleScroll}\n            selectedIssue={selectedIssue}\n            slimHeader={true}\n          />\n        </div>\n      );\n    }\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  myIssues: boolean;\n  onMyIssuesChange: (myIssues: boolean) => void;\n}\n\nexport default class MyIssuesFilter extends React.PureComponent<Props> {\n  handleClick = (myIssues: boolean) => () => {\n    this.props.onMyIssuesChange(myIssues);\n  };\n\n  render() {\n    const { myIssues } = this.props;\n\n    return (\n      <div className=\"issues-my-issues-filter\">\n        <div className=\"button-group\">\n          <Button\n            className={myIssues ? 'button-active' : undefined}\n            onClick={this.handleClick(true)}>\n            {translate('issues.my_issues')}\n          </Button>\n          <Button\n            className={myIssues ? undefined : 'button-active'}\n            onClick={this.handleClick(false)}>\n            {translate('all')}\n          </Button>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport '../../../components/common/EmptySearch.css';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function NoIssues() {\n  return (\n    <div className=\"empty-search\">\n      <h3>{translate('issues.no_issues')}</h3>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport '../../../components/common/EmptySearch.css';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function NoMyIssues() {\n  return (\n    <div className=\"empty-search\">\n      <h3>{translate('issues.no_my_issues')}</h3>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\ninterface Props extends IconProps {\n  filled?: boolean;\n}\n\nexport default function HomeIcon({ className, fill, filled = false, ...iconProps }: Props) {\n  return (\n    <Icon\n      className={classNames(className, 'icon-outline', { 'is-filled': filled })}\n      style={{ color: fill || colors.orange }}\n      {...iconProps}>\n      <g transform=\"matrix(0.870918,0,0,0.870918,0.978227,0.978227)\">\n        <path d=\"M15.9,7.8L8.2,0.1C8.1,0 7.9,0 7.8,0.1L0.1,7.8C0,7.9 0,8.1 0.1,8.2C0.2,8.3 0.2,8.3 0.3,8.3L2.2,8.3L2.2,15.8C2.2,15.9 2.2,15.9 2.3,16C2.3,16 2.4,16.1 2.5,16.1L6.2,16.1C6.3,16.1 6.5,16 6.5,15.8L6.5,10.5L9.7,10.5L9.7,15.8C9.7,15.9 9.8,16.1 10,16.1L13.7,16.1C13.8,16.1 14,16 14,15.8L14,8.2L15.9,8.2C16,8.2 16,8.2 16.1,8.1C16,8 16.1,7.9 15.9,7.8Z\" />\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { ButtonLink } from '../../components/controls/buttons';\nimport Tooltip from '../../components/controls/Tooltip';\nimport HomeIcon from '../../components/icons/HomeIcon';\nimport { translate } from '../../helpers/l10n';\nimport { isLoggedIn } from '../../helpers/users';\nimport { getCurrentUser, Store } from '../../store/rootReducer';\nimport { setHomePage } from '../../store/users';\n\ninterface StateProps {\n  currentUser: T.CurrentUser;\n}\n\ninterface DispatchProps {\n  setHomePage: (homepage: T.HomePage) => void;\n}\n\ninterface Props extends StateProps, DispatchProps {\n  className?: string;\n  currentPage: T.HomePage;\n}\n\nexport const DEFAULT_HOMEPAGE: T.HomePage = { type: 'PROJECTS' };\n\nexport class HomePageSelect extends React.PureComponent<Props> {\n  handleClick = () => {\n    this.props.setHomePage(this.props.currentPage);\n  };\n\n  handleReset = () => {\n    this.props.setHomePage(DEFAULT_HOMEPAGE);\n  };\n\n  render() {\n    const { currentPage, currentUser } = this.props;\n\n    if (!isLoggedIn(currentUser)) {\n      return null;\n    }\n\n    const { homepage } = currentUser;\n    const isChecked = homepage !== undefined && isSameHomePage(homepage, currentPage);\n    const isDefault = isChecked && isSameHomePage(currentPage, DEFAULT_HOMEPAGE);\n    const tooltip = isChecked\n      ? translate(isDefault ? 'homepage.current.is_default' : 'homepage.current')\n      : translate('homepage.check');\n\n    return (\n      <Tooltip overlay={tooltip}>\n        {isDefault ? (\n          <span\n            aria-label={tooltip}\n            className={classNames('display-inline-block', this.props.className)}>\n            <HomeIcon filled={isChecked} />\n          </span>\n        ) : (\n          <ButtonLink\n            aria-label={tooltip}\n            className={classNames('link-no-underline', 'set-homepage-link', this.props.className)}\n            onClick={isChecked ? this.handleReset : this.handleClick}>\n            <HomeIcon filled={isChecked} />\n          </ButtonLink>\n        )}\n      </Tooltip>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store): StateProps => ({\n  currentUser: getCurrentUser(state)\n});\n\nconst mapDispatchToProps: DispatchProps = { setHomePage };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(HomePageSelect);\n\nfunction isSameHomePage(a: T.HomePage, b: T.HomePage) {\n  return (\n    a.type === b.type &&\n    (a as any).branch === (b as any).branch &&\n    (a as any).component === (b as any).component\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport PageCounter from '../../../components/common/PageCounter';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  current: number | undefined;\n  total: number;\n}\n\nexport default function IssuesCounter(props: Props) {\n  return (\n    <PageCounter\n      className=\"spacer-left\"\n      current={props.current}\n      label={translate('issues.issues')}\n      total={props.total}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\n\nexport default function TotalEffort({ effort }: { effort: number }) {\n  return (\n    <div className=\"display-inline-block bordered-left spacer-left\">\n      <div className=\"spacer-left\">\n        <FormattedMessage\n          defaultMessage={translate('issue.x_effort')}\n          id=\"issue.x_effort\"\n          values={{ 0: <strong>{formatMeasure(effort, 'WORK_DUR')}</strong> }}\n        />\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HomePageSelect from '../../../components/controls/HomePageSelect';\nimport PageShortcutsTooltip from '../../../components/ui/PageShortcutsTooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { isSonarCloud } from '../../../helpers/system';\nimport IssuesCounter from './IssuesCounter';\nimport TotalEffort from './TotalEffort';\n\nexport interface PageActionsProps {\n  canSetHome: boolean;\n  effortTotal: number | undefined;\n  paging?: T.Paging;\n  selectedIndex?: number;\n}\n\nexport default function PageActions(props: PageActionsProps) {\n  const { canSetHome, effortTotal, paging, selectedIndex } = props;\n\n  return (\n    <div className=\"display-flex-center display-flex-justify-end\">\n      <PageShortcutsTooltip\n        leftAndRightLabel={translate('issues.to_navigate')}\n        upAndDownLabel={translate('issues.to_select_issues')}\n      />\n\n      <div className=\"spacer-left issues-page-actions\">\n        {paging != null && <IssuesCounter current={selectedIndex} total={paging.total} />}\n        {effortTotal !== undefined && <TotalEffort effort={effortTotal} />}\n      </div>\n\n      {canSetHome && (\n        <HomePageSelect\n          className=\"huge-spacer-left\"\n          currentPage={isSonarCloud() ? { type: 'MY_ISSUES' } : { type: 'ISSUES' }}\n        />\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport key from 'keymaster';\nimport { debounce, keyBy, omit, without } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { FormattedMessage } from 'react-intl';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport EmptySearch from '../../../components/common/EmptySearch';\nimport FiltersHeader from '../../../components/common/FiltersHeader';\nimport ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';\nimport { Button } from '../../../components/controls/buttons';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport { Location, Router } from '../../../components/hoc/withRouter';\nimport '../../../components/search-navigator.css';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport {\n  fillBranchLike,\n  getBranchLikeQuery,\n  isPullRequest,\n  isSameBranchLike\n} from '../../../helpers/branch-like';\nimport handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport {\n  addSideBarClass,\n  addWhitePageClass,\n  removeSideBarClass,\n  removeWhitePageClass\n} from '../../../helpers/pages';\nimport { serializeDate } from '../../../helpers/query';\nimport { isSonarCloud } from '../../../helpers/system';\nimport { BranchLike } from '../../../types/branch-like';\nimport {\n  Facet,\n  FetchIssuesPromise,\n  ReferencedComponent,\n  ReferencedLanguage,\n  ReferencedRule\n} from '../../../types/issues';\nimport { SecurityStandard } from '../../../types/security';\nimport * as actions from '../actions';\nimport ConciseIssuesList from '../conciseIssuesList/ConciseIssuesList';\nimport ConciseIssuesListHeader from '../conciseIssuesList/ConciseIssuesListHeader';\nimport Sidebar from '../sidebar/Sidebar';\nimport '../styles.css';\nimport {\n  areMyIssuesSelected,\n  areQueriesEqual,\n  getOpen,\n  parseFacets,\n  parseQuery,\n  Query,\n  saveMyIssues,\n  scrollToIssue,\n  serializeQuery,\n  shouldOpenSonarSourceSecurityFacet,\n  shouldOpenStandardsChildFacet,\n  shouldOpenStandardsFacet,\n  STANDARDS\n} from '../utils';\nimport BulkChangeModal, { MAX_PAGE_SIZE } from './BulkChangeModal';\nimport IssuesList from './IssuesList';\nimport IssuesSourceViewer from './IssuesSourceViewer';\nimport MyIssuesFilter from './MyIssuesFilter';\nimport NoIssues from './NoIssues';\nimport NoMyIssues from './NoMyIssues';\nimport PageActions from './PageActions';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component?: T.Component;\n  currentUser: T.CurrentUser;\n  fetchBranchStatus: (branchLike: BranchLike, projectKey: string) => void;\n  fetchIssues: (query: T.RawQuery) => Promise<FetchIssuesPromise>;\n  location: Location;\n  onBranchesChange?: () => void;\n  router: Pick<Router, 'push' | 'replace'>;\n}\n\nexport interface State {\n  bulkChangeModal: boolean;\n  cannotShowOpenIssue?: boolean;\n  checkAll?: boolean;\n  checked: string[];\n  effortTotal?: number;\n  facets: T.Dict<Facet>;\n  issues: T.Issue[];\n  loading: boolean;\n  loadingFacets: T.Dict<boolean>;\n  loadingMore: boolean;\n  locationsNavigator: boolean;\n  myIssues: boolean;\n  openFacets: T.Dict<boolean>;\n  openIssue?: T.Issue;\n  openPopup?: { issue: string; name: string };\n  paging?: T.Paging;\n  query: Query;\n  referencedComponentsById: T.Dict<ReferencedComponent>;\n  referencedComponentsByKey: T.Dict<ReferencedComponent>;\n  referencedLanguages: T.Dict<ReferencedLanguage>;\n  referencedRules: T.Dict<ReferencedRule>;\n  referencedUsers: T.Dict<T.UserBase>;\n  selected?: string;\n  selectedFlowIndex?: number;\n  selectedLocationIndex?: number;\n}\n\nconst DEFAULT_QUERY = { resolved: 'false' };\nconst MAX_INITAL_FETCH = 1000;\n\nexport default class App extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    const query = parseQuery(props.location.query);\n    this.state = {\n      bulkChangeModal: false,\n      checked: [],\n      facets: {},\n      issues: [],\n      loading: true,\n      loadingFacets: {},\n      loadingMore: false,\n      locationsNavigator: false,\n      myIssues: areMyIssuesSelected(props.location.query),\n      openFacets: {\n        owaspTop10: shouldOpenStandardsChildFacet({}, query, SecurityStandard.OWASP_TOP10),\n        sansTop25: shouldOpenStandardsChildFacet({}, query, SecurityStandard.SANS_TOP25),\n        severities: true,\n        sonarsourceSecurity: shouldOpenSonarSourceSecurityFacet({}, query),\n        standards: shouldOpenStandardsFacet({}, query),\n        types: true\n      },\n      query,\n      referencedComponentsById: {},\n      referencedComponentsByKey: {},\n      referencedLanguages: {},\n      referencedRules: {},\n      referencedUsers: {},\n      selected: getOpen(props.location.query)\n    };\n    this.refreshBranchStatus = debounce(this.refreshBranchStatus, 1000);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n\n    if (this.state.myIssues && !this.props.currentUser.isLoggedIn) {\n      handleRequiredAuthentication();\n      return;\n    }\n\n    addWhitePageClass();\n    addSideBarClass();\n    this.attachShortcuts();\n    this.fetchFirstIssues();\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    const { issues, selected } = this.state;\n    const openIssue = this.getOpenIssue(nextProps, issues);\n\n    if (openIssue && openIssue.key !== selected) {\n      this.setState({\n        locationsNavigator: false,\n        selected: openIssue.key,\n        selectedFlowIndex: undefined,\n        selectedLocationIndex: undefined\n      });\n    }\n\n    if (!openIssue) {\n      this.setState({ selectedFlowIndex: undefined, selectedLocationIndex: undefined });\n    }\n\n    this.setState({\n      myIssues: areMyIssuesSelected(nextProps.location.query),\n      openIssue,\n      query: parseQuery(nextProps.location.query)\n    });\n  }\n\n  componentDidUpdate(prevProps: Props, prevState: State) {\n    const { query } = this.props.location;\n    const { query: prevQuery } = prevProps.location;\n    if (\n      prevProps.component !== this.props.component ||\n      !isSameBranchLike(prevProps.branchLike, this.props.branchLike) ||\n      !areQueriesEqual(prevQuery, query) ||\n      areMyIssuesSelected(prevQuery) !== areMyIssuesSelected(query)\n    ) {\n      this.fetchFirstIssues();\n      this.setState({ checkAll: false });\n    } else if (\n      !this.state.openIssue &&\n      (prevState.selected !== this.state.selected || prevState.openIssue)\n    ) {\n      // if user simply selected another issue\n      // or if user went from the source code back to the list of issues\n      this.scrollToSelectedIssue();\n    }\n  }\n\n  componentWillUnmount() {\n    this.detachShortcuts();\n    this.mounted = false;\n    removeWhitePageClass();\n    removeSideBarClass();\n  }\n\n  attachShortcuts() {\n    key.setScope('issues');\n    key('up', 'issues', () => {\n      this.selectPreviousIssue();\n      return false;\n    });\n    key('down', 'issues', () => {\n      this.selectNextIssue();\n      return false;\n    });\n    key('right', 'issues', () => {\n      this.openSelectedIssue();\n      return false;\n    });\n    key('left', 'issues', () => {\n      if (this.state.query.issues.length !== 1) {\n        this.closeIssue();\n      }\n      return false;\n    });\n    window.addEventListener('keydown', this.handleKeyDown);\n    window.addEventListener('keyup', this.handleKeyUp);\n  }\n\n  detachShortcuts() {\n    key.deleteScope('issues');\n    window.removeEventListener('keydown', this.handleKeyDown);\n    window.removeEventListener('keyup', this.handleKeyUp);\n  }\n\n  handleKeyDown = (event: KeyboardEvent) => {\n    if (key.getScope() !== 'issues') {\n      return;\n    }\n    if (event.keyCode === 18) {\n      // alt\n      event.preventDefault();\n      this.setState(actions.enableLocationsNavigator);\n    } else if (event.keyCode === 40 && event.altKey) {\n      // alt + down\n      event.preventDefault();\n      this.selectNextLocation();\n    } else if (event.keyCode === 38 && event.altKey) {\n      // alt + up\n      event.preventDefault();\n      this.selectPreviousLocation();\n    } else if (event.keyCode === 37 && event.altKey) {\n      // alt + left\n      event.preventDefault();\n      this.selectPreviousFlow();\n    } else if (event.keyCode === 39 && event.altKey) {\n      // alt + right\n      event.preventDefault();\n      this.selectNextFlow();\n    }\n  };\n\n  handleKeyUp = (event: KeyboardEvent) => {\n    if (key.getScope() !== 'issues') {\n      return;\n    }\n    if (event.keyCode === 18) {\n      // alt\n      this.setState(actions.disableLocationsNavigator);\n    }\n  };\n\n  getSelectedIndex() {\n    const { issues = [], selected } = this.state;\n    const index = issues.findIndex(issue => issue.key === selected);\n    return index !== -1 ? index : undefined;\n  }\n\n  getOpenIssue = (props: Props, issues: T.Issue[]) => {\n    const open = getOpen(props.location.query);\n    return open ? issues.find(issue => issue.key === open) : undefined;\n  };\n\n  selectNextIssue = () => {\n    const { issues } = this.state;\n    const selectedIndex = this.getSelectedIndex();\n    if (selectedIndex !== undefined && selectedIndex < issues.length - 1) {\n      if (this.state.openIssue) {\n        this.openIssue(issues[selectedIndex + 1].key);\n      } else {\n        this.setState({\n          selected: issues[selectedIndex + 1].key,\n          selectedFlowIndex: undefined,\n          selectedLocationIndex: undefined\n        });\n      }\n    }\n  };\n\n  selectPreviousIssue = () => {\n    const { issues } = this.state;\n    const selectedIndex = this.getSelectedIndex();\n    if (selectedIndex !== undefined && selectedIndex > 0) {\n      if (this.state.openIssue) {\n        this.openIssue(issues[selectedIndex - 1].key);\n      } else {\n        this.setState({\n          selected: issues[selectedIndex - 1].key,\n          selectedFlowIndex: undefined,\n          selectedLocationIndex: undefined\n        });\n      }\n    }\n  };\n\n  openIssue = (issueKey: string) => {\n    const path = {\n      pathname: this.props.location.pathname,\n      query: {\n        ...serializeQuery(this.state.query),\n        ...getBranchLikeQuery(this.props.branchLike),\n        id: this.props.component && this.props.component.key,\n        myIssues: this.state.myIssues ? 'true' : undefined,\n        open: issueKey\n      }\n    };\n    if (this.state.openIssue) {\n      if (path.query.open && path.query.open === this.state.openIssue.key) {\n        this.setState(\n          {\n            locationsNavigator: false,\n            selectedFlowIndex: undefined,\n            selectedLocationIndex: undefined\n          },\n          this.scrollToSelectedIssue\n        );\n      } else {\n        this.props.router.replace(path);\n      }\n    } else {\n      this.props.router.push(path);\n    }\n  };\n\n  closeIssue = () => {\n    if (this.state.query) {\n      this.props.router.push({\n        pathname: this.props.location.pathname,\n        query: {\n          ...serializeQuery(this.state.query),\n          ...getBranchLikeQuery(this.props.branchLike),\n          id: this.props.component && this.props.component.key,\n          myIssues: this.state.myIssues ? 'true' : undefined,\n          open: undefined\n        }\n      });\n    }\n  };\n\n  openSelectedIssue = () => {\n    const { selected } = this.state;\n    if (selected) {\n      this.openIssue(selected);\n    }\n  };\n\n  scrollToSelectedIssue = (smooth = true) => {\n    const { selected } = this.state;\n    if (selected) {\n      scrollToIssue(selected, smooth);\n    }\n  };\n\n  createdAfterIncludesTime = () => Boolean(this.props.location.query.createdAfter?.includes('T'));\n\n  fetchIssues = (additional: T.RawQuery, requestFacets = false): Promise<FetchIssuesPromise> => {\n    const { component } = this.props;\n    const { myIssues, openFacets, query } = this.state;\n\n    const facets = requestFacets\n      ? Object.keys(openFacets)\n          .filter(facet => facet !== STANDARDS)\n          .join(',')\n      : undefined;\n\n    const parameters: T.Dict<string | undefined> = {\n      ...getBranchLikeQuery(this.props.branchLike),\n      componentKeys: component && component.key,\n      s: 'FILE_LINE',\n      ...serializeQuery(query),\n      ps: '100',\n      facets,\n      ...additional\n    };\n\n    if (query.createdAfter !== undefined && this.createdAfterIncludesTime()) {\n      parameters.createdAfter = serializeDate(query.createdAfter);\n    }\n\n    // only sorting by CREATION_DATE is allowed, so let's sort DESC\n    if (query.sort) {\n      Object.assign(parameters, { asc: 'false' });\n    }\n\n    if (myIssues) {\n      Object.assign(parameters, { assignees: '__me__' });\n    }\n\n    return this.props.fetchIssues(parameters);\n  };\n\n  fetchFirstIssues() {\n    const prevQuery = this.props.location.query;\n    const openIssueKey = getOpen(this.props.location.query);\n    let fetchPromise;\n\n    this.setState({ checked: [], loading: true });\n    if (openIssueKey !== undefined) {\n      fetchPromise = this.fetchIssuesUntil(1, (pageIssues: T.Issue[], paging: T.Paging) => {\n        if (\n          paging.total <= paging.pageIndex * paging.pageSize ||\n          paging.pageIndex * paging.pageSize >= MAX_INITAL_FETCH\n        ) {\n          return true;\n        }\n        return pageIssues.some(issue => issue.key === openIssueKey);\n      });\n    } else {\n      fetchPromise = this.fetchIssues({}, true);\n    }\n\n    return fetchPromise.then(\n      ({ effortTotal, facets, issues, paging, ...other }) => {\n        if (this.mounted && areQueriesEqual(prevQuery, this.props.location.query)) {\n          const openIssue = this.getOpenIssue(this.props, issues);\n          let selected: string | undefined = undefined;\n          if (issues.length > 0) {\n            selected = openIssue ? openIssue.key : issues[0].key;\n          }\n          this.setState(state => ({\n            cannotShowOpenIssue: Boolean(openIssueKey && !openIssue),\n            effortTotal,\n            facets: { ...state.facets, ...parseFacets(facets) },\n            loading: false,\n            issues,\n            openIssue,\n            paging,\n            referencedComponentsById: keyBy(other.components, 'uuid'),\n            referencedComponentsByKey: keyBy(other.components, 'key'),\n            referencedLanguages: keyBy(other.languages, 'key'),\n            referencedRules: keyBy(other.rules, 'key'),\n            referencedUsers: keyBy(other.users, 'login'),\n            selected,\n            selectedFlowIndex: undefined,\n            selectedLocationIndex: undefined\n          }));\n        }\n        return issues;\n      },\n      () => {\n        if (this.mounted && areQueriesEqual(prevQuery, this.props.location.query)) {\n          this.setState({ loading: false });\n        }\n        return [];\n      }\n    );\n  }\n\n  fetchIssuesPage = (p: number) => {\n    return this.fetchIssues({ p });\n  };\n\n  fetchIssuesUntil = (\n    p: number,\n    done: (pageIssues: T.Issue[], paging: T.Paging) => boolean\n  ): Promise<FetchIssuesPromise> => {\n    const recursiveFetch = (p: number, prevIssues: T.Issue[]): Promise<FetchIssuesPromise> => {\n      return this.fetchIssuesPage(p).then(({ issues: pageIssues, paging, ...other }) => {\n        const issues = [...prevIssues, ...pageIssues];\n        return done(pageIssues, paging)\n          ? { issues, paging, ...other }\n          : recursiveFetch(p + 1, issues);\n      });\n    };\n\n    return recursiveFetch(p, []);\n  };\n\n  fetchMoreIssues = () => {\n    const { paging } = this.state;\n\n    if (!paging) {\n      return Promise.reject();\n    }\n\n    const p = paging.pageIndex + 1;\n\n    this.setState({ checkAll: false, loadingMore: true });\n    return this.fetchIssuesPage(p).then(\n      response => {\n        if (this.mounted) {\n          this.setState(state => ({\n            loadingMore: false,\n            issues: [...state.issues, ...response.issues],\n            paging: response.paging\n          }));\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loadingMore: false });\n        }\n      }\n    );\n  };\n\n  fetchIssuesForComponent = (_component: string, _from: number, to: number) => {\n    const { issues, openIssue, paging } = this.state;\n\n    if (!openIssue || !paging) {\n      return Promise.reject(undefined);\n    }\n\n    const isSameComponent = (issue: T.Issue) => issue.component === openIssue.component;\n\n    const done = (pageIssues: T.Issue[], paging: T.Paging) => {\n      const lastIssue = pageIssues[pageIssues.length - 1];\n      if (paging.total <= paging.pageIndex * paging.pageSize) {\n        return true;\n      }\n      if (lastIssue.component !== openIssue.component) {\n        return true;\n      }\n      return lastIssue.textRange !== undefined && lastIssue.textRange.endLine > to;\n    };\n\n    if (done(issues, paging)) {\n      return Promise.resolve(issues.filter(isSameComponent));\n    }\n\n    this.setState({ loading: true });\n    return this.fetchIssuesUntil(paging.pageIndex + 1, done).then(\n      response => {\n        const nextIssues = [...issues, ...response.issues];\n        if (this.mounted) {\n          this.setState({\n            issues: nextIssues,\n            loading: false,\n            paging: response.paging\n          });\n        }\n        return nextIssues.filter(isSameComponent);\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n        return [];\n      }\n    );\n  };\n\n  fetchFacet = (facet: string) => {\n    return this.fetchIssues({ ps: 1, facets: facet }, false).then(\n      ({ facets, ...other }) => {\n        if (this.mounted) {\n          this.setState(state => ({\n            facets: { ...state.facets, ...parseFacets(facets) },\n            loadingFacets: omit(state.loadingFacets, facet),\n            referencedComponentsById: {\n              ...state.referencedComponentsById,\n              ...keyBy(other.components, 'uuid')\n            },\n            referencedComponentsByKey: {\n              ...state.referencedComponentsByKey,\n              ...keyBy(other.components, 'key')\n            },\n            referencedLanguages: {\n              ...state.referencedLanguages,\n              ...keyBy(other.languages, 'key')\n            },\n            referencedRules: { ...state.referencedRules, ...keyBy(other.rules, 'key') },\n            referencedUsers: { ...state.referencedUsers, ...keyBy(other.users, 'login') }\n          }));\n        }\n      },\n      () => {\n        /* Do nothing */\n      }\n    );\n  };\n\n  isFiltered = () => {\n    const serialized = serializeQuery(this.state.query);\n    return !areQueriesEqual(serialized, DEFAULT_QUERY);\n  };\n\n  getCheckedIssues = () => {\n    const issues = this.state.checked\n      .map(checked => this.state.issues.find(issue => issue.key === checked))\n      .filter((issue): issue is T.Issue => issue !== undefined);\n    const paging = { pageIndex: 1, pageSize: issues.length, total: issues.length };\n    return Promise.resolve({ issues, paging });\n  };\n\n  getButtonLabel = (checked: string[], checkAll?: boolean, paging?: T.Paging) => {\n    if (checked.length > 0) {\n      let count;\n      if (checkAll && paging) {\n        count = paging.total > MAX_PAGE_SIZE ? MAX_PAGE_SIZE : paging.total;\n      } else {\n        count = Math.min(checked.length, MAX_PAGE_SIZE);\n      }\n\n      return translateWithParameters('issues.bulk_change_X_issues', count);\n    } else {\n      return translate('bulk_change');\n    }\n  };\n\n  handleFilterChange = (changes: Partial<Query>) => {\n    this.props.router.push({\n      pathname: this.props.location.pathname,\n      query: {\n        ...serializeQuery({ ...this.state.query, ...changes }),\n        ...getBranchLikeQuery(this.props.branchLike),\n        id: this.props.component && this.props.component.key,\n        myIssues: this.state.myIssues ? 'true' : undefined\n      }\n    });\n    this.setState(({ openFacets }) => ({\n      openFacets: {\n        ...openFacets,\n        sonarsourceSecurity: shouldOpenSonarSourceSecurityFacet(openFacets, changes),\n        standards: shouldOpenStandardsFacet(openFacets, changes)\n      }\n    }));\n  };\n\n  handleMyIssuesChange = (myIssues: boolean) => {\n    this.closeFacet('assignees');\n    if (!this.props.component) {\n      saveMyIssues(myIssues);\n    }\n    this.props.router.push({\n      pathname: this.props.location.pathname,\n      query: {\n        ...serializeQuery({ ...this.state.query, assigned: true, assignees: [] }),\n        ...getBranchLikeQuery(this.props.branchLike),\n        id: this.props.component && this.props.component.key,\n        myIssues: myIssues ? 'true' : undefined\n      }\n    });\n  };\n\n  loadSearchResultCount = (property: string, changes: Partial<Query>) => {\n    const { component } = this.props;\n    const { myIssues, query } = this.state;\n\n    const parameters = {\n      ...getBranchLikeQuery(this.props.branchLike),\n      componentKeys: component && component.key,\n      facets: property,\n      s: 'FILE_LINE',\n      ...serializeQuery({ ...query, ...changes }),\n      ps: 1\n    };\n\n    if (myIssues) {\n      Object.assign(parameters, { assignees: '__me__' });\n    }\n\n    return this.props.fetchIssues(parameters).then(({ facets }) => parseFacets(facets)[property]);\n  };\n\n  closeFacet = (property: string) => {\n    this.setState(state => ({\n      openFacets: { ...state.openFacets, [property]: false }\n    }));\n  };\n\n  handleFacetToggle = (property: string) => {\n    this.setState(state => {\n      const willOpenProperty = !state.openFacets[property];\n      const newState = {\n        loadingFacets: state.loadingFacets,\n        openFacets: { ...state.openFacets, [property]: willOpenProperty }\n      };\n\n      // Try to open sonarsource security \"subfacet\" by default if the standard facet is open\n      if (willOpenProperty && property === STANDARDS) {\n        newState.openFacets.sonarsourceSecurity = shouldOpenSonarSourceSecurityFacet(\n          newState.openFacets,\n          state.query\n        );\n        // Force loading of sonarsource security facet data\n        property = newState.openFacets.sonarsourceSecurity ? 'sonarsourceSecurity' : property;\n      }\n\n      // No need to load facets data for standard facet\n      if (property !== STANDARDS && !state.facets[property]) {\n        newState.loadingFacets[property] = true;\n        this.fetchFacet(property);\n      }\n\n      return newState;\n    });\n  };\n\n  handleReset = () => {\n    this.props.router.push({\n      pathname: this.props.location.pathname,\n      query: {\n        ...DEFAULT_QUERY,\n        ...getBranchLikeQuery(this.props.branchLike),\n        id: this.props.component && this.props.component.key,\n        myIssues: this.state.myIssues ? 'true' : undefined\n      }\n    });\n  };\n\n  handlePopupToggle = (issue: string, popupName: string, open?: boolean) => {\n    this.setState((state: State) => {\n      const { openPopup } = state;\n      const samePopup = openPopup && openPopup.name === popupName && openPopup.issue === issue;\n\n      if (open !== false && !samePopup) {\n        return { ...state, openPopup: { issue, name: popupName } };\n      } else if (open !== true && samePopup) {\n        return { ...state, openPopup: undefined };\n      }\n\n      return state;\n    });\n  };\n\n  handleIssueCheck = (issue: string) => {\n    this.setState(state => ({\n      checkAll: false,\n      checked: state.checked.includes(issue)\n        ? without(state.checked, issue)\n        : [...state.checked, issue]\n    }));\n  };\n\n  handleIssueChange = (issue: T.Issue) => {\n    this.refreshBranchStatus();\n    this.setState(state => ({\n      issues: state.issues.map(candidate => (candidate.key === issue.key ? issue : candidate)),\n      openIssue: state.openIssue && state.openIssue.key === issue.key ? issue : state.openIssue\n    }));\n  };\n\n  handleOpenBulkChange = () => {\n    key.setScope('issues-bulk-change');\n    this.setState({ bulkChangeModal: true });\n  };\n\n  handleCloseBulkChange = () => {\n    key.setScope('issues');\n    this.setState({ bulkChangeModal: false });\n  };\n\n  handleBulkChangeDone = () => {\n    this.setState({ checkAll: false });\n    this.refreshBranchStatus();\n    this.fetchFirstIssues();\n    this.handleCloseBulkChange();\n  };\n\n  selectLocation = (index: number) => {\n    this.setState(actions.selectLocation(index));\n  };\n\n  selectNextLocation = () => {\n    this.setState(actions.selectNextLocation);\n  };\n\n  selectPreviousLocation = () => {\n    this.setState(actions.selectPreviousLocation);\n  };\n\n  handleCheckAll = (checked: boolean) => {\n    if (checked) {\n      this.setState(state => ({\n        checkAll: true,\n        checked: state.issues.map(issue => issue.key)\n      }));\n    } else {\n      this.setState({ checkAll: false, checked: [] });\n    }\n  };\n\n  selectFlow = (index?: number) => {\n    this.setState(actions.selectFlow(index));\n  };\n\n  selectNextFlow = () => {\n    this.setState(actions.selectNextFlow);\n  };\n\n  selectPreviousFlow = () => {\n    this.setState(actions.selectPreviousFlow);\n  };\n\n  refreshBranchStatus = () => {\n    const { branchLike, component } = this.props;\n    if (branchLike && component && isPullRequest(branchLike)) {\n      this.props.fetchBranchStatus(branchLike, component.key);\n    }\n  };\n\n  renderBulkChange() {\n    const { component, currentUser } = this.props;\n    const { checkAll, bulkChangeModal, checked, issues, paging } = this.state;\n\n    const isAllChecked = checked.length > 0 && issues.length === checked.length;\n    const thirdState = checked.length > 0 && !isAllChecked;\n    const isChecked = isAllChecked || thirdState;\n\n    if (!currentUser.isLoggedIn) {\n      return null;\n    }\n\n    return (\n      <div className=\"pull-left\">\n        <Checkbox\n          checked={isChecked}\n          className=\"spacer-right text-middle\"\n          disabled={issues.length === 0}\n          id=\"issues-selection\"\n          onCheck={this.handleCheckAll}\n          thirdState={thirdState}\n          title={translate('issues.select_all_issues')}\n        />\n        <Button\n          disabled={checked.length === 0}\n          id=\"issues-bulk-change\"\n          onClick={this.handleOpenBulkChange}>\n          {this.getButtonLabel(checked, checkAll, paging)}\n        </Button>\n\n        {bulkChangeModal && (\n          <BulkChangeModal\n            component={component}\n            currentUser={currentUser}\n            fetchIssues={checkAll ? this.fetchIssues : this.getCheckedIssues}\n            onClose={this.handleCloseBulkChange}\n            onDone={this.handleBulkChangeDone}\n          />\n        )}\n      </div>\n    );\n  }\n\n  renderFacets() {\n    const { component, currentUser, branchLike } = this.props;\n    const { query } = this.state;\n\n    return (\n      <div className=\"layout-page-filters\">\n        {currentUser.isLoggedIn && !isSonarCloud() && (\n          <MyIssuesFilter\n            myIssues={this.state.myIssues}\n            onMyIssuesChange={this.handleMyIssuesChange}\n          />\n        )}\n        <FiltersHeader displayReset={this.isFiltered()} onReset={this.handleReset} />\n        <Sidebar\n          branchLike={branchLike}\n          component={component}\n          createdAfterIncludesTime={this.createdAfterIncludesTime()}\n          facets={this.state.facets}\n          loadSearchResultCount={this.loadSearchResultCount}\n          loadingFacets={this.state.loadingFacets}\n          myIssues={this.state.myIssues}\n          onFacetToggle={this.handleFacetToggle}\n          onFilterChange={this.handleFilterChange}\n          openFacets={this.state.openFacets}\n          query={query}\n          referencedComponentsById={this.state.referencedComponentsById}\n          referencedComponentsByKey={this.state.referencedComponentsByKey}\n          referencedLanguages={this.state.referencedLanguages}\n          referencedRules={this.state.referencedRules}\n          referencedUsers={this.state.referencedUsers}\n        />\n      </div>\n    );\n  }\n\n  renderConciseIssuesList() {\n    const { issues, loadingMore, paging, query } = this.state;\n\n    return (\n      <div className=\"layout-page-filters\">\n        <ConciseIssuesListHeader\n          displayBackButton={query.issues.length !== 1}\n          loading={this.state.loading}\n          onBackClick={this.closeIssue}\n        />\n        <ConciseIssuesList\n          issues={issues}\n          onFlowSelect={this.selectFlow}\n          onIssueSelect={this.openIssue}\n          onLocationSelect={this.selectLocation}\n          selected={this.state.selected}\n          selectedFlowIndex={this.state.selectedFlowIndex}\n          selectedLocationIndex={this.state.selectedLocationIndex}\n        />\n        {paging && paging.total > 0 && (\n          <ListFooter\n            count={issues.length}\n            loadMore={this.fetchMoreIssues}\n            loading={loadingMore}\n            total={paging.total}\n          />\n        )}\n      </div>\n    );\n  }\n\n  renderSide(openIssue: T.Issue | undefined) {\n    return (\n      <ScreenPositionHelper className=\"layout-page-side-outer\">\n        {({ top }) => (\n          <section\n            aria-label={openIssue ? translate('list_of_issues') : translate('filters')}\n            className=\"layout-page-side\"\n            style={{ top }}>\n            <div className=\"layout-page-side-inner\">\n              <A11ySkipTarget\n                anchor=\"issues_sidebar\"\n                label={\n                  openIssue ? translate('issues.skip_to_list') : translate('issues.skip_to_filters')\n                }\n                weight={10}\n              />\n              {openIssue ? this.renderConciseIssuesList() : this.renderFacets()}\n            </div>\n          </section>\n        )}\n      </ScreenPositionHelper>\n    );\n  }\n\n  renderList() {\n    const { branchLike, component, currentUser } = this.props;\n    const { issues, loading, loadingMore, openIssue, paging } = this.state;\n    const selectedIndex = this.getSelectedIndex();\n    const selectedIssue = selectedIndex !== undefined ? issues[selectedIndex] : undefined;\n\n    if (!paging || openIssue) {\n      return null;\n    }\n\n    let noIssuesMessage = null;\n    if (paging.total === 0 && !loading) {\n      if (this.isFiltered()) {\n        noIssuesMessage = <EmptySearch />;\n      } else if (this.state.myIssues) {\n        noIssuesMessage = <NoMyIssues />;\n      } else {\n        noIssuesMessage = <NoIssues />;\n      }\n    }\n\n    return (\n      <div>\n        <h2 className=\"a11y-hidden\">{translate('list_of_issues')}</h2>\n        {paging.total > 0 && (\n          <IssuesList\n            branchLike={branchLike}\n            checked={this.state.checked}\n            component={component}\n            issues={issues}\n            onFilterChange={this.handleFilterChange}\n            onIssueChange={this.handleIssueChange}\n            onIssueCheck={currentUser.isLoggedIn ? this.handleIssueCheck : undefined}\n            onIssueClick={this.openIssue}\n            onPopupToggle={this.handlePopupToggle}\n            openPopup={this.state.openPopup}\n            selectedIssue={selectedIssue}\n          />\n        )}\n\n        {paging.total > 0 && (\n          <ListFooter\n            count={issues.length}\n            loadMore={this.fetchMoreIssues}\n            loading={loadingMore}\n            total={paging.total}\n          />\n        )}\n\n        {noIssuesMessage}\n      </div>\n    );\n  }\n\n  renderHeader({\n    openIssue,\n    paging,\n    selectedIndex\n  }: {\n    openIssue: T.Issue | undefined;\n    paging: T.Paging | undefined;\n    selectedIndex: number | undefined;\n  }) {\n    return openIssue ? (\n      <A11ySkipTarget anchor=\"issues_main\" />\n    ) : (\n      <div className=\"layout-page-header-panel layout-page-main-header issues-main-header\">\n        <div className=\"layout-page-header-panel-inner layout-page-main-header-inner\">\n          <div className=\"layout-page-main-inner\">\n            <A11ySkipTarget anchor=\"issues_main\" />\n\n            {this.renderBulkChange()}\n            <PageActions\n              canSetHome={!this.props.component}\n              effortTotal={this.state.effortTotal}\n              paging={paging}\n              selectedIndex={selectedIndex}\n            />\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  renderPage() {\n    const { cannotShowOpenIssue, checkAll, issues, loading, openIssue, paging } = this.state;\n    return (\n      <div className=\"layout-page-main-inner\">\n        {openIssue ? (\n          <IssuesSourceViewer\n            branchLike={fillBranchLike(openIssue.branch, openIssue.pullRequest)}\n            issues={issues}\n            loadIssues={this.fetchIssuesForComponent}\n            locationsNavigator={this.state.locationsNavigator}\n            onIssueChange={this.handleIssueChange}\n            onIssueSelect={this.openIssue}\n            onLocationSelect={this.selectLocation}\n            openIssue={openIssue}\n            selectedFlowIndex={this.state.selectedFlowIndex}\n            selectedLocationIndex={this.state.selectedLocationIndex}\n          />\n        ) : (\n          <DeferredSpinner loading={loading}>\n            {checkAll && paging && paging.total > MAX_PAGE_SIZE && (\n              <Alert className=\"big-spacer-bottom\" variant=\"warning\">\n                <FormattedMessage\n                  defaultMessage={translate('issue_bulk_change.max_issues_reached')}\n                  id=\"issue_bulk_change.max_issues_reached\"\n                  values={{ max: <strong>{MAX_PAGE_SIZE}</strong> }}\n                />\n              </Alert>\n            )}\n            {cannotShowOpenIssue && (!paging || paging.total > 0) && (\n              <Alert className=\"big-spacer-bottom\" variant=\"warning\">\n                {translateWithParameters(\n                  'issues.cannot_open_issue_max_initial_X_fetched',\n                  MAX_INITAL_FETCH\n                )}\n              </Alert>\n            )}\n            {this.renderList()}\n          </DeferredSpinner>\n        )}\n      </div>\n    );\n  }\n\n  render() {\n    const { openIssue, paging } = this.state;\n    const selectedIndex = this.getSelectedIndex();\n    return (\n      <div className=\"layout-page issues\" id=\"issues-page\">\n        <Suggestions suggestions=\"issues\" />\n        <Helmet defer={false} title={openIssue ? openIssue.message : translate('issues.page')} />\n\n        <h1 className=\"a11y-hidden\">{translate('issues.page')}</h1>\n\n        {this.renderSide(openIssue)}\n\n        <div role=\"main\" className=\"layout-page-main\">\n          {this.renderHeader({ openIssue, paging, selectedIndex })}\n\n          {this.renderPage()}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { searchIssues } from '../../../api/issues';\nimport { withRouter } from '../../../components/hoc/withRouter';\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\nimport { parseIssueFromResponse } from '../../../helpers/issues';\nimport { fetchBranchStatus } from '../../../store/rootActions';\nimport { getCurrentUser, Store } from '../../../store/rootReducer';\nimport { FetchIssuesPromise } from '../../../types/issues';\n\nconst IssuesAppContainer = lazyLoadComponent(() => import('./App'), 'IssuesAppContainer');\n\nconst mapStateToProps = (state: Store) => ({\n  currentUser: getCurrentUser(state),\n  fetchIssues\n});\n\nconst fetchIssues = (query: T.RawQuery) => {\n  return searchIssues({\n    ...query,\n    additionalFields: '_all',\n    timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone\n  }).then(response => {\n    const parsedIssues = response.issues.map(issue =>\n      parseIssueFromResponse(issue, response.components, response.users, response.rules)\n    );\n    return { ...response, issues: parsedIssues } as FetchIssuesPromise;\n  });\n};\n\nconst mapDispatchToProps = { fetchBranchStatus };\n\nexport default withRouter(connect(mapStateToProps, mapDispatchToProps)(IssuesAppContainer));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON, requestTryAndRepeatUntil } from '../helpers/request';\nimport { SystemUpgrade } from '../types/system';\n\nexport function setLogLevel(level: string): Promise<void | Response> {\n  return post('/api/system/change_log_level', { level }).catch(throwGlobalError);\n}\n\nexport function getSystemInfo(): Promise<T.SysInfoCluster | T.SysInfoStandalone> {\n  return getJSON('/api/system/info').catch(throwGlobalError);\n}\n\nexport function getSystemStatus(): Promise<{ id: string; version: string; status: T.SysStatus }> {\n  return getJSON('/api/system/status');\n}\n\nexport function getSystemUpgrades(): Promise<{\n  upgrades: SystemUpgrade[];\n  latestLTS: string;\n  updateCenterRefresh: string;\n}> {\n  return getJSON('/api/system/upgrades');\n}\n\nexport function getMigrationStatus(): Promise<{\n  message?: string;\n  startedAt?: string;\n  state: string;\n}> {\n  return getJSON('/api/system/db_migration_status');\n}\n\nexport function migrateDatabase(): Promise<{\n  message?: string;\n  startedAt?: string;\n  state: string;\n}> {\n  return postJSON('/api/system/migrate_db');\n}\n\nexport function restart(): Promise<void | Response> {\n  return post('/api/system/restart').catch(throwGlobalError);\n}\n\nexport function waitSystemUPStatus(): Promise<{\n  id: string;\n  version: string;\n  status: T.SysStatus;\n}> {\n  return requestTryAndRepeatUntil(\n    getSystemStatus,\n    { max: -1, slowThreshold: -15 },\n    ({ status }) => status === 'UP'\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { FormattedMessage } from 'react-intl';\nimport { getMigrationStatus, getSystemStatus, migrateDatabase } from '../../../api/system';\nimport InstanceMessage from '../../../components/common/InstanceMessage';\nimport { Button } from '../../../components/controls/buttons';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport TimeFormatter from '../../../components/intl/TimeFormatter';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl, isSonarCloud } from '../../../helpers/system';\nimport { getReturnUrl } from '../../../helpers/urls';\nimport '../styles.css';\n\ninterface Props {\n  location: { query: { return_to?: string } };\n  setup: boolean;\n}\n\ninterface State {\n  message?: string;\n  startedAt?: string;\n  state?: string;\n  status?: string;\n  wasStarting?: boolean;\n}\n\nexport default class App extends React.PureComponent<Props, State> {\n  interval?: number;\n  mounted = false;\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchStatus();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    if (this.interval) {\n      window.clearInterval(this.interval);\n    }\n  }\n\n  fetchStatus = () => {\n    const request = this.props.setup ? this.fetchMigrationState() : this.fetchSystemStatus();\n    request.catch(() => {\n      if (this.mounted) {\n        this.setState({\n          message: undefined,\n          startedAt: undefined,\n          state: undefined,\n          status: 'OFFLINE'\n        });\n      }\n    });\n  };\n\n  fetchSystemStatus = () => {\n    return getSystemStatus().then(({ status }) => {\n      if (this.mounted) {\n        this.setState({ status });\n\n        if (status === 'STARTING') {\n          this.setState({ wasStarting: true });\n          this.scheduleRefresh();\n        } else if (status === 'UP') {\n          if (this.state.wasStarting) {\n            this.loadPreviousPage();\n          }\n        } else {\n          this.scheduleRefresh();\n        }\n      }\n    });\n  };\n\n  fetchMigrationState = () => {\n    return getMigrationStatus().then(({ message, startedAt, state }) => {\n      if (this.mounted) {\n        this.setState({ message, startedAt, state });\n        if (state === 'MIGRATION_SUCCEEDED') {\n          this.loadPreviousPage();\n        } else if (state !== 'NO_MIGRATION') {\n          this.scheduleRefresh();\n        }\n      }\n    });\n  };\n\n  scheduleRefresh = () => {\n    this.interval = window.setTimeout(this.fetchStatus, 5000);\n  };\n\n  loadPreviousPage = () => {\n    setInterval(() => {\n      window.location.href = getReturnUrl(this.props.location);\n    }, 2500);\n  };\n\n  handleMigrateClick = () => {\n    migrateDatabase().then(\n      ({ message, startedAt, state }) => {\n        if (this.mounted) {\n          this.setState({ message, startedAt, state });\n        }\n      },\n      () => {}\n    );\n  };\n\n  render() {\n    const { state, status } = this.state;\n\n    return (\n      <>\n        <Helmet defaultTitle={translate('maintenance.page')} defer={false} />\n        <div className=\"page-wrapper-simple\" id=\"bd\">\n          <div\n            className={classNames('page-simple', {\n              'panel-warning': state === 'MIGRATION_REQUIRED'\n            })}\n            id=\"nonav\">\n            {status === 'OFFLINE' && (\n              <>\n                <h1 className=\"maintenance-title text-danger\">\n                  <InstanceMessage message={translate('maintenance.is_offline')} />\n                </h1>\n                {!isSonarCloud() && (\n                  <p className=\"maintenance-text\">\n                    {translate('maintenance.sonarqube_is_offline.text')}\n                  </p>\n                )}\n                <p className=\"maintenance-text text-center\">\n                  <a href={getBaseUrl() + '/'}>{translate('maintenance.try_again')}</a>\n                </p>\n              </>\n            )}\n\n            {status === 'UP' && (\n              <>\n                <h1 className=\"maintenance-title\">\n                  <InstanceMessage message={translate('maintenance.is_up')} />\n                </h1>\n                <p className=\"maintenance-text text-center\">\n                  {translate('maintenance.all_systems_opetational')}\n                </p>\n                <p className=\"maintenance-text text-center\">\n                  <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>\n                </p>\n              </>\n            )}\n\n            {status === 'STARTING' && (\n              <>\n                <h1 className=\"maintenance-title\">\n                  <InstanceMessage message={translate('maintenance.is_starting')} />\n                </h1>\n                <p className=\"maintenance-spinner\">\n                  <i className=\"spinner\" />\n                </p>\n              </>\n            )}\n\n            {status === 'DOWN' && (\n              <>\n                <h1 className=\"maintenance-title text-danger\">\n                  <InstanceMessage message={translate('maintenance.is_down')} />\n                </h1>\n                <p className=\"maintenance-text\">\n                  {translate('maintenance.sonarqube_is_down.text')}\n                </p>\n                <p className=\"maintenance-text text-center\">\n                  <a href={getBaseUrl() + '/'}>{translate('maintenance.try_again')}</a>\n                </p>\n              </>\n            )}\n\n            {(status === 'DB_MIGRATION_NEEDED' || status === 'DB_MIGRATION_RUNNING') && (\n              <>\n                <h1 className=\"maintenance-title\">\n                  <InstanceMessage message={translate('maintenance.is_under_maintenance')} />\n                </h1>\n                <p className=\"maintenance-text\">\n                  <FormattedMessage\n                    defaultMessage={translate('maintenance.sonarqube_is_under_maintenance.1')}\n                    id=\"maintenance.sonarqube_is_under_maintenance.1\"\n                    values={{\n                      link: (\n                        <a\n                          href=\"https://www.sonarlint.org/?referrer=sonarqube-maintenance\"\n                          target=\"_blank\"\n                          rel=\"noopener noreferrer\">\n                          {translate('maintenance.sonarqube_is_under_maintenance_link.1')}\n                        </a>\n                      )\n                    }}\n                  />\n                </p>\n                <p className=\"maintenance-text\">\n                  <FormattedMessage\n                    defaultMessage={translate('maintenance.sonarqube_is_under_maintenance.2')}\n                    id=\"maintenance.sonarqube_is_under_maintenance.2\"\n                    values={{\n                      link: (\n                        <a\n                          href=\"https://redirect.sonarsource.com/doc/upgrading.html\"\n                          target=\"_blank\"\n                          rel=\"noopener noreferrer\">\n                          {translate('maintenance.sonarqube_is_under_maintenance_link.2')}\n                        </a>\n                      )\n                    }}\n                  />\n                </p>\n              </>\n            )}\n\n            {state === 'NO_MIGRATION' && (\n              <>\n                <h1 className=\"maintenance-title\">\n                  {translate('maintenance.database_is_up_to_date')}\n                </h1>\n                <p className=\"maintenance-text text-center\">\n                  <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>\n                </p>\n              </>\n            )}\n\n            {state === 'MIGRATION_REQUIRED' && (\n              <>\n                <h1 className=\"maintenance-title\">{translate('maintenance.upgrade_database')}</h1>\n                <p className=\"maintenance-text\">{translate('maintenance.upgrade_database.1')}</p>\n                <p className=\"maintenance-text\">{translate('maintenance.upgrade_database.2')}</p>\n                <p className=\"maintenance-text\">{translate('maintenance.upgrade_database.3')}</p>\n                <div className=\"maintenance-spinner\">\n                  <Button id=\"start-migration\" onClick={this.handleMigrateClick}>\n                    {translate('maintenance.upgrade')}\n                  </Button>\n                </div>\n              </>\n            )}\n\n            {state === 'NOT_SUPPORTED' && (\n              <>\n                <h1 className=\"maintenance-title text-danger\">\n                  {translate('maintenance.migration_not_supported')}\n                </h1>\n                <p>{translate('maintenance.migration_not_supported.text')}</p>\n              </>\n            )}\n\n            {state === 'MIGRATION_RUNNING' && (\n              <>\n                <h1 className=\"maintenance-title\">{translate('maintenance.database_migration')}</h1>\n                {this.state.message && (\n                  <p className=\"maintenance-text text-center\">{this.state.message}</p>\n                )}\n                {this.state.startedAt && (\n                  <p className=\"maintenance-text text-center\">\n                    {translate('background_tasks.table.started')}{' '}\n                    <DateFromNow date={this.state.startedAt} />\n                    <br />\n                    <small className=\"text-muted\">\n                      <TimeFormatter date={this.state.startedAt} long={true} />\n                    </small>\n                  </p>\n                )}\n                <p className=\"maintenance-spinner\">\n                  <i className=\"spinner\" />\n                </p>\n              </>\n            )}\n\n            {state === 'MIGRATION_SUCCEEDED' && (\n              <>\n                <h1 className=\"maintenance-title text-success\">\n                  {translate('maintenance.database_is_up_to_date')}\n                </h1>\n                <p className=\"maintenance-text text-center\">\n                  <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>\n                </p>\n              </>\n            )}\n\n            {state === 'MIGRATION_FAILED' && (\n              <>\n                <h1 className=\"maintenance-title text-danger\">\n                  {translate('maintenance.upgrade_failed')}\n                </h1>\n                <p className=\"maintenance-text\">{translate('maintenance.upgrade_failed.text')}</p>\n              </>\n            )}\n          </div>\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport App from './App';\n\ninterface Props {\n  location: { query: { return_to: string } };\n}\n\nexport default function MaintenanceAppContainer(props: Props) {\n  return <App setup={false} {...props} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport App from './App';\n\ninterface Props {\n  location: { query: { return_to: string } };\n}\n\nexport default function MaintenanceAppContainer(props: Props) {\n  return <App setup={true} {...props} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { IndexRoute } from 'react-router';\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nexport const maintenanceRoutes = (\n  <IndexRoute component={lazyLoadComponent(() => import('./components/MaintenanceAppContainer'))} />\n);\n\nexport const setupRoutes = (\n  <IndexRoute component={lazyLoadComponent(() => import('./components/SetupAppContainer'))} />\n);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { PendingPluginResult } from '../../types/plugins';\n\nexport interface AdminContextInterface {\n  fetchSystemStatus: () => void;\n  fetchPendingPlugins: () => void;\n  pendingPlugins: PendingPluginResult;\n  systemStatus: T.SysStatus;\n}\n\nexport const defaultPendingPlugins = { installing: [], removing: [], updating: [] };\nexport const defaultSystemStatus = 'UP';\n\nconst AdminContext = React.createContext<AdminContextInterface>({\n  fetchSystemStatus: () => {},\n  fetchPendingPlugins: () => {},\n  pendingPlugins: defaultPendingPlugins,\n  systemStatus: defaultSystemStatus\n});\nexport default AdminContext;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport { EditionKey } from '../../../types/editions';\nimport { RiskConsent } from '../../../types/plugins';\n\nexport interface PluginRiskConsentBoxProps {\n  acknowledgeRisk: () => void;\n  currentEdition?: EditionKey;\n  riskConsent?: RiskConsent;\n}\n\nexport default function PluginRiskConsentBox(props: PluginRiskConsentBoxProps) {\n  const { currentEdition, riskConsent } = props;\n\n  if (riskConsent === RiskConsent.Accepted) {\n    return null;\n  }\n\n  return (\n    <div className=\"boxed-group it__plugin_risk_consent_box\">\n      <h2>{translate('marketplace.risk_consent.title')}</h2>\n      <div className=\"boxed-group-inner\">\n        <p>{translate('marketplace.risk_consent.description')}</p>\n        {currentEdition === EditionKey.community && (\n          <p className=\"spacer-top\">{translate('marketplace.risk_consent.installation')}</p>\n        )}\n        <Button\n          className=\"display-block big-spacer-top button-primary\"\n          onClick={props.acknowledgeRisk}>\n          {translate('marketplace.risk_consent.action')}\n        </Button>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON } from '../helpers/request';\nimport { BranchParameters } from '../types/branch-like';\n\ntype NavComponent = T.Omit<T.Component, 'alm' | 'qualifier' | 'leakPeriodDate' | 'path' | 'tags'>;\n\nexport function getComponentNavigation(\n  data: { component: string } & BranchParameters\n): Promise<NavComponent> {\n  return getJSON('/api/navigation/component', data).catch(throwGlobalError);\n}\n\nexport function getMarketplaceNavigation(): Promise<{ serverId: string; ncloc: number }> {\n  return getJSON('/api/navigation/marketplace').catch(throwGlobalError);\n}\n\nexport function getSettingsNavigation(): Promise<any> {\n  return getJSON('/api/navigation/settings').catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport tooltipDCE from 'Docs/tooltips/editions/datacenter.md';\nimport tooltipDE from 'Docs/tooltips/editions/developer.md';\nimport tooltipEE from 'Docs/tooltips/editions/enterprise.md';\nimport * as React from 'react';\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\nimport { getEditionUrl } from '../../../helpers/editions';\nimport { translate } from '../../../helpers/l10n';\nimport { Edition, EditionKey } from '../../../types/editions';\n\nconst DocMarkdownBlock = lazyLoadComponent(\n  () => import('../../../components/docs/DocMarkdownBlock'),\n  'DocMarkdownBlock'\n);\n\ninterface Props {\n  currentEdition?: EditionKey;\n  edition: Edition;\n  ncloc?: number;\n  serverId?: string;\n}\n\nexport default function EditionBox({ edition, ncloc, serverId, currentEdition }: Props) {\n  return (\n    <div className=\"boxed-group boxed-group-inner marketplace-edition\">\n      {edition.key === 'datacenter' && <DocMarkdownBlock content={tooltipDCE} />}\n      {edition.key === 'developer' && <DocMarkdownBlock content={tooltipDE} />}\n      {edition.key === 'enterprise' && <DocMarkdownBlock content={tooltipEE} />}\n      <div className=\"marketplace-edition-action spacer-top\">\n        <a\n          href={getEditionUrl(edition, { ncloc, serverId, sourceEdition: currentEdition })}\n          rel=\"noopener noreferrer\"\n          target=\"_blank\">\n          {translate('marketplace.request_free_trial')}\n        </a>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getMarketplaceNavigation } from '../../api/nav';\nimport { getAllEditionsAbove } from '../../helpers/editions';\nimport { EditionKey } from '../../types/editions';\nimport EditionBox from './components/EditionBox';\n\nexport interface Props {\n  currentEdition?: EditionKey;\n}\n\ninterface State {\n  serverId?: string;\n  ncloc?: number;\n}\n\nexport default class EditionBoxes extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchData();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchData = () => {\n    getMarketplaceNavigation().then(\n      formData => {\n        if (this.mounted) {\n          this.setState({ ...formData });\n        }\n      },\n      () => {}\n    );\n  };\n\n  render() {\n    const { currentEdition } = this.props;\n    const { serverId, ncloc } = this.state;\n    const visibleEditions = getAllEditionsAbove(currentEdition);\n\n    if (visibleEditions.length <= 0) {\n      return null;\n    }\n\n    return (\n      <div className=\"spacer-bottom marketplace-editions\">\n        {visibleEditions.map(edition => (\n          <EditionBox\n            currentEdition={currentEdition}\n            edition={edition}\n            key={edition.key}\n            ncloc={ncloc}\n            serverId={serverId}\n          />\n        ))}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translateWithParameters } from '../../helpers/l10n';\n\ninterface Props {\n  total: number;\n}\n\nexport default function Footer({ total }: Props) {\n  return (\n    <footer className=\"spacer-top note text-center\">\n      {translateWithParameters('x_show', total)}\n    </footer>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { EditionKey } from '../../types/editions';\n\ninterface Props {\n  currentEdition?: EditionKey;\n}\n\nexport default function Header({ currentEdition }: Props) {\n  return (\n    <header className=\"page-header\" id=\"marketplace-header\">\n      <h1 className=\"page-title\">{translate('marketplace.page')}</h1>\n      {currentEdition && (\n        <h3 className=\"page-description\">\n          {translate('marketplace.page.you_are_running', currentEdition)}\n        </h3>\n      )}\n      <p className=\"page-description\">\n        {currentEdition === 'datacenter'\n          ? translate('marketplace.page.description_best_edition')\n          : translate('marketplace.page.description')}\n      </p>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function EllipsisIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M5.273 7.182v1.636a.818.818 0 0 1-.818.818H2.818A.818.818 0 0 1 2 8.818V7.182c0-.452.366-.818.818-.818h1.637c.451 0 .818.366.818.818zm4.363 0v1.636a.818.818 0 0 1-.818.818H7.182a.818.818 0 0 1-.818-.818V7.182c0-.452.366-.818.818-.818h1.636c.452 0 .818.366.818.818zm4.364 0v1.636a.818.818 0 0 1-.818.818h-1.637a.818.818 0 0 1-.818-.818V7.182c0-.452.367-.818.818-.818h1.637c.452 0 .818.366.818.818z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport DateFormatter from '../../../components/intl/DateFormatter';\nimport { translate } from '../../../helpers/l10n';\nimport { Release, Update } from '../../../types/plugins';\n\ninterface Props {\n  release: Release;\n  update: Update;\n}\n\nexport default function PluginChangeLogItem({ release, update }: Props) {\n  return (\n    <li className=\"big-spacer-bottom\">\n      <div className=\"little-spacer-bottom\">\n        {update.status === 'COMPATIBLE' || !update.status ? (\n          <span className=\"js-plugin-changelog-version badge badge-success spacer-right\">\n            {release.version}\n          </span>\n        ) : (\n          <Tooltip overlay={translate('marketplace.update_status', update.status)}>\n            <span className=\"js-plugin-changelog-version badge badge-warning spacer-right\">\n              {release.version}\n            </span>\n          </Tooltip>\n        )}\n        <span className=\"js-plugin-changelog-date note spacer-right\">\n          <DateFormatter date={release.date} />\n        </span>\n        {release.changeLogUrl && (\n          <a\n            className=\"js-plugin-changelog-link\"\n            href={release.changeLogUrl}\n            target=\"_blank\"\n            rel=\"noopener noreferrer\">\n            {translate('marketplace.release_notes')}\n          </a>\n        )}\n      </div>\n      <div className=\"js-plugin-changelog-description\">{release.description}</div>\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Release, Update } from '../../../types/plugins';\nimport PluginChangeLogItem from './PluginChangeLogItem';\n\nexport interface Props {\n  release: Release;\n  update: Update;\n}\n\nexport default function PluginChangeLog({ release, update }: Props) {\n  return (\n    <div className=\"abs-width-300\">\n      <h6>{translate('changelog')}</h6>\n      <ul className=\"js-plugin-changelog-list\">\n        {update.previousUpdates &&\n          sortBy(\n            update.previousUpdates,\n            prevUpdate => prevUpdate.release?.date\n          ).map(previousUpdate =>\n            previousUpdate.release ? (\n              <PluginChangeLogItem\n                key={previousUpdate.release.version}\n                release={previousUpdate.release}\n                update={previousUpdate}\n              />\n            ) : null\n          )}\n        <PluginChangeLogItem release={release} update={update} />\n      </ul>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Dropdown from '../../../components/controls/Dropdown';\nimport EllipsisIcon from '../../../components/icons/EllipsisIcon';\nimport { Release, Update } from '../../../types/plugins';\nimport PluginChangeLog from './PluginChangeLog';\n\ninterface Props {\n  release: Release;\n  update: Update;\n}\n\nexport default function PluginChangeLogButton({ release, update }: Props) {\n  return (\n    <Dropdown\n      className=\"display-inline-block little-spacer-left\"\n      overlay={<PluginChangeLog release={release} update={update} />}>\n      <ButtonLink className=\"js-changelog\">\n        <EllipsisIcon />\n      </ButtonLink>\n    </Dropdown>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Plugin } from '../../../types/plugins';\n\ninterface Props {\n  plugin: Plugin;\n}\n\nconst PluginDescription = (props: Props) => {\n  return (\n    <td className=\"text-top width-25 big-spacer-right\">\n      <div>\n        <strong className=\"js-plugin-name\">{props.plugin.name}</strong>\n        {props.plugin.category && (\n          <span className=\"js-plugin-category badge spacer-left\">{props.plugin.category}</span>\n        )}\n      </div>\n      <div className=\"js-plugin-description little-spacer-top\">{props.plugin.description}</div>\n    </td>\n  );\n};\n\nexport default PluginDescription;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  license?: string;\n}\n\nexport default function PluginLicense({ license }: Props) {\n  if (!license) {\n    return null;\n  }\n  return (\n    <Tooltip overlay={license}>\n      <li className=\"little-spacer-bottom marketplace-plugin-license\">\n        <FormattedMessage\n          defaultMessage={translate('marketplace.licensed_under_x')}\n          id=\"marketplace.licensed_under_x\"\n          values={{\n            license: <span className=\"js-plugin-license\">{license}</span>\n          }}\n        />\n      </li>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../helpers/l10n';\nimport { Plugin } from '../../../types/plugins';\n\nexport interface PluginOrganizationProps {\n  plugin: Plugin;\n}\n\nexport default function PluginOrganization({ plugin }: PluginOrganizationProps) {\n  if (!plugin.organizationName) {\n    return null;\n  }\n  return (\n    <li className=\"little-spacer-bottom\">\n      <FormattedMessage\n        defaultMessage={translate('marketplace.developed_by_x')}\n        id=\"marketplace.developed_by_x\"\n        values={{\n          organization: plugin.organizationUrl ? (\n            <a\n              className=\"js-plugin-organization\"\n              href={plugin.organizationUrl}\n              target=\"_blank\"\n              rel=\"noopener noreferrer\">\n              {plugin.organizationName}\n            </a>\n          ) : (\n            <span className=\"js-plugin-organization\">{plugin.organizationName}</span>\n          )\n        }}\n      />\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function CheckIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14.92 4.804q0 0.357-0.25 0.607l-7.679 7.679q-0.25 0.25-0.607 0.25t-0.607-0.25l-4.446-4.446q-0.25-0.25-0.25-0.607t0.25-0.607l1.214-1.214q0.25-0.25 0.607-0.25t0.607 0.25l2.625 2.634 5.857-5.866q0.25-0.25 0.607-0.25t0.607 0.25l1.214 1.214q0.25 0.25 0.25 0.607z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Update } from '../../../types/plugins';\n\ninterface Props {\n  disabled: boolean;\n  onClick: (update: Update) => void;\n  update: Update;\n}\n\nexport default class PluginUpdateButton extends React.PureComponent<Props> {\n  handleClick = () => {\n    this.props.onClick(this.props.update);\n  };\n\n  render() {\n    const { disabled, update } = this.props;\n    if (update.status !== 'COMPATIBLE' || !update.release) {\n      return null;\n    }\n    return (\n      <Tooltip overlay={translate('marketplace.requires_restart')}>\n        <Button\n          className=\"js-update little-spacer-bottom\"\n          disabled={disabled}\n          onClick={this.handleClick}>\n          {translateWithParameters('marketplace.update_to_x', update.release.version)}\n        </Button>\n      </Tooltip>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { installPlugin, uninstallPlugin, updatePlugin } from '../../../api/plugins';\nimport { Button } from '../../../components/controls/buttons';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport CheckIcon from '../../../components/icons/CheckIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { isAvailablePlugin, isInstalledPlugin, Plugin } from '../../../types/plugins';\nimport PluginUpdateButton from './PluginUpdateButton';\n\ninterface Props {\n  plugin: Plugin;\n  refreshPending: () => void;\n}\n\ninterface State {\n  acceptTerms: boolean;\n  loading: boolean;\n}\n\nexport default class PluginActions extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { acceptTerms: false, loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  doPluginAction = (apiAction: (data: { key: string }) => Promise<void | Response>) => {\n    this.setState({ loading: true });\n    apiAction({ key: this.props.plugin.key }).then(\n      () => {\n        this.props.refreshPending();\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleInstall = () => this.doPluginAction(installPlugin);\n  handleUpdate = () => this.doPluginAction(updatePlugin);\n  handleUninstall = () => this.doPluginAction(uninstallPlugin);\n  handleTermsCheck = (checked: boolean) => this.setState({ acceptTerms: checked });\n\n  renderBundled() {\n    const { plugin } = this.props;\n\n    return (\n      <div className=\"js-actions\">\n        {isAvailablePlugin(plugin) && (\n          <div>\n            <p className=\"little-spacer-bottom\">\n              {translate('marketplace.available_under_commercial_license')}\n            </p>\n            <a href={plugin.homepageUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n              {translate('marketplace.learn_more')}\n            </a>\n          </div>\n        )}\n        {isInstalledPlugin(plugin) && (\n          <p>\n            <CheckIcon className=\"little-spacer-right\" />\n            {translate('marketplace.installed')}\n          </p>\n        )}\n        {isInstalledPlugin(plugin) && plugin.updates && plugin.updates.length > 0 && (\n          <div className=\"spacer-top\">\n            {plugin.updates.map((update, idx) => (\n              <PluginUpdateButton\n                disabled={this.state.loading}\n                key={idx}\n                onClick={this.handleUpdate}\n                update={update}\n              />\n            ))}\n          </div>\n        )}\n      </div>\n    );\n  }\n\n  render() {\n    const { plugin } = this.props;\n\n    if (plugin.editionBundled) {\n      return this.renderBundled();\n    }\n\n    const { loading } = this.state;\n    return (\n      <div className=\"js-actions\">\n        {isAvailablePlugin(plugin) && plugin.termsAndConditionsUrl && (\n          <p className=\"little-spacer-bottom\">\n            <Checkbox\n              checked={this.state.acceptTerms}\n              className=\"js-terms\"\n              id={'plugin-terms-' + plugin.key}\n              onCheck={this.handleTermsCheck}>\n              <label className=\"little-spacer-left\" htmlFor={'plugin-terms-' + plugin.key}>\n                {translate('marketplace.i_accept_the')}\n              </label>\n            </Checkbox>\n            <a\n              className=\"js-plugin-terms nowrap little-spacer-left\"\n              href={plugin.termsAndConditionsUrl}\n              target=\"_blank\"\n              rel=\"noopener noreferrer\">\n              {translate('marketplace.terms_and_conditions')}\n            </a>\n          </p>\n        )}\n        {loading && <i className=\"spinner spacer-right little-spacer-top little-spacer-bottom\" />}\n        {isInstalledPlugin(plugin) && (\n          <>\n            {plugin.updates &&\n              plugin.updates.map((update, idx) => (\n                <PluginUpdateButton\n                  disabled={loading}\n                  key={idx}\n                  onClick={this.handleUpdate}\n                  update={update}\n                />\n              ))}\n            <Tooltip overlay={translate('marketplace.requires_restart')}>\n              <Button\n                className=\"js-uninstall button-red little-spacer-left\"\n                disabled={loading}\n                onClick={this.handleUninstall}>\n                {translate('marketplace.uninstall')}\n              </Button>\n            </Tooltip>\n          </>\n        )}\n        {isAvailablePlugin(plugin) && (\n          <Tooltip overlay={translate('marketplace.requires_restart')}>\n            <Button\n              className=\"js-install\"\n              disabled={\n                loading || (plugin.termsAndConditionsUrl != null && !this.state.acceptTerms)\n              }\n              onClick={this.handleInstall}>\n              {translate('marketplace.install')}\n            </Button>\n          </Tooltip>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Plugin } from '../../../types/plugins';\nimport PluginActions from './PluginActions';\n\ninterface Props {\n  plugin: Plugin;\n  refreshPending: () => void;\n  status?: string;\n}\n\nexport default function PluginStatus({ plugin, refreshPending, status }: Props) {\n  return (\n    <td className=\"text-top text-right width-20 little-spacer-left\">\n      {status === 'installing' && (\n        <p className=\"text-success\">{translate('marketplace.install_pending')}</p>\n      )}\n\n      {status === 'updating' && (\n        <p className=\"text-success\">{translate('marketplace.update_pending')}</p>\n      )}\n\n      {status === 'removing' && (\n        <p className=\"text-danger\">{translate('marketplace.uninstall_pending')}</p>\n      )}\n\n      {status == null && <PluginActions plugin={plugin} refreshPending={refreshPending} />}\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Plugin } from '../../../types/plugins';\n\ninterface Props {\n  plugin: Plugin;\n}\n\nexport default function PluginUrls({ plugin }: Props) {\n  if (!plugin.homepageUrl && !plugin.issueTrackerUrl) {\n    return null;\n  }\n  return (\n    <li className=\"little-spacer-bottom\">\n      <ul className=\"list-inline\">\n        {plugin.homepageUrl && (\n          <li>\n            <a\n              className=\"js-plugin-homepage\"\n              href={plugin.homepageUrl}\n              target=\"_blank\"\n              rel=\"noopener noreferrer\">\n              {translate('marketplace.homepage')}\n            </a>\n          </li>\n        )}\n        {plugin.issueTrackerUrl && (\n          <li>\n            <a\n              className=\"js-plugin-issues\"\n              href={plugin.issueTrackerUrl}\n              target=\"_blank\"\n              rel=\"noopener noreferrer\">\n              {translate('marketplace.issue_tracker')}\n            </a>\n          </li>\n        )}\n      </ul>\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { AvailablePlugin, InstalledPlugin } from '../../../types/plugins';\nimport PluginChangeLogButton from './PluginChangeLogButton';\nimport PluginDescription from './PluginDescription';\nimport PluginLicense from './PluginLicense';\nimport PluginOrganization from './PluginOrganization';\nimport PluginStatus from './PluginStatus';\nimport PluginUrls from './PluginUrls';\n\nexport interface PluginAvailableProps {\n  installedPlugins: InstalledPlugin[];\n  plugin: AvailablePlugin;\n  readOnly: boolean;\n  refreshPending: () => void;\n  status?: string;\n}\n\nexport default function PluginAvailable(props: PluginAvailableProps) {\n  const { installedPlugins, plugin, readOnly, status } = props;\n  const installedPluginKeys = installedPlugins.map(({ key }) => key);\n  return (\n    <tr>\n      <PluginDescription plugin={plugin} />\n      <td className=\"text-top big-spacer-right\">\n        <ul>\n          <li className=\"display-flex-row little-spacer-bottom\">\n            <div className=\"pull-left spacer-right\">\n              <span className=\"badge badge-success\">{plugin.release.version}</span>\n            </div>\n            <div>\n              {plugin.release.description}\n              <PluginChangeLogButton release={plugin.release} update={plugin.update} />\n              {plugin.update.requires.length > 0 && (\n                <p className=\"little-spacer-top\">\n                  <strong>\n                    {translateWithParameters(\n                      'marketplace.installing_this_plugin_will_also_install_x',\n                      plugin.update.requires\n                        .filter(({ key }) => !installedPluginKeys.includes(key))\n                        .map(requiredPlugin => requiredPlugin.name)\n                        .join(', ')\n                    )}\n                  </strong>\n                </p>\n              )}\n            </div>\n          </li>\n        </ul>\n      </td>\n\n      <td className=\"text-top width-20\">\n        <ul>\n          <PluginUrls plugin={plugin} />\n          <PluginLicense license={plugin.license} />\n          <PluginOrganization plugin={plugin} />\n        </ul>\n      </td>\n\n      {!readOnly && (\n        <PluginStatus plugin={plugin} refreshPending={props.refreshPending} status={status} />\n      )}\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { Release, Update } from '../../../types/plugins';\nimport PluginChangeLogButton from './PluginChangeLogButton';\n\ninterface Props {\n  update: Update;\n  release: Release;\n}\n\ninterface State {\n  changelogOpen: boolean;\n}\n\nexport default class PluginUpdateItem extends React.PureComponent<Props, State> {\n  state: State = { changelogOpen: false };\n\n  handleChangelogClick = (event: React.SyntheticEvent<HTMLButtonElement>) => {\n    event.preventDefault();\n    event.stopPropagation();\n    this.toggleChangelog();\n  };\n\n  toggleChangelog = (show?: boolean) => {\n    if (show !== undefined) {\n      this.setState({ changelogOpen: show });\n    } else {\n      this.setState(state => ({ changelogOpen: !state.changelogOpen }));\n    }\n  };\n\n  render() {\n    const { release, update } = this.props;\n    return (\n      <li className=\"display-flex-row little-spacer-bottom\" key={release.version}>\n        <div className=\"pull-left spacer-right\">\n          {update.status === 'COMPATIBLE' ? (\n            <span className=\"js-update-version badge badge-success\">{release.version}</span>\n          ) : (\n            <Tooltip overlay={translate('marketplace.update_status', update.status)}>\n              <span className=\"js-update-version badge badge-warning\">{release.version}</span>\n            </Tooltip>\n          )}\n        </div>\n        <div>\n          {release.description}\n          <PluginChangeLogButton release={release} update={update} />\n        </div>\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Update } from '../../../types/plugins';\nimport PluginUpdateItem from './PluginUpdateItem';\n\nexport interface PluginUpdatesProps {\n  updates?: Update[];\n}\n\nexport default function PluginUpdates({ updates }: PluginUpdatesProps) {\n  if (!updates || updates.length <= 0) {\n    return null;\n  }\n  return (\n    <li className=\"spacer-top\">\n      <strong>{translate('marketplace.updates')}:</strong>\n      <ul className=\"little-spacer-top\">\n        {updates.map(update =>\n          update.release ? (\n            <PluginUpdateItem\n              key={update.release.version}\n              release={update.release}\n              update={update}\n            />\n          ) : null\n        )}\n      </ul>\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { InstalledPlugin } from '../../../types/plugins';\nimport PluginDescription from './PluginDescription';\nimport PluginLicense from './PluginLicense';\nimport PluginOrganization from './PluginOrganization';\nimport PluginStatus from './PluginStatus';\nimport PluginUpdates from './PluginUpdates';\nimport PluginUrls from './PluginUrls';\n\ninterface Props {\n  plugin: InstalledPlugin;\n  readOnly: boolean;\n  refreshPending: () => void;\n  status?: string;\n}\n\nexport default function PluginInstalled({ plugin, readOnly, refreshPending, status }: Props) {\n  return (\n    <tr>\n      <PluginDescription plugin={plugin} />\n      <td className=\"text-top big-spacer-right\">\n        <ul>\n          <li className=\"little-spacer-bottom\">\n            <strong className=\"js-plugin-installed-version little-spacer-right\">\n              {plugin.version}\n            </strong>\n            {translate('marketplace._installed')}\n          </li>\n          <PluginUpdates updates={plugin.updates} />\n        </ul>\n      </td>\n\n      <td className=\"text-top width-20\">\n        <ul>\n          <PluginUrls plugin={plugin} />\n          <PluginLicense license={plugin.license} />\n          <PluginOrganization plugin={plugin} />\n        </ul>\n      </td>\n\n      {!readOnly && (\n        <PluginStatus plugin={plugin} refreshPending={refreshPending} status={status} />\n      )}\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { isAvailablePlugin, isInstalledPlugin, PendingPlugin, Plugin } from '../../types/plugins';\nimport PluginAvailable from './components/PluginAvailable';\nimport PluginInstalled from './components/PluginInstalled';\n\nexport interface PluginsListProps {\n  plugins: Plugin[];\n  pending: {\n    installing: PendingPlugin[];\n    updating: PendingPlugin[];\n    removing: PendingPlugin[];\n  };\n  readOnly: boolean;\n  refreshPending: () => void;\n}\n\nfunction getPluginStatus(plugin: Plugin, pending: PluginsListProps['pending']): string | undefined {\n  const { installing, updating, removing } = pending;\n  if (installing.find(p => p.key === plugin.key)) {\n    return 'installing';\n  }\n  if (updating.find(p => p.key === plugin.key)) {\n    return 'updating';\n  }\n  if (removing.find(p => p.key === plugin.key)) {\n    return 'removing';\n  }\n  return undefined;\n}\n\nexport default function PluginsList(props: PluginsListProps) {\n  const { pending, plugins, readOnly } = props;\n  const installedPlugins = plugins.filter(isInstalledPlugin);\n  return (\n    <div className=\"boxed-group boxed-group-inner\" id=\"marketplace-plugins\">\n      <ul>\n        {sortBy(plugins, ({ name }) => name).map(plugin => (\n          <li className=\"panel panel-vertical\" key={plugin.key}>\n            <table className=\"marketplace-plugin-table\">\n              <tbody>\n                {isInstalledPlugin(plugin) && (\n                  <PluginInstalled\n                    plugin={plugin}\n                    readOnly={readOnly}\n                    refreshPending={props.refreshPending}\n                    status={getPluginStatus(plugin, pending)}\n                  />\n                )}\n\n                {isAvailablePlugin(plugin) && (\n                  <PluginAvailable\n                    installedPlugins={installedPlugins}\n                    plugin={plugin}\n                    readOnly={readOnly}\n                    refreshPending={props.refreshPending}\n                    status={getPluginStatus(plugin, pending)}\n                  />\n                )}\n              </tbody>\n            </table>\n          </li>\n        ))}\n      </ul>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioToggle from '../../components/controls/RadioToggle';\nimport SearchBox from '../../components/controls/SearchBox';\nimport { translate } from '../../helpers/l10n';\nimport { Query } from './utils';\n\ninterface Props {\n  query: Query;\n  updateCenterActive: boolean;\n  updateQuery: (newQuery: Partial<Query>) => void;\n}\n\nexport default class Search extends React.PureComponent<Props> {\n  handleSearch = (search: string) => {\n    this.props.updateQuery({ search });\n  };\n\n  handleFilterChange = (filter: string) => this.props.updateQuery({ filter });\n\n  render() {\n    const { query, updateCenterActive } = this.props;\n    const radioOptions = [\n      { label: translate('marketplace.all'), value: 'all' },\n      { label: translate('marketplace.installed'), value: 'installed' },\n      {\n        disabled: !updateCenterActive,\n        label: translate('marketplace.updates_only'),\n        tooltip: !updateCenterActive ? translate('marketplace.not_activated') : undefined,\n        value: 'updates'\n      }\n    ];\n    return (\n      <div className=\"big-spacer-bottom\" id=\"marketplace-search\">\n        <div className=\"display-inline-block text-top nowrap abs-width-240 spacer-right\">\n          <RadioToggle\n            name=\"marketplace-filter\"\n            onCheck={this.handleFilterChange}\n            options={radioOptions}\n            value={query.filter}\n          />\n        </div>\n        <SearchBox\n          onChange={this.handleSearch}\n          placeholder={translate('marketplace.search')}\n          value={query.search}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { memoize } from 'lodash';\nimport { cleanQuery, parseAsString, serializeString } from '../../helpers/query';\nimport { Plugin } from '../../types/plugins';\n\nexport interface Query {\n  filter: string;\n  search?: string;\n}\n\nconst EXCLUDED_PLUGINS = ['license'];\nexport function filterPlugins(plugins: Plugin[], search?: string): Plugin[] {\n  if (!search) {\n    return plugins.filter(plugin => !EXCLUDED_PLUGINS.includes(plugin.key));\n  }\n\n  const s = search.toLowerCase();\n  return plugins.filter(plugin => {\n    return (\n      !EXCLUDED_PLUGINS.includes(plugin.key) &&\n      (plugin.name.toLowerCase().includes(s) ||\n        (plugin.description || '').toLowerCase().includes(s) ||\n        (plugin.category || '').toLowerCase().includes(s))\n    );\n  });\n}\n\nexport const DEFAULT_FILTER = 'all';\nexport const parseQuery = memoize(\n  (urlQuery: T.RawQuery): Query => ({\n    filter: parseAsString(urlQuery['filter']) || DEFAULT_FILTER,\n    search: parseAsString(urlQuery['search'])\n  })\n);\n\nexport const serializeQuery = memoize(\n  (query: Query): T.RawQuery =>\n    cleanQuery({\n      filter: query.filter === DEFAULT_FILTER ? undefined : serializeString(query.filter),\n      search: query.search ? serializeString(query.search) : undefined\n    })\n);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy, uniqBy } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport {\n  getAvailablePlugins,\n  getInstalledPlugins,\n  getInstalledPluginsWithUpdates,\n  getPluginUpdates\n} from '../../api/plugins';\nimport { getValues, setSimpleSettingValue } from '../../api/settings';\nimport Suggestions from '../../app/components/embed-docs-modal/Suggestions';\nimport { Location, Router, withRouter } from '../../components/hoc/withRouter';\nimport { Alert } from '../../components/ui/Alert';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate } from '../../helpers/l10n';\nimport { EditionKey } from '../../types/editions';\nimport { PendingPluginResult, Plugin, RiskConsent } from '../../types/plugins';\nimport { SettingsKey } from '../../types/settings';\nimport PluginRiskConsentBox from './components/PluginRiskConsentBox';\nimport EditionBoxes from './EditionBoxes';\nimport Footer from './Footer';\nimport Header from './Header';\nimport PluginsList from './PluginsList';\nimport Search from './Search';\nimport './style.css';\nimport { filterPlugins, parseQuery, Query, serializeQuery } from './utils';\n\ninterface Props {\n  currentEdition?: EditionKey;\n  fetchPendingPlugins: () => void;\n  pendingPlugins: PendingPluginResult;\n  location: Location;\n  router: Pick<Router, 'push'>;\n  standaloneMode?: boolean;\n  updateCenterActive: boolean;\n}\n\ninterface State {\n  loadingPlugins: boolean;\n  plugins: Plugin[];\n  riskConsent?: RiskConsent;\n}\n\nexport class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loadingPlugins: true, plugins: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchQueryPlugins();\n    this.fetchRiskConsent();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.location.query.filter !== this.props.location.query.filter) {\n      this.fetchQueryPlugins();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchQueryPlugins = () => {\n    const query = parseQuery(this.props.location.query);\n    let fetchFunction = this.fetchAllPlugins;\n\n    if (query.filter === 'updates') {\n      fetchFunction = getPluginUpdates;\n    } else if (query.filter === 'installed') {\n      fetchFunction = getInstalledPlugins;\n    }\n\n    this.setState({ loadingPlugins: true });\n    fetchFunction().then((plugins: Plugin[]) => {\n      if (this.mounted) {\n        this.setState({\n          loadingPlugins: false,\n          plugins: sortBy(plugins, 'name')\n        });\n      }\n    }, this.stopLoadingPlugins);\n  };\n\n  fetchAllPlugins = (): Promise<Plugin[] | void> => {\n    return Promise.all([getInstalledPluginsWithUpdates(), getAvailablePlugins()]).then(\n      ([installed, available]) => uniqBy([...installed, ...available.plugins], 'key'),\n      this.stopLoadingPlugins\n    );\n  };\n\n  fetchRiskConsent = async () => {\n    const result = await getValues({ keys: SettingsKey.PluginRiskConsent });\n\n    if (!result || result.length < 1) {\n      return;\n    }\n\n    const [consent] = result;\n\n    this.setState({ riskConsent: consent.value as RiskConsent | undefined });\n  };\n\n  acknowledgeRisk = async () => {\n    await setSimpleSettingValue({\n      key: SettingsKey.PluginRiskConsent,\n      value: RiskConsent.Accepted\n    });\n\n    await this.fetchRiskConsent();\n  };\n\n  updateQuery = (newQuery: Partial<Query>) => {\n    const query = serializeQuery({ ...parseQuery(this.props.location.query), ...newQuery });\n    this.props.router.push({ pathname: this.props.location.pathname, query });\n  };\n\n  stopLoadingPlugins = () => {\n    if (this.mounted) {\n      this.setState({ loadingPlugins: false });\n    }\n  };\n\n  render() {\n    const { currentEdition, standaloneMode, pendingPlugins } = this.props;\n    const { loadingPlugins, plugins, riskConsent } = this.state;\n    const query = parseQuery(this.props.location.query);\n    const filteredPlugins = filterPlugins(plugins, query.search);\n\n    /*\n     * standalone mode is true when cluster mode is not active. We preserve this\n     * condition if it ever becomes possible to have a community edition NOT in standalone mode.\n     */\n    const allowActions =\n      currentEdition === EditionKey.community &&\n      Boolean(standaloneMode) &&\n      riskConsent === RiskConsent.Accepted;\n\n    return (\n      <div className=\"page page-limited\" id=\"marketplace-page\">\n        <Suggestions suggestions=\"marketplace\" />\n        <Helmet title={translate('marketplace.page')} />\n        <Header currentEdition={currentEdition} />\n        <EditionBoxes currentEdition={currentEdition} />\n        <header className=\"page-header\">\n          <h1 className=\"page-title\">{translate('marketplace.page.plugins')}</h1>\n          <div className=\"page-description\">\n            <p>{translate('marketplace.page.plugins.description')}</p>\n            {currentEdition !== EditionKey.community && (\n              <Alert className=\"spacer-top\" variant=\"info\">\n                <FormattedMessage\n                  id=\"marketplace.page.plugins.description2\"\n                  defaultMessage={translate('marketplace.page.plugins.description2')}\n                  values={{\n                    link: (\n                      <Link\n                        to=\"/documentation/instance-administration/marketplace/\"\n                        target=\"_blank\">\n                        {translate('marketplace.page.plugins.description2.link')}\n                      </Link>\n                    )\n                  }}\n                />\n              </Alert>\n            )}\n          </div>\n        </header>\n\n        <PluginRiskConsentBox\n          acknowledgeRisk={this.acknowledgeRisk}\n          currentEdition={currentEdition}\n          riskConsent={riskConsent}\n        />\n\n        <Search\n          query={query}\n          updateCenterActive={this.props.updateCenterActive}\n          updateQuery={this.updateQuery}\n        />\n        <DeferredSpinner loading={loadingPlugins}>\n          {filteredPlugins.length === 0 &&\n            translate('marketplace.plugin_list.no_plugins', query.filter)}\n          {filteredPlugins.length > 0 && (\n            <>\n              <PluginsList\n                pending={pendingPlugins}\n                plugins={filteredPlugins}\n                readOnly={!allowActions}\n                refreshPending={this.props.fetchPendingPlugins}\n              />\n              <Footer total={filteredPlugins.length} />\n            </>\n          )}\n        </DeferredSpinner>\n      </div>\n    );\n  }\n}\n\nexport default withRouter(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport AdminContext from '../../app/components/AdminContext';\nimport { getAppState, getGlobalSettingValue, Store } from '../../store/rootReducer';\nimport { EditionKey } from '../../types/editions';\nimport App from './App';\n\ninterface OwnProps {\n  location: { pathname: string; query: T.RawQuery };\n}\n\ninterface StateToProps {\n  currentEdition?: EditionKey;\n  standaloneMode?: boolean;\n  updateCenterActive: boolean;\n}\n\nconst mapStateToProps = (state: Store) => {\n  const updateCenterActive = getGlobalSettingValue(state, 'sonar.updatecenter.activate');\n  return {\n    currentEdition: getAppState(state).edition as EditionKey, // TODO: Fix once AppState is no longer ambiant.\n    standaloneMode: getAppState(state).standalone,\n    updateCenterActive: Boolean(updateCenterActive && updateCenterActive.value === 'true')\n  };\n};\n\nfunction WithAdminContext(props: StateToProps & OwnProps) {\n  return (\n    <AdminContext.Consumer>\n      {({ fetchPendingPlugins, pendingPlugins }) => (\n        <App fetchPendingPlugins={fetchPendingPlugins} pendingPlugins={pendingPlugins} {...props} />\n      )}\n    </AdminContext.Consumer>\n  );\n}\n\nexport default connect(mapStateToProps)(WithAdminContext);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./AppContainer')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON, RequestData } from '../helpers/request';\nimport { BranchParameters } from '../types/branch-like';\n\nexport function getProjectActivity(\n  data: {\n    project: string;\n    category?: string;\n    from?: string;\n    p?: number;\n    ps?: number;\n  } & BranchParameters\n): Promise<{ analyses: T.Analysis[]; paging: T.Paging }> {\n  return getJSON('/api/project_analyses/search', data).catch(throwGlobalError);\n}\n\ninterface CreateEventResponse {\n  analysis: string;\n  key: string;\n  name: string;\n  category: string;\n  description?: string;\n}\n\nexport function createEvent(\n  analysis: string,\n  name: string,\n  category?: string,\n  description?: string\n): Promise<CreateEventResponse> {\n  const data: RequestData = { analysis, name };\n  if (category) {\n    data.category = category;\n  }\n  if (description) {\n    data.description = description;\n  }\n  return postJSON('/api/project_analyses/create_event', data).then(r => r.event, throwGlobalError);\n}\n\nexport function deleteEvent(event: string): Promise<void | Response> {\n  return post('/api/project_analyses/delete_event', { event }).catch(throwGlobalError);\n}\n\nexport function changeEvent(\n  event: string,\n  name?: string,\n  description?: string\n): Promise<CreateEventResponse> {\n  const data: RequestData = { event };\n  if (name) {\n    data.name = name;\n  }\n  if (description) {\n    data.description = description;\n  }\n  return postJSON('/api/project_analyses/update_event', data).then(r => r.event, throwGlobalError);\n}\n\nexport function deleteAnalysis(analysis: string): Promise<void | Response> {\n  return post('/api/project_analyses/delete', { analysis }).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON } from '../helpers/request';\nimport { BranchParameters } from '../types/branch-like';\n\ninterface TimeMachineResponse {\n  measures: {\n    metric: string;\n    history: Array<{ date: string; value?: string }>;\n  }[];\n  paging: T.Paging;\n}\n\nexport function getTimeMachineData(\n  data: {\n    component: string;\n    from?: string;\n    metrics: string;\n    p?: number;\n    ps?: number;\n    to?: string;\n  } & BranchParameters\n): Promise<TimeMachineResponse> {\n  return getJSON('/api/measures/search_history', data).catch(throwGlobalError);\n}\n\nexport function getAllTimeMachineData(\n  data: {\n    component: string;\n    metrics: string;\n    from?: string;\n    p?: number;\n    to?: string;\n  } & BranchParameters,\n  prev?: TimeMachineResponse\n): Promise<TimeMachineResponse> {\n  return getTimeMachineData({ ...data, ps: 1000 }).then(r => {\n    const result = prev\n      ? {\n          measures: prev.measures.map((measure, idx) => ({\n            ...measure,\n            history: measure.history.concat(r.measures[idx].history)\n          })),\n          paging: r.paging\n        }\n      : r;\n\n    if (result.paging.pageIndex * result.paging.pageSize >= result.paging.total) {\n      return result;\n    }\n    return getAllTimeMachineData({ ...data, p: result.paging.pageIndex + 1 }, result);\n  });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum GraphType {\n  issues = 'issues',\n  coverage = 'coverage',\n  duplications = 'duplications',\n  custom = 'custom'\n}\n\nexport interface HistoryItem {\n  date: Date;\n  value?: string;\n}\n\nexport interface MeasureHistory {\n  metric: string;\n  history: HistoryItem[];\n}\n\nexport interface Serie {\n  data: Point[];\n  name: string;\n  translatedName: string;\n  type: string;\n}\n\nexport interface Point {\n  x: Date;\n  y: number | string | undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { chunk, flatMap, groupBy, sortBy } from 'lodash';\nimport { getLocalizedMetricName, translate } from '../../helpers/l10n';\nimport { localizeMetric } from '../../helpers/measures';\nimport { get, save } from '../../helpers/storage';\nimport { MetricKey } from '../../types/metrics';\nimport { GraphType, MeasureHistory, Serie } from '../../types/project-activity';\n\nexport const DEFAULT_GRAPH = GraphType.issues;\n\nconst GRAPHS_METRICS_DISPLAYED: T.Dict<string[]> = {\n  [GraphType.issues]: [MetricKey.bugs, MetricKey.code_smells, MetricKey.vulnerabilities],\n  [GraphType.coverage]: [MetricKey.lines_to_cover, MetricKey.uncovered_lines],\n  [GraphType.duplications]: [MetricKey.ncloc, MetricKey.duplicated_lines]\n};\n\nconst GRAPHS_METRICS: T.Dict<string[]> = {\n  [GraphType.issues]: GRAPHS_METRICS_DISPLAYED[GraphType.issues].concat([\n    MetricKey.reliability_rating,\n    MetricKey.security_rating,\n    MetricKey.sqale_rating\n  ]),\n  [GraphType.coverage]: [...GRAPHS_METRICS_DISPLAYED[GraphType.coverage], MetricKey.coverage],\n  [GraphType.duplications]: [\n    ...GRAPHS_METRICS_DISPLAYED[GraphType.duplications],\n    MetricKey.duplicated_lines_density\n  ]\n};\n\nexport function isCustomGraph(graph: GraphType) {\n  return graph === GraphType.custom;\n}\n\nexport function getGraphTypes(ignoreCustom = false) {\n  const graphs = [GraphType.issues, GraphType.coverage, GraphType.duplications];\n  return ignoreCustom ? graphs : [...graphs, GraphType.custom];\n}\n\nexport function hasDataValues(serie: Serie) {\n  return serie.data.some(point => Boolean(point.y || point.y === 0));\n}\n\nexport function hasHistoryData(series: Serie[]) {\n  return series.some(serie => serie.data && serie.data.length > 1);\n}\n\nexport function getSeriesMetricType(series: Serie[]) {\n  return series.length > 0 ? series[0].type : 'INT';\n}\n\nexport function getDisplayedHistoryMetrics(graph: GraphType, customMetrics: string[]) {\n  return isCustomGraph(graph) ? customMetrics : GRAPHS_METRICS_DISPLAYED[graph];\n}\n\nexport function getHistoryMetrics(graph: GraphType, customMetrics: string[]) {\n  return isCustomGraph(graph) ? customMetrics : GRAPHS_METRICS[graph];\n}\n\nexport function hasHistoryDataValue(series: Serie[]) {\n  return series.some(serie => serie.data && serie.data.length > 1 && hasDataValues(serie));\n}\n\nexport function splitSeriesInGraphs(series: Serie[], maxGraph: number, maxSeries: number) {\n  return flatMap(\n    groupBy(series, serie => serie.type),\n    type => chunk(type, maxSeries)\n  ).slice(0, maxGraph);\n}\n\nexport function generateCoveredLinesMetric(\n  uncoveredLines: MeasureHistory,\n  measuresHistory: MeasureHistory[]\n) {\n  const linesToCover = measuresHistory.find(measure => measure.metric === MetricKey.lines_to_cover);\n  return {\n    data: linesToCover\n      ? uncoveredLines.history.map((analysis, idx) => ({\n          x: analysis.date,\n          y: Number(linesToCover.history[idx].value) - Number(analysis.value)\n        }))\n      : [],\n    name: 'covered_lines',\n    translatedName: translate('project_activity.custom_metric.covered_lines'),\n    type: 'INT'\n  };\n}\n\nexport function generateSeries(\n  measuresHistory: MeasureHistory[],\n  graph: GraphType,\n  metrics: T.Metric[] | T.Dict<T.Metric>,\n  displayedMetrics: string[]\n): Serie[] {\n  if (displayedMetrics.length <= 0 || measuresHistory === undefined) {\n    return [];\n  }\n  return sortBy(\n    measuresHistory\n      .filter(measure => displayedMetrics.indexOf(measure.metric) >= 0)\n      .map(measure => {\n        if (measure.metric === MetricKey.uncovered_lines && !isCustomGraph(graph)) {\n          return generateCoveredLinesMetric(measure, measuresHistory);\n        }\n        const metric = findMetric(measure.metric, metrics);\n        return {\n          data: measure.history.map(analysis => ({\n            x: analysis.date,\n            y: metric && metric.type === 'LEVEL' ? analysis.value : Number(analysis.value)\n          })),\n          name: measure.metric,\n          translatedName: metric ? getLocalizedMetricName(metric) : localizeMetric(measure.metric),\n          type: metric ? metric.type : 'INT'\n        };\n      }),\n    serie =>\n      displayedMetrics.indexOf(serie.name === 'covered_lines' ? 'uncovered_lines' : serie.name)\n  );\n}\n\nexport function saveActivityGraph(\n  namespace: string,\n  project: string,\n  graph: GraphType,\n  metrics: string[] = []\n) {\n  save(namespace, graph, project);\n  if (isCustomGraph(graph)) {\n    save(`${namespace}.custom`, metrics.join(','), project);\n  }\n}\n\nexport function getActivityGraph(\n  namespace: string,\n  project: string\n): { graph: GraphType; customGraphs: string[] } {\n  const customGraphs = get(`${namespace}.custom`, project);\n  return {\n    graph: (get(namespace, project) as GraphType) || DEFAULT_GRAPH,\n    customGraphs: customGraphs ? customGraphs.split(',') : []\n  };\n}\n\nfunction findMetric(key: string, metrics: T.Metric[] | T.Dict<T.Metric>) {\n  if (Array.isArray(metrics)) {\n    return metrics.find(metric => metric.key === key);\n  }\n  return metrics[key];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport CoverageRating from '../../components/ui/CoverageRating';\nimport DuplicationsRating from '../../components/ui/DuplicationsRating';\nimport { ISSUETYPE_METRIC_KEYS_MAP } from '../../helpers/issues';\nimport { translate } from '../../helpers/l10n';\nimport { IssueType } from '../../types/issues';\nimport { MetricKey } from '../../types/metrics';\n\nexport const METRICS: string[] = [\n  // quality gate\n  MetricKey.alert_status,\n  MetricKey.quality_gate_details, // TODO: still relevant?\n\n  // bugs\n  MetricKey.bugs,\n  MetricKey.new_bugs,\n  MetricKey.reliability_rating,\n  MetricKey.new_reliability_rating,\n\n  // vulnerabilities\n  MetricKey.vulnerabilities,\n  MetricKey.new_vulnerabilities,\n  MetricKey.security_rating,\n  MetricKey.new_security_rating,\n\n  // hotspots\n  MetricKey.security_hotspots,\n  MetricKey.new_security_hotspots,\n  MetricKey.security_hotspots_reviewed,\n  MetricKey.new_security_hotspots_reviewed,\n  MetricKey.security_review_rating,\n  MetricKey.new_security_review_rating,\n\n  // code smells\n  MetricKey.code_smells,\n  MetricKey.new_code_smells,\n  MetricKey.sqale_rating,\n  MetricKey.new_maintainability_rating,\n  MetricKey.sqale_index,\n  MetricKey.new_technical_debt,\n\n  // coverage\n  MetricKey.coverage,\n  MetricKey.new_coverage,\n  MetricKey.lines_to_cover,\n  MetricKey.new_lines_to_cover,\n  MetricKey.tests,\n\n  // duplications\n  MetricKey.duplicated_lines_density,\n  MetricKey.new_duplicated_lines_density,\n  MetricKey.duplicated_blocks,\n\n  // size\n  MetricKey.ncloc,\n  MetricKey.ncloc_language_distribution,\n  MetricKey.projects,\n  MetricKey.lines,\n  MetricKey.new_lines\n];\n\nexport const PR_METRICS: string[] = [\n  MetricKey.coverage,\n  MetricKey.new_coverage,\n  MetricKey.new_lines_to_cover,\n\n  MetricKey.duplicated_lines_density,\n  MetricKey.new_duplicated_lines_density,\n  MetricKey.new_lines,\n  MetricKey.new_code_smells,\n  MetricKey.new_maintainability_rating,\n  MetricKey.new_bugs,\n  MetricKey.new_reliability_rating,\n  MetricKey.new_vulnerabilities,\n  MetricKey.new_security_hotspots,\n  MetricKey.new_security_review_rating,\n  MetricKey.new_security_rating\n];\n\nexport const HISTORY_METRICS_LIST: string[] = [\n  MetricKey.bugs,\n  MetricKey.vulnerabilities,\n  MetricKey.sqale_index,\n  MetricKey.duplicated_lines_density,\n  MetricKey.ncloc,\n  MetricKey.coverage\n];\n\nexport enum MeasurementType {\n  Coverage = 'COVERAGE',\n  Duplication = 'DUPLICATION'\n}\n\nconst MEASUREMENTS_MAP = {\n  [MeasurementType.Coverage]: {\n    metric: MetricKey.coverage,\n    newMetric: MetricKey.new_coverage,\n    linesMetric: MetricKey.lines_to_cover,\n    newLinesMetric: MetricKey.new_lines_to_cover,\n    afterMergeMetric: MetricKey.coverage,\n    labelKey: 'metric.coverage.name',\n    expandedLabelKey: 'overview.coverage_on_X_lines',\n    newLinesExpandedLabelKey: 'overview.coverage_on_X_new_lines',\n    iconClass: CoverageRating\n  },\n  [MeasurementType.Duplication]: {\n    metric: MetricKey.duplicated_lines_density,\n    newMetric: MetricKey.new_duplicated_lines_density,\n    linesMetric: MetricKey.ncloc,\n    newLinesMetric: MetricKey.new_lines,\n    afterMergeMetric: MetricKey.duplicated_lines_density,\n    labelKey: 'metric.duplicated_lines_density.short_name',\n    expandedLabelKey: 'overview.duplications_on_X_lines',\n    newLinesExpandedLabelKey: 'overview.duplications_on_X_new_lines',\n    iconClass: DuplicationsRating\n  }\n};\n\nexport function getIssueRatingName(type: IssueType) {\n  return translate('metric_domain', ISSUETYPE_METRIC_KEYS_MAP[type].ratingName);\n}\n\nexport function getIssueIconClass(type: IssueType) {\n  return ISSUETYPE_METRIC_KEYS_MAP[type].iconClass;\n}\n\nexport function getIssueMetricKey(type: IssueType, useDiffMetric: boolean) {\n  return useDiffMetric\n    ? ISSUETYPE_METRIC_KEYS_MAP[type].newMetric\n    : ISSUETYPE_METRIC_KEYS_MAP[type].metric;\n}\n\nexport function getIssueRatingMetricKey(type: IssueType, useDiffMetric: boolean) {\n  return useDiffMetric\n    ? ISSUETYPE_METRIC_KEYS_MAP[type].newRating\n    : ISSUETYPE_METRIC_KEYS_MAP[type].rating;\n}\n\nexport function getMeasurementIconClass(type: MeasurementType) {\n  return MEASUREMENTS_MAP[type].iconClass;\n}\n\nexport function getMeasurementMetricKey(type: MeasurementType, useDiffMetric: boolean) {\n  return useDiffMetric ? MEASUREMENTS_MAP[type].newMetric : MEASUREMENTS_MAP[type].metric;\n}\n\nexport function getMeasurementAfterMergeMetricKey(type: MeasurementType) {\n  return MEASUREMENTS_MAP[type].afterMergeMetric;\n}\n\nexport function getMeasurementLinesMetricKey(type: MeasurementType, useDiffMetric: boolean) {\n  return useDiffMetric ? MEASUREMENTS_MAP[type].newLinesMetric : MEASUREMENTS_MAP[type].linesMetric;\n}\n\nexport function getMeasurementLabelKeys(type: MeasurementType, useDiffMetric: boolean) {\n  return {\n    expandedLabelKey: useDiffMetric\n      ? MEASUREMENTS_MAP[type].newLinesExpandedLabelKey\n      : MEASUREMENTS_MAP[type].expandedLabelKey,\n    labelKey: MEASUREMENTS_MAP[type].labelKey\n  };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Alert } from '../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport MultiSelect from '../common/MultiSelect';\n\nexport interface AddGraphMetricPopupProps {\n  elements: string[];\n  filterSelected: (query: string, selectedElements: string[]) => string[];\n  metricsTypeFilter?: string[];\n  onSearch: (query: string) => Promise<void>;\n  onSelect: (item: string) => void;\n  onUnselect: (item: string) => void;\n  popupPosition?: any;\n  renderLabel: (element: string) => React.ReactNode;\n  selectedElements: string[];\n}\n\nexport default function AddGraphMetricPopup({\n  elements,\n  metricsTypeFilter,\n  ...props\n}: AddGraphMetricPopupProps) {\n  let footerNode: React.ReactNode = '';\n\n  if (props.selectedElements.length >= 6) {\n    footerNode = (\n      <Alert className=\"spacer-left spacer-right spacer-top\" variant=\"info\">\n        {translate('project_activity.graphs.custom.add_metric_info')}\n      </Alert>\n    );\n  } else if (metricsTypeFilter && metricsTypeFilter.length > 0) {\n    footerNode = (\n      <Alert className=\"spacer-left spacer-right spacer-top\" variant=\"info\">\n        {translateWithParameters(\n          'project_activity.graphs.custom.type_x_message',\n          metricsTypeFilter\n            .map((type: string) => translate('metric.type', type))\n            .sort()\n            .join(', ')\n        )}\n      </Alert>\n    );\n  }\n\n  return (\n    <div className=\"menu abs-width-300\">\n      <MultiSelect\n        allowNewElements={false}\n        allowSelection={props.selectedElements.length < 6}\n        elements={elements}\n        filterSelected={props.filterSelected}\n        footerNode={footerNode}\n        onSearch={props.onSearch}\n        onSelect={(item: string) => elements.includes(item) && props.onSelect(item)}\n        onUnselect={props.onUnselect}\n        placeholder={translate('search.search_for_tags')}\n        renderLabel={props.renderLabel}\n        selectedElements={props.selectedElements}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { find, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport Dropdown from '../../components/controls/Dropdown';\nimport DropdownIcon from '../../components/icons/DropdownIcon';\nimport { getLocalizedMetricName, translate } from '../../helpers/l10n';\nimport { isDiffMetric } from '../../helpers/measures';\nimport AddGraphMetricPopup from './AddGraphMetricPopup';\n\ninterface Props {\n  addMetric: (metric: string) => void;\n  className?: string;\n  metrics: T.Metric[];\n  metricsTypeFilter?: string[];\n  removeMetric: (metric: string) => void;\n  selectedMetrics: string[];\n}\n\ninterface State {\n  metrics: string[];\n  query: string;\n  selectedMetrics: string[];\n}\n\nexport default class AddGraphMetric extends React.PureComponent<Props, State> {\n  state: State = {\n    metrics: [],\n    query: '',\n    selectedMetrics: []\n  };\n\n  filterSelected = (query: string, selectedElements: string[]) => {\n    return selectedElements.filter(element =>\n      this.getLocalizedMetricNameFromKey(element)\n        .toLowerCase()\n        .includes(query.toLowerCase())\n    );\n  };\n\n  filterMetricsElements = (\n    { metricsTypeFilter, metrics, selectedMetrics }: Props,\n    query: string\n  ) => {\n    return metrics\n      .filter(metric => {\n        if (\n          metric.hidden ||\n          isDiffMetric(metric.key) ||\n          ['DATA', 'DISTRIB'].includes(metric.type) ||\n          selectedMetrics.includes(metric.key) ||\n          !getLocalizedMetricName(metric)\n            .toLowerCase()\n            .includes(query.toLowerCase())\n        ) {\n          return false;\n        }\n        if (metricsTypeFilter && metricsTypeFilter.length > 0) {\n          return metricsTypeFilter.includes(metric.type);\n        }\n        return true;\n      })\n      .map(metric => metric.key);\n  };\n\n  getSelectedMetricsElements = (metrics: T.Metric[], selectedMetrics?: string[]) => {\n    const selected = selectedMetrics || this.props.selectedMetrics;\n    return metrics.filter(metric => selected.includes(metric.key)).map(metric => metric.key);\n  };\n\n  getLocalizedMetricNameFromKey = (key: string) => {\n    const metric = find(this.props.metrics, { key });\n    return metric === undefined ? key : getLocalizedMetricName(metric);\n  };\n\n  onSearch = (query: string) => {\n    this.setState({ query });\n    return Promise.resolve();\n  };\n\n  onSelect = (metric: string) => {\n    this.props.addMetric(metric);\n    this.setState(state => {\n      return {\n        selectedMetrics: sortBy([...state.selectedMetrics, metric]),\n        metrics: this.filterMetricsElements(this.props, state.query)\n      };\n    });\n  };\n\n  onUnselect = (metric: string) => {\n    this.props.removeMetric(metric);\n    this.setState(state => {\n      return {\n        metrics: sortBy([...state.metrics, metric]),\n        selectedMetrics: state.selectedMetrics.filter(selected => selected !== metric)\n      };\n    });\n  };\n\n  render() {\n    const { query } = this.state;\n    const filteredMetrics = this.filterMetricsElements(this.props, query);\n    const selectedMetrics = this.getSelectedMetricsElements(\n      this.props.metrics,\n      this.props.selectedMetrics\n    );\n    return (\n      <Dropdown\n        className=\"display-inline-block\"\n        closeOnClick={false}\n        closeOnClickOutside={true}\n        overlay={\n          <AddGraphMetricPopup\n            elements={filteredMetrics}\n            filterSelected={this.filterSelected}\n            metricsTypeFilter={this.props.metricsTypeFilter}\n            onSearch={this.onSearch}\n            onSelect={this.onSelect}\n            onUnselect={this.onUnselect}\n            renderLabel={element => this.getLocalizedMetricNameFromKey(element)}\n            selectedElements={selectedMetrics}\n          />\n        }>\n        <Button className=\"spacer-left\">\n          <span className=\"text-ellipsis text-middle\">\n            {translate('project_activity.graphs.custom.add')}\n          </span>\n          <DropdownIcon className=\"text-top little-spacer-left\" />\n        </Button>\n      </Dropdown>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Select from '../../components/controls/Select';\nimport { translate } from '../../helpers/l10n';\nimport { GraphType } from '../../types/project-activity';\nimport AddGraphMetric from './AddGraphMetric';\nimport './styles.css';\nimport { getGraphTypes, isCustomGraph } from './utils';\n\ninterface Props {\n  addCustomMetric?: (metric: string) => void;\n  className?: string;\n  removeCustomMetric?: (metric: string) => void;\n  graph: GraphType;\n  metrics: T.Metric[];\n  metricsTypeFilter?: string[];\n  selectedMetrics?: string[];\n  updateGraph: (graphType: string) => void;\n}\n\nexport default class GraphsHeader extends React.PureComponent<Props> {\n  handleGraphChange = (option: { value: string }) => {\n    if (option.value !== this.props.graph) {\n      this.props.updateGraph(option.value);\n    }\n  };\n\n  render() {\n    const {\n      addCustomMetric,\n      className,\n      graph,\n      metrics,\n      metricsTypeFilter,\n      removeCustomMetric,\n      selectedMetrics = []\n    } = this.props;\n\n    const types = getGraphTypes(addCustomMetric === undefined || removeCustomMetric === undefined);\n\n    const selectOptions = types.map(type => ({\n      label: translate('project_activity.graphs', type),\n      value: type\n    }));\n\n    return (\n      <div className={classNames(className, 'position-relative')}>\n        <Select\n          className=\"pull-left input-medium\"\n          clearable={false}\n          onChange={this.handleGraphChange}\n          options={selectOptions}\n          searchable={false}\n          value={graph}\n        />\n        {isCustomGraph(graph) &&\n          addCustomMetric !== undefined &&\n          removeCustomMetric !== undefined && (\n            <AddGraphMetric\n              addMetric={addCustomMetric}\n              className=\"pull-left spacer-left\"\n              metrics={metrics}\n              metricsTypeFilter={metricsTypeFilter}\n              removeMetric={removeCustomMetric}\n              selectedMetrics={selectedMetrics}\n            />\n          )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { bisector, extent, max } from 'd3-array';\nimport { scaleLinear, scalePoint, scaleTime, ScaleTime } from 'd3-scale';\nimport { area, curveBasis, line as d3Line } from 'd3-shape';\nimport { flatten, isEqual, sortBy, throttle, uniq } from 'lodash';\nimport * as React from 'react';\nimport { colors, rawSizes } from '../../app/theme';\nimport { isDefined } from '../../helpers/types';\nimport './AdvancedTimeline.css';\nimport './LineChart.css';\n\nexport interface Props {\n  basisCurve?: boolean;\n  endDate?: Date;\n  disableZoom?: boolean;\n  displayNewCodeLegend?: boolean;\n  formatYTick?: (tick: number | string) => string;\n  hideGrid?: boolean;\n  hideXAxis?: boolean;\n  height: number;\n  width: number;\n  leakPeriodDate?: Date;\n  // used to avoid same y ticks labels\n  maxYTicksCount: number;\n  metricType: string;\n  padding: number[];\n  selectedDate?: Date;\n  series: T.Chart.Serie[];\n  showAreas?: boolean;\n  startDate?: Date;\n  updateSelectedDate?: (selectedDate?: Date) => void;\n  updateTooltip?: (selectedDate?: Date, tooltipXPos?: number, tooltipIdx?: number) => void;\n  updateZoom?: (start?: Date, endDate?: Date) => void;\n  zoomSpeed: number;\n}\n\ntype XScale = ScaleTime<number, number>;\n// TODO it should be `ScaleLinear<number, number> | ScalePoint<number> | ScalePoint<string>`, but it's super hard to make it work :'(\ntype YScale = any;\n\nconst LEGEND_LINE_HEIGHT = 16;\n\ninterface State {\n  leakLegendTextWidth?: number;\n  maxXRange: number[];\n  mouseOver?: boolean;\n  selectedDate?: Date;\n  selectedDateXPos?: number;\n  selectedDateIdx?: number;\n  yScale: YScale;\n  xScale: XScale;\n}\n\nexport default class AdvancedTimeline extends React.PureComponent<Props, State> {\n  static defaultProps = {\n    eventSize: 8,\n    maxYTicksCount: 4,\n    padding: [26, 10, 50, 60],\n    zoomSpeed: 1\n  };\n\n  constructor(props: Props) {\n    super(props);\n    const scales = this.getScales(props);\n    const selectedDatePos = this.getSelectedDatePos(scales.xScale, props.selectedDate);\n    this.state = { ...scales, ...selectedDatePos };\n    this.updateTooltipPos = throttle(this.updateTooltipPos, 40);\n    this.handleZoomUpdate = throttle(this.handleZoomUpdate, 40);\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    let scales;\n    let selectedDatePos;\n    if (\n      this.props.metricType !== prevProps.metricType ||\n      this.props.startDate !== prevProps.startDate ||\n      this.props.endDate !== prevProps.endDate ||\n      this.props.width !== prevProps.width ||\n      this.props.padding !== prevProps.padding ||\n      this.props.height !== prevProps.height ||\n      this.props.series !== prevProps.series\n    ) {\n      scales = this.getScales(this.props);\n      if (this.state.selectedDate != null) {\n        selectedDatePos = this.getSelectedDatePos(scales.xScale, this.state.selectedDate);\n      }\n    }\n\n    if (!isEqual(this.props.selectedDate, prevProps.selectedDate)) {\n      const xScale = scales ? scales.xScale : this.state.xScale;\n      selectedDatePos = this.getSelectedDatePos(xScale, this.props.selectedDate);\n    }\n\n    if (scales || selectedDatePos) {\n      if (scales) {\n        this.setState({ ...scales });\n      }\n      if (selectedDatePos) {\n        this.setState({ ...selectedDatePos });\n      }\n\n      if (selectedDatePos && this.props.updateTooltip) {\n        this.props.updateTooltip(\n          selectedDatePos.selectedDate,\n          selectedDatePos.selectedDateXPos,\n          selectedDatePos.selectedDateIdx\n        );\n      }\n    }\n  }\n\n  getRatingScale = (availableHeight: number) => {\n    return scalePoint<number>()\n      .domain([5, 4, 3, 2, 1])\n      .range([availableHeight, 0]);\n  };\n\n  getLevelScale = (availableHeight: number) => {\n    return scalePoint()\n      .domain(['ERROR', 'WARN', 'OK'])\n      .range([availableHeight, 0]);\n  };\n\n  getYScale = (props: Props, availableHeight: number, flatData: T.Chart.Point[]): YScale => {\n    if (props.metricType === 'RATING') {\n      return this.getRatingScale(availableHeight);\n    } else if (props.metricType === 'LEVEL') {\n      return this.getLevelScale(availableHeight);\n    }\n    return scaleLinear()\n      .range([availableHeight, 0])\n      .domain([0, max(flatData, d => Number(d.y || 0)) || 1])\n      .nice();\n  };\n\n  getXScale = (\n    { startDate, endDate }: Props,\n    availableWidth: number,\n    flatData: T.Chart.Point[]\n  ) => {\n    const dateRange = extent(flatData, d => d.x) as [Date, Date];\n    const start = startDate && startDate > dateRange[0] ? startDate : dateRange[0];\n    const end = endDate && endDate < dateRange[1] ? endDate : dateRange[1];\n    const xScale: ScaleTime<number, number> = scaleTime()\n      .domain(sortBy([start, end]))\n      .range([0, availableWidth])\n      .clamp(false);\n    return {\n      xScale,\n      maxXRange: dateRange.map(xScale)\n    };\n  };\n\n  getScales = (props: Props) => {\n    const availableWidth = props.width - props.padding[1] - props.padding[3];\n    const availableHeight = props.height - props.padding[0] - props.padding[2];\n    const flatData = flatten(props.series.map(serie => serie.data));\n    return {\n      ...this.getXScale(props, availableWidth, flatData),\n      yScale: this.getYScale(props, availableHeight, flatData)\n    };\n  };\n\n  getSelectedDatePos = (xScale: XScale, selectedDate?: Date) => {\n    const firstSerie = this.props.series[0];\n    if (selectedDate && firstSerie) {\n      const idx = firstSerie.data.findIndex(p => p.x.valueOf() === selectedDate.valueOf());\n      const xRange = sortBy(xScale.range());\n      const xPos = xScale(selectedDate);\n      if (idx >= 0 && xPos >= xRange[0] && xPos <= xRange[1]) {\n        return {\n          selectedDate,\n          selectedDateXPos: xScale(selectedDate),\n          selectedDateIdx: idx\n        };\n      }\n    }\n    return { selectedDate: undefined, selectedDateXPos: undefined, selectedDateIdx: undefined };\n  };\n\n  getEventMarker = (size: number) => {\n    const half = size / 2;\n    return `M${half} 0 L${size} ${half} L ${half} ${size} L0 ${half} L${half} 0 L${size} ${half}`;\n  };\n\n  handleWheel = (event: React.WheelEvent<SVGElement>) => {\n    event.preventDefault();\n    const { maxXRange, xScale } = this.state;\n    const parentBbox = event.currentTarget.getBoundingClientRect();\n    const mouseXPos = (event.pageX - parentBbox.left) / parentBbox.width;\n    const xRange = xScale.range();\n\n    const speed = event.deltaMode\n      ? (25 / event.deltaMode) * this.props.zoomSpeed\n      : this.props.zoomSpeed;\n    const leftPos = xRange[0] - Math.round(speed * event.deltaY * mouseXPos);\n    const rightPos = xRange[1] + Math.round(speed * event.deltaY * (1 - mouseXPos));\n    const startDate = leftPos > maxXRange[0] ? xScale.invert(leftPos) : undefined;\n    const endDate = rightPos < maxXRange[1] ? xScale.invert(rightPos) : undefined;\n    this.handleZoomUpdate(startDate, endDate);\n  };\n\n  handleZoomUpdate = (startDate?: Date, endDate?: Date) => {\n    if (this.props.updateZoom) {\n      this.props.updateZoom(startDate, endDate);\n    }\n  };\n\n  handleMouseMove = (event: React.MouseEvent<SVGElement>) => {\n    const parentBbox = event.currentTarget.getBoundingClientRect();\n    this.updateTooltipPos(event.pageX - parentBbox.left);\n  };\n\n  handleMouseEnter = () => {\n    this.setState({ mouseOver: true });\n  };\n\n  handleMouseOut = () => {\n    const { updateTooltip } = this.props;\n    if (updateTooltip) {\n      this.setState({\n        mouseOver: false,\n        selectedDate: undefined,\n        selectedDateXPos: undefined,\n        selectedDateIdx: undefined\n      });\n      updateTooltip(undefined, undefined, undefined);\n    }\n  };\n\n  handleClick = () => {\n    const { updateSelectedDate } = this.props;\n    if (updateSelectedDate) {\n      updateSelectedDate(this.state.selectedDate || undefined);\n    }\n  };\n\n  setLeakLegendTextWidth = (node: SVGTextElement | null) => {\n    if (node) {\n      this.setState({ leakLegendTextWidth: node.getBoundingClientRect().width });\n    }\n  };\n\n  updateTooltipPos = (xPos: number) => {\n    this.setState(state => {\n      const firstSerie = this.props.series[0];\n      if (state.mouseOver && firstSerie) {\n        const { updateTooltip } = this.props;\n        const date = state.xScale.invert(xPos);\n        const bisectX = bisector<T.Chart.Point, Date>(d => d.x).right;\n        let idx = bisectX(firstSerie.data, date);\n        if (idx >= 0) {\n          const previousPoint = firstSerie.data[idx - 1];\n          const nextPoint = firstSerie.data[idx];\n          if (\n            !nextPoint ||\n            (previousPoint &&\n              date.valueOf() - previousPoint.x.valueOf() <= nextPoint.x.valueOf() - date.valueOf())\n          ) {\n            idx--;\n          }\n          const selectedDate = firstSerie.data[idx].x;\n          const xPos = state.xScale(selectedDate);\n          if (updateTooltip) {\n            updateTooltip(selectedDate, xPos, idx);\n          }\n          return { selectedDate, selectedDateXPos: xPos, selectedDateIdx: idx };\n        }\n      }\n      return null;\n    });\n  };\n\n  renderHorizontalGrid = () => {\n    const { formatYTick } = this.props;\n    const { xScale, yScale } = this.state;\n    const hasTicks = typeof yScale.ticks === 'function';\n    let ticks: Array<string | number> = hasTicks\n      ? yScale.ticks(this.props.maxYTicksCount)\n      : yScale.domain();\n\n    if (!ticks.length) {\n      ticks.push(yScale.domain()[1]);\n    }\n\n    // if there are duplicated ticks, that means 4 ticks are too much for this data\n    // so let's just use the domain values (min and max)\n    if (formatYTick) {\n      const formattedTicks = ticks.map(tick => formatYTick(tick));\n      if (ticks.length > uniq(formattedTicks).length) {\n        ticks = yScale.domain();\n      }\n    }\n\n    return (\n      <g>\n        {ticks.map(tick => (\n          <g key={tick}>\n            {formatYTick != null && (\n              <text\n                className=\"line-chart-tick line-chart-tick-x\"\n                dx=\"-1em\"\n                dy=\"0.3em\"\n                textAnchor=\"end\"\n                x={xScale.range()[0]}\n                y={yScale(tick)}>\n                {formatYTick(tick)}\n              </text>\n            )}\n            <line\n              className=\"line-chart-grid\"\n              x1={xScale.range()[0]}\n              x2={xScale.range()[1]}\n              y1={yScale(tick)}\n              y2={yScale(tick)}\n            />\n          </g>\n        ))}\n      </g>\n    );\n  };\n\n  renderXAxisTicks = () => {\n    const { xScale, yScale } = this.state;\n    const format = xScale.tickFormat(7);\n    const ticks = xScale.ticks(7);\n    const y = yScale.range()[0];\n    return (\n      <g transform=\"translate(0, 20)\">\n        {ticks.slice(0, -1).map((tick, index) => {\n          const nextTick = index + 1 < ticks.length ? ticks[index + 1] : xScale.domain()[1];\n          const x = (xScale(tick) + xScale(nextTick)) / 2;\n          return (\n            <text\n              className=\"line-chart-tick\"\n              // eslint-disable-next-line react/no-array-index-key\n              key={index}\n              textAnchor=\"end\"\n              transform={`rotate(-35, ${x}, ${y})`}\n              x={x}\n              y={y}>\n              {format(tick)}\n            </text>\n          );\n        })}\n      </g>\n    );\n  };\n\n  renderNewCodeLegend = (params: { leakStart: number; leakWidth: number }) => {\n    const { leakStart, leakWidth } = params;\n    const { leakLegendTextWidth, xScale, yScale } = this.state;\n    const yRange = yScale.range();\n    const xRange = xScale.range();\n\n    const legendMinWidth = (leakLegendTextWidth || 0) + rawSizes.grid;\n    const legendPadding = rawSizes.grid / 2;\n\n    let legendBackgroundPosition;\n    let legendBackgroundWidth;\n    let legendMargin;\n    let legendPosition;\n    let legendTextAnchor;\n\n    if (leakWidth >= legendMinWidth) {\n      legendBackgroundWidth = leakWidth;\n      legendBackgroundPosition = leakStart;\n      legendMargin = 0;\n      legendPosition = legendBackgroundPosition + legendPadding;\n      legendTextAnchor = 'start';\n    } else {\n      legendBackgroundWidth = legendMinWidth;\n      legendBackgroundPosition = xRange[xRange.length - 1] - legendBackgroundWidth;\n      legendMargin = rawSizes.grid / 2;\n      legendPosition = xRange[xRange.length - 1] - legendPadding;\n      legendTextAnchor = 'end';\n    }\n\n    return (\n      <>\n        <rect\n          fill={colors.leakPrimaryColor}\n          height={LEGEND_LINE_HEIGHT}\n          width={legendBackgroundWidth}\n          x={legendBackgroundPosition}\n          y={yRange[yRange.length - 1] - LEGEND_LINE_HEIGHT - legendMargin}\n        />\n        <text\n          className=\"new-code-legend\"\n          ref={this.setLeakLegendTextWidth}\n          x={legendPosition}\n          y={yRange[yRange.length - 1] - legendPadding - legendMargin}\n          textAnchor={legendTextAnchor}>\n          new code\n        </text>\n      </>\n    );\n  };\n\n  renderLeak = () => {\n    const { displayNewCodeLegend, leakPeriodDate } = this.props;\n    if (!leakPeriodDate) {\n      return null;\n    }\n    const { xScale, yScale } = this.state;\n    const yRange = yScale.range();\n    const xRange = xScale.range();\n\n    // truncate leak to start of chart to prevent weird visual artifacts when too far left\n    // (occurs when leak starts a long time before first analysis)\n    const leakStart = Math.max(xScale(leakPeriodDate), xRange[0]);\n\n    const leakWidth = xRange[xRange.length - 1] - leakStart;\n    if (leakWidth < 1) {\n      return null;\n    }\n\n    return (\n      <>\n        {displayNewCodeLegend && this.renderNewCodeLegend({ leakStart, leakWidth })}\n        <rect\n          className=\"leak-chart-rect\"\n          fill={colors.leakPrimaryColor}\n          height={yRange[0] - yRange[yRange.length - 1]}\n          width={leakWidth}\n          x={leakStart}\n          y={yRange[yRange.length - 1]}\n        />\n      </>\n    );\n  };\n\n  renderLines = () => {\n    const lineGenerator = d3Line<T.Chart.Point>()\n      .defined(d => Boolean(d.y || d.y === 0))\n      .x(d => this.state.xScale(d.x))\n      .y(d => this.state.yScale(d.y));\n    if (this.props.basisCurve) {\n      lineGenerator.curve(curveBasis);\n    }\n    return (\n      <g>\n        {this.props.series.map((serie, idx) => (\n          <path\n            className={classNames('line-chart-path', 'line-chart-path-' + idx)}\n            d={lineGenerator(serie.data) || undefined}\n            key={serie.name}\n          />\n        ))}\n      </g>\n    );\n  };\n\n  renderDots = () => {\n    return (\n      <g>\n        {this.props.series\n          .map((serie, serieIdx) =>\n            serie.data\n              .map((point, idx) => {\n                const pointNotDefined = !point.y && point.y !== 0;\n                const hasPointBefore =\n                  serie.data[idx - 1] && (serie.data[idx - 1].y || serie.data[idx - 1].y === 0);\n                const hasPointAfter =\n                  serie.data[idx + 1] && (serie.data[idx + 1].y || serie.data[idx + 1].y === 0);\n                if (pointNotDefined || hasPointBefore || hasPointAfter) {\n                  return undefined;\n                }\n                return (\n                  <circle\n                    className={classNames('line-chart-dot', 'line-chart-dot-' + serieIdx)}\n                    cx={this.state.xScale(point.x)}\n                    cy={this.state.yScale(point.y)}\n                    // eslint-disable-next-line react/no-array-index-key\n                    key={serie.name + idx}\n                    r=\"2\"\n                  />\n                );\n              })\n              .filter(isDefined)\n          )\n          .filter(dots => dots.length > 0)}\n      </g>\n    );\n  };\n\n  renderAreas = () => {\n    const areaGenerator = area<T.Chart.Point>()\n      .defined(d => Boolean(d.y || d.y === 0))\n      .x(d => this.state.xScale(d.x))\n      .y1(d => this.state.yScale(d.y))\n      .y0(this.state.yScale(0));\n    if (this.props.basisCurve) {\n      areaGenerator.curve(curveBasis);\n    }\n    return (\n      <g>\n        {this.props.series.map((serie, idx) => (\n          <path\n            className={classNames('line-chart-area', 'line-chart-area-' + idx)}\n            d={areaGenerator(serie.data) || undefined}\n            key={serie.name}\n          />\n        ))}\n      </g>\n    );\n  };\n\n  renderSelectedDate = () => {\n    const { selectedDateIdx, selectedDateXPos, yScale } = this.state;\n    const firstSerie = this.props.series[0];\n    if (selectedDateIdx == null || selectedDateXPos == null || !firstSerie) {\n      return null;\n    }\n\n    return (\n      <g>\n        <line\n          className=\"line-tooltip\"\n          x1={selectedDateXPos}\n          x2={selectedDateXPos}\n          y1={yScale.range()[0]}\n          y2={yScale.range()[1]}\n        />\n        {this.props.series.map((serie, idx) => {\n          const point = serie.data[selectedDateIdx];\n          if (!point || (!point.y && point.y !== 0)) {\n            return null;\n          }\n          return (\n            <circle\n              className={classNames('line-chart-dot', 'line-chart-dot-' + idx)}\n              cx={selectedDateXPos}\n              cy={yScale(point.y)}\n              key={serie.name}\n              r=\"4\"\n            />\n          );\n        })}\n      </g>\n    );\n  };\n\n  renderClipPath = () => {\n    return (\n      <defs>\n        <clipPath id=\"chart-clip\">\n          <rect\n            height={this.state.yScale.range()[0] + 10}\n            transform=\"translate(0,-5)\"\n            width={this.state.xScale.range()[1]}\n          />\n        </clipPath>\n      </defs>\n    );\n  };\n\n  renderMouseEventsOverlay = (zoomEnabled: boolean) => {\n    const mouseEvents: Partial<React.SVGProps<SVGRectElement>> = {};\n    if (zoomEnabled) {\n      mouseEvents.onWheel = this.handleWheel;\n    }\n    if (this.props.updateTooltip) {\n      mouseEvents.onMouseEnter = this.handleMouseEnter;\n      mouseEvents.onMouseMove = this.handleMouseMove;\n      mouseEvents.onMouseOut = this.handleMouseOut;\n    }\n    if (this.props.updateSelectedDate) {\n      mouseEvents.onClick = this.handleClick;\n    }\n    return (\n      <rect\n        className=\"chart-mouse-events-overlay\"\n        height={this.state.yScale.range()[0]}\n        width={this.state.xScale.range()[1]}\n        {...mouseEvents}\n      />\n    );\n  };\n\n  render() {\n    if (!this.props.width || !this.props.height) {\n      return <div />;\n    }\n    const zoomEnabled = !this.props.disableZoom && this.props.updateZoom != null;\n    const isZoomed = Boolean(this.props.startDate || this.props.endDate);\n    return (\n      <svg\n        className={classNames('line-chart', { 'chart-zoomed': isZoomed })}\n        height={this.props.height}\n        width={this.props.width}>\n        {zoomEnabled && this.renderClipPath()}\n        <g transform={`translate(${this.props.padding[3]}, ${this.props.padding[0]})`}>\n          {this.props.leakPeriodDate != null && this.renderLeak()}\n          {!this.props.hideGrid && this.renderHorizontalGrid()}\n          {!this.props.hideXAxis && this.renderXAxisTicks()}\n          {this.props.showAreas && this.renderAreas()}\n          {this.renderLines()}\n          {this.renderDots()}\n          {this.renderSelectedDate()}\n          {this.renderMouseEventsOverlay(zoomEnabled)}\n        </g>\n      </svg>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon from './Icon';\n\ninterface Props {\n  className?: string;\n  index: number;\n  size?: number;\n}\n\nexport default function ChartLegendIcon({ index, ...iconProps }: Props) {\n  const COLORS = [colors.blue, colors.darkBlue, '#24c6e0'];\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14.325 7.143v1.714q0 0.357-0.25 0.607t-0.607 0.25h-10.857q-0.357 0-0.607-0.25t-0.25-0.607v-1.714q0-0.357 0.25-0.607t0.607-0.25h10.857q0.357 0 0.607 0.25t0.25 0.607z\"\n        style={{ fill: COLORS[index] || COLORS[0] }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ClearButton } from '../../components/controls/buttons';\nimport AlertWarnIcon from '../../components/icons/AlertWarnIcon';\nimport ChartLegendIcon from '../../components/icons/ChartLegendIcon';\n\ninterface Props {\n  className?: string;\n  index: number;\n  metric: string;\n  name: string;\n  showWarning?: boolean;\n  removeMetric?: (metric: string) => void;\n}\n\nexport default class GraphsLegendItem extends React.PureComponent<Props> {\n  handleClick = () => {\n    if (this.props.removeMetric) {\n      this.props.removeMetric(this.props.metric);\n    }\n  };\n\n  render() {\n    const isActionable = this.props.removeMetric != null;\n    const legendClass = classNames(\n      { 'activity-graph-legend-actionable': isActionable },\n      this.props.className\n    );\n    return (\n      <span className={legendClass}>\n        {this.props.showWarning ? (\n          <AlertWarnIcon className=\"spacer-right\" />\n        ) : (\n          <ChartLegendIcon className=\"text-middle spacer-right\" index={this.props.index} />\n        )}\n        <span className=\"text-middle\">{this.props.name}</span>\n        {isActionable && (\n          <ClearButton\n            className=\"button-tiny spacer-left text-middle\"\n            iconProps={{ size: 12 }}\n            onClick={this.handleClick}\n          />\n        )}\n      </span>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../components/controls/Tooltip';\nimport { translate } from '../../helpers/l10n';\nimport { Serie } from '../../types/project-activity';\nimport GraphsLegendItem from './GraphsLegendItem';\nimport { hasDataValues } from './utils';\n\nexport interface GraphsLegendCustomProps {\n  removeMetric: (metric: string) => void;\n  series: Serie[];\n}\n\nexport default function GraphsLegendCustom(props: GraphsLegendCustomProps) {\n  const { series } = props;\n  return (\n    <div className=\"activity-graph-legends display-flex-center\">\n      <div className=\"flex-1\">\n        {series.map((serie, idx) => {\n          const hasData = hasDataValues(serie);\n          const legendItem = (\n            <GraphsLegendItem\n              index={idx}\n              metric={serie.name}\n              name={serie.translatedName}\n              removeMetric={props.removeMetric}\n              showWarning={!hasData}\n            />\n          );\n          if (!hasData) {\n            return (\n              <Tooltip\n                key={serie.name}\n                overlay={translate('project_activity.graphs.custom.metric_no_history')}>\n                <span className=\"spacer-left spacer-right\">{legendItem}</span>\n              </Tooltip>\n            );\n          }\n          return (\n            <span className=\"spacer-left spacer-right\" key={serie.name}>\n              {legendItem}\n            </span>\n          );\n        })}\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Serie } from '../../types/project-activity';\nimport GraphsLegendItem from './GraphsLegendItem';\n\nexport interface GraphsLegendStaticProps {\n  series: Array<Pick<Serie, 'name' | 'translatedName'>>;\n}\n\nexport default function GraphsLegendStatic({ series }: GraphsLegendStaticProps) {\n  return (\n    <div className=\"activity-graph-legends\">\n      {series.map((serie, idx) => (\n        <GraphsLegendItem\n          className=\"big-spacer-left big-spacer-right\"\n          index={idx}\n          key={serie.name}\n          metric={serie.name}\n          name={serie.translatedName}\n        />\n      ))}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ChartLegendIcon from '../../components/icons/ChartLegendIcon';\n\ninterface Props {\n  name: string;\n  index: number;\n  translatedName: string;\n  value: string;\n}\n\nexport default function GraphsTooltipsContent({ name, index, translatedName, value }: Props) {\n  return (\n    <tr className=\"activity-graph-tooltip-line\" key={name}>\n      <td className=\"thin\">\n        <ChartLegendIcon className=\"spacer-right\" index={index} />\n      </td>\n      <td className=\"activity-graph-tooltip-value text-right spacer-right thin\">{value}</td>\n      <td>{translatedName}</td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport { MeasureHistory } from '../../types/project-activity';\n\nexport interface GraphsTooltipsContentCoverageProps {\n  addSeparator: boolean;\n  measuresHistory: MeasureHistory[];\n  tooltipIdx: number;\n}\n\nexport default function GraphsTooltipsContentCoverage({\n  addSeparator,\n  measuresHistory,\n  tooltipIdx\n}: GraphsTooltipsContentCoverageProps) {\n  const uncovered = measuresHistory.find(measure => measure.metric === 'uncovered_lines');\n  const coverage = measuresHistory.find(measure => measure.metric === 'coverage');\n  if (!uncovered || !uncovered.history[tooltipIdx] || !coverage || !coverage.history[tooltipIdx]) {\n    return null;\n  }\n  const uncoveredValue = uncovered.history[tooltipIdx].value;\n  const coverageValue = coverage.history[tooltipIdx].value;\n  return (\n    <tbody>\n      {addSeparator && (\n        <tr>\n          <td className=\"activity-graph-tooltip-separator\" colSpan={3}>\n            <hr />\n          </td>\n        </tr>\n      )}\n      {uncoveredValue && (\n        <tr className=\"activity-graph-tooltip-line\">\n          <td className=\"activity-graph-tooltip-value text-right spacer-right thin\" colSpan={2}>\n            {formatMeasure(uncoveredValue, 'SHORT_INT')}\n          </td>\n          <td>{translate('metric.uncovered_lines.name')}</td>\n        </tr>\n      )}\n      {coverageValue && (\n        <tr className=\"activity-graph-tooltip-line\">\n          <td className=\"activity-graph-tooltip-value text-right spacer-right thin\" colSpan={2}>\n            {formatMeasure(coverageValue, 'PERCENT')}\n          </td>\n          <td>{translate('metric.coverage.name')}</td>\n        </tr>\n      )}\n    </tbody>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { formatMeasure } from '../../helpers/measures';\nimport { MeasureHistory } from '../../types/project-activity';\n\nexport interface GraphsTooltipsContentDuplicationProps {\n  addSeparator: boolean;\n  measuresHistory: MeasureHistory[];\n  tooltipIdx: number;\n}\n\nexport default function GraphsTooltipsContentDuplication({\n  addSeparator,\n  measuresHistory,\n  tooltipIdx\n}: GraphsTooltipsContentDuplicationProps) {\n  const duplicationDensity = measuresHistory.find(\n    measure => measure.metric === 'duplicated_lines_density'\n  );\n  if (!duplicationDensity || !duplicationDensity.history[tooltipIdx]) {\n    return null;\n  }\n  const duplicationDensityValue = duplicationDensity.history[tooltipIdx].value;\n  if (!duplicationDensityValue) {\n    return null;\n  }\n  return (\n    <tbody>\n      {addSeparator && (\n        <tr>\n          <td className=\"activity-graph-tooltip-separator\" colSpan={3}>\n            <hr />\n          </td>\n        </tr>\n      )}\n      <tr className=\"activity-graph-tooltip-line\">\n        <td className=\"activity-graph-tooltip-value text-right spacer-right thin\" colSpan={2}>\n          {formatMeasure(duplicationDensityValue, 'PERCENT')}\n        </td>\n        <td>{translate('metric.duplicated_lines_density.name')}</td>\n      </tr>\n    </tbody>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { BranchLike } from '../../types/branch-like';\n\ninterface ComponentContextType {\n  branchLike: BranchLike | undefined;\n  component: T.Component | undefined;\n}\n\nexport const ComponentContext = React.createContext<ComponentContextType>({\n  branchLike: undefined,\n  component: undefined\n});\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport BranchIcon from '../../../components/icons/BranchIcon';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport { isMainBranch } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { limitComponentName } from '../../../helpers/path';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\n\nexport type DefinitionChangeEvent = T.AnalysisEvent &\n  Required<Pick<T.AnalysisEvent, 'definitionChange'>>;\n\nexport function isDefinitionChangeEvent(event: T.AnalysisEvent): event is DefinitionChangeEvent {\n  return event.category === 'DEFINITION_CHANGE' && event.definitionChange !== undefined;\n}\n\ninterface Props {\n  branchLike: BranchLike | undefined;\n  event: DefinitionChangeEvent;\n  readonly?: boolean;\n}\n\ninterface State {\n  expanded: boolean;\n}\n\nexport class DefinitionChangeEventInner extends React.PureComponent<Props, State> {\n  state: State = { expanded: false };\n\n  stopPropagation = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.stopPropagation();\n  };\n\n  toggleProjectsList = () => {\n    this.setState(state => ({ expanded: !state.expanded }));\n  };\n\n  renderProjectLink = (project: { key: string; name: string }, branch: string | undefined) => (\n    <Link\n      onClick={this.stopPropagation}\n      title={project.name}\n      to={getProjectUrl(project.key, branch)}>\n      {limitComponentName(project.name, 28)}\n    </Link>\n  );\n\n  renderBranch = (branch = translate('branches.main_branch')) => (\n    <span className=\"nowrap\" title={branch}>\n      <BranchIcon className=\"little-spacer-left text-text-top\" />\n      {branch}\n    </span>\n  );\n\n  renderProjectChange(project: {\n    changeType: string;\n    key: string;\n    name: string;\n    branch?: string;\n    newBranch?: string;\n    oldBranch?: string;\n  }) {\n    const mainBranch = !this.props.branchLike || isMainBranch(this.props.branchLike);\n\n    if (project.changeType === 'ADDED') {\n      const message = mainBranch\n        ? 'event.definition_change.added'\n        : 'event.definition_change.branch_added';\n      return (\n        <div className=\"text-ellipsis\">\n          <FormattedMessage\n            defaultMessage={translate(message)}\n            id={message}\n            values={{\n              project: this.renderProjectLink(project, project.branch),\n              branch: this.renderBranch(project.branch)\n            }}\n          />\n        </div>\n      );\n    } else if (project.changeType === 'REMOVED') {\n      const message = mainBranch\n        ? 'event.definition_change.removed'\n        : 'event.definition_change.branch_removed';\n      return (\n        <div className=\"text-ellipsis\">\n          <FormattedMessage\n            defaultMessage={translate(message)}\n            id={message}\n            values={{\n              project: this.renderProjectLink(project, project.branch),\n              branch: this.renderBranch(project.branch)\n            }}\n          />\n        </div>\n      );\n    } else if (project.changeType === 'BRANCH_CHANGED') {\n      return (\n        <FormattedMessage\n          defaultMessage={translate('event.definition_change.branch_replaced')}\n          id=\"event.definition_change.branch_replaced\"\n          values={{\n            project: this.renderProjectLink(project, project.newBranch),\n            oldBranch: this.renderBranch(project.oldBranch),\n            newBranch: this.renderBranch(project.newBranch)\n          }}\n        />\n      );\n    }\n    return null;\n  }\n\n  render() {\n    const { event, readonly } = this.props;\n    const { expanded } = this.state;\n    return (\n      <>\n        <span className=\"note\">\n          {translate('event.category', event.category)}\n          {!readonly && ':'}\n        </span>\n\n        {!readonly && (\n          <div>\n            <ButtonLink\n              className=\"project-activity-event-inner-more-link\"\n              onClick={this.toggleProjectsList}\n              stopPropagation={true}>\n              {expanded ? translate('hide') : translate('more')}\n              <DropdownIcon className=\"little-spacer-left\" turned={expanded} />\n            </ButtonLink>\n          </div>\n        )}\n\n        {expanded && (\n          <ul className=\"spacer-left spacer-top\">\n            {event.definitionChange.projects.map(project => (\n              <li className=\"display-flex-center spacer-top\" key={project.key}>\n                {this.renderProjectChange(project)}\n              </li>\n            ))}\n          </ul>\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { ResetButtonLink } from '../../../components/controls/buttons';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport Level from '../../../components/ui/Level';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getProjectUrl } from '../../../helpers/urls';\n\nexport type RichQualityGateEvent = T.AnalysisEvent & Required<Pick<T.AnalysisEvent, 'qualityGate'>>;\n\nexport function isRichQualityGateEvent(event: T.AnalysisEvent): event is RichQualityGateEvent {\n  return event.category === 'QUALITY_GATE' && event.qualityGate !== undefined;\n}\n\ninterface Props {\n  event: RichQualityGateEvent;\n  readonly?: boolean;\n}\n\ninterface State {\n  expanded: boolean;\n}\n\nexport class RichQualityGateEventInner extends React.PureComponent<Props, State> {\n  state: State = { expanded: false };\n\n  stopPropagation = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.stopPropagation();\n  };\n\n  toggleProjectsList = () => {\n    this.setState(state => ({ expanded: !state.expanded }));\n  };\n\n  render() {\n    const { event, readonly } = this.props;\n    const { expanded } = this.state;\n    return (\n      <>\n        <span className=\"note spacer-right\">{translate('event.category', event.category)}:</span>\n        {event.qualityGate.stillFailing ? (\n          <FormattedMessage\n            defaultMessage={translate('event.quality_gate.still_x')}\n            id=\"event.quality_gate.still_x\"\n            values={{ status: <Level level={event.qualityGate.status} small={true} /> }}\n          />\n        ) : (\n          <Level level={event.qualityGate.status} small={true} />\n        )}\n\n        <div>\n          {!readonly && event.qualityGate.failing.length > 0 && (\n            <ResetButtonLink\n              className=\"project-activity-event-inner-more-link\"\n              onClick={this.toggleProjectsList}\n              stopPropagation={true}>\n              {expanded ? translate('hide') : translate('more')}\n              <DropdownIcon className=\"little-spacer-left\" turned={expanded} />\n            </ResetButtonLink>\n          )}\n        </div>\n\n        {expanded && (\n          <ul className=\"spacer-left spacer-top\">\n            {event.qualityGate.failing.map(project => (\n              <li className=\"display-flex-center spacer-top\" key={project.key}>\n                <Level\n                  aria-label={translate('quality_gates.status')}\n                  className=\"spacer-right\"\n                  level={event.qualityGate.status}\n                  small={true}\n                />\n                <div className=\"flex-1 text-ellipsis\">\n                  <Link\n                    onClick={this.stopPropagation}\n                    title={project.name}\n                    to={getProjectUrl(project.key, project.branch)}>\n                    <span aria-label={translateWithParameters('project_x', project.name)}>\n                      {project.name}\n                    </span>\n                  </Link>\n                </div>\n              </li>\n            ))}\n          </ul>\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ComponentContext } from '../../../app/components/ComponentContext';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { DefinitionChangeEventInner, isDefinitionChangeEvent } from './DefinitionChangeEventInner';\nimport { isRichQualityGateEvent, RichQualityGateEventInner } from './RichQualityGateEventInner';\n\nexport interface EventInnerProps {\n  event: T.AnalysisEvent;\n  readonly?: boolean;\n}\n\nexport default function EventInner({ event, readonly }: EventInnerProps) {\n  if (isRichQualityGateEvent(event)) {\n    return <RichQualityGateEventInner event={event} readonly={readonly} />;\n  } else if (isDefinitionChangeEvent(event)) {\n    return (\n      <ComponentContext.Consumer>\n        {({ branchLike }) => (\n          <DefinitionChangeEventInner branchLike={branchLike} event={event} readonly={readonly} />\n        )}\n      </ComponentContext.Consumer>\n    );\n  }\n\n  return (\n    <Tooltip overlay={event.description || null}>\n      <span className=\"text-middle\">\n        <span className=\"note little-spacer-right\">\n          {translate('event.category', event.category)}:\n        </span>\n        <strong className=\"spacer-right\">{event.name}</strong>\n      </span>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport EventInner from '../../apps/projectActivity/components/EventInner';\n\ninterface Props {\n  addSeparator: boolean;\n  events: T.AnalysisEvent[];\n}\n\nexport default function GraphsTooltipsContentEvents({ addSeparator, events }: Props) {\n  return (\n    <tbody>\n      {addSeparator && (\n        <tr>\n          <td className=\"activity-graph-tooltip-separator\" colSpan={3}>\n            <hr />\n          </td>\n        </tr>\n      )}\n      <tr className=\"activity-graph-tooltip-line\">\n        <td colSpan={3}>\n          {events.map(event => (\n            <div className=\"little-spacer-bottom\" key={event.key}>\n              <EventInner event={event} readonly={true} />\n            </div>\n          ))}\n        </td>\n      </tr>\n      {addSeparator && (\n        <tr>\n          <td className=\"activity-graph-tooltip-separator\" colSpan={3}>\n            <hr />\n          </td>\n        </tr>\n      )}\n    </tbody>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ChartLegendIcon from '../../components/icons/ChartLegendIcon';\nimport Rating from '../../components/ui/Rating';\nimport { MeasureHistory } from '../../types/project-activity';\n\nexport interface GraphsTooltipsContentIssuesProps {\n  index: number;\n  measuresHistory: MeasureHistory[];\n  name: string;\n  tooltipIdx: number;\n  translatedName: string;\n  value: string;\n}\n\nconst METRIC_RATING: T.Dict<string> = {\n  bugs: 'reliability_rating',\n  vulnerabilities: 'security_rating',\n  code_smells: 'sqale_rating'\n};\n\nexport default function GraphsTooltipsContentIssues(props: GraphsTooltipsContentIssuesProps) {\n  const rating = props.measuresHistory.find(\n    measure => measure.metric === METRIC_RATING[props.name]\n  );\n  if (!rating || !rating.history[props.tooltipIdx]) {\n    return null;\n  }\n  const ratingValue = rating.history[props.tooltipIdx].value;\n  return (\n    <tr className=\"activity-graph-tooltip-issues-line\" key={props.name}>\n      <td className=\"thin\">\n        <ChartLegendIcon className=\"spacer-right\" index={props.index} />\n      </td>\n      <td className=\"text-right spacer-right\">\n        <span className=\"activity-graph-tooltip-value\">{props.value}</span>\n        {ratingValue && <Rating className=\"spacer-left\" small={true} value={ratingValue} />}\n      </td>\n      <td>{props.translatedName}</td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Popup, PopupPlacement } from '../../components/ui/popups';\nimport { isDefined } from '../../helpers/types';\nimport { MeasureHistory, Serie } from '../../types/project-activity';\nimport DateTimeFormatter from '../intl/DateTimeFormatter';\nimport GraphsTooltipsContent from './GraphsTooltipsContent';\nimport GraphsTooltipsContentCoverage from './GraphsTooltipsContentCoverage';\nimport GraphsTooltipsContentDuplication from './GraphsTooltipsContentDuplication';\nimport GraphsTooltipsContentEvents from './GraphsTooltipsContentEvents';\nimport GraphsTooltipsContentIssues from './GraphsTooltipsContentIssues';\nimport { DEFAULT_GRAPH } from './utils';\n\ninterface Props {\n  events: T.AnalysisEvent[];\n  formatValue: (tick: number | string) => string;\n  graph: string;\n  graphWidth: number;\n  measuresHistory: MeasureHistory[];\n  selectedDate: Date;\n  series: Serie[];\n  tooltipIdx: number;\n  tooltipPos: number;\n}\n\nconst TOOLTIP_WIDTH = 250;\n\nexport default class GraphsTooltips extends React.PureComponent<Props> {\n  renderContent() {\n    const { tooltipIdx } = this.props;\n\n    return this.props.series.map((serie, idx) => {\n      const point = serie.data[tooltipIdx];\n      if (!point || (!point.y && point.y !== 0)) {\n        return null;\n      }\n      if (this.props.graph === DEFAULT_GRAPH) {\n        return (\n          <GraphsTooltipsContentIssues\n            index={idx}\n            key={serie.name}\n            measuresHistory={this.props.measuresHistory}\n            name={serie.name}\n            tooltipIdx={tooltipIdx}\n            translatedName={serie.translatedName}\n            value={this.props.formatValue(point.y)}\n          />\n        );\n      } else {\n        return (\n          <GraphsTooltipsContent\n            index={idx}\n            key={serie.name}\n            name={serie.name}\n            translatedName={serie.translatedName}\n            value={this.props.formatValue(point.y)}\n          />\n        );\n      }\n    });\n  }\n\n  render() {\n    const { events, measuresHistory, tooltipIdx } = this.props;\n    const top = 30;\n    let left = this.props.tooltipPos + 60;\n    let placement = PopupPlacement.RightTop;\n    if (left > this.props.graphWidth - TOOLTIP_WIDTH - 50) {\n      left -= TOOLTIP_WIDTH;\n      placement = PopupPlacement.LeftTop;\n    }\n    const tooltipContent = this.renderContent().filter(isDefined);\n    const addSeparator = tooltipContent.length > 0;\n    return (\n      <Popup\n        className=\"disabled-pointer-events\"\n        placement={placement}\n        style={{ top, left, width: TOOLTIP_WIDTH }}>\n        <div className=\"activity-graph-tooltip\">\n          <div className=\"activity-graph-tooltip-title spacer-bottom\">\n            <DateTimeFormatter date={this.props.selectedDate} />\n          </div>\n          <table className=\"width-100\">\n            {events && events.length > 0 && (\n              <GraphsTooltipsContentEvents addSeparator={addSeparator} events={events} />\n            )}\n            <tbody>{tooltipContent}</tbody>\n            {this.props.graph === 'coverage' && (\n              <GraphsTooltipsContentCoverage\n                addSeparator={addSeparator}\n                measuresHistory={measuresHistory}\n                tooltipIdx={tooltipIdx}\n              />\n            )}\n            {this.props.graph === 'duplications' && (\n              <GraphsTooltipsContentDuplication\n                addSeparator={addSeparator}\n                measuresHistory={measuresHistory}\n                tooltipIdx={tooltipIdx}\n              />\n            )}\n          </table>\n        </div>\n      </Popup>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport AdvancedTimeline from '../../components/charts/AdvancedTimeline';\nimport { formatMeasure, getShortType } from '../../helpers/measures';\nimport { MeasureHistory, Serie } from '../../types/project-activity';\nimport GraphsLegendCustom from './GraphsLegendCustom';\nimport GraphsLegendStatic from './GraphsLegendStatic';\nimport GraphsTooltips from './GraphsTooltips';\n\ninterface Props {\n  events: T.AnalysisEvent[];\n  graph: string;\n  graphEndDate?: Date;\n  graphStartDate?: Date;\n  leakPeriodDate?: Date;\n  isCustom?: boolean;\n  measuresHistory: MeasureHistory[];\n  metricsType: string;\n  removeCustomMetric?: (metric: string) => void;\n  showAreas: boolean;\n  series: Serie[];\n  selectedDate?: Date;\n  updateGraphZoom?: (from?: Date, to?: Date) => void;\n  updateSelectedDate?: (selectedDate?: Date) => void;\n  updateTooltip: (selectedDate?: Date) => void;\n}\n\ninterface State {\n  tooltipIdx?: number;\n  tooltipXPos?: number;\n}\n\nexport default class GraphHistory extends React.PureComponent<Props, State> {\n  state: State = {};\n\n  formatValue = (tick: string | number) => {\n    return formatMeasure(tick, getShortType(this.props.metricsType));\n  };\n\n  formatTooltipValue = (tick: string | number) => {\n    return formatMeasure(tick, this.props.metricsType);\n  };\n\n  updateTooltip = (selectedDate?: Date, tooltipXPos?: number, tooltipIdx?: number) => {\n    this.props.updateTooltip(selectedDate);\n    this.setState({ tooltipXPos, tooltipIdx });\n  };\n\n  render() {\n    const {\n      events,\n      graph,\n      graphEndDate,\n      graphStartDate,\n      isCustom,\n      leakPeriodDate,\n      measuresHistory,\n      metricsType,\n      selectedDate,\n      series,\n      showAreas\n    } = this.props;\n    const { tooltipIdx, tooltipXPos } = this.state;\n\n    return (\n      <div className=\"activity-graph-container flex-grow display-flex-column display-flex-stretch display-flex-justify-center\">\n        {isCustom && this.props.removeCustomMetric ? (\n          <GraphsLegendCustom removeMetric={this.props.removeCustomMetric} series={series} />\n        ) : (\n          <GraphsLegendStatic series={series} />\n        )}\n\n        <div className=\"flex-1\">\n          <AutoSizer>\n            {({ height, width }) => (\n              <div>\n                <AdvancedTimeline\n                  displayNewCodeLegend={true}\n                  endDate={graphEndDate}\n                  formatYTick={this.formatValue}\n                  height={height}\n                  leakPeriodDate={leakPeriodDate}\n                  metricType={metricsType}\n                  selectedDate={selectedDate}\n                  series={series}\n                  showAreas={showAreas}\n                  startDate={graphStartDate}\n                  updateSelectedDate={this.props.updateSelectedDate}\n                  updateTooltip={this.updateTooltip}\n                  updateZoom={this.props.updateGraphZoom}\n                  width={width}\n                />\n                {selectedDate !== undefined &&\n                  tooltipIdx !== undefined &&\n                  tooltipXPos !== undefined && (\n                    <GraphsTooltips\n                      events={events}\n                      formatValue={this.formatTooltipValue}\n                      graph={graph}\n                      graphWidth={width}\n                      measuresHistory={measuresHistory}\n                      selectedDate={selectedDate}\n                      series={series}\n                      tooltipIdx={tooltipIdx}\n                      tooltipPos={tooltipXPos}\n                    />\n                  )}\n              </div>\n            )}\n          </AutoSizer>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isEqual } from 'lodash';\nimport * as React from 'react';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate } from '../../helpers/l10n';\nimport { getBaseUrl } from '../../helpers/system';\nimport { GraphType, MeasureHistory, Serie } from '../../types/project-activity';\nimport GraphHistory from './GraphHistory';\nimport './styles.css';\nimport { getSeriesMetricType, hasHistoryData, isCustomGraph } from './utils';\n\ninterface Props {\n  analyses: T.ParsedAnalysis[];\n  graph: GraphType;\n  graphs: Serie[][];\n  graphEndDate?: Date;\n  graphStartDate?: Date;\n  leakPeriodDate?: Date;\n  loading: boolean;\n  measuresHistory: MeasureHistory[];\n  removeCustomMetric?: (metric: string) => void;\n  selectedDate?: Date;\n  series: Serie[];\n  updateGraphZoom?: (from?: Date, to?: Date) => void;\n  updateSelectedDate?: (selectedDate?: Date) => void;\n}\n\ninterface State {\n  selectedDate?: Date;\n}\n\nexport default class GraphsHistory extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      selectedDate: props.selectedDate\n    };\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    if (!isEqual(nextProps.selectedDate, this.props.selectedDate)) {\n      this.setState({ selectedDate: nextProps.selectedDate });\n    }\n  }\n\n  getSelectedDateEvents = () => {\n    const { selectedDate } = this.state;\n    const { analyses } = this.props;\n    if (analyses && selectedDate) {\n      const analysis = analyses.find(a => a.date.valueOf() === selectedDate.valueOf());\n      if (analysis) {\n        return analysis.events;\n      }\n    }\n    return [];\n  };\n\n  updateTooltip = (selectedDate?: Date) => {\n    this.setState({ selectedDate });\n  };\n\n  render() {\n    const { graph, loading, series } = this.props;\n    const isCustom = isCustomGraph(graph);\n\n    if (loading) {\n      return (\n        <div className=\"activity-graph-container flex-grow display-flex-column display-flex-stretch display-flex-justify-center\">\n          <div className=\"text-center\">\n            <DeferredSpinner loading={loading} />\n          </div>\n        </div>\n      );\n    }\n\n    if (!hasHistoryData(series)) {\n      return (\n        <div className=\"activity-graph-container flex-grow display-flex-column display-flex-stretch display-flex-justify-center\">\n          <div className=\"display-flex-center display-flex-justify-center\">\n            <img\n              alt=\"\" /* Make screen readers ignore this image; it's purely eye candy. */\n              className=\"spacer-right\"\n              height={52}\n              src={`${getBaseUrl()}/images/activity-chart.svg`}\n            />\n            <div className=\"big-spacer-left big text-muted\" style={{ maxWidth: 300 }}>\n              {translate(\n                isCustom\n                  ? 'project_activity.graphs.custom.no_history'\n                  : 'component_measures.no_history'\n              )}\n            </div>\n          </div>\n        </div>\n      );\n    }\n    const events = this.getSelectedDateEvents();\n    const showAreas = [GraphType.coverage, GraphType.duplications].includes(graph);\n    return (\n      <div className=\"display-flex-justify-center display-flex-column display-flex-stretch flex-grow\">\n        {this.props.graphs.map((graphSeries, idx) => (\n          <GraphHistory\n            events={events}\n            graph={graph}\n            graphEndDate={this.props.graphEndDate}\n            graphStartDate={this.props.graphStartDate}\n            isCustom={isCustom}\n            key={idx}\n            leakPeriodDate={this.props.leakPeriodDate}\n            measuresHistory={this.props.measuresHistory}\n            metricsType={getSeriesMetricType(graphSeries)}\n            removeCustomMetric={this.props.removeCustomMetric}\n            selectedDate={this.state.selectedDate}\n            series={graphSeries}\n            showAreas={showAreas}\n            updateGraphZoom={this.props.updateGraphZoom}\n            updateSelectedDate={this.props.updateSelectedDate}\n            updateTooltip={this.updateTooltip}\n          />\n        ))}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport HistoryIcon from '../../components/icons/HistoryIcon';\nimport { translate } from '../../helpers/l10n';\nimport { getActivityUrl, getMeasureHistoryUrl } from '../../helpers/urls';\nimport { BranchLike } from '../../types/branch-like';\nimport { GraphType } from '../../types/project-activity';\nimport { isCustomGraph } from '../activity-graph/utils';\nimport './ActivityLink.css';\n\nexport interface ActivityLinkProps {\n  branchLike?: BranchLike;\n  component: string;\n  graph?: GraphType;\n  label?: string;\n  metric?: string;\n}\n\nexport default function ActivityLink(props: ActivityLinkProps) {\n  const { branchLike, component, graph, label, metric } = props;\n  return (\n    <Link\n      className=\"activity-link\"\n      to={\n        metric !== undefined && graph !== undefined && isCustomGraph(graph)\n          ? getMeasureHistoryUrl(component, metric, branchLike)\n          : getActivityUrl(component, branchLike, graph)\n      }>\n      <HistoryIcon className=\"little-spacer-right\" size={14} />\n      <span>{label || translate('portfolio.activity_link')}</span>\n    </Link>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport Level from '../../../components/ui/Level';\nimport { translate } from '../../../helpers/l10n';\nimport { isDefinitionChangeEvent } from '../../projectActivity/components/DefinitionChangeEventInner';\nimport { isRichQualityGateEvent } from '../../projectActivity/components/RichQualityGateEventInner';\n\ninterface Props {\n  event: T.AnalysisEvent;\n}\n\nexport function Event({ event }: Props) {\n  if (event.category === 'VERSION') {\n    return (\n      <span\n        className=\"overview-analysis-event analysis-version text-ellipsis max-width-80\"\n        title={`${translate('version')} ${event.name}`}>\n        {event.name}\n      </span>\n    );\n  }\n\n  const eventCategory = translate('event.category', event.category);\n  if (isDefinitionChangeEvent(event)) {\n    return (\n      <div className=\"overview-analysis-event\">\n        <span className=\"note\">{eventCategory}</span>\n      </div>\n    );\n  }\n\n  if (isRichQualityGateEvent(event)) {\n    return (\n      <div className=\"overview-analysis-event\">\n        <span className=\"note\">{eventCategory}:</span>{' '}\n        {event.qualityGate.stillFailing ? (\n          <FormattedMessage\n            defaultMessage={translate('event.quality_gate.still_x')}\n            id=\"event.quality_gate.still_x\"\n            values={{ status: <Level level={event.qualityGate.status} small={true} /> }}\n          />\n        ) : (\n          <Level level={event.qualityGate.status} small={true} />\n        )}\n      </div>\n    );\n  }\n\n  return (\n    <div className=\"overview-analysis-event\">\n      <span className=\"note text-ellipsis width-80\">{eventCategory}:</span>{' '}\n      {event.description ? (\n        <strong title={event.description}>{event.name}</strong>\n      ) : (\n        <strong>{event.name}</strong>\n      )}\n    </div>\n  );\n}\n\nexport default React.memo(Event);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport { translate } from '../../../helpers/l10n';\nimport { ComponentQualifier } from '../../../types/component';\nimport Event from './Event';\n\nexport interface AnalysisProps {\n  analysis: T.Analysis;\n  qualifier: string;\n}\n\nexport function Analysis({ analysis, ...props }: AnalysisProps) {\n  const sortedEvents = sortBy(\n    analysis.events,\n    // versions first\n    event => (event.category === 'VERSION' ? 0 : 1),\n    // then the rest sorted by category\n    'category'\n  );\n\n  // use `TRK` for all components but applications\n  const qualifier =\n    props.qualifier === ComponentQualifier.Application\n      ? ComponentQualifier.Application\n      : ComponentQualifier.Project;\n\n  return (\n    <li className=\"overview-analysis\">\n      <div className=\"small little-spacer-bottom\">\n        <strong>\n          <DateTimeFormatter date={analysis.date} />\n        </strong>\n      </div>\n\n      {sortedEvents.length > 0 ? (\n        <div className=\"overview-activity-events\">\n          {sortedEvents.map(event => (\n            <Event event={event} key={event.key} />\n          ))}\n        </div>\n      ) : (\n        <span className=\"note\">{translate('project_activity.analyzed', qualifier)}</span>\n      )}\n    </li>\n  );\n}\n\nexport default React.memo(Analysis);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport GraphsHeader from '../../../components/activity-graph/GraphsHeader';\nimport GraphsHistory from '../../../components/activity-graph/GraphsHistory';\nimport {\n  DEFAULT_GRAPH,\n  generateSeries,\n  getDisplayedHistoryMetrics,\n  splitSeriesInGraphs\n} from '../../../components/activity-graph/utils';\nimport ActivityLink from '../../../components/common/ActivityLink';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { parseDate } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport { GraphType, MeasureHistory } from '../../../types/project-activity';\nimport Analysis from './Analysis';\n\nexport interface ActivityPanelProps {\n  analyses?: T.Analysis[];\n  branchLike?: BranchLike;\n  component: Pick<T.Component, 'key' | 'qualifier'>;\n  graph?: GraphType;\n  leakPeriodDate?: Date;\n  loading?: boolean;\n  measuresHistory: MeasureHistory[];\n  metrics: T.Metric[];\n  onGraphChange: (graph: GraphType) => void;\n}\n\nconst MAX_ANALYSES_NB = 5;\nconst MAX_GRAPH_NB = 2;\nconst MAX_SERIES_PER_GRAPH = 3;\n\nexport function ActivityPanel(props: ActivityPanelProps) {\n  const {\n    analyses = [],\n    branchLike,\n    component,\n    graph = DEFAULT_GRAPH,\n    leakPeriodDate,\n    loading,\n    measuresHistory,\n    metrics\n  } = props;\n\n  const series = generateSeries(\n    measuresHistory,\n    graph,\n    metrics,\n    getDisplayedHistoryMetrics(graph, [])\n  );\n  const graphs = splitSeriesInGraphs(series, MAX_GRAPH_NB, MAX_SERIES_PER_GRAPH);\n  let shownLeakPeriodDate;\n  if (leakPeriodDate !== undefined) {\n    const startDate = measuresHistory.reduce((oldest: Date, { history }) => {\n      if (history.length > 0) {\n        const date = parseDate(history[0].date);\n        return oldest.getTime() > date.getTime() ? date : oldest;\n      } else {\n        return oldest;\n      }\n    }, new Date());\n    shownLeakPeriodDate =\n      startDate.getTime() > leakPeriodDate.getTime() ? startDate : leakPeriodDate;\n  }\n\n  const filteredAnalyses = analyses.filter(a => a.events.length > 0).slice(0, MAX_ANALYSES_NB);\n\n  return (\n    <div className=\"overview-panel big-spacer-top\" data-test=\"overview__activity-panel\">\n      <h2 className=\"overview-panel-title\">{translate('overview.activity')}</h2>\n\n      <div className=\"overview-panel-content\">\n        <div className=\"display-flex-row\">\n          <div className=\"display-flex-column flex-1\">\n            <div aria-hidden={true} className=\"overview-panel-padded display-flex-column flex-1\">\n              <GraphsHeader graph={graph} metrics={metrics} updateGraph={props.onGraphChange} />\n              <GraphsHistory\n                analyses={[]}\n                graph={graph}\n                graphs={graphs}\n                leakPeriodDate={shownLeakPeriodDate}\n                loading={Boolean(loading)}\n                measuresHistory={measuresHistory}\n                series={series}\n              />\n            </div>\n\n            <div className=\"overview-panel-padded bordered-top text-right\">\n              <ActivityLink branchLike={branchLike} component={component.key} graph={graph} />\n            </div>\n          </div>\n\n          <div className=\"overview-panel-padded bordered-left width-30\">\n            <div data-test=\"overview__activity-analyses\">\n              <DeferredSpinner\n                className=\"spacer-top spacer-left\"\n                loading={analyses.length === 0 && loading}>\n                {analyses.length === 0 ? (\n                  <p className=\"spacer-top spacer-left note\">{translate('no_results')}</p>\n                ) : (\n                  <ul className=\"spacer-top spacer-left\">\n                    {filteredAnalyses.map(analysis => (\n                      <Analysis\n                        analysis={analysis}\n                        key={analysis.key}\n                        qualifier={component.qualifier}\n                      />\n                    ))}\n                  </ul>\n                )}\n              </DeferredSpinner>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default React.memo(ActivityPanel);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ButtonIcon } from '../../components/controls/buttons';\nimport ClearIcon from '../../components/icons/ClearIcon';\nimport { Alert, AlertProps } from '../../components/ui/Alert';\nimport { translate } from '../../helpers/l10n';\nimport { get, save } from '../../helpers/storage';\nimport './DismissableAlert.css';\n\nexport interface DismissableAlertProps extends AlertProps {\n  alertKey: string;\n  children?: React.ReactNode;\n  className?: string;\n}\n\nexport const DISMISSED_ALERT_STORAGE_KEY = 'sonarqube.dismissed_alert';\n\nexport default function DismissableAlert(props: DismissableAlertProps) {\n  const { alertKey, children, className, display = 'banner', variant } = props;\n  const [show, setShow] = React.useState(false);\n\n  React.useEffect(() => {\n    if (get(DISMISSED_ALERT_STORAGE_KEY, alertKey) !== 'true') {\n      setShow(true);\n    }\n  }, [alertKey]);\n\n  const hideAlert = () => {\n    window.dispatchEvent(new Event('resize'));\n    save(DISMISSED_ALERT_STORAGE_KEY, 'true', alertKey);\n  };\n\n  return !show ? null : (\n    <div className={classNames('dismissable-alert-wrapper', className)}>\n      <Alert className={`dismissable-alert-${display}`} display={display} variant={variant}>\n        <div className=\"display-flex-center dismissable-alert-content\">\n          <div className=\"flex-1\">{children}</div>\n          <ButtonIcon\n            aria-label={translate('alert.dismiss')}\n            onClick={() => {\n              hideAlert();\n              setShow(false);\n            }}>\n            <ClearIcon size={12} thin={true} />\n          </ButtonIcon>\n        </div>\n      </Alert>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const ALM_INTEGRATION = 'almintegration';\nexport const ANALYSIS_SCOPE_CATEGORY = 'exclusions';\nexport const LANGUAGES_CATEGORY = 'languages';\nexport const NEW_CODE_PERIOD_CATEGORY = 'new_code_period';\nexport const PULL_REQUEST_DECORATION_BINDING_CATEGORY = 'pull_request_decoration_binding';\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport DismissableAlert from '../../../components/ui/DismissableAlert';\nimport { translate } from '../../../helpers/l10n';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { ProjectAlmBindingResponse } from '../../../types/alm-settings';\nimport { ComponentQualifier } from '../../../types/component';\nimport { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../settings/components/AdditionalCategoryKeys';\n\nexport interface FirstAnalysisNextStepsNotifProps {\n  branchesEnabled?: boolean;\n  component: T.Component;\n  currentUser: T.CurrentUser;\n  detectedCIOnLastAnalysis?: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nexport function FirstAnalysisNextStepsNotif(props: FirstAnalysisNextStepsNotifProps) {\n  const {\n    component,\n    currentUser,\n    branchesEnabled,\n    detectedCIOnLastAnalysis,\n    projectBinding\n  } = props;\n\n  if (!isLoggedIn(currentUser) || component.qualifier !== ComponentQualifier.Project) {\n    return null;\n  }\n\n  const showConfigurePullRequestDecoNotif = branchesEnabled && projectBinding === undefined;\n  const showConfigureCINotif =\n    detectedCIOnLastAnalysis !== undefined ? !detectedCIOnLastAnalysis : false;\n\n  if (!showConfigureCINotif && !showConfigurePullRequestDecoNotif) {\n    return null;\n  }\n\n  const showOnlyConfigureCI = showConfigureCINotif && !showConfigurePullRequestDecoNotif;\n  const showOnlyConfigurePR = showConfigurePullRequestDecoNotif && !showConfigureCINotif;\n  const showBoth = showConfigureCINotif && showConfigurePullRequestDecoNotif;\n  const isProjectAdmin = component.configuration?.showSettings;\n  const tutorialsLink = (\n    <Link\n      to={{\n        pathname: '/tutorials',\n        query: { id: component.key }\n      }}>\n      {translate('overview.project.next_steps.links.set_up_ci')}\n    </Link>\n  );\n  const projectSettingsLink = (\n    <Link\n      to={{\n        pathname: '/project/settings',\n        query: {\n          id: component.key,\n          category: PULL_REQUEST_DECORATION_BINDING_CATEGORY\n        }\n      }}>\n      {translate('overview.project.next_steps.links.project_settings')}\n    </Link>\n  );\n\n  return (\n    <DismissableAlert alertKey={`config_ci_pr_deco.${component.key}`} variant=\"info\">\n      {showOnlyConfigureCI && (\n        <FormattedMessage\n          defaultMessage={translate('overview.project.next_steps.set_up_ci')}\n          id=\"overview.project.next_steps.set_up_ci\"\n          values={{\n            link: tutorialsLink\n          }}\n        />\n      )}\n\n      {showOnlyConfigurePR &&\n        (isProjectAdmin ? (\n          <FormattedMessage\n            defaultMessage={translate('overview.project.next_steps.set_up_pr_deco.admin')}\n            id=\"overview.project.next_steps.set_up_pr_deco.admin\"\n            values={{\n              link_project_settings: projectSettingsLink\n            }}\n          />\n        ) : (\n          translate('overview.project.next_steps.set_up_pr_deco')\n        ))}\n\n      {showBoth &&\n        (isProjectAdmin ? (\n          <FormattedMessage\n            defaultMessage={translate('overview.project.next_steps.set_up_pr_deco_and_ci.admin')}\n            id=\"overview.project.next_steps.set_up_pr_deco_and_ci.admin\"\n            values={{\n              link_ci: tutorialsLink,\n              link_project_settings: projectSettingsLink\n            }}\n          />\n        ) : (\n          <FormattedMessage\n            defaultMessage={translate('overview.project.next_steps.set_up_pr_deco_and_ci')}\n            id=\"overview.project.next_steps.set_up_pr_deco_and_ci\"\n            values={{ link_ci: tutorialsLink }}\n          />\n        ))}\n    </DismissableAlert>\n  );\n}\n\nexport default withCurrentUser(FirstAnalysisNextStepsNotif);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport styled from '@emotion/styled';\nimport * as React from 'react';\nimport { colors, sizes } from '../../app/theme';\n\nexport interface BoxedTabsProps<K> {\n  className?: string;\n  onSelect: (key: K) => void;\n  selected?: K;\n  tabs: Array<{ key: K; label: React.ReactNode }>;\n}\n\nconst TabContainer = styled.div`\n  display: flex;\n  flex-direction: row;\n`;\n\nconst baseBorder = () => `1px solid ${colors.barBorderColor}`;\n\nconst highlightHoverMixin = () => `\n  &:hover {\n    background-color: ${colors.barBackgroundColorHighlight};\n  }\n`;\n\nconst StyledTab = styled.button<{ active: boolean }>`\n  position: relative;\n  background-color: ${props => (props.active ? 'white' : colors.barBackgroundColor)};\n  border-top: ${baseBorder};\n  border-left: ${baseBorder};\n  border-right: none;\n  border-bottom: none;\n  margin-bottom: -1px;\n  min-width: 128px;\n  min-height: 56px;\n  ${props => !props.active && 'cursor: pointer;'}\n  outline: 0;\n  padding: calc(2 * ${sizes.gridSize});\n\n  ${props => (!props.active ? highlightHoverMixin : null)}\n\n  &:last-child {\n    border-right: ${baseBorder};\n  }\n`;\n\nconst ActiveBorder = styled.div<{ active: boolean }>`\n  display: ${props => (props.active ? 'block' : 'none')};\n  background-color: ${colors.blue};\n  height: 3px;\n  width: 100%;\n  position: absolute;\n  left: 0;\n  top: -1px;\n`;\n\nexport default function BoxedTabs<K>(props: BoxedTabsProps<K>) {\n  const { className, tabs, selected } = props;\n\n  return (\n    <TabContainer className={className}>\n      {tabs.map(({ key, label }, i) => (\n        <StyledTab\n          active={selected === key}\n          // eslint-disable-next-line react/no-array-index-key\n          key={i}\n          onClick={() => selected !== key && props.onSelect(key)}\n          type=\"button\">\n          <ActiveBorder active={selected === key} />\n          {label}\n        </StyledTab>\n      ))}\n    </TabContainer>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post } from '../helpers/request';\nimport { getBaseUrl } from '../helpers/system';\nimport { ComponentReportStatus } from '../types/component-report';\n\nexport function getReportStatus(\n  componentKey: string,\n  branchKey?: string\n): Promise<ComponentReportStatus> {\n  return getJSON('/api/governance_reports/status', { componentKey, branchKey }).catch(\n    throwGlobalError\n  );\n}\n\nexport function getReportUrl(componentKey: string, branchKey?: string): string {\n  let url = `${getBaseUrl()}/api/governance_reports/download?componentKey=${encodeURIComponent(\n    componentKey\n  )}`;\n\n  if (branchKey) {\n    url += `&branchKey=${branchKey}`;\n  }\n\n  return url;\n}\n\nexport function subscribeToEmailReport(\n  componentKey: string,\n  branchKey?: string\n): Promise<void | Response> {\n  return post('/api/governance_reports/subscribe', { componentKey, branchKey }).catch(\n    throwGlobalError\n  );\n}\n\nexport function unsubscribeFromEmailReport(\n  componentKey: string,\n  branchKey?: string\n): Promise<void | Response> {\n  return post('/api/governance_reports/unsubscribe', { componentKey, branchKey }).catch(\n    throwGlobalError\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { getReportUrl } from '../../api/component-report';\nimport { Button } from '../../components/controls/buttons';\nimport Dropdown from '../../components/controls/Dropdown';\nimport DropdownIcon from '../../components/icons/DropdownIcon';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { Branch } from '../../types/branch-like';\n\nexport interface ComponentReportActionsRendererProps {\n  component: T.Component;\n  branch?: Branch;\n  frequency: string;\n  subscribed: boolean;\n  canSubscribe: boolean;\n  currentUserHasEmail: boolean;\n  handleSubscription: () => void;\n  handleUnsubscription: () => void;\n}\n\nexport default function ComponentReportActionsRenderer(props: ComponentReportActionsRendererProps) {\n  const { branch, component, frequency, subscribed, canSubscribe, currentUserHasEmail } = props;\n\n  const renderDownloadButton = (simple = false) => {\n    return (\n      <a\n        download={[component.name, branch?.name, 'PDF Report.pdf'].filter(s => !!s).join(' - ')}\n        href={getReportUrl(component.key, branch?.name)}\n        target=\"_blank\"\n        data-test=\"overview__download-pdf-report-button\"\n        rel=\"noopener noreferrer\">\n        {simple\n          ? translate('download_verb')\n          : translateWithParameters(\n              'component_report.download',\n              translate('qualifier', component.qualifier).toLowerCase()\n            )}\n      </a>\n    );\n  };\n\n  const renderSubscriptionButton = () => {\n    if (!currentUserHasEmail) {\n      return (\n        <span className=\"text-muted-2\">{translate('component_report.no_email_to_subscribe')}</span>\n      );\n    }\n\n    const translationKey = subscribed\n      ? 'component_report.unsubscribe_x'\n      : 'component_report.subscribe_x';\n    const onClickHandler = subscribed ? props.handleUnsubscription : props.handleSubscription;\n    const frequencyTranslation = translate('report.frequency', frequency).toLowerCase();\n\n    return (\n      <a href=\"#\" onClick={onClickHandler} data-test=\"overview__subscribe-to-report-button\">\n        {translateWithParameters(translationKey, frequencyTranslation)}\n      </a>\n    );\n  };\n\n  return canSubscribe ? (\n    <Dropdown\n      overlay={\n        <ul className=\"menu\">\n          <li>{renderDownloadButton(true)}</li>\n          <li>{renderSubscriptionButton()}</li>\n        </ul>\n      }>\n      <Button className=\"dropdown-toggle\">\n        {translateWithParameters(\n          'component_report.report',\n          translate('qualifier', component.qualifier)\n        )}\n        <DropdownIcon className=\"spacer-left icon-half-transparent\" />\n      </Button>\n    </Dropdown>\n  ) : (\n    renderDownloadButton()\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport {\n  getReportStatus,\n  subscribeToEmailReport,\n  unsubscribeFromEmailReport\n} from '../../api/component-report';\nimport addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { isLoggedIn } from '../../helpers/users';\nimport { Store } from '../../store/rootReducer';\nimport { Branch } from '../../types/branch-like';\nimport { ComponentQualifier } from '../../types/component';\nimport { ComponentReportStatus } from '../../types/component-report';\nimport { withCurrentUser } from '../hoc/withCurrentUser';\nimport ComponentReportActionsRenderer from './ComponentReportActionsRenderer';\n\ninterface Props {\n  appState: Pick<T.AppState, 'qualifiers'>;\n  component: T.Component;\n  branch?: Branch;\n  currentUser: T.CurrentUser;\n}\n\ninterface State {\n  loadingStatus?: boolean;\n  status?: ComponentReportStatus;\n}\n\nexport class ComponentReportActions extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n    const governanceEnabled = this.props.appState.qualifiers.includes(ComponentQualifier.Portfolio);\n    if (governanceEnabled) {\n      this.loadReportStatus();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadReportStatus = async () => {\n    const { component, branch } = this.props;\n\n    const status = await getReportStatus(component.key, branch?.name).catch(() => undefined);\n\n    if (this.mounted) {\n      this.setState({ status, loadingStatus: false });\n    }\n  };\n\n  handleSubscription = (subscribed: boolean) => {\n    const { component } = this.props;\n    const { status } = this.state;\n\n    const translationKey = subscribed\n      ? 'component_report.subscribe_x_success'\n      : 'component_report.unsubscribe_x_success';\n    const frequencyTranslation = translate(\n      'report.frequency',\n      status?.componentFrequency || status?.globalFrequency || ''\n    ).toLowerCase();\n    const qualifierTranslation = translate('qualifier', component.qualifier).toLowerCase();\n\n    addGlobalSuccessMessage(\n      translateWithParameters(translationKey, frequencyTranslation, qualifierTranslation)\n    );\n\n    this.loadReportStatus();\n  };\n\n  handleSubscribe = async () => {\n    const { component, branch } = this.props;\n\n    await subscribeToEmailReport(component.key, branch?.name);\n\n    this.handleSubscription(true);\n  };\n\n  handleUnsubscribe = async () => {\n    const { component, branch } = this.props;\n\n    await unsubscribeFromEmailReport(component.key, branch?.name);\n\n    this.handleSubscription(false);\n  };\n\n  render() {\n    const { currentUser, component, branch } = this.props;\n    const { status, loadingStatus } = this.state;\n\n    if (loadingStatus || !status || (branch && !branch.excludedFromPurge)) {\n      return null;\n    }\n\n    const currentUserHasEmail = isLoggedIn(currentUser) && !!currentUser.email;\n\n    return (\n      <ComponentReportActionsRenderer\n        branch={branch}\n        component={component}\n        frequency={status.componentFrequency || status.globalFrequency}\n        subscribed={status.subscribed}\n        canSubscribe={status.canSubscribe}\n        currentUserHasEmail={currentUserHasEmail}\n        handleSubscription={this.handleSubscribe}\n        handleUnsubscription={this.handleUnsubscribe}\n      />\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({\n  appState: state.appState\n});\n\nexport default withCurrentUser(connect(mapStateToProps)(ComponentReportActions));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { getBranchLikeQuery } from '../../helpers/branch-like';\nimport { getComponentDrilldownUrl, getComponentIssuesUrl } from '../../helpers/urls';\nimport { BranchLike } from '../../types/branch-like';\n\nconst ISSUE_MEASURES = [\n  'violations',\n  'new_violations',\n  'blocker_violations',\n  'critical_violations',\n  'major_violations',\n  'minor_violations',\n  'info_violations',\n  'new_blocker_violations',\n  'new_critical_violations',\n  'new_major_violations',\n  'new_minor_violations',\n  'new_info_violations',\n  'open_issues',\n  'reopened_issues',\n  'confirmed_issues',\n  'false_positive_issues',\n  'code_smells',\n  'new_code_smells',\n  'bugs',\n  'new_bugs',\n  'vulnerabilities',\n  'new_vulnerabilities'\n];\n\nconst issueParamsPerMetric: T.Dict<T.Dict<string>> = {\n  blocker_violations: { resolved: 'false', severities: 'BLOCKER' },\n  new_blocker_violations: { resolved: 'false', severities: 'BLOCKER' },\n  critical_violations: { resolved: 'false', severities: 'CRITICAL' },\n  new_critical_violations: { resolved: 'false', severities: 'CRITICAL' },\n  major_violations: { resolved: 'false', severities: 'MAJOR' },\n  new_major_violations: { resolved: 'false', severities: 'MAJOR' },\n  minor_violations: { resolved: 'false', severities: 'MINOR' },\n  new_minor_violations: { resolved: 'false', severities: 'MINOR' },\n  info_violations: { resolved: 'false', severities: 'INFO' },\n  new_info_violations: { resolved: 'false', severities: 'INFO' },\n  open_issues: { resolved: 'false', statuses: 'OPEN' },\n  reopened_issues: { resolved: 'false', statuses: 'REOPENED' },\n  confirmed_issues: { resolved: 'false', statuses: 'CONFIRMED' },\n  false_positive_issues: { resolutions: 'FALSE-POSITIVE' },\n  code_smells: { resolved: 'false', types: 'CODE_SMELL' },\n  new_code_smells: { resolved: 'false', types: 'CODE_SMELL' },\n  bugs: { resolved: 'false', types: 'BUG' },\n  new_bugs: { resolved: 'false', types: 'BUG' },\n  vulnerabilities: { resolved: 'false', types: 'VULNERABILITY' },\n  new_vulnerabilities: { resolved: 'false', types: 'VULNERABILITY' }\n};\n\ninterface Props {\n  branchLike?: BranchLike;\n  children?: React.ReactNode;\n  className?: string;\n  component: string;\n  metric: string;\n  sinceLeakPeriod?: boolean;\n}\n\nexport default class DrilldownLink extends React.PureComponent<Props> {\n  isIssueMeasure = () => {\n    return ISSUE_MEASURES.indexOf(this.props.metric) !== -1;\n  };\n\n  propsToIssueParams = () => {\n    const params: T.Dict<string | boolean> = {\n      ...(issueParamsPerMetric[this.props.metric] || { resolved: 'false' })\n    };\n\n    if (this.props.sinceLeakPeriod) {\n      params.sinceLeakPeriod = true;\n    }\n\n    return params;\n  };\n\n  renderIssuesLink = () => {\n    const url = getComponentIssuesUrl(this.props.component, {\n      ...this.propsToIssueParams(),\n      ...getBranchLikeQuery(this.props.branchLike)\n    });\n\n    return (\n      <Link className={this.props.className} to={url}>\n        {this.props.children}\n      </Link>\n    );\n  };\n\n  render() {\n    if (this.isIssueMeasure()) {\n      return this.renderIssuesLink();\n    }\n\n    const url = getComponentDrilldownUrl({\n      componentKey: this.props.component,\n      metric: this.props.metric,\n      branchLike: this.props.branchLike,\n      listView: true\n    });\n    return (\n      <Link className={this.props.className} to={url}>\n        {this.props.children}\n      </Link>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { getLeakValue } from '../../../components/measure/utils';\nimport DrilldownLink from '../../../components/shared/DrilldownLink';\nimport { translate } from '../../../helpers/l10n';\nimport { findMeasure, formatMeasure } from '../../../helpers/measures';\nimport { BranchLike } from '../../../types/branch-like';\nimport {\n  getMeasurementIconClass,\n  getMeasurementLabelKeys,\n  getMeasurementLinesMetricKey,\n  getMeasurementMetricKey,\n  MeasurementType\n} from '../utils';\n\ninterface Props {\n  branchLike?: BranchLike;\n  centered?: boolean;\n  component: T.Component;\n  measures: T.MeasureEnhanced[];\n  type: MeasurementType;\n  useDiffMetric?: boolean;\n}\n\nexport default class MeasurementLabel extends React.Component<Props> {\n  getLabelText = () => {\n    const { branchLike, component, measures, type, useDiffMetric = false } = this.props;\n    const { expandedLabelKey, labelKey } = getMeasurementLabelKeys(type, useDiffMetric);\n    const linesMetric = getMeasurementLinesMetricKey(type, useDiffMetric);\n    const measure = findMeasure(measures, linesMetric);\n\n    if (!measure) {\n      return translate(labelKey);\n    } else {\n      const value = useDiffMetric ? getLeakValue(measure) : measure.value;\n\n      return (\n        <FormattedMessage\n          defaultMessage={translate(expandedLabelKey)}\n          id={expandedLabelKey}\n          values={{\n            count: (\n              <DrilldownLink\n                branchLike={branchLike}\n                className=\"big\"\n                component={component.key}\n                metric={linesMetric}>\n                {formatMeasure(value, 'SHORT_INT')}\n              </DrilldownLink>\n            )\n          }}\n        />\n      );\n    }\n  };\n\n  render() {\n    const { branchLike, centered, component, measures, type, useDiffMetric = false } = this.props;\n    const iconClass = getMeasurementIconClass(type);\n    const metric = getMeasurementMetricKey(type, useDiffMetric);\n    const measure = findMeasure(measures, metric);\n\n    let value;\n    if (measure) {\n      value = useDiffMetric ? getLeakValue(measure) : measure.value;\n    }\n\n    if (value === undefined) {\n      return (\n        <div className=\"display-flex-center\">\n          <span aria-label={translate('no_data')} className=\"overview-measures-empty-value\" />\n          <span className=\"big-spacer-left\">{this.getLabelText()}</span>\n        </div>\n      );\n    }\n\n    const icon = React.createElement(iconClass, { size: 'big', value: Number(value) });\n    const link = (\n      <DrilldownLink\n        branchLike={branchLike}\n        className=\"overview-measures-value text-light\"\n        component={component.key}\n        metric={metric}>\n        {formatMeasure(value, 'PERCENT', { decimals: 2, omitExtraDecimalZeros: true })}\n      </DrilldownLink>\n    );\n    const label = this.getLabelText();\n\n    return centered ? (\n      <div className=\"display-flex-column flex-1\">\n        <div className=\"display-flex-center display-flex-justify-center\">\n          <span className=\"big-spacer-right\">{icon}</span>\n          {link}\n        </div>\n        <div className=\"spacer-top text-center\">{label}</div>\n      </div>\n    ) : (\n      <div className=\"display-flex-center\">\n        <span className=\"big-spacer-right\">{icon}</span>\n        <div className=\"display-flex-column\">\n          <span>{link}</span>\n          <span className=\"spacer-top\">{label}</span>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DrilldownLink from '../../../components/shared/DrilldownLink';\nimport { getLocalizedMetricName } from '../../../helpers/l10n';\nimport { findMeasure, formatMeasure } from '../../../helpers/measures';\nimport { BranchLike } from '../../../types/branch-like';\nimport { MetricKey } from '../../../types/metrics';\n\nexport interface DrilldownMeasureValueProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  measures: T.MeasureEnhanced[];\n  metric: MetricKey;\n}\n\nexport function DrilldownMeasureValue(props: DrilldownMeasureValueProps) {\n  const { branchLike, component, measures, metric } = props;\n  const measure = findMeasure(measures, metric);\n\n  let content;\n  if (!measure) {\n    content = <span className=\"overview-measures-value text-light\">-</span>;\n  } else {\n    content = (\n      <span>\n        <DrilldownLink\n          branchLike={branchLike}\n          className=\"overview-measures-value text-light\"\n          component={component.key}\n          metric={metric}>\n          {formatMeasure(measure.value, 'SHORT_INT')}\n        </DrilldownLink>\n      </span>\n    );\n  }\n\n  return (\n    <div className=\"display-flex-column display-flex-center\">\n      {content}\n      <span className=\"spacer-top\">{getLocalizedMetricName({ key: metric })}</span>\n    </div>\n  );\n}\n\nexport default React.memo(DrilldownMeasureValue);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { ApplicationPeriod } from '../../../types/application';\n\nexport interface ApplicationLeakPeriodInfoProps {\n  leakPeriod: ApplicationPeriod;\n}\n\nexport function ApplicationLeakPeriodInfo({ leakPeriod }: ApplicationLeakPeriodInfoProps) {\n  return (\n    <div className=\"note spacer-top display-inline-flex-center\">\n      <DateFromNow date={leakPeriod.date}>\n        {fromNow => translateWithParameters('overview.started_x', fromNow)}\n      </DateFromNow>\n      <HelpTooltip\n        className=\"little-spacer-left\"\n        overlay={translateWithParameters(\n          'overview.max_new_code_period_from_x',\n          leakPeriod.projectName\n        )}\n      />\n    </div>\n  );\n}\n\nexport default React.memo(ApplicationLeakPeriodInfo);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { injectIntl, WrappedComponentProps } from 'react-intl';\nimport { longFormatterOption } from '../../../components/intl/DateFormatter';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport { formatterOption } from '../../../components/intl/DateTimeFormatter';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { getPeriodDate, getPeriodLabel } from '../../../helpers/periods';\n\nexport interface ProjectLeakPeriodInfoProps extends WrappedComponentProps {\n  leakPeriod: T.Period;\n}\n\nexport function ProjectLeakPeriodInfo(props: ProjectLeakPeriodInfoProps) {\n  const {\n    intl: { formatDate, formatTime },\n    leakPeriod\n  } = props;\n\n  const leakPeriodLabel = getPeriodLabel(\n    leakPeriod,\n    ['manual_baseline', 'SPECIFIC_ANALYSIS'].includes(leakPeriod.mode)\n      ? (date: string) => formatTime(date, formatterOption)\n      : (date: string) => formatDate(date, longFormatterOption)\n  );\n\n  if (!leakPeriodLabel) {\n    return null;\n  }\n\n  if (leakPeriod.mode === 'days' || leakPeriod.mode === 'NUMBER_OF_DAYS') {\n    return <div className=\"note spacer-top\">{leakPeriodLabel} </div>;\n  }\n\n  const leakPeriodDate = getPeriodDate(leakPeriod);\n\n  if (!leakPeriodDate) {\n    return null;\n  }\n\n  return (\n    <>\n      <div className=\"note spacer-top text-ellipsis\" title={leakPeriodLabel}>\n        {leakPeriodLabel}\n      </div>\n      <DateFromNow date={leakPeriodDate}>\n        {fromNow => (\n          <div className=\"note little-spacer-top\">\n            {translateWithParameters(\n              leakPeriod.mode === 'previous_analysis'\n                ? 'overview.previous_analysis_x'\n                : 'overview.started_x',\n              fromNow\n            )}\n          </div>\n        )}\n      </DateFromNow>\n    </>\n  );\n}\n\nexport default React.memo(injectIntl(ProjectLeakPeriodInfo));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { isApplicationPeriod } from '../../../helpers/periods';\nimport { ApplicationPeriod } from '../../../types/application';\nimport ApplicationLeakPeriodInfo from './ApplicationLeakPeriodInfo';\nimport ProjectLeakPeriodInfo from './ProjectLeakPeriodInfo';\n\nexport interface LeakPeriodInfoProps {\n  leakPeriod: T.Period | ApplicationPeriod;\n}\n\nexport function LeakPeriodInfo({ leakPeriod }: LeakPeriodInfoProps) {\n  if (isApplicationPeriod(leakPeriod)) {\n    return <ApplicationLeakPeriodInfo leakPeriod={leakPeriod} />;\n  } else {\n    return <ProjectLeakPeriodInfo leakPeriod={leakPeriod} />;\n  }\n}\n\nexport default React.memo(LeakPeriodInfo);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { getLeakValue } from '../../../components/measure/utils';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { findMeasure, formatMeasure, localizeMetric } from '../../../helpers/measures';\nimport { getComponentIssuesUrl, getComponentSecurityHotspotsUrl } from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport { IssueType } from '../../../types/issues';\nimport { getIssueIconClass, getIssueMetricKey } from '../utils';\n\nexport interface IssueLabelProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  helpTooltip?: string;\n  measures: T.MeasureEnhanced[];\n  type: IssueType;\n  useDiffMetric?: boolean;\n}\n\nexport function IssueLabel(props: IssueLabelProps) {\n  const { branchLike, component, helpTooltip, measures, type, useDiffMetric = false } = props;\n  const metric = getIssueMetricKey(type, useDiffMetric);\n  const measure = findMeasure(measures, metric);\n  const iconClass = getIssueIconClass(type);\n\n  let value;\n  if (measure) {\n    value = useDiffMetric ? getLeakValue(measure) : measure.value;\n  }\n\n  const params = {\n    ...getBranchLikeQuery(branchLike),\n    resolved: 'false',\n    types: type,\n    sinceLeakPeriod: useDiffMetric ? 'true' : 'false'\n  };\n\n  return (\n    <>\n      {value === undefined ? (\n        <span aria-label={translate('no_data')} className=\"overview-measures-empty-value\" />\n      ) : (\n        <Link\n          className=\"overview-measures-value text-light\"\n          to={\n            type === IssueType.SecurityHotspot\n              ? getComponentSecurityHotspotsUrl(component.key, params)\n              : getComponentIssuesUrl(component.key, params)\n          }>\n          {formatMeasure(value, 'SHORT_INT')}\n        </Link>\n      )}\n      {React.createElement(iconClass, { className: 'big-spacer-left little-spacer-right' })}\n      {localizeMetric(metric)}\n      {helpTooltip && <HelpTooltip className=\"little-spacer-left\" overlay={helpTooltip} />}\n    </>\n  );\n}\n\nexport default React.memo(IssueLabel);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { getLeakValue, getRatingTooltip } from '../../../components/measure/utils';\nimport DrilldownLink from '../../../components/shared/DrilldownLink';\nimport Rating from '../../../components/ui/Rating';\nimport { findMeasure } from '../../../helpers/measures';\nimport { BranchLike } from '../../../types/branch-like';\nimport { IssueType } from '../../../types/issues';\nimport { getIssueRatingMetricKey, getIssueRatingName } from '../utils';\n\nexport interface IssueRatingProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  measures: T.MeasureEnhanced[];\n  type: IssueType;\n  useDiffMetric?: boolean;\n}\n\nfunction renderRatingLink(props: IssueRatingProps) {\n  const { branchLike, component, useDiffMetric = false, measures, type } = props;\n  const rating = getIssueRatingMetricKey(type, useDiffMetric);\n  const measure = findMeasure(measures, rating);\n\n  if (!rating || !measure) {\n    return (\n      <div className=\"padded\">\n        <Rating value={undefined} />\n      </div>\n    );\n  }\n\n  const value = measure && (useDiffMetric ? getLeakValue(measure) : measure.value);\n  const tooltip = value && getRatingTooltip(rating, Number(value));\n\n  return (\n    <Tooltip overlay={tooltip}>\n      <span>\n        <DrilldownLink\n          branchLike={branchLike}\n          className=\"link-no-underline\"\n          component={component.key}\n          metric={rating}>\n          <Rating value={value} />\n        </DrilldownLink>\n      </span>\n    </Tooltip>\n  );\n}\n\nexport function IssueRating(props: IssueRatingProps) {\n  const { type } = props;\n\n  return (\n    <>\n      <span className=\"flex-1 big-spacer-right text-right\">{getIssueRatingName(type)}</span>\n      {renderRatingLink(props)}\n    </>\n  );\n}\n\nexport default React.memo(IssueRating);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getLeakValue } from '../../../components/measure/utils';\nimport DrilldownLink from '../../../components/shared/DrilldownLink';\nimport { getLocalizedMetricName, translate } from '../../../helpers/l10n';\nimport { findMeasure, formatMeasure, localizeMetric } from '../../../helpers/measures';\nimport { BranchLike } from '../../../types/branch-like';\nimport { MetricKey } from '../../../types/metrics';\n\nexport interface DebtValueProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  measures: T.MeasureEnhanced[];\n  useDiffMetric?: boolean;\n}\n\nexport function DebtValue(props: DebtValueProps) {\n  const { branchLike, component, measures, useDiffMetric = false } = props;\n  const metric = useDiffMetric ? MetricKey.new_technical_debt : MetricKey.sqale_index;\n  const measure = findMeasure(measures, metric);\n\n  let value;\n  if (measure) {\n    value = useDiffMetric ? getLeakValue(measure) : measure.value;\n  }\n\n  return (\n    <>\n      {value === undefined ? (\n        <span aria-label={translate('no_data')} className=\"overview-measures-empty-value\" />\n      ) : (\n        <DrilldownLink\n          branchLike={branchLike}\n          className=\"overview-measures-value text-light\"\n          component={component.key}\n          metric={metric}>\n          {formatMeasure(value, 'WORK_DUR')}\n        </DrilldownLink>\n      )}\n      <span className=\"big-spacer-left\">\n        {measure ? getLocalizedMetricName(measure.metric, true) : localizeMetric(metric)}\n      </span>\n    </>\n  );\n}\n\nexport default React.memo(DebtValue);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getLeakValue } from '../../../components/measure/utils';\nimport CoverageRating from '../../../components/ui/CoverageRating';\nimport { translate } from '../../../helpers/l10n';\nimport { findMeasure, formatMeasure } from '../../../helpers/measures';\nimport { MetricKey } from '../../../types/metrics';\n\nexport interface SecurityHotspotsReviewedProps {\n  measures: T.MeasureEnhanced[];\n  useDiffMetric?: boolean;\n}\n\nexport default function SecurityHotspotsReviewed(props: SecurityHotspotsReviewedProps) {\n  const { measures, useDiffMetric = false } = props;\n  const metric = useDiffMetric\n    ? MetricKey.new_security_hotspots_reviewed\n    : MetricKey.security_hotspots_reviewed;\n  const measure = findMeasure(measures, metric);\n\n  let value;\n  if (measure) {\n    value = useDiffMetric ? getLeakValue(measure) : measure.value;\n  }\n\n  return (\n    <>\n      {value === undefined ? (\n        <span aria-label={translate('no_data')} className=\"overview-measures-empty-value\" />\n      ) : (\n        <>\n          <CoverageRating value={value} />\n          <span className=\"huge spacer-left\">{formatMeasure(value, 'PERCENT')}</span>\n        </>\n      )}\n      <span className=\"big-spacer-left\">\n        {translate('overview.measures.security_hotspots_reviewed')}\n      </span>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport { IssueType } from '../../../types/issues';\nimport IssueLabel from '../components/IssueLabel';\nimport IssueRating from '../components/IssueRating';\nimport DebtValue from './DebtValue';\nimport SecurityHotspotsReviewed from './SecurityHotspotsReviewed';\n\nexport interface MeasuresPanelIssueMeasureRowProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  isNewCodeTab: boolean;\n  measures: T.MeasureEnhanced[];\n  type: IssueType;\n}\n\nexport default function MeasuresPanelIssueMeasureRow(props: MeasuresPanelIssueMeasureRowProps) {\n  const { branchLike, component, isNewCodeTab, measures, type } = props;\n\n  const isApp = component.qualifier === ComponentQualifier.Application;\n\n  return (\n    <div\n      className=\"display-flex-row overview-measures-row\"\n      data-test={`overview__measures-${type.toString().toLowerCase()}`}>\n      {type === IssueType.CodeSmell ? (\n        <>\n          <div className=\"overview-panel-big-padded flex-1 small display-flex-center big-spacer-left\">\n            <DebtValue\n              branchLike={branchLike}\n              component={component}\n              measures={measures}\n              useDiffMetric={isNewCodeTab}\n            />\n          </div>\n          <div className=\"flex-1 small display-flex-center\">\n            <IssueLabel\n              branchLike={branchLike}\n              component={component}\n              measures={measures}\n              type={type}\n              useDiffMetric={isNewCodeTab}\n            />\n          </div>\n        </>\n      ) : (\n        <div className=\"overview-panel-big-padded flex-1 small display-flex-center big-spacer-left\">\n          <IssueLabel\n            branchLike={branchLike}\n            component={component}\n            helpTooltip={\n              type === IssueType.SecurityHotspot\n                ? translate('metric.security_hotspots.full_description')\n                : undefined\n            }\n            measures={measures}\n            type={type}\n            useDiffMetric={isNewCodeTab}\n          />\n        </div>\n      )}\n      {type === IssueType.SecurityHotspot && (\n        <div className=\"flex-1 small display-flex-center\">\n          <SecurityHotspotsReviewed measures={measures} useDiffMetric={isNewCodeTab} />\n        </div>\n      )}\n      {(!isApp || !isNewCodeTab) && (\n        <div className=\"overview-panel-big-padded overview-measures-aside display-flex-center\">\n          <IssueRating\n            branchLike={branchLike}\n            component={component}\n            measures={measures}\n            type={type}\n            useDiffMetric={isNewCodeTab}\n          />\n        </div>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { Branch } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\n\nexport interface MeasuresPanelNoNewCodeProps {\n  branch?: Branch;\n  component: T.Component;\n  period?: T.Period;\n}\n\nexport default function MeasuresPanelNoNewCode(props: MeasuresPanelNoNewCodeProps) {\n  const { branch, component, period } = props;\n\n  const isApp = component.qualifier === ComponentQualifier.Application;\n\n  const hasBadReferenceBranch =\n    !isApp && !!period && !period.date && period.mode === 'REFERENCE_BRANCH';\n  /*\n   * If the period is \"reference branch\"-based, and if there's no date, it means\n   * that we're not lacking a second analysis, but that we'll never have new code because the\n   * selected reference branch is itself, or has disappeared for some reason.\n   * Makes no sense for Apps (project aggregate)\n   */\n  const hasBadNewCodeSettingSameRef = hasBadReferenceBranch && branch?.name === period?.parameter;\n\n  const badExplanationKey = hasBadReferenceBranch\n    ? hasBadNewCodeSettingSameRef\n      ? 'overview.measures.same_reference.explanation'\n      : 'overview.measures.bad_reference.explanation'\n    : 'overview.measures.empty_explanation';\n\n  const showSettingsLink = !!(component.configuration && component.configuration.showSettings);\n\n  return (\n    <div className=\"display-flex-center display-flex-justify-center\" style={{ height: 500 }}>\n      <img\n        alt=\"\" /* Make screen readers ignore this image; it's purely eye candy. */\n        className=\"spacer-right\"\n        height={52}\n        src={`${getBaseUrl()}/images/source-code.svg`}\n      />\n      <div className=\"big-spacer-left text-muted\" style={{ maxWidth: 500 }}>\n        <p className=\"spacer-bottom big-spacer-top big\">{translate(badExplanationKey)}</p>\n        {hasBadNewCodeSettingSameRef ? (\n          showSettingsLink && (\n            <p>\n              <FormattedMessage\n                defaultMessage={translate('overview.measures.bad_setting.link')}\n                id=\"overview.measures.bad_setting.link\"\n                values={{\n                  setting_link: (\n                    <Link\n                      to={{\n                        pathname: '/project/baseline',\n                        query: { id: component.key, ...getBranchLikeQuery(branch) }\n                      }}>\n                      {translate('settings.new_code_period.category')}\n                    </Link>\n                  )\n                }}\n              />\n            </p>\n          )\n        ) : (\n          <p>\n            <FormattedMessage\n              defaultMessage={translate('overview.measures.empty_link')}\n              id=\"overview.measures.empty_link\"\n              values={{\n                learn_more_link: (\n                  <Link to=\"/documentation/user-guide/clean-as-you-code/\">\n                    {translate('learn_more')}\n                  </Link>\n                )\n              }}\n            />\n          </p>\n        )}\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { rawSizes } from '../../../app/theme';\nimport BoxedTabs from '../../../components/controls/BoxedTabs';\nimport ComponentReportActions from '../../../components/controls/ComponentReportActions';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { findMeasure, isDiffMetric } from '../../../helpers/measures';\nimport { ApplicationPeriod } from '../../../types/application';\nimport { Branch } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport { IssueType } from '../../../types/issues';\nimport { MetricKey } from '../../../types/metrics';\nimport MeasurementLabel from '../components/MeasurementLabel';\nimport { MeasurementType } from '../utils';\nimport { DrilldownMeasureValue } from './DrilldownMeasureValue';\nimport { LeakPeriodInfo } from './LeakPeriodInfo';\nimport MeasuresPanelIssueMeasureRow from './MeasuresPanelIssueMeasureRow';\nimport MeasuresPanelNoNewCode from './MeasuresPanelNoNewCode';\n\nexport interface MeasuresPanelProps {\n  appLeak?: ApplicationPeriod;\n  branch?: Branch;\n  component: T.Component;\n  loading?: boolean;\n  measures?: T.MeasureEnhanced[];\n  period?: T.Period;\n}\n\nexport enum MeasuresPanelTabs {\n  New,\n  Overall\n}\n\nexport function MeasuresPanel(props: MeasuresPanelProps) {\n  const { appLeak, branch, component, loading, measures = [], period } = props;\n\n  const hasDiffMeasures = measures.some(m => isDiffMetric(m.metric.key));\n  const isApp = component.qualifier === ComponentQualifier.Application;\n  const leakPeriod = isApp ? appLeak : period;\n\n  const [tab, selectTab] = React.useState(MeasuresPanelTabs.New);\n\n  const isNewCodeTab = tab === MeasuresPanelTabs.New;\n\n  React.useEffect(() => {\n    // Open Overall tab by default if there are no new measures.\n    if (loading === false && !hasDiffMeasures && isNewCodeTab) {\n      selectTab(MeasuresPanelTabs.Overall);\n    }\n    // In this case, we explicitly do NOT want to mark tab as a dependency, as\n    // it would prevent the user from selecting it, even if it's empty.\n    /* eslint-disable-next-line react-hooks/exhaustive-deps */\n  }, [loading, hasDiffMeasures]);\n\n  const tabs = [\n    {\n      key: MeasuresPanelTabs.New,\n      label: (\n        <div className=\"text-left overview-measures-tab\">\n          <span className=\"text-bold\">{translate('overview.new_code')}</span>\n          {leakPeriod && <LeakPeriodInfo leakPeriod={leakPeriod} />}\n        </div>\n      )\n    },\n    {\n      key: MeasuresPanelTabs.Overall,\n      label: (\n        <div className=\"text-left overview-measures-tab\">\n          <span className=\"text-bold\" style={{ position: 'absolute', top: 2 * rawSizes.grid }}>\n            {translate('overview.overall_code')}\n          </span>\n        </div>\n      )\n    }\n  ];\n\n  return (\n    <div className=\"overview-panel\" data-test=\"overview__measures-panel\">\n      <div className=\"display-flex-space-between display-flex-start\">\n        <h2 className=\"overview-panel-title\">{translate('overview.measures')}</h2>\n        <ComponentReportActions component={component} branch={branch} />\n      </div>\n\n      {loading ? (\n        <div className=\"overview-panel-content overview-panel-big-padded\">\n          <DeferredSpinner loading={loading} />\n        </div>\n      ) : (\n        <>\n          <BoxedTabs onSelect={selectTab} selected={tab} tabs={tabs} />\n\n          <div className=\"overview-panel-content flex-1 bordered\">\n            {!hasDiffMeasures && isNewCodeTab ? (\n              <MeasuresPanelNoNewCode branch={branch} component={component} period={period} />\n            ) : (\n              <>\n                {[\n                  IssueType.Bug,\n                  IssueType.Vulnerability,\n                  IssueType.SecurityHotspot,\n                  IssueType.CodeSmell\n                ].map((type: IssueType) => (\n                  <MeasuresPanelIssueMeasureRow\n                    branchLike={branch}\n                    component={component}\n                    isNewCodeTab={isNewCodeTab}\n                    key={type}\n                    measures={measures}\n                    type={type}\n                  />\n                ))}\n\n                <div className=\"display-flex-row overview-measures-row\">\n                  {(findMeasure(measures, MetricKey.coverage) ||\n                    findMeasure(measures, MetricKey.new_coverage)) && (\n                    <div\n                      className=\"overview-panel-huge-padded flex-1 bordered-right display-flex-center\"\n                      data-test=\"overview__measures-coverage\">\n                      <MeasurementLabel\n                        branchLike={branch}\n                        centered={isNewCodeTab}\n                        component={component}\n                        measures={measures}\n                        type={MeasurementType.Coverage}\n                        useDiffMetric={isNewCodeTab}\n                      />\n\n                      {tab === MeasuresPanelTabs.Overall && (\n                        <div className=\"huge-spacer-left\">\n                          <DrilldownMeasureValue\n                            branchLike={branch}\n                            component={component}\n                            measures={measures}\n                            metric={MetricKey.tests}\n                          />\n                        </div>\n                      )}\n                    </div>\n                  )}\n                  <div className=\"overview-panel-huge-padded flex-1 display-flex-center\">\n                    <MeasurementLabel\n                      branchLike={branch}\n                      centered={isNewCodeTab}\n                      component={component}\n                      measures={measures}\n                      type={MeasurementType.Duplication}\n                      useDiffMetric={isNewCodeTab}\n                    />\n\n                    {tab === MeasuresPanelTabs.Overall && (\n                      <div className=\"huge-spacer-left\">\n                        <DrilldownMeasureValue\n                          branchLike={branch}\n                          component={component}\n                          measures={measures}\n                          metric={MetricKey.duplicated_blocks}\n                        />\n                      </div>\n                    )}\n                  </div>\n                </div>\n              </>\n            )}\n          </div>\n        </>\n      )}\n    </div>\n  );\n}\n\nexport default React.memo(MeasuresPanel);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Alert } from '../../../components/ui/Alert';\nimport { getBranchLikeDisplayName, isMainBranch } from '../../../helpers/branch-like';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport { MetricKey } from '../../../types/metrics';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.Component;\n  measures?: T.MeasureEnhanced[];\n}\n\nexport function NoCodeWarning({ branchLike, component, measures }: Props) {\n  const isApp = component.qualifier === ComponentQualifier.Application;\n\n  /* eslint-disable no-lonely-if */\n  // - Is App\n  //     - No measures, OR measures, but no projects => empty\n  //     - Else => no lines of code\n  // - Else\n  //   - No measures => empty\n  //       - Main branch?\n  //       - LLB?\n  //       - No branch info?\n  //   - Measures, but no ncloc (checked in isEmpty()) => no lines of code\n  //       - Main branch?\n  //       - LLB?\n  //       - No branch info?\n  let title = translate('overview.project.no_lines_of_code');\n  if (isApp) {\n    if (\n      measures === undefined ||\n      measures.find(measure => measure.metric.key === MetricKey.projects) === undefined\n    ) {\n      title = translate('portfolio.app.empty');\n    } else {\n      title = translate('portfolio.app.no_lines_of_code');\n    }\n  } else {\n    if (measures === undefined || measures.length === 0) {\n      if (isMainBranch(branchLike)) {\n        title = translate('overview.project.main_branch_empty');\n      } else if (branchLike !== undefined) {\n        title = translateWithParameters(\n          'overview.project.branch_X_empty',\n          getBranchLikeDisplayName(branchLike)\n        );\n      } else {\n        title = translate('overview.project.empty');\n      }\n    } else {\n      if (isMainBranch(branchLike)) {\n        title = translate('overview.project.main_branch_no_lines_of_code');\n      } else if (branchLike !== undefined) {\n        title = translateWithParameters(\n          'overview.project.branch_X_no_lines_of_code',\n          getBranchLikeDisplayName(branchLike)\n        );\n      }\n    }\n  }\n  /* eslint-enable no-lonely-if */\n\n  return (\n    <Alert display=\"banner\" variant=\"warning\">\n      {title}\n    </Alert>\n  );\n}\n\nexport default React.memo(NoCodeWarning);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport SonarLintIcon from '../../../components/icons/SonarLintIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { MetricKey } from '../../../types/metrics';\nimport { QualityGateStatusCondition } from '../../../types/quality-gates';\n\nexport interface SonarLintPromotionProps {\n  currentUser: T.CurrentUser;\n  qgConditions?: QualityGateStatusCondition[];\n}\n\nconst CONDITIONS_TO_SHOW = [\n  MetricKey.new_blocker_violations,\n  MetricKey.new_critical_violations,\n  MetricKey.new_info_violations,\n  MetricKey.new_violations,\n  MetricKey.new_major_violations,\n  MetricKey.new_minor_violations,\n  MetricKey.new_code_smells,\n  MetricKey.new_bugs,\n  MetricKey.new_vulnerabilities,\n  MetricKey.new_security_rating,\n  MetricKey.new_maintainability_rating,\n  MetricKey.new_reliability_rating\n];\n\nexport function SonarLintPromotion({ currentUser, qgConditions }: SonarLintPromotionProps) {\n  const showMessage = qgConditions?.some(\n    qgCondition =>\n      CONDITIONS_TO_SHOW.includes(qgCondition.metric as MetricKey) && qgCondition.level === 'ERROR'\n  );\n  if (!showMessage || currentUser.usingSonarLintConnectedMode) {\n    return null;\n  }\n  return (\n    <div className=\"it__overview__sonarlint-promotion big-spacer-top overview-quality-gate-sonar-lint-info\">\n      <FormattedMessage\n        id=\"overview.fix_failed_conditions_with_sonarlint\"\n        defaultMessage={translate('overview.fix_failed_conditions_with_sonarlint')}\n        values={{\n          link: (\n            <>\n              <a\n                href=\"https://www.sonarqube.org/sonarlint/?referrer=sonarqube\"\n                rel=\"noopener noreferrer\"\n                target=\"_blank\">\n                SonarLint\n              </a>\n              <SonarLintIcon size={16} />\n            </>\n          )\n        }}\n      />\n    </div>\n  );\n}\n\nexport default withCurrentUser(SonarLintPromotion);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport Measure from '../../../components/measure/Measure';\nimport DrilldownLink from '../../../components/shared/DrilldownLink';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure, isDiffMetric } from '../../../helpers/measures';\nimport {\n  getComponentIssuesUrl,\n  getComponentSecurityHotspotsUrl,\n  Location\n} from '../../../helpers/urls';\nimport { BranchLike } from '../../../types/branch-like';\nimport { IssueType } from '../../../types/issues';\nimport { MetricKey } from '../../../types/metrics';\nimport { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: Pick<T.Component, 'key'>;\n  condition: QualityGateStatusConditionEnhanced;\n}\n\nexport default class QualityGateCondition extends React.PureComponent<Props> {\n  getIssuesUrl = (sinceLeakPeriod: boolean, customQuery: T.Dict<string>) => {\n    const query: T.Dict<string | undefined> = {\n      resolved: 'false',\n      ...getBranchLikeQuery(this.props.branchLike),\n      ...customQuery\n    };\n    if (sinceLeakPeriod) {\n      Object.assign(query, { sinceLeakPeriod: 'true' });\n    }\n    return getComponentIssuesUrl(this.props.component.key, query);\n  };\n\n  getUrlForSecurityHotspot(sinceLeakPeriod: boolean) {\n    const query: T.Dict<string | undefined> = {\n      ...getBranchLikeQuery(this.props.branchLike)\n    };\n    if (sinceLeakPeriod) {\n      Object.assign(query, { sinceLeakPeriod: 'true' });\n    }\n    return getComponentSecurityHotspotsUrl(this.props.component.key, query);\n  }\n\n  getUrlForCodeSmells(sinceLeakPeriod: boolean) {\n    return this.getIssuesUrl(sinceLeakPeriod, { types: 'CODE_SMELL' });\n  }\n\n  getUrlForBugsOrVulnerabilities(type: string, sinceLeakPeriod: boolean) {\n    const RATING_TO_SEVERITIES_MAPPING = [\n      'BLOCKER,CRITICAL,MAJOR,MINOR',\n      'BLOCKER,CRITICAL,MAJOR',\n      'BLOCKER,CRITICAL',\n      'BLOCKER'\n    ];\n\n    const { condition } = this.props;\n    const threshold = condition.level === 'ERROR' ? condition.error : condition.warning;\n\n    return this.getIssuesUrl(sinceLeakPeriod, {\n      types: type,\n      severities: RATING_TO_SEVERITIES_MAPPING[Number(threshold) - 1]\n    });\n  }\n\n  wrapWithLink(children: React.ReactNode) {\n    const { branchLike, component, condition } = this.props;\n\n    const className = classNames(\n      'overview-quality-gate-condition',\n      `overview-quality-gate-condition-${condition.level.toLowerCase()}`\n    );\n\n    const metricKey = condition.measure.metric.key;\n\n    const METRICS_TO_URL_MAPPING: T.Dict<() => Location> = {\n      [MetricKey.reliability_rating]: () =>\n        this.getUrlForBugsOrVulnerabilities(IssueType.Bug, false),\n      [MetricKey.new_reliability_rating]: () =>\n        this.getUrlForBugsOrVulnerabilities(IssueType.Bug, true),\n      [MetricKey.security_rating]: () =>\n        this.getUrlForBugsOrVulnerabilities(IssueType.Vulnerability, false),\n      [MetricKey.new_security_rating]: () =>\n        this.getUrlForBugsOrVulnerabilities(IssueType.Vulnerability, true),\n      [MetricKey.sqale_rating]: () => this.getUrlForCodeSmells(false),\n      [MetricKey.new_maintainability_rating]: () => this.getUrlForCodeSmells(true),\n      [MetricKey.security_hotspots_reviewed]: () => this.getUrlForSecurityHotspot(false),\n      [MetricKey.new_security_hotspots_reviewed]: () => this.getUrlForSecurityHotspot(true)\n    };\n\n    return METRICS_TO_URL_MAPPING[metricKey] ? (\n      <Link className={className} to={METRICS_TO_URL_MAPPING[metricKey]()}>\n        {children}\n      </Link>\n    ) : (\n      <DrilldownLink\n        branchLike={branchLike}\n        className={className}\n        component={component.key}\n        metric={condition.measure.metric.key}\n        sinceLeakPeriod={condition.period != null}>\n        {children}\n      </DrilldownLink>\n    );\n  }\n\n  render() {\n    const { condition } = this.props;\n    const { measure } = condition;\n    const { metric } = measure;\n\n    const isDiff = isDiffMetric(metric.key);\n\n    const threshold = (condition.level === 'ERROR' ? condition.error : condition.warning) as string;\n    const actual = (condition.period ? measure.period?.value : measure.value) as string;\n\n    let operator = translate('quality_gates.operator', condition.op);\n\n    if (metric.type === 'RATING') {\n      operator = translate('quality_gates.operator', condition.op, 'rating');\n    }\n\n    return this.wrapWithLink(\n      <div className=\"overview-quality-gate-condition-container display-flex-center\">\n        <div className=\"overview-quality-gate-condition-value text-center spacer-right\">\n          <Measure\n            decimals={2}\n            metricKey={measure.metric.key}\n            metricType={measure.metric.type}\n            value={actual}\n          />\n        </div>\n\n        <div>\n          <span className=\"overview-quality-gate-condition-metric little-spacer-right\">\n            <IssueTypeIcon className=\"little-spacer-right\" query={metric.key} />\n            {metric.name}\n          </span>\n          {!isDiff && condition.period != null && (\n            <span className=\"overview-quality-gate-condition-period text-ellipsis little-spacer-right\">\n              {translate('quality_gates.conditions.new_code')}\n            </span>\n          )}\n          <span className=\"little-spacer-top small text-muted\">\n            {operator} {formatMeasure(threshold, metric.type)}\n          </span>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport ChevronDownIcon from '../../../components/icons/ChevronDownIcon';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';\nimport QualityGateCondition from './QualityGateCondition';\n\nconst LEVEL_ORDER = ['ERROR', 'WARN'];\n\nexport interface QualityGateConditionsProps {\n  branchLike?: BranchLike;\n  component: Pick<T.Component, 'key'>;\n  collapsible?: boolean;\n  failedConditions: QualityGateStatusConditionEnhanced[];\n}\n\nconst MAX_CONDITIONS = 5;\n\nexport function QualityGateConditions(props: QualityGateConditionsProps) {\n  const { branchLike, collapsible, component, failedConditions } = props;\n  const [collapsed, toggleCollapsed] = React.useState(Boolean(collapsible));\n\n  if (failedConditions.length === 0) {\n    return null;\n  }\n\n  const sortedConditions = sortBy(failedConditions, condition =>\n    LEVEL_ORDER.indexOf(condition.level)\n  );\n\n  let renderConditions;\n  let renderCollapsed;\n  if (collapsed && sortedConditions.length > MAX_CONDITIONS) {\n    renderConditions = sortedConditions.slice(0, MAX_CONDITIONS);\n    renderCollapsed = true;\n  } else {\n    renderConditions = sortedConditions;\n    renderCollapsed = false;\n  }\n\n  return (\n    <div\n      className=\"overview-quality-gate-conditions-list\"\n      id=\"overview-quality-gate-conditions-list\">\n      {renderConditions.map(condition => (\n        <QualityGateCondition\n          branchLike={branchLike}\n          component={component}\n          condition={condition}\n          key={condition.measure.metric.key}\n        />\n      ))}\n      {renderCollapsed && (\n        <ButtonLink\n          className=\"overview-quality-gate-conditions-list-collapse\"\n          onClick={() => toggleCollapsed(!collapsed)}>\n          {translateWithParameters(\n            'overview.X_more_failed_conditions',\n            sortedConditions.length - MAX_CONDITIONS\n          )}\n          <ChevronDownIcon className=\"little-spacer-left\" />\n        </ButtonLink>\n      )}\n    </div>\n  );\n}\n\nexport default React.memo(QualityGateConditions);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { isDiffMetric } from '../../../helpers/measures';\nimport { BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport { QualityGateStatus } from '../../../types/quality-gates';\nimport QualityGateConditions from '../components/QualityGateConditions';\n\nexport interface QualityGatePanelSectionProps {\n  branchLike?: BranchLike;\n  component: Pick<T.Component, 'key' | 'qualifier'>;\n  qgStatus: QualityGateStatus;\n}\n\nexport function QualityGatePanelSection(props: QualityGatePanelSectionProps) {\n  const { component, qgStatus } = props;\n  const newCodeFailedConditions = qgStatus.failedConditions.filter(c => isDiffMetric(c.metric));\n  const overallFailedConditions = qgStatus.failedConditions.filter(c => !isDiffMetric(c.metric));\n\n  if (newCodeFailedConditions.length === 0 && overallFailedConditions.length === 0) {\n    return null;\n  }\n\n  const showName = component.qualifier === ComponentQualifier.Application;\n\n  return (\n    <div className=\"overview-quality-gate-conditions\">\n      {showName && (\n        <h3 className=\"overview-quality-gate-conditions-project-name\">{qgStatus.name}</h3>\n      )}\n\n      {newCodeFailedConditions.length > 0 && (\n        <>\n          <h4 className=\"overview-quality-gate-conditions-section-title\">\n            {translate('quality_gates.conditions.new_code')}\n          </h4>\n          <QualityGateConditions\n            component={qgStatus}\n            branchLike={qgStatus.branchLike}\n            failedConditions={newCodeFailedConditions}\n          />\n        </>\n      )}\n\n      {overallFailedConditions.length > 0 && (\n        <>\n          <h4 className=\"overview-quality-gate-conditions-section-title\">\n            {translate('quality_gates.conditions.overall_code')}\n          </h4>\n          <QualityGateConditions\n            component={qgStatus}\n            branchLike={qgStatus.branchLike}\n            failedConditions={overallFailedConditions}\n          />\n        </>\n      )}\n    </div>\n  );\n}\n\nexport default React.memo(QualityGatePanelSection);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { flatMap } from 'lodash';\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { QualityGateStatus } from '../../../types/quality-gates';\nimport SonarLintPromotion from '../components/SonarLintPromotion';\nimport QualityGatePanelSection from './QualityGatePanelSection';\n\nexport interface QualityGatePanelProps {\n  component: Pick<T.Component, 'key' | 'qualifier'>;\n  loading?: boolean;\n  qgStatuses?: QualityGateStatus[];\n}\n\nexport function QualityGatePanel(props: QualityGatePanelProps) {\n  const { component, loading, qgStatuses = [] } = props;\n\n  if (qgStatuses === undefined) {\n    return null;\n  }\n\n  const overallLevel = qgStatuses.map(s => s.status).includes('ERROR') ? 'ERROR' : 'OK';\n  const success = overallLevel === 'OK';\n\n  const overallFailedConditionsCount = qgStatuses.reduce(\n    (acc, qgStatus) => acc + qgStatus.failedConditions.length,\n    0\n  );\n\n  const showIgnoredConditionWarning =\n    component.qualifier === 'TRK' &&\n    qgStatuses !== undefined &&\n    qgStatuses.some(p => Boolean(p.ignoredConditions));\n\n  return (\n    <div className=\"overview-panel\" data-test=\"overview__quality-gate-panel\">\n      <h2 className=\"overview-panel-title display-inline-flex-center\">\n        {translate('overview.quality_gate')}{' '}\n        <HelpTooltip\n          className=\"little-spacer-left\"\n          overlay={\n            <div className=\"big-padded-top big-padded-bottom\">\n              {translate('overview.quality_gate.help')}\n            </div>\n          }\n        />\n      </h2>\n\n      {showIgnoredConditionWarning && (\n        <Alert className=\"big-spacer-bottom\" display=\"inline\" variant=\"info\">\n          <span className=\"text-middle\">\n            {translate('overview.quality_gate.ignored_conditions')}\n          </span>\n          <HelpTooltip\n            className=\"spacer-left\"\n            overlay={translate('overview.quality_gate.ignored_conditions.tooltip')}\n          />\n        </Alert>\n      )}\n\n      <div className=\"overview-panel-content\">\n        {loading ? (\n          <div className=\"overview-panel-big-padded\">\n            <DeferredSpinner loading={loading} />\n          </div>\n        ) : (\n          <>\n            <div\n              className={classNames('overview-quality-gate-badge-large', {\n                failed: !success,\n                success\n              })}>\n              <h3 className=\"big-spacer-bottom huge\">{translate('metric.level', overallLevel)}</h3>\n\n              <span className=\"small\">\n                {overallFailedConditionsCount > 0\n                  ? translateWithParameters(\n                      'overview.X_conditions_failed',\n                      overallFailedConditionsCount\n                    )\n                  : translate('overview.quality_gate_all_conditions_passed')}\n              </span>\n            </div>\n\n            {overallFailedConditionsCount > 0 && (\n              <div data-test=\"overview__quality-gate-conditions\">\n                {qgStatuses.map(qgStatus => (\n                  <QualityGatePanelSection\n                    component={component}\n                    key={qgStatus.key}\n                    qgStatus={qgStatus}\n                  />\n                ))}\n              </div>\n            )}\n          </>\n        )}\n      </div>\n      <SonarLintPromotion\n        qgConditions={flatMap(qgStatuses, qgStatus => qgStatus.failedConditions)}\n      />\n    </div>\n  );\n}\n\nexport default React.memo(QualityGatePanel);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport { parseDate } from '../../../helpers/dates';\nimport { ProjectAlmBindingResponse } from '../../../types/alm-settings';\nimport { ApplicationPeriod } from '../../../types/application';\nimport { Branch } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport { GraphType, MeasureHistory } from '../../../types/project-activity';\nimport { QualityGateStatus } from '../../../types/quality-gates';\nimport ActivityPanel from './ActivityPanel';\nimport FirstAnalysisNextStepsNotif from './FirstAnalysisNextStepsNotif';\nimport { MeasuresPanel } from './MeasuresPanel';\nimport NoCodeWarning from './NoCodeWarning';\nimport QualityGatePanel from './QualityGatePanel';\n\nexport interface BranchOverviewRendererProps {\n  analyses?: T.Analysis[];\n  appLeak?: ApplicationPeriod;\n  branch?: Branch;\n  branchesEnabled?: boolean;\n  component: T.Component;\n  detectedCIOnLastAnalysis?: boolean;\n  graph?: GraphType;\n  loadingHistory?: boolean;\n  loadingStatus?: boolean;\n  measures?: T.MeasureEnhanced[];\n  measuresHistory?: MeasureHistory[];\n  metrics?: T.Metric[];\n  onGraphChange: (graph: GraphType) => void;\n  period?: T.Period;\n  projectBinding?: ProjectAlmBindingResponse;\n  projectIsEmpty?: boolean;\n  qgStatuses?: QualityGateStatus[];\n}\n\nexport function BranchOverviewRenderer(props: BranchOverviewRendererProps) {\n  const {\n    analyses,\n    appLeak,\n    branch,\n    branchesEnabled,\n    component,\n    detectedCIOnLastAnalysis,\n    graph,\n    loadingHistory,\n    loadingStatus,\n    measures,\n    measuresHistory = [],\n    metrics = [],\n    onGraphChange,\n    period,\n    projectBinding,\n    projectIsEmpty,\n    qgStatuses\n  } = props;\n\n  const leakPeriod = component.qualifier === ComponentQualifier.Application ? appLeak : period;\n\n  return (\n    <>\n      <FirstAnalysisNextStepsNotif\n        component={component}\n        branchesEnabled={branchesEnabled}\n        detectedCIOnLastAnalysis={detectedCIOnLastAnalysis}\n        projectBinding={projectBinding}\n      />\n      <div className=\"page page-limited\">\n        <div className=\"overview\">\n          <A11ySkipTarget anchor=\"overview_main\" />\n\n          {projectIsEmpty ? (\n            <NoCodeWarning branchLike={branch} component={component} measures={measures} />\n          ) : (\n            <div className=\"display-flex-row\">\n              <div className=\"width-25 big-spacer-right\">\n                <QualityGatePanel\n                  component={component}\n                  loading={loadingStatus}\n                  qgStatuses={qgStatuses}\n                />\n              </div>\n\n              <div className=\"flex-1\">\n                <div className=\"display-flex-column\">\n                  <MeasuresPanel\n                    appLeak={appLeak}\n                    branch={branch}\n                    component={component}\n                    loading={loadingStatus}\n                    measures={measures}\n                    period={period}\n                  />\n\n                  <ActivityPanel\n                    analyses={analyses}\n                    branchLike={branch}\n                    component={component}\n                    graph={graph}\n                    leakPeriodDate={leakPeriod && parseDate(leakPeriod.date)}\n                    loading={loadingHistory}\n                    measuresHistory={measuresHistory}\n                    metrics={metrics}\n                    onGraphChange={onGraphChange}\n                  />\n                </div>\n              </div>\n            </div>\n          )}\n        </div>\n      </div>\n    </>\n  );\n}\n\nexport default React.memo(BranchOverviewRenderer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy, uniq } from 'lodash';\nimport * as React from 'react';\nimport { getApplicationDetails, getApplicationLeak } from '../../../api/application';\nimport { getMeasuresWithPeriodAndMetrics } from '../../../api/measures';\nimport { getProjectActivity } from '../../../api/projectActivity';\nimport { getApplicationQualityGate, getQualityGateProjectStatus } from '../../../api/quality-gates';\nimport { getAllTimeMachineData } from '../../../api/time-machine';\nimport {\n  getActivityGraph,\n  getHistoryMetrics,\n  saveActivityGraph\n} from '../../../components/activity-graph/utils';\nimport {\n  getBranchLikeDisplayName,\n  getBranchLikeQuery,\n  isMainBranch,\n  isSameBranchLike\n} from '../../../helpers/branch-like';\nimport { parseDate, toNotSoISOString } from '../../../helpers/dates';\nimport { enhanceConditionWithMeasure, enhanceMeasuresWithMetrics } from '../../../helpers/measures';\nimport {\n  extractStatusConditionsFromApplicationStatusChildProject,\n  extractStatusConditionsFromProjectStatus\n} from '../../../helpers/qualityGates';\nimport { isDefined } from '../../../helpers/types';\nimport { ProjectAlmBindingResponse } from '../../../types/alm-settings';\nimport { ApplicationPeriod } from '../../../types/application';\nimport { Branch, BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport { MetricKey } from '../../../types/metrics';\nimport { GraphType, MeasureHistory } from '../../../types/project-activity';\nimport { QualityGateStatus, QualityGateStatusCondition } from '../../../types/quality-gates';\nimport '../styles.css';\nimport { HISTORY_METRICS_LIST, METRICS } from '../utils';\nimport BranchOverviewRenderer from './BranchOverviewRenderer';\n\ninterface Props {\n  branch?: Branch;\n  branchesEnabled?: boolean;\n  component: T.Component;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\ninterface State {\n  analyses?: T.Analysis[];\n  appLeak?: ApplicationPeriod;\n  detectedCIOnLastAnalysis?: boolean;\n  graph: GraphType;\n  loadingHistory?: boolean;\n  loadingStatus?: boolean;\n  measures?: T.MeasureEnhanced[];\n  measuresHistory?: MeasureHistory[];\n  metrics?: T.Metric[];\n  period?: T.Period;\n  qgStatuses?: QualityGateStatus[];\n}\n\nexport const BRANCH_OVERVIEW_ACTIVITY_GRAPH = 'sonar_branch_overview.graph';\nexport const NO_CI_DETECTED = 'undetected';\n\n// Get all history data over the past year.\nconst FROM_DATE = toNotSoISOString(new Date().setFullYear(new Date().getFullYear() - 1));\n\nexport default class BranchOverview extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State;\n\n  constructor(props: Props) {\n    super(props);\n\n    const { graph } = getActivityGraph(BRANCH_OVERVIEW_ACTIVITY_GRAPH, props.component.key);\n    this.state = { graph };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadStatus();\n    this.loadHistory();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      this.props.component.key !== prevProps.component.key ||\n      !isSameBranchLike(this.props.branch, prevProps.branch)\n    ) {\n      this.loadStatus();\n      this.loadHistory();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadStatus = () => {\n    if (this.props.component.qualifier === ComponentQualifier.Application) {\n      this.loadApplicationStatus();\n    } else {\n      this.loadProjectStatus();\n    }\n  };\n\n  loadApplicationStatus = async () => {\n    const { branch, component } = this.props;\n    this.setState({ loadingStatus: true });\n    // Start by loading the application quality gate info, as well as the meta\n    // data for the application as a whole.\n    const appStatus = await getApplicationQualityGate({\n      application: component.key,\n      ...getBranchLikeQuery(branch)\n    });\n    const { measures: appMeasures, metrics, period } = await this.loadMeasuresAndMeta(\n      component.key,\n      branch\n    );\n\n    const appBranchName =\n      (branch && !isMainBranch(branch) && getBranchLikeDisplayName(branch)) || undefined;\n\n    const appDetails = await getApplicationDetails(component.key, appBranchName);\n\n    // We also need to load the application leak periods separately.\n    getApplicationLeak(component.key, appBranchName).then(\n      leaks => {\n        if (this.mounted && leaks && leaks.length) {\n          const sortedLeaks = sortBy(leaks, leak => {\n            return new Date(leak.date);\n          });\n          this.setState({\n            appLeak: sortedLeaks[0]\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ appLeak: undefined });\n        }\n      }\n    );\n\n    // We need to load the measures for each project in an application\n    // individually, in order to display all QG conditions correctly. Loading\n    // them at the parent application level will not get all the necessary\n    // information, unfortunately, as they are aggregated.\n    Promise.all(\n      appStatus.projects.map(project => {\n        const projectDetails = appDetails.projects.find(p => p.key === project.key);\n        const projectBranchLike = projectDetails\n          ? { isMain: projectDetails.isMain, name: projectDetails.branch, excludedFromPurge: false }\n          : undefined;\n\n        return this.loadMeasuresAndMeta(\n          project.key,\n          projectBranchLike,\n          // Only load metrics that apply to failing QG conditions; we don't\n          // need the others anyway.\n          project.conditions.filter(c => c.status !== 'OK').map(c => c.metric)\n        ).then(({ measures }) => ({\n          measures,\n          project,\n          projectBranchLike\n        }));\n      })\n    ).then(\n      results => {\n        if (this.mounted) {\n          const qgStatuses = results.map(({ measures = [], project, projectBranchLike }) => {\n            const { key, name, status } = project;\n            const conditions = extractStatusConditionsFromApplicationStatusChildProject(project);\n            const failedConditions = this.getFailedConditions(conditions, measures);\n\n            return {\n              failedConditions,\n              key,\n              name,\n              status,\n              branchLike: projectBranchLike\n            };\n          });\n\n          this.setState({\n            loadingStatus: false,\n            measures: appMeasures,\n            metrics,\n            period,\n            qgStatuses\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loadingStatus: false, qgStatuses: undefined });\n        }\n      }\n    );\n  };\n\n  loadProjectStatus = async () => {\n    const {\n      branch,\n      component: { key, name }\n    } = this.props;\n    this.setState({ loadingStatus: true });\n\n    const projectStatus = await getQualityGateProjectStatus({\n      projectKey: key,\n      ...getBranchLikeQuery(branch)\n    });\n\n    // Get failing condition metric keys. We need measures for them as well to\n    // render them.\n    const metricKeys =\n      projectStatus.conditions !== undefined\n        ? uniq([...METRICS, ...projectStatus.conditions.map(c => c.metricKey)])\n        : METRICS;\n\n    this.loadMeasuresAndMeta(key, branch, metricKeys).then(\n      ({ measures, metrics, period }) => {\n        if (this.mounted && measures) {\n          const { ignoredConditions, status } = projectStatus;\n          const conditions = extractStatusConditionsFromProjectStatus(projectStatus);\n          const failedConditions = this.getFailedConditions(conditions, measures);\n\n          const qgStatus = {\n            ignoredConditions,\n            failedConditions,\n            key,\n            name,\n            status,\n            branchLike: branch\n          };\n\n          this.setState({\n            loadingStatus: false,\n            measures,\n            metrics,\n            period,\n            qgStatuses: [qgStatus]\n          });\n        } else if (this.mounted) {\n          this.setState({ loadingStatus: false, qgStatuses: undefined });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loadingStatus: false, qgStatuses: undefined });\n        }\n      }\n    );\n  };\n\n  loadMeasuresAndMeta = (\n    componentKey: string,\n    branchLike?: BranchLike,\n    metricKeys: string[] = []\n  ) => {\n    return getMeasuresWithPeriodAndMetrics(\n      componentKey,\n      metricKeys.length > 0 ? metricKeys : METRICS,\n      getBranchLikeQuery(branchLike)\n    ).then(({ component: { measures }, metrics, period }) => {\n      return {\n        measures: enhanceMeasuresWithMetrics(measures || [], metrics || []),\n        metrics,\n        period\n      };\n    });\n  };\n\n  loadHistory = () => {\n    this.setState({ loadingHistory: true });\n\n    return Promise.all([this.loadHistoryMeasures(), this.loadAnalyses()]).then(\n      this.doneLoadingHistory,\n      this.doneLoadingHistory\n    );\n  };\n\n  loadHistoryMeasures = () => {\n    const { branch, component } = this.props;\n    const { graph } = this.state;\n\n    const graphMetrics = getHistoryMetrics(graph, []);\n    const metrics = uniq([...HISTORY_METRICS_LIST, ...graphMetrics]);\n\n    return getAllTimeMachineData({\n      ...getBranchLikeQuery(branch),\n      from: FROM_DATE,\n      component: component.key,\n      metrics: metrics.join()\n    }).then(\n      ({ measures }) => {\n        if (this.mounted) {\n          this.setState({\n            measuresHistory: measures.map(measure => ({\n              metric: measure.metric,\n              history: measure.history.map(analysis => ({\n                date: parseDate(analysis.date),\n                value: analysis.value\n              }))\n            }))\n          });\n        }\n      },\n      () => {}\n    );\n  };\n\n  loadAnalyses = () => {\n    const { branch } = this.props;\n\n    return getProjectActivity({\n      ...getBranchLikeQuery(branch),\n      project: this.getTopLevelComponent(),\n      from: FROM_DATE\n    }).then(\n      ({ analyses }) => {\n        if (this.mounted) {\n          this.setState({\n            detectedCIOnLastAnalysis:\n              analyses.length > 0\n                ? analyses[0].detectedCI !== undefined && analyses[0].detectedCI !== NO_CI_DETECTED\n                : undefined,\n            analyses\n          });\n        }\n      },\n      () => {}\n    );\n  };\n\n  getFailedConditions = (\n    conditions: QualityGateStatusCondition[],\n    measures: T.MeasureEnhanced[]\n  ) => {\n    return (\n      conditions\n        .filter(c => c.level !== 'OK')\n        // Enhance them with Metric information, which will be needed\n        // to render the conditions properly.\n        .map(c => enhanceConditionWithMeasure(c, measures))\n        // The enhancement will return undefined if it cannot find the\n        // appropriate measure. Make sure we filter them out.\n        .filter(isDefined)\n    );\n  };\n\n  getTopLevelComponent = () => {\n    const { component } = this.props;\n    let current = component.breadcrumbs.length - 1;\n    while (\n      current > 0 &&\n      !([\n        ComponentQualifier.Project,\n        ComponentQualifier.Portfolio,\n        ComponentQualifier.Application\n      ] as string[]).includes(component.breadcrumbs[current].qualifier)\n    ) {\n      current--;\n    }\n    return component.breadcrumbs[current].key;\n  };\n\n  doneLoadingHistory = () => {\n    if (this.mounted) {\n      this.setState({\n        loadingHistory: false\n      });\n    }\n  };\n\n  handleGraphChange = (graph: GraphType) => {\n    const { component } = this.props;\n    saveActivityGraph(BRANCH_OVERVIEW_ACTIVITY_GRAPH, component.key, graph);\n    this.setState({ graph, loadingHistory: true }, () => {\n      this.loadHistoryMeasures().then(this.doneLoadingHistory, this.doneLoadingHistory);\n    });\n  };\n\n  render() {\n    const { branch, branchesEnabled, component, projectBinding } = this.props;\n    const {\n      analyses,\n      appLeak,\n      detectedCIOnLastAnalysis,\n      graph,\n      loadingStatus,\n      loadingHistory,\n      measures,\n      measuresHistory,\n      metrics,\n      period,\n      qgStatuses\n    } = this.state;\n\n    const projectIsEmpty =\n      loadingStatus === false &&\n      (measures === undefined ||\n        measures.find(measure =>\n          ([MetricKey.lines, MetricKey.new_lines] as string[]).includes(measure.metric.key)\n        ) === undefined);\n\n    return (\n      <BranchOverviewRenderer\n        analyses={analyses}\n        appLeak={appLeak}\n        branch={branch}\n        branchesEnabled={branchesEnabled}\n        component={component}\n        detectedCIOnLastAnalysis={detectedCIOnLastAnalysis}\n        graph={graph}\n        loadingHistory={loadingHistory}\n        loadingStatus={loadingStatus}\n        measures={measures}\n        measuresHistory={measuresHistory}\n        metrics={metrics}\n        onGraphChange={this.handleGraphChange}\n        period={period}\n        projectBinding={projectBinding}\n        projectIsEmpty={projectIsEmpty}\n        qgStatuses={qgStatuses}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { get, getJSON, HttpStatus, parseError, parseJSON, post } from '../helpers/request';\nimport {\n  AlmSettingsBindingDefinitions,\n  AlmSettingsInstance,\n  AzureBindingDefinition,\n  AzureProjectAlmBindingParams,\n  BitbucketCloudBindingDefinition,\n  BitbucketCloudProjectAlmBindingParams,\n  BitbucketProjectAlmBindingParams,\n  BitbucketServerBindingDefinition,\n  GithubBindingDefinition,\n  GithubProjectAlmBindingParams,\n  GitlabBindingDefinition,\n  GitlabProjectAlmBindingParams,\n  ProjectAlmBindingConfigurationErrors,\n  ProjectAlmBindingResponse\n} from '../types/alm-settings';\n\nexport function getAlmDefinitions(): Promise<AlmSettingsBindingDefinitions> {\n  return getJSON('/api/alm_settings/list_definitions');\n}\n\nexport function getAlmSettings(project?: string): Promise<AlmSettingsInstance[]> {\n  return getAlmSettingsNoCatch(project).catch(throwGlobalError);\n}\n\nexport function getAlmSettingsNoCatch(project?: string): Promise<AlmSettingsInstance[]> {\n  return getJSON('/api/alm_settings/list', { project }).then(({ almSettings }) => almSettings);\n}\n\nexport function validateAlmSettings(key: string): Promise<string> {\n  return get('/api/alm_settings/validate', { key })\n    .then(() => {\n      return '';\n    })\n    .catch((response: Response) => {\n      if (response.status === HttpStatus.BadRequest) {\n        return parseError(response);\n      } else {\n        return throwGlobalError(response);\n      }\n    });\n}\n\nexport function createGithubConfiguration(data: GithubBindingDefinition) {\n  return post('/api/alm_settings/create_github', data).catch(throwGlobalError);\n}\n\nexport function updateGithubConfiguration(data: GithubBindingDefinition & { newKey: string }) {\n  return post('/api/alm_settings/update_github', data).catch(throwGlobalError);\n}\n\nexport function createAzureConfiguration(data: AzureBindingDefinition) {\n  return post('/api/alm_settings/create_azure', data).catch(throwGlobalError);\n}\n\nexport function updateAzureConfiguration(data: AzureBindingDefinition & { newKey: string }) {\n  return post('/api/alm_settings/update_azure', data).catch(throwGlobalError);\n}\n\nexport function createBitbucketServerConfiguration(data: BitbucketServerBindingDefinition) {\n  return post('/api/alm_settings/create_bitbucket', data).catch(throwGlobalError);\n}\n\nexport function updateBitbucketServerConfiguration(\n  data: BitbucketServerBindingDefinition & { newKey: string }\n) {\n  return post('/api/alm_settings/update_bitbucket', data).catch(throwGlobalError);\n}\n\nexport function createBitbucketCloudConfiguration(data: BitbucketCloudBindingDefinition) {\n  return post('/api/alm_settings/create_bitbucketcloud', data).catch(throwGlobalError);\n}\n\nexport function updateBitbucketCloudConfiguration(\n  data: BitbucketCloudBindingDefinition & { newKey: string }\n) {\n  return post('/api/alm_settings/update_bitbucketcloud', data).catch(throwGlobalError);\n}\n\nexport function createGitlabConfiguration(data: GitlabBindingDefinition) {\n  return post('/api/alm_settings/create_gitlab', data).catch(throwGlobalError);\n}\n\nexport function updateGitlabConfiguration(data: GitlabBindingDefinition & { newKey: string }) {\n  return post('/api/alm_settings/update_gitlab', data).catch(throwGlobalError);\n}\n\nexport function deleteConfiguration(key: string) {\n  return post('/api/alm_settings/delete', { key }).catch(throwGlobalError);\n}\n\nexport function countBindedProjects(almSetting: string) {\n  return getJSON('/api/alm_settings/count_binding', { almSetting })\n    .then(({ projects }) => projects)\n    .catch(throwGlobalError);\n}\n\nexport function getProjectAlmBinding(project: string): Promise<ProjectAlmBindingResponse> {\n  return getJSON('/api/alm_settings/get_binding', { project });\n}\n\nexport function deleteProjectAlmBinding(project: string): Promise<void> {\n  return post('/api/alm_settings/delete_binding', { project }).catch(throwGlobalError);\n}\n\nexport function setProjectAzureBinding(data: AzureProjectAlmBindingParams) {\n  return post('/api/alm_settings/set_azure_binding', data).catch(throwGlobalError);\n}\n\nexport function setProjectBitbucketBinding(data: BitbucketProjectAlmBindingParams) {\n  return post('/api/alm_settings/set_bitbucket_binding', data).catch(throwGlobalError);\n}\n\nexport function setProjectBitbucketCloudBinding(data: BitbucketCloudProjectAlmBindingParams) {\n  return post('/api/alm_settings/set_bitbucketcloud_binding', data).catch(throwGlobalError);\n}\n\nexport function setProjectGithubBinding(data: GithubProjectAlmBindingParams) {\n  return post('/api/alm_settings/set_github_binding', data).catch(throwGlobalError);\n}\n\nexport function setProjectGitlabBinding(data: GitlabProjectAlmBindingParams) {\n  return post('/api/alm_settings/set_gitlab_binding', data).catch(throwGlobalError);\n}\n\nexport function validateProjectAlmBinding(\n  projectKey: string\n): Promise<ProjectAlmBindingConfigurationErrors | undefined> {\n  return get('/api/alm_settings/validate_binding', { project: projectKey })\n    .then(() => undefined)\n    .catch((response: Response) => {\n      if (response.status === HttpStatus.BadRequest) {\n        return parseJSON(response);\n      }\n      return throwGlobalError(response);\n    });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface SentenceWithHighlightsProps {\n  highlightKeys: string[];\n  translationKey: string;\n  highlightPrefixKeys?: string;\n}\n\nexport default function SentenceWithHighlights({\n  highlightKeys,\n  translationKey,\n  highlightPrefixKeys\n}: SentenceWithHighlightsProps) {\n  const values: T.Dict<JSX.Element> = {};\n\n  const transhighlightPrefixKeys = highlightPrefixKeys || translationKey;\n  highlightKeys.forEach(key => {\n    values[key] = <strong>{translate(transhighlightPrefixKeys, 'sentence', key)}</strong>;\n  });\n  return (\n    <FormattedMessage\n      defaultMessage={translate(translationKey, 'sentence')}\n      id={`${translationKey}.sentence`}\n      values={values}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport { withAppState } from '../../hoc/withAppState';\nimport SentenceWithHighlights from './SentenceWithHighlights';\n\nexport interface AllSetProps {\n  alm: AlmKeys;\n  appState: T.AppState;\n  willRefreshAutomatically?: boolean;\n}\n\nexport function AllSet(props: AllSetProps) {\n  const {\n    alm,\n    appState: { branchesEnabled },\n    willRefreshAutomatically\n  } = props;\n\n  return (\n    <>\n      <div className=\"abs-width-600\">\n        <p className=\"big-spacer-bottom\">\n          <SentenceWithHighlights\n            highlightKeys={['all_set']}\n            translationKey=\"onboarding.tutorial.ci_outro.all_set\"\n          />\n        </p>\n        <div className=\"display-flex-row big-spacer-bottom\">\n          <div>\n            <img\n              alt=\"\" // Should be ignored by screen readers\n              className=\"big-spacer-right\"\n              width={30}\n              src={`${getBaseUrl()}/images/tutorials/commit.svg`}\n            />\n          </div>\n          <div>\n            <p className=\"little-spacer-bottom\">\n              <strong>{translate('onboarding.tutorial.ci_outro.commit')}</strong>\n            </p>\n            <p>\n              {branchesEnabled\n                ? translate('onboarding.tutorial.ci_outro.commit.why', alm)\n                : translate('onboarding.tutorial.ci_outro.commit.why.no_branches')}\n            </p>\n          </div>\n        </div>\n        {willRefreshAutomatically && (\n          <div className=\"display-flex-row\">\n            <div>\n              <img\n                alt=\"\" // Should be ignored by screen readers\n                className=\"big-spacer-right\"\n                width={30}\n                src={`${getBaseUrl()}/images/tutorials/refresh.svg`}\n              />\n            </div>\n            <div>\n              <p className=\"little-spacer-bottom\">\n                <strong>{translate('onboarding.tutorial.ci_outro.refresh')}</strong>\n              </p>\n              <p>{translate('onboarding.tutorial.ci_outro.refresh.why')}</p>\n            </div>\n          </div>\n        )}\n      </div>\n      {willRefreshAutomatically && (\n        <div className=\"huge-spacer-bottom huge-spacer-top big-padded-top text-muted display-flex-center display-flex-justify-center\">\n          <i className=\"spinner spacer-right\" />\n          {translate('onboarding.tutorial.ci_outro.waiting_for_fist_analysis')}\n        </div>\n      )}\n    </>\n  );\n}\n\nexport default withAppState(AllSet);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/no-noninteractive-tabindex */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport './Step.css';\n\ninterface Props {\n  finished?: boolean;\n  onOpen?: VoidFunction;\n  open: boolean;\n  renderForm: () => React.ReactNode;\n  renderResult?: () => React.ReactNode;\n  stepNumber?: number;\n  stepTitle: React.ReactNode;\n}\n\nexport default function Step(props: Props) {\n  const { finished, open, stepNumber, stepTitle } = props;\n  const className = classNames('boxed-group', 'onboarding-step', {\n    'is-open': open,\n    'is-finished': finished,\n    'no-step-number': stepNumber === undefined\n  });\n\n  const clickable = !open && finished && props.onOpen !== undefined;\n\n  const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n    event.preventDefault();\n    if (props.onOpen !== undefined) {\n      props.onOpen();\n    }\n  };\n\n  return (\n    <div\n      className={className}\n      onClick={clickable ? handleClick : undefined}\n      role={clickable ? 'button' : undefined}\n      tabIndex={clickable ? 0 : undefined}>\n      {stepNumber !== undefined && <div className=\"onboarding-step-number\">{stepNumber}</div>}\n      {!open && props.renderResult && props.renderResult()}\n      <div className=\"boxed-group-header\">\n        <h2>{stepTitle}</h2>\n      </div>\n      {!open && <div className=\"boxed-group-inner\" />}\n      <div className={classNames({ hidden: !open })}>{props.renderForm()}</div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport AllSet from './AllSet';\nimport Step from './Step';\n\nexport interface AllSetStepProps {\n  alm: AlmKeys;\n  open: boolean;\n  stepNumber: number;\n  willRefreshAutomatically?: boolean;\n}\n\nexport default function AllSetStep(props: AllSetStepProps) {\n  const { alm, open, stepNumber, willRefreshAutomatically } = props;\n  return (\n    <Step\n      finished={false}\n      open={open}\n      renderForm={() => (\n        <div className=\"boxed-group-inner\">\n          <AllSet alm={alm} willRefreshAutomatically={willRefreshAutomatically} />\n        </div>\n      )}\n      stepNumber={stepNumber}\n      stepTitle={translate('onboarding.tutorial.ci_outro.all_set.title')}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { rawSizes } from '../../../app/theme';\nimport { Button } from '../../../components/controls/buttons';\nimport ChevronRightIcon from '../../../components/icons/ChevronRightIcon';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface FinishButtonProps {\n  onClick: () => void;\n}\n\nexport default function FinishButton(props: FinishButtonProps) {\n  return (\n    <Button className=\"big-spacer-top big-spacer-bottom\" onClick={props.onClick}>\n      {translate('tutorials.finish')}\n      <ChevronRightIcon size={rawSizes.baseFontSizeRaw} />\n    </Button>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioToggle from '../../../components/controls/RadioToggle';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface RenderOptionsProps {\n  checked: string | undefined;\n  name: string;\n  onCheck: (checked: string) => void;\n  optionLabelKey: string;\n  options: string[];\n  titleLabelKey?: string;\n}\n\nexport default function RenderOptions({\n  checked,\n  name,\n  onCheck,\n  optionLabelKey,\n  options,\n  titleLabelKey\n}: RenderOptionsProps) {\n  return (\n    <div className=\"big-spacer-top\">\n      {titleLabelKey && <h4 className=\"spacer-bottom\">{translate(titleLabelKey)}</h4>}\n\n      <RadioToggle\n        name={name}\n        onCheck={onCheck}\n        options={options.map(build => ({\n          label: translate(optionLabelKey, build),\n          value: build\n        }))}\n        value={checked}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum TutorialModes {\n  Manual = 'manual',\n  Jenkins = 'jenkins',\n  BitbucketPipelines = 'bitbucket-pipelines',\n  GitLabCI = 'gitlab-ci',\n  GitHubActions = 'github-actions',\n  AzurePipelines = 'azure-pipelines',\n  OtherCI = 'other-ci'\n}\n\nexport enum BuildTools {\n  Maven = 'maven',\n  Gradle = 'gradle',\n  CFamily = 'cfamily',\n  DotNet = 'dotnet',\n  Other = 'other'\n}\n\nexport enum OSs {\n  Linux = 'linux',\n  Windows = 'win',\n  MacOS = 'mac'\n}\n\nexport type ManualTutorialConfig =\n  | { buildTool?: BuildTools.Maven | BuildTools.Gradle | BuildTools.DotNet }\n  | { buildTool: BuildTools.Other | BuildTools.CFamily; os?: OSs };\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ClipboardButton } from '../../components/controls/clipboard';\nimport { isDefined } from '../../helpers/types';\nimport './CodeSnippet.css';\n\nexport interface CodeSnippetProps {\n  isOneLine?: boolean;\n  noCopy?: boolean;\n  snippet: string | (string | undefined)[];\n}\n\nexport default function CodeSnippet(props: CodeSnippetProps) {\n  const { isOneLine, noCopy, snippet } = props;\n  const snippetRef = React.useRef<HTMLPreElement>(null);\n\n  let finalSnippet: string;\n  if (Array.isArray(snippet)) {\n    finalSnippet = snippet.filter(line => isDefined(line)).join(isOneLine ? ' ' : ' \\\\\\n  ');\n  } else {\n    finalSnippet = snippet;\n  }\n\n  return (\n    <div className={classNames('code-snippet spacer-top spacer-bottom display-flex-row', {})}>\n      {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n      <pre className=\"flex-1\" ref={snippetRef} tabIndex={0}>\n        {finalSnippet}\n      </pre>\n      {!noCopy && <ClipboardButton copyValue={finalSnippet} />}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface CompilationInfoProps {\n  className?: string;\n}\n\nexport function CompilationInfo({ className = 'spacer-top spacer-bottom' }: CompilationInfoProps) {\n  return (\n    <Alert className={className} variant=\"info\">\n      <p className=\"spacer-bottom\">\n        <FormattedMessage\n          id=\"onboarding.tutorial.cfamilly.compilation_database_info\"\n          defaultMessage={translate('onboarding.tutorial.cfamilly.compilation_database_info')}\n          values={{\n            link: (\n              <a\n                href=\"/documentation/analysis/languages/cfamily/\"\n                rel=\"noopener noreferrer\"\n                target=\"_blank\">\n                {translate('onboarding.tutorial.cfamilly.compilation_database_info.link')}\n              </a>\n            )\n          }}\n        />\n      </p>\n      <p>\n        <FormattedMessage\n          id=\"onboarding.tutorial.cfamilly.speed_caching\"\n          defaultMessage={translate('onboarding.tutorial.cfamilly.speed_caching')}\n          values={{\n            link: (\n              <a\n                href=\"/documentation/analysis/languages/cfamily/#analysis-cache\"\n                rel=\"noopener noreferrer\"\n                target=\"_blank\">\n                {translate('onboarding.tutorial.cfamilly.speed_caching.link')}\n              </a>\n            )\n          }}\n        />\n      </p>\n    </Alert>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport classNames from 'classnames';\nimport React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { OSs, TutorialModes } from '../types';\nimport './GithubCFamilyExampleRepositories.css';\n\nexport interface GithubCFamilyExampleRepositoriesProps {\n  className?: string;\n  os?: OSs;\n  ci?: TutorialModes;\n}\n\nconst OS_SEARCH_MAP = {\n  [OSs.Linux]: 'linux',\n  [OSs.Windows]: 'windows',\n  [OSs.MacOS]: 'macos'\n};\n\nconst CI_SEARCH_MAP = {\n  [TutorialModes.Jenkins]: 'jenkins',\n  [TutorialModes.AzurePipelines]: 'azure',\n  [TutorialModes.GitHubActions]: 'gh-actions',\n  [TutorialModes.GitLabCI]: 'gitlab',\n  [TutorialModes.BitbucketPipelines]: 'bitbucket',\n  [TutorialModes.Manual]: 'manual',\n  [TutorialModes.OtherCI]: 'manual'\n};\n\nexport default function GithubCFamilyExampleRepositories(\n  props: GithubCFamilyExampleRepositoriesProps\n) {\n  const { className, os, ci } = props;\n  const queryParams = ['sq', os ? OS_SEARCH_MAP[os] : undefined, ci ? CI_SEARCH_MAP[ci] : undefined]\n    .filter(s => !!s)\n    .join('+');\n  const link = `https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=${queryParams}`;\n\n  return (\n    <div\n      className={classNames(\n        'github-cfamily-example-repositories-box big-padded boxed-group',\n        className\n      )}>\n      <div className=\"display-flex-center\">\n        <img\n          alt=\"\" // Should be ignored by screen readers\n          className=\"spacer-right\"\n          height={20}\n          src={`${getBaseUrl()}/images/alm/github.svg`}\n        />\n        <a className=\"spacer-left big\" rel=\"noopener noreferrer\" target=\"_blank\" href={link}>\n          sonarsource-cfamily-examples\n        </a>\n      </div>\n      <p className=\"spacer-top\">\n        {translate('onboarding.tutorial.cfamily.examples_repositories_description')}\n      </p>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmKeys } from '../../../../types/alm-settings';\n\nexport default function AlertClassicEditor() {\n  return (\n    <Alert variant=\"info\" className=\"big-spacer-top\">\n      <FormattedMessage\n        id=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.info\"\n        defaultMessage={translate('onboarding.tutorial.with.azure_pipelines.BranchAnalysis.info')}\n        values={{\n          doc_link: (\n            <Link to={ALM_DOCUMENTATION_PATHS[AlmKeys.Azure]} target=\"_blank\">\n              {translate('onboarding.tutorial.with.azure_pipelines.BranchAnalysis.info.doc_link')}\n            </Link>\n          )\n        }}\n      />\n    </Alert>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ClipboardIconButton } from '../../../../components/controls/clipboard';\nimport { translate } from '../../../../helpers/l10n';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\nimport { BuildTools } from '../../types';\n\nexport enum PrepareType {\n  JavaMavenGradle,\n  StandAlone,\n  MSBuild\n}\n\nexport interface PrepareAnalysisCommandProps {\n  buildTool: BuildTools;\n  kind: PrepareType;\n  projectKey: string;\n}\n\nexport default function PrepareAnalysisCommand(props: PrepareAnalysisCommandProps) {\n  const { buildTool, kind, projectKey } = props;\n\n  const ADDITIONAL_PROPERTY = 'sonar.cfamily.build-wrapper-output=bw-output';\n\n  const MAVEN_GRADLE_PROPS_SNIPPET = `# Additional properties that will be passed to the scanner,\n# Put one key=value per line, example:\n# sonar.exclusions=**/*.bin\nsonar.projectKey=${projectKey}`;\n\n  return (\n    <ul className=\"list-styled\">\n      <li>\n        <SentenceWithHighlights\n          translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.endpoint\"\n          highlightKeys={['endpoint']}\n        />\n      </li>\n      <li>\n        <FormattedMessage\n          id=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis\"\n          defaultMessage={translate(\n            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis'\n          )}\n          values={{\n            section: (\n              <strong>\n                {translate(\n                  'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis.section'\n                )}\n              </strong>\n            ),\n            run_analysis_value: (\n              <strong>\n                {translate(\n                  'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis.values',\n                  buildTool\n                )}\n              </strong>\n            )\n          }}\n        />\n      </li>\n\n      {kind === PrepareType.StandAlone && (\n        <>\n          <li>\n            <SentenceWithHighlights\n              translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.manual\"\n              highlightKeys={['mode']}\n            />\n          </li>\n\n          <li>\n            <FormattedMessage\n              id=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence\"\n              defaultMessage={translate(\n                'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence'\n              )}\n              values={{\n                project_key: (\n                  <b>\n                    {translate(\n                      'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence.project_key'\n                    )}\n                  </b>\n                ),\n                key: <code className=\"rule\">{projectKey}</code>,\n                button: <ClipboardIconButton copyValue={projectKey} />\n              }}\n            />\n          </li>\n          {buildTool === BuildTools.CFamily && (\n            <li>\n              <FormattedMessage\n                id=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp\"\n                defaultMessage={translate(\n                  'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp'\n                )}\n                values={{\n                  advanced: (\n                    <b>\n                      {translate(\n                        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp.advanced'\n                      )}\n                    </b>\n                  ),\n                  additional: (\n                    <b>\n                      {translate(\n                        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp.additional'\n                      )}\n                    </b>\n                  ),\n                  property: <code className=\"rule\">{ADDITIONAL_PROPERTY}</code>,\n                  button: <ClipboardIconButton copyValue={ADDITIONAL_PROPERTY} />\n                }}\n              />\n            </li>\n          )}\n        </>\n      )}\n\n      {kind === PrepareType.JavaMavenGradle && (\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.advanced_properties\"\n            highlightKeys={['section', 'properties']}\n          />\n          :\n          <CodeSnippet snippet={MAVEN_GRADLE_PROPS_SNIPPET} />\n        </li>\n      )}\n      {kind === PrepareType.MSBuild && (\n        <li>\n          <FormattedMessage\n            id=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence\"\n            defaultMessage={translate(\n              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence'\n            )}\n            values={{\n              project_key: (\n                <b>\n                  {translate(\n                    'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence.project_key'\n                  )}\n                </b>\n              ),\n              key: <code className=\"rule\">{projectKey}</code>,\n              button: <ClipboardIconButton copyValue={projectKey} />\n            }}\n          />\n        </li>\n      )}\n    </ul>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmKeys } from '../../../../types/alm-settings';\nimport { withAppState } from '../../../hoc/withAppState';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\n\nexport interface PublishStepsProps {\n  appState: T.AppState;\n}\nexport function PublishSteps(props: PublishStepsProps) {\n  const {\n    appState: { branchesEnabled }\n  } = props;\n\n  return (\n    <>\n      <li>\n        <SentenceWithHighlights\n          translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.publish_qg\"\n          highlightKeys={['task']}\n        />\n        <Alert variant=\"info\" className=\"spacer-top\">\n          {translate(\n            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.publish_qg.info.sentence1'\n          )}\n        </Alert>\n      </li>\n      <li>\n        <SentenceWithHighlights\n          translationKey={\n            branchesEnabled\n              ? 'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.continous_integration'\n              : 'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.continous_integration.no_branches'\n          }\n          highlightKeys={['tab', 'continuous_integration']}\n        />\n      </li>\n      {branchesEnabled && (\n        <>\n          <hr />\n          <FormattedMessage\n            id=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection\"\n            defaultMessage={translate(\n              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection'\n            )}\n            values={{\n              link: (\n                <Link to={ALM_DOCUMENTATION_PATHS[AlmKeys.Azure]} target=\"_blank\">\n                  {translate(\n                    'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection.link'\n                  )}\n                </Link>\n              )\n            }}\n          />\n        </>\n      )}\n    </>\n  );\n}\n\nexport default withAppState(PublishSteps);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\nimport { getHostUrl } from '../../../../helpers/urls';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport { CompilationInfo } from '../../components/CompilationInfo';\nimport GithubCFamilyExampleRepositories from '../../components/GithubCFamilyExampleRepositories';\nimport RenderOptions from '../../components/RenderOptions';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\nimport { BuildTools, OSs, TutorialModes } from '../../types';\nimport AlertClassicEditor from './AlertClassicEditor';\nimport PrepareAnalysisCommand, { PrepareType } from './PrepareAnalysisCommand';\nimport PublishSteps from './PublishSteps';\n\nexport interface ClangGCCProps {\n  projectKey: string;\n  onStepValidationChange: (isValid: boolean) => void;\n}\n\ntype OsConstant = {\n  [key in OSs]: {\n    highlightScriptKey: string;\n    script: string;\n    scriptBuild: string;\n  };\n};\n\nexport default function ClangGCC(props: ClangGCCProps) {\n  const { projectKey } = props;\n  const [os, setOs] = React.useState<OSs | undefined>();\n  const host = getHostUrl();\n\n  const codeSnippetDownload: OsConstant = {\n    [OSs.Linux]: {\n      script: `curl '${host}/static/cpp/build-wrapper-linux-x86.zip' --output build-wrapper.zip\nunzip build-wrapper.zip`,\n      highlightScriptKey:\n        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.build_wrapper.ccpp.nix',\n      scriptBuild:\n        './build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your build command here>'\n    },\n    [OSs.Windows]: {\n      script: `Invoke-WebRequest -Uri '${host}/static/cpp/build-wrapper-win-x86.zip' -OutFile 'build-wrapper.zip'\nExpand-Archive -Path 'build-wrapper.zip' -DestinationPath '.'`,\n      highlightScriptKey:\n        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.build_wrapper.ccpp.win',\n      scriptBuild:\n        'build-wrapper-win-x86/build-wrapper-win-x86-64.exe --out-dir bw-output <your build command here>'\n    },\n    [OSs.MacOS]: {\n      script: `curl '${host}/static/cpp/build-wrapper-macosx-x86.zip' --output build-wrapper.zip\nunzip build-wrapper.zip`,\n      highlightScriptKey:\n        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.build_wrapper.ccpp.nix',\n      scriptBuild:\n        './build-wrapper-macos-x86/build-wrapper-macos-x86 --out-dir bw-output <your build command here>'\n    }\n  };\n\n  React.useEffect(() => {\n    if (os) {\n      props.onStepValidationChange(true);\n    } else {\n      props.onStepValidationChange(false);\n    }\n  }, [os, props.onStepValidationChange]);\n\n  const handlOsChange = (value: OSs) => {\n    setOs(value);\n  };\n\n  return (\n    <>\n      <span className=\"big-spacer-top display-block\">\n        {translate('onboarding.tutorial.with.azure_pipelines.os')}\n      </span>\n      <RenderOptions\n        checked={os}\n        name=\"os\"\n        onCheck={handlOsChange}\n        optionLabelKey=\"onboarding.build.other.os\"\n        options={Object.values(OSs)}\n      />\n\n      {os && (\n        <>\n          <GithubCFamilyExampleRepositories\n            className=\"big-spacer-top abs-width-600\"\n            os={os}\n            ci={TutorialModes.AzurePipelines}\n          />\n          <AlertClassicEditor />\n          <ol className=\"list-styled big-spacer-top\">\n            <li>\n              <SentenceWithHighlights\n                translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.build_wrapper.ccpp\"\n                highlightPrefixKeys=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare\"\n                highlightKeys={['pipeline']}\n              />\n            </li>\n            <ul className=\"list-styled\">\n              <li>\n                <SentenceWithHighlights\n                  translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.build_wrapper.ccpp.script\"\n                  highlightPrefixKeys={codeSnippetDownload[os].highlightScriptKey}\n                  highlightKeys={['task', 'inline']}\n                />\n                <CodeSnippet snippet={codeSnippetDownload[os].script} />\n              </li>\n            </ul>\n            <li>\n              <SentenceWithHighlights\n                translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.ccpp\"\n                highlightPrefixKeys=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare\"\n                highlightKeys={['task', 'before']}\n              />\n            </li>\n            <PrepareAnalysisCommand\n              buildTool={BuildTools.CFamily}\n              kind={PrepareType.StandAlone}\n              projectKey={projectKey}\n            />\n            <li>\n              <SentenceWithHighlights\n                translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.build.ccpp\"\n                highlightKeys={['task']}\n              />\n            </li>\n            <ul className=\"list-styled\">\n              <li>\n                <SentenceWithHighlights\n                  translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.build_script.ccpp\"\n                  highlightKeys={['build_wrapper']}\n                />\n                <CodeSnippet snippet={codeSnippetDownload[os].scriptBuild} />\n                <CompilationInfo />\n              </li>\n            </ul>\n            <li>\n              <SentenceWithHighlights\n                translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.ccpp\"\n                highlightPrefixKeys=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run\"\n                highlightKeys={['task', 'after']}\n              />\n            </li>\n            <PublishSteps />\n          </ol>\n        </>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\nimport { BuildTools } from '../../types';\nimport AlertClassicEditor from './AlertClassicEditor';\nimport PrepareAnalysisCommand, { PrepareType } from './PrepareAnalysisCommand';\nimport PublishSteps from './PublishSteps';\n\nexport interface DotNetProps {\n  projectKey: string;\n}\n\nexport default function DotNet(props: DotNetProps): JSX.Element {\n  const { projectKey } = props;\n  return (\n    <>\n      <AlertClassicEditor />\n      <ol className=\"list-styled big-spacer-top\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare\"\n            highlightKeys={['pipeline', 'task', 'before']}\n          />\n        </li>\n        <PrepareAnalysisCommand\n          buildTool={BuildTools.DotNet}\n          kind={PrepareType.MSBuild}\n          projectKey={projectKey}\n        />\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run\"\n            highlightKeys={['task', 'after']}\n          />\n        </li>\n\n        <PublishSteps />\n      </ol>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../helpers/l10n';\n\nfunction renderSentenceWithFieldAndValue(props: {\n  field: React.ReactNode;\n  value: React.ReactNode;\n}) {\n  const { field, value } = props;\n  return (\n    <FormattedMessage\n      id=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.sentence\"\n      defaultMessage={translate(\n        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.sentence'\n      )}\n      values={{\n        field: <strong>{field}</strong>,\n        value: <strong>{value}</strong>\n      }}\n    />\n  );\n}\n\nexport default function JavaToolInstallation() {\n  return (\n    <li>\n      {translate('onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.title')}\n      <ul className=\"list-styled\">\n        <li>\n          {renderSentenceWithFieldAndValue({\n            field: translate(\n              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_version'\n            ),\n            value: '11'\n          })}\n          {' ' /* explicit space between the two strings */}\n          {translate(\n            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.or_higher'\n          )}\n        </li>\n        <li>\n          {renderSentenceWithFieldAndValue({\n            field: translate(\n              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_architecture'\n            ),\n            value: 'x64'\n          })}\n        </li>\n        <li>\n          {renderSentenceWithFieldAndValue({\n            field: translate(\n              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_source'\n            ),\n            value: translate(\n              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.pre-installed'\n            )\n          })}\n        </li>\n      </ul>\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\nimport { BuildTools } from '../../types';\nimport JavaToolInstallation from '../JavaToolInstallation';\nimport AlertClassicEditor from './AlertClassicEditor';\nimport PrepareAnalysisCommand, { PrepareType } from './PrepareAnalysisCommand';\nimport PublishSteps from './PublishSteps';\n\nexport interface JavaGradleProps {\n  projectKey: string;\n}\n\nexport default function JavaGradle(props: JavaGradleProps) {\n  const { projectKey } = props;\n\n  return (\n    <>\n      <AlertClassicEditor />\n      <ol className=\"list-styled big-spacer-top\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare\"\n            highlightKeys={['pipeline', 'task', 'before']}\n          />\n        </li>\n        <PrepareAnalysisCommand\n          buildTool={BuildTools.Gradle}\n          kind={PrepareType.JavaMavenGradle}\n          projectKey={projectKey}\n        />\n\n        <JavaToolInstallation />\n\n        <li>\n          {translateWithParameters(\n            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java',\n            translate('onboarding.build', BuildTools.Gradle)\n          )}\n        </li>\n        <ul className=\"list-styled big-spacer-bottom\">\n          <li>\n            <SentenceWithHighlights\n              translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java.settings\"\n              highlightKeys={['section', 'option']}\n            />\n          </li>\n        </ul>\n\n        <PublishSteps />\n      </ol>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\nimport { BuildTools } from '../../types';\nimport JavaToolInstallation from '../JavaToolInstallation';\nimport AlertClassicEditor from './AlertClassicEditor';\nimport PrepareAnalysisCommand, { PrepareType } from './PrepareAnalysisCommand';\nimport PublishSteps from './PublishSteps';\n\nexport interface JavaMavenProps {\n  projectKey: string;\n}\n\nexport default function JavaMaven(props: JavaMavenProps) {\n  const { projectKey } = props;\n  return (\n    <>\n      <AlertClassicEditor />\n      <ol className=\"list-styled big-spacer-top\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare\"\n            highlightKeys={['pipeline', 'task', 'before']}\n          />\n        </li>\n        <PrepareAnalysisCommand\n          buildTool={BuildTools.Gradle}\n          kind={PrepareType.JavaMavenGradle}\n          projectKey={projectKey}\n        />\n\n        <JavaToolInstallation />\n\n        <li>\n          {translateWithParameters(\n            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java',\n            translate('onboarding.build', BuildTools.Maven)\n          )}\n        </li>\n        <ul className=\"list-styled big-spacer-bottom\">\n          <li>\n            <SentenceWithHighlights\n              translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java.settings\"\n              highlightKeys={['section', 'option']}\n            />\n          </li>\n        </ul>\n\n        <PublishSteps />\n      </ol>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\nimport { BuildTools } from '../../types';\nimport AlertClassicEditor from './AlertClassicEditor';\nimport PrepareAnalysisCommand, { PrepareType } from './PrepareAnalysisCommand';\nimport PublishSteps from './PublishSteps';\n\nexport interface OtherProps {\n  projectKey: string;\n}\n\nexport default function Other(props: OtherProps) {\n  const { projectKey } = props;\n  return (\n    <>\n      <AlertClassicEditor />\n      <ol className=\"list-styled big-spacer-top\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare\"\n            highlightKeys={['pipeline', 'task', 'before']}\n          />\n        </li>\n        <PrepareAnalysisCommand\n          buildTool={BuildTools.Other}\n          kind={PrepareType.StandAlone}\n          projectKey={projectKey}\n        />\n\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run\"\n            highlightKeys={['task', 'after']}\n          />\n        </li>\n\n        <PublishSteps />\n      </ol>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { BuildTools } from '../../types';\nimport ClangGCC from './ClangGCC';\nimport DotNet from './DotNet';\nimport JavaGradle from './JavaGradle';\nimport JavaMaven from './JavaMaven';\nimport Other from './Other';\n\nexport interface AnalysisCommandProps {\n  projectKey: string;\n  buildTool?: BuildTools;\n  onStepValidationChange: (isValid: boolean) => void;\n}\n\nexport default function AnalysisCommand(props: AnalysisCommandProps) {\n  const { buildTool, projectKey } = props;\n\n  React.useEffect(() => {\n    if (buildTool && buildTool !== BuildTools.CFamily) {\n      props.onStepValidationChange(true);\n    }\n  }, [buildTool, props.onStepValidationChange]);\n\n  if (!buildTool) {\n    return null;\n  }\n  switch (buildTool) {\n    case BuildTools.Maven:\n      return <JavaMaven projectKey={projectKey} />;\n\n    case BuildTools.Gradle:\n      return <JavaGradle projectKey={projectKey} />;\n\n    case BuildTools.DotNet:\n      return <DotNet projectKey={projectKey} />;\n\n    case BuildTools.CFamily:\n      return (\n        <ClangGCC onStepValidationChange={props.onStepValidationChange} projectKey={projectKey} />\n      );\n\n    case BuildTools.Other:\n      return <Other projectKey={projectKey} />;\n\n    default:\n      return null;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { translate } from '../../../helpers/l10n';\nimport { getLanguages, Store } from '../../../store/rootReducer';\nimport RenderOptions from '../components/RenderOptions';\nimport { BuildTools } from '../types';\nimport AnalysisCommand from './commands/AnalysisCommand';\n\nexport interface BranchesAnalysisStepProps {\n  languages: T.Languages;\n  component: T.Component;\n  onStepValidationChange: (isValid: boolean) => void;\n}\n\nconst BUILD_TOOLS_ORDERED: Array<BuildTools> = [\n  BuildTools.DotNet,\n  BuildTools.Maven,\n  BuildTools.Gradle,\n  BuildTools.CFamily,\n  BuildTools.Other\n];\n\nexport function BranchAnalysisStepContent(props: BranchesAnalysisStepProps) {\n  const { component, onStepValidationChange, languages } = props;\n\n  const [buildTechnology, setBuildTechnology] = React.useState<BuildTools | undefined>();\n  const buildToolsList = languages['c']\n    ? BUILD_TOOLS_ORDERED\n    : BUILD_TOOLS_ORDERED.filter(t => t !== BuildTools.CFamily);\n  return (\n    <>\n      <span>{translate('onboarding.build')}</span>\n      <RenderOptions\n        checked={buildTechnology}\n        name=\"buildTechnology\"\n        onCheck={value => setBuildTechnology(value as BuildTools)}\n        optionLabelKey=\"onboarding.build\"\n        options={buildToolsList}\n      />\n      <AnalysisCommand\n        onStepValidationChange={onStepValidationChange}\n        buildTool={buildTechnology}\n        projectKey={component.key}\n      />\n    </>\n  );\n}\n\nconst mapStateToProps = (state: Store) => ({\n  languages: getLanguages(state)\n});\n\nexport default connect(mapStateToProps)(BranchAnalysisStepContent);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function ExtensionInstallationStepContent() {\n  return (\n    <span>\n      <FormattedMessage\n        defaultMessage={translate(\n          'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence'\n        )}\n        id=\"onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence\"\n        values={{\n          link: (\n            <a\n              href=\"https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube\"\n              rel=\"noopener noreferrer\"\n              target=\"_blank\">\n              {translate(\n                'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.link'\n              )}\n            </a>\n          ),\n          button: (\n            <strong>\n              {translate(\n                'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.button'\n              )}\n            </strong>\n          )\n        }}\n      />\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { convertGithubApiUrlToLink, stripTrailingSlash } from '../../helpers/urls';\nimport { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../types/alm-settings';\n\nexport function quote(os: string): (s: string) => string {\n  return os === 'win' ? (s: string) => `\"${s}\"` : (s: string) => s;\n}\n\nexport function buildGradleSnippet(key: string) {\n  return `plugins {\n  id \"org.sonarqube\" version \"3.3\"\n}\n\nsonarqube {\n  properties {\n    property \"sonar.projectKey\", \"${key}\"\n  }\n}`;\n}\n\nexport function getUniqueTokenName(tokens: T.UserToken[], initialTokenName = '') {\n  const hasToken = (name: string) => tokens.find(token => token.name === name) !== undefined;\n\n  if (!hasToken(initialTokenName)) {\n    return initialTokenName;\n  }\n\n  let i = 1;\n  while (hasToken(`${initialTokenName} ${i}`)) {\n    i++;\n  }\n  return `${initialTokenName} ${i}`;\n}\n\nexport function buildGithubLink(\n  almBinding: AlmSettingsInstance,\n  projectBinding: ProjectAlmBindingResponse\n) {\n  if (almBinding.url === undefined) {\n    return null;\n  }\n\n  // strip the api path:\n  const urlRoot = convertGithubApiUrlToLink(almBinding.url);\n\n  return `${stripTrailingSlash(urlRoot)}/${projectBinding.repository}`;\n}\n\nexport function buildBitbucketCloudLink(\n  almBinding: AlmSettingsInstance,\n  projectBinding: ProjectAlmBindingResponse\n) {\n  if (almBinding.url === undefined || projectBinding.repository === undefined) {\n    return null;\n  }\n\n  return `${stripTrailingSlash(almBinding.url)}/${projectBinding.repository}`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { generateToken, getTokens, revokeToken } from '../../../api/user-tokens';\nimport { Button, DeleteButton } from '../../../components/controls/buttons';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getUniqueTokenName } from '../utils';\n\ninterface State {\n  loading: boolean;\n  token?: string;\n  tokenName: string;\n}\n\ninterface Props {\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  onClose: (token?: string) => void;\n}\n\nexport default class EditTokenModal extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    loading: true,\n    tokenName: ''\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.getTokensAndName();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  getTokensAndName = async () => {\n    const { component, currentUser } = this.props;\n\n    const tokens = await getTokens(currentUser.login);\n\n    if (this.mounted) {\n      this.setState({\n        loading: false,\n        tokenName: getUniqueTokenName(tokens, `Analyze \"${component.name}\"`)\n      });\n    }\n  };\n\n  getNewToken = async () => {\n    const { tokenName } = this.state;\n\n    const { token } = await generateToken({ name: tokenName });\n\n    if (this.mounted) {\n      this.setState({\n        token,\n        tokenName\n      });\n    }\n  };\n\n  handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({\n      tokenName: event.target.value\n    });\n  };\n\n  handleTokenRevoke = async () => {\n    const { tokenName } = this.state;\n\n    if (tokenName) {\n      await revokeToken({ name: tokenName });\n\n      if (this.mounted) {\n        this.setState({\n          token: '',\n          tokenName: ''\n        });\n      }\n    }\n  };\n\n  render() {\n    const { loading, token, tokenName } = this.state;\n\n    const header = translate('onboarding.token.generate_token');\n\n    return (\n      <SimpleModal header={header} onClose={this.props.onClose} onSubmit={this.props.onClose}>\n        {({ onCloseClick }) => (\n          <>\n            <div className=\"modal-head\">\n              <h2>{header}</h2>\n            </div>\n\n            <div className=\"modal-body\">\n              <p className=\"spacer-bottom\">\n                <FormattedMessage\n                  defaultMessage={translate('onboarding.token.text')}\n                  id=\"onboarding.token.text\"\n                  values={{\n                    link: (\n                      <Link target=\"_blank\" to=\"/account/security\">\n                        {translate('onboarding.token.text.user_account')}\n                      </Link>\n                    )\n                  }}\n                />\n              </p>\n\n              {token ? (\n                <>\n                  <span className=\"text-middle\">\n                    {tokenName}\n                    {': '}\n                  </span>\n                  <div className=\"display-float-center\">\n                    <code className=\"rule spacer-right\">{token}</code>\n\n                    <ClipboardIconButton copyValue={token} />\n\n                    <DeleteButton onClick={this.handleTokenRevoke} />\n                  </div>\n\n                  <Alert className=\"big-spacer-top\" variant=\"warning\">\n                    {translateWithParameters('users.tokens.new_token_created', token)}\n                  </Alert>\n                </>\n              ) : (\n                <div className=\"big-spacer-top\">\n                  {loading ? (\n                    <DeferredSpinner />\n                  ) : (\n                    <>\n                      <input\n                        className=\"input-super-large spacer-right text-middle\"\n                        onChange={this.handleChange}\n                        placeholder={translate('onboarding.token.generate_token.placeholder')}\n                        required={true}\n                        type=\"text\"\n                        value={tokenName}\n                      />\n                      <Button\n                        className=\"text-middle\"\n                        disabled={!tokenName}\n                        onClick={this.getNewToken}>\n                        {translate('onboarding.token.generate')}\n                      </Button>\n                    </>\n                  )}\n                </div>\n              )}\n            </div>\n            <div className=\"modal-foot\">\n              <Button onClick={onCloseClick}>{translate('continue')}</Button>\n            </div>\n          </>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Button } from '../../../components/controls/buttons';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\nimport EditTokenModal from '../components/EditTokenModal';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\n\nexport interface ServiceEndpointStepProps {\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n}\n\nexport default function ServiceEndpointStepContent(props: ServiceEndpointStepProps) {\n  const { baseUrl, component, currentUser } = props;\n\n  const [isModalVisible, toggleModal] = React.useState(false);\n\n  return (\n    <>\n      <ol className=\"list-styled\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step1\"\n            highlightKeys={['menu']}\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step2\"\n            highlightKeys={['type']}\n          />\n        </li>\n        <li>\n          {translate('onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step3.sentence')}\n        </li>\n        <li>\n          <FormattedMessage\n            defaultMessage={translate(\n              'onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step4.sentence'\n            )}\n            id=\"onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step4.sentence\"\n            values={{\n              url: <code className=\"rule\">{baseUrl}</code>,\n              button: <ClipboardIconButton copyValue={baseUrl} />\n            }}\n          />\n        </li>\n        <li>\n          <span>\n            {translate('onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step5.sentence')}:\n          </span>\n          <Button className=\"spacer-left\" onClick={() => toggleModal(true)}>\n            {translate('onboarding.token.generate_token')}\n          </Button>\n        </li>\n        <li>\n          {translate('onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step6.sentence')}\n        </li>\n      </ol>\n\n      {isModalVisible && (\n        <EditTokenModal\n          component={component}\n          currentUser={currentUser}\n          onClose={() => toggleModal(false)}\n        />\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport AllSetStep from '../components/AllSetStep';\nimport FinishButton from '../components/FinishButton';\nimport Step from '../components/Step';\nimport BranchAnalysisStepContent from './BranchAnalysisStepContent';\nimport ExtensionInstallationStepContent from './ExtensionInstallationStepContent';\nimport ServiceEndpointStepContent from './ServiceEndpointStepContent';\n\nexport interface AzurePipelinesTutorialProps {\n  alm?: AlmKeys;\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  willRefreshAutomatically?: boolean;\n}\n\nexport enum Steps {\n  ExtensionInstallation,\n  ServiceEndpoint,\n  BranchAnalysis,\n  AllSet\n}\n\ninterface Step {\n  step: Steps;\n  content: JSX.Element;\n  checkValidity?: boolean;\n}\n\nexport default function AzurePipelinesTutorial(props: AzurePipelinesTutorialProps) {\n  const { alm, baseUrl, component, currentUser, willRefreshAutomatically } = props;\n\n  const [currentStep, setCurrentStep] = React.useState(Steps.ExtensionInstallation);\n  const [isCurrentStepValid, setIsCurrentStepValid] = React.useState(false);\n\n  const steps: Array<Step> = [\n    { step: Steps.ExtensionInstallation, content: <ExtensionInstallationStepContent /> },\n    {\n      step: Steps.ServiceEndpoint,\n      content: (\n        <ServiceEndpointStepContent\n          baseUrl={baseUrl}\n          component={component}\n          currentUser={currentUser}\n        />\n      )\n    },\n    {\n      step: Steps.BranchAnalysis,\n      content: (\n        <BranchAnalysisStepContent\n          component={component}\n          onStepValidationChange={isValid => setIsCurrentStepValid(isValid)}\n        />\n      ),\n      checkValidity: true\n    }\n  ];\n\n  const switchCurrentStep = (step: Steps) => {\n    setCurrentStep(step);\n    setIsCurrentStepValid(false);\n  };\n\n  const canContinue = (step: Step) => !step.checkValidity || isCurrentStepValid;\n\n  return (\n    <>\n      <div className=\"page-header big-spacer-bottom\">\n        <h1 className=\"page-title\">\n          {translate('onboarding.tutorial.with.azure_pipelines.title')}\n        </h1>\n      </div>\n\n      {steps.map((step, i) => (\n        <Step\n          key={step.step}\n          stepNumber={i + 1}\n          stepTitle={translate(\n            `onboarding.tutorial.with.azure_pipelines.${Steps[step.step]}.title`\n          )}\n          open={step.step === currentStep}\n          finished={step.step < currentStep}\n          onOpen={() => switchCurrentStep(step.step)}\n          renderForm={() => (\n            <div className=\"boxed-group-inner\">\n              <div>{step.content}</div>\n              {canContinue(step) &&\n                (step.step === Steps.BranchAnalysis ? (\n                  <FinishButton onClick={() => switchCurrentStep(step.step + 1)} />\n                ) : (\n                  <Button\n                    className=\"big-spacer-top spacer-bottom\"\n                    onClick={() => switchCurrentStep(step.step + 1)}>\n                    {translate('continue')}\n                  </Button>\n                ))}\n            </div>\n          )}\n        />\n      ))}\n      <AllSetStep\n        alm={alm || AlmKeys.Azure}\n        stepNumber={4}\n        open={currentStep === Steps.AllSet}\n        willRefreshAutomatically={willRefreshAutomatically}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getLanguages, Store } from '../../store/rootReducer';\nimport { getWrappedDisplayName } from './utils';\n\nexport function withCLanguageFeature<P>(\n  WrappedComponent: React.ComponentType<P & { hasCLanguageFeature: boolean }>\n) {\n  class Wrapper extends React.Component<P & { hasCLanguageFeature: boolean }> {\n    static displayName = getWrappedDisplayName(WrappedComponent, 'withCLanguageFeature');\n\n    render() {\n      return <WrappedComponent {...this.props} />;\n    }\n  }\n\n  function mapStateToProps(state: Store) {\n    const languages = getLanguages(state);\n    const hasCLanguageFeature = languages['c'] !== undefined;\n\n    return { hasCLanguageFeature };\n  }\n\n  return connect(mapStateToProps)(Wrapper);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { withCLanguageFeature } from '../../hoc/withCLanguageFeature';\nimport RenderOptions from '../components/RenderOptions';\nimport { BuildTools } from '../types';\n\nexport interface YamlFileStepProps {\n  children?: (buildTool: BuildTools) => React.ReactElement<{}>;\n  hasCLanguageFeature: boolean;\n}\n\nexport function YamlFileStep(props: YamlFileStepProps) {\n  const { children, hasCLanguageFeature } = props;\n\n  const buildTools = [BuildTools.Maven, BuildTools.Gradle, BuildTools.DotNet];\n  if (hasCLanguageFeature) {\n    buildTools.push(BuildTools.CFamily);\n  }\n  buildTools.push(BuildTools.Other);\n\n  const [buildToolSelected, setBuildToolSelected] = React.useState<BuildTools>();\n\n  return (\n    <ol className=\"list-styled big-spacer-top big-spacer-bottom\">\n      <li className=\"abs-width-600\">\n        {translate('onboarding.build')}\n        <RenderOptions\n          checked={buildToolSelected}\n          name=\"language\"\n          onCheck={value => setBuildToolSelected(value as BuildTools)}\n          options={buildTools}\n          optionLabelKey=\"onboarding.build\"\n        />\n      </li>\n      {children && buildToolSelected && children(buildToolSelected)}\n    </ol>\n  );\n}\n\nexport default withCLanguageFeature(YamlFileStep);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\nimport CodeSnippet from '../../common/CodeSnippet';\n\nexport interface CreateYmlFileProps {\n  yamlFileName: string;\n  yamlTemplate: string;\n}\n\nexport default function CreateYmlFile(props: CreateYmlFileProps) {\n  const { yamlTemplate, yamlFileName } = props;\n  return (\n    <li className=\"abs-width-800\">\n      <FormattedMessage\n        defaultMessage={translate('onboarding.tutorial.with.github_action.yaml.create_yml')}\n        id=\"onboarding.tutorial.with.github_action.yaml.create_yml\"\n        values={{\n          file: (\n            <>\n              <code className=\"rule\">{yamlFileName}</code>\n              <ClipboardIconButton copyValue={yamlFileName} />\n            </>\n          )\n        }}\n      />\n      <CodeSnippet snippet={yamlTemplate} />\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nexport default function cFamilyExample(branchesEnabled: boolean) {\n  return `image: <image ready for your build toolchain>\n\nclone:\n  depth: full\n\npipelines:\n  branches:\n    '{master}': # or the name of your main branch\n      - step:\n          name: Download and install the build wrapper, build the project\n          script:\n            - mkdir $HOME/.sonar\n            - curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \\${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip\n            - unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/\n            - $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>\n            - pipe: sonarsource/sonarqube-scan:1.0.0\n              variables:\n                EXTRA_ARGS: -Dsonar.cfamily.build-wrapper-output=bw-output\n                SONAR_HOST_URL: \\${SONAR_HOST_URL}\n                SONAR_TOKEN: \\${SONAR_TOKEN}\n${\n  branchesEnabled\n    ? `\n  pull-requests:\n    '**':\n      - step:\n          name: Download and install the build wrapper, build the project\n          script:\n            - mkdir $HOME/.sonar\n            - curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \\${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip\n            - unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/\n            - $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>\n            - pipe: sonarsource/sonarqube-scan:1.0.0\n              variables:\n                EXTRA_ARGS: -Dsonar.cfamily.build-wrapper-output=bw-output\n                SONAR_HOST_URL: \\${SONAR_HOST_URL}\n                SONAR_TOKEN: \\${SONAR_TOKEN}`\n    : ''\n}\ndefinitions:\n  caches:\n    sonar: ~/.sonar`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nexport default function dotNetExample(branchesEnabled: boolean, projectKey: string) {\n  return `image: mcr.microsoft.com/dotnet/core/sdk:latest\n   \npipelines:\n  branches:\n    '{master}': # or the name of your main branch\n      - step:\n          name: SonarQube analysis\n          caches:\n            - dotnetcore\n            - sonar\n          script:\n            - apt-get update\n            - apt-get install --yes openjdk-11-jre\n            - dotnet tool install --global dotnet-sonarscanner\n            - export PATH=\"$PATH:/root/.dotnet/tools\"\n            - dotnet sonarscanner begin /k:\"${projectKey}\" /d:\"sonar.login=\\${SONAR_TOKEN}\"  /d:\"sonar.host.url=\\${SONAR_HOST_URL}\"\n            - dotnet build \n            - dotnet sonarscanner end /d:\"sonar.login=\\${SONAR_TOKEN}\"\n            ${\n              branchesEnabled\n                ? `\n  pull-requests:\n    '**':\n      - step:\n          name: SonarQube analysis\n          caches:\n            - dotnetcore\n            - sonar\n          script:\n            - apt-get update\n            - apt-get install --yes openjdk-11-jre\n            - dotnet tool install --global dotnet-sonarscanner\n            - export PATH=\"$PATH:/root/.dotnet/tools\"\n            - dotnet sonarscanner begin /k:\"${projectKey}\" /d:\"sonar.login=\\${SONAR_TOKEN}\"  /d:\"sonar.host.url=\\${SONAR_HOST_URL}\"\n            - dotnet build \n            - dotnet sonarscanner end /d:\"sonar.login=\\${SONAR_TOKEN}\"\n                `\n                : ''\n            }  \ndefinitions:\n  caches:\n    sonar: ~/.sonar`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nexport default function gradleExample(branchesEnabled: boolean) {\n  return `image: openjdk:8\n\nclone:\n  depth: full\n  \npipelines:\n  branches:\n    '{master}': # or the name of your main branch\n      - step:\n          name: SonarQube analysis\n          caches:\n            - gradle\n            - sonar\n          script:\n            - bash ./gradlew sonarqube\n${\n  branchesEnabled\n    ? `\n  pull-requests:\n    '**':\n      - step:\n          name: SonarQube analysis\n          caches:\n            - gradle\n            - sonar\n          script:\n            - bash ./gradlew sonarqube\n`\n    : ''\n}\ndefinitions:\n  caches:\n    sonar: ~/.sonar`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nexport default function mavenExample(branchesEnabled: boolean, projectKey: string) {\n  return `image: maven:3-openjdk-11\n\nclone:\n  depth: full\n  \npipelines:\n  branches:\n    '{master}': # or the name of your main branch\n      - step:\n          name: SonarQube analysis\n          caches:\n            - maven\n            - sonar\n          script:\n            - mvn verify sonar:sonar -Dsonar.projectKey=${projectKey}\n${\n  branchesEnabled\n    ? `\n  pull-requests:\n    '**':\n      - step:\n          name: SonarQube analysis\n          caches:\n            - maven\n            - sonar\n          script:\n            - mvn verify sonar:sonar -Dsonar.projectKey=${projectKey}\n`\n    : ''\n}  \ndefinitions:\n  caches:\n    sonar: ~/.sonar`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nexport default function othersExample(branchesEnabled: boolean) {\n  return `image: maven:3.3.9\n\nclone:\n  depth: full\n\npipelines:\n  branches:\n    '{master}': # or the name of your main branch\n      - step:\n          name: SonarQube analysis\n          script:\n            - pipe: sonarsource/sonarqube-scan:1.0.0\n              variables:\n                SONAR_HOST_URL: \\${SONAR_HOST_URL} # Get the value from the repository/workspace variable.\n                SONAR_TOKEN: \\${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here.\n${\n  branchesEnabled\n    ? `\n  pull-requests:\n    '**':\n      - step:\n          name: SonarQube analysis\n          script:\n            - pipe: sonarsource/sonarqube-scan:1.0.0\n              variables:\n                SONAR_HOST_URL: \\${SONAR_HOST_URL} # Get the value from the repository/workspace variable.\n                SONAR_TOKEN: \\${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here.\n`\n    : ''\n}  \ndefinitions:\n  caches:\n    sonar: ~/.sonar`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface SentenceWithFilenameProps {\n  filename: string;\n  translationKey: string;\n}\n\nexport default function SentenceWithFilename({\n  filename,\n  translationKey\n}: SentenceWithFilenameProps) {\n  return (\n    <span className=\"markdown\">\n      <FormattedMessage\n        defaultMessage={translate(translationKey, 'sentence')}\n        id={`${translationKey}.sentence`}\n        values={{\n          file: <code>{filename}</code>\n        }}\n      />\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CodeSnippet from '../../common/CodeSnippet';\nimport SentenceWithFilename from './SentenceWithFilename';\n\nexport interface DefaultProjectKeyProps {\n  component: T.Component;\n}\n\nconst sonarProjectSnippet = (key: string) => `sonar.projectKey=${key}`;\n\nexport default function DefaultProjectKey(props: DefaultProjectKeyProps) {\n  const { component } = props;\n  return (\n    <li className=\"abs-width-600\">\n      <SentenceWithFilename\n        filename=\"sonar-project.properties\"\n        translationKey=\"onboarding.tutorial.other.project_key\"\n      />\n      <CodeSnippet snippet={sonarProjectSnippet(component.key)} />\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\nimport CodeSnippet from '../../common/CodeSnippet';\nimport DefaultProjectKey from '../components/DefaultProjectKey';\nimport { BuildTools } from '../types';\nimport { buildGradleSnippet } from '../utils';\n\nexport interface PreambuleYamlProps {\n  buildTool: BuildTools;\n  component: T.Component;\n}\n\nexport function PreambuleYaml(props: PreambuleYamlProps) {\n  const { buildTool, component } = props;\n  switch (buildTool) {\n    case BuildTools.Gradle:\n      return (\n        <li className=\"abs-width-600\">\n          <FormattedMessage\n            defaultMessage={translate('onboarding.tutorial.with.yaml.gradle')}\n            id=\"onboarding.tutorial.with.yaml.gradle\"\n            values={{\n              gradle: (\n                <>\n                  <code className=\"rule\">build.gradle</code>\n                  <ClipboardIconButton copyValue=\"build.gradle\" />\n                </>\n              ),\n              sq: <code className=\"rule\">org.sonarqube</code>\n            }}\n          />\n          <CodeSnippet snippet={buildGradleSnippet(component.key)} />\n        </li>\n      );\n    case BuildTools.CFamily:\n    case BuildTools.Other:\n      return <DefaultProjectKey component={component} />;\n    default:\n      return null;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Dictionary } from 'lodash';\nimport * as React from 'react';\nimport { withAppState } from '../../hoc/withAppState';\nimport { CompilationInfo } from '../components/CompilationInfo';\nimport CreateYmlFile from '../components/CreateYmlFile';\nimport { BuildTools } from '../types';\nimport cFamilyExample from './commands/CFamily';\nimport dotNetExample from './commands/DotNet';\nimport gradleExample from './commands/Gradle';\nimport mavenExample from './commands/Maven';\nimport othersExample from './commands/Others';\nimport { PreambuleYaml } from './PreambuleYaml';\n\nexport interface AnalysisCommandProps {\n  appState: T.AppState;\n  buildTool: BuildTools;\n  component: T.Component;\n}\n\nconst YamlTemplate: Dictionary<(branchesEnabled?: boolean, projectKey?: string) => string> = {\n  [BuildTools.Gradle]: gradleExample,\n  [BuildTools.Maven]: mavenExample,\n  [BuildTools.DotNet]: dotNetExample,\n  [BuildTools.CFamily]: cFamilyExample,\n  [BuildTools.Other]: othersExample\n};\n\nexport function AnalysisCommand(props: AnalysisCommandProps) {\n  const {\n    buildTool,\n    component,\n    appState: { branchesEnabled }\n  } = props;\n\n  if (!buildTool) {\n    return null;\n  }\n\n  const yamlTemplate = YamlTemplate[buildTool](branchesEnabled, component.key);\n\n  return (\n    <>\n      <PreambuleYaml buildTool={buildTool} component={component} />\n      <CreateYmlFile yamlFileName=\"bitbucket-pipelines.yml\" yamlTemplate={yamlTemplate} />\n      {buildTool === BuildTools.CFamily && <CompilationInfo className=\"abs-width-800\" />}\n    </>\n  );\n}\n\nexport default withAppState(AnalysisCommand);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport EditTokenModal from './EditTokenModal';\n\nexport interface TokenStepGeneratorProps {\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n}\n\nexport default function TokenStepGenerator(props: TokenStepGeneratorProps) {\n  const { component, currentUser } = props;\n  const [isModalVisible, toggleModal] = React.useState(false);\n\n  const toggleTokenModal = () => toggleModal(visible => !visible);\n  const closeTokenModal = () => toggleModal(false);\n\n  return (\n    <>\n      <li className=\"big-spacer-bottom\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.tutorial.env_variables')}\n          id=\"onboarding.tutorial.env_variables\"\n          values={{\n            extra: (\n              <Button className=\"spacer-left\" onClick={toggleTokenModal}>\n                {translate('onboarding.token.generate_token')}\n              </Button>\n            ),\n            field: <strong>{translate('onboarding.tutorial.env_variables.field')}</strong>,\n            value: translate('onboarding.tutorial.env_variables.token_generator.value')\n          }}\n        />\n      </li>\n      {isModalVisible && (\n        <EditTokenModal component={component} currentUser={currentUser} onClose={closeTokenModal} />\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Button } from '../../../components/controls/buttons';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\nimport TokenStepGenerator from '../components/TokenStepGenerator';\nimport { buildBitbucketCloudLink } from '../utils';\n\nexport interface RepositoryVariablesProps {\n  almBinding?: AlmSettingsInstance;\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  onDone: () => void;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nexport default function RepositoryVariables(props: RepositoryVariablesProps) {\n  const { almBinding, baseUrl, component, currentUser, projectBinding } = props;\n  return (\n    <div className=\"boxed-group-inner\">\n      <p className=\"big-spacer-bottom\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.tutorial.with.bitbucket_pipelines.variables.intro')}\n          id=\"onboarding.tutorial.with.bitbucket_pipelines.variables.intro\"\n          values={{\n            repository_variables:\n              almBinding?.url && projectBinding?.repository ? (\n                <a\n                  href={`${buildBitbucketCloudLink(\n                    almBinding,\n                    projectBinding\n                  )}/admin/addon/admin/pipelines/repository-variables`}\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\">\n                  {translate('onboarding.tutorial.with.bitbucket_pipelines.variables.intro.link')}\n                </a>\n              ) : (\n                <strong>\n                  {translate('onboarding.tutorial.with.bitbucket_pipelines.variables.intro.link')}\n                </strong>\n              )\n          }}\n        />\n      </p>\n      <ol className=\"list-styled\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.bitbucket_pipelines.variables.name\"\n            highlightKeys={['name']}\n          />\n          <code className=\"rule little-spacer-left\">SONAR_TOKEN</code>\n          <ClipboardIconButton copyValue=\"SONAR_TOKEN\" />\n        </li>\n        <TokenStepGenerator component={component} currentUser={currentUser} />\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.bitbucket_pipelines.variables.secured\"\n            highlightKeys={['secured']}\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.bitbucket_pipelines.variables.add\"\n            highlightKeys={['add']}\n          />\n        </li>\n      </ol>\n\n      <hr className=\"no-horizontal-margins\" />\n\n      <ol className=\"list-styled big-spacer-top big-spacer-bottom\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.bitbucket_pipelines.variables.name\"\n            highlightKeys={['name']}\n          />\n\n          <code className=\"rule little-spacer-left\">SONAR_HOST_URL</code>\n          <ClipboardIconButton copyValue=\"SONAR_HOST_URL\" />\n        </li>\n        <li className=\"big-spacer-bottom\">\n          <FormattedMessage\n            defaultMessage={translate('onboarding.tutorial.env_variables')}\n            id=\"onboarding.tutorial.env_variables\"\n            values={{\n              extra: <ClipboardIconButton copyValue={baseUrl} />,\n              field: <strong>{translate('onboarding.tutorial.env_variables.field')}</strong>,\n              value: <code className=\"rule\">{baseUrl}</code>\n            }}\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.bitbucket_pipelines.variables.add\"\n            highlightKeys={['add']}\n          />\n        </li>\n      </ol>\n      <Button onClick={props.onDone}>{translate('continue')}</Button>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  AlmKeys,\n  AlmSettingsInstance,\n  ProjectAlmBindingResponse\n} from '../../../types/alm-settings';\nimport AllSetStep from '../components/AllSetStep';\nimport FinishButton from '../components/FinishButton';\nimport GithubCFamilyExampleRepositories from '../components/GithubCFamilyExampleRepositories';\nimport Step from '../components/Step';\nimport YamlFileStep from '../components/YamlFileStep';\nimport { BuildTools, TutorialModes } from '../types';\nimport AnalysisCommand from './AnalysisCommand';\nimport RepositoryVariables from './RepositoryVariables';\n\nexport enum Steps {\n  REPOSITORY_VARIABLES = 1,\n  YAML = 2,\n  ALL_SET = 3\n}\n\nexport interface BitbucketPipelinesTutorialProps {\n  almBinding?: AlmSettingsInstance;\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  projectBinding?: ProjectAlmBindingResponse;\n  willRefreshAutomatically?: boolean;\n}\n\nexport default function BitbucketPipelinesTutorial(props: BitbucketPipelinesTutorialProps) {\n  const {\n    almBinding,\n    baseUrl,\n    currentUser,\n    component,\n    projectBinding,\n    willRefreshAutomatically\n  } = props;\n\n  const [step, setStep] = React.useState<Steps>(Steps.REPOSITORY_VARIABLES);\n  return (\n    <>\n      <Step\n        finished={step > Steps.REPOSITORY_VARIABLES}\n        onOpen={() => setStep(Steps.REPOSITORY_VARIABLES)}\n        open={step === Steps.REPOSITORY_VARIABLES}\n        renderForm={() => (\n          <RepositoryVariables\n            almBinding={almBinding}\n            baseUrl={baseUrl}\n            component={component}\n            currentUser={currentUser}\n            onDone={() => setStep(Steps.YAML)}\n            projectBinding={projectBinding}\n          />\n        )}\n        stepNumber={Steps.REPOSITORY_VARIABLES}\n        stepTitle={translate('onboarding.tutorial.with.bitbucket_pipelines.create_secret.title')}\n      />\n      <Step\n        finished={step > Steps.YAML}\n        onOpen={() => setStep(Steps.YAML)}\n        open={step === Steps.YAML}\n        renderForm={() => (\n          <YamlFileStep>\n            {buildTool => (\n              <>\n                {buildTool === BuildTools.CFamily && (\n                  <GithubCFamilyExampleRepositories\n                    className=\"big-spacer-top\"\n                    ci={TutorialModes.BitbucketPipelines}\n                  />\n                )}\n                <AnalysisCommand buildTool={buildTool} component={component} />\n                <FinishButton onClick={() => setStep(Steps.ALL_SET)} />\n              </>\n            )}\n          </YamlFileStep>\n        )}\n        stepNumber={Steps.YAML}\n        stepTitle={translate('onboarding.tutorial.with.bitbucket_pipelines.yaml.title')}\n      />\n      <AllSetStep\n        alm={almBinding?.alm || AlmKeys.BitbucketCloud}\n        open={step === Steps.ALL_SET}\n        stepNumber={Steps.ALL_SET}\n        willRefreshAutomatically={willRefreshAutomatically}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\nimport { CompilationInfo } from '../../components/CompilationInfo';\nimport CreateYmlFile from '../../components/CreateYmlFile';\nimport DefaultProjectKey from '../../components/DefaultProjectKey';\nimport FinishButton from '../../components/FinishButton';\nimport GithubCFamilyExampleRepositories from '../../components/GithubCFamilyExampleRepositories';\nimport RenderOptions from '../../components/RenderOptions';\nimport { OSs, TutorialModes } from '../../types';\n\nexport interface CFamilyProps {\n  branchesEnabled?: boolean;\n  component: T.Component;\n  onDone: () => void;\n}\n\nconst STEPS = {\n  [OSs.Linux]: `steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n\n      - name: Download and install the build wrapper, build the project\n        run: |\n          mkdir $HOME/.sonar\n          curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \\${{ secrets.SONAR_HOST_URL }}/static/cpp/build-wrapper-linux-x86.zip\n          unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/\n          $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>\n        env:\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}\n\n      - name: Download and install the SonarScanner\n        env:\n          SONAR_SCANNER_VERSION: 4.6.2.2472\n        run: |\n          curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-\\${{ env.SONAR_SCANNER_VERSION }}-linux.zip\n          unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/\n          echo \"$HOME/.sonar/sonar-scanner-\\${{ env.SONAR_SCANNER_VERSION }}-linux/bin\" >> $GITHUB_PATH\n\n      - name: SonarQube analysis\n        run: |\n          sonar-scanner --define sonar.cfamily.build-wrapper-output=bw-output  \n        env:\n          SONAR_TOKEN: \\${{ secrets.SONAR_TOKEN }}\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}`,\n  [OSs.MacOS]: `steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n\n      - name: Download and install the build wrapper\n        run: |\n          mkdir $HOME/.sonar\n          curl -sSLo $HOME/.sonar/build-wrapper-macosx-x86.zip \\${{ secrets.SONAR_HOST_URL }}/static/cpp/build-wrapper-macosx-x86.zip\n          unzip -o $HOME/.sonar/build-wrapper-macosx-x86.zip -d $HOME/.sonar/\n        env:\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}\n\n      - name: Download and install the SonarScanner\n        run: |\n          curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-macosx.zip\n          unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/\n\n      - name: Build and analyse the project\n        run: |\n          # Potential improvement : add these paths to the PATH env var.\n          $HOME/.sonar/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw-output <your clean build command>\n          $HOME/.sonar/sonar-scanner-4.6.2.2472-macosx/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output\n        env:\n          SONAR_TOKEN: \\${{ secrets.SONAR_TOKEN }}\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}`,\n  [OSs.Windows]: `steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n\n      - name: Download and install the build wrapper\n        shell: powershell\n        run: |\n          $path = \"$HOME/.sonar/build-wrapper-win-x86.zip\"\n          mkdir $HOME/.sonar\n          [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n          (New-Object System.Net.WebClient).DownloadFile(\"\\${{ secrets.SONAR_HOST_URL }}/static/cpp/build-wrapper-win-x86.zip\", $path)\n          Add-Type -AssemblyName System.IO.Compression.FileSystem\n          [System.IO.Compression.ZipFile]::ExtractToDirectory($path, \"$HOME/.sonar\")\n        env:\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}\n\n      - name: Download and install the SonarScanner\n        shell: powershell\n        run: |\n          $path = \"$HOME/.sonar/sonar-scanner-cli-4.6.2.2472-windows.zip\"\n          [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n          (New-Object System.Net.WebClient).DownloadFile(\"https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-windows.zip\", $path)\n          Add-Type -AssemblyName System.IO.Compression.FileSystem\n          [System.IO.Compression.ZipFile]::ExtractToDirectory($path, \"$HOME/.sonar\")\n\n      - name: Build and analyse the project\n        shell: powershell\n        run: |\n          $env:Path += \";$HOME/.sonar/build-wrapper-win-x86;$HOME/.sonar/sonar-scanner-4.6.2.2472-windows/bin\"\n          build-wrapper-win-x86-64 --out-dir bw-output <your clean build command>\n          sonar-scanner.bat \"-Dsonar.cfamily.build-wrapper-output=bw-output\"\n        env:\n          SONAR_TOKEN: \\${{ secrets.SONAR_TOKEN }}\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}`\n};\n\nconst cfamilyYamlTemplate = (branchesEnabled: boolean, os: OSs) => `name: Build\non:\n  push:\n    branches:\n      - master # or the name of your main branch\n${branchesEnabled ? '  pull_request:\\n    types: [opened, synchronize, reopened]' : ''}\n\njobs:\n  build:\n    runs-on: <image ready for your build toolchain>\n    ${STEPS[os]}\n`;\n\nexport default function CFamily(props: CFamilyProps) {\n  const { component, branchesEnabled } = props;\n  const [os, setOs] = React.useState<undefined | OSs>();\n\n  return (\n    <>\n      <DefaultProjectKey component={component} />\n      <li className=\"abs-width-600\">\n        <span>{translate('onboarding.build.other.os')}</span>\n        <RenderOptions\n          checked={os}\n          name=\"os\"\n          onCheck={(value: OSs) => setOs(value)}\n          optionLabelKey=\"onboarding.build.other.os\"\n          options={Object.values(OSs)}\n        />\n        {os && (\n          <GithubCFamilyExampleRepositories\n            className=\"big-spacer-top\"\n            os={os}\n            ci={TutorialModes.GitHubActions}\n          />\n        )}\n      </li>\n      {os && (\n        <>\n          <CreateYmlFile\n            yamlFileName=\".github/workflows/build.yml\"\n            yamlTemplate={cfamilyYamlTemplate(!!branchesEnabled, os)}\n          />\n          <CompilationInfo className=\"abs-width-800\" />\n          <FinishButton onClick={props.onDone} />\n        </>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CreateYmlFile from '../../components/CreateYmlFile';\nimport FinishButton from '../../components/FinishButton';\n\nexport interface DotNetProps {\n  branchesEnabled?: boolean;\n  component: T.Component;\n  onDone: () => void;\n}\n\nconst dotnetYamlTemplate = (projectKey: string, branchesEnabled: boolean) => `name: Build\non:\n  push:\n    branches:\n      - master # or the name of your main branch\n${branchesEnabled ? '  pull_request:\\n    types: [opened, synchronize, reopened]' : ''}\njobs:\n  build:\n    name: Build\n    runs-on: windows-latest\n    steps:\n      - name: Set up JDK 11\n        uses: actions/setup-java@v1\n        with:\n          java-version: 1.11\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis\n      - name: Cache SonarQube packages\n        uses: actions/cache@v1\n        with:\n          path: ~\\\\sonar\\\\cache\n          key: \\${{ runner.os }}-sonar\n          restore-keys: \\${{ runner.os }}-sonar\n      - name: Cache SonarQube scanner\n        id: cache-sonar-scanner\n        uses: actions/cache@v1\n        with:\n          path: .\\\\.sonar\\\\scanner\n          key: \\${{ runner.os }}-sonar-scanner\n          restore-keys: \\${{ runner.os }}-sonar-scanner\n      - name: Install SonarQube scanner\n        if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'\n        shell: powershell\n        run: |\n          New-Item -Path .\\\\.sonar\\\\scanner -ItemType Directory\n          dotnet tool update dotnet-sonarscanner --tool-path .\\\\.sonar\\\\scanner\n      - name: Build and analyze\n        env:\n          GITHUB_TOKEN: \\${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any\n        shell: powershell\n        run: |\n          .\\\\.sonar\\\\scanner\\\\dotnet-sonarscanner begin /k:\"${projectKey}\" /d:sonar.login=\"\\${{ secrets.SONAR_TOKEN }}\" /d:sonar.host.url=\"\\${{ secrets.SONAR_HOST_URL }}\"\n          dotnet build\n          .\\\\.sonar\\\\scanner\\\\dotnet-sonarscanner end /d:sonar.login=\"\\${{ secrets.SONAR_TOKEN }}\"`;\n\nexport default function DotNet(props: DotNetProps) {\n  const { component, branchesEnabled } = props;\n  return (\n    <>\n      <CreateYmlFile\n        yamlFileName=\".github/workflows/build.yml\"\n        yamlTemplate={dotnetYamlTemplate(component.key, !!branchesEnabled)}\n      />\n      <FinishButton onClick={props.onDone} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ClipboardIconButton } from '../../../../components/controls/clipboard';\nimport { translate } from '../../../../helpers/l10n';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport CreateYmlFile from '../../components/CreateYmlFile';\nimport FinishButton from '../../components/FinishButton';\nimport { buildGradleSnippet } from '../../utils';\n\nexport interface GradleProps {\n  branchesEnabled?: boolean;\n  component: T.Component;\n  onDone: () => void;\n}\nconst gradleYamlTemplate = (branchesEnabled: boolean) => `name: Build\non:\n  push:\n    branches:\n      - master # or the name of your main branch\n${branchesEnabled ? '  pull_request:\\n    types: [opened, synchronize, reopened]' : ''}\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis\n      - name: Set up JDK 11\n        uses: actions/setup-java@v1\n        with:\n          java-version: 11\n      - name: Cache SonarQube packages\n        uses: actions/cache@v1\n        with:\n          path: ~/.sonar/cache\n          key: \\${{ runner.os }}-sonar\n          restore-keys: \\${{ runner.os }}-sonar\n      - name: Cache Gradle packages\n        uses: actions/cache@v1\n        with:\n          path: ~/.gradle/caches\n          key: \\${{ runner.os }}-gradle-\\${{ hashFiles('**/*.gradle') }}\n          restore-keys: \\${{ runner.os }}-gradle\n      - name: Build and analyze\n        env:\n          GITHUB_TOKEN: \\${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any\n          SONAR_TOKEN: \\${{ secrets.SONAR_TOKEN }}\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}\n        run: ./gradlew build sonarqube --info`;\n\nexport default function Gradle(props: GradleProps) {\n  const { component, branchesEnabled } = props;\n\n  return (\n    <>\n      <li className=\"abs-width-600\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.tutorial.with.yaml.gradle')}\n          id=\"onboarding.tutorial.with.yaml.gradle\"\n          values={{\n            gradle: (\n              <>\n                <code className=\"rule\">build.gradle</code>\n                <ClipboardIconButton copyValue=\"build.gradle\" />\n              </>\n            ),\n            sq: <code className=\"rule\">org.sonarqube</code>\n          }}\n        />\n        <CodeSnippet snippet={buildGradleSnippet(component.key)} />\n      </li>\n      <CreateYmlFile\n        yamlFileName=\".github/workflows/build.yml\"\n        yamlTemplate={gradleYamlTemplate(!!branchesEnabled)}\n      />\n      <FinishButton onClick={props.onDone} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CreateYmlFile from '../../components/CreateYmlFile';\nimport FinishButton from '../../components/FinishButton';\n\nexport interface JavaMavenProps {\n  branchesEnabled?: boolean;\n  component: T.Component;\n  onDone: () => void;\n}\n\nconst mavenYamlTemplte = (branchesEnabled: boolean, projectKey: string) => `name: Build\non:\n  push:\n    branches:\n      - master # or the name of your main branch\n${branchesEnabled ? '  pull_request:\\n    types: [opened, synchronize, reopened]' : ''}\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis\n      - name: Set up JDK 11\n        uses: actions/setup-java@v1\n        with:\n          java-version: 11\n      - name: Cache SonarQube packages\n        uses: actions/cache@v1\n        with:\n          path: ~/.sonar/cache\n          key: \\${{ runner.os }}-sonar\n          restore-keys: \\${{ runner.os }}-sonar\n      - name: Cache Maven packages\n        uses: actions/cache@v1\n        with:\n          path: ~/.m2\n          key: \\${{ runner.os }}-m2-\\${{ hashFiles('**/pom.xml') }}\n          restore-keys: \\${{ runner.os }}-m2\n      - name: Build and analyze\n        env:\n          GITHUB_TOKEN: \\${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any\n          SONAR_TOKEN: \\${{ secrets.SONAR_TOKEN }}\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}\n        run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=${projectKey}`;\n\nexport default function JavaMaven(props: JavaMavenProps) {\n  const { component, branchesEnabled } = props;\n  return (\n    <>\n      <CreateYmlFile\n        yamlFileName=\".github/workflows/build.yml\"\n        yamlTemplate={mavenYamlTemplte(!!branchesEnabled, component.key)}\n      />\n      <FinishButton onClick={props.onDone} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CreateYmlFile from '../../components/CreateYmlFile';\nimport DefaultProjectKey from '../../components/DefaultProjectKey';\nimport FinishButton from '../../components/FinishButton';\n\nexport interface OthersProps {\n  branchesEnabled?: boolean;\n  component: T.Component;\n  onDone: () => void;\n}\n\nconst yamlTemplate = (branchesEnabled: boolean) => {\n  let output = `name: Build\non:\n  push:\n    branches:\n      - master # or the name of your main branch`;\n\n  if (branchesEnabled) {\n    output += `\n  pull_request:\n    types: [opened, synchronize, reopened]`;\n  }\n\n  output += `\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n      - uses: sonarsource/sonarqube-scan-action@master\n        env:\n          SONAR_TOKEN: \\${{ secrets.SONAR_TOKEN }}\n          SONAR_HOST_URL: \\${{ secrets.SONAR_HOST_URL }}\n      # If you wish to fail your job when the Quality Gate is red, uncomment the\n      # following lines. This would typically be used to fail a deployment.`;\n\n  if (branchesEnabled) {\n    output += `\n      # We do not recommend to use this in a pull request. Prefer using pull request\n      # decoration instead.`;\n  }\n\n  output += `\n      # - uses: sonarsource/sonarqube-quality-gate-action@master\n      #   timeout-minutes: 5\n      #   env:\n      #     SONAR_TOKEN: \\${{ secrets.SONAR_TOKEN }}`;\n\n  return output;\n};\n\nexport default function Others(props: OthersProps) {\n  const { component, branchesEnabled } = props;\n  return (\n    <>\n      <DefaultProjectKey component={component} />\n      <CreateYmlFile\n        yamlFileName=\".github/workflows/build.yml\"\n        yamlTemplate={yamlTemplate(!!branchesEnabled)}\n      />\n      <FinishButton onClick={props.onDone} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { withAppState } from '../../hoc/withAppState';\nimport { BuildTools } from '../types';\nimport CFamily from './commands/CFamily';\nimport DotNet from './commands/DotNet';\nimport Gradle from './commands/Gradle';\nimport JavaMaven from './commands/JavaMaven';\nimport Others from './commands/Others';\n\nexport interface AnalysisCommandProps {\n  appState: T.AppState;\n  buildTool: BuildTools;\n  component: T.Component;\n  onDone: () => void;\n}\n\nexport function AnalysisCommand(props: AnalysisCommandProps) {\n  const {\n    buildTool,\n    component,\n    appState: { branchesEnabled }\n  } = props;\n\n  if (!buildTool) {\n    return null;\n  }\n\n  switch (buildTool) {\n    case BuildTools.Maven:\n      return (\n        <JavaMaven branchesEnabled={branchesEnabled} component={component} onDone={props.onDone} />\n      );\n    case BuildTools.Gradle:\n      return (\n        <Gradle branchesEnabled={branchesEnabled} component={component} onDone={props.onDone} />\n      );\n    case BuildTools.DotNet:\n      return (\n        <DotNet branchesEnabled={branchesEnabled} component={component} onDone={props.onDone} />\n      );\n    case BuildTools.CFamily:\n      return (\n        <CFamily branchesEnabled={branchesEnabled} component={component} onDone={props.onDone} />\n      );\n    case BuildTools.Other:\n      return (\n        <Others branchesEnabled={branchesEnabled} component={component} onDone={props.onDone} />\n      );\n  }\n  return null;\n}\n\nexport default withAppState(AnalysisCommand);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Button } from '../../../components/controls/buttons';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\nimport TokenStepGenerator from '../components/TokenStepGenerator';\nimport { buildGithubLink } from '../utils';\n\nexport interface SecretStepProps {\n  almBinding?: AlmSettingsInstance;\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  projectBinding?: ProjectAlmBindingResponse;\n  onDone: () => void;\n}\n\nexport default function SecretStep(props: SecretStepProps) {\n  const { almBinding, baseUrl, component, currentUser, projectBinding } = props;\n\n  return (\n    <div className=\"boxed-group-inner\">\n      <p className=\"big-spacer-bottom\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.tutorial.with.github_action.secret.intro')}\n          id=\"onboarding.tutorial.with.github_action.secret.intro\"\n          values={{\n            settings_secret:\n              almBinding && projectBinding ? (\n                <a\n                  href={`${buildGithubLink(almBinding, projectBinding)}/settings/secrets`}\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\">\n                  {translate('onboarding.tutorial.with.github_action.secret.intro.link')}\n                </a>\n              ) : (\n                <strong>\n                  {translate('onboarding.tutorial.with.github_action.secret.intro.link')}\n                </strong>\n              )\n          }}\n        />\n      </p>\n      <ol className=\"list-styled\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.github_action.secret.new\"\n            highlightKeys={['new_secret']}\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.github_action.secret.name\"\n            highlightKeys={['name']}\n          />\n          <code className=\"rule little-spacer-left\">SONAR_TOKEN</code>\n          <ClipboardIconButton copyValue=\"SONAR_TOKEN\" />\n        </li>\n        <TokenStepGenerator component={component} currentUser={currentUser} />\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.github_action.secret.add\"\n            highlightKeys={['add_secret']}\n          />\n        </li>\n      </ol>\n\n      <hr className=\"no-horizontal-margins\" />\n\n      <ol className=\"list-styled big-spacer-top big-spacer-bottom\">\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.github_action.secret.new\"\n            highlightKeys={['new_secret']}\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.github_action.secret.name\"\n            highlightKeys={['name']}\n          />\n\n          <code className=\"rule little-spacer-left\">SONAR_HOST_URL</code>\n          <ClipboardIconButton copyValue=\"SONAR_HOST_URL\" />\n        </li>\n        <li className=\"big-spacer-bottom\">\n          <FormattedMessage\n            defaultMessage={translate('onboarding.tutorial.env_variables')}\n            id=\"onboarding.tutorial.env_variables\"\n            values={{\n              extra: <ClipboardIconButton copyValue={baseUrl} />,\n              field: <strong>{translate('onboarding.tutorial.env_variables.field')}</strong>,\n              value: <code className=\"rule\">{baseUrl}</code>\n            }}\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            translationKey=\"onboarding.tutorial.with.github_action.secret.add\"\n            highlightKeys={['add_secret']}\n          />\n        </li>\n      </ol>\n      <Button onClick={props.onDone}>{translate('continue')}</Button>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  AlmKeys,\n  AlmSettingsInstance,\n  ProjectAlmBindingResponse\n} from '../../../types/alm-settings';\nimport AllSetStep from '../components/AllSetStep';\nimport Step from '../components/Step';\nimport YamlFileStep from '../components/YamlFileStep';\nimport AnalysisCommand from './AnalysisCommand';\nimport SecretStep from './SecretStep';\n\nexport enum Steps {\n  CREATE_SECRET = 1,\n  YAML = 2,\n  ALL_SET = 3\n}\n\nexport interface GitHubActionTutorialProps {\n  almBinding?: AlmSettingsInstance;\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  projectBinding?: ProjectAlmBindingResponse;\n  willRefreshAutomatically?: boolean;\n}\n\nexport default function GitHubActionTutorial(props: GitHubActionTutorialProps) {\n  const {\n    almBinding,\n    baseUrl,\n    currentUser,\n    component,\n    projectBinding,\n    willRefreshAutomatically\n  } = props;\n\n  const [step, setStep] = React.useState<Steps>(Steps.CREATE_SECRET);\n  return (\n    <>\n      <Step\n        finished={step > Steps.CREATE_SECRET}\n        onOpen={() => setStep(Steps.CREATE_SECRET)}\n        open={step === Steps.CREATE_SECRET}\n        renderForm={() => (\n          <SecretStep\n            almBinding={almBinding}\n            baseUrl={baseUrl}\n            component={component}\n            currentUser={currentUser}\n            projectBinding={projectBinding}\n            onDone={() => setStep(Steps.YAML)}\n          />\n        )}\n        stepNumber={Steps.CREATE_SECRET}\n        stepTitle={translate('onboarding.tutorial.with.github_action.create_secret.title')}\n      />\n      <Step\n        finished={step > Steps.YAML}\n        onOpen={() => setStep(Steps.YAML)}\n        open={step === Steps.YAML}\n        renderForm={() => (\n          <YamlFileStep>\n            {buildTool => (\n              <AnalysisCommand\n                buildTool={buildTool}\n                component={component}\n                onDone={() => setStep(Steps.ALL_SET)}\n              />\n            )}\n          </YamlFileStep>\n        )}\n        stepNumber={Steps.YAML}\n        stepTitle={translate('onboarding.tutorial.with.github_action.yaml.title')}\n      />\n      <AllSetStep\n        alm={almBinding?.alm || AlmKeys.GitHub}\n        open={step === Steps.ALL_SET}\n        stepNumber={Steps.ALL_SET}\n        willRefreshAutomatically={willRefreshAutomatically}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Button } from '../../../components/controls/buttons';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\nimport Step from '../components/Step';\nimport TokenStepGenerator from '../components/TokenStepGenerator';\n\nexport interface EnvironmentVariablesStepProps {\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  finished: boolean;\n  onDone: () => void;\n  onOpen: () => void;\n  open: boolean;\n}\n\nconst pipelineDescriptionLinkLabel = translate(\n  'onboarding.tutorial.with.gitlab_ci.env_variables.description.link'\n);\n\nexport default function EnvironmentVariablesStep(props: EnvironmentVariablesStepProps) {\n  const { baseUrl, component, currentUser, finished, open } = props;\n\n  const fieldValueTranslation = translate('onboarding.tutorial.env_variables');\n\n  const renderForm = () => (\n    <div className=\"boxed-group-inner\">\n      <h2 className=\"spacer-bottom spacer-top\">\n        {translate('onboarding.tutorial.with.gitlab_ci.env_variables.section.title')}\n      </h2>\n\n      <FormattedMessage\n        defaultMessage={translate(\n          'onboarding.tutorial.with.gitlab_ci.env_variables.section.description'\n        )}\n        id=\"onboarding.tutorial.with.gitlab_ci.env_variables.section.description\"\n        values={{\n          /* This link will be added when the backend provides the project URL */\n          link: <strong>{pipelineDescriptionLinkLabel}</strong>\n        }}\n      />\n\n      <ol className=\"list-styled big-spacer-top\">\n        <li className=\"big-spacer-bottom\">\n          <FormattedMessage\n            defaultMessage={fieldValueTranslation}\n            id=\"onboarding.tutorial.with.gitlab_ci.env_variables.step1\"\n            values={{\n              extra: <ClipboardIconButton copyValue=\"SONAR_TOKEN\" />,\n              field: (\n                <strong>\n                  {translate('onboarding.tutorial.with.gitlab_ci.env_variables.step1')}\n                </strong>\n              ),\n              value: <code className=\"rule\">SONAR_TOKEN</code>\n            }}\n          />\n        </li>\n        <TokenStepGenerator component={component} currentUser={currentUser} />\n        <li className=\"big-spacer-bottom\">\n          {translate('onboarding.tutorial.with.gitlab_ci.env_variables.step3')}\n        </li>\n        <li className=\"big-spacer-bottom\">\n          {translate('onboarding.tutorial.with.gitlab_ci.env_variables.section.step4')}\n        </li>\n      </ol>\n\n      <hr className=\"no-horizontal-margins\" />\n\n      <h2 className=\"spacer-bottom big-spacer-top\">\n        {translate('onboarding.tutorial.with.gitlab_ci.env_variables.section2.title')}\n      </h2>\n\n      <FormattedMessage\n        defaultMessage={translate(\n          'onboarding.tutorial.with.gitlab_ci.env_variables.section2.description'\n        )}\n        id=\"onboarding.tutorial.with.gitlab_ci.env_variables.section2.description\"\n        values={{\n          /* This link will be added when the backend provides the project URL */\n          link: <strong>{pipelineDescriptionLinkLabel}</strong>\n        }}\n      />\n\n      <ol className=\"list-styled big-spacer-top big-spacer-bottom\">\n        <li className=\"big-spacer-bottom\">\n          <FormattedMessage\n            defaultMessage={fieldValueTranslation}\n            id=\"onboarding.tutorial.with.gitlab_ci.env_variables.step1\"\n            values={{\n              extra: <ClipboardIconButton copyValue=\"SONAR_HOST_URL\" />,\n              field: (\n                <strong>\n                  {translate('onboarding.tutorial.with.gitlab_ci.env_variables.step1')}\n                </strong>\n              ),\n              value: <code className=\"rule\">SONAR_HOST_URL</code>\n            }}\n          />\n        </li>\n        <li className=\"big-spacer-bottom\">\n          <FormattedMessage\n            defaultMessage={fieldValueTranslation}\n            id=\"onboarding.tutorial.with.gitlab_ci.env_variables.step2\"\n            values={{\n              extra: <ClipboardIconButton copyValue={baseUrl} />,\n              field: <strong>{translate('onboarding.tutorial.env_variables.field')}</strong>,\n              value: <code className=\"rule\">{baseUrl}</code>\n            }}\n          />\n        </li>\n        <li className=\"big-spacer-bottom\">\n          {translate('onboarding.tutorial.with.gitlab_ci.env_variables.step3')}\n        </li>\n        <li className=\"big-spacer-bottom\">\n          {translate('onboarding.tutorial.with.gitlab_ci.env_variables.section2.step4')}\n        </li>\n      </ol>\n\n      <Button className=\"big-spacer-bottom\" onClick={props.onDone}>\n        {translate('continue')}\n      </Button>\n    </div>\n  );\n\n  return (\n    <Step\n      finished={finished}\n      onOpen={props.onOpen}\n      open={open}\n      renderForm={renderForm}\n      stepNumber={2}\n      stepTitle={translate('onboarding.tutorial.with.gitlab_ci.env_variables.title')}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Button } from '../../../components/controls/buttons';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\nimport CodeSnippet from '../../common/CodeSnippet';\nimport { withCLanguageFeature } from '../../hoc/withCLanguageFeature';\nimport RenderOptions from '../components/RenderOptions';\nimport Step from '../components/Step';\nimport { BuildTools } from '../types';\n\nexport interface ProjectKeyStepProps {\n  buildTool?: BuildTools;\n  component: T.Component;\n  finished: boolean;\n  hasCLanguageFeature: boolean;\n  onDone: () => void;\n  onOpen: () => void;\n  open: boolean;\n  setBuildTool: (tool: BuildTools) => void;\n}\n\nconst mavenSnippet = () => `<properties>\n  <sonar.qualitygate.wait>true</sonar.qualitygate.wait>\n</properties>`;\n\nconst gradleSnippet = (key: string) => `plugins {\n  id \"org.sonarqube\" version \"3.3\"\n}\n\nsonarqube {\n  properties {\n    property \"sonar.projectKey\", \"${key}\"\n    property \"sonar.qualitygate.wait\", true \n  }\n}`;\n\nconst otherSnippet = (key: string) => `sonar.projectKey=${key}\nsonar.qualitygate.wait=true\n`;\n\nconst snippetForBuildTool = {\n  [BuildTools.Maven]: mavenSnippet,\n  [BuildTools.Gradle]: gradleSnippet,\n  [BuildTools.CFamily]: otherSnippet,\n  [BuildTools.Other]: otherSnippet\n};\n\nconst filenameForBuildTool = {\n  [BuildTools.Maven]: 'pom.xml',\n  [BuildTools.Gradle]: 'build.gradle',\n  [BuildTools.CFamily]: 'sonar-project.properties',\n  [BuildTools.Other]: 'sonar-project.properties'\n};\n\nexport function ProjectKeyStep(props: ProjectKeyStepProps) {\n  const { buildTool, component, finished, hasCLanguageFeature, open } = props;\n\n  const buildToolSelect = (value: BuildTools) => {\n    props.setBuildTool(value);\n    if (value === BuildTools.DotNet) {\n      props.onDone();\n    }\n  };\n\n  const buildTools = [BuildTools.Maven, BuildTools.Gradle, BuildTools.DotNet];\n  if (hasCLanguageFeature) {\n    buildTools.push(BuildTools.CFamily);\n  }\n  buildTools.push(BuildTools.Other);\n\n  const renderForm = () => (\n    <div className=\"boxed-group-inner\">\n      <ol className=\"list-styled\">\n        <li>\n          {translate('onboarding.build')}\n          <RenderOptions\n            checked={buildTool}\n            name=\"buildtool\"\n            onCheck={buildToolSelect}\n            optionLabelKey=\"onboarding.build\"\n            options={buildTools}\n          />\n        </li>\n        {buildTool !== undefined && buildTool !== BuildTools.DotNet && (\n          <li className=\"abs-width-600\">\n            <FormattedMessage\n              defaultMessage={translate(\n                `onboarding.tutorial.with.gitlab_ci.project_key.${buildTool}.step2`\n              )}\n              id={`onboarding.tutorial.with.gitlab_ci.project_key.${buildTool}.step2`}\n              values={{\n                file: (\n                  <>\n                    <code className=\"rule\">{filenameForBuildTool[buildTool]}</code>\n                    <ClipboardIconButton\n                      className=\"little-spacer-left\"\n                      copyValue={filenameForBuildTool[buildTool]}\n                    />\n                  </>\n                )\n              }}\n            />\n            <CodeSnippet snippet={snippetForBuildTool[buildTool](component.key)} />\n          </li>\n        )}\n      </ol>\n      {buildTool !== undefined && <Button onClick={props.onDone}>{translate('continue')}</Button>}\n    </div>\n  );\n\n  return (\n    <Step\n      finished={finished}\n      onOpen={props.onOpen}\n      open={open}\n      renderForm={renderForm}\n      stepNumber={1}\n      stepTitle={translate('onboarding.tutorial.with.gitlab_ci.project_key.title')}\n    />\n  );\n}\n\nexport default withCLanguageFeature(ProjectKeyStep);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport { CompilationInfo } from '../../components/CompilationInfo';\nimport { BuildTools } from '../../types';\n\nexport interface PipeCommandProps {\n  branchesEnabled?: boolean;\n  buildTool: BuildTools;\n  projectKey: string;\n}\n\nconst BUILD_TOOL_SPECIFIC = {\n  [BuildTools.Gradle]: { image: 'gradle:jre11-slim', script: () => 'gradle sonarqube' },\n  [BuildTools.Maven]: {\n    image: 'maven:3.6.3-jdk-11',\n    script: (projectKey: string) => `\n    - mvn verify sonar:sonar -Dsonar.projectKey=${projectKey}`\n  },\n  [BuildTools.DotNet]: {\n    image: 'mcr.microsoft.com/dotnet/core/sdk:latest',\n    script: (projectKey: string) => `\n      - \"apt-get update\"\n      - \"apt-get install --yes openjdk-11-jre\"\n      - \"dotnet tool install --global dotnet-sonarscanner\"\n      - \"export PATH=\\\\\"$PATH:$HOME/.dotnet/tools\\\\\"\"\n      - \"dotnet sonarscanner begin /k:\\\\\"${projectKey}\\\\\" /d:sonar.login=\\\\\"$SONAR_TOKEN\\\\\" /d:\\\\\"sonar.host.url=$SONAR_HOST_URL\\\\\" \"\n      - \"dotnet build\"\n      - \"dotnet sonarscanner end /d:sonar.login=\\\\\"$SONAR_TOKEN\\\\\"\"`\n  },\n  [BuildTools.Other]: {\n    image: `\n    name: sonarsource/sonar-scanner-cli:latest\n    entrypoint: [\"\"]`,\n    script: () => `\n    - sonar-scanner`\n  }\n};\n\nexport default function PipeCommand({ projectKey, branchesEnabled, buildTool }: PipeCommandProps) {\n  let command: string;\n  if (buildTool === BuildTools.CFamily) {\n    command = `image: <image ready for your build toolchain>\n\ncache:\n  paths:\n    - .sonar\n\nstages:\n  - download\n  - build\n  - scan\n\ndownload:\n  stage: download\n  script:\n      - mkdir -p .sonar\n      - curl -sSLo build-wrapper-linux-x86.zip  $SONAR_HOST_URL/static/cpp/build-wrapper-linux-x86.zip\n      - unzip -o build-wrapper-linux-x86.zip -d .sonar\n\nbuild:\n  stage: build\n  script:\n      - .sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir .sonar/bw-output <your clean build command>\n\nsonarqube-check:\n  stage: scan\n  script: \n    - curl -sSLo sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip\n    - unzip -o sonar-scanner.zip -d .sonar\n    - .sonar/sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=.sonar/bw-output\n  allow_failure: true`;\n  } else {\n    const onlyBlock = branchesEnabled\n      ? `- merge_requests\n    - master # or the name of your main branch\n    - develop`\n      : '- master # or the name of your main branch';\n\n    const { image, script } = BUILD_TOOL_SPECIFIC[buildTool];\n\n    command = `sonarqube-check:\n  image: ${image}\n  variables:\n    SONAR_USER_HOME: \"\\${CI_PROJECT_DIR}/.sonar\"  # Defines the location of the analysis task cache\n    GIT_DEPTH: \"0\"  # Tells git to fetch all the branches of the project, required by the analysis task\n  cache:\n    key: \"\\${CI_JOB_NAME}\"\n    paths:\n      - .sonar/cache\n  script: ${script(projectKey)}\n  allow_failure: true\n  only:\n    ${onlyBlock}\n`;\n  }\n  return (\n    <>\n      <CodeSnippet snippet={command} />\n      {buildTool === BuildTools.CFamily && <CompilationInfo />}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\nimport { withAppState } from '../../hoc/withAppState';\nimport FinishButton from '../components/FinishButton';\nimport GithubCFamilyExampleRepositories from '../components/GithubCFamilyExampleRepositories';\nimport Step from '../components/Step';\nimport { BuildTools, TutorialModes } from '../types';\nimport PipeCommand from './commands/PipeCommand';\n\nexport interface YmlFileStepProps {\n  appState: T.AppState;\n  buildTool?: BuildTools;\n  finished: boolean;\n  onDone: () => void;\n  onOpen: () => void;\n  open: boolean;\n  projectKey: string;\n}\n\nexport function YmlFileStep(props: YmlFileStepProps) {\n  const {\n    appState: { branchesEnabled },\n    buildTool,\n    open,\n    finished,\n    projectKey\n  } = props;\n\n  const renderForm = () => (\n    <div className=\"boxed-group-inner\">\n      <div className=\"flex-columns\">\n        <div className=\"flex-column-full\">\n          {buildTool && (\n            <>\n              {buildTool === BuildTools.CFamily && (\n                <GithubCFamilyExampleRepositories\n                  className=\"big-spacer-bottom abs-width-600\"\n                  ci={TutorialModes.GitLabCI}\n                />\n              )}\n              <div className=\"big-spacer-bottom\">\n                <FormattedMessage\n                  defaultMessage={translate('onboarding.tutorial.with.gitlab_ci.yml.description')}\n                  id=\"onboarding.tutorial.with.gitlab_ci.yml.description\"\n                  values={{\n                    filename: (\n                      <>\n                        <code className=\"rule\">\n                          {translate('onboarding.tutorial.with.gitlab_ci.yml.filename')}\n                        </code>\n                        <ClipboardIconButton\n                          className=\"little-spacer-left\"\n                          copyValue={translate('onboarding.tutorial.with.gitlab_ci.yml.filename')}\n                        />\n                      </>\n                    )\n                  }}\n                />\n              </div>\n              <div className=\"big-spacer-bottom abs-width-600\">\n                <PipeCommand\n                  buildTool={buildTool}\n                  branchesEnabled={branchesEnabled}\n                  projectKey={projectKey}\n                />\n              </div>\n              <p className=\"little-spacer-bottom\">\n                {branchesEnabled\n                  ? translate('onboarding.tutorial.with.gitlab_ci.yml.baseconfig')\n                  : translate('onboarding.tutorial.with.gitlab_ci.yml.baseconfig.no_branches')}\n              </p>\n              <p>{translate('onboarding.tutorial.with.gitlab_ci.yml.existing')}</p>\n            </>\n          )}\n        </div>\n      </div>\n      <FinishButton onClick={props.onDone} />\n    </div>\n  );\n\n  return (\n    <Step\n      finished={finished}\n      onOpen={props.onOpen}\n      open={open}\n      renderForm={renderForm}\n      stepNumber={3}\n      stepTitle={translate('onboarding.tutorial.with.gitlab_ci.yml.title')}\n    />\n  );\n}\n\nexport default withAppState(YmlFileStep);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport AllSetStep from '../components/AllSetStep';\nimport { BuildTools } from '../types';\nimport EnvironmentVariablesStep from './EnvironmentVariablesStep';\nimport ProjectKeyStep from './ProjectKeyStep';\nimport YmlFileStep from './YmlFileStep';\n\nexport enum Steps {\n  PROJECT_KEY,\n  ENV_VARIABLES,\n  YML,\n  ALL_SET\n}\n\nexport interface GitLabCITutorialProps {\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  willRefreshAutomatically?: boolean;\n}\n\nexport default function GitLabCITutorial(props: GitLabCITutorialProps) {\n  const { baseUrl, component, currentUser, willRefreshAutomatically } = props;\n\n  const [step, setStep] = React.useState(Steps.PROJECT_KEY);\n  const [buildTool, setBuildTool] = React.useState<BuildTools>();\n\n  return (\n    <>\n      <div className=\"page-header big-spacer-bottom\">\n        <h1 className=\"page-title\">{translate('onboarding.tutorial.with.gitlab_ci.title')}</h1>\n      </div>\n\n      <ProjectKeyStep\n        buildTool={buildTool}\n        component={component}\n        finished={step > Steps.PROJECT_KEY}\n        onDone={() => setStep(Steps.ENV_VARIABLES)}\n        onOpen={() => setStep(Steps.PROJECT_KEY)}\n        open={step === Steps.PROJECT_KEY}\n        setBuildTool={setBuildTool}\n      />\n\n      <EnvironmentVariablesStep\n        baseUrl={baseUrl}\n        component={component}\n        currentUser={currentUser}\n        finished={step > Steps.ENV_VARIABLES}\n        onDone={() => setStep(Steps.YML)}\n        onOpen={() => setStep(Steps.ENV_VARIABLES)}\n        open={step === Steps.ENV_VARIABLES}\n      />\n\n      <YmlFileStep\n        buildTool={buildTool}\n        finished={step > Steps.YML}\n        onDone={() => setStep(Steps.ALL_SET)}\n        onOpen={() => setStep(Steps.YML)}\n        open={step === Steps.YML}\n        projectKey={component.key}\n      />\n\n      <AllSetStep\n        alm={AlmKeys.GitLab}\n        open={step === Steps.ALL_SET}\n        stepNumber={4}\n        willRefreshAutomatically={willRefreshAutomatically}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../../components/controls/HelpTooltip';\nimport { Alert } from '../../../../components/ui/Alert';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport SentenceWithFilename from '../../components/SentenceWithFilename';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\n\nexport interface CreateJenkinsfileBulletPointProps {\n  alertTranslationKeyPart?: string;\n  children?: React.ReactNode;\n  otherAlert?: JSX.Element;\n  snippet: string;\n}\n\nexport default function CreateJenkinsfileBulletPoint(props: CreateJenkinsfileBulletPointProps) {\n  const { children, snippet, alertTranslationKeyPart, otherAlert } = props;\n\n  return (\n    <li className=\"abs-width-600\">\n      <SentenceWithFilename\n        filename=\"Jenkinsfile\"\n        translationKey=\"onboarding.tutorial.with.jenkins.jenkinsfile.jenkinsfile_step\"\n      />\n      {alertTranslationKeyPart && (\n        <Alert className=\"spacer-top\" variant=\"info\">\n          <div className=\"text-middle\">\n            <SentenceWithHighlights\n              highlightKeys={['default', 'in_jenkins']}\n              translationKey={`${alertTranslationKeyPart}.replace`}\n            />\n            <HelpTooltip\n              className=\"little-spacer-left\"\n              overlay={\n                <>\n                  <p className=\"spacer-bottom\">\n                    <SentenceWithHighlights\n                      highlightKeys={['path']}\n                      translationKey={`${alertTranslationKeyPart}.help1`}\n                    />\n                  </p>\n                  <p>\n                    <SentenceWithHighlights\n                      highlightKeys={['path', 'name']}\n                      translationKey={`${alertTranslationKeyPart}.help2`}\n                    />\n                  </p>\n                </>\n              }\n            />\n            {otherAlert}\n          </div>\n        </Alert>\n      )}\n      <CodeSnippet snippet={snippet} />\n      {children}\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\nimport { CompilationInfo } from '../../components/CompilationInfo';\nimport DefaultProjectKey from '../../components/DefaultProjectKey';\nimport FinishButton from '../../components/FinishButton';\nimport GithubCFamilyExampleRepositories from '../../components/GithubCFamilyExampleRepositories';\nimport RenderOptions from '../../components/RenderOptions';\nimport { OSs, TutorialModes } from '../../types';\nimport { LanguageProps } from '../JenkinsfileStep';\nimport CreateJenkinsfileBulletPoint from './CreateJenkinsfileBulletPoint';\n\nconst YAML_MAP: Record<OSs, (baseUrl: string) => string> = {\n  [OSs.Linux]: baseUrl => `node {\n  stage('SCM') {\n    checkout scm\n  }\n  stage('Download Build Wrapper') {\n    sh \"mkdir -p .sonar\"\n    sh \"curl -sSLo build-wrapper-linux-x86.zip ${baseUrl}/static/cpp/build-wrapper-linux-x86.zip\"\n    sh \"unzip -o build-wrapper-linux-x86.zip -d .sonar\"\n  }\n  stage('Build') {\n    sh \".sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>\"\n  }\n  stage('SonarQube Analysis') {\n    def scannerHome = tool 'SonarScanner';\n    withSonarQubeEnv() {\n      sh \"\\${scannerHome}/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output\"\n    }\n  }\n}`,\n  [OSs.MacOS]: baseUrl => `node {\n  stage('SCM') {\n    checkout scm\n  }\n  stage('Download Build Wrapper') {\n    sh '''\n      mkdir -p .sonar\n      curl -sSLo build-wrapper-macosx-x86.zip ${baseUrl}/static/cpp/build-wrapper-macosx-x86.zip\n      unzip -o build-wrapper-macosx-x86.zip -d .sonar\n    '''\n  }\n  stage('Build') {\n    sh '''\n      .sonar/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw-output <your clean build command>\n    '''\n  }\n  stage('SonarQube Analysis') {\n    def scannerHome = tool 'SonarScanner';\n    withSonarQubeEnv() {\n      sh \"\\${scannerHome}/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output\"\n    }\n  }\n}`,\n  [OSs.Windows]: baseUrl => `node {\n  stage('SCM') {\n    checkout scm\n  }\n  stage('Download Build Wrapper') {\n    powershell '''\n      $path = \"$HOME/.sonar/build-wrapper-win-x86.zip\"\n      rm build-wrapper-win-x86 -Recurse -Force -ErrorAction SilentlyContinue\n      rm $path -Force -ErrorAction SilentlyContinue\n      mkdir $HOME/.sonar\n      [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n      (New-Object System.Net.WebClient).DownloadFile(${baseUrl}/static/cpp/build-wrapper-win-x86.zip\", $path)\n      Add-Type -AssemblyName System.IO.Compression.FileSystem\n      [System.IO.Compression.ZipFile]::ExtractToDirectory($path, \"$HOME/.sonar\")\n    '''\n  }\n  stage('Build') {\n    powershell '''\n      $env:Path += \";$HOME/.sonar/build-wrapper-win-x86\"\n      build-wrapper-win-x86-64 --out-dir bw-output <your clean build command>\n    '''\n  }\n  stage('SonarQube Analysis') {\n    def scannerHome = tool 'SonarScanner';\n    withSonarQubeEnv() {\n      powershell \"\\${scannerHome}/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output\"\n    }\n  }\n}`\n};\n\nexport default function CFamilly(props: LanguageProps) {\n  const { baseUrl, component } = props;\n  const [os, setOs] = React.useState<OSs>();\n  return (\n    <>\n      <DefaultProjectKey component={component} />\n      <li className=\"abs-width-600\">\n        {translate('onboarding.build.other.os')}\n        <RenderOptions\n          checked={os}\n          name=\"flavorComponent\"\n          optionLabelKey=\"onboarding.build.other.os\"\n          onCheck={value => setOs(value as OSs)}\n          options={Object.values(OSs)}\n        />\n        {os && (\n          <GithubCFamilyExampleRepositories\n            className=\"big-spacer-top big-spacer-bottom\"\n            os={os}\n            ci={TutorialModes.Jenkins}\n          />\n        )}\n      </li>\n      {os && (\n        <>\n          <CreateJenkinsfileBulletPoint\n            alertTranslationKeyPart=\"onboarding.tutorial.with.jenkins.jenkinsfile.other.step3\"\n            snippet={YAML_MAP[os](baseUrl)}>\n            <CompilationInfo />\n          </CreateJenkinsfileBulletPoint>\n          <FinishButton onClick={props.onDone} />\n        </>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ClipboardIconButton } from '../../../../components/controls/clipboard';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\n\nexport default function DotNetPrereqsScanner() {\n  return (\n    <li className=\"abs-width-600\">\n      <SentenceWithHighlights\n        highlightKeys={['default_scanner']}\n        translationKey=\"onboarding.tutorial.with.jenkins.dotnet.scanner.prereqs.title\"\n      />\n      <Alert className=\"spacer-top\" variant=\"info\">\n        {translate('onboarding.tutorial.with.jenkins.dotnet.scanner.prereqs.info')}\n      </Alert>\n      <ul className=\"list-styled\">\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['path']}\n            translationKey=\"onboarding.tutorial.with.jenkins.dotnet.scanner.prereqs.step1\"\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['default_scanner', 'add_scanner_for_msbuild']}\n            translationKey=\"onboarding.tutorial.with.jenkins.dotnet.scanner.prereqs.step2\"\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['name']}\n            translationKey=\"onboarding.tutorial.with.jenkins.dotnet.scanner.prereqs.step3\"\n          />\n          <code className=\"rule\">SonarScanner for MSBuild</code>\n          <ClipboardIconButton copyValue=\"SonarScanner for MSBuild\" />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['install_from']}\n            translationKey=\"onboarding.tutorial.with.jenkins.dotnet.scanner.prereqs.step5\"\n          />\n        </li>\n      </ul>\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport SentenceWithFilename from '../../components/SentenceWithFilename';\nimport { OSs } from '../../types';\nimport { DotNetCoreFrameworkProps, OSDotNet } from './DotNet';\nimport DotNetPrereqsScanner from './DotNetPrereqsScanner';\n\nconst OSS_DEP: { [key in OSDotNet]: { shell: string; pathSeparator: string } } = {\n  [OSs.Linux]: { shell: 'sh', pathSeparator: '/' },\n  [OSs.Windows]: { shell: 'bat', pathSeparator: '\\\\\\\\' }\n};\n\nconst jenkinsfileSnippet = (key: string, shell: OSDotNet) => `node {\n  stage('SCM') {\n    checkout scm\n  }\n  stage('SonarQube Analysis') {\n    def scannerHome = tool 'SonarScanner for MSBuild'\n    withSonarQubeEnv() {\n      ${OSS_DEP[shell].shell} \"dotnet \\${scannerHome}${OSS_DEP[shell].pathSeparator}SonarScanner.MSBuild.dll begin /k:\\\\\"${key}\\\\\"\"\n      ${OSS_DEP[shell].shell} \"dotnet build\"\n      ${OSS_DEP[shell].shell} \"dotnet \\${scannerHome}${OSS_DEP[shell].pathSeparator}SonarScanner.MSBuild.dll end\"\n    }\n  }\n}\n`;\n\nexport default function DotNetCore({ component, os }: DotNetCoreFrameworkProps) {\n  return (\n    <>\n      <DotNetPrereqsScanner />\n      <li className=\"abs-width-600\">\n        <SentenceWithFilename\n          filename=\"Jenkinsfile\"\n          translationKey=\"onboarding.tutorial.with.jenkins.jenkinsfile.jenkinsfile_step\"\n        />\n        <CodeSnippet snippet={jenkinsfileSnippet(component.key, os)} />\n      </li>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ClipboardIconButton } from '../../../../components/controls/clipboard';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport SentenceWithHighlights from '../../components/SentenceWithHighlights';\n\nexport default function DotNetPrereqsMSBuild() {\n  return (\n    <li className=\"abs-width-600\">\n      <SentenceWithHighlights\n        highlightKeys={['default_msbuild']}\n        translationKey=\"onboarding.tutorial.with.jenkins.dotnet.msbuild.prereqs.title\"\n      />\n      <Alert className=\"spacer-top\" variant=\"info\">\n        {translate('onboarding.tutorial.with.jenkins.dotnet.msbuild.prereqs.info')}\n      </Alert>\n      <ul className=\"list-styled\">\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['msbuild']}\n            translationKey=\"onboarding.tutorial.with.jenkins.dotnet.msbuild.prereqs.step1\"\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['path']}\n            translationKey=\"onboarding.tutorial.with.jenkins.dotnet.msbuild.prereqs.step2\"\n          />\n        </li>\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['msbuild', 'add_msbuild', 'name', 'msbuild_plugin']}\n            translationKey=\"onboarding.tutorial.with.jenkins.dotnet.msbuild.prereqs.step3\"\n          />\n          <code className=\"rule\">Default MSBuild</code>\n          <ClipboardIconButton copyValue=\"Default MSBuild\" />\n        </li>\n      </ul>\n    </li>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport SentenceWithFilename from '../../components/SentenceWithFilename';\nimport { DotNetCoreFrameworkProps } from './DotNet';\nimport DotNetPrereqsMSBuild from './DotNetPrereqsMSBuild';\nimport DotNetPrereqsScanner from './DotNetPrereqsScanner';\n\nconst jenkinsfileSnippet = (key: string) => `node {\n  stage('SCM') {\n    checkout scm\n  }\n  stage('SonarQube Analysis') {\n    def msbuildHome = tool 'Default MSBuild'\n    def scannerHome = tool 'SonarScanner for MSBuild'\n    withSonarQubeEnv() {\n      bat \"\\\\\"\\${scannerHome}\\\\\\\\SonarScanner.MSBuild.exe\\\\\" begin /k:\\\\\"${key}\\\\\"\"\n      bat \"\\\\\"\\${msbuildHome}\\\\\\\\MSBuild.exe\\\\\" /t:Rebuild\"\n      bat \"\\\\\"\\${scannerHome}\\\\\\\\SonarScanner.MSBuild.exe\\\\\" end\"\n    }\n  }\n}\n`;\n\nexport default function DotNetFramework({ component }: DotNetCoreFrameworkProps) {\n  return (\n    <>\n      <DotNetPrereqsScanner />\n      <DotNetPrereqsMSBuild />\n      <li className=\"abs-width-600\">\n        <SentenceWithFilename\n          filename=\"Jenkinsfile\"\n          translationKey=\"onboarding.tutorial.with.jenkins.jenkinsfile.jenkinsfile_step\"\n        />\n        <CodeSnippet snippet={jenkinsfileSnippet(component.key)} />\n      </li>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\nimport FinishButton from '../../components/FinishButton';\nimport RenderOptions from '../../components/RenderOptions';\nimport { OSs } from '../../types';\nimport { LanguageProps } from '../JenkinsfileStep';\nimport DotNetCore from './DotNetCore';\nimport DotNetFramework from './DotNetFramework';\n\nexport interface DotNetCoreFrameworkProps {\n  component: T.Component;\n  os: OSDotNet;\n}\n\nexport type OSDotNet = OSs.Linux | OSs.Windows;\n\nconst DotNetFlavor = { win_core: DotNetCore, win_msbuild: DotNetFramework, linux_core: DotNetCore };\nconst DotOS: { [key in keyof typeof DotNetFlavor]: OSDotNet } = {\n  win_core: OSs.Windows,\n  win_msbuild: OSs.Windows,\n  linux_core: OSs.Linux\n};\n\nexport default function DotNet(props: LanguageProps) {\n  const { component } = props;\n  const [flavorComponent, setFlavorComponet] = React.useState<keyof typeof DotNetFlavor>();\n  const DotNetTutorial = flavorComponent && DotNetFlavor[flavorComponent];\n  return (\n    <>\n      <li>\n        {translate('onboarding.tutorial.with.jenkins.jenkinsfile.dotnet.build_agent')}\n        <RenderOptions\n          checked={flavorComponent}\n          name=\"flavorComponent\"\n          optionLabelKey=\"onboarding.build.dotnet\"\n          onCheck={value => setFlavorComponet(value as keyof typeof DotNetFlavor)}\n          options={Object.keys(DotNetFlavor)}\n        />\n      </li>\n      {DotNetTutorial && flavorComponent && (\n        <>\n          <DotNetTutorial component={component} os={DotOS[flavorComponent]} />\n          <FinishButton onClick={props.onDone} />\n        </>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport FinishButton from '../../components/FinishButton';\nimport SentenceWithFilename from '../../components/SentenceWithFilename';\nimport { buildGradleSnippet } from '../../utils';\nimport { LanguageProps } from '../JenkinsfileStep';\nimport CreateJenkinsfileBulletPoint from './CreateJenkinsfileBulletPoint';\n\nconst JENKINSFILE_SNIPPET = `node {\n  stage('SCM') {\n    checkout scm\n  }\n  stage('SonarQube Analysis') {\n    withSonarQubeEnv() {\n      sh \"./gradlew sonarqube\"\n    }\n  }\n}`;\n\nexport default function Gradle(props: LanguageProps) {\n  const { component } = props;\n  return (\n    <>\n      <li className=\"abs-width-600\">\n        <SentenceWithFilename\n          filename=\"build.gradle\"\n          translationKey=\"onboarding.tutorial.with.jenkins.jenkinsfile.gradle.step2\"\n        />\n        <CodeSnippet snippet={buildGradleSnippet(component.key)} />\n      </li>\n      <CreateJenkinsfileBulletPoint snippet={JENKINSFILE_SNIPPET} />\n      <FinishButton onClick={props.onDone} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport FinishButton from '../../components/FinishButton';\nimport { LanguageProps } from '../JenkinsfileStep';\nimport CreateJenkinsfileBulletPoint from './CreateJenkinsfileBulletPoint';\n\nfunction jenkinsfileSnippet(projectKey: string) {\n  return `node {\n  stage('SCM') {\n    checkout scm\n  }\n  stage('SonarQube Analysis') {\n    def mvn = tool 'Default Maven';\n    withSonarQubeEnv() {\n      sh \"\\${mvn}/bin/mvn clean verify sonar:sonar -Dsonar.projectKey=${projectKey}\"\n    }\n  }\n}`;\n}\n\nexport default function Maven({ component, onDone }: LanguageProps) {\n  return (\n    <>\n      <CreateJenkinsfileBulletPoint\n        alertTranslationKeyPart=\"onboarding.tutorial.with.jenkins.jenkinsfile.maven.step3\"\n        snippet={jenkinsfileSnippet(component.key)}\n      />\n      <FinishButton onClick={onDone} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DefaultProjectKey from '../../components/DefaultProjectKey';\nimport FinishButton from '../../components/FinishButton';\nimport { LanguageProps } from '../JenkinsfileStep';\nimport CreateJenkinsfileBulletPoint from './CreateJenkinsfileBulletPoint';\n\nconst JENKINSFILE_SNIPPET = `node {\n  stage('SCM') {\n    checkout scm\n  }\n  stage('SonarQube Analysis') {\n    def scannerHome = tool 'SonarScanner';\n    withSonarQubeEnv() {\n      sh \"\\${scannerHome}/bin/sonar-scanner\"\n    }\n  }\n}`;\n\nexport default function Other(props: LanguageProps) {\n  const { component } = props;\n  return (\n    <>\n      <DefaultProjectKey component={component} />\n      <CreateJenkinsfileBulletPoint\n        alertTranslationKeyPart=\"onboarding.tutorial.with.jenkins.jenkinsfile.other.step3\"\n        snippet={JENKINSFILE_SNIPPET}\n      />\n      <FinishButton onClick={props.onDone} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { withCLanguageFeature } from '../../hoc/withCLanguageFeature';\nimport RenderOptions from '../components/RenderOptions';\nimport Step from '../components/Step';\nimport { BuildTools } from '../types';\nimport CFamilly from './buildtool-steps/CFamilly';\nimport DotNet from './buildtool-steps/DotNet';\nimport Gradle from './buildtool-steps/Gradle';\nimport Maven from './buildtool-steps/Maven';\nimport Other from './buildtool-steps/Other';\n\nexport interface JenkinsfileStepProps {\n  baseUrl: string;\n  component: T.Component;\n  hasCLanguageFeature: boolean;\n  finished: boolean;\n  onDone: () => void;\n  onOpen: () => void;\n  open: boolean;\n}\n\nexport interface LanguageProps {\n  onDone: () => void;\n  component: T.Component;\n  baseUrl: string;\n}\n\nconst BUILDTOOL_COMPONENT_MAP: {\n  [x in BuildTools]: React.ComponentType<LanguageProps>;\n} = {\n  [BuildTools.Maven]: Maven,\n  [BuildTools.Gradle]: Gradle,\n  [BuildTools.DotNet]: DotNet,\n  [BuildTools.CFamily]: CFamilly,\n  [BuildTools.Other]: Other\n};\n\nexport function JenkinsfileStep(props: JenkinsfileStepProps) {\n  const { component, hasCLanguageFeature, baseUrl, finished, open } = props;\n  const [buildTool, setBuildTool] = React.useState<BuildTools>();\n  const buildToolOrder = Object.keys(BUILDTOOL_COMPONENT_MAP);\n  if (!hasCLanguageFeature) {\n    buildToolOrder.splice(buildToolOrder.indexOf(BuildTools.CFamily), 1);\n  }\n  return (\n    <Step\n      finished={finished}\n      onOpen={props.onOpen}\n      open={open}\n      renderForm={() => (\n        <div className=\"boxed-group-inner\">\n          <ol className=\"list-styled\">\n            <li>\n              {translate('onboarding.build')}\n              <RenderOptions\n                checked={buildTool}\n                name=\"buildtool\"\n                onCheck={value => setBuildTool(value as BuildTools)}\n                optionLabelKey=\"onboarding.build\"\n                options={buildToolOrder}\n              />\n              {buildTool === BuildTools.CFamily && (\n                <Alert variant=\"info\" className=\"spacer-top abs-width-600\">\n                  {translate('onboarding.tutorial.with.jenkins.jenkinsfile.cfamilly.agent_setup')}\n                </Alert>\n              )}\n            </li>\n            {buildTool !== undefined &&\n              React.createElement(BUILDTOOL_COMPONENT_MAP[buildTool], {\n                component,\n                baseUrl,\n                onDone: props.onDone\n              })}\n          </ol>\n        </div>\n      )}\n      stepNumber={3}\n      stepTitle={translate('onboarding.tutorial.with.jenkins.jenkinsfile.title')}\n    />\n  );\n}\n\nexport default withCLanguageFeature(JenkinsfileStep);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface LabelActionPairProps {\n  translationKey: string;\n}\n\nexport default function LabelActionPair({ translationKey }: LabelActionPairProps) {\n  return (\n    <>\n      <strong>{translate(translationKey, 'label')}:</strong> {translate(translationKey, 'action')}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ClipboardIconButton } from '../../../components/controls/clipboard';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface LabelValuePairProps {\n  translationKey: string;\n  value: string;\n}\n\nexport default function LabelValuePair({ translationKey, value }: LabelValuePairProps) {\n  return (\n    <div className=\"display-flex-center\">\n      <strong className=\"little-spacer-right\">{translate(translationKey, 'label')}:</strong> {value}\n      <ClipboardIconButton className=\"little-spacer-left\" copyValue={value} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { rawSizes } from '../../../app/theme';\nimport { Button } from '../../../components/controls/buttons';\nimport ChevronRightIcon from '../../../components/icons/ChevronRightIcon';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  AlmKeys,\n  AlmSettingsInstance,\n  ProjectAlmBindingResponse\n} from '../../../types/alm-settings';\nimport CodeSnippet from '../../common/CodeSnippet';\nimport LabelActionPair from '../components/LabelActionPair';\nimport LabelValuePair from '../components/LabelValuePair';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\nimport Step from '../components/Step';\nimport { buildGithubLink } from '../utils';\n\nexport interface MultiBranchPipelineStepProps {\n  alm: AlmKeys;\n  almBinding?: AlmSettingsInstance;\n  finished: boolean;\n  onDone: () => void;\n  onOpen: () => void;\n  open: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\n/* Capture [workspaceID] from this pattern: https://bitbucket.org/[workspaceId]/  */\nconst bitbucketcloudUrlRegex = new RegExp('https:\\\\/\\\\/bitbucket.org\\\\/(.+)\\\\/');\n\nfunction extractBitbucketCloudWorkspaceId(almBinding?: AlmSettingsInstance): string | undefined {\n  if (almBinding?.url) {\n    const result = almBinding.url.match(bitbucketcloudUrlRegex);\n\n    return result ? result[1] : undefined;\n  }\n}\n\nexport default function MultiBranchPipelineStep(props: MultiBranchPipelineStepProps) {\n  const { alm, almBinding, finished, open, projectBinding } = props;\n\n  const workspaceId = extractBitbucketCloudWorkspaceId(almBinding);\n  const isGitLab = alm === AlmKeys.GitLab;\n  const isBitbucketServer = alm === AlmKeys.BitbucketServer;\n  const isBitbucketCloud = alm === AlmKeys.BitbucketCloud;\n  const isGitHub = alm === AlmKeys.GitHub;\n\n  return (\n    <Step\n      finished={finished}\n      onOpen={props.onOpen}\n      open={open}\n      renderForm={() => (\n        <div className=\"boxed-group-inner\">\n          <p className=\"big-spacer-bottom\">\n            {translate('onboarding.tutorial.with.jenkins.multi_branch_pipeline.intro')}\n          </p>\n          <ol className=\"list-styled\">\n            <li>\n              <SentenceWithHighlights\n                highlightKeys={['new_item', 'type']}\n                translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step1\"\n              />\n            </li>\n            <li>\n              <SentenceWithHighlights\n                highlightKeys={['tab', 'source']}\n                translationKey={`onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.${alm}`}\n              />\n              <ul className=\"list-styled\">\n                {isBitbucketServer && (\n                  <>\n                    <li>\n                      <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucket.server\" />\n                    </li>\n                    <li>\n                      <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucket.creds\" />\n                    </li>\n                    <li>\n                      {projectBinding?.repository ? (\n                        <LabelValuePair\n                          translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucket.owner\"\n                          value={projectBinding.repository}\n                        />\n                      ) : (\n                        <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucket.owner\" />\n                      )}\n                    </li>\n                    <li>\n                      {projectBinding?.slug ? (\n                        <LabelValuePair\n                          translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucket.repo\"\n                          value={projectBinding.slug}\n                        />\n                      ) : (\n                        <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucket.repo\" />\n                      )}\n                    </li>\n                  </>\n                )}\n                {isBitbucketCloud && (\n                  <>\n                    <li>\n                      <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucketcloud.server\" />\n                    </li>\n                    <li>\n                      <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucketcloud.creds\" />\n                    </li>\n                    <li>\n                      {workspaceId ? (\n                        <LabelValuePair\n                          translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucketcloud.owner\"\n                          value={workspaceId}\n                        />\n                      ) : (\n                        <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucketcloud.owner\" />\n                      )}\n                    </li>\n                    <li>\n                      {projectBinding?.repository ? (\n                        <LabelValuePair\n                          translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucketcloud.repo\"\n                          value={projectBinding.repository}\n                        />\n                      ) : (\n                        <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.bitbucketcloud.repo\" />\n                      )}\n                    </li>\n                  </>\n                )}\n                {isGitHub && (\n                  <>\n                    <li>\n                      <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.github.creds\" />\n                    </li>\n                    <li>\n                      {almBinding !== undefined &&\n                      projectBinding !== undefined &&\n                      buildGithubLink(almBinding, projectBinding) !== null ? (\n                        <LabelValuePair\n                          translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.github.repo_url\"\n                          value={buildGithubLink(almBinding, projectBinding) as string}\n                        />\n                      ) : (\n                        <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.github.repo_url\" />\n                      )}\n                    </li>\n                  </>\n                )}\n                {isGitLab && (\n                  <>\n                    <li>\n                      <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.gitlab.creds\" />\n                    </li>\n                    <li>\n                      <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.gitlab.owner\" />\n                    </li>\n                    <li>\n                      <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.gitlab.repo\" />\n                    </li>\n                  </>\n                )}\n                <li>\n                  <strong>\n                    {translate(\n                      'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.label'\n                    )}\n                    :\n                  </strong>\n                  <ul className=\"list-styled little-spacer-top abs-width-600\">\n                    <li>\n                      <LabelActionPair\n                        translationKey={`onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.${\n                          isGitLab ? 'branches_mrs' : 'branches_prs'\n                        }`}\n                      />\n                    </li>\n                    <li>\n                      <LabelActionPair\n                        translationKey={`onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.${\n                          isGitLab ? 'discover_mrs' : 'discover_prs'\n                        }`}\n                      />\n                    </li>\n                    <li>\n                      <strong>\n                        {translate(\n                          'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.ref_specs.label'\n                        )}\n                        :\n                      </strong>\n                      <ul className=\"list-styled little-spacer-top\">\n                        <li>\n                          <SentenceWithHighlights\n                            highlightKeys={['add', 'ref_spec']}\n                            translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.ref_specs.add_behaviour\"\n                          />\n                        </li>\n                        <li>\n                          <SentenceWithHighlights\n                            highlightKeys={['ref_spec']}\n                            translationKey={`onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.ref_specs.${\n                              isGitLab ? 'set_mr_ref_specs' : 'set_pr_ref_specs'\n                            }`}\n                          />\n                          <CodeSnippet\n                            isOneLine={true}\n                            snippet=\"+refs/heads/*:refs/remotes/@{remote}/*\"\n                          />\n                        </li>\n                      </ul>\n                    </li>\n                  </ul>\n                </li>\n              </ul>\n              <p className=\"big-spacer-left padder-left\">\n                {translate(\n                  'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.leave_defaults'\n                )}\n              </p>\n            </li>\n            <li>\n              <SentenceWithHighlights\n                highlightKeys={['tab']}\n                translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step3\"\n              />\n              <ul className=\"list-styled\">\n                <li>\n                  <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step3.mode\" />\n                </li>\n                <li>\n                  <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step3.script_path\" />\n                </li>\n              </ul>\n            </li>\n            <li>\n              <SentenceWithHighlights\n                highlightKeys={['save']}\n                translationKey=\"onboarding.tutorial.with.jenkins.multi_branch_pipeline.step4\"\n              />\n            </li>\n          </ol>\n          <Button className=\"big-spacer-top\" onClick={props.onDone}>\n            {translate('continue')}\n            <ChevronRightIcon size={rawSizes.baseFontSizeRaw} />\n          </Button>\n        </div>\n      )}\n      stepNumber={1}\n      stepTitle={translate('onboarding.tutorial.with.jenkins.multi_branch_pipeline.title')}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { rawSizes } from '../../../app/theme';\nimport { Button } from '../../../components/controls/buttons';\nimport ChevronRightIcon from '../../../components/icons/ChevronRightIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport LabelActionPair from '../components/LabelActionPair';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\nimport Step from '../components/Step';\n\nexport interface PipelineStepProps {\n  alm: AlmKeys;\n  finished: boolean;\n  onDone: () => void;\n  onOpen: () => void;\n  open: boolean;\n}\n\nexport default function PipelineStep(props: PipelineStepProps) {\n  const { alm, finished, open } = props;\n  return (\n    <Step\n      finished={finished}\n      onOpen={props.onOpen}\n      open={open}\n      renderForm={() => (\n        <div className=\"boxed-group-inner\">\n          <p className=\"big-spacer-bottom\">\n            {translate('onboarding.tutorial.with.jenkins.pipeline.intro')}\n          </p>\n          <ol className=\"list-styled\">\n            <li>\n              <SentenceWithHighlights\n                highlightKeys={['new_item', 'type']}\n                translationKey=\"onboarding.tutorial.with.jenkins.pipeline.step1\"\n              />\n            </li>\n            <li>\n              {alm === AlmKeys.GitLab ? (\n                <>\n                  <SentenceWithHighlights\n                    highlightKeys={['tab', 'option']}\n                    translationKey=\"onboarding.tutorial.with.jenkins.pipeline.gitlab.step2.trigger\"\n                  />\n                  <ul className=\"list-styled\">\n                    <li>\n                      <SentenceWithHighlights\n                        highlightKeys={['triggers', 'push_events']}\n                        translationKey=\"onboarding.tutorial.with.jenkins.pipeline.gitlab.step2.pick_triggers\"\n                      />\n                    </li>\n                    <li>\n                      <SentenceWithHighlights\n                        highlightKeys={['advanced']}\n                        translationKey=\"onboarding.tutorial.with.jenkins.pipeline.gitlab.step2.click_advanced\"\n                      />\n                    </li>\n                    <li>\n                      <SentenceWithHighlights\n                        highlightKeys={['secret_token', 'generate']}\n                        translationKey=\"onboarding.tutorial.with.jenkins.pipeline.gitlab.step2.secret_token\"\n                      />\n                    </li>\n                  </ul>\n                </>\n              ) : (\n                <SentenceWithHighlights\n                  highlightKeys={['tab', 'option']}\n                  translationKey=\"onboarding.tutorial.with.jenkins.pipeline.step2\"\n                />\n              )}\n            </li>\n            <li>\n              <SentenceWithHighlights\n                highlightKeys={['tab']}\n                translationKey=\"onboarding.tutorial.with.jenkins.pipeline.step3\"\n              />\n              <ul className=\"list-styled\">\n                <li>\n                  <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.pipeline.step3.definition\" />\n                </li>\n                <li>\n                  <SentenceWithHighlights\n                    highlightKeys={['label', 'branches_to_build']}\n                    translationKey=\"onboarding.tutorial.with.jenkins.pipeline.step3.scm\"\n                  />\n                </li>\n                <li>\n                  <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.pipeline.step3.script_path\" />\n                </li>\n              </ul>\n            </li>\n            <li>\n              <SentenceWithHighlights\n                highlightKeys={['save']}\n                translationKey=\"onboarding.tutorial.with.jenkins.pipeline.step4\"\n              />\n            </li>\n          </ol>\n          <Button className=\"big-spacer-top\" onClick={props.onDone}>\n            {translate('continue')}\n            <ChevronRightIcon size={rawSizes.baseFontSizeRaw} />\n          </Button>\n        </div>\n      )}\n      stepNumber={1}\n      stepTitle={translate('onboarding.tutorial.with.jenkins.pipeline.title')}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { rawSizes } from '../../../app/theme';\nimport { Button } from '../../../components/controls/buttons';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport ChevronRightIcon from '../../../components/icons/ChevronRightIcon';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\nimport Step from '../components/Step';\n\nexport interface PreRequisitesStepProps {\n  alm: AlmKeys;\n  branchesEnabled: boolean;\n  finished: boolean;\n  onChangeSkipNextTime: (skip: boolean) => void;\n  onDone: () => void;\n  onOpen: () => void;\n  open: boolean;\n  skipNextTime: boolean;\n}\n\nexport default function PreRequisitesStep(props: PreRequisitesStepProps) {\n  const { alm, branchesEnabled, finished, open, skipNextTime } = props;\n  return (\n    <Step\n      finished={finished}\n      onOpen={props.onOpen}\n      open={open}\n      renderForm={() => (\n        <div className=\"boxed-group-inner\">\n          <Alert className=\"big-spacer-bottom\" variant=\"warning\">\n            <SentenceWithHighlights\n              highlightKeys={['installed', 'configured']}\n              translationKey=\"onboarding.tutorial.with.jenkins.prereqs.intro\"\n            />\n          </Alert>\n          <ul className=\"list-styled big-spacer-bottom\">\n            {branchesEnabled && (\n              <li>\n                {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.branch_source', alm)}\n              </li>\n            )}\n            {!branchesEnabled && alm === AlmKeys.GitLab && (\n              <li>{translate('onboarding.tutorial.with.jenkins.prereqs.plugins.gitlab_plugin')}</li>\n            )}\n            <li>{translate('onboarding.tutorial.with.jenkins.prereqs.plugins.sonar_scanner')}</li>\n          </ul>\n          <p className=\"big-spacer-bottom\">\n            <FormattedMessage\n              defaultMessage={translate(\n                'onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide'\n              )}\n              id=\"onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide\"\n              values={{\n                link: (\n                  <Link target=\"_blank\" to=\"/documentation/analysis/jenkins/\">\n                    {translate('onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link')}\n                  </Link>\n                )\n              }}\n            />\n          </p>\n          <p className=\"big-spacer-bottom\">\n            {translate('onboarding.tutorial.with.jenkins.prereqs.following_are_recommendations')}\n          </p>\n          <p className=\"big-spacer-bottom display-flex-center\">\n            <label\n              className=\"cursor-pointer\"\n              htmlFor=\"skip-prereqs\"\n              onClick={() => {\n                props.onChangeSkipNextTime(!skipNextTime);\n              }}>\n              {translate('onboarding.tutorial.with.jenkins.prereqs.skip_next_time')}\n            </label>\n            <Checkbox\n              checked={skipNextTime}\n              className=\"little-spacer-left\"\n              id=\"skip-prereqs\"\n              onCheck={props.onChangeSkipNextTime}\n            />\n          </p>\n          <Button className=\"big-spacer-top\" onClick={props.onDone}>\n            {translate('onboarding.tutorial.with.jenkins.prereqs.done')}\n            <ChevronRightIcon size={rawSizes.baseFontSizeRaw} />\n          </Button>\n        </div>\n      )}\n      stepTitle={translate('onboarding.tutorial.with.jenkins.prereqs.title')}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioToggle from '../../../components/controls/RadioToggle';\nimport AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';\nimport { hasMessage, translate } from '../../../helpers/l10n';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport Step from '../components/Step';\n\nexport interface SelectAlmStepProps {\n  alm?: AlmKeys;\n  open: boolean;\n  onCheck: (value: AlmKeys) => void;\n  onOpen: () => void;\n}\n\nfunction getAlmLongName(alm: AlmKeys) {\n  return hasMessage('alm', alm, 'long') ? translate('alm', alm, 'long') : translate('alm', alm);\n}\n\nexport default function SelectAlmStep(props: SelectAlmStepProps) {\n  const { alm, open } = props;\n  return (\n    <Step\n      finished={true}\n      open={open}\n      onOpen={props.onOpen}\n      renderForm={() => (\n        <div className=\"boxed-group-inner\">\n          <RadioToggle\n            name=\"alm\"\n            onCheck={props.onCheck}\n            options={[\n              AlmKeys.BitbucketCloud,\n              AlmKeys.BitbucketServer,\n              AlmKeys.GitHub,\n              AlmKeys.GitLab\n            ].map(almKey => ({\n              label: getAlmLongName(almKey),\n              value: almKey\n            }))}\n            value={alm}\n          />\n        </div>\n      )}\n      renderResult={() =>\n        alm && (\n          <div className=\"boxed-group-actions display-flex-center\">\n            <AlertSuccessIcon className=\"spacer-right\" />\n            {getAlmLongName(alm)}\n          </div>\n        )\n      }\n      stepTitle={translate('onboarding.tutorial.with.jenkins.alm_selection.title')}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { stripTrailingSlash } from '../../../helpers/urls';\nimport {\n  AlmKeys,\n  AlmSettingsInstance,\n  ProjectAlmBindingResponse\n} from '../../../types/alm-settings';\nimport CodeSnippet from '../../common/CodeSnippet';\nimport LabelActionPair from '../components/LabelActionPair';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\nimport { buildBitbucketCloudLink } from '../utils';\n\nexport interface WebhookStepBitbucketProps {\n  alm: AlmKeys;\n  almBinding?: AlmSettingsInstance;\n  branchesEnabled: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nfunction buildUrlSnippet(\n  branchesEnabled: boolean,\n  isBitbucketcloud: boolean,\n  ownUrl = '***BITBUCKET_URL***'\n) {\n  if (!branchesEnabled) {\n    return '***JENKINS_SERVER_URL***/job/***JENKINS_JOB_NAME***/build?token=***JENKINS_BUILD_TRIGGER_TOKEN***';\n  }\n  return isBitbucketcloud\n    ? '***JENKINS_SERVER_URL***/bitbucket-scmsource-hook/notify'\n    : `***JENKINS_SERVER_URL***/bitbucket-scmsource-hook/notify?server_url=${ownUrl}`;\n}\n\nexport default function WebhookStepBitbucket(props: WebhookStepBitbucketProps) {\n  const { alm, almBinding, branchesEnabled, projectBinding } = props;\n\n  const isBitbucketCloud = alm === AlmKeys.BitbucketCloud;\n\n  let linkUrl;\n  if (almBinding?.url && projectBinding) {\n    if (isBitbucketCloud && projectBinding?.repository) {\n      linkUrl = `${buildBitbucketCloudLink(\n        almBinding,\n        projectBinding\n      )}/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin`;\n    } else if (projectBinding.slug) {\n      linkUrl = `${stripTrailingSlash(almBinding.url)}/plugins/servlet/webhooks/projects/${\n        projectBinding.repository\n      }/repos/${projectBinding.slug}/create`;\n    }\n  }\n\n  return (\n    <>\n      <li>\n        <FormattedMessage\n          defaultMessage={translate('onboarding.tutorial.with.jenkins.webhook.step1.sentence')}\n          id=\"onboarding.tutorial.with.jenkins.webhook.step1.sentence\"\n          values={{\n            link: linkUrl ? (\n              <a href={linkUrl} rel=\"noopener noreferrer\" target=\"_blank\">\n                {translate('onboarding.tutorial.with.jenkins.webhook', alm, 'step1.link')}\n              </a>\n            ) : (\n              <strong>\n                {translate('onboarding.tutorial.with.jenkins.webhook', alm, 'step1.link')}\n              </strong>\n            )\n          }}\n        />\n        <ul className=\"list-styled\">\n          <li>\n            <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.step1.name\" />\n          </li>\n          <li className=\"abs-width-600\">\n            <p>\n              <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucket.step1.url\" />\n            </p>\n            <CodeSnippet\n              isOneLine={true}\n              snippet={buildUrlSnippet(\n                branchesEnabled,\n                isBitbucketCloud,\n                almBinding && almBinding.url\n              )}\n            />\n            {branchesEnabled && !isBitbucketCloud && (\n              <Alert variant=\"info\">\n                {translate('onboarding.tutorial.with.jenkins.webhook.bitbucket.step1.url.warning')}\n              </Alert>\n            )}\n          </li>\n        </ul>\n      </li>\n      {isBitbucketCloud ? (\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['triggers', 'option']}\n            translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucketcloud.step2\"\n          />\n          <ul className=\"list-styled\">\n            <li>\n              <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucketcloud.step2.repo\" />\n            </li>\n            {branchesEnabled && (\n              <li>\n                <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucketcloud.step2.pr\" />\n              </li>\n            )}\n          </ul>\n        </li>\n      ) : (\n        <li>\n          <SentenceWithHighlights\n            highlightKeys={['events']}\n            translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucket.step2\"\n          />\n          <ul className=\"list-styled\">\n            <li>\n              <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucket.step2.repo\" />\n            </li>\n            {branchesEnabled && (\n              <li>\n                <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucket.step2.pr\" />\n              </li>\n            )}\n          </ul>\n        </li>\n      )}\n      <li>\n        {isBitbucketCloud ? (\n          <SentenceWithHighlights\n            highlightKeys={['save']}\n            translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucketcloud.step3\"\n          />\n        ) : (\n          <SentenceWithHighlights\n            highlightKeys={['create']}\n            translationKey=\"onboarding.tutorial.with.jenkins.webhook.bitbucket.step3\"\n          />\n        )}\n      </li>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings';\nimport CodeSnippet from '../../common/CodeSnippet';\nimport LabelActionPair from '../components/LabelActionPair';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\nimport { buildGithubLink } from '../utils';\n\nexport interface WebhookStepGithubProps {\n  almBinding?: AlmSettingsInstance;\n  branchesEnabled: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nexport default function WebhookStepGithub(props: WebhookStepGithubProps) {\n  const { almBinding, branchesEnabled, projectBinding } = props;\n\n  const linkUrl =\n    almBinding && projectBinding && `${buildGithubLink(almBinding, projectBinding)}/settings/hooks`;\n\n  const webhookUrl = branchesEnabled\n    ? '***JENKINS_SERVER_URL***/github-webhook/'\n    : '***JENKINS_SERVER_URL***/job/***JENKINS_JOB_NAME***/build?token=***JENKINS_BUILD_TRIGGER_TOKEN***';\n\n  return (\n    <>\n      <li>\n        <FormattedMessage\n          defaultMessage={translate('onboarding.tutorial.with.jenkins.webhook.step1.sentence')}\n          id=\"onboarding.tutorial.with.jenkins.webhook.step1.sentence\"\n          values={{\n            link: linkUrl ? (\n              <a href={linkUrl} rel=\"noopener noreferrer\" target=\"_blank\">\n                {translate('onboarding.tutorial.with.jenkins.webhook.github.step1.link')}\n              </a>\n            ) : (\n              <strong>\n                {translate('onboarding.tutorial.with.jenkins.webhook.github.step1.link')}\n              </strong>\n            )\n          }}\n        />\n        <ul className=\"list-styled\">\n          <li className=\"abs-width-600\">\n            <p>\n              <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.github.step1.url\" />\n            </p>\n            <CodeSnippet isOneLine={true} snippet={webhookUrl} />\n          </li>\n        </ul>\n      </li>\n      <li>\n        <SentenceWithHighlights\n          highlightKeys={['events', 'option']}\n          translationKey=\"onboarding.tutorial.with.jenkins.webhook.github.step2\"\n        />\n        <ul className=\"list-styled\">\n          <li>\n            <strong>\n              {translate('onboarding.tutorial.with.jenkins.webhook.github.step2.repo')}\n            </strong>\n          </li>\n          {branchesEnabled && (\n            <li>\n              <strong>\n                {translate('onboarding.tutorial.with.jenkins.webhook.github.step2.pr')}\n              </strong>\n            </li>\n          )}\n        </ul>\n      </li>\n      <li>\n        <SentenceWithHighlights\n          highlightKeys={['add_webhook']}\n          translationKey=\"onboarding.tutorial.with.jenkins.webhook.github.step3\"\n        />\n      </li>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../helpers/l10n';\nimport CodeSnippet from '../../common/CodeSnippet';\nimport LabelActionPair from '../components/LabelActionPair';\nimport SentenceWithHighlights from '../components/SentenceWithHighlights';\n\nexport interface WebhookStepGitLabProps {\n  branchesEnabled: boolean;\n}\n\nexport default function WebhookStepGitLab({ branchesEnabled }: WebhookStepGitLabProps) {\n  return (\n    <>\n      <li>\n        <FormattedMessage\n          defaultMessage={translate('onboarding.tutorial.with.jenkins.webhook.step1.sentence')}\n          id=\"onboarding.tutorial.with.jenkins.webhook.step1.sentence\"\n          values={{\n            link: translate('onboarding.tutorial.with.jenkins.webhook.gitlab.step1.link')\n          }}\n        />\n        <ul className=\"list-styled\">\n          {branchesEnabled ? (\n            <li className=\"abs-width-600\">\n              <p>\n                <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.gitlab.step1.url_with_branches\" />\n              </p>\n              <CodeSnippet\n                isOneLine={true}\n                snippet=\"***JENKINS_SERVER_URL***/gitlab-webhook/post\"\n              />\n            </li>\n          ) : (\n            <>\n              <li>\n                <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.gitlab.step1.url_no_branches\" />\n              </li>\n              <li>\n                <LabelActionPair translationKey=\"onboarding.tutorial.with.jenkins.webhook.gitlab.step1.secret_token\" />\n              </li>\n            </>\n          )}\n        </ul>\n      </li>\n      <li>\n        <SentenceWithHighlights\n          highlightKeys={['trigger']}\n          translationKey=\"onboarding.tutorial.with.jenkins.webhook.gitlab.step2\"\n        />\n        <ul className=\"list-styled\">\n          <li>\n            <strong>\n              {translate('onboarding.tutorial.with.jenkins.webhook.gitlab.step2.repo')}\n            </strong>\n          </li>\n          {branchesEnabled && (\n            <li>\n              <strong>\n                {translate('onboarding.tutorial.with.jenkins.webhook.gitlab.step2.mr')}\n              </strong>\n            </li>\n          )}\n        </ul>\n      </li>\n      <li>\n        <SentenceWithHighlights\n          highlightKeys={['add_webhook']}\n          translationKey=\"onboarding.tutorial.with.jenkins.webhook.gitlab.step3\"\n        />\n      </li>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { rawSizes } from '../../../app/theme';\nimport { Button, ButtonLink } from '../../../components/controls/buttons';\nimport ChevronRightIcon from '../../../components/icons/ChevronRightIcon';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  AlmKeys,\n  AlmSettingsInstance,\n  ProjectAlmBindingResponse\n} from '../../../types/alm-settings';\nimport Step from '../components/Step';\nimport WebhookStepBitbucket from './WebhookStepBitbucket';\nimport WebhookStepGithub from './WebhookStepGithub';\nimport WebhookStepGitLab from './WebhookStepGitLab';\n\nexport interface WebhookStepProps {\n  alm: AlmKeys;\n  almBinding?: AlmSettingsInstance;\n  branchesEnabled: boolean;\n  finished: boolean;\n  onDone: () => void;\n  onOpen: () => void;\n  open: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nfunction renderAlmSpecificInstructions(props: WebhookStepProps) {\n  const { alm, almBinding, branchesEnabled, projectBinding } = props;\n\n  switch (alm) {\n    case AlmKeys.BitbucketCloud:\n    case AlmKeys.BitbucketServer:\n      return (\n        <WebhookStepBitbucket\n          alm={alm}\n          almBinding={almBinding}\n          branchesEnabled={branchesEnabled}\n          projectBinding={projectBinding}\n        />\n      );\n\n    case AlmKeys.GitHub:\n      return (\n        <WebhookStepGithub\n          almBinding={almBinding}\n          branchesEnabled={branchesEnabled}\n          projectBinding={projectBinding}\n        />\n      );\n\n    case AlmKeys.GitLab:\n      return <WebhookStepGitLab branchesEnabled={branchesEnabled} />;\n\n    default:\n      return null;\n  }\n}\n\nexport default function WebhookStep(props: WebhookStepProps) {\n  const { alm, finished, open } = props;\n\n  return (\n    <Step\n      finished={finished}\n      onOpen={props.onOpen}\n      open={open}\n      renderForm={() => (\n        <div className=\"boxed-group-inner\">\n          <p className=\"big-spacer-bottom\">\n            <FormattedMessage\n              defaultMessage={translate('onboarding.tutorial.with.jenkins.webhook.intro.sentence')}\n              id=\"onboarding.tutorial.with.jenkins.webhook.intro.sentence\"\n              values={{\n                link: (\n                  <ButtonLink onClick={props.onDone}>\n                    {translate('onboarding.tutorial.with.jenkins.webhook.intro.link')}\n                  </ButtonLink>\n                )\n              }}\n            />\n          </p>\n          <ol className=\"list-styled\">{renderAlmSpecificInstructions(props)}</ol>\n          <Button className=\"big-spacer-top\" onClick={props.onDone}>\n            {translate('continue')}\n            <ChevronRightIcon size={rawSizes.baseFontSizeRaw} />\n          </Button>\n        </div>\n      )}\n      stepNumber={2}\n      stepTitle={translate('onboarding.tutorial.with.jenkins.webhook', alm, 'title')}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { translate } from '../../../helpers/l10n';\nimport { getAppState, getCurrentUserSetting, Store } from '../../../store/rootReducer';\nimport { setCurrentUserSetting } from '../../../store/users';\nimport {\n  AlmKeys,\n  AlmSettingsInstance,\n  ProjectAlmBindingResponse\n} from '../../../types/alm-settings';\nimport AllSetStep from '../components/AllSetStep';\nimport JenkinsfileStep from './JenkinsfileStep';\nimport MultiBranchPipelineStep from './MultiBranchPipelineStep';\nimport PipelineStep from './PipelineStep';\nimport PreRequisitesStep from './PreRequisitesStep';\nimport SelectAlmStep from './SelectAlmStep';\nimport WebhookStep from './WebhookStep';\n\nexport interface JenkinsTutorialProps {\n  almBinding?: AlmSettingsInstance;\n  baseUrl: string;\n  branchesEnabled: boolean;\n  component: T.Component;\n  projectBinding?: ProjectAlmBindingResponse;\n  setCurrentUserSetting: (setting: T.CurrentUserSetting) => void;\n  skipPreReqs: boolean;\n  willRefreshAutomatically?: boolean;\n}\n\nenum Steps {\n  SelectAlm = 0,\n  PreRequisites = 1,\n  MultiBranchPipeline = 2,\n  Webhook = 3,\n  Jenkinsfile = 4,\n  AllSet = 5\n}\n\nconst USER_SETTING_SKIP_BITBUCKET_PREREQS = 'tutorials.jenkins.skipBitbucketPreReqs';\n\nexport function JenkinsTutorial(props: JenkinsTutorialProps) {\n  const {\n    almBinding,\n    baseUrl,\n    branchesEnabled,\n    component,\n    projectBinding,\n    skipPreReqs,\n    willRefreshAutomatically\n  } = props;\n  const hasSelectAlmStep = projectBinding?.alm === undefined;\n  const [alm, setAlm] = React.useState<AlmKeys | undefined>(projectBinding?.alm);\n\n  let startStep;\n  if (alm) {\n    startStep = skipPreReqs ? Steps.MultiBranchPipeline : Steps.PreRequisites;\n  } else {\n    startStep = Steps.SelectAlm;\n  }\n  const [step, setStep] = React.useState(startStep);\n\n  return (\n    <>\n      <div className=\"page-header big-spacer-bottom\">\n        <h1 className=\"page-title\">{translate('onboarding.tutorial.with.jenkins.title')}</h1>\n      </div>\n\n      {hasSelectAlmStep && (\n        <SelectAlmStep\n          alm={alm}\n          open={step === Steps.SelectAlm}\n          onCheck={value => {\n            setAlm(value);\n            setStep(Steps.PreRequisites);\n          }}\n          onOpen={() => setStep(Steps.SelectAlm)}\n        />\n      )}\n\n      {alm && (\n        <>\n          <PreRequisitesStep\n            alm={alm}\n            branchesEnabled={branchesEnabled}\n            finished={step > Steps.PreRequisites}\n            onDone={() => setStep(Steps.MultiBranchPipeline)}\n            onOpen={() => setStep(Steps.PreRequisites)}\n            onChangeSkipNextTime={skip => {\n              props.setCurrentUserSetting({\n                key: USER_SETTING_SKIP_BITBUCKET_PREREQS,\n                value: skip.toString()\n              });\n            }}\n            open={step === Steps.PreRequisites}\n            skipNextTime={skipPreReqs}\n          />\n\n          {branchesEnabled ? (\n            <MultiBranchPipelineStep\n              alm={alm}\n              almBinding={almBinding}\n              finished={step > Steps.MultiBranchPipeline}\n              onDone={() => setStep(Steps.Webhook)}\n              onOpen={() => setStep(Steps.MultiBranchPipeline)}\n              open={step === Steps.MultiBranchPipeline}\n              projectBinding={projectBinding}\n            />\n          ) : (\n            <PipelineStep\n              alm={alm}\n              finished={step > Steps.MultiBranchPipeline}\n              onDone={() => setStep(Steps.Webhook)}\n              onOpen={() => setStep(Steps.MultiBranchPipeline)}\n              open={step === Steps.MultiBranchPipeline}\n            />\n          )}\n\n          <WebhookStep\n            alm={alm}\n            almBinding={almBinding}\n            branchesEnabled={branchesEnabled}\n            finished={step > Steps.Webhook}\n            onDone={() => setStep(Steps.Jenkinsfile)}\n            onOpen={() => setStep(Steps.Webhook)}\n            open={step === Steps.Webhook}\n            projectBinding={projectBinding}\n          />\n\n          <JenkinsfileStep\n            component={component}\n            baseUrl={baseUrl}\n            finished={step > Steps.Jenkinsfile}\n            onDone={() => setStep(Steps.AllSet)}\n            onOpen={() => setStep(Steps.Jenkinsfile)}\n            open={step === Steps.Jenkinsfile}\n          />\n\n          <AllSetStep\n            alm={alm}\n            open={step === Steps.AllSet}\n            stepNumber={4}\n            willRefreshAutomatically={willRefreshAutomatically}\n          />\n        </>\n      )}\n    </>\n  );\n}\n\nconst mapStateToProps = (\n  state: Store\n): Pick<JenkinsTutorialProps, 'branchesEnabled' | 'skipPreReqs'> => {\n  return {\n    branchesEnabled: Boolean(getAppState(state).branchesEnabled),\n    skipPreReqs: getCurrentUserSetting(state, USER_SETTING_SKIP_BITBUCKET_PREREQS) === 'true'\n  };\n};\n\nconst mapDispatchToProps = { setCurrentUserSetting };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(JenkinsTutorial);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioToggle from '../../../components/controls/RadioToggle';\nimport { translate } from '../../../helpers/l10n';\nimport { withCLanguageFeature } from '../../hoc/withCLanguageFeature';\nimport GithubCFamilyExampleRepositories from '../components/GithubCFamilyExampleRepositories';\nimport RenderOptions from '../components/RenderOptions';\nimport { BuildTools, ManualTutorialConfig, OSs, TutorialModes } from '../types';\n\ninterface Props {\n  hasCLanguageFeature: boolean;\n  config?: ManualTutorialConfig;\n  onDone: (config: ManualTutorialConfig) => void;\n}\n\ninterface State {\n  config: ManualTutorialConfig;\n}\n\nexport class BuildToolForm extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      config: this.props.config || {}\n    };\n  }\n\n  handleBuildToolChange = (buildTool: BuildTools) => {\n    this.setState({ config: { buildTool } }, () => {\n      this.props.onDone(this.state.config);\n    });\n  };\n\n  handleOSChange = (os: OSs) => {\n    this.setState(\n      ({ config }) => ({ config: { buildTool: config.buildTool, os } }),\n      () => {\n        this.props.onDone(this.state.config);\n      }\n    );\n  };\n\n  render() {\n    const { config } = this.state;\n    const { hasCLanguageFeature } = this.props;\n    const buildTools = [BuildTools.Maven, BuildTools.Gradle, BuildTools.DotNet];\n    if (hasCLanguageFeature) {\n      buildTools.push(BuildTools.CFamily);\n    }\n    buildTools.push(BuildTools.Other);\n\n    return (\n      <>\n        <div>\n          <h4 className=\"spacer-bottom\">{translate('onboarding.build')}</h4>\n          <RadioToggle\n            name=\"language\"\n            onCheck={this.handleBuildToolChange}\n            options={buildTools.map(tool => ({\n              label: translate('onboarding.build', tool),\n              value: tool\n            }))}\n            value={config.buildTool}\n          />\n        </div>\n\n        {(config.buildTool === BuildTools.Other || config.buildTool === BuildTools.CFamily) && (\n          <RenderOptions\n            checked={config.os}\n            name=\"os\"\n            onCheck={this.handleOSChange}\n            optionLabelKey=\"onboarding.build.other.os\"\n            options={[OSs.Linux, OSs.Windows, OSs.MacOS]}\n            titleLabelKey=\"onboarding.build.other.os\"\n          />\n        )}\n\n        {config.buildTool === BuildTools.CFamily && config.os && (\n          <GithubCFamilyExampleRepositories\n            className=\"big-spacer-top abs-width-600\"\n            os={config.os}\n            ci={TutorialModes.Manual}\n          />\n        )}\n      </>\n    );\n  }\n}\n\nexport default withCLanguageFeature(BuildToolForm);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../../helpers/l10n';\nimport { getBaseUrl } from '../../../../helpers/system';\nimport { OSs } from '../../types';\n\nexport interface DownloadBuildWrapperProps {\n  os: OSs;\n}\n\nconst filenames: { [x in OSs]: string } = {\n  win: 'build-wrapper-win-x86.zip',\n  linux: 'build-wrapper-linux-x86.zip',\n  mac: 'build-wrapper-macosx-x86.zip'\n};\n\nexport default function DownloadBuildWrapper(props: DownloadBuildWrapperProps) {\n  const { os } = props;\n  return (\n    <div className=\"spacer-bottom\">\n      <h4 className=\"spacer-bottom\">{translate('onboarding.analysis.build_wrapper.header', os)}</h4>\n      <p className=\"spacer-bottom markdown\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.analysis.build_wrapper.text')}\n          id=\"onboarding.analysis.build_wrapper.text\"\n          values={{\n            env_var: <code>{os === 'win' ? '%PATH%' : 'PATH'}</code>\n          }}\n        />\n      </p>\n      <p>\n        <a\n          className=\"button\"\n          download={filenames[os]}\n          href={`${getBaseUrl()}/static/cpp/${filenames[os]}`}\n          rel=\"noopener noreferrer\"\n          target=\"_blank\">\n          {translate('download_verb')}\n        </a>\n      </p>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../../helpers/l10n';\nimport { OSs } from '../../types';\n\ninterface Props {\n  os: OSs;\n}\n\nexport default function DownloadScanner(props: Props) {\n  const { os } = props;\n  return (\n    <div>\n      <h4 className=\"spacer-bottom\">{translate('onboarding.analysis.sq_scanner.header', os)}</h4>\n      <p className=\"spacer-bottom markdown\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.analysis.sq_scanner.text')}\n          id=\"onboarding.analysis.sq_scanner.text\"\n          values={{\n            dir: <code>bin</code>,\n            env_var: <code>{os === OSs.Windows ? '%PATH%' : 'PATH'}</code>,\n            link: (\n              <a\n                href=\"https://redirect.sonarsource.com/doc/download-scanner.html\"\n                rel=\"noopener noreferrer\"\n                target=\"_blank\">\n                {translate('onboarding.analysis.sq_scanner.docs_link')}\n              </a>\n            )\n          }}\n        />\n      </p>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { translate } from '../../../../helpers/l10n';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport { OSs } from '../../types';\n\nexport interface ExecBuildWrapperProps {\n  os: OSs;\n}\n\nconst executables: { [x in OSs]: string } = {\n  linux: 'build-wrapper-linux-x86-64',\n  win: 'build-wrapper-win-x86-64.exe',\n  mac: 'build-wrapper-macosx-x86'\n};\n\nexport default function ExecBuildWrapper(props: ExecBuildWrapperProps) {\n  const { os } = props;\n\n  return (\n    <>\n      <h4 className=\"huge-spacer-top spacer-bottom\">\n        {translate('onboarding.analysis.build_wrapper.execute')}\n      </h4>\n      <p className=\"spacer-bottom markdown\">\n        {translate('onboarding.analysis.build_wrapper.execute_text')}\n      </p>\n      <CodeSnippet\n        snippet={`${executables[os]} --out-dir bw-output ${translate(\n          'onboarding.analysis.build_wrapper.execute_build_command'\n        )}`}\n      />\n      <p className=\"big-spacer-top markdown\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.analysis.build_wrapper.docs')}\n          id=\"onboarding.analysis.build_wrapper.docs\"\n          values={{\n            link: (\n              <Link to=\"/documentation/analysis/languages/cfamily/\" target=\"_blank\">\n                {translate('onboarding.analysis.build_wrapper.docs_link')}\n              </Link>\n            )\n          }}\n        />\n      </p>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface DoneNextStepsProps {\n  component: T.Component;\n}\n\nexport default function DoneNextSteps({ component }: DoneNextStepsProps) {\n  const isProjectAdmin = component.configuration?.showSettings;\n\n  return (\n    <>\n      <hr className=\"big-spacer-top big-spacer-bottom\" />\n\n      <p>\n        <strong>{translate('onboarding.analysis.auto_refresh_after_analysis.done')}</strong>{' '}\n        {translate('onboarding.analysis.auto_refresh_after_analysis.auto_refresh')}\n      </p>\n      <p className=\"big-spacer-top\">\n        {isProjectAdmin\n          ? translate('onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.admin')\n          : translate('onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci')}\n      </p>\n      <p className=\"big-spacer-top\">\n        <FormattedMessage\n          defaultMessage={translate(\n            'onboarding.analysis.auto_refresh_after_analysis.check_these_links'\n          )}\n          id=\"onboarding.analysis.auto_refresh_after_analysis.check_these_links\"\n          values={{\n            link_branches: (\n              <Link\n                to=\"/documentation/branches/overview/\"\n                target=\"_blank\"\n                rel=\"noopener noreferrer\">\n                {translate(\n                  'onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches'\n                )}\n              </Link>\n            ),\n            link_pr_analysis: (\n              <Link\n                to=\"/documentation/analysis/pull-request/\"\n                target=\"_blank\"\n                rel=\"noopener noreferrer\">\n                {translate(\n                  'onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis'\n                )}\n              </Link>\n            )\n          }}\n        />\n      </p>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { translate } from '../../../../helpers/l10n';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport InstanceMessage from '../../../common/InstanceMessage';\nimport { OSs } from '../../types';\nimport { quote } from '../../utils';\nimport DoneNextSteps from '../DoneNextSteps';\n\nexport interface ExecScannerProps {\n  component: T.Component;\n  host: string;\n  os: OSs;\n  token: string;\n  cfamily?: boolean;\n}\n\nexport default function ExecScanner(props: ExecScannerProps) {\n  const { host, os, component, token, cfamily } = props;\n\n  const q = quote(os);\n  const command = [\n    os === OSs.Windows ? 'sonar-scanner.bat' : 'sonar-scanner',\n    '-D' + q(`sonar.projectKey=${component.key}`),\n    '-D' + q('sonar.sources=.'),\n    cfamily ? '-D' + q('sonar.cfamily.build-wrapper-output=bw-output') : undefined,\n    '-D' + q(`sonar.host.url=${host}`),\n    '-D' + q(`sonar.login=${token}`)\n  ];\n\n  return (\n    <div>\n      <h4 className=\"huge-spacer-top spacer-bottom\">\n        {translate('onboarding.analysis.sq_scanner.execute')}\n      </h4>\n      <InstanceMessage message={translate('onboarding.analysis.sq_scanner.execute.text')}>\n        {transformedMessage => <p className=\"spacer-bottom markdown\">{transformedMessage}</p>}\n      </InstanceMessage>\n      <CodeSnippet isOneLine={os === OSs.Windows} snippet={command} />\n      <p className=\"big-spacer-top markdown\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.analysis.sq_scanner.docs')}\n          id=\"onboarding.analysis.sq_scanner.docs\"\n          values={{\n            link: (\n              <Link to=\"/documentation/analysis/scan/sonarscanner/\" target=\"_blank\">\n                {translate('onboarding.analysis.sq_scanner.docs_link')}\n              </Link>\n            )\n          }}\n        />\n      </p>\n      <DoneNextSteps component={component} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { CompilationInfo } from '../../components/CompilationInfo';\nimport { OSs } from '../../types';\nimport DownloadBuildWrapper from './DownloadBuildWrapper';\nimport DownloadScanner from './DownloadScanner';\nimport ExecBuildWrapper from './ExecBuildWrapper';\nimport ExecScanner from './ExecScanner';\n\nexport interface ClangGCCCustomProps {\n  component: T.Component;\n  host: string;\n  os: OSs;\n  token: string;\n}\n\nexport default function ClangGCCCustom(props: ClangGCCCustomProps) {\n  const { os, host, component, token } = props;\n\n  return (\n    <div>\n      <DownloadBuildWrapper os={os} />\n      <DownloadScanner os={os} />\n      <ExecBuildWrapper os={os} />\n      <CompilationInfo />\n      <ExecScanner host={host} component={component} os={os} token={token} cfamily={true} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { translate } from '../../../../helpers/l10n';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport InstanceMessage from '../../../common/InstanceMessage';\nimport DoneNextSteps from '../DoneNextSteps';\n\nexport interface DotNetExecuteProps {\n  commands: string[];\n  component: T.Component;\n}\n\nexport default function DotNetExecute({ commands, component }: DotNetExecuteProps) {\n  return (\n    <>\n      <h4 className=\"huge-spacer-top spacer-bottom\">\n        {translate('onboarding.analysis.sq_scanner.execute')}\n      </h4>\n\n      <InstanceMessage message={translate('onboarding.analysis.msbuild.execute.text')}>\n        {transformedMessage => <p className=\"spacer-bottom markdown\">{transformedMessage}</p>}\n      </InstanceMessage>\n      {commands.map((command, index) => (\n        <CodeSnippet key={index} snippet={command} />\n      ))}\n      <p className=\"big-spacer-top markdown\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.analysis.docs')}\n          id=\"onboarding.analysis.docs\"\n          values={{\n            link: (\n              <Link to=\"/documentation/analysis/scan/sonarscanner-for-msbuild/\" target=\"_blank\">\n                {translate('onboarding.analysis.msbuild.docs_link')}\n              </Link>\n            )\n          }}\n        />\n      </p>\n      <DoneNextSteps component={component} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport { DotNetProps } from './DotNet';\nimport DotNetExecute from './DotNetExecute';\n\nexport default function DotNetCore(props: DotNetProps) {\n  const { host, component, token } = props;\n\n  const commands = [\n    `dotnet sonarscanner begin /k:\"${component.key}\" /d:sonar.host.url=\"${host}\"  /d:sonar.login=\"${token}\"`,\n    'dotnet build',\n    `dotnet sonarscanner end /d:sonar.login=\"${token}\"`\n  ];\n\n  return (\n    <div>\n      <h4 className=\"huge-spacer-top spacer-bottom\">\n        {translate('onboarding.analysis.dotnetcore.global')}\n      </h4>\n      <p className=\"big-spacer-top markdown\">\n        {translate('onboarding.analysis.dotnetcore.global.text')}\n      </p>\n      <CodeSnippet snippet=\"dotnet tool install --global dotnet-sonarscanner\" />\n      <Alert className=\"spacer-top\" variant=\"info\">\n        {translate('onboarding.analysis.dotnetcore.global.text.path')}\n      </Alert>\n      <DotNetExecute commands={commands} component={component} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../../../helpers/l10n';\nimport { DotNetProps } from './DotNet';\nimport DotNetExecute from './DotNetExecute';\n\nexport default function DotNetFramework(props: DotNetProps) {\n  const { host, component, token } = props;\n\n  const commands = [\n    `SonarScanner.MSBuild.exe begin /k:\"${component.key}\" /d:sonar.host.url=\"${host}\" /d:sonar.login=\"${token}\"`,\n    'MsBuild.exe /t:Rebuild',\n    `SonarScanner.MSBuild.exe end /d:sonar.login=\"${token}\"`\n  ];\n\n  return (\n    <div>\n      <div>\n        <h4 className=\"spacer-bottom huge-spacer-top\">\n          {translate('onboarding.analysis.msbuild.header')}\n        </h4>\n        <p className=\"markdown\">\n          <FormattedMessage\n            defaultMessage={translate('onboarding.analysis.msbuild.text')}\n            id=\"onboarding.analysis.msbuild.text\"\n            values={{\n              code: <code>%PATH%</code>,\n              link: (\n                <a\n                  href=\"https://redirect.sonarsource.com/doc/download-scanner-msbuild.html\"\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  {translate('onboarding.analysis.msbuild.docs_link')}\n                </a>\n              )\n            }}\n          />\n        </p>\n      </div>\n\n      <DotNetExecute commands={commands} component={component} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RenderOptions from '../../components/RenderOptions';\nimport DotNetCore from './DotNetCore';\nimport DotNetFramework from './DotNetFramework';\n\nexport interface DotNetProps {\n  component: T.Component;\n  host: string;\n  token: string;\n}\n\nenum Variant {\n  DotNetCoreVariant = 'dotnet_core',\n  DotNetFrameworkVariant = 'dotnet_framework'\n}\n\nexport default function DotNet(props: DotNetProps) {\n  const [variant, setVariant] = React.useState<Variant>(Variant.DotNetCoreVariant);\n  const DotNetTuto = variant === 'dotnet_core' ? DotNetCore : DotNetFramework;\n\n  return (\n    <>\n      <RenderOptions\n        checked={variant}\n        name=\"variant\"\n        onCheck={value => setVariant(value as Variant)}\n        optionLabelKey=\"onboarding.build.dotnet.variant\"\n        options={['dotnet_core', 'dotnet_framework']}\n        titleLabelKey=\"onboarding.build.dotnet.variant\"\n      />\n      <DotNetTuto {...props} />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { translate } from '../../../../helpers/l10n';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport InstanceMessage from '../../../common/InstanceMessage';\nimport DoneNextSteps from '../DoneNextSteps';\n\nexport interface JavaGradleProps {\n  component: T.Component;\n  host: string;\n  token: string;\n}\n\nexport default function JavaGradle(props: JavaGradleProps) {\n  const { host, component, token } = props;\n  const config = 'plugins {\\n  id \"org.sonarqube\" version \"3.3\"\\n}';\n\n  const command = [\n    './gradlew sonarqube',\n    `-Dsonar.projectKey=${component.key}`,\n    `-Dsonar.host.url=${host}`,\n    `-Dsonar.login=${token}`\n  ];\n\n  return (\n    <div>\n      <h4 className=\"spacer-bottom\">{translate('onboarding.analysis.java.gradle.header')}</h4>\n      <InstanceMessage message={translate('onboarding.analysis.java.gradle.text.1')}>\n        {transformedMessage => (\n          <p className=\"spacer-bottom markdown\">\n            <FormattedMessage\n              defaultMessage={transformedMessage}\n              id=\"onboarding.analysis.java.gradle.text.1\"\n              values={{\n                plugin_code: <code>org.sonarqube</code>,\n                filename: <code>build.gradle</code>\n              }}\n            />\n          </p>\n        )}\n      </InstanceMessage>\n      <CodeSnippet snippet={config} />\n      <p className=\"big-spacer-bottom markdown\">\n        <em className=\"small text-muted\">\n          <FormattedMessage\n            defaultMessage={translate('onboarding.analysis.java.gradle.latest_version')}\n            id=\"onboarding.analysis.java.gradle.latest_version\"\n            values={{\n              link: (\n                <Link to=\"/documentation/analysis/scan/sonarscanner-for-gradle/\" target=\"_blank\">\n                  {translate('here')}\n                </Link>\n              )\n            }}\n          />\n        </em>\n      </p>\n      <p className=\"spacer-top spacer-bottom markdown\">\n        {translate('onboarding.analysis.java.gradle.text.2')}\n      </p>\n      <CodeSnippet snippet={command} />\n      <p className=\"big-spacer-top markdown\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.analysis.docs')}\n          id=\"onboarding.analysis.docs\"\n          values={{\n            link: (\n              <Link to=\"/documentation/analysis/scan/sonarscanner-for-gradle/\" target=\"_blank\">\n                {translate('onboarding.analysis.java.gradle.docs_link')}\n              </Link>\n            )\n          }}\n        />\n      </p>\n      <DoneNextSteps component={component} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { translate } from '../../../../helpers/l10n';\nimport CodeSnippet from '../../../common/CodeSnippet';\nimport InstanceMessage from '../../../common/InstanceMessage';\nimport DoneNextSteps from '../DoneNextSteps';\n\nexport interface JavaMavenProps {\n  component: T.Component;\n  host: string;\n  token: string;\n}\n\nexport default function JavaMaven(props: JavaMavenProps) {\n  const { host, component, token } = props;\n  const command = [\n    'mvn clean verify sonar:sonar',\n    `-Dsonar.projectKey=${component.key}`,\n    `-Dsonar.host.url=${host}`,\n    `-Dsonar.login=${token}`\n  ];\n\n  return (\n    <div>\n      <h4 className=\"spacer-bottom\">{translate('onboarding.analysis.java.maven.header')}</h4>\n      <p className=\"spacer-bottom markdown\">\n        <InstanceMessage message={translate('onboarding.analysis.java.maven.text')} />\n      </p>\n      <CodeSnippet snippet={command} />\n      <p className=\"big-spacer-top markdown\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.analysis.docs')}\n          id=\"onboarding.analysis.docs\"\n          values={{\n            link: (\n              <Link to=\"/documentation/analysis/scan/sonarscanner-for-maven/\" target=\"_blank\">\n                {translate('onboarding.analysis.java.maven.docs_link')}\n              </Link>\n            )\n          }}\n        />\n      </p>\n      <DoneNextSteps component={component} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { OSs } from '../../types';\nimport DownloadScanner from './DownloadScanner';\nimport ExecScanner from './ExecScanner';\n\nexport interface OtherProps {\n  component: T.Component;\n  host: string;\n  os: OSs;\n  token: string;\n}\n\nexport default function Other(props: OtherProps) {\n  const { host, os, component, token } = props;\n\n  return (\n    <div>\n      <DownloadScanner os={os} />\n      <ExecScanner host={host} os={os} component={component} token={token} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getHostUrl } from '../../../../helpers/urls';\nimport { BuildTools, ManualTutorialConfig } from '../../types';\nimport ClangGCCCustom from './ClangGCCCommand';\nimport DotNet from './DotNet';\nimport JavaGradle from './JavaGradle';\nimport JavaMaven from './JavaMaven';\nimport Other from './Other';\n\nexport interface AnalysisCommandProps {\n  component: T.Component;\n  languageConfig: ManualTutorialConfig;\n  token?: string;\n}\n\nexport default function AnalysisCommand(props: AnalysisCommandProps) {\n  const { component, languageConfig, token } = props;\n\n  if (!token) {\n    return null;\n  }\n\n  const host = getHostUrl();\n\n  switch (languageConfig.buildTool) {\n    case BuildTools.Maven:\n      return <JavaMaven host={host} component={component} token={token} />;\n\n    case BuildTools.Gradle:\n      return <JavaGradle host={host} component={component} token={token} />;\n\n    case BuildTools.DotNet:\n      return <DotNet host={host} component={component} token={token} />;\n\n    case BuildTools.CFamily:\n      return languageConfig.os !== undefined ? (\n        <ClangGCCCustom os={languageConfig.os} host={host} component={component} token={token} />\n      ) : null;\n\n    case BuildTools.Other:\n      return languageConfig.os !== undefined ? (\n        <Other host={host} os={languageConfig.os} component={component} token={token} />\n      ) : null;\n\n    default:\n      return null;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport Step from '../components/Step';\nimport { ManualTutorialConfig } from '../types';\nimport BuildToolForm from './BuildToolForm';\nimport AnalysisCommand from './commands/AnalysisCommand';\n\ninterface Props {\n  component: T.Component;\n  onFinish?: (projectKey?: string) => void;\n  open: boolean;\n  stepNumber: number;\n  token?: string;\n}\n\ninterface State {\n  config?: ManualTutorialConfig;\n}\n\nexport default class ProjectAnalysisStep extends React.PureComponent<Props, State> {\n  state: State = {};\n\n  handleBuildToolSelect = (config: ManualTutorialConfig) => {\n    const { component } = this.props;\n    this.setState({ config });\n    if (this.props.onFinish) {\n      this.props.onFinish(component.key);\n    }\n  };\n\n  renderForm = () => {\n    return (\n      <div className=\"boxed-group-inner\">\n        <div className=\"display-flex-column\">\n          <BuildToolForm onDone={this.handleBuildToolSelect} />\n\n          {this.state.config && (\n            <div className=\"big-spacer-top\">\n              <AnalysisCommand\n                component={this.props.component}\n                languageConfig={this.state.config}\n                token={this.props.token}\n              />\n            </div>\n          )}\n        </div>\n      </div>\n    );\n  };\n\n  renderResult = () => null;\n\n  render() {\n    return (\n      <Step\n        finished={false}\n        onOpen={() => {}}\n        open={this.props.open}\n        renderForm={this.renderForm}\n        renderResult={this.renderResult}\n        stepNumber={this.props.stepNumber}\n        stepTitle={translate('onboarding.analysis.header')}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { generateToken, getTokens, revokeToken } from '../../../api/user-tokens';\nimport { Button, DeleteButton, SubmitButton } from '../../../components/controls/buttons';\nimport Radio from '../../../components/controls/Radio';\nimport AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';\nimport { translate } from '../../../helpers/l10n';\nimport AlertErrorIcon from '../../icons/AlertErrorIcon';\nimport Step from '../components/Step';\nimport { getUniqueTokenName } from '../utils';\n\ninterface Props {\n  currentUser: Pick<T.LoggedInUser, 'login'>;\n  finished: boolean;\n  initialTokenName?: string;\n  open: boolean;\n  onContinue: (token: string) => void;\n  onOpen: VoidFunction;\n  stepNumber: number;\n}\n\ninterface State {\n  existingToken: string;\n  loading: boolean;\n  selection: string;\n  tokenName?: string;\n  token?: string;\n  tokens?: T.UserToken[];\n}\n\nexport default class TokenStep extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      existingToken: '',\n      loading: false,\n      selection: 'generate',\n      tokenName: props.initialTokenName\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    getTokens(this.props.currentUser.login).then(\n      tokens => {\n        if (this.mounted) {\n          this.setState({ tokens });\n          if (\n            this.props.initialTokenName !== undefined &&\n            this.props.initialTokenName === this.state.tokenName\n          ) {\n            this.setState({ tokenName: getUniqueTokenName(tokens) });\n          }\n        }\n      },\n      () => {}\n    );\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  getToken = () =>\n    this.state.selection === 'generate' ? this.state.token : this.state.existingToken;\n\n  canContinue = () => {\n    const { existingToken, selection, token } = this.state;\n    const validExistingToken = existingToken.match(/^[a-z0-9]+$/) != null;\n    return (\n      (selection === 'generate' && token != null) ||\n      (selection === 'use-existing' && existingToken && validExistingToken)\n    );\n  };\n\n  handleTokenNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ tokenName: event.target.value });\n  };\n\n  handleTokenGenerate = (event: React.FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const { tokenName } = this.state;\n    if (tokenName) {\n      this.setState({ loading: true });\n      generateToken({ name: tokenName }).then(({ token }) => {\n        if (this.mounted) {\n          this.setState({ loading: false, token });\n        }\n      }, this.stopLoading);\n    }\n  };\n\n  handleTokenRevoke = () => {\n    const { tokenName } = this.state;\n    if (tokenName) {\n      this.setState({ loading: true });\n      revokeToken({ name: tokenName }).then(() => {\n        if (this.mounted) {\n          this.setState({ loading: false, token: undefined, tokenName: undefined });\n        }\n      }, this.stopLoading);\n    }\n  };\n\n  handleContinueClick = () => {\n    const token = this.getToken();\n    if (token) {\n      this.props.onContinue(token);\n    }\n  };\n\n  handleGenerateClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.setState({ selection: 'generate' });\n  };\n\n  handleUseExistingClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.setState({ selection: 'use-existing' });\n  };\n\n  handleModeChange = (mode: string) => {\n    this.setState({ selection: mode });\n  };\n\n  handleExisingTokenChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ existingToken: event.currentTarget.value });\n  };\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  renderGenerateOption = () => (\n    <div>\n      {this.state.tokens !== undefined && this.state.tokens.length > 0 ? (\n        <Radio\n          checked={this.state.selection === 'generate'}\n          onCheck={this.handleModeChange}\n          value=\"generate\">\n          {translate('onboarding.token.generate_token')}\n        </Radio>\n      ) : (\n        translate('onboarding.token.generate_token')\n      )}\n      {this.state.selection === 'generate' && (\n        <div className=\"big-spacer-top\">\n          <form onSubmit={this.handleTokenGenerate}>\n            <input\n              autoFocus={true}\n              className=\"input-super-large spacer-right text-middle\"\n              onChange={this.handleTokenNameChange}\n              placeholder={translate('onboarding.token.generate_token.placeholder')}\n              required={true}\n              type=\"text\"\n              value={this.state.tokenName || ''}\n            />\n            {this.state.loading ? (\n              <i className=\"spinner text-middle\" />\n            ) : (\n              <SubmitButton className=\"text-middle\" disabled={!this.state.tokenName}>\n                {translate('onboarding.token.generate')}\n              </SubmitButton>\n            )}\n          </form>\n        </div>\n      )}\n    </div>\n  );\n\n  renderUseExistingOption = () => {\n    const { existingToken } = this.state;\n    const validInput = !existingToken || existingToken.match(/^[a-z0-9]+$/) != null;\n\n    return (\n      <div className=\"big-spacer-top\">\n        <Radio\n          checked={this.state.selection === 'use-existing'}\n          onCheck={this.handleModeChange}\n          value=\"use-existing\">\n          {translate('onboarding.token.use_existing_token')}\n        </Radio>\n        {this.state.selection === 'use-existing' && (\n          <div className=\"big-spacer-top\">\n            <input\n              autoFocus={true}\n              className=\"input-super-large spacer-right text-middle\"\n              onChange={this.handleExisingTokenChange}\n              placeholder={translate('onboarding.token.use_existing_token.placeholder')}\n              required={true}\n              type=\"text\"\n              value={this.state.existingToken}\n            />\n            {!validInput && (\n              <span className=\"text-danger\">\n                <AlertErrorIcon className=\"little-spacer-right text-text-top\" />\n                {translate('onboarding.token.invalid_format')}\n              </span>\n            )}\n          </div>\n        )}\n      </div>\n    );\n  };\n\n  renderForm = () => {\n    const { loading, token, tokenName, tokens } = this.state;\n    const canUseExisting = tokens !== undefined && tokens.length > 0;\n\n    return (\n      <div className=\"boxed-group-inner\">\n        {token != null ? (\n          <form onSubmit={this.handleTokenRevoke}>\n            <span className=\"text-middle\">\n              {tokenName}\n              {': '}\n            </span>\n            <strong className=\"spacer-right text-middle\">{token}</strong>\n            {loading ? (\n              <i className=\"spinner text-middle\" />\n            ) : (\n              <DeleteButton className=\"button-small text-middle\" onClick={this.handleTokenRevoke} />\n            )}\n          </form>\n        ) : (\n          <div>\n            {this.renderGenerateOption()}\n            {canUseExisting && this.renderUseExistingOption()}\n          </div>\n        )}\n\n        <div className=\"note big-spacer-top width-50\">\n          <FormattedMessage\n            defaultMessage={translate('onboarding.token.text')}\n            id=\"onboarding.token.text\"\n            values={{\n              link: (\n                <Link target=\"_blank\" to=\"/account/security\">\n                  {translate('onboarding.token.text.user_account')}\n                </Link>\n              )\n            }}\n          />\n        </div>\n\n        {this.canContinue() && (\n          <div className=\"big-spacer-top\">\n            <Button className=\"js-continue\" onClick={this.handleContinueClick}>\n              {translate('continue')}\n            </Button>\n          </div>\n        )}\n      </div>\n    );\n  };\n\n  renderResult = () => {\n    const { selection, tokenName } = this.state;\n    const token = this.getToken();\n\n    if (!token) {\n      return null;\n    }\n\n    return (\n      <div className=\"boxed-group-actions display-flex-center\">\n        <AlertSuccessIcon className=\"spacer-right\" />\n        {selection === 'generate' && tokenName && `${tokenName}: `}\n        <strong>{token}</strong>\n      </div>\n    );\n  };\n\n  render() {\n    return (\n      <Step\n        finished={this.props.finished}\n        onOpen={this.props.onOpen}\n        open={this.props.open}\n        renderForm={this.renderForm}\n        renderResult={this.renderResult}\n        stepNumber={this.props.stepNumber}\n        stepTitle={translate('onboarding.token.header')}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport InstanceMessage from '../../common/InstanceMessage';\nimport ProjectAnalysisStep from './ProjectAnalysisStep';\nimport TokenStep from './TokenStep';\n\nexport enum Steps {\n  ANALYSIS,\n  TOKEN\n}\n\ninterface Props {\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n}\n\ninterface State {\n  step: Steps;\n  token?: string;\n}\n\nexport default class ManualTutorial extends React.PureComponent<Props, State> {\n  state: State = { step: Steps.TOKEN };\n\n  handleTokenDone = (token: string) => {\n    this.setState({ step: Steps.ANALYSIS, token });\n  };\n\n  handleTokenOpen = () => {\n    this.setState({ step: Steps.TOKEN });\n  };\n\n  render() {\n    const { component, currentUser } = this.props;\n    const { step, token } = this.state;\n\n    return (\n      <>\n        <div className=\"page-header big-spacer-bottom\">\n          <h1 className=\"page-title\">{translate('onboarding.project_analysis.header')}</h1>\n          <p className=\"page-description\">\n            <InstanceMessage message={translate('onboarding.project_analysis.description')} />\n          </p>\n        </div>\n\n        <TokenStep\n          currentUser={currentUser}\n          finished={Boolean(this.state.token)}\n          initialTokenName={`Analyze \"${component.name}\"`}\n          onContinue={this.handleTokenDone}\n          onOpen={this.handleTokenOpen}\n          open={step === Steps.TOKEN}\n          stepNumber={1}\n        />\n\n        <ProjectAnalysisStep\n          component={component}\n          open={step === Steps.ANALYSIS}\n          stepNumber={2}\n          token={token}\n        />\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport EllipsisIcon from '../../components/icons/EllipsisIcon';\nimport { translate } from '../../helpers/l10n';\nimport { getBaseUrl } from '../../helpers/system';\nimport { AlmKeys, AlmSettingsInstance, ProjectAlmBindingResponse } from '../../types/alm-settings';\nimport AzurePipelinesTutorial from './azure-pipelines/AzurePipelinesTutorial';\nimport BitbucketPipelinesTutorial from './bitbucket-pipelines/BitbucketPipelinesTutorial';\nimport GitHubActionTutorial from './github-action/GitHubActionTutorial';\nimport GitLabCITutorial from './gitlabci/GitLabCITutorial';\nimport JenkinsTutorial from './jenkins/JenkinsTutorial';\nimport ManualTutorial from './manual/ManualTutorial';\nimport { TutorialModes } from './types';\n\nexport interface TutorialSelectionRendererProps {\n  almBinding?: AlmSettingsInstance;\n  baseUrl: string;\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  loading: boolean;\n  onSelectTutorial: (mode: TutorialModes) => void;\n  projectBinding?: ProjectAlmBindingResponse;\n  selectedTutorial?: TutorialModes;\n  willRefreshAutomatically?: boolean;\n}\n\nconst DEFAULT_ICON_SIZE = 60;\nconst GH_ACTION_ICON_SIZE = 46;\n\nfunction renderButton(\n  mode: TutorialModes,\n  onSelectTutorial: (mode: TutorialModes) => void,\n  icon: React.ReactNode\n) {\n  return (\n    <button\n      className={`button button-huge display-flex-column big-spacer-right big-spacer-bottom tutorial-mode-${mode}`}\n      // Currently, OtherCI is the same tutorial as Manual. We might update it to its own stand-alone\n      // tutorial in the future.\n      onClick={() => onSelectTutorial(mode === TutorialModes.OtherCI ? TutorialModes.Manual : mode)}\n      type=\"button\">\n      {icon}\n      <div className=\"medium big-spacer-top\">\n        {translate('onboarding.tutorial.choose_method', mode)}\n      </div>\n    </button>\n  );\n}\n\nexport default function TutorialSelectionRenderer(props: TutorialSelectionRendererProps) {\n  const {\n    almBinding,\n    baseUrl,\n    component,\n    currentUser,\n    loading,\n    projectBinding,\n    selectedTutorial,\n    willRefreshAutomatically\n  } = props;\n\n  if (loading) {\n    return <i className=\"spinner\" />;\n  }\n\n  let showGitHubActions = true;\n  let showGitLabCICD = true;\n  let showBitbucketPipelines = true;\n  let showAzurePipelines = true;\n  let showJenkins = true;\n\n  if (projectBinding !== undefined) {\n    showGitHubActions = projectBinding.alm === AlmKeys.GitHub;\n    showGitLabCICD = projectBinding.alm === AlmKeys.GitLab;\n    showBitbucketPipelines = projectBinding?.alm === AlmKeys.BitbucketCloud;\n    showAzurePipelines = [AlmKeys.Azure, AlmKeys.GitHub].includes(projectBinding.alm);\n    showJenkins = [\n      AlmKeys.BitbucketCloud,\n      AlmKeys.BitbucketServer,\n      AlmKeys.GitHub,\n      AlmKeys.GitLab\n    ].includes(projectBinding.alm);\n  }\n\n  return (\n    <>\n      {selectedTutorial === undefined && (\n        <>\n          <h1 className=\"spacer-top huge-spacer-bottom\">\n            {translate('onboarding.tutorial.choose_method')}\n          </h1>\n\n          <div className=\"tutorial-selection\">\n            <p className=\"big-spacer-bottom\">\n              {translate('onboarding.tutorial.choose_method.devops_platform.description')}\n            </p>\n            <div className=\"display-flex-start display-flex-wrap\">\n              {showJenkins &&\n                renderButton(\n                  TutorialModes.Jenkins,\n                  props.onSelectTutorial,\n                  <img\n                    alt=\"\" // Should be ignored by screen readers\n                    height={DEFAULT_ICON_SIZE}\n                    src={`${getBaseUrl()}/images/tutorials/jenkins.svg`}\n                  />\n                )}\n\n              {showGitHubActions &&\n                renderButton(\n                  TutorialModes.GitHubActions,\n                  props.onSelectTutorial,\n                  <img\n                    alt=\"\" // Should be ignored by screen readers\n                    height={GH_ACTION_ICON_SIZE}\n                    className=\"spacer-bottom spacer-top\"\n                    src={`${getBaseUrl()}/images/tutorials/github-actions.svg`}\n                  />\n                )}\n\n              {showBitbucketPipelines &&\n                renderButton(\n                  TutorialModes.BitbucketPipelines,\n                  props.onSelectTutorial,\n                  <img\n                    alt=\"\" // Should be ignored by screen readers\n                    height={DEFAULT_ICON_SIZE}\n                    src={`${getBaseUrl()}/images/alm/bitbucket.svg`}\n                  />\n                )}\n\n              {showGitLabCICD &&\n                renderButton(\n                  TutorialModes.GitLabCI,\n                  props.onSelectTutorial,\n                  <img\n                    alt=\"\" // Should be ignored by screen readers\n                    height={DEFAULT_ICON_SIZE}\n                    src={`${getBaseUrl()}/images/alm/gitlab.svg`}\n                  />\n                )}\n\n              {showAzurePipelines &&\n                renderButton(\n                  TutorialModes.AzurePipelines,\n                  props.onSelectTutorial,\n                  <img\n                    alt=\"\" // Should be ignored by screen readers\n                    height={DEFAULT_ICON_SIZE}\n                    src={`${getBaseUrl()}/images/tutorials/azure-pipelines.svg`}\n                  />\n                )}\n\n              {renderButton(\n                TutorialModes.OtherCI,\n                props.onSelectTutorial,\n                <EllipsisIcon size={DEFAULT_ICON_SIZE} />\n              )}\n            </div>\n\n            <p className=\"big-spacer-bottom spacer-top\">\n              {translate('onboarding.tutorial.choose_method.locally.description')}\n            </p>\n            <div>\n              {renderButton(\n                TutorialModes.Manual,\n                props.onSelectTutorial,\n                <img\n                  alt=\"\" // Should be ignored by screen readers\n                  height={DEFAULT_ICON_SIZE}\n                  src={`${getBaseUrl()}/images/tutorials/manual.svg`}\n                />\n              )}\n            </div>\n          </div>\n        </>\n      )}\n\n      {selectedTutorial === TutorialModes.Manual && (\n        <ManualTutorial component={component} currentUser={currentUser} />\n      )}\n\n      {selectedTutorial === TutorialModes.BitbucketPipelines && (\n        <BitbucketPipelinesTutorial\n          almBinding={almBinding}\n          baseUrl={baseUrl}\n          component={component}\n          currentUser={currentUser}\n          projectBinding={projectBinding}\n          willRefreshAutomatically={willRefreshAutomatically}\n        />\n      )}\n\n      {selectedTutorial === TutorialModes.GitHubActions && (\n        <GitHubActionTutorial\n          almBinding={almBinding}\n          baseUrl={baseUrl}\n          component={component}\n          currentUser={currentUser}\n          projectBinding={projectBinding}\n          willRefreshAutomatically={willRefreshAutomatically}\n        />\n      )}\n\n      {selectedTutorial === TutorialModes.Jenkins && (\n        <JenkinsTutorial\n          almBinding={almBinding}\n          baseUrl={baseUrl}\n          component={component}\n          projectBinding={projectBinding}\n          willRefreshAutomatically={willRefreshAutomatically}\n        />\n      )}\n\n      {selectedTutorial === TutorialModes.GitLabCI && (\n        <GitLabCITutorial\n          baseUrl={baseUrl}\n          component={component}\n          currentUser={currentUser}\n          willRefreshAutomatically={willRefreshAutomatically}\n        />\n      )}\n\n      {selectedTutorial === TutorialModes.AzurePipelines && (\n        <AzurePipelinesTutorial\n          alm={almBinding?.alm}\n          baseUrl={baseUrl}\n          component={component}\n          currentUser={currentUser}\n          willRefreshAutomatically={willRefreshAutomatically}\n        />\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport { getAlmSettingsNoCatch } from '../../api/alm-settings';\nimport { getValues } from '../../api/settings';\nimport { getHostUrl } from '../../helpers/urls';\nimport { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../types/alm-settings';\nimport { SettingsKey } from '../../types/settings';\nimport { withRouter } from '../hoc/withRouter';\nimport TutorialSelectionRenderer from './TutorialSelectionRenderer';\nimport { TutorialModes } from './types';\n\ninterface Props extends Pick<WithRouterProps, 'router' | 'location'> {\n  component: T.Component;\n  currentUser: T.LoggedInUser;\n  projectBinding?: ProjectAlmBindingResponse;\n  willRefreshAutomatically?: boolean;\n}\n\ninterface State {\n  almBinding?: AlmSettingsInstance;\n  baseUrl: string;\n  loading: boolean;\n}\n\nexport class TutorialSelection extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    baseUrl: getHostUrl(),\n    loading: true\n  };\n\n  async componentDidMount() {\n    this.mounted = true;\n\n    await Promise.all([this.fetchAlmBindings(), this.fetchBaseUrl()]);\n\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchAlmBindings = async () => {\n    const { component, projectBinding } = this.props;\n\n    if (projectBinding !== undefined) {\n      const almSettings = await getAlmSettingsNoCatch(component.key).catch(() => undefined);\n      if (this.mounted) {\n        let almBinding;\n        if (almSettings !== undefined) {\n          almBinding = almSettings.find(d => d.key === projectBinding.key);\n        }\n        this.setState({ almBinding });\n      }\n    }\n  };\n\n  fetchBaseUrl = async () => {\n    const settings = await getValues({ keys: SettingsKey.ServerBaseUrl }).catch(() => undefined);\n    const baseUrl = settings && settings.find(s => s.key === SettingsKey.ServerBaseUrl)?.value;\n    if (baseUrl && baseUrl.length > 0 && this.mounted) {\n      this.setState({ baseUrl });\n    }\n  };\n\n  handleSelectTutorial = (selectedTutorial: TutorialModes) => {\n    const {\n      router,\n      location: { pathname, query }\n    } = this.props;\n\n    router.push({\n      pathname,\n      query: { ...query, selectedTutorial }\n    });\n  };\n\n  render() {\n    const {\n      component,\n      currentUser,\n      location,\n      projectBinding,\n      willRefreshAutomatically\n    } = this.props;\n    const { almBinding, baseUrl, loading } = this.state;\n\n    const selectedTutorial: TutorialModes | undefined = location.query?.selectedTutorial;\n\n    return (\n      <TutorialSelectionRenderer\n        almBinding={almBinding}\n        baseUrl={baseUrl}\n        component={component}\n        currentUser={currentUser}\n        loading={loading}\n        onSelectTutorial={this.handleSelectTutorial}\n        projectBinding={projectBinding}\n        selectedTutorial={selectedTutorial}\n        willRefreshAutomatically={willRefreshAutomatically}\n      />\n    );\n  }\n}\n\nexport default withRouter(TutorialSelection);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { connect } from 'react-redux';\nimport TutorialSelection from '../../../components/tutorials/TutorialSelection';\nimport { Alert } from '../../../components/ui/Alert';\nimport { getBranchLikeDisplayName, isBranch, isMainBranch } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { getCurrentUser, Store } from '../../../store/rootReducer';\nimport { ProjectAlmBindingResponse } from '../../../types/alm-settings';\nimport { BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\n\nexport interface EmptyOverviewProps {\n  branchLike?: BranchLike;\n  branchLikes: BranchLike[];\n  component: T.Component;\n  currentUser: T.CurrentUser;\n  hasAnalyses?: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nexport function EmptyOverview(props: EmptyOverviewProps) {\n  const { branchLike, branchLikes, component, currentUser, hasAnalyses, projectBinding } = props;\n\n  if (component.qualifier === ComponentQualifier.Application) {\n    return (\n      <div className=\"page page-limited\">\n        <Alert variant=\"warning\">{translate('provisioning.no_analysis.application')}</Alert>\n      </div>\n    );\n  } else if (!isBranch(branchLike)) {\n    return null;\n  }\n\n  const hasBranches = branchLikes.length > 1;\n  const hasBadBranchConfig =\n    branchLikes.length > 2 ||\n    (branchLikes.length === 2 && branchLikes.some(branch => isBranch(branch)));\n\n  const showWarning = isMainBranch(branchLike) && hasBranches;\n  const showTutorial = isMainBranch(branchLike) && !hasBranches && !hasAnalyses;\n\n  let warning;\n  if (isLoggedIn(currentUser) && showWarning && hasBadBranchConfig) {\n    warning = (\n      <FormattedMessage\n        defaultMessage={translate('provisioning.no_analysis_on_main_branch.bad_configuration')}\n        id=\"provisioning.no_analysis_on_main_branch.bad_configuration\"\n        values={{\n          branchName: getBranchLikeDisplayName(branchLike),\n          branchType: translate('branches.main_branch')\n        }}\n      />\n    );\n  } else {\n    warning = (\n      <FormattedMessage\n        defaultMessage={translate('provisioning.no_analysis_on_main_branch')}\n        id=\"provisioning.no_analysis_on_main_branch\"\n        values={{\n          branchName: getBranchLikeDisplayName(branchLike)\n        }}\n      />\n    );\n  }\n\n  return (\n    <div className=\"page page-limited\">\n      {isLoggedIn(currentUser) ? (\n        <>\n          {showWarning && <Alert variant=\"warning\">{warning}</Alert>}\n          {showTutorial && (\n            <TutorialSelection\n              component={component}\n              currentUser={currentUser}\n              projectBinding={projectBinding}\n              willRefreshAutomatically={true}\n            />\n          )}\n        </>\n      ) : (\n        <Alert variant=\"warning\">{warning}</Alert>\n      )}\n    </div>\n  );\n}\n\nconst mapStateToProps = (state: Store) => ({\n  currentUser: getCurrentUser(state)\n});\n\nexport default connect(mapStateToProps)(EmptyOverview);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { findMeasure, formatMeasure } from '../../../helpers/measures';\nimport { getMeasurementAfterMergeMetricKey, MeasurementType } from '../utils';\n\nexport interface AfterMergeEstimateProps {\n  className?: string;\n  measures: T.MeasureEnhanced[];\n  type: MeasurementType;\n}\n\nexport function AfterMergeEstimate({ className, measures, type }: AfterMergeEstimateProps) {\n  const afterMergeMetric = getMeasurementAfterMergeMetricKey(type);\n\n  const measure = findMeasure(measures, afterMergeMetric);\n\n  if (!measure || measure.value === undefined) {\n    return null;\n  }\n\n  return (\n    <div className={classNames(className, 'display-flex-center')}>\n      <span className=\"huge\">{formatMeasure(measure.value, 'PERCENT')}</span>\n      <span className=\"label flex-1 spacer-left text-right\">\n        {translate('component_measures.facet_category.overall_category.estimated')}\n      </span>\n    </div>\n  );\n}\n\nexport default React.memo(AfterMergeEstimate);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { colors } from '../../../app/theme';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport HelpIcon from '../../../components/icons/HelpIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { getQualityGatesUrl, getQualityGateUrl } from '../../../helpers/urls';\n\ninterface Props {\n  component: T.Component;\n  level?: T.Status;\n}\n\nexport function LargeQualityGateBadge({ component, level }: Props) {\n  const success = level === 'OK';\n\n  const path =\n    component.qualityGate === undefined\n      ? getQualityGatesUrl()\n      : getQualityGateUrl(component.qualityGate.key);\n\n  return (\n    <div\n      className={classNames('overview-quality-gate-badge-large small', {\n        failed: !success,\n        success\n      })}>\n      <div className=\"display-flex-center\">\n        <span>{translate('overview.on_new_code_long')}</span>\n\n        <HelpTooltip\n          className=\"little-spacer-left\"\n          overlay={\n            <FormattedMessage\n              defaultMessage={translate('overview.quality_gate.conditions_on_new_code')}\n              id=\"overview.quality_gate.conditions_on_new_code\"\n              values={{\n                link: <Link to={path}>{translate('overview.quality_gate')}</Link>\n              }}\n            />\n          }>\n          <HelpIcon fill={colors.transparentWhite} size={12} />\n        </HelpTooltip>\n      </div>\n      {level !== undefined && (\n        <h3 className=\"huge-spacer-top huge\">{translate('metric.level', level)}</h3>\n      )}\n    </div>\n  );\n}\n\nexport default React.memo(LargeQualityGateBadge);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { differenceBy, uniq } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getMeasuresWithMetrics } from '../../../api/measures';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { Alert } from '../../../components/ui/Alert';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { enhanceConditionWithMeasure, enhanceMeasuresWithMetrics } from '../../../helpers/measures';\nimport { isDefined } from '../../../helpers/types';\nimport { fetchBranchStatus } from '../../../store/rootActions';\nimport { getBranchStatusByBranchLike, Store } from '../../../store/rootReducer';\nimport { BranchLike, PullRequest } from '../../../types/branch-like';\nimport { IssueType } from '../../../types/issues';\nimport { QualityGateStatusCondition } from '../../../types/quality-gates';\nimport IssueLabel from '../components/IssueLabel';\nimport IssueRating from '../components/IssueRating';\nimport MeasurementLabel from '../components/MeasurementLabel';\nimport QualityGateConditions from '../components/QualityGateConditions';\nimport SonarLintPromotion from '../components/SonarLintPromotion';\nimport '../styles.css';\nimport { MeasurementType, PR_METRICS } from '../utils';\nimport AfterMergeEstimate from './AfterMergeEstimate';\nimport LargeQualityGateBadge from './LargeQualityGateBadge';\n\ninterface StateProps {\n  conditions?: QualityGateStatusCondition[];\n  ignoredConditions?: boolean;\n  status?: T.Status;\n}\n\ninterface DispatchProps {\n  fetchBranchStatus: (branchLike: BranchLike, projectKey: string) => void;\n}\n\ninterface OwnProps {\n  branchLike: PullRequest;\n  component: T.Component;\n}\n\ntype Props = StateProps & DispatchProps & OwnProps;\n\ninterface State {\n  loading: boolean;\n  measures: T.MeasureEnhanced[];\n}\n\nexport class PullRequestOverview extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state: State = {\n    loading: false,\n    measures: []\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    if (this.props.conditions === undefined) {\n      this.fetchBranchStatusData();\n    } else {\n      this.fetchBranchData();\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (this.conditionsHaveChanged(prevProps)) {\n      this.fetchBranchData();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  conditionsHaveChanged = (prevProps: Props) => {\n    const prevConditions = prevProps.conditions ?? [];\n    const newConditions = this.props.conditions ?? [];\n    const diff = differenceBy(\n      prevConditions.filter(c => c.level === 'ERROR'),\n      newConditions.filter(c => c.level === 'ERROR'),\n      c => c.metric\n    );\n\n    return (\n      (prevProps.conditions === undefined && this.props.conditions !== undefined) || diff.length > 0\n    );\n  };\n\n  fetchBranchStatusData = () => {\n    const {\n      branchLike,\n      component: { key }\n    } = this.props;\n    this.props.fetchBranchStatus(branchLike, key);\n  };\n\n  fetchBranchData = () => {\n    const {\n      branchLike,\n      component: { key },\n      conditions\n    } = this.props;\n\n    this.setState({ loading: true });\n\n    const metricKeys =\n      conditions !== undefined\n        ? // Also load metrics that apply to failing QG conditions.\n          uniq([...PR_METRICS, ...conditions.filter(c => c.level !== 'OK').map(c => c.metric)])\n        : PR_METRICS;\n\n    getMeasuresWithMetrics(key, metricKeys, getBranchLikeQuery(branchLike)).then(\n      ({ component, metrics }) => {\n        if (this.mounted && component.measures) {\n          this.setState({\n            loading: false,\n            measures: enhanceMeasuresWithMetrics(component.measures || [], metrics)\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  render() {\n    const { branchLike, component, conditions, ignoredConditions, status } = this.props;\n    const { loading, measures } = this.state;\n\n    if (loading) {\n      return (\n        <div className=\"page page-limited\">\n          <i className=\"spinner\" />\n        </div>\n      );\n    }\n\n    if (conditions === undefined) {\n      return null;\n    }\n\n    const failedConditions = conditions\n      .filter(condition => condition.level === 'ERROR')\n      .map(c => enhanceConditionWithMeasure(c, measures))\n      .filter(isDefined);\n\n    return (\n      <div className=\"page page-limited\">\n        <div\n          className={classNames('pr-overview', {\n            'has-conditions': failedConditions.length > 0\n          })}>\n          {ignoredConditions && (\n            <Alert className=\"big-spacer-bottom\" display=\"inline\" variant=\"info\">\n              <span className=\"text-middle\">\n                {translate('overview.quality_gate.ignored_conditions')}\n              </span>\n              <HelpTooltip\n                className=\"spacer-left\"\n                overlay={translate('overview.quality_gate.ignored_conditions.tooltip')}\n              />\n            </Alert>\n          )}\n          <div className=\"display-flex-row\">\n            <div className=\"big-spacer-right\">\n              <h2 className=\"overview-panel-title spacer-bottom small display-inline-flex-center\">\n                {translate('overview.quality_gate')}\n                <HelpTooltip\n                  className=\"little-spacer-left\"\n                  overlay={\n                    <div className=\"big-padded-top big-padded-bottom\">\n                      {translate('overview.quality_gate.help')}\n                    </div>\n                  }\n                />\n              </h2>\n              <LargeQualityGateBadge component={component} level={status} />\n\n              <SonarLintPromotion qgConditions={conditions} />\n            </div>\n\n            {failedConditions.length > 0 && (\n              <div className=\"pr-overview-failed-conditions big-spacer-right\">\n                <h2 className=\"overview-panel-title spacer-bottom small\">\n                  {translate('overview.failed_conditions')}\n                </h2>\n                <QualityGateConditions\n                  branchLike={branchLike}\n                  collapsible={true}\n                  component={component}\n                  failedConditions={failedConditions}\n                />\n              </div>\n            )}\n\n            <div className=\"flex-1\">\n              <h2 className=\"overview-panel-title spacer-bottom small\">\n                {translate('overview.measures')}\n              </h2>\n\n              <div className=\"overview-panel-content\">\n                {[\n                  IssueType.Bug,\n                  IssueType.Vulnerability,\n                  IssueType.SecurityHotspot,\n                  IssueType.CodeSmell\n                ].map((type: IssueType) => (\n                  <div className=\"overview-measures-row display-flex-row\" key={type}>\n                    <div className=\"overview-panel-big-padded flex-1 small display-flex-center\">\n                      <IssueLabel\n                        branchLike={branchLike}\n                        component={component}\n                        measures={measures}\n                        type={type}\n                        useDiffMetric={true}\n                      />\n                    </div>\n                    <div className=\"overview-panel-big-padded overview-measures-aside display-flex-center\">\n                      <IssueRating\n                        branchLike={branchLike}\n                        component={component}\n                        measures={measures}\n                        type={type}\n                        useDiffMetric={true}\n                      />\n                    </div>\n                  </div>\n                ))}\n\n                {[MeasurementType.Coverage, MeasurementType.Duplication].map(\n                  (type: MeasurementType) => (\n                    <div className=\"overview-measures-row display-flex-row\" key={type}>\n                      <div className=\"overview-panel-big-padded flex-1 small display-flex-center\">\n                        <MeasurementLabel\n                          branchLike={branchLike}\n                          component={component}\n                          measures={measures}\n                          type={type}\n                          useDiffMetric={true}\n                        />\n                      </div>\n\n                      <AfterMergeEstimate\n                        className=\"overview-panel-big-padded overview-measures-aside text-right overview-measures-emphasis\"\n                        measures={measures}\n                        type={type}\n                      />\n                    </div>\n                  )\n                )}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store, { branchLike, component }: Props) => {\n  const { conditions, ignoredConditions, status } = getBranchStatusByBranchLike(\n    state,\n    component.key,\n    branchLike\n  );\n  return { conditions, ignoredConditions, status };\n};\n\nconst mapDispatchToProps = { fetchBranchStatus: fetchBranchStatus as any };\n\nexport default connect<StateProps, DispatchProps, OwnProps>(\n  mapStateToProps,\n  mapDispatchToProps\n)(PullRequestOverview);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport { withAppState } from '../../../components/hoc/withAppState';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\nimport { isPullRequest } from '../../../helpers/branch-like';\nimport { ProjectAlmBindingResponse } from '../../../types/alm-settings';\nimport { BranchLike } from '../../../types/branch-like';\nimport { isPortfolioLike } from '../../../types/component';\nimport BranchOverview from '../branches/BranchOverview';\n\nconst EmptyOverview = lazyLoadComponent(() => import('./EmptyOverview'));\nconst PullRequestOverview = lazyLoadComponent(() => import('../pullRequests/PullRequestOverview'));\n\ninterface Props {\n  appState: Pick<T.AppState, 'branchesEnabled'>;\n  branchLike?: BranchLike;\n  branchLikes: BranchLike[];\n  component: T.Component;\n  isInProgress?: boolean;\n  isPending?: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n  router: Pick<Router, 'replace'>;\n}\n\nexport class App extends React.PureComponent<Props> {\n  isPortfolio = () => {\n    return isPortfolioLike(this.props.component.qualifier);\n  };\n\n  render() {\n    const {\n      appState: { branchesEnabled },\n      branchLike,\n      branchLikes,\n      component,\n      projectBinding\n    } = this.props;\n\n    if (this.isPortfolio()) {\n      return null;\n    }\n\n    return isPullRequest(branchLike) ? (\n      <>\n        <Suggestions suggestions=\"pull_requests\" />\n        <PullRequestOverview branchLike={branchLike} component={component} />\n      </>\n    ) : (\n      <>\n        <Suggestions suggestions=\"overview\" />\n\n        {!component.analysisDate && (\n          <EmptyOverview\n            branchLike={branchLike}\n            branchLikes={branchLikes}\n            component={component}\n            hasAnalyses={this.props.isPending || this.props.isInProgress}\n            projectBinding={projectBinding}\n          />\n        )}\n\n        {component.analysisDate && (\n          <BranchOverview\n            branch={branchLike}\n            branchesEnabled={branchesEnabled}\n            component={component}\n            projectBinding={projectBinding}\n          />\n        )}\n      </>\n    );\n  }\n}\n\nexport default withRouter(withAppState(App));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/App')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON, RequestData } from '../helpers/request';\nimport { BaseSearchProjectsParameters } from './components';\n\nconst PAGE_SIZE = 100;\n\nexport function grantPermissionToUser(data: {\n  projectKey?: string;\n  login: string;\n  permission: string;\n}) {\n  return post('/api/permissions/add_user', data).catch(throwGlobalError);\n}\n\nexport function revokePermissionFromUser(data: {\n  projectKey?: string;\n  login: string;\n  permission: string;\n}) {\n  return post('/api/permissions/remove_user', data).catch(throwGlobalError);\n}\n\nexport function grantPermissionToGroup(data: {\n  projectKey?: string;\n  groupName: string;\n  permission: string;\n}) {\n  return post('/api/permissions/add_group', data).catch(throwGlobalError);\n}\n\nexport function revokePermissionFromGroup(data: {\n  projectKey?: string;\n  groupName: string;\n  permission: string;\n}) {\n  return post('/api/permissions/remove_group', data).catch(throwGlobalError);\n}\n\ninterface GetPermissionTemplatesResponse {\n  permissionTemplates: T.PermissionTemplate[];\n  defaultTemplates: Array<{ templateId: string; qualifier: string }>;\n  permissions: Array<{ key: string; name: string; description: string }>;\n}\n\nexport function getPermissionTemplates(): Promise<GetPermissionTemplatesResponse> {\n  const url = '/api/permissions/search_templates';\n  return getJSON(url);\n}\n\nexport function createPermissionTemplate(data: RequestData) {\n  return postJSON('/api/permissions/create_template', data);\n}\n\nexport function updatePermissionTemplate(data: RequestData): Promise<void> {\n  return post('/api/permissions/update_template', data);\n}\n\nexport function deletePermissionTemplate(data: RequestData) {\n  return post('/api/permissions/delete_template', data).catch(throwGlobalError);\n}\n\n/**\n * Set default permission template for a given qualifier\n */\nexport function setDefaultPermissionTemplate(templateId: string, qualifier: string): Promise<void> {\n  return post('/api/permissions/set_default_template', { templateId, qualifier });\n}\n\nexport function applyTemplateToProject(data: RequestData) {\n  return post('/api/permissions/apply_template', data).catch(throwGlobalError);\n}\n\nexport function bulkApplyTemplate(data: BaseSearchProjectsParameters): Promise<void> {\n  return post('/api/permissions/bulk_apply_template', data);\n}\n\nexport function grantTemplatePermissionToUser(data: {\n  templateId: string;\n  login: string;\n  permission: string;\n}): Promise<void> {\n  return post('/api/permissions/add_user_to_template', data);\n}\n\nexport function revokeTemplatePermissionFromUser(data: {\n  templateId: string;\n  login: string;\n  permission: string;\n}): Promise<void> {\n  return post('/api/permissions/remove_user_from_template', data);\n}\n\nexport function grantTemplatePermissionToGroup(data: RequestData): Promise<void> {\n  return post('/api/permissions/add_group_to_template', data);\n}\n\nexport function revokeTemplatePermissionFromGroup(data: RequestData): Promise<void> {\n  return post('/api/permissions/remove_group_from_template', data);\n}\n\nexport function addProjectCreatorToTemplate(templateId: string, permission: string): Promise<void> {\n  return post('/api/permissions/add_project_creator_to_template', { templateId, permission });\n}\n\nexport function removeProjectCreatorFromTemplate(\n  templateId: string,\n  permission: string\n): Promise<void> {\n  return post('/api/permissions/remove_project_creator_from_template', { templateId, permission });\n}\n\nexport function getPermissionsUsersForComponent(data: {\n  projectKey: string;\n  q?: string;\n  permission?: string;\n  p?: number;\n  ps?: number;\n}): Promise<{ paging: T.Paging; users: T.PermissionUser[] }> {\n  if (!data.ps) {\n    data.ps = PAGE_SIZE;\n  }\n  return getJSON('/api/permissions/users', data).catch(throwGlobalError);\n}\n\nexport function getPermissionsGroupsForComponent(data: {\n  projectKey: string;\n  q?: string;\n  permission?: string;\n  p?: number;\n  ps?: number;\n}): Promise<{ paging: T.Paging; groups: T.PermissionGroup[] }> {\n  if (!data.ps) {\n    data.ps = PAGE_SIZE;\n  }\n  return getJSON('/api/permissions/groups', data).catch(throwGlobalError);\n}\n\nexport function getGlobalPermissionsUsers(data: {\n  q?: string;\n  permission?: string;\n  p?: number;\n  ps?: number;\n}): Promise<{ paging: T.Paging; users: T.PermissionUser[] }> {\n  if (!data.ps) {\n    data.ps = PAGE_SIZE;\n  }\n  return getJSON('/api/permissions/users', data);\n}\n\nexport function getGlobalPermissionsGroups(data: {\n  q?: string;\n  permission?: string;\n  p?: number;\n  ps?: number;\n}): Promise<{ paging: T.Paging; groups: T.PermissionGroup[] }> {\n  if (!data.ps) {\n    data.ps = PAGE_SIZE;\n  }\n  return getJSON('/api/permissions/groups', data);\n}\n\nexport function getPermissionTemplateUsers(\n  templateId: string,\n  query?: string,\n  permission?: string\n): Promise<any> {\n  const data: RequestData = { templateId, ps: PAGE_SIZE };\n  if (query) {\n    data.q = query;\n  }\n  if (permission) {\n    data.permission = permission;\n  }\n  return getJSON('/api/permissions/template_users', data).then(r => r.users);\n}\n\nexport function getPermissionTemplateGroups(\n  templateId: string,\n  query?: string,\n  permission?: string\n): Promise<any> {\n  const data: RequestData = { templateId, ps: PAGE_SIZE };\n  if (query) {\n    data.q = query;\n  }\n  if (permission) {\n    data.permission = permission;\n  }\n  return getJSON('/api/permissions/template_groups', data).then(r => r.groups);\n}\n\nexport function changeProjectVisibility(\n  project: string,\n  visibility: T.Visibility\n): Promise<void | Response> {\n  return post('/api/projects/update_visibility', { project, visibility }).catch(throwGlobalError);\n}\n\nexport function changeProjectDefaultVisibility(\n  projectVisibility: T.Visibility\n): Promise<void | Response> {\n  return post('/api/projects/update_default_visibility', { projectVisibility }).catch(\n    throwGlobalError\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\n\nexport const PERMISSIONS_ORDER = [\n  'user',\n  'codeviewer',\n  'issueadmin',\n  'securityhotspotadmin',\n  'admin',\n  'scan'\n];\n\nexport const PERMISSION_TEMPLATES_PATH = '/permission_templates';\n\nexport function sortPermissions(permissions: T.Permission[]) {\n  return sortBy(permissions, p => PERMISSIONS_ORDER.indexOf(p.key));\n}\n\nexport function mergePermissionsToTemplates(\n  permissionTemplates: T.PermissionTemplate[],\n  basePermissions: T.Permission[]\n): T.PermissionTemplate[] {\n  return permissionTemplates.map(permissionTemplate => {\n    // it's important to keep the order of the permission template's permissions\n    // the same as the order of base permissions\n    const permissions = basePermissions.map(basePermission => {\n      const projectPermission = permissionTemplate.permissions.find(\n        p => p.key === basePermission.key\n      );\n      return { usersCount: 0, groupsCount: 0, ...basePermission, ...projectPermission };\n    });\n\n    return { ...permissionTemplate, permissions };\n  });\n}\n\nexport function mergeDefaultsToTemplates(\n  permissionTemplates: T.PermissionTemplate[],\n  defaultTemplates: Array<{ templateId: string; qualifier: string }> = []\n): T.PermissionTemplate[] {\n  return permissionTemplates.map(permissionTemplate => {\n    const defaultFor: string[] = [];\n\n    defaultTemplates.forEach(defaultTemplate => {\n      if (defaultTemplate.templateId === permissionTemplate.id) {\n        defaultFor.push(defaultTemplate.qualifier);\n      }\n    });\n\n    return { ...permissionTemplate, defaultFor };\n  });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  confirmButtonText: string;\n  header: string;\n  onClose: () => void;\n  onSubmit: (data: {\n    description: string;\n    name: string;\n    projectKeyPattern: string;\n  }) => Promise<void>;\n  permissionTemplate?: { description?: string; name: string; projectKeyPattern?: string };\n}\n\ninterface State {\n  description: string;\n  name: string;\n  projectKeyPattern: string;\n}\n\nexport default class Form extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      description: (props.permissionTemplate && props.permissionTemplate.description) || '',\n      name: (props.permissionTemplate && props.permissionTemplate.name) || '',\n      projectKeyPattern:\n        (props.permissionTemplate && props.permissionTemplate.projectKeyPattern) || ''\n    };\n  }\n\n  handleSubmit = () => {\n    return this.props\n      .onSubmit({\n        description: this.state.description,\n        name: this.state.name,\n        projectKeyPattern: this.state.projectKeyPattern\n      })\n      .then(this.props.onClose);\n  };\n\n  handleNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleDescriptionChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.setState({ description: event.currentTarget.value });\n  };\n\n  handleProjectKeyPatternChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ projectKeyPattern: event.currentTarget.value });\n  };\n\n  render() {\n    return (\n      <SimpleModal\n        header={this.props.header}\n        onClose={this.props.onClose}\n        onSubmit={this.handleSubmit}\n        size=\"small\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form id=\"permission-template-form\" onSubmit={onFormSubmit}>\n            <header className=\"modal-head\">\n              <h2>{this.props.header}</h2>\n            </header>\n\n            <div className=\"modal-body\">\n              <MandatoryFieldsExplanation className=\"modal-field\" />\n              <div className=\"modal-field\">\n                <label htmlFor=\"permission-template-name\">\n                  {translate('name')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  autoFocus={true}\n                  id=\"permission-template-name\"\n                  maxLength={256}\n                  name=\"name\"\n                  onChange={this.handleNameChange}\n                  required={true}\n                  type=\"text\"\n                  value={this.state.name}\n                />\n                <div className=\"modal-field-description\">{translate('should_be_unique')}</div>\n              </div>\n\n              <div className=\"modal-field\">\n                <label htmlFor=\"permission-template-description\">{translate('description')}</label>\n                <textarea\n                  id=\"permission-template-description\"\n                  name=\"description\"\n                  onChange={this.handleDescriptionChange}\n                  value={this.state.description}\n                />\n              </div>\n\n              <div className=\"modal-field\">\n                <label htmlFor=\"permission-template-project-key-pattern\">\n                  {translate('permission_template.key_pattern')}\n                </label>\n                <input\n                  id=\"permission-template-project-key-pattern\"\n                  maxLength={500}\n                  name=\"projectKeyPattern\"\n                  onChange={this.handleProjectKeyPatternChange}\n                  type=\"text\"\n                  value={this.state.projectKeyPattern}\n                />\n                <div className=\"modal-field-description\">\n                  {translate('permission_template.key_pattern.description')}\n                </div>\n              </div>\n            </div>\n\n            <footer className=\"modal-foot\">\n              <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n              <SubmitButton disabled={submitting} id=\"permission-template-submit\">\n                {this.props.confirmButtonText}\n              </SubmitButton>\n              <ResetButtonLink\n                disabled={submitting}\n                id=\"permission-template-cancel\"\n                onClick={onCloseClick}>\n                {translate('cancel')}\n              </ResetButtonLink>\n            </footer>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { createPermissionTemplate } from '../../../api/permissions';\nimport { Button } from '../../../components/controls/buttons';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport { translate } from '../../../helpers/l10n';\nimport { PERMISSION_TEMPLATES_PATH } from '../utils';\nimport Form from './Form';\n\ninterface Props {\n  ready?: boolean;\n  refresh: () => Promise<void>;\n  router: Pick<Router, 'push'>;\n}\n\ninterface State {\n  createModal: boolean;\n}\n\nclass Header extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { createModal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleCreateClick = () => {\n    this.setState({ createModal: true });\n  };\n\n  handleCreateModalClose = () => {\n    if (this.mounted) {\n      this.setState({ createModal: false });\n    }\n  };\n\n  handleCreateModalSubmit = (data: {\n    description: string;\n    name: string;\n    projectKeyPattern: string;\n  }) => {\n    return createPermissionTemplate({ ...data }).then(response => {\n      this.props.refresh().then(() => {\n        this.props.router.push({\n          pathname: PERMISSION_TEMPLATES_PATH,\n          query: { id: response.permissionTemplate.id }\n        });\n      });\n    });\n  };\n\n  render() {\n    return (\n      <header className=\"page-header\" id=\"project-permissions-header\">\n        <h1 className=\"page-title\">{translate('permission_templates.page')}</h1>\n\n        {!this.props.ready && <i className=\"spinner\" />}\n\n        <div className=\"page-actions\">\n          <Button onClick={this.handleCreateClick}>{translate('create')}</Button>\n\n          {this.state.createModal && (\n            <Form\n              confirmButtonText={translate('create')}\n              header={translate('permission_template.new_template')}\n              onClose={this.handleCreateModalClose}\n              onSubmit={this.handleCreateModalSubmit}\n            />\n          )}\n        </div>\n\n        <p className=\"page-description\">{translate('permission_templates.page.description')}</p>\n      </header>\n    );\n  }\n}\n\nexport default withRouter(Header);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport InstanceMessage from '../../../components/common/InstanceMessage';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  permissions: T.Permission[];\n}\n\nexport default class ListHeader extends React.PureComponent<Props> {\n  renderTooltip(permission: T.Permission) {\n    return permission.key === 'user' || permission.key === 'codeviewer' ? (\n      <div>\n        <InstanceMessage message={translate('projects_role', permission.key, 'desc')} />\n        <Alert className=\"spacer-top\" variant=\"warning\">\n          {translate('projects_role.public_projects_warning')}\n        </Alert>\n      </div>\n    ) : (\n      <InstanceMessage message={translate('projects_role', permission.key, 'desc')} />\n    );\n  }\n\n  render() {\n    const cells = this.props.permissions.map(permission => (\n      <th className=\"permission-column little-padded-left little-padded-right\" key={permission.key}>\n        <div className=\"permission-column-inner\">\n          <span className=\"text-middle\">{translate('projects_role', permission.key)}</span>\n          <HelpTooltip className=\"spacer-left\" overlay={this.renderTooltip(permission)} />\n        </div>\n      </th>\n    ));\n\n    return (\n      <thead>\n        <tr>\n          <th className=\"little-padded-left little-padded-right\">&nbsp;</th>\n          {cells}\n          <th className=\"thin nowrap text-right little-padded-left little-padded-right\">&nbsp;</th>\n        </tr>\n      </thead>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\ninterface Props {\n  onClose: () => void;\n  onSubmit: () => Promise<void>;\n  permissionTemplate: T.PermissionTemplate;\n}\n\nexport default function DeleteForm({ onClose, onSubmit, permissionTemplate: t }: Props) {\n  const header = translate('permission_template.delete_confirm_title');\n\n  return (\n    <SimpleModal header={header} onClose={onClose} onSubmit={onSubmit}>\n      {({ onCloseClick, onFormSubmit, submitting }) => (\n        <form onSubmit={onFormSubmit}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n          </header>\n\n          <div className=\"modal-body\">\n            {translateWithParameters(\n              'permission_template.do_you_want_to_delete_template_xxx',\n              t.name\n            )}\n          </div>\n\n          <footer className=\"modal-foot\">\n            <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n            <SubmitButton className=\"button-red\" disabled={submitting}>\n              {translate('delete')}\n            </SubmitButton>\n            <ResetButtonLink disabled={submitting} onClick={onCloseClick}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </footer>\n        </form>\n      )}\n    </SimpleModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { difference } from 'lodash';\nimport * as React from 'react';\nimport {\n  deletePermissionTemplate,\n  setDefaultPermissionTemplate,\n  updatePermissionTemplate\n} from '../../../api/permissions';\nimport ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { PERMISSION_TEMPLATES_PATH } from '../utils';\nimport DeleteForm from './DeleteForm';\nimport Form from './Form';\n\ninterface Props {\n  fromDetails?: boolean;\n  permissionTemplate: T.PermissionTemplate;\n  refresh: () => void;\n  router: Pick<Router, 'replace'>;\n  topQualifiers: string[];\n}\n\ninterface State {\n  deleteForm: boolean;\n  updateModal: boolean;\n}\n\nexport class ActionsCell extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { deleteForm: false, updateModal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleUpdateClick = () => {\n    this.setState({ updateModal: true });\n  };\n\n  handleCloseUpdateModal = () => {\n    if (this.mounted) {\n      this.setState({ updateModal: false });\n    }\n  };\n\n  handleSubmitUpdateModal = (data: {\n    description: string;\n    name: string;\n    projectKeyPattern: string;\n  }) => {\n    return updatePermissionTemplate({ id: this.props.permissionTemplate.id, ...data }).then(\n      this.props.refresh\n    );\n  };\n\n  handleDeleteClick = () => {\n    this.setState({ deleteForm: true });\n  };\n\n  handleCloseDeleteForm = () => {\n    if (this.mounted) {\n      this.setState({ deleteForm: false });\n    }\n  };\n\n  handleDeleteSubmit = () => {\n    return deletePermissionTemplate({ templateId: this.props.permissionTemplate.id }).then(() => {\n      this.props.router.replace(PERMISSION_TEMPLATES_PATH);\n      this.props.refresh();\n    });\n  };\n\n  setDefault = (qualifier: string) => () => {\n    setDefaultPermissionTemplate(this.props.permissionTemplate.id, qualifier).then(\n      this.props.refresh,\n      () => {}\n    );\n  };\n\n  getAvailableQualifiers() {\n    return difference(this.props.topQualifiers, this.props.permissionTemplate.defaultFor);\n  }\n\n  renderSetDefaultsControl() {\n    const availableQualifiers = this.getAvailableQualifiers();\n\n    if (availableQualifiers.length === 0) {\n      return null;\n    }\n\n    return this.props.topQualifiers.length === 1\n      ? this.renderIfSingleTopQualifier(availableQualifiers)\n      : this.renderIfMultipleTopQualifiers(availableQualifiers);\n  }\n\n  renderSetDefaultLink(qualifier: string, child: React.ReactNode) {\n    return (\n      <ActionsDropdownItem\n        className=\"js-set-default\"\n        data-qualifier={qualifier}\n        key={qualifier}\n        onClick={this.setDefault(qualifier)}>\n        {child}\n      </ActionsDropdownItem>\n    );\n  }\n\n  renderIfSingleTopQualifier(availableQualifiers: string[]) {\n    return availableQualifiers.map(qualifier =>\n      this.renderSetDefaultLink(\n        qualifier,\n        <span>{translate('permission_templates.set_default')}</span>\n      )\n    );\n  }\n\n  renderIfMultipleTopQualifiers(availableQualifiers: string[]) {\n    return availableQualifiers.map(qualifier =>\n      this.renderSetDefaultLink(\n        qualifier,\n        <span>\n          {translate('permission_templates.set_default_for')}{' '}\n          <QualifierIcon qualifier={qualifier} /> {translate('qualifiers', qualifier)}\n        </span>\n      )\n    );\n  }\n\n  render() {\n    const { permissionTemplate: t } = this.props;\n\n    return (\n      <>\n        <ActionsDropdown>\n          {this.renderSetDefaultsControl()}\n\n          {!this.props.fromDetails && (\n            <ActionsDropdownItem to={{ pathname: PERMISSION_TEMPLATES_PATH, query: { id: t.id } }}>\n              {translate('edit_permissions')}\n            </ActionsDropdownItem>\n          )}\n\n          <ActionsDropdownItem className=\"js-update\" onClick={this.handleUpdateClick}>\n            {translate('update_details')}\n          </ActionsDropdownItem>\n\n          {t.defaultFor.length === 0 && (\n            <ActionsDropdownItem\n              className=\"js-delete\"\n              destructive={true}\n              onClick={this.handleDeleteClick}>\n              {translate('delete')}\n            </ActionsDropdownItem>\n          )}\n        </ActionsDropdown>\n\n        {this.state.updateModal && (\n          <Form\n            confirmButtonText={translate('update_verb')}\n            header={translate('permission_template.edit_template')}\n            onClose={this.handleCloseUpdateModal}\n            onSubmit={this.handleSubmitUpdateModal}\n            permissionTemplate={t}\n          />\n        )}\n\n        {this.state.deleteForm && (\n          <DeleteForm\n            onClose={this.handleCloseDeleteForm}\n            onSubmit={this.handleDeleteSubmit}\n            permissionTemplate={t}\n          />\n        )}\n      </>\n    );\n  }\n}\n\nexport default withRouter(ActionsCell);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\ninterface Props {\n  template: T.PermissionTemplate;\n}\n\nexport default function Defaults({ template }: Props) {\n  const qualifiersToDisplay = template.defaultFor;\n\n  const qualifiers = sortBy(qualifiersToDisplay)\n    .map(qualifier => translate('qualifiers', qualifier))\n    .join(', ');\n\n  return (\n    <div>\n      <span className=\"badge spacer-right\">\n        {translateWithParameters('permission_template.default_for', qualifiers)}\n      </span>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { PERMISSION_TEMPLATES_PATH } from '../utils';\nimport Defaults from './Defaults';\n\ninterface Props {\n  template: T.PermissionTemplate;\n}\n\nexport default function NameCell({ template }: Props) {\n  const pathname = PERMISSION_TEMPLATES_PATH;\n\n  return (\n    <td className=\"little-padded-left little-padded-right\">\n      <Link to={{ pathname, query: { id: template.id } }}>\n        <strong className=\"js-name\">{template.name}</strong>\n      </Link>\n\n      {template.defaultFor.length > 0 && (\n        <div className=\"spacer-top js-defaults\">\n          <Defaults template={template} />\n        </div>\n      )}\n\n      {!!template.description && (\n        <div className=\"spacer-top js-description\">{template.description}</div>\n      )}\n\n      {!!template.projectKeyPattern && (\n        <div className=\"spacer-top js-project-key-pattern\">\n          Project Key Pattern: <code>{template.projectKeyPattern}</code>\n        </div>\n      )}\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { isSonarCloud } from '../../../helpers/system';\n\ninterface Props {\n  permission: {\n    key: string;\n    usersCount: number;\n    groupsCount: number;\n    withProjectCreator?: boolean;\n  };\n}\n\nexport default function PermissionCell({ permission: p }: Props) {\n  return (\n    <td className=\"permission-column little-padded-left little-padded-right\">\n      <div className=\"permission-column-inner\">\n        <ul>\n          {p.withProjectCreator && (\n            <li className=\"little-spacer-bottom display-flex-center\">\n              {translate('permission_templates.project_creators')}\n              <HelpTooltip\n                className=\"little-spacer-left\"\n                overlay={translate(\n                  isSonarCloud()\n                    ? 'permission_templates.project_creators.explanation.sonarcloud'\n                    : 'permission_templates.project_creators.explanation'\n                )}\n              />\n            </li>\n          )}\n          <li className=\"little-spacer-bottom\">\n            <strong>{p.usersCount}</strong>\n            {'  user(s)'}\n          </li>\n          <li>\n            <strong>{p.groupsCount}</strong>\n            {' group(s)'}\n          </li>\n        </ul>\n      </div>\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ActionsCell from './ActionsCell';\nimport NameCell from './NameCell';\nimport PermissionCell from './PermissionCell';\n\ninterface Props {\n  refresh: () => Promise<void>;\n  template: T.PermissionTemplate;\n  topQualifiers: string[];\n}\n\nexport default function ListItem(props: Props) {\n  const permissions = props.template.permissions.map(p => (\n    <PermissionCell key={p.key} permission={p} />\n  ));\n\n  return (\n    <tr data-id={props.template.id} data-name={props.template.name}>\n      <NameCell template={props.template} />\n\n      {permissions}\n\n      <td className=\"nowrap thin text-right text-top little-padded-left little-padded-right\">\n        <ActionsCell\n          permissionTemplate={props.template}\n          refresh={props.refresh}\n          topQualifiers={props.topQualifiers}\n        />\n      </td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ListHeader from './ListHeader';\nimport ListItem from './ListItem';\n\ninterface Props {\n  permissionTemplates: T.PermissionTemplate[];\n  permissions: T.Permission[];\n  refresh: () => Promise<void>;\n  topQualifiers: string[];\n}\n\nexport default function List(props: Props) {\n  const permissionTemplates = props.permissionTemplates.map(p => (\n    <ListItem key={p.id} refresh={props.refresh} template={p} topQualifiers={props.topQualifiers} />\n  ));\n\n  return (\n    <div className=\"boxed-group boxed-group-inner\">\n      <table className=\"data zebra permissions-table\" id=\"permission-templates\">\n        <ListHeader permissions={props.permissions} />\n        <tbody>{permissionTemplates}</tbody>\n      </table>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { translate } from '../../../helpers/l10n';\nimport Header from './Header';\nimport List from './List';\n\ninterface Props {\n  permissionTemplates: T.PermissionTemplate[];\n  permissions: T.Permission[];\n  ready: boolean;\n  refresh: () => Promise<void>;\n  topQualifiers: string[];\n}\n\nexport default function Home(props: Props) {\n  return (\n    <div className=\"page page-limited\">\n      <Helmet defer={false} title={translate('permission_templates.page')} />\n\n      <Header ready={props.ready} refresh={props.refresh} />\n\n      <List\n        permissionTemplates={props.permissionTemplates}\n        permissions={props.permissions}\n        refresh={props.refresh}\n        topQualifiers={props.topQualifiers}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { hasMessage, translate } from '../../helpers/l10n';\nimport { isSonarCloud } from '../../helpers/system';\n\nexport const PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE = [\n  'user',\n  'codeviewer',\n  'issueadmin',\n  'securityhotspotadmin',\n  'admin',\n  'scan'\n];\n\nexport const PERMISSIONS_ORDER_GLOBAL = [\n  'admin',\n  { category: 'administer', permissions: ['gateadmin', 'profileadmin'] },\n  'scan',\n  { category: 'creator', permissions: ['provisioning', 'applicationcreator', 'portfoliocreator'] }\n];\n\nexport const PERMISSIONS_ORDER_FOR_VIEW = ['user', 'admin'];\n\nexport const PERMISSIONS_ORDER_FOR_DEV = ['user', 'admin'];\n\nexport const PERMISSIONS_ORDER_BY_QUALIFIER: T.Dict<string[]> = {\n  TRK: PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE,\n  VW: PERMISSIONS_ORDER_FOR_VIEW,\n  SVW: PERMISSIONS_ORDER_FOR_VIEW,\n  APP: PERMISSIONS_ORDER_FOR_VIEW,\n  DEV: PERMISSIONS_ORDER_FOR_DEV\n};\n\nfunction convertToPermissionDefinition(permission: string, l10nPrefix: string) {\n  const getMessage = (messageKey: string) => {\n    const cloudMessageKey = `${messageKey}.sonarcloud`;\n    return isSonarCloud() && hasMessage(cloudMessageKey)\n      ? translate(cloudMessageKey)\n      : translate(messageKey);\n  };\n\n  const name = getMessage(`${l10nPrefix}.${permission}`);\n  const description = getMessage(`${l10nPrefix}.${permission}.desc`);\n\n  return {\n    key: permission,\n    name,\n    description\n  };\n}\n\nexport function filterPermissions(\n  permissions: Array<string | { category: string; permissions: string[] }>,\n  hasApplicationsEnabled: boolean,\n  hasPortfoliosEnabled: boolean\n) {\n  return permissions.map(permission => {\n    if (typeof permission === 'object' && permission.category === 'creator') {\n      return {\n        ...permission,\n        permissions: permission.permissions.filter(p => {\n          return (\n            p === 'provisioning' ||\n            (p === 'portfoliocreator' && hasPortfoliosEnabled) ||\n            (p === 'applicationcreator' && hasApplicationsEnabled)\n          );\n        })\n      };\n    }\n    return permission;\n  });\n}\n\nexport function convertToPermissionDefinitions(\n  permissions: Array<string | { category: string; permissions: string[] }>,\n  l10nPrefix: string\n): Array<T.PermissionDefinition | T.PermissionDefinitionGroup> {\n  return permissions.map(permission => {\n    if (typeof permission === 'object') {\n      return {\n        category: permission.category,\n        permissions: permission.permissions.map(permission =>\n          convertToPermissionDefinition(permission, l10nPrefix)\n        )\n      };\n    }\n    return convertToPermissionDefinition(permission, l10nPrefix);\n  });\n}\n\nexport function isPermissionDefinitionGroup(\n  permission?: T.PermissionDefinition | T.PermissionDefinitionGroup\n): permission is T.PermissionDefinitionGroup {\n  return Boolean(permission && (permission as T.PermissionDefinitionGroup).category);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\nexport default function GroupIcon({ fill, size = 36, ...iconProps }: IconProps) {\n  return (\n    <Icon viewBox=\"0 0 36 36\" size={size} {...iconProps}>\n      <g transform=\"matrix(0.0625,0,0,0.0625,3,4)\">\n        <path\n          d=\"M148.25,224C121.25,224.833 99.167,235.5 82,256L48.5,256C34.833,256 23.333,252.625 14,245.875C4.667,239.125 0,229.25 0,216.25C0,157.417 10.333,128 31,128C32,128 35.625,129.75 41.875,133.25C48.125,136.75 56.25,140.292 66.25,143.875C76.25,147.458 86.167,149.25 96,149.25C107.167,149.25 118.25,147.333 129.25,143.5C128.417,149.667 128,155.167 128,160C128,183.167 134.75,204.5 148.25,224ZM416,383.25C416,403.25 409.917,419.042 397.75,430.625C385.583,442.208 369.417,448 349.25,448L130.75,448C110.583,448 94.417,442.208 82.25,430.625C70.083,419.042 64,403.25 64,383.25C64,374.417 64.292,365.792 64.875,357.375C65.458,348.958 66.625,339.875 68.375,330.125C70.125,320.375 72.333,311.333 75,303C77.667,294.667 81.25,286.542 85.75,278.625C90.25,270.708 95.417,263.958 101.25,258.375C107.083,252.792 114.208,248.333 122.625,245C131.042,241.667 140.333,240 150.5,240C152.167,240 155.75,241.792 161.25,245.375C166.75,248.958 172.833,252.958 179.5,257.375C186.167,261.792 195.083,265.792 206.25,269.375C217.417,272.958 228.667,274.75 240,274.75C251.333,274.75 262.583,272.958 273.75,269.375C284.917,265.792 293.833,261.792 300.5,257.375C307.167,252.958 313.25,248.958 318.75,245.375C324.25,241.792 327.833,240 329.5,240C339.667,240 348.958,241.667 357.375,245C365.792,248.333 372.917,252.792 378.75,258.375C384.583,263.958 389.75,270.708 394.25,278.625C398.75,286.542 402.333,294.667 405,303C407.667,311.333 409.875,320.375 411.625,330.125C413.375,339.875 414.542,348.958 415.125,357.375C415.708,365.792 416,374.417 416,383.25ZM160,64C160,81.667 153.75,96.75 141.25,109.25C128.75,121.75 113.667,128 96,128C78.333,128 63.25,121.75 50.75,109.25C38.25,96.75 32,81.667 32,64C32,46.333 38.25,31.25 50.75,18.75C63.25,6.25 78.333,0 96,0C113.667,0 128.75,6.25 141.25,18.75C153.75,31.25 160,46.333 160,64ZM336,160C336,186.5 326.625,209.125 307.875,227.875C289.125,246.625 266.5,256 240,256C213.5,256 190.875,246.625 172.125,227.875C153.375,209.125 144,186.5 144,160C144,133.5 153.375,110.875 172.125,92.125C190.875,73.375 213.5,64 240,64C266.5,64 289.125,73.375 307.875,92.125C326.625,110.875 336,133.5 336,160ZM480,216.25C480,229.25 475.333,239.125 466,245.875C456.667,252.625 445.167,256 431.5,256L398,256C380.833,235.5 358.75,224.833 331.75,224C345.25,204.5 352,183.167 352,160C352,155.167 351.583,149.667 350.75,143.5C361.75,147.333 372.833,149.25 384,149.25C393.833,149.25 403.75,147.458 413.75,143.875C423.75,140.292 431.875,136.75 438.125,133.25C444.375,129.75 448,128 449,128C469.667,128 480,157.417 480,216.25ZM448,64C448,81.667 441.75,96.75 429.25,109.25C416.75,121.75 401.667,128 384,128C366.333,128 351.25,121.75 338.75,109.25C326.25,96.75 320,81.667 320,64C320,46.333 326.25,31.25 338.75,18.75C351.25,6.25 366.333,0 384,0C401.667,0 416.75,6.25 429.25,18.75C441.75,31.25 448,46.333 448,64Z\"\n          style={{ fill: fill || colors.gray67 }}\n        />\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Checkbox from '../../../../components/controls/Checkbox';\nimport { isPermissionDefinitionGroup } from '../../utils';\n\ninterface Props {\n  loading: string[];\n  onCheck: (checked: boolean, permission?: string) => void;\n  permission: T.PermissionDefinition | T.PermissionDefinitionGroup;\n  permissionItem: T.PermissionGroup | T.PermissionUser;\n  selectedPermission?: string;\n}\n\nexport default class PermissionCell extends React.PureComponent<Props> {\n  render() {\n    const { loading, onCheck, permission, permissionItem, selectedPermission } = this.props;\n    if (isPermissionDefinitionGroup(permission)) {\n      return (\n        <td className=\"text-middle\">\n          {permission.permissions.map(permission => (\n            <div key={permission.key}>\n              <Checkbox\n                checked={permissionItem.permissions.includes(permission.key)}\n                disabled={loading.includes(permission.key)}\n                id={permission.key}\n                onCheck={onCheck}>\n                <span className=\"little-spacer-left\">{permission.name}</span>\n              </Checkbox>\n            </div>\n          ))}\n        </td>\n      );\n    } else {\n      return (\n        <td\n          className={classNames('permission-column text-center text-middle', {\n            selected: permission.key === selectedPermission\n          })}>\n          <Checkbox\n            checked={permissionItem.permissions.includes(permission.key)}\n            disabled={loading.includes(permission.key)}\n            id={permission.key}\n            onCheck={onCheck}\n          />\n        </td>\n      );\n    }\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { without } from 'lodash';\nimport * as React from 'react';\nimport GroupIcon from '../../../../components/icons/GroupIcon';\nimport { isPermissionDefinitionGroup } from '../../utils';\nimport PermissionCell from './PermissionCell';\n\ninterface Props {\n  group: T.PermissionGroup;\n  onToggle: (group: T.PermissionGroup, permission: string) => Promise<void>;\n  permissions: T.PermissionDefinitions;\n  selectedPermission?: string;\n}\n\ninterface State {\n  loading: string[];\n}\n\nexport default class GroupHolder extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = (permission: string) => {\n    if (this.mounted) {\n      this.setState(state => ({ loading: without(state.loading, permission) }));\n    }\n  };\n\n  handleCheck = (_checked: boolean, permission?: string) => {\n    if (permission !== undefined) {\n      this.setState(state => ({ loading: [...state.loading, permission] }));\n      this.props.onToggle(this.props.group, permission).then(\n        () => this.stopLoading(permission),\n        () => this.stopLoading(permission)\n      );\n    }\n  };\n\n  render() {\n    const { group } = this.props;\n\n    return (\n      <tr>\n        <td className=\"nowrap text-middle\">\n          <div className=\"display-flex-center\">\n            <GroupIcon className=\"big-spacer-right\" />\n            <div className=\"max-width-100\">\n              <div className=\"max-width-100 text-ellipsis\">\n                <strong>{group.name}</strong>\n              </div>\n              <div className=\"little-spacer-top\" style={{ whiteSpace: 'normal' }}>\n                {group.description}\n              </div>\n            </div>\n          </div>\n        </td>\n        {this.props.permissions.map(permission => (\n          <PermissionCell\n            key={isPermissionDefinitionGroup(permission) ? permission.category : permission.key}\n            loading={this.state.loading}\n            onCheck={this.handleCheck}\n            permission={permission}\n            permissionItem={group}\n            selectedPermission={this.props.selectedPermission}\n          />\n        ))}\n      </tr>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport InstanceMessage from '../../../../components/common/InstanceMessage';\nimport HelpTooltip from '../../../../components/controls/HelpTooltip';\nimport Tooltip from '../../../../components/controls/Tooltip';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\nimport { isPermissionDefinitionGroup } from '../../utils';\n\ninterface Props {\n  onSelectPermission?: (permission: string) => void;\n  permission: T.PermissionDefinition | T.PermissionDefinitionGroup;\n  selectedPermission?: string;\n  showPublicProjectsWarning?: boolean;\n}\n\nexport default class PermissionHeader extends React.PureComponent<Props> {\n  handlePermissionClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    const { permission } = this.props;\n    if (this.props.onSelectPermission && !isPermissionDefinitionGroup(permission)) {\n      this.props.onSelectPermission(permission.key);\n    }\n  };\n\n  getTooltipOverlay = () => {\n    const { permission } = this.props;\n\n    if (isPermissionDefinitionGroup(permission)) {\n      return permission.permissions.map(permission => (\n        <React.Fragment key={permission.key}>\n          <b className=\"little-spacer-right\">{permission.name}:</b>\n          <InstanceMessage key={permission.key} message={permission.description} />\n          <br />\n        </React.Fragment>\n      ));\n    } else {\n      if (this.props.showPublicProjectsWarning && ['user', 'codeviewer'].includes(permission.key)) {\n        return (\n          <div>\n            <InstanceMessage message={permission.description} />\n            <Alert className=\"spacer-top\" variant=\"warning\">\n              {translate('projects_role.public_projects_warning')}\n            </Alert>\n          </div>\n        );\n      }\n      return <InstanceMessage message={permission.description} />;\n    }\n  };\n\n  render() {\n    const { onSelectPermission, permission } = this.props;\n    let name;\n    if (isPermissionDefinitionGroup(permission)) {\n      name = translate('global_permissions', permission.category);\n    } else {\n      name = onSelectPermission ? (\n        <Tooltip\n          overlay={translateWithParameters(\n            'global_permissions.filter_by_x_permission',\n            permission.name\n          )}>\n          <a href=\"#\" onClick={this.handlePermissionClick}>\n            {permission.name}\n          </a>\n        </Tooltip>\n      ) : (\n        permission.name\n      );\n    }\n    return (\n      <th\n        className={classNames('permission-column text-center text-middle', {\n          selected:\n            !isPermissionDefinitionGroup(permission) &&\n            permission.key === this.props.selectedPermission\n        })}>\n        <div className=\"permission-column-inner\">\n          {name}\n          <HelpTooltip className=\"spacer-left\" overlay={this.getTooltipOverlay()} />\n        </div>\n      </th>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { without } from 'lodash';\nimport * as React from 'react';\nimport Avatar from '../../../../components/ui/Avatar';\nimport { translate } from '../../../../helpers/l10n';\nimport { isPermissionDefinitionGroup } from '../../utils';\nimport PermissionCell from './PermissionCell';\n\ninterface Props {\n  onToggle: (user: T.PermissionUser, permission: string) => Promise<void>;\n  permissions: T.PermissionDefinitions;\n  selectedPermission?: string;\n  user: T.PermissionUser;\n}\n\ninterface State {\n  loading: string[];\n}\n\nexport default class UserHolder extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = (permission: string) => {\n    if (this.mounted) {\n      this.setState(state => ({ loading: without(state.loading, permission) }));\n    }\n  };\n\n  handleCheck = (_checked: boolean, permission?: string) => {\n    if (permission !== undefined) {\n      this.setState(state => ({ loading: [...state.loading, permission] }));\n      this.props.onToggle(this.props.user, permission).then(\n        () => this.stopLoading(permission),\n        () => this.stopLoading(permission)\n      );\n    }\n  };\n\n  render() {\n    const { user } = this.props;\n    const permissionCells = this.props.permissions.map(permission => (\n      <PermissionCell\n        key={isPermissionDefinitionGroup(permission) ? permission.category : permission.key}\n        loading={this.state.loading}\n        onCheck={this.handleCheck}\n        permission={permission}\n        permissionItem={user}\n        selectedPermission={this.props.selectedPermission}\n      />\n    ));\n\n    if (user.login === '<creator>') {\n      return (\n        <tr>\n          <td className=\"nowrap text-middle\">\n            <div>\n              <strong>{user.name}</strong>\n            </div>\n            <div className=\"little-spacer-top\" style={{ whiteSpace: 'normal' }}>\n              {translate('permission_templates.project_creators.explanation')}\n            </div>\n          </td>\n          {permissionCells}\n        </tr>\n      );\n    }\n\n    return (\n      <tr>\n        <td className=\"nowrap text-middle\">\n          <div className=\"display-flex-center\">\n            <Avatar\n              className=\"text-middle big-spacer-right flex-0\"\n              hash={user.avatar}\n              name={user.name}\n              size={36}\n            />\n            <div className=\"max-width-100\">\n              <div className=\"max-width-100 text-ellipsis\">\n                <strong>{user.name}</strong>\n                <span className=\"note spacer-left\">{user.login}</span>\n              </div>\n              <div className=\"little-spacer-top max-width-100 text-ellipsis\">{user.email}</div>\n            </div>\n          </div>\n        </td>\n        {permissionCells}\n      </tr>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { partition, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\nimport { isPermissionDefinitionGroup } from '../../utils';\nimport GroupHolder from './GroupHolder';\nimport PermissionHeader from './PermissionHeader';\nimport UserHolder from './UserHolder';\n\ninterface Props {\n  filter?: string;\n  groups: T.PermissionGroup[];\n  loading?: boolean;\n  onSelectPermission?: (permission: string) => void;\n  onToggleGroup: (group: T.PermissionGroup, permission: string) => Promise<void>;\n  onToggleUser: (user: T.PermissionUser, permission: string) => Promise<void>;\n  permissions: T.PermissionDefinitions;\n  query?: string;\n  selectedPermission?: string;\n  showPublicProjectsWarning?: boolean;\n  users: T.PermissionUser[];\n}\n\ninterface State {\n  initialPermissionsCount: T.Dict<number>;\n}\nexport default class HoldersList extends React.PureComponent<Props, State> {\n  state: State = { initialPermissionsCount: {} };\n  componentDidUpdate(prevProps: Props) {\n    if (this.props.filter !== prevProps.filter || this.props.query !== prevProps.query) {\n      this.setState({ initialPermissionsCount: {} });\n    }\n  }\n\n  isPermissionUser(item: T.PermissionGroup | T.PermissionUser): item is T.PermissionUser {\n    return (item as T.PermissionUser).login !== undefined;\n  }\n\n  handleGroupToggle = (group: T.PermissionGroup, permission: string) => {\n    const key = group.id || group.name;\n    if (this.state.initialPermissionsCount[key] === undefined) {\n      this.setState(state => ({\n        initialPermissionsCount: {\n          ...state.initialPermissionsCount,\n          [key]: group.permissions.length\n        }\n      }));\n    }\n    return this.props.onToggleGroup(group, permission);\n  };\n\n  handleUserToggle = (user: T.PermissionUser, permission: string) => {\n    if (this.state.initialPermissionsCount[user.login] === undefined) {\n      this.setState(state => ({\n        initialPermissionsCount: {\n          ...state.initialPermissionsCount,\n          [user.login]: user.permissions.length\n        }\n      }));\n    }\n    return this.props.onToggleUser(user, permission);\n  };\n\n  getItemInitialPermissionsCount = (item: T.PermissionGroup | T.PermissionUser) => {\n    const key = this.isPermissionUser(item) ? item.login : item.id || item.name;\n    return this.state.initialPermissionsCount[key] !== undefined\n      ? this.state.initialPermissionsCount[key]\n      : item.permissions.length;\n  };\n\n  renderEmpty() {\n    const columns = this.props.permissions.length + 1;\n    return (\n      <tr>\n        <td colSpan={columns}>{translate('no_results_search')}</td>\n      </tr>\n    );\n  }\n\n  renderItem(item: T.PermissionUser | T.PermissionGroup, permissions: T.PermissionDefinitions) {\n    return this.isPermissionUser(item) ? (\n      <UserHolder\n        key={`user-${item.login}`}\n        onToggle={this.handleUserToggle}\n        permissions={permissions}\n        selectedPermission={this.props.selectedPermission}\n        user={item}\n      />\n    ) : (\n      <GroupHolder\n        group={item}\n        key={`group-${item.id || item.name}`}\n        onToggle={this.handleGroupToggle}\n        permissions={permissions}\n        selectedPermission={this.props.selectedPermission}\n      />\n    );\n  }\n\n  render() {\n    const { permissions } = this.props;\n    const items = sortBy([...this.props.users, ...this.props.groups], item => {\n      if (this.isPermissionUser(item) && item.login === '<creator>') {\n        return 0;\n      }\n      return item.name;\n    });\n    const [itemWithPermissions, itemWithoutPermissions] = partition(items, item =>\n      this.getItemInitialPermissionsCount(item)\n    );\n    return (\n      <div className=\"boxed-group boxed-group-inner\">\n        <table className=\"data zebra permissions-table\">\n          <thead>\n            <tr>\n              <td className=\"nowrap bordered-bottom\">{this.props.children}</td>\n              {permissions.map(permission => (\n                <PermissionHeader\n                  key={\n                    isPermissionDefinitionGroup(permission) ? permission.category : permission.key\n                  }\n                  onSelectPermission={this.props.onSelectPermission}\n                  permission={permission}\n                  selectedPermission={this.props.selectedPermission}\n                  showPublicProjectsWarning={this.props.showPublicProjectsWarning}\n                />\n              ))}\n            </tr>\n          </thead>\n          <tbody>\n            {items.length === 0 && !this.props.loading && this.renderEmpty()}\n            {itemWithPermissions.map(item => this.renderItem(item, permissions))}\n            {itemWithPermissions.length > 0 && itemWithoutPermissions.length > 0 && (\n              <>\n                <tr>\n                  <td className=\"divider\" colSpan={20} />\n                </tr>\n                <tr />\n                {/* Keep correct zebra colors in the table */}\n              </>\n            )}\n            {itemWithoutPermissions.map(item => this.renderItem(item, permissions))}\n          </tbody>\n        </table>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioToggle from '../../../../components/controls/RadioToggle';\nimport SearchBox from '../../../../components/controls/SearchBox';\nimport { translate } from '../../../../helpers/l10n';\n\ninterface Props {\n  filter: string;\n  onFilter: (value: string) => void;\n  onSearch: (value: string) => void;\n  query: string;\n}\n\nexport default function SearchForm(props: Props) {\n  const filterOptions = [\n    { value: 'all', label: translate('all') },\n    { value: 'users', label: translate('users.page') },\n    { value: 'groups', label: translate('user_groups.page') }\n  ];\n\n  return (\n    <div className=\"display-flex-row\">\n      <RadioToggle\n        name=\"users-or-groups\"\n        onCheck={props.onFilter}\n        options={filterOptions}\n        value={props.filter}\n      />\n\n      <div className=\"flex-1 spacer-left\">\n        <SearchBox\n          minLength={3}\n          onChange={props.onSearch}\n          placeholder={translate('search.search_for_users_or_groups')}\n          value={props.query}\n        />\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Defaults from './Defaults';\n\ninterface Props {\n  template: T.PermissionTemplate;\n}\n\nexport default function TemplateDetails({ template }: Props) {\n  return (\n    <div className=\"big-spacer-bottom\">\n      {template.defaultFor.length > 0 && (\n        <div className=\"spacer-top js-defaults\">\n          <Defaults template={template} />\n        </div>\n      )}\n\n      {!!template.description && (\n        <div className=\"spacer-top js-description\">{template.description}</div>\n      )}\n\n      {!!template.projectKeyPattern && (\n        <div className=\"spacer-top js-project-key-pattern\">\n          Project Key Pattern: <code>{template.projectKeyPattern}</code>\n        </div>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\nimport { PERMISSION_TEMPLATES_PATH } from '../utils';\nimport ActionsCell from './ActionsCell';\n\ninterface Props {\n  loading: boolean;\n  refresh: () => void;\n  template: T.PermissionTemplate;\n  topQualifiers: string[];\n}\n\nexport default function TemplateHeader(props: Props) {\n  const { template } = props;\n  return (\n    <header className=\"page-header\" id=\"project-permissions-header\">\n      <div className=\"note spacer-bottom\">\n        <Link className=\"text-muted\" to={PERMISSION_TEMPLATES_PATH}>\n          {translate('permission_templates.page')}\n        </Link>\n      </div>\n\n      <h1 className=\"page-title\">{template.name}</h1>\n\n      {props.loading && <i className=\"spinner\" />}\n\n      <div className=\"pull-right\">\n        <ActionsCell\n          fromDetails={true}\n          permissionTemplate={template}\n          refresh={props.refresh}\n          topQualifiers={props.topQualifiers}\n        />\n      </div>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport * as api from '../../../api/permissions';\nimport { translate } from '../../../helpers/l10n';\nimport HoldersList from '../../permissions/shared/components/HoldersList';\nimport SearchForm from '../../permissions/shared/components/SearchForm';\nimport {\n  convertToPermissionDefinitions,\n  PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE\n} from '../../permissions/utils';\nimport TemplateDetails from './TemplateDetails';\nimport TemplateHeader from './TemplateHeader';\n\ninterface Props {\n  refresh: () => void;\n  template: T.PermissionTemplate;\n  topQualifiers: string[];\n}\n\ninterface State {\n  filter: string;\n  groups: T.PermissionGroup[];\n  loading: boolean;\n  query: string;\n  selectedPermission?: string;\n  users: T.PermissionUser[];\n}\n\nexport default class Template extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    filter: 'all',\n    groups: [],\n    loading: false,\n    query: '',\n    users: []\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.requestHolders();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  requestHolders = (realQuery?: string) => {\n    this.setState({ loading: true });\n\n    const { template } = this.props;\n    const { query, filter, selectedPermission } = this.state;\n    const requests = [];\n\n    const finalQuery = realQuery != null ? realQuery : query;\n\n    if (filter !== 'groups') {\n      requests.push(api.getPermissionTemplateUsers(template.id, finalQuery, selectedPermission));\n    } else {\n      requests.push(Promise.resolve([]));\n    }\n\n    if (filter !== 'users') {\n      requests.push(api.getPermissionTemplateGroups(template.id, finalQuery, selectedPermission));\n    } else {\n      requests.push(Promise.resolve([]));\n    }\n    return Promise.all(requests).then(([users, groups]) => {\n      if (this.mounted) {\n        this.setState({\n          users,\n          groups,\n          loading: false\n        });\n      }\n    });\n  };\n\n  handleToggleUser = (user: T.PermissionUser, permission: string) => {\n    if (user.login === '<creator>') {\n      return this.handleToggleProjectCreator(user, permission);\n    }\n    const { template } = this.props;\n    const hasPermission = user.permissions.includes(permission);\n    const data: { templateId: string; login: string; permission: string } = {\n      templateId: template.id,\n      login: user.login,\n      permission\n    };\n\n    const request = hasPermission\n      ? api.revokeTemplatePermissionFromUser(data)\n      : api.grantTemplatePermissionToUser(data);\n    return request.then(() => this.requestHolders()).then(this.props.refresh);\n  };\n\n  handleToggleProjectCreator = (user: T.PermissionUser, permission: string) => {\n    const { template } = this.props;\n    const hasPermission = user.permissions.includes(permission);\n    const request = hasPermission\n      ? api.removeProjectCreatorFromTemplate(template.id, permission)\n      : api.addProjectCreatorToTemplate(template.id, permission);\n    return request.then(() => this.requestHolders()).then(this.props.refresh);\n  };\n\n  handleToggleGroup = (group: T.PermissionGroup, permission: string) => {\n    const { template } = this.props;\n    const hasPermission = group.permissions.includes(permission);\n    const data = {\n      templateId: template.id,\n      groupName: group.name,\n      permission\n    };\n    const request = hasPermission\n      ? api.revokeTemplatePermissionFromGroup(data)\n      : api.grantTemplatePermissionToGroup(data);\n    return request.then(() => this.requestHolders()).then(this.props.refresh);\n  };\n\n  handleSearch = (query: string) => {\n    this.setState({ query });\n    this.requestHolders(query);\n  };\n\n  handleFilter = (filter: string) => {\n    this.setState({ filter }, this.requestHolders);\n  };\n\n  handleSelectPermission = (selectedPermission: string) => {\n    if (selectedPermission === this.state.selectedPermission) {\n      this.setState({ selectedPermission: undefined }, this.requestHolders);\n    } else {\n      this.setState({ selectedPermission }, this.requestHolders);\n    }\n  };\n\n  shouldDisplayCreator = (creatorPermissions: string[]) => {\n    const { filter, query, selectedPermission } = this.state;\n    const CREATOR_NAME = translate('permission_templates.project_creators');\n\n    const isFiltered = filter !== 'all';\n\n    const matchQuery = !query || CREATOR_NAME.toLocaleLowerCase().includes(query.toLowerCase());\n\n    const matchPermission =\n      selectedPermission === undefined || creatorPermissions.includes(selectedPermission);\n\n    return !isFiltered && matchQuery && matchPermission;\n  };\n\n  render() {\n    const permissions = convertToPermissionDefinitions(\n      PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE,\n      'projects_role'\n    );\n    const allUsers = [...this.state.users];\n\n    const creatorPermissions = this.props.template.permissions\n      .filter(p => p.withProjectCreator)\n      .map(p => p.key);\n\n    if (this.shouldDisplayCreator(creatorPermissions)) {\n      const creator = {\n        login: '<creator>',\n        name: translate('permission_templates.project_creators'),\n        permissions: creatorPermissions\n      };\n\n      allUsers.unshift(creator);\n    }\n\n    return (\n      <div className=\"page page-limited\">\n        <Helmet defer={false} title={this.props.template.name} />\n\n        <TemplateHeader\n          loading={this.state.loading}\n          refresh={this.props.refresh}\n          template={this.props.template}\n          topQualifiers={this.props.topQualifiers}\n        />\n\n        <TemplateDetails template={this.props.template} />\n\n        <HoldersList\n          groups={this.state.groups}\n          onSelectPermission={this.handleSelectPermission}\n          onToggleGroup={this.handleToggleGroup}\n          onToggleUser={this.handleToggleUser}\n          permissions={permissions}\n          selectedPermission={this.state.selectedPermission}\n          showPublicProjectsWarning={true}\n          users={allUsers}>\n          <SearchForm\n            filter={this.state.filter}\n            onFilter={this.handleFilter}\n            onSearch={this.handleSearch}\n            query={this.state.query}\n          />\n        </HoldersList>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { getPermissionTemplates } from '../../../api/permissions';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport { translate } from '../../../helpers/l10n';\nimport { getAppState, Store } from '../../../store/rootReducer';\nimport '../../permissions/styles.css';\nimport { mergeDefaultsToTemplates, mergePermissionsToTemplates, sortPermissions } from '../utils';\nimport Home from './Home';\nimport Template from './Template';\n\ninterface Props {\n  location: Location;\n  topQualifiers: string[];\n}\n\ninterface State {\n  ready: boolean;\n  permissions: T.Permission[];\n  permissionTemplates: T.PermissionTemplate[];\n}\n\nexport class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    ready: false,\n    permissions: [],\n    permissionTemplates: []\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.requestPermissions();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  requestPermissions = async () => {\n    const { permissions, defaultTemplates, permissionTemplates } = await getPermissionTemplates();\n\n    if (this.mounted) {\n      const sortedPerm = sortPermissions(permissions);\n      const permissionTemplatesMerged = mergeDefaultsToTemplates(\n        mergePermissionsToTemplates(permissionTemplates, sortedPerm),\n        defaultTemplates\n      );\n      this.setState({\n        ready: true,\n        permissionTemplates: permissionTemplatesMerged,\n        permissions: sortedPerm\n      });\n    }\n  };\n\n  renderTemplate(id: string) {\n    if (!this.state.ready) {\n      return null;\n    }\n\n    const template = this.state.permissionTemplates.find(t => t.id === id);\n    if (!template) {\n      return null;\n    }\n\n    return (\n      <Template\n        refresh={this.requestPermissions}\n        template={template}\n        topQualifiers={this.props.topQualifiers}\n      />\n    );\n  }\n\n  renderHome() {\n    return (\n      <Home\n        permissionTemplates={this.state.permissionTemplates}\n        permissions={this.state.permissions}\n        ready={this.state.ready}\n        refresh={this.requestPermissions}\n        topQualifiers={this.props.topQualifiers}\n      />\n    );\n  }\n\n  render() {\n    const { id } = this.props.location.query;\n    return (\n      <div>\n        <Suggestions suggestions=\"permission_templates\" />\n        <Helmet defer={false} title={translate('permission_templates.page')} />\n\n        {id && this.renderTemplate(id)}\n        {!id && this.renderHome()}\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({ topQualifiers: getAppState(state).qualifiers });\n\nexport default connect(mapStateToProps)(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/App')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport ListFooter from '../../../../components/controls/ListFooter';\nimport { getAppState, Store } from '../../../../store/rootReducer';\nimport { ComponentQualifier } from '../../../../types/component';\nimport HoldersList from '../../shared/components/HoldersList';\nimport SearchForm from '../../shared/components/SearchForm';\nimport {\n  convertToPermissionDefinitions,\n  filterPermissions,\n  PERMISSIONS_ORDER_GLOBAL\n} from '../../utils';\n\ninterface StateProps {\n  appState: Pick<T.AppState, 'qualifiers'>;\n}\n\ninterface OwnProps {\n  filter: string;\n  grantPermissionToGroup: (groupName: string, permission: string) => Promise<void>;\n  grantPermissionToUser: (login: string, permission: string) => Promise<void>;\n  groups: T.PermissionGroup[];\n  groupsPaging?: T.Paging;\n  loadHolders: () => void;\n  loading?: boolean;\n  onLoadMore: () => void;\n  onFilter: (filter: string) => void;\n  onSearch: (query: string) => void;\n  query: string;\n  revokePermissionFromGroup: (groupName: string, permission: string) => Promise<void>;\n  revokePermissionFromUser: (login: string, permission: string) => Promise<void>;\n  users: T.PermissionUser[];\n  usersPaging?: T.Paging;\n}\n\ntype Props = StateProps & OwnProps;\n\nexport class AllHoldersList extends React.PureComponent<Props> {\n  handleToggleUser = (user: T.PermissionUser, permission: string) => {\n    const hasPermission = user.permissions.includes(permission);\n    if (hasPermission) {\n      return this.props.revokePermissionFromUser(user.login, permission);\n    } else {\n      return this.props.grantPermissionToUser(user.login, permission);\n    }\n  };\n\n  handleToggleGroup = (group: T.PermissionGroup, permission: string) => {\n    const hasPermission = group.permissions.includes(permission);\n\n    if (hasPermission) {\n      return this.props.revokePermissionFromGroup(group.name, permission);\n    } else {\n      return this.props.grantPermissionToGroup(group.name, permission);\n    }\n  };\n\n  render() {\n    const { appState, filter, groups, groupsPaging, users, usersPaging } = this.props;\n    const l10nPrefix = 'global_permissions';\n\n    const hasPortfoliosEnabled = appState.qualifiers.includes(ComponentQualifier.Portfolio);\n    const hasApplicationsEnabled = appState.qualifiers.includes(ComponentQualifier.Application);\n    const permissions = convertToPermissionDefinitions(\n      filterPermissions(PERMISSIONS_ORDER_GLOBAL, hasApplicationsEnabled, hasPortfoliosEnabled),\n      l10nPrefix\n    );\n\n    let count = 0;\n    let total = 0;\n    if (filter !== 'users') {\n      count += groups.length;\n      total += groupsPaging ? groupsPaging.total : groups.length;\n    }\n    if (filter !== 'groups') {\n      count += users.length;\n      total += usersPaging ? usersPaging.total : users.length;\n    }\n\n    return (\n      <>\n        <HoldersList\n          filter={this.props.filter}\n          groups={this.props.groups}\n          loading={this.props.loading}\n          onToggleGroup={this.handleToggleGroup}\n          onToggleUser={this.handleToggleUser}\n          permissions={permissions}\n          query={this.props.query}\n          users={this.props.users}>\n          <SearchForm\n            filter={this.props.filter}\n            onFilter={this.props.onFilter}\n            onSearch={this.props.onSearch}\n            query={this.props.query}\n          />\n        </HoldersList>\n        <ListFooter count={count} loadMore={this.props.onLoadMore} total={total} />\n      </>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store): StateProps => ({\n  appState: getAppState(state)\n});\n\nexport default connect(mapStateToProps)(AllHoldersList);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\n\ninterface Props {\n  loading?: boolean;\n}\n\nexport default class PageHeader extends React.PureComponent<Props> {\n  render() {\n    return (\n      <header className=\"page-header\">\n        <h1 className=\"page-title\">{translate('global_permissions.page')}</h1>\n\n        {this.props.loading && <i className=\"spinner\" />}\n\n        <div className=\"page-description\">{translate('global_permissions.page.description')}</div>\n      </header>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { without } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport * as api from '../../../../api/permissions';\nimport Suggestions from '../../../../app/components/embed-docs-modal/Suggestions';\nimport { translate } from '../../../../helpers/l10n';\nimport '../../styles.css';\nimport AllHoldersList from './AllHoldersList';\nimport PageHeader from './PageHeader';\n\ninterface State {\n  filter: 'all' | 'groups' | 'users';\n  groups: T.PermissionGroup[];\n  groupsPaging?: T.Paging;\n  loading: boolean;\n  query: string;\n  users: T.PermissionUser[];\n  usersPaging?: T.Paging;\n}\n\nexport default class App extends React.PureComponent<{}, State> {\n  mounted = false;\n\n  constructor(props: {}) {\n    super(props);\n    this.state = {\n      filter: 'all',\n      groups: [],\n      loading: true,\n      query: '',\n      users: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadHolders();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadUsersAndGroups = (userPage?: number, groupsPage?: number) => {\n    const { filter, query } = this.state;\n\n    const getUsers: Promise<{ paging?: T.Paging; users: T.PermissionUser[] }> =\n      filter !== 'groups'\n        ? api.getGlobalPermissionsUsers({\n            q: query || undefined,\n            p: userPage\n          })\n        : Promise.resolve({ paging: undefined, users: [] });\n\n    const getGroups: Promise<{ paging?: T.Paging; groups: T.PermissionGroup[] }> =\n      filter !== 'users'\n        ? api.getGlobalPermissionsGroups({\n            q: query || undefined,\n            p: groupsPage\n          })\n        : Promise.resolve({ paging: undefined, groups: [] });\n\n    return Promise.all([getUsers, getGroups]);\n  };\n\n  loadHolders = () => {\n    this.setState({ loading: true });\n    return this.loadUsersAndGroups().then(([usersResponse, groupsResponse]) => {\n      if (this.mounted) {\n        this.setState({\n          groups: groupsResponse.groups,\n          groupsPaging: groupsResponse.paging,\n          loading: false,\n          users: usersResponse.users,\n          usersPaging: usersResponse.paging\n        });\n      }\n    }, this.stopLoading);\n  };\n\n  onLoadMore = () => {\n    const { usersPaging, groupsPaging } = this.state;\n    this.setState({ loading: true });\n    return this.loadUsersAndGroups(\n      usersPaging ? usersPaging.pageIndex + 1 : 1,\n      groupsPaging ? groupsPaging.pageIndex + 1 : 1\n    ).then(([usersResponse, groupsResponse]) => {\n      if (this.mounted) {\n        this.setState(({ groups, users }) => ({\n          groups: [...groups, ...groupsResponse.groups],\n          groupsPaging: groupsResponse.paging,\n          loading: false,\n          users: [...users, ...usersResponse.users],\n          usersPaging: usersResponse.paging\n        }));\n      }\n    }, this.stopLoading);\n  };\n\n  onFilter = (filter: 'all' | 'groups' | 'users') => {\n    this.setState({ filter }, this.loadHolders);\n  };\n\n  onSearch = (query: string) => {\n    this.setState({ query }, this.loadHolders);\n  };\n\n  addPermissionToGroup = (groups: T.PermissionGroup[], group: string, permission: string) => {\n    return groups.map(candidate =>\n      candidate.name === group\n        ? { ...candidate, permissions: [...candidate.permissions, permission] }\n        : candidate\n    );\n  };\n\n  addPermissionToUser = (users: T.PermissionUser[], user: string, permission: string) => {\n    return users.map(candidate =>\n      candidate.login === user\n        ? { ...candidate, permissions: [...candidate.permissions, permission] }\n        : candidate\n    );\n  };\n\n  removePermissionFromGroup = (groups: T.PermissionGroup[], group: string, permission: string) => {\n    return groups.map(candidate =>\n      candidate.name === group\n        ? { ...candidate, permissions: without(candidate.permissions, permission) }\n        : candidate\n    );\n  };\n\n  removePermissionFromUser = (users: T.PermissionUser[], user: string, permission: string) => {\n    return users.map(candidate =>\n      candidate.login === user\n        ? { ...candidate, permissions: without(candidate.permissions, permission) }\n        : candidate\n    );\n  };\n\n  grantPermissionToGroup = (group: string, permission: string) => {\n    if (this.mounted) {\n      this.setState(({ groups }) => ({\n        groups: this.addPermissionToGroup(groups, group, permission)\n      }));\n      return api\n        .grantPermissionToGroup({\n          groupName: group,\n          permission\n        })\n        .then(\n          () => {},\n          () => {\n            if (this.mounted) {\n              this.setState(({ groups }) => ({\n                groups: this.removePermissionFromGroup(groups, group, permission)\n              }));\n            }\n          }\n        );\n    }\n    return Promise.resolve();\n  };\n\n  grantPermissionToUser = (user: string, permission: string) => {\n    if (this.mounted) {\n      this.setState(({ users }) => ({\n        users: this.addPermissionToUser(users, user, permission)\n      }));\n      return api\n        .grantPermissionToUser({\n          login: user,\n          permission\n        })\n        .then(\n          () => {},\n          () => {\n            if (this.mounted) {\n              this.setState(({ users }) => ({\n                users: this.removePermissionFromUser(users, user, permission)\n              }));\n            }\n          }\n        );\n    }\n    return Promise.resolve();\n  };\n\n  revokePermissionFromGroup = (group: string, permission: string) => {\n    if (this.mounted) {\n      this.setState(({ groups }) => ({\n        groups: this.removePermissionFromGroup(groups, group, permission)\n      }));\n      return api\n        .revokePermissionFromGroup({\n          groupName: group,\n          permission\n        })\n        .then(\n          () => {},\n          () => {\n            if (this.mounted) {\n              this.setState(({ groups }) => ({\n                groups: this.addPermissionToGroup(groups, group, permission)\n              }));\n            }\n          }\n        );\n    }\n    return Promise.resolve();\n  };\n\n  revokePermissionFromUser = (user: string, permission: string) => {\n    if (this.mounted) {\n      this.setState(({ users }) => ({\n        users: this.removePermissionFromUser(users, user, permission)\n      }));\n      return api\n        .revokePermissionFromUser({\n          login: user,\n          permission\n        })\n        .then(\n          () => {},\n          () => {\n            if (this.mounted) {\n              this.setState(({ users }) => ({\n                users: this.addPermissionToUser(users, user, permission)\n              }));\n            }\n          }\n        );\n    }\n    return Promise.resolve();\n  };\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  render() {\n    return (\n      <div className=\"page page-limited\">\n        <Suggestions suggestions=\"global_permissions\" />\n        <Helmet defer={false} title={translate('global_permissions.permission')} />\n        <PageHeader loading={this.state.loading} />\n        <AllHoldersList\n          filter={this.state.filter}\n          grantPermissionToGroup={this.grantPermissionToGroup}\n          grantPermissionToUser={this.grantPermissionToUser}\n          groups={this.state.groups}\n          groupsPaging={this.state.groupsPaging}\n          loadHolders={this.loadHolders}\n          loading={this.state.loading}\n          onFilter={this.onFilter}\n          onLoadMore={this.onLoadMore}\n          onSearch={this.onSearch}\n          query={this.state.query}\n          revokePermissionFromGroup={this.revokePermissionFromGroup}\n          revokePermissionFromUser={this.revokePermissionFromUser}\n          users={this.state.users}\n          usersPaging={this.state.usersPaging}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Radio from '../../components/controls/Radio';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  canTurnToPrivate?: boolean;\n  className?: string;\n  onChange: (visibility: T.Visibility) => void;\n  showDetails?: boolean;\n  visibility?: T.Visibility;\n}\n\nexport default class VisibilitySelector extends React.PureComponent<Props> {\n  render() {\n    return (\n      <div className={classNames(this.props.className)}>\n        {['public', 'private'].map(visibility => (\n          <Radio\n            className={`huge-spacer-right visibility-${visibility}`}\n            key={visibility}\n            value={visibility}\n            checked={this.props.visibility === visibility}\n            onCheck={this.props.onChange}\n            disabled={visibility === 'private' && !this.props.canTurnToPrivate}>\n            <div>\n              {translate('visibility', visibility)}\n              {this.props.showDetails && (\n                <p className=\"note\">{translate('visibility', visibility, 'description.long')}</p>\n              )}\n            </div>\n          </Radio>\n        ))}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { without } from 'lodash';\nimport * as React from 'react';\nimport ListFooter from '../../../../components/controls/ListFooter';\nimport HoldersList from '../../shared/components/HoldersList';\nimport SearchForm from '../../shared/components/SearchForm';\nimport { convertToPermissionDefinitions, PERMISSIONS_ORDER_BY_QUALIFIER } from '../../utils';\n\ninterface Props {\n  component: T.Component;\n  filter: string;\n  grantPermissionToGroup: (group: string, permission: string) => Promise<void>;\n  grantPermissionToUser: (user: string, permission: string) => Promise<void>;\n  groups: T.PermissionGroup[];\n  groupsPaging?: T.Paging;\n  onLoadMore: () => void;\n  onFilterChange: (filter: string) => void;\n  onPermissionSelect: (permissions?: string) => void;\n  onQueryChange: (query: string) => void;\n  query: string;\n  revokePermissionFromGroup: (group: string, permission: string) => Promise<void>;\n  revokePermissionFromUser: (user: string, permission: string) => Promise<void>;\n  selectedPermission?: string;\n  users: T.PermissionUser[];\n  usersPaging?: T.Paging;\n  visibility?: T.Visibility;\n}\n\nexport default class AllHoldersList extends React.PureComponent<Props> {\n  handleToggleUser = (user: T.PermissionUser, permission: string) => {\n    const hasPermission = user.permissions.includes(permission);\n\n    if (hasPermission) {\n      return this.props.revokePermissionFromUser(user.login, permission);\n    } else {\n      return this.props.grantPermissionToUser(user.login, permission);\n    }\n  };\n\n  handleToggleGroup = (group: T.PermissionGroup, permission: string) => {\n    const hasPermission = group.permissions.includes(permission);\n\n    if (hasPermission) {\n      return this.props.revokePermissionFromGroup(group.name, permission);\n    } else {\n      return this.props.grantPermissionToGroup(group.name, permission);\n    }\n  };\n\n  handleSelectPermission = (permission?: string) => {\n    this.props.onPermissionSelect(permission);\n  };\n\n  render() {\n    const { filter, groups, groupsPaging, users, usersPaging } = this.props;\n    let order = PERMISSIONS_ORDER_BY_QUALIFIER[this.props.component.qualifier];\n    if (this.props.visibility === 'public') {\n      order = without(order, 'user', 'codeviewer');\n    }\n    const permissions = convertToPermissionDefinitions(order, 'projects_role');\n\n    let count = 0;\n    let total = 0;\n    if (filter !== 'users') {\n      count += groups.length;\n      total += groupsPaging ? groupsPaging.total : groups.length;\n    }\n    if (filter !== 'groups') {\n      count += users.length;\n      total += usersPaging ? usersPaging.total : users.length;\n    }\n\n    return (\n      <>\n        <HoldersList\n          filter={this.props.filter}\n          groups={this.props.groups}\n          onSelectPermission={this.handleSelectPermission}\n          onToggleGroup={this.handleToggleGroup}\n          onToggleUser={this.handleToggleUser}\n          permissions={permissions}\n          query={this.props.query}\n          selectedPermission={this.props.selectedPermission}\n          users={this.props.users}>\n          <SearchForm\n            filter={this.props.filter}\n            onFilter={this.props.onFilterChange}\n            onSearch={this.props.onQueryChange}\n            query={this.props.query}\n          />\n        </HoldersList>\n        <ListFooter count={count} loadMore={this.props.onLoadMore} total={total} />\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { applyTemplateToProject, getPermissionTemplates } from '../../../../api/permissions';\nimport { ResetButtonLink, SubmitButton } from '../../../../components/controls/buttons';\nimport Select from '../../../../components/controls/Select';\nimport SimpleModal from '../../../../components/controls/SimpleModal';\nimport { Alert } from '../../../../components/ui/Alert';\nimport DeferredSpinner from '../../../../components/ui/DeferredSpinner';\nimport MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../../components/ui/MandatoryFieldsExplanation';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\n\ninterface Props {\n  onApply?: () => void;\n  onClose: () => void;\n  project: { key: string; name: string };\n}\n\ninterface State {\n  done: boolean;\n  loading: boolean;\n  permissionTemplate?: string;\n  permissionTemplates?: T.PermissionTemplate[];\n}\n\nexport default class ApplyTemplate extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { done: false, loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchPermissionTemplates();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchPermissionTemplates = () => {\n    getPermissionTemplates().then(\n      ({ permissionTemplates }) => {\n        if (this.mounted) {\n          this.setState({ loading: false, permissionTemplates });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleSubmit = () => {\n    if (this.state.permissionTemplate) {\n      return applyTemplateToProject({\n        projectKey: this.props.project.key,\n        templateId: this.state.permissionTemplate\n      }).then(() => {\n        if (this.mounted) {\n          if (this.props.onApply) {\n            this.props.onApply();\n          }\n          this.setState({ done: true });\n        }\n      });\n    } else {\n      return Promise.reject(undefined);\n    }\n  };\n\n  handlePermissionTemplateChange = ({ value }: { value: string }) => {\n    this.setState({ permissionTemplate: value });\n  };\n\n  render() {\n    const header = translateWithParameters(\n      'projects_role.apply_template_to_xxx',\n      this.props.project.name\n    );\n\n    return (\n      <SimpleModal\n        header={header}\n        onClose={this.props.onClose}\n        onSubmit={this.handleSubmit}\n        size=\"small\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form id=\"project-permissions-apply-template-form\" onSubmit={onFormSubmit}>\n            <header className=\"modal-head\">\n              <h2>{header}</h2>\n            </header>\n\n            <div className=\"modal-body\">\n              {this.state.done && (\n                <Alert variant=\"success\">{translate('projects_role.apply_template.success')}</Alert>\n              )}\n\n              {this.state.loading && <i className=\"spinner\" />}\n\n              {!this.state.done && !this.state.loading && (\n                <>\n                  <MandatoryFieldsExplanation className=\"modal-field\" />\n                  <div className=\"modal-field\">\n                    <label htmlFor=\"project-permissions-template\">\n                      {translate('template')}\n                      <MandatoryFieldMarker />\n                    </label>\n                    {this.state.permissionTemplates && (\n                      <Select\n                        clearable={false}\n                        id=\"project-permissions-template\"\n                        onChange={this.handlePermissionTemplateChange}\n                        options={this.state.permissionTemplates.map(permissionTemplate => ({\n                          label: permissionTemplate.name,\n                          value: permissionTemplate.id\n                        }))}\n                        value={this.state.permissionTemplate}\n                      />\n                    )}\n                  </div>\n                </>\n              )}\n            </div>\n\n            <footer className=\"modal-foot\">\n              <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n              {!this.state.done && (\n                <SubmitButton disabled={submitting || !this.state.permissionTemplate}>\n                  {translate('apply')}\n                </SubmitButton>\n              )}\n              <ResetButtonLink onClick={onCloseClick}>\n                {translate(this.state.done ? 'close' : 'cancel')}\n              </ResetButtonLink>\n            </footer>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../../components/controls/buttons';\nimport { translate } from '../../../../helpers/l10n';\nimport { isApplication, isPortfolioLike } from '../../../../types/component';\nimport ApplyTemplate from './ApplyTemplate';\n\ninterface Props {\n  component: T.Component;\n  loadHolders: () => void;\n  loading: boolean;\n}\n\ninterface State {\n  applyTemplateModal: boolean;\n}\n\nexport default class PageHeader extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { applyTemplateModal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleApplyTemplate = () => {\n    this.setState({ applyTemplateModal: true });\n  };\n\n  handleApplyTemplateClose = () => {\n    if (this.mounted) {\n      this.setState({ applyTemplateModal: false });\n    }\n  };\n\n  render() {\n    const { component } = this.props;\n    const { configuration } = component;\n    const canApplyPermissionTemplate =\n      configuration != null && configuration.canApplyPermissionTemplate;\n\n    let description = translate('roles.page.description2');\n    if (isPortfolioLike(component.qualifier)) {\n      description = translate('roles.page.description_portfolio');\n    } else if (isApplication(component.qualifier)) {\n      description = translate('roles.page.description_application');\n    }\n\n    const visibilityDescription =\n      component.qualifier === 'TRK' && component.visibility\n        ? translate('visibility', component.visibility, 'description', component.qualifier)\n        : undefined;\n\n    return (\n      <header className=\"page-header\">\n        <h1 className=\"page-title\">{translate('permissions.page')}</h1>\n\n        {this.props.loading && <i className=\"spinner\" />}\n\n        {canApplyPermissionTemplate && (\n          <div className=\"page-actions\">\n            <Button className=\"js-apply-template\" onClick={this.handleApplyTemplate}>\n              {translate('projects_role.apply_template')}\n            </Button>\n\n            {this.state.applyTemplateModal && (\n              <ApplyTemplate\n                onApply={this.props.loadHolders}\n                onClose={this.handleApplyTemplateClose}\n                project={component}\n              />\n            )}\n          </div>\n        )}\n\n        <div className=\"page-description\">\n          <p>{description}</p>\n          {visibilityDescription && <p>{visibilityDescription}</p>}\n        </div>\n      </header>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ConfirmModal from '../../../../components/controls/ConfirmModal';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\n\ninterface Props {\n  component: {\n    name: string;\n    qualifier: string;\n  };\n  onClose: () => void;\n  onConfirm: () => void;\n}\n\nexport default function PublicProjectDisclaimer({ component, onClose, onConfirm }: Props) {\n  const { qualifier } = component;\n  return (\n    <ConfirmModal\n      confirmButtonText={translate('projects_role.turn_project_to_public', qualifier)}\n      header={translateWithParameters('projects_role.turn_x_to_public', component.name)}\n      onClose={onClose}\n      onConfirm={onConfirm}>\n      <Alert variant=\"warning\">\n        {translate('projects_role.are_you_sure_to_turn_project_to_public.warning', qualifier)}\n      </Alert>\n      <p>{translate('projects_role.are_you_sure_to_turn_project_to_public', qualifier)}</p>\n    </ConfirmModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { without } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport * as api from '../../../../api/permissions';\nimport VisibilitySelector from '../../../../components/common/VisibilitySelector';\nimport { translate } from '../../../../helpers/l10n';\nimport '../../styles.css';\nimport AllHoldersList from './AllHoldersList';\nimport PageHeader from './PageHeader';\nimport PublicProjectDisclaimer from './PublicProjectDisclaimer';\n\ninterface Props {\n  component: T.Component;\n  onComponentChange: (changes: Partial<T.Component>) => void;\n}\n\ninterface State {\n  disclaimer: boolean;\n  filter: string;\n  groups: T.PermissionGroup[];\n  groupsPaging?: T.Paging;\n  loading: boolean;\n  query: string;\n  selectedPermission?: string;\n  users: T.PermissionUser[];\n  usersPaging?: T.Paging;\n}\n\nexport default class App extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      disclaimer: false,\n      filter: 'all',\n      groups: [],\n      loading: true,\n      query: '',\n      users: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadHolders();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  loadUsersAndGroups = (userPage?: number, groupsPage?: number) => {\n    const { component } = this.props;\n    const { filter, query, selectedPermission } = this.state;\n\n    const getUsers: Promise<{ paging?: T.Paging; users: T.PermissionUser[] }> =\n      filter !== 'groups'\n        ? api.getPermissionsUsersForComponent({\n            projectKey: component.key,\n            q: query || undefined,\n            permission: selectedPermission,\n            p: userPage\n          })\n        : Promise.resolve({ paging: undefined, users: [] });\n\n    const getGroups: Promise<{ paging?: T.Paging; groups: T.PermissionGroup[] }> =\n      filter !== 'users'\n        ? api.getPermissionsGroupsForComponent({\n            projectKey: component.key,\n            q: query || undefined,\n            permission: selectedPermission,\n            p: groupsPage\n          })\n        : Promise.resolve({ paging: undefined, groups: [] });\n\n    return Promise.all([getUsers, getGroups]);\n  };\n\n  loadHolders = () => {\n    this.setState({ loading: true });\n    return this.loadUsersAndGroups().then(([usersResponse, groupsResponse]) => {\n      if (this.mounted) {\n        this.setState({\n          groups: groupsResponse.groups,\n          groupsPaging: groupsResponse.paging,\n          loading: false,\n          users: usersResponse.users,\n          usersPaging: usersResponse.paging\n        });\n      }\n    }, this.stopLoading);\n  };\n\n  onLoadMore = () => {\n    const { usersPaging, groupsPaging } = this.state;\n    this.setState({ loading: true });\n    return this.loadUsersAndGroups(\n      usersPaging ? usersPaging.pageIndex + 1 : 1,\n      groupsPaging ? groupsPaging.pageIndex + 1 : 1\n    ).then(([usersResponse, groupsResponse]) => {\n      if (this.mounted) {\n        this.setState(({ groups, users }) => ({\n          groups: [...groups, ...groupsResponse.groups],\n          groupsPaging: groupsResponse.paging,\n          loading: false,\n          users: [...users, ...usersResponse.users],\n          usersPaging: usersResponse.paging\n        }));\n      }\n    }, this.stopLoading);\n  };\n\n  handleFilterChange = (filter: string) => {\n    if (this.mounted) {\n      this.setState({ filter }, this.loadHolders);\n    }\n  };\n\n  handleQueryChange = (query: string) => {\n    if (this.mounted) {\n      this.setState({ query }, this.loadHolders);\n    }\n  };\n\n  handlePermissionSelect = (selectedPermission?: string) => {\n    if (this.mounted) {\n      this.setState(\n        (state: State) => ({\n          selectedPermission:\n            state.selectedPermission === selectedPermission ? undefined : selectedPermission\n        }),\n        this.loadHolders\n      );\n    }\n  };\n\n  addPermissionToGroup = (group: string, permission: string) => {\n    return this.state.groups.map(candidate =>\n      candidate.name === group\n        ? { ...candidate, permissions: [...candidate.permissions, permission] }\n        : candidate\n    );\n  };\n\n  addPermissionToUser = (user: string, permission: string) => {\n    return this.state.users.map(candidate =>\n      candidate.login === user\n        ? { ...candidate, permissions: [...candidate.permissions, permission] }\n        : candidate\n    );\n  };\n\n  removePermissionFromGroup = (group: string, permission: string) => {\n    return this.state.groups.map(candidate =>\n      candidate.name === group\n        ? { ...candidate, permissions: without(candidate.permissions, permission) }\n        : candidate\n    );\n  };\n\n  removePermissionFromUser = (user: string, permission: string) => {\n    return this.state.users.map(candidate =>\n      candidate.login === user\n        ? { ...candidate, permissions: without(candidate.permissions, permission) }\n        : candidate\n    );\n  };\n\n  grantPermissionToGroup = (group: string, permission: string) => {\n    if (this.mounted) {\n      this.setState({\n        loading: true,\n        groups: this.addPermissionToGroup(group, permission)\n      });\n      return api\n        .grantPermissionToGroup({\n          projectKey: this.props.component.key,\n          groupName: group,\n          permission\n        })\n        .then(this.stopLoading, () => {\n          if (this.mounted) {\n            this.setState({\n              loading: false,\n              groups: this.removePermissionFromGroup(group, permission)\n            });\n          }\n        });\n    }\n    return Promise.resolve();\n  };\n\n  grantPermissionToUser = (user: string, permission: string) => {\n    if (this.mounted) {\n      this.setState({\n        loading: true,\n        users: this.addPermissionToUser(user, permission)\n      });\n      return api\n        .grantPermissionToUser({\n          projectKey: this.props.component.key,\n          login: user,\n          permission\n        })\n        .then(this.stopLoading, () => {\n          if (this.mounted) {\n            this.setState({\n              loading: false,\n              users: this.removePermissionFromUser(user, permission)\n            });\n          }\n        });\n    }\n    return Promise.resolve();\n  };\n\n  revokePermissionFromGroup = (group: string, permission: string) => {\n    if (this.mounted) {\n      this.setState({\n        loading: true,\n        groups: this.removePermissionFromGroup(group, permission)\n      });\n      return api\n        .revokePermissionFromGroup({\n          projectKey: this.props.component.key,\n          groupName: group,\n          permission\n        })\n        .then(this.stopLoading, () => {\n          if (this.mounted) {\n            this.setState({\n              loading: false,\n              groups: this.addPermissionToGroup(group, permission)\n            });\n          }\n        });\n    }\n    return Promise.resolve();\n  };\n\n  revokePermissionFromUser = (user: string, permission: string) => {\n    if (this.mounted) {\n      this.setState({\n        loading: true,\n        users: this.removePermissionFromUser(user, permission)\n      });\n      return api\n        .revokePermissionFromUser({\n          projectKey: this.props.component.key,\n          login: user,\n          permission\n        })\n        .then(this.stopLoading, () => {\n          if (this.mounted) {\n            this.setState({\n              loading: false,\n              users: this.addPermissionToUser(user, permission)\n            });\n          }\n        });\n    }\n    return Promise.resolve();\n  };\n\n  handleVisibilityChange = (visibility: string) => {\n    if (visibility === 'public') {\n      this.openDisclaimer();\n    } else {\n      this.turnProjectToPrivate();\n    }\n  };\n\n  turnProjectToPublic = () => {\n    this.props.onComponentChange({ visibility: 'public' });\n    api.changeProjectVisibility(this.props.component.key, 'public').then(\n      () => {\n        this.loadHolders();\n      },\n      () => {\n        this.props.onComponentChange({\n          visibility: 'private'\n        });\n      }\n    );\n  };\n\n  turnProjectToPrivate = () => {\n    this.props.onComponentChange({ visibility: 'private' });\n    api.changeProjectVisibility(this.props.component.key, 'private').then(\n      () => {\n        this.loadHolders();\n      },\n      () => {\n        this.props.onComponentChange({\n          visibility: 'public'\n        });\n      }\n    );\n  };\n\n  openDisclaimer = () => {\n    if (this.mounted) {\n      this.setState({ disclaimer: true });\n    }\n  };\n\n  closeDisclaimer = () => {\n    if (this.mounted) {\n      this.setState({ disclaimer: false });\n    }\n  };\n\n  render() {\n    const { component } = this.props;\n    const canTurnToPrivate =\n      component.configuration && component.configuration.canUpdateProjectVisibilityToPrivate;\n\n    return (\n      <div className=\"page page-limited\" id=\"project-permissions-page\">\n        <Helmet defer={false} title={translate('permissions.page')} />\n\n        <PageHeader\n          component={component}\n          loadHolders={this.loadHolders}\n          loading={this.state.loading}\n        />\n        <div>\n          <VisibilitySelector\n            canTurnToPrivate={canTurnToPrivate}\n            className=\"big-spacer-top big-spacer-bottom\"\n            onChange={this.handleVisibilityChange}\n            visibility={component.visibility}\n          />\n          {this.state.disclaimer && (\n            <PublicProjectDisclaimer\n              component={component}\n              onClose={this.closeDisclaimer}\n              onConfirm={this.turnProjectToPublic}\n            />\n          )}\n        </div>\n        <AllHoldersList\n          component={component}\n          filter={this.state.filter}\n          grantPermissionToGroup={this.grantPermissionToGroup}\n          grantPermissionToUser={this.grantPermissionToUser}\n          groups={this.state.groups}\n          groupsPaging={this.state.groupsPaging}\n          onFilterChange={this.handleFilterChange}\n          onLoadMore={this.onLoadMore}\n          onPermissionSelect={this.handlePermissionSelect}\n          onQueryChange={this.handleQueryChange}\n          query={this.state.query}\n          revokePermissionFromGroup={this.revokePermissionFromGroup}\n          revokePermissionFromUser={this.revokePermissionFromUser}\n          selectedPermission={this.state.selectedPermission}\n          users={this.state.users}\n          usersPaging={this.state.usersPaging}\n          visibility={component.visibility}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { getCurrentUser, Store } from '../../../../store/rootReducer';\nimport App from './App';\n\nconst mapStateToProps = (state: Store) => ({\n  currentUser: getCurrentUser(state)\n});\n\nexport default connect(mapStateToProps)(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nexport const globalPermissionsRoutes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./global/components/App')) }\n  }\n];\n\nexport const projectPermissionsRoutes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./project/components/AppContainer')) }\n  }\n];\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function MeasuresIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps} style={{ fillRule: 'nonzero' }}>\n      <path d=\"M3.33 6.13h2v6.54h-2zm3.74-2.8h1.86v9.34H7.07zm3.73 5.34h1.87v4H10.8z\" fill={fill} />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport MeasuresIcon from '../../components/icons/MeasuresIcon';\nimport { translate } from '../../helpers/l10n';\nimport { getComponentDrilldownUrl } from '../../helpers/urls';\nimport { BranchLike } from '../../types/branch-like';\nimport './MeasuresLink.css';\n\nexport interface MeasuresLinkProps {\n  branchLike?: BranchLike;\n  className?: string;\n  component: string;\n  label?: string;\n  metric: string;\n}\n\nexport default function MeasuresLink(props: MeasuresLinkProps) {\n  const { branchLike, className, component, label, metric } = props;\n  return (\n    <Link\n      className={classNames('measures-link', className)}\n      to={getComponentDrilldownUrl({ branchLike, componentKey: component, metric })}>\n      <MeasuresIcon className=\"little-spacer-right\" size={14} />\n      <span>{label || translate('portfolio.measures_link')}</span>\n    </Link>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const PORTFOLIO_METRICS = [\n  'projects',\n  'ncloc',\n  'lines',\n  'ncloc_language_distribution',\n\n  'releasability_rating',\n  'releasability_effort',\n\n  'sqale_rating',\n  'maintainability_rating_effort',\n\n  'reliability_rating',\n  'reliability_rating_effort',\n\n  'security_rating',\n  'security_rating_effort',\n\n  'security_review_rating',\n  'security_review_rating_effort',\n\n  'last_change_on_releasability_rating',\n  'last_change_on_maintainability_rating',\n  'last_change_on_security_rating',\n  'last_change_on_security_review_rating',\n  'last_change_on_reliability_rating'\n];\n\nexport interface MetricKeys {\n  activity?: string;\n  effort: string;\n  measuresMetric: string;\n  label: string;\n  last_change: string;\n  rating: string;\n}\n\nexport const METRICS_PER_TYPE: T.Dict<MetricKeys> = {\n  releasability: {\n    measuresMetric: 'Releasability',\n    label: 'metric_domain.Releasability',\n    rating: 'releasability_rating',\n    effort: 'releasability_effort',\n    last_change: 'last_change_on_releasability_rating'\n  },\n  reliability: {\n    measuresMetric: 'Reliability',\n    label: 'metric_domain.Reliability',\n    rating: 'reliability_rating',\n    effort: 'reliability_rating_effort',\n    last_change: 'last_change_on_reliability_rating',\n    activity: 'reliability_rating,bugs'\n  },\n  vulnerabilities: {\n    measuresMetric: 'Security',\n    label: 'portfolio.metric_domain.vulnerabilities',\n    rating: 'security_rating',\n    effort: 'security_rating_effort',\n    last_change: 'last_change_on_security_rating',\n    activity: 'security_rating,vulnerabilities'\n  },\n  security_hotspots: {\n    measuresMetric: 'security_review_rating',\n    label: 'portfolio.metric_domain.security_hotspots',\n    rating: 'security_review_rating',\n    effort: 'security_review_rating_effort',\n    last_change: 'last_change_on_security_review_rating',\n    activity: 'security_review_rating,security_hotspots'\n  },\n  maintainability: {\n    measuresMetric: 'Maintainability',\n    label: 'metric_domain.Maintainability',\n    rating: 'sqale_rating',\n    effort: 'maintainability_rating_effort',\n    last_change: 'last_change_on_maintainability_rating',\n    activity: 'sqale_rating,code_smells'\n  }\n};\n\nexport const SUB_COMPONENTS_METRICS = [\n  'ncloc',\n  'releasability_rating',\n  'security_rating',\n  'security_review_rating',\n  'reliability_rating',\n  'sqale_rating',\n  'alert_status'\n];\n\nexport function convertMeasures(measures: Array<{ metric: string; value?: string }>) {\n  const result: T.Dict<string | undefined> = {};\n  measures.forEach(measure => {\n    result[measure.metric] = measure.value;\n  });\n  return result;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport Measure from '../../../components/measure/Measure';\nimport Rating from '../../../components/ui/Rating';\nimport { translate } from '../../../helpers/l10n';\nimport { getComponentDrilldownUrl } from '../../../helpers/urls';\n\ninterface Props {\n  component: string;\n  effort: { projects: number; rating: number };\n  metricKey: string;\n}\n\nexport default function Effort({ component, effort, metricKey }: Props) {\n  return (\n    <div className=\"portfolio-effort\">\n      <FormattedMessage\n        defaultMessage={translate('portfolio.x_in_y')}\n        id=\"portfolio.x_in_y\"\n        values={{\n          project_branches: (\n            <Link\n              to={getComponentDrilldownUrl({\n                componentKey: component,\n                metric: metricKey,\n                listView: true\n              })}>\n              <span>\n                <Measure\n                  className=\"little-spacer-right\"\n                  metricKey=\"projects\"\n                  metricType=\"SHORT_INT\"\n                  value={String(effort.projects)}\n                />\n                {effort.projects === 1\n                  ? translate('portfolio.project_branch')\n                  : translate('portfolio.project_branches')}\n              </span>\n            </Link>\n          ),\n          rating: <Rating small={true} value={effort.rating} />\n        }}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport Rating from '../../../components/ui/Rating';\nimport { getMeasureTreemapUrl } from '../../../helpers/urls';\n\ninterface Props {\n  component: string;\n  metric: string;\n  value: string;\n}\n\nexport default function MainRating({ component, metric, value }: Props) {\n  return (\n    <Link className=\"portfolio-box-rating\" to={getMeasureTreemapUrl(component, metric)}>\n      <Rating value={value} />\n    </Link>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport Rating from '../../../components/ui/Rating';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  lastChange?: string;\n  rating?: string;\n}\n\nexport default function RatingFreshness({ lastChange, rating }: Props) {\n  if (!lastChange) {\n    return (\n      <div className=\"portfolio-freshness\">\n        {rating && (\n          <FormattedMessage\n            defaultMessage={translate('portfolio.has_always_been_x')}\n            id=\"portfolio.has_always_been_x\"\n            values={{ rating: <Rating small={true} value={rating} /> }}\n          />\n        )}\n      </div>\n    );\n  }\n\n  const data = JSON.parse(lastChange);\n\n  return (\n    <div className=\"portfolio-freshness\">\n      <FormattedMessage\n        defaultMessage={translate('portfolio.was_x_y')}\n        id=\"portfolio.was_x_y\"\n        values={{\n          rating: <Rating small={true} value={data.value} />,\n          date: <DateFromNow date={data.date} />\n        }}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport ActivityLink from '../../../components/common/ActivityLink';\nimport MeasuresLink from '../../../components/common/MeasuresLink';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport Measure from '../../../components/measure/Measure';\nimport Level from '../../../components/ui/Level';\nimport { translate } from '../../../helpers/l10n';\nimport { getComponentDrilldownUrl } from '../../../helpers/urls';\nimport { GraphType } from '../../../types/project-activity';\nimport { METRICS_PER_TYPE } from '../utils';\nimport Effort from './Effort';\nimport MainRating from './MainRating';\nimport RatingFreshness from './RatingFreshness';\n\nexport interface MetricBoxProps {\n  component: string;\n  measures: T.Dict<string | undefined>;\n  metricKey: string;\n}\n\nexport default function MetricBox({ component, measures, metricKey }: MetricBoxProps) {\n  const keys = METRICS_PER_TYPE[metricKey];\n  const rating = measures[keys.rating];\n  const lastReliabilityChange = measures[keys.last_change];\n  const rawEffort = measures[keys.effort];\n  const effort = rawEffort ? JSON.parse(rawEffort) : undefined;\n\n  return (\n    <div className=\"portfolio-box\">\n      <h2 className=\"portfolio-box-title\">\n        {translate(keys.label)}\n        <HelpTooltip\n          className=\"little-spacer-left\"\n          overlay={translate('portfolio.metric_domain', metricKey, 'help')}\n        />\n      </h2>\n\n      {rating ? (\n        <MainRating component={component} metric={keys.rating} value={rating} />\n      ) : (\n        <div className=\"portfolio-box-rating\">\n          <span className=\"rating no-rating\">\u2014</span>\n        </div>\n      )}\n\n      {rating && (\n        <>\n          <h3>{translate('portfolio.metric_trend')}</h3>\n          <RatingFreshness lastChange={lastReliabilityChange} rating={rating} />\n        </>\n      )}\n\n      {metricKey === 'releasability'\n        ? Number(effort) > 0 && (\n            <>\n              <h3>{translate('portfolio.lowest_rated_project_branches')}</h3>\n              <div className=\"portfolio-effort\">\n                <Link\n                  to={getComponentDrilldownUrl({\n                    componentKey: component,\n                    metric: 'alert_status'\n                  })}>\n                  <span>\n                    <Measure\n                      className=\"little-spacer-right\"\n                      metricKey=\"projects\"\n                      metricType=\"SHORT_INT\"\n                      value={effort}\n                    />\n                    {Number(effort) === 1\n                      ? translate('portfolio.project_branch')\n                      : translate('portfolio.project_branches')}\n                  </span>\n                </Link>\n                <Level\n                  aria-label={\n                    Number(effort) === 1\n                      ? translate('portfolio.has_qg_status')\n                      : translate('portfolio.have_qg_status')\n                  }\n                  className=\"little-spacer-left\"\n                  level=\"ERROR\"\n                  small={true}\n                />\n              </div>\n            </>\n          )\n        : effort && (\n            <>\n              <h3>{translate('portfolio.lowest_rated_project_branches')}</h3>\n              <Effort component={component} effort={effort} metricKey={keys.rating} />\n            </>\n          )}\n\n      <div className=\"portfolio-box-links\">\n        <div>\n          <MeasuresLink component={component} metric={keys.measuresMetric} />\n        </div>\n        <div>\n          <ActivityLink\n            component={component}\n            metric={keys.activity || keys.rating}\n            graph={GraphType.custom}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { unsubscribeFromEmailReport } from '../../../api/component-report';\nimport { Button, ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  component: T.Component;\n  onClose: () => void;\n}\n\ninterface State {\n  success?: boolean;\n}\n\nexport default class UnsubscribeEmailModal extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleFormSubmit = async () => {\n    const { component } = this.props;\n\n    await unsubscribeFromEmailReport(component.key);\n\n    if (this.mounted) {\n      this.setState({ success: true });\n    }\n  };\n\n  render() {\n    const { success } = this.state;\n    const header = translate('component_report.unsubscribe');\n\n    return (\n      <SimpleModal\n        header={header}\n        onClose={this.props.onClose}\n        onSubmit={this.handleFormSubmit}\n        size=\"small\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form onSubmit={onFormSubmit}>\n            <div className=\"modal-head\">\n              <h2>{header}</h2>\n            </div>\n\n            <div className=\"modal-body\">\n              {success ? (\n                <Alert variant=\"success\">{translate('component_report.unsubscribe_success')}</Alert>\n              ) : (\n                <p>{translate('component_report.unsubscribe.description')}</p>\n              )}\n            </div>\n\n            <div className=\"modal-foot\">\n              <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n              {success ? (\n                <Button onClick={onCloseClick}>{translate('close')}</Button>\n              ) : (\n                <>\n                  <SubmitButton disabled={submitting}>\n                    {translate('component_report.unsubscribe')}\n                  </SubmitButton>\n                  <ResetButtonLink onClick={onCloseClick}>{translate('cancel')}</ResetButtonLink>\n                </>\n              )}\n            </div>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { max, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { colors } from '../../../app/theme';\nimport BranchIcon from '../../../components/icons/BranchIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport Measure from '../../../components/measure/Measure';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { getComponentOverviewUrl } from '../../../helpers/urls';\nimport { ComponentQualifier } from '../../../types/component';\nimport { SubComponent } from '../types';\n\ninterface Props {\n  component: string;\n  subComponents: SubComponent[];\n  total: number;\n}\n\nexport default function WorstProjects({ component, subComponents, total }: Props) {\n  const count = subComponents.length;\n\n  if (!count) {\n    return null;\n  }\n\n  const maxLoc = max(\n    subComponents.map(component => Number(component.measures['ncloc'] || 0))\n  ) as number;\n\n  const projectsPageUrl = { pathname: '/code', query: { id: component } };\n\n  const subCompList = sortBy(\n    subComponents,\n    c => c.qualifier,\n    c => c.name.toLowerCase(),\n    c => c.branch?.toLowerCase()\n  );\n\n  return (\n    <div className=\"panel panel-white portfolio-sub-components\" id=\"portfolio-sub-components\">\n      <table className=\"data zebra\">\n        <thead>\n          <tr>\n            <th>&nbsp;</th>\n            <th className=\"text-center portfolio-sub-components-cell\">\n              {translate('metric_domain.Releasability')}\n            </th>\n            <th className=\"text-center portfolio-sub-components-cell\">\n              {translate('metric_domain.Reliability')}\n            </th>\n            <th className=\"text-center portfolio-sub-components-cell\">\n              {translate('portfolio.metric_domain.vulnerabilities')}\n            </th>\n            <th className=\"text-center portfolio-sub-components-cell\">\n              {translate('portfolio.metric_domain.security_hotspots')}\n            </th>\n            <th className=\"text-center portfolio-sub-components-cell\">\n              {translate('metric_domain.Maintainability')}\n            </th>\n            <th className=\"text-center portfolio-sub-components-cell\">\n              {translate('metric.ncloc.name')}\n            </th>\n          </tr>\n        </thead>\n        <tbody>\n          {subCompList.map(comp => (\n            <tr key={[comp.key, comp.branch].filter(s => !!s).join('/')}>\n              <td>\n                <span className=\"display-flex-center\">\n                  <QualifierIcon className=\"spacer-right\" qualifier={comp.qualifier} />\n                  <Link\n                    to={getComponentOverviewUrl(comp.refKey || comp.key, comp.qualifier, {\n                      branch: comp.branch\n                    })}>\n                    {comp.name}\n                  </Link>\n\n                  {[ComponentQualifier.Application, ComponentQualifier.Project].includes(\n                    comp.qualifier as ComponentQualifier\n                  ) &&\n                    (comp.branch ? (\n                      <span className=\"spacer-left\">\n                        <BranchIcon className=\"little-spacer-right\" />\n                        <span className=\"note\">{comp.branch}</span>\n                      </span>\n                    ) : (\n                      <span className=\"spacer-left badge\">{translate('branches.main_branch')}</span>\n                    ))}\n                </span>\n              </td>\n              {comp.qualifier === ComponentQualifier.Project\n                ? renderCell(comp.measures, 'alert_status', 'LEVEL')\n                : renderCell(comp.measures, 'releasability_rating', 'RATING')}\n              {renderCell(comp.measures, 'reliability_rating', 'RATING')}\n              {renderCell(comp.measures, 'security_rating', 'RATING')}\n              {renderCell(comp.measures, 'security_review_rating', 'RATING')}\n              {renderCell(comp.measures, 'sqale_rating', 'RATING')}\n              {renderNcloc(comp.measures, maxLoc)}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n\n      {total > count && (\n        <footer className=\"spacer-top note text-center\">\n          {translateWithParameters(\n            'x_of_y_shown',\n            formatMeasure(count, 'INT'),\n            formatMeasure(total, 'INT')\n          )}\n          <Link className=\"spacer-left\" to={projectsPageUrl}>\n            {translate('show_more')}\n          </Link>\n        </footer>\n      )}\n    </div>\n  );\n}\n\nfunction renderCell(measures: T.Dict<string | undefined>, metric: string, type: string) {\n  return (\n    <td className=\"text-center\">\n      <Measure metricKey={metric} metricType={type} value={measures[metric]} />\n    </td>\n  );\n}\n\nfunction renderNcloc(measures: T.Dict<string | undefined>, maxLoc: number) {\n  const ncloc = Number(measures['ncloc'] || 0);\n  const barWidth = maxLoc > 0 ? Math.max(1, Math.round((ncloc / maxLoc) * 50)) : 0;\n  return (\n    <td className=\"text-right\">\n      <span className=\"note\">\n        <Measure metricKey=\"ncloc\" metricType=\"SHORT_INT\" value={measures['ncloc']} />\n      </span>\n      {maxLoc > 0 && (\n        <svg className=\"spacer-left\" height=\"16\" width=\"50\">\n          <rect\n            className=\"bar-chart-bar\"\n            fill={colors.blue}\n            height=\"10\"\n            width={barWidth}\n            x=\"0\"\n            y=\"3\"\n          />\n        </svg>\n      )}\n    </td>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { InjectedRouter } from 'react-router';\nimport { getChildren } from '../../../api/components';\nimport { getMeasures } from '../../../api/measures';\nimport MeasuresLink from '../../../components/common/MeasuresLink';\nimport ComponentReportActions from '../../../components/controls/ComponentReportActions';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport Measure from '../../../components/measure/Measure';\nimport handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication';\nimport { translate } from '../../../helpers/l10n';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { fetchMetrics } from '../../../store/rootActions';\nimport { getMetrics, Store } from '../../../store/rootReducer';\nimport '../styles.css';\nimport { SubComponent } from '../types';\nimport { convertMeasures, PORTFOLIO_METRICS, SUB_COMPONENTS_METRICS } from '../utils';\nimport MetricBox from './MetricBox';\nimport UnsubscribeEmailModal from './UnsubscribeEmailModal';\nimport WorstProjects from './WorstProjects';\n\ninterface OwnProps {\n  component: T.Component;\n  currentUser: T.CurrentUser;\n  location: Location;\n  router: InjectedRouter;\n}\n\ninterface StateToProps {\n  metrics: T.Dict<T.Metric>;\n}\n\ninterface DispatchToProps {\n  fetchMetrics: () => void;\n}\n\ntype Props = StateToProps & DispatchToProps & OwnProps;\n\ninterface State {\n  loading: boolean;\n  measures?: T.Dict<string | undefined>;\n  subComponents?: SubComponent[];\n  totalSubComponents?: number;\n  showUnsubscribeModal: boolean;\n}\n\nexport class App extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      loading: true,\n      showUnsubscribeModal:\n        Boolean(props.location.query.unsubscribe) && isLoggedIn(props.currentUser)\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n\n    if (Boolean(this.props.location.query.unsubscribe) && !isLoggedIn(this.props.currentUser)) {\n      handleRequiredAuthentication();\n    }\n\n    this.props.fetchMetrics();\n    this.fetchData();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.component !== this.props.component) {\n      this.fetchData();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchData() {\n    this.setState({ loading: true });\n    Promise.all([\n      getMeasures({ component: this.props.component.key, metricKeys: PORTFOLIO_METRICS.join() }),\n      getChildren(this.props.component.key, SUB_COMPONENTS_METRICS, { ps: 20, s: 'qualifier' })\n    ]).then(\n      ([measures, subComponents]) => {\n        if (this.mounted) {\n          this.setState({\n            loading: false,\n            measures: convertMeasures(measures),\n            subComponents: subComponents.components.map((component: any) => ({\n              ...component,\n              measures: convertMeasures(component.measures)\n            })),\n            totalSubComponents: subComponents.paging.total\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  }\n\n  isEmpty = () => this.state.measures === undefined || this.state.measures['lines'] === undefined;\n\n  isNotComputed = () =>\n    this.state.measures && this.state.measures['reliability_rating'] === undefined;\n\n  handleCloseUnsubscribeEmailModal = () => {\n    const { location, router } = this.props;\n    this.setState({ showUnsubscribeModal: false });\n    router.replace({ ...location, query: { ...location.query, unsubscribe: undefined } });\n  };\n\n  renderSpinner() {\n    return (\n      <div className=\"page page-limited\">\n        <div className=\"text-center\">\n          <i className=\"spinner spacer\" />\n        </div>\n      </div>\n    );\n  }\n\n  renderEmpty() {\n    return (\n      <div className=\"page page-limited\">\n        <div className=\"empty-search\">\n          <h3>\n            {!this.state.measures || !this.state.measures['projects']\n              ? translate('portfolio.empty')\n              : translate('portfolio.no_lines_of_code')}\n          </h3>\n        </div>\n      </div>\n    );\n  }\n\n  renderWhenNotComputed() {\n    return (\n      <div className=\"page page-limited\">\n        <div className=\"empty-search\">\n          <h3>{translate('portfolio.not_computed')}</h3>\n        </div>\n      </div>\n    );\n  }\n\n  render() {\n    const { component } = this.props;\n    const {\n      loading,\n      measures,\n      subComponents,\n      totalSubComponents,\n      showUnsubscribeModal\n    } = this.state;\n\n    if (loading) {\n      return this.renderSpinner();\n    }\n\n    if (this.isEmpty()) {\n      return this.renderEmpty();\n    }\n\n    if (this.isNotComputed()) {\n      return this.renderWhenNotComputed();\n    }\n\n    return (\n      <div className=\"page page-limited portfolio-overview\">\n        <div className=\"page-actions\">\n          <ComponentReportActions component={component} />\n        </div>\n\n        {component.description && (\n          <div className=\"portfolio-description display-inline-block big-spacer-bottom\">\n            {component.description}\n          </div>\n        )}\n        <h1>{translate('portfolio.health_factors')}</h1>\n        <div className=\"portfolio-boxes\">\n          <MetricBox component={component.key} measures={measures!} metricKey=\"releasability\" />\n          <MetricBox component={component.key} measures={measures!} metricKey=\"reliability\" />\n          <MetricBox component={component.key} measures={measures!} metricKey=\"vulnerabilities\" />\n          <MetricBox component={component.key} measures={measures!} metricKey=\"security_hotspots\" />\n          <MetricBox component={component.key} measures={measures!} metricKey=\"maintainability\" />\n        </div>\n\n        <h1>{translate('portfolio.breakdown')}</h1>\n        <div className=\"portfolio-breakdown\">\n          <div className=\"portfolio-breakdown-box\">\n            <h2 className=\"text-muted small\">{translate('portfolio.number_of_projects')}</h2>\n            <div className=\"portfolio-breakdown-metric huge\">\n              <Measure\n                metricKey=\"projects\"\n                metricType=\"SHORT_INT\"\n                value={(measures && measures.projects) || '0'}\n              />\n            </div>\n            <div className=\"portfolio-breakdown-box-link\">\n              <div>\n                <MeasuresLink component={component.key} metric=\"projects\" />\n              </div>\n            </div>\n          </div>\n          <div className=\"portfolio-breakdown-box\">\n            <h2 className=\"text-muted small\">{translate('portfolio.number_of_lines')}</h2>\n            <div className=\"portfolio-breakdown-metric huge\">\n              <Measure\n                metricKey=\"ncloc\"\n                metricType=\"SHORT_INT\"\n                value={(measures && measures.ncloc) || '0'}\n              />\n            </div>\n            <div className=\"portfolio-breakdown-box-link\">\n              <div>\n                <MeasuresLink\n                  component={component.key}\n                  label={translate('portfolio.language_breakdown_link')}\n                  metric=\"ncloc\"\n                />\n              </div>\n            </div>\n          </div>\n        </div>\n\n        {subComponents !== undefined && totalSubComponents !== undefined && (\n          <WorstProjects\n            component={component.key}\n            subComponents={subComponents}\n            total={totalSubComponents}\n          />\n        )}\n\n        {showUnsubscribeModal && (\n          <UnsubscribeEmailModal\n            component={component}\n            onClose={this.handleCloseUnsubscribeEmailModal}\n          />\n        )}\n      </div>\n    );\n  }\n}\n\nconst mapDispatchToProps: DispatchToProps = { fetchMetrics };\n\nconst mapStateToProps = (state: Store): StateToProps => ({\n  metrics: getMetrics(state)\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withCurrentUser(App));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/App')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { State } from './components/ProjectActivityAppContainer';\n\nexport function addCustomEvent(analysis: string, event: T.AnalysisEvent) {\n  return (state: State) => ({\n    analyses: state.analyses.map(item => {\n      if (item.key !== analysis) {\n        return item;\n      }\n      return { ...item, events: [...item.events, event] };\n    })\n  });\n}\n\nexport function deleteEvent(analysis: string, event: string) {\n  return (state: State) => ({\n    analyses: state.analyses.map(item => {\n      if (item.key !== analysis) {\n        return item;\n      }\n      return { ...item, events: item.events.filter(eventItem => eventItem.key !== event) };\n    })\n  });\n}\n\nexport function changeEvent(analysis: string, event: T.AnalysisEvent) {\n  return (state: State) => ({\n    analyses: state.analyses.map(item => {\n      if (item.key !== analysis) {\n        return item;\n      }\n      return {\n        ...item,\n        events: item.events.map(eventItem =>\n          eventItem.key === event.key ? { ...eventItem, ...event } : eventItem\n        )\n      };\n    })\n  });\n}\n\nexport function deleteAnalysis(analysis: string) {\n  return (state: State) => ({ analyses: state.analyses.filter(item => item.key !== analysis) });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { startOfDay } from 'date-fns';\nimport { isEqual } from 'lodash';\nimport { DEFAULT_GRAPH } from '../../components/activity-graph/utils';\nimport { parseDate } from '../../helpers/dates';\nimport {\n  cleanQuery,\n  parseAsArray,\n  parseAsDate,\n  parseAsString,\n  serializeDate,\n  serializeString,\n  serializeStringArray\n} from '../../helpers/query';\nimport { GraphType } from '../../types/project-activity';\n\nexport interface Query {\n  category: string;\n  customMetrics: string[];\n  from?: Date;\n  graph: GraphType;\n  project: string;\n  selectedDate?: Date;\n  to?: Date;\n}\n\nexport const EVENT_TYPES = ['VERSION', 'QUALITY_GATE', 'QUALITY_PROFILE', 'OTHER'];\nexport const APPLICATION_EVENT_TYPES = ['QUALITY_GATE', 'DEFINITION_CHANGE', 'OTHER'];\n\nexport function activityQueryChanged(prevQuery: Query, nextQuery: Query) {\n  return prevQuery.category !== nextQuery.category || datesQueryChanged(prevQuery, nextQuery);\n}\n\nexport function customMetricsChanged(prevQuery: Query, nextQuery: Query) {\n  return !isEqual(prevQuery.customMetrics, nextQuery.customMetrics);\n}\n\nexport function datesQueryChanged(prevQuery: Query, nextQuery: Query) {\n  return !isEqual(prevQuery.from, nextQuery.from) || !isEqual(prevQuery.to, nextQuery.to);\n}\n\nexport function historyQueryChanged(prevQuery: Query, nextQuery: Query) {\n  return prevQuery.graph !== nextQuery.graph;\n}\n\nexport function selectedDateQueryChanged(prevQuery: Query, nextQuery: Query) {\n  return !isEqual(prevQuery.selectedDate, nextQuery.selectedDate);\n}\n\ninterface AnalysesByDay {\n  byDay: T.Dict<T.ParsedAnalysis[]>;\n  version: string | null;\n  key: string | null;\n}\n\nexport function getAnalysesByVersionByDay(\n  analyses: T.ParsedAnalysis[],\n  query: Pick<Query, 'category' | 'from' | 'to'>\n) {\n  return analyses.reduce<AnalysesByDay[]>((acc, analysis) => {\n    let currentVersion = acc[acc.length - 1];\n    const versionEvent = analysis.events.find(event => event.category === 'VERSION');\n    if (versionEvent) {\n      const newVersion = { version: versionEvent.name, key: versionEvent.key, byDay: {} };\n      if (!currentVersion || Object.keys(currentVersion.byDay).length > 0) {\n        acc.push(newVersion);\n      } else {\n        acc[acc.length - 1] = newVersion;\n      }\n      currentVersion = newVersion;\n    } else if (!currentVersion) {\n      // APPs don't have version events, so let's create a fake one\n      currentVersion = { version: null, key: null, byDay: {} };\n      acc.push(currentVersion);\n    }\n\n    const day = startOfDay(parseDate(analysis.date))\n      .getTime()\n      .toString();\n\n    let matchFilters = true;\n    if (query.category || query.from || query.to) {\n      const isAfterFrom = !query.from || analysis.date >= query.from;\n      const isBeforeTo = !query.to || analysis.date <= query.to;\n      const hasSelectedCategoryEvents =\n        !query.category || analysis.events.find(event => event.category === query.category) != null;\n      matchFilters = isAfterFrom && isBeforeTo && hasSelectedCategoryEvents;\n    }\n\n    if (matchFilters) {\n      if (!currentVersion.byDay[day]) {\n        currentVersion.byDay[day] = [];\n      }\n      currentVersion.byDay[day].push(analysis);\n    }\n    return acc;\n  }, []);\n}\n\nexport function parseQuery(urlQuery: T.RawQuery): Query {\n  return {\n    category: parseAsString(urlQuery['category']),\n    customMetrics: parseAsArray(urlQuery['custom_metrics'], parseAsString),\n    from: parseAsDate(urlQuery['from']),\n    graph: parseGraph(urlQuery['graph']),\n    project: parseAsString(urlQuery['id']),\n    to: parseAsDate(urlQuery['to']),\n    selectedDate: parseAsDate(urlQuery['selected_date'])\n  };\n}\n\nexport function serializeQuery(query: Query): T.RawQuery {\n  return cleanQuery({\n    category: serializeString(query.category),\n    from: serializeDate(query.from),\n    project: serializeString(query.project),\n    to: serializeDate(query.to)\n  });\n}\n\nexport function serializeUrlQuery(query: Query): T.RawQuery {\n  return cleanQuery({\n    category: serializeString(query.category),\n    custom_metrics: serializeStringArray(query.customMetrics),\n    from: serializeDate(query.from),\n    graph: serializeGraph(query.graph),\n    id: serializeString(query.project),\n    to: serializeDate(query.to),\n    selected_date: serializeDate(query.selectedDate)\n  });\n}\n\nfunction parseGraph(value?: string) {\n  const graph = parseAsString(value);\n  return Object.keys(GraphType).includes(graph) ? (graph as GraphType) : DEFAULT_GRAPH;\n}\n\nfunction serializeGraph(value?: GraphType) {\n  return value === DEFAULT_GRAPH ? undefined : value;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ConfirmModal from '../../../../components/controls/ConfirmModal';\nimport { translate } from '../../../../helpers/l10n';\n\ninterface Props {\n  changeEvent: (event: string, name: string) => Promise<void>;\n  event: T.AnalysisEvent;\n  header: string;\n  onClose: () => void;\n}\n\ninterface State {\n  name: string;\n}\n\nexport default class ChangeEventForm extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = { name: props.event.name };\n  }\n\n  changeInput = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.target.value });\n  };\n\n  handleSubmit = () => {\n    return this.props.changeEvent(this.props.event.key, this.state.name);\n  };\n\n  render() {\n    const { name } = this.state;\n    return (\n      <ConfirmModal\n        confirmButtonText={translate('change_verb')}\n        confirmDisable={!name || name === this.props.event.name}\n        header={this.props.header}\n        onClose={this.props.onClose}\n        onConfirm={this.handleSubmit}\n        size=\"small\">\n        <div className=\"modal-field\">\n          <label>{translate('name')}</label>\n          <input autoFocus={true} onChange={this.changeInput} type=\"text\" value={name} />\n        </div>\n      </ConfirmModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ConfirmModal from '../../../../components/controls/ConfirmModal';\nimport { translate } from '../../../../helpers/l10n';\n\nexport interface RemoveEventFormProps {\n  analysisKey: string;\n  event: T.AnalysisEvent;\n  header: string;\n  removeEventQuestion: string;\n  onClose: () => void;\n  onConfirm: (analysis: string, event: string) => Promise<void>;\n}\n\nexport default function RemoveEventForm(props: RemoveEventFormProps) {\n  const { analysisKey, event, header, removeEventQuestion } = props;\n  return (\n    <ConfirmModal\n      confirmButtonText={translate('delete')}\n      header={header}\n      isDestructive={true}\n      onClose={props.onClose}\n      onConfirm={() => props.onConfirm(analysisKey, event.key)}>\n      {removeEventQuestion}\n    </ConfirmModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DeleteButton, EditButton } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport EventInner from './EventInner';\nimport ChangeEventForm from './forms/ChangeEventForm';\nimport RemoveEventForm from './forms/RemoveEventForm';\n\nexport interface EventProps {\n  analysisKey: string;\n  canAdmin?: boolean;\n  event: T.AnalysisEvent;\n  isFirst?: boolean;\n  onChange?: (event: string, name: string) => Promise<void>;\n  onDelete?: (analysisKey: string, event: string) => Promise<void>;\n}\n\nexport function Event(props: EventProps) {\n  const { analysisKey, event, canAdmin, isFirst } = props;\n\n  const [changing, setChanging] = React.useState(false);\n  const [deleting, setDeleting] = React.useState(false);\n\n  const isOther = event.category === 'OTHER';\n  const isVersion = event.category === 'VERSION';\n  const canChange = (isOther || isVersion) && props.onChange;\n  const canDelete = (isOther || (isVersion && !isFirst)) && props.onDelete;\n  const showActions = canAdmin && (canChange || canDelete);\n\n  return (\n    <div className=\"project-activity-event\">\n      <EventInner event={event} />\n\n      {showActions && (\n        <span className=\"nowrap\">\n          {canChange && (\n            <EditButton\n              aria-label={translate('project_activity.events.tooltip.edit')}\n              className=\"button-small\"\n              data-test=\"project-activity__edit-event\"\n              onClick={() => setChanging(true)}\n              stopPropagation={true}\n            />\n          )}\n          {canDelete && (\n            <DeleteButton\n              aria-label={translate('project_activity.events.tooltip.delete')}\n              className=\"button-small\"\n              data-test=\"project-activity__delete-event\"\n              onClick={() => setDeleting(true)}\n              stopPropagation={true}\n            />\n          )}\n        </span>\n      )}\n\n      {changing && props.onChange && (\n        <ChangeEventForm\n          changeEvent={props.onChange}\n          event={event}\n          header={\n            isVersion\n              ? translate('project_activity.change_version')\n              : translate('project_activity.change_custom_event')\n          }\n          onClose={() => setChanging(false)}\n        />\n      )}\n\n      {deleting && props.onDelete && (\n        <RemoveEventForm\n          analysisKey={analysisKey}\n          event={event}\n          header={\n            isVersion\n              ? translate('project_activity.remove_version')\n              : translate('project_activity.remove_custom_event')\n          }\n          onClose={() => setDeleting(false)}\n          onConfirm={props.onDelete}\n          removeEventQuestion={translate(\n            `project_activity.${isVersion ? 'remove_version' : 'remove_custom_event'}.question`\n          )}\n        />\n      )}\n    </div>\n  );\n}\n\nexport default React.memo(Event);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport Event from './Event';\n\nexport interface EventsProps {\n  analysisKey: string;\n  canAdmin?: boolean;\n  events: T.AnalysisEvent[];\n  isFirst?: boolean;\n  onChange?: (event: string, name: string) => Promise<void>;\n  onDelete?: (analysis: string, event: string) => Promise<void>;\n}\n\nexport function Events(props: EventsProps) {\n  const { analysisKey, canAdmin, events, isFirst } = props;\n\n  const sortedEvents = sortBy(\n    events,\n    // versions last\n    event => (event.category === 'VERSION' ? 1 : 0),\n    // then the rest sorted by category\n    'category'\n  );\n\n  return (\n    <div className=\"big-spacer-top\">\n      {sortedEvents.map(event => (\n        <Event\n          analysisKey={analysisKey}\n          canAdmin={canAdmin}\n          event={event}\n          isFirst={isFirst}\n          key={event.key}\n          onChange={props.onChange}\n          onDelete={props.onDelete}\n        />\n      ))}\n    </div>\n  );\n}\n\nexport default React.memo(Events);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ConfirmModal from '../../../../components/controls/ConfirmModal';\nimport { translate } from '../../../../helpers/l10n';\n\ninterface Props {\n  addEvent: (analysis: string, name: string, category?: string) => Promise<void>;\n  addEventButtonText: string;\n  analysis: T.ParsedAnalysis;\n  onClose: () => void;\n}\n\ninterface State {\n  name: string;\n}\n\nexport default class AddEventForm extends React.PureComponent<Props, State> {\n  state: State = { name: '' };\n\n  handleNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.target.value });\n  };\n\n  handleSubmit = () => {\n    return this.props.addEvent(this.props.analysis.key, this.state.name);\n  };\n\n  render() {\n    return (\n      <ConfirmModal\n        confirmButtonText={translate('save')}\n        confirmDisable={!this.state.name}\n        header={translate(this.props.addEventButtonText)}\n        onClose={this.props.onClose}\n        onConfirm={this.handleSubmit}\n        size=\"small\">\n        <div className=\"modal-field\">\n          <label>{translate('name')}</label>\n          <input\n            autoFocus={true}\n            onChange={this.handleNameChange}\n            type=\"text\"\n            value={this.state.name}\n          />\n        </div>\n      </ConfirmModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ConfirmModal from '../../../../components/controls/ConfirmModal';\nimport { translate } from '../../../../helpers/l10n';\n\ninterface Props {\n  analysis: T.ParsedAnalysis;\n  deleteAnalysis: (analysis: string) => Promise<void>;\n  onClose: () => void;\n}\n\nexport default function RemoveAnalysisForm({ analysis, deleteAnalysis, onClose }: Props) {\n  return (\n    <ConfirmModal\n      confirmButtonText={translate('delete')}\n      confirmData={analysis.key}\n      header={translate('project_activity.delete_analysis')}\n      isDestructive={true}\n      onClose={onClose}\n      onConfirm={deleteAnalysis}>\n      {translate('project_activity.delete_analysis.question')}\n    </ConfirmModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport ActionsDropdown, {\n  ActionsDropdownDivider,\n  ActionsDropdownItem\n} from '../../../components/controls/ActionsDropdown';\nimport ClickEventBoundary from '../../../components/controls/ClickEventBoundary';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport TimeFormatter from '../../../components/intl/TimeFormatter';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { parseDate } from '../../../helpers/dates';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport Events from './Events';\nimport AddEventForm from './forms/AddEventForm';\nimport RemoveAnalysisForm from './forms/RemoveAnalysisForm';\n\nexport interface ProjectActivityAnalysisProps {\n  addCustomEvent: (analysis: string, name: string, category?: string) => Promise<void>;\n  addVersion: (analysis: string, version: string) => Promise<void>;\n  analysis: T.ParsedAnalysis;\n  canAdmin?: boolean;\n  canDeleteAnalyses?: boolean;\n  canCreateVersion: boolean;\n  changeEvent: (event: string, name: string) => Promise<void>;\n  deleteAnalysis: (analysis: string) => Promise<void>;\n  deleteEvent: (analysis: string, event: string) => Promise<void>;\n  isBaseline: boolean;\n  isFirst: boolean;\n  parentScrollContainer?: HTMLElement | null;\n  selected: boolean;\n  updateSelectedDate: (date: Date) => void;\n}\n\nexport function ProjectActivityAnalysis(props: ProjectActivityAnalysisProps) {\n  let node: HTMLLIElement | null = null;\n\n  const {\n    analysis,\n    isBaseline,\n    isFirst,\n    canAdmin,\n    canCreateVersion,\n    parentScrollContainer,\n    selected\n  } = props;\n\n  React.useEffect(() => {\n    if (node && parentScrollContainer && selected) {\n      const { height } = node.getBoundingClientRect();\n      scrollToElement(node, {\n        bottomOffset: height + 20,\n        topOffset: 60,\n        parent: parentScrollContainer,\n        smooth: false\n      });\n    }\n  });\n\n  const [addEventForm, setAddEventForm] = React.useState(false);\n  const [addVersionForm, setAddVersionForm] = React.useState(false);\n  const [removeAnalysisForm, setRemoveAnalysisForm] = React.useState(false);\n\n  const parsedDate = parseDate(analysis.date);\n  const hasVersion = analysis.events.find(event => event.category === 'VERSION') != null;\n\n  const canAddVersion = canAdmin && !hasVersion && canCreateVersion;\n  const canAddEvent = canAdmin;\n  const canDeleteAnalyses =\n    props.canDeleteAnalyses && !isFirst && !analysis.manualNewCodePeriodBaseline;\n\n  return (\n    <li\n      className={classNames('project-activity-analysis bordered-top bordered-bottom', {\n        selected\n      })}\n      onClick={() => props.updateSelectedDate(analysis.date)}\n      ref={ref => (node = ref)}>\n      <div className=\"display-flex-center display-flex-space-between\">\n        <div className=\"project-activity-time\">\n          <TimeFormatter date={parsedDate} long={false}>\n            {formattedTime => (\n              <time className=\"text-middle\" dateTime={parsedDate.toISOString()}>\n                {formattedTime}\n              </time>\n            )}\n          </TimeFormatter>\n        </div>\n\n        {analysis.buildString && (\n          <div className=\"flex-shrink small text-muted text-ellipsis\">\n            {translateWithParameters(\n              'project_activity.analysis_build_string_X',\n              analysis.buildString\n            )}\n          </div>\n        )}\n\n        {(canAddVersion || canAddEvent || canDeleteAnalyses) && (\n          <ClickEventBoundary>\n            <div className=\"project-activity-analysis-actions big-spacer-left\">\n              <ActionsDropdown\n                overlayPlacement={PopupPlacement.BottomRight}\n                small={true}\n                toggleClassName=\"js-analysis-actions\">\n                {canAddVersion && (\n                  <ActionsDropdownItem\n                    className=\"js-add-version\"\n                    onClick={() => setAddVersionForm(true)}>\n                    {translate('project_activity.add_version')}\n                  </ActionsDropdownItem>\n                )}\n                {canAddEvent && (\n                  <ActionsDropdownItem\n                    className=\"js-add-event\"\n                    onClick={() => setAddEventForm(true)}>\n                    {translate('project_activity.add_custom_event')}\n                  </ActionsDropdownItem>\n                )}\n                {(canAddVersion || canAddEvent) && canDeleteAnalyses && <ActionsDropdownDivider />}\n                {canDeleteAnalyses && (\n                  <ActionsDropdownItem\n                    className=\"js-delete-analysis\"\n                    destructive={true}\n                    onClick={() => setRemoveAnalysisForm(true)}>\n                    {translate('project_activity.delete_analysis')}\n                  </ActionsDropdownItem>\n                )}\n              </ActionsDropdown>\n\n              {addVersionForm && (\n                <AddEventForm\n                  addEvent={props.addVersion}\n                  addEventButtonText=\"project_activity.add_version\"\n                  analysis={analysis}\n                  onClose={() => setAddVersionForm(false)}\n                />\n              )}\n\n              {addEventForm && (\n                <AddEventForm\n                  addEvent={props.addCustomEvent}\n                  addEventButtonText=\"project_activity.add_custom_event\"\n                  analysis={analysis}\n                  onClose={() => setAddEventForm(false)}\n                />\n              )}\n\n              {removeAnalysisForm && (\n                <RemoveAnalysisForm\n                  analysis={analysis}\n                  deleteAnalysis={props.deleteAnalysis}\n                  onClose={() => setRemoveAnalysisForm(false)}\n                />\n              )}\n            </div>\n          </ClickEventBoundary>\n        )}\n      </div>\n\n      {analysis.events.length > 0 && (\n        <Events\n          analysisKey={analysis.key}\n          canAdmin={canAdmin}\n          events={analysis.events}\n          isFirst={isFirst}\n          onChange={props.changeEvent}\n          onDelete={props.deleteEvent}\n        />\n      )}\n\n      {isBaseline && (\n        <div className=\"baseline-marker\">\n          <div className=\"wedge\" />\n          <hr />\n          <div className=\"label display-flex-center\">\n            {translate('project_activity.new_code_period_start')}\n            <HelpTooltip\n              className=\"little-spacer-left\"\n              overlay={translate('project_activity.new_code_period_start.help')}\n              placement=\"top\"\n            />\n          </div>\n        </div>\n      )}\n    </li>\n  );\n}\n\nexport default React.memo(ProjectActivityAnalysis);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { isEqual } from 'date-fns';\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport DateFormatter from '../../../components/intl/DateFormatter';\nimport { toShortNotSoISOString } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport { ComponentQualifier } from '../../../types/component';\nimport { activityQueryChanged, getAnalysesByVersionByDay, Query } from '../utils';\nimport ProjectActivityAnalysis from './ProjectActivityAnalysis';\n\ninterface Props {\n  addCustomEvent: (analysis: string, name: string, category?: string) => Promise<void>;\n  addVersion: (analysis: string, version: string) => Promise<void>;\n  analyses: T.ParsedAnalysis[];\n  analysesLoading: boolean;\n  canAdmin?: boolean;\n  canDeleteAnalyses?: boolean;\n  changeEvent: (event: string, name: string) => Promise<void>;\n  deleteAnalysis: (analysis: string) => Promise<void>;\n  deleteEvent: (analysis: string, event: string) => Promise<void>;\n  initializing: boolean;\n  leakPeriodDate?: Date;\n  project: { qualifier: string };\n  query: Query;\n  updateQuery: (changes: Partial<Query>) => void;\n}\n\nexport default class ProjectActivityAnalysesList extends React.PureComponent<Props> {\n  analyses?: HTMLCollectionOf<HTMLElement>;\n  badges?: HTMLCollectionOf<HTMLElement>;\n  scrollContainer?: HTMLUListElement | null;\n\n  constructor(props: Props) {\n    super(props);\n    this.handleScroll = throttle(this.handleScroll, 20);\n  }\n\n  componentDidMount() {\n    this.badges = document.getElementsByClassName(\n      'project-activity-version-badge'\n    ) as HTMLCollectionOf<HTMLElement>;\n    this.analyses = document.getElementsByClassName(\n      'project-activity-analysis'\n    ) as HTMLCollectionOf<HTMLElement>;\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (!this.scrollContainer) {\n      return;\n    }\n    if (activityQueryChanged(prevProps.query, this.props.query)) {\n      this.resetScrollTop(0, true);\n    }\n  }\n\n  handleScroll = () => this.updateStickyBadges(true);\n\n  resetScrollTop = (newScrollTop: number, forceBadgeAlignement?: boolean) => {\n    if (this.scrollContainer) {\n      this.scrollContainer.scrollTop = newScrollTop;\n    }\n    if (this.badges) {\n      for (let i = 1; i < this.badges.length; i++) {\n        this.badges[i].removeAttribute('originOffsetTop');\n        this.badges[i].classList.remove('sticky');\n      }\n    }\n    this.updateStickyBadges(forceBadgeAlignement);\n  };\n\n  updateStickyBadges = (forceBadgeAlignement?: boolean) => {\n    if (!this.scrollContainer || !this.badges) {\n      return;\n    }\n\n    const { scrollTop } = this.scrollContainer;\n    if (scrollTop == null) {\n      return;\n    }\n\n    let newScrollTop;\n    for (let i = 1; i < this.badges.length; i++) {\n      const badge = this.badges[i];\n      let originOffsetTop = badge.getAttribute('originOffsetTop');\n      if (originOffsetTop == null) {\n        // Set the originOffsetTop attribute, to avoid using getBoundingClientRect\n        originOffsetTop = String(badge.offsetTop);\n        badge.setAttribute('originOffsetTop', originOffsetTop);\n      }\n      if (Number(originOffsetTop) < scrollTop + 18 + i * 2) {\n        if (forceBadgeAlignement && !badge.classList.contains('sticky')) {\n          newScrollTop = originOffsetTop;\n        }\n        badge.classList.add('sticky');\n      } else {\n        badge.classList.remove('sticky');\n      }\n    }\n\n    if (forceBadgeAlignement && newScrollTop != null) {\n      this.scrollContainer.scrollTop = Number(newScrollTop) - 6;\n    }\n  };\n\n  updateSelectedDate = (date: Date) => {\n    this.props.updateQuery({ selectedDate: date });\n  };\n\n  shouldRenderBaselineMarker(analysis: T.ParsedAnalysis): boolean {\n    return Boolean(this.props.leakPeriodDate && isEqual(this.props.leakPeriodDate, analysis.date));\n  }\n\n  renderAnalysis(analysis: T.ParsedAnalysis) {\n    const firstAnalysisKey = this.props.analyses[0].key;\n\n    const selectedDate = this.props.query.selectedDate\n      ? this.props.query.selectedDate.valueOf()\n      : null;\n\n    return (\n      <ProjectActivityAnalysis\n        addCustomEvent={this.props.addCustomEvent}\n        addVersion={this.props.addVersion}\n        analysis={analysis}\n        canAdmin={this.props.canAdmin}\n        canCreateVersion={this.props.project.qualifier === ComponentQualifier.Project}\n        canDeleteAnalyses={this.props.canDeleteAnalyses}\n        changeEvent={this.props.changeEvent}\n        deleteAnalysis={this.props.deleteAnalysis}\n        deleteEvent={this.props.deleteEvent}\n        isBaseline={this.shouldRenderBaselineMarker(analysis)}\n        isFirst={analysis.key === firstAnalysisKey}\n        key={analysis.key}\n        parentScrollContainer={this.scrollContainer}\n        selected={analysis.date.valueOf() === selectedDate}\n        updateSelectedDate={this.updateSelectedDate}\n      />\n    );\n  }\n\n  render() {\n    const byVersionByDay = getAnalysesByVersionByDay(this.props.analyses, this.props.query);\n    const hasFilteredData =\n      byVersionByDay.length > 1 ||\n      (byVersionByDay.length === 1 && Object.keys(byVersionByDay[0].byDay).length > 0);\n    if (this.props.analyses.length === 0 || !hasFilteredData) {\n      return (\n        <div className=\"boxed-group-inner\">\n          {this.props.initializing ? (\n            <div className=\"text-center\">\n              <i className=\"spinner\" />\n            </div>\n          ) : (\n            <span className=\"note\">{translate('no_results')}</span>\n          )}\n        </div>\n      );\n    }\n\n    return (\n      <ul\n        className=\"project-activity-versions-list\"\n        onScroll={this.handleScroll}\n        ref={element => (this.scrollContainer = element)}\n        style={{\n          paddingTop: this.props.project.qualifier === ComponentQualifier.Project ? 52 : undefined\n        }}>\n        {byVersionByDay.map((version, idx) => {\n          const days = Object.keys(version.byDay);\n          if (days.length <= 0) {\n            return null;\n          }\n          return (\n            <li key={version.key || 'noversion'}>\n              {version.version && (\n                <div className={classNames('project-activity-version-badge', { first: idx === 0 })}>\n                  <Tooltip\n                    mouseEnterDelay={0.5}\n                    overlay={`${translate('version')} ${version.version}`}>\n                    <span className=\"analysis-version\">{version.version}</span>\n                  </Tooltip>\n                </div>\n              )}\n              <ul className=\"project-activity-days-list\">\n                {days.map(day => (\n                  <li\n                    className=\"project-activity-day\"\n                    data-day={toShortNotSoISOString(Number(day))}\n                    key={day}>\n                    <div className=\"project-activity-date\">\n                      <DateFormatter date={Number(day)} long={true} />\n                    </div>\n                    <ul className=\"project-activity-analyses-list\">\n                      {version.byDay[day] != null &&\n                        version.byDay[day].map(analysis => this.renderAnalysis(analysis))}\n                    </ul>\n                  </li>\n                ))}\n              </ul>\n            </li>\n          );\n        })}\n        {this.props.analysesLoading && (\n          <li className=\"text-center\">\n            <i className=\"spinner\" />\n          </li>\n        )}\n      </ul>\n    );\n  }\n}\n", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__2__) {\nreturn ", " \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactIs = require('react-is');\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n", "module.exports = __WEBPACK_EXTERNAL_MODULE__1__;", "module.exports = __WEBPACK_EXTERNAL_MODULE__2__;", "/*!\n  Copyright (c) 2017 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "const {default: Draggable, DraggableCore} = require('./Draggable');\n\n// Previous versions of this lib exported <Draggable> as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\nmodule.exports = Draggable;\nmodule.exports.default = Draggable;\nmodule.exports.DraggableCore = DraggableCore;\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n  function shim(props, propName, componentName, location, propFullName, secret) {\n    if (secret === ReactPropTypesSecret) {\n      // It is still safe when called from React.\n      return;\n    }\n    var err = new Error(\n      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n      'Use PropTypes.checkPropTypes() to call them. ' +\n      'Read more at http://fb.me/use-check-prop-types'\n    );\n    err.name = 'Invariant Violation';\n    throw err;\n  };\n  shim.isRequired = shim;\n  function getShim() {\n    return shim;\n  };\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n  var ReactPropTypes = {\n    array: shim,\n    bool: shim,\n    func: shim,\n    number: shim,\n    object: shim,\n    string: shim,\n    symbol: shim,\n\n    any: shim,\n    arrayOf: getShim,\n    element: shim,\n    elementType: shim,\n    instanceOf: getShim,\n    node: shim,\n    objectOf: getShim,\n    oneOf: getShim,\n    oneOfType: getShim,\n    shape: getShim,\n    exact: getShim,\n\n    checkPropTypes: emptyFunctionWithReset,\n    resetWarningCache: emptyFunction\n  };\n\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n", "// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array<any> | TouchList, callback: Function): any {\n  for (let i = 0, length = array.length; i < length; i++) {\n    if (callback.apply(callback, [array[i], i, array])) return array[i];\n  }\n}\n\nexport function isFunction(func: any): boolean {\n  return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n  return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n  return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n  if (props[propName]) {\n    return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n  }\n}\n", "// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n  // Checking specifically for 'window.document' is for pseudo-browser server-side\n  // environments that define 'window' as the global context.\n  // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n  if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n  const style = window.document.documentElement.style;\n\n  if (prop in style) return '';\n\n  for (let i = 0; i < prefixes.length; i++) {\n    if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n  }\n\n  return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n  return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n  return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n  let out = '';\n  let shouldCapitalize = true;\n  for (let i = 0; i < str.length; i++) {\n    if (shouldCapitalize) {\n      out += str[i].toUpperCase();\n      shouldCapitalize = false;\n    } else if (str[i] === '-') {\n      shouldCapitalize = true;\n    } else {\n      out += str[i];\n    }\n  }\n  return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n", "// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n  if (!matchesSelectorFunc) {\n    matchesSelectorFunc = findInArray([\n      'matches',\n      'webkitMatchesSelector',\n      'mozMatchesSelector',\n      'msMatchesSelector',\n      'oMatchesSelector'\n    ], function(method){\n      // $FlowIgnore: Doesn't think elements are indexable\n      return isFunction(el[method]);\n    });\n  }\n\n  // Might not be found entirely (not an Element?) - in that case, bail\n  // $FlowIgnore: Doesn't think elements are indexable\n  if (!isFunction(el[matchesSelectorFunc])) return false;\n\n  // $FlowIgnore: Doesn't think elements are indexable\n  return el[matchesSelectorFunc](selector);\n}\n\n// Works up the tree to the draggable itself attempting to match selector.\nexport function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode: Node): boolean {\n  let node = el;\n  do {\n    if (matchesSelector(node, selector)) return true;\n    if (node === baseNode) return false;\n    node = node.parentNode;\n  } while (node);\n\n  return false;\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n  if (!el) { return; }\n  if (el.attachEvent) {\n    el.attachEvent('on' + event, handler);\n  } else if (el.addEventListener) {\n    el.addEventListener(event, handler, true);\n  } else {\n    // $FlowIgnore: Doesn't think elements are indexable\n    el['on' + event] = handler;\n  }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n  if (!el) { return; }\n  if (el.detachEvent) {\n    el.detachEvent('on' + event, handler);\n  } else if (el.removeEventListener) {\n    el.removeEventListener(event, handler, true);\n  } else {\n    // $FlowIgnore: Doesn't think elements are indexable\n    el['on' + event] = null;\n  }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n  // This is deliberately excluding margin for our calculations, since we are using\n  // offsetTop which is including margin. See getBoundPosition\n  let height = node.clientHeight;\n  const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n  height += int(computedStyle.borderTopWidth);\n  height += int(computedStyle.borderBottomWidth);\n  return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n  // This is deliberately excluding margin for our calculations, since we are using\n  // offsetLeft which is including margin. See getBoundPosition\n  let width = node.clientWidth;\n  const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n  width += int(computedStyle.borderLeftWidth);\n  width += int(computedStyle.borderRightWidth);\n  return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n  let height = node.clientHeight;\n  const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n  height -= int(computedStyle.paddingTop);\n  height -= int(computedStyle.paddingBottom);\n  return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n  let width = node.clientWidth;\n  const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n  width -= int(computedStyle.paddingLeft);\n  width -= int(computedStyle.paddingRight);\n  return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParent(evt: {clientX: number, clientY: number}, offsetParent: HTMLElement, scale: number): ControlPosition {\n  const isBody = offsetParent === offsetParent.ownerDocument.body;\n  const offsetParentRect = isBody ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n  const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;\n  const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;\n\n  return {x, y};\n}\n\nexport function createCSSTransform(controlPos: ControlPosition, positionOffset: PositionOffsetControlPosition): Object {\n  const translation = getTranslation(controlPos, positionOffset, 'px');\n  return {[browserPrefixToKey('transform', browserPrefix)]: translation };\n}\n\nexport function createSVGTransform(controlPos: ControlPosition, positionOffset: PositionOffsetControlPosition): string {\n  const translation = getTranslation(controlPos, positionOffset, '');\n  return translation;\n}\nexport function getTranslation({x, y}: ControlPosition, positionOffset: PositionOffsetControlPosition, unitSuffix: string): string {\n  let translation = `translate(${x}${unitSuffix},${y}${unitSuffix})`;\n  if (positionOffset) {\n    const defaultX = `${(typeof positionOffset.x === 'string') ? positionOffset.x : positionOffset.x + unitSuffix}`;\n    const defaultY = `${(typeof positionOffset.y === 'string') ? positionOffset.y : positionOffset.y + unitSuffix}`;\n    translation = `translate(${defaultX}, ${defaultY})` + translation;\n  }\n  return translation;\n}\n\nexport function getTouch(e: MouseTouchEvent, identifier: number): ?{clientX: number, clientY: number} {\n  return (e.targetTouches && findInArray(e.targetTouches, t => identifier === t.identifier)) ||\n         (e.changedTouches && findInArray(e.changedTouches, t => identifier === t.identifier));\n}\n\nexport function getTouchIdentifier(e: MouseTouchEvent): ?number {\n  if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n  if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n\n// Note we're passing `document` b/c we could be iframed\nexport function addUserSelectStyles(doc: ?Document) {\n  if (!doc) return;\n  let styleEl = doc.getElementById('react-draggable-style-el');\n  if (!styleEl) {\n    styleEl = doc.createElement('style');\n    styleEl.type = 'text/css';\n    styleEl.id = 'react-draggable-style-el';\n    styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\\n';\n    styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\\n';\n    doc.getElementsByTagName('head')[0].appendChild(styleEl);\n  }\n  if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nexport function removeUserSelectStyles(doc: ?Document) {\n  try {\n    if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');\n    // $FlowIgnore: IE\n    if (doc.selection) {\n      // $FlowIgnore: IE\n      doc.selection.empty();\n    } else {\n      window.getSelection().removeAllRanges();  // remove selection caused by scroll\n    }\n  } catch (e) {\n    // probably IE\n  }\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n  // Workaround IE pointer events; see #51\n  // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n  return {\n    touchAction: 'none',\n    ...childStyle\n  };\n}\n\nexport function addClassName(el: HTMLElement, className: string) {\n  if (el.classList) {\n    el.classList.add(className);\n  } else {\n    if (!el.className.match(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`))) {\n      el.className += ` ${className}`;\n    }\n  }\n}\n\nexport function removeClassName(el: HTMLElement, className: string) {\n  if (el.classList) {\n    el.classList.remove(className);\n  } else {\n    el.className = el.className.replace(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`, 'g'), '');\n  }\n}\n", "// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {getTouch, innerWidth, innerHeight, offsetXYFromParent, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n  // If no bounds, short-circuit and move on\n  if (!draggable.props.bounds) return [x, y];\n\n  // Clone new bounds\n  let {bounds} = draggable.props;\n  bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n  const node = findDOMNode(draggable);\n\n  if (typeof bounds === 'string') {\n    const {ownerDocument} = node;\n    const ownerWindow = ownerDocument.defaultView;\n    let boundNode;\n    if (bounds === 'parent') {\n      boundNode = node.parentNode;\n    } else {\n      boundNode = ownerDocument.querySelector(bounds);\n    }\n    if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n      throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n    }\n    const nodeStyle = ownerWindow.getComputedStyle(node);\n    const boundNodeStyle = ownerWindow.getComputedStyle(boundNode);\n    // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n    bounds = {\n      left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) + int(nodeStyle.marginLeft),\n      top: -node.offsetTop + int(boundNodeStyle.paddingTop) + int(nodeStyle.marginTop),\n      right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft +\n        int(boundNodeStyle.paddingRight) - int(nodeStyle.marginRight),\n      bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop +\n        int(boundNodeStyle.paddingBottom) - int(nodeStyle.marginBottom)\n    };\n  }\n\n  // Keep x and y below right and bottom limits...\n  if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n  if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n  // But above left and top limits.\n  if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n  if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n  return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n  const x = Math.round(pendingX / grid[0]) * grid[0];\n  const y = Math.round(pendingY / grid[1]) * grid[1];\n  return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n  return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n  return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseTouchEvent, touchIdentifier: ?number, draggableCore: DraggableCore): ?ControlPosition {\n  const touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null;\n  if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n  const node = findDOMNode(draggableCore);\n  // User can provide an offsetParent if desired.\n  const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n  return offsetXYFromParent(touchObj || e, offsetParent, draggableCore.props.scale);\n}\n\n// Create an data object exposed by <DraggableCore>'s events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n  const state = draggable.state;\n  const isStart = !isNum(state.lastX);\n  const node = findDOMNode(draggable);\n\n  if (isStart) {\n    // If this is our first move, use the x and y as last coords.\n    return {\n      node,\n      deltaX: 0, deltaY: 0,\n      lastX: x, lastY: y,\n      x, y,\n    };\n  } else {\n    // Otherwise calculate proper values.\n    return {\n      node,\n      deltaX: x - state.lastX, deltaY: y - state.lastY,\n      lastX: state.lastX, lastY: state.lastY,\n      x, y,\n    };\n  }\n}\n\n// Create an data exposed by <Draggable>'s events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n  const scale = draggable.props.scale;\n  return {\n    node: coreData.node,\n    x: draggable.state.x + (coreData.deltaX / scale),\n    y: draggable.state.y + (coreData.deltaY / scale),\n    deltaX: (coreData.deltaX / scale),\n    deltaY: (coreData.deltaY / scale),\n    lastX: draggable.state.x,\n    lastY: draggable.state.y\n  };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n  return {\n    left: bounds.left,\n    top: bounds.top,\n    right: bounds.right,\n    bottom: bounds.bottom\n  };\n}\n\nfunction findDOMNode(draggable: Draggable | DraggableCore): HTMLElement {\n  const node = ReactDOM.findDOMNode(draggable);\n  if (!node) {\n    throw new Error('<DraggableCore>: Unmounted during event!');\n  }\n  // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n  return node;\n}\n", "// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport {matchesSelectorAndParentsTo, addEvent, removeEvent, addUserSelectStyles, getTouchIdentifier,\n        removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler, MouseTouchEvent} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n  touch: {\n    start: 'touchstart',\n    move: 'touchmove',\n    stop: 'touchend'\n  },\n  mouse: {\n    start: 'mousedown',\n    move: 'mousemove',\n    stop: 'mouseup'\n  }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype DraggableCoreState = {\n  dragging: boolean,\n  lastX: number,\n  lastY: number,\n  touchIdentifier: ?number\n};\n\nexport type DraggableBounds = {\n  left: number,\n  right: number,\n  top: number,\n  bottom: number,\n};\n\nexport type DraggableData = {\n  node: HTMLElement,\n  x: number, y: number,\n  deltaX: number, deltaY: number,\n  lastX: number, lastY: number,\n};\n\nexport type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;\n\nexport type ControlPosition = {x: number, y: number};\nexport type PositionOffsetControlPosition = {x: number|string, y: number|string};\n\nexport type DraggableCoreProps = {\n  allowAnyClick: boolean,\n  cancel: string,\n  children: ReactElement<any>,\n  disabled: boolean,\n  enableUserSelectHack: boolean,\n  offsetParent: HTMLElement,\n  grid: [number, number],\n  handle: string,\n  onStart: DraggableEventHandler,\n  onDrag: DraggableEventHandler,\n  onStop: DraggableEventHandler,\n  onMouseDown: (e: MouseEvent) => void,\n  scale: number,\n};\n\n//\n// Define <DraggableCore>.\n//\n// <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component<DraggableCoreProps, DraggableCoreState> {\n\n  static displayName = 'DraggableCore';\n\n  static propTypes = {\n    /**\n     * `allowAnyClick` allows dragging using any mouse button.\n     * By default, we only accept the left button.\n     *\n     * Defaults to `false`.\n     */\n    allowAnyClick: PropTypes.bool,\n\n    /**\n     * `disabled`, if true, stops the <Draggable> from dragging. All handlers,\n     * with the exception of `onMouseDown`, will not fire.\n     */\n    disabled: PropTypes.bool,\n\n    /**\n     * By default, we add 'user-select:none' attributes to the document body\n     * to prevent ugly text selection during drag. If this is causing problems\n     * for your app, set this to `false`.\n     */\n    enableUserSelectHack: PropTypes.bool,\n\n    /**\n     * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n     * instead of using the parent node.\n     */\n    offsetParent: function(props: DraggableCoreProps, propName: $Keys<DraggableCoreProps>) {\n      if (props[propName] && props[propName].nodeType !== 1) {\n        throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n      }\n    },\n\n    /**\n     * `grid` specifies the x and y that dragging should snap to.\n     */\n    grid: PropTypes.arrayOf(PropTypes.number),\n    \n    /**\n     * `handle` specifies a selector to be used as the handle that initiates drag.\n     *\n     * Example:\n     *\n     * ```jsx\n     *   let App = React.createClass({\n     *       render: function () {\n     *         return (\n     *            <Draggable handle=\".handle\">\n     *              <div>\n     *                  <div className=\"handle\">Click me to drag</div>\n     *                  <div>This is some other content</div>\n     *              </div>\n     *           </Draggable>\n     *         );\n     *       }\n     *   });\n     * ```\n     */\n    handle: PropTypes.string,\n\n    /**\n     * `cancel` specifies a selector to be used to prevent drag initialization.\n     *\n     * Example:\n     *\n     * ```jsx\n     *   let App = React.createClass({\n     *       render: function () {\n     *           return(\n     *               <Draggable cancel=\".cancel\">\n     *                   <div>\n     *                     <div className=\"cancel\">You can't drag from here</div>\n     *                     <div>Dragging here works fine</div>\n     *                   </div>\n     *               </Draggable>\n     *           );\n     *       }\n     *   });\n     * ```\n     */\n    cancel: PropTypes.string,\n\n    /**\n     * Called when dragging starts.\n     * If this function returns the boolean false, dragging will be canceled.\n     */\n    onStart: PropTypes.func,\n\n    /**\n     * Called while dragging.\n     * If this function returns the boolean false, dragging will be canceled.\n     */\n    onDrag: PropTypes.func,\n\n    /**\n     * Called when dragging stops.\n     * If this function returns the boolean false, the drag will remain active.\n     */\n    onStop: PropTypes.func,\n\n    /**\n     * A workaround option which can be passed if onMouseDown needs to be accessed,\n     * since it'll always be blocked (as there is internal use of onMouseDown)\n     */\n    onMouseDown: PropTypes.func,\n\n    /**\n     * `scale`, if set, applies scaling while dragging an element\n     */\n    scale: PropTypes.number,\n\n    /**\n     * These properties should be defined on the child, not here.\n     */\n    className: dontSetMe,\n    style: dontSetMe,\n    transform: dontSetMe\n  };\n\n  static defaultProps = {\n    allowAnyClick: false, // by default only accept left click\n    cancel: null,\n    disabled: false,\n    enableUserSelectHack: true,\n    offsetParent: null,\n    handle: null,\n    grid: null,\n    transform: null,\n    onStart: function(){},\n    onDrag: function(){},\n    onStop: function(){},\n    onMouseDown: function(){},\n    scale: 1,\n  };\n\n  state = {\n    dragging: false,\n    // Used while dragging to determine deltas.\n    lastX: NaN, lastY: NaN,\n    touchIdentifier: null\n  };\n\n  componentWillUnmount() {\n    // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n    // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n    const thisNode = ReactDOM.findDOMNode(this);\n    if (thisNode) {\n      const {ownerDocument} = thisNode;\n      removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n      removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag);\n      removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n      removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n      if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument);\n    }\n  }\n\n  handleDragStart: EventHandler<MouseTouchEvent> = (e) => {\n    // Make it possible to attach event handlers on top of this one.\n    this.props.onMouseDown(e);\n\n    // Only accept left-clicks.\n    if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n    // Get nodes. Be sure to grab relative document (could be iframed)\n    const thisNode = ReactDOM.findDOMNode(this);\n    if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n      throw new Error('<DraggableCore> not mounted on DragStart!');\n    }\n    const {ownerDocument} = thisNode;\n\n    // Short circuit if handle or cancel prop was provided and selector doesn't match.\n    if (this.props.disabled ||\n      (!(e.target instanceof ownerDocument.defaultView.Node)) ||\n      (this.props.handle && !matchesSelectorAndParentsTo(e.target, this.props.handle, thisNode)) ||\n      (this.props.cancel && matchesSelectorAndParentsTo(e.target, this.props.cancel, thisNode))) {\n      return;\n    }\n\n    // Set touch identifier in component state if this is a touch event. This allows us to\n    // distinguish between individual touches on multitouch screens by identifying which\n    // touchpoint was set to this element.\n    const touchIdentifier = getTouchIdentifier(e);\n    this.setState({touchIdentifier});\n\n    // Get the current drag point from the event. This is used as the offset.\n    const position = getControlPosition(e, touchIdentifier, this);\n    if (position == null) return; // not possible but satisfies flow\n    const {x, y} = position;\n\n    // Create an event object with all the data parents need to make a decision here.\n    const coreEvent = createCoreData(this, x, y);\n\n    log('DraggableCore: handleDragStart: %j', coreEvent);\n\n    // Call event handler. If it returns explicit false, cancel.\n    log('calling', this.props.onStart);\n    const shouldUpdate = this.props.onStart(e, coreEvent);\n    if (shouldUpdate === false) return;\n\n    // Add a style to the body to disable user-select. This prevents text from\n    // being selected all over the page.\n    if (this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument);\n\n    // Initiate dragging. Set the current x and y as offsets\n    // so we know how much we've moved during the drag. This allows us\n    // to drag elements around even if they have been moved, without issue.\n    this.setState({\n      dragging: true,\n\n      lastX: x,\n      lastY: y\n    });\n\n    // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n    // this element. We use different events depending on whether or not we have detected that this\n    // is a touch-capable device.\n    addEvent(ownerDocument, dragEventFor.move, this.handleDrag);\n    addEvent(ownerDocument, dragEventFor.stop, this.handleDragStop);\n  };\n\n  handleDrag: EventHandler<MouseTouchEvent> = (e) => {\n\n    // Prevent scrolling on mobile devices, like ipad/iphone.\n    if (e.type === 'touchmove') e.preventDefault();\n\n    // Get the current drag point from the event. This is used as the offset.\n    const position = getControlPosition(e, this.state.touchIdentifier, this);\n    if (position == null) return;\n    let {x, y} = position;\n\n    // Snap to grid if prop has been provided\n    if (Array.isArray(this.props.grid)) {\n      let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n      [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n      if (!deltaX && !deltaY) return; // skip useless drag\n      x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n    }\n\n    const coreEvent = createCoreData(this, x, y);\n\n    log('DraggableCore: handleDrag: %j', coreEvent);\n\n    // Call event handler. If it returns explicit false, trigger end.\n    const shouldUpdate = this.props.onDrag(e, coreEvent);\n    if (shouldUpdate === false) {\n      try {\n        // $FlowIgnore\n        this.handleDragStop(new MouseEvent('mouseup'));\n      } catch (err) {\n        // Old browsers\n        const event = ((document.createEvent('MouseEvents'): any): MouseTouchEvent);\n        // I see why this insanity was deprecated\n        // $FlowIgnore\n        event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n        this.handleDragStop(event);\n      }\n      return;\n    }\n\n    this.setState({\n      lastX: x,\n      lastY: y\n    });\n  };\n\n  handleDragStop: EventHandler<MouseTouchEvent> = (e) => {\n    if (!this.state.dragging) return;\n\n    const position = getControlPosition(e, this.state.touchIdentifier, this);\n    if (position == null) return;\n    const {x, y} = position;\n    const coreEvent = createCoreData(this, x, y);\n\n    const thisNode = ReactDOM.findDOMNode(this);\n    if (thisNode) {\n      // Remove user-select hack\n      if (this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument);\n    }\n\n    log('DraggableCore: handleDragStop: %j', coreEvent);\n\n    // Reset the el.\n    this.setState({\n      dragging: false,\n      lastX: NaN,\n      lastY: NaN\n    });\n\n    // Call event handler\n    this.props.onStop(e, coreEvent);\n\n    if (thisNode) {\n      // Remove event handlers\n      log('DraggableCore: Removing handlers');\n      removeEvent(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n      removeEvent(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n    }\n  };\n\n  onMouseDown: EventHandler<MouseTouchEvent> = (e) => {\n    dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n    return this.handleDragStart(e);\n  };\n\n  onMouseUp: EventHandler<MouseTouchEvent> = (e) => {\n    dragEventFor = eventsFor.mouse;\n\n    return this.handleDragStop(e);\n  };\n\n  // Same as onMouseDown (start drag), but now consider this a touch device.\n  onTouchStart: EventHandler<MouseTouchEvent> = (e) => {\n    // We're on a touch device now, so change the event handlers\n    dragEventFor = eventsFor.touch;\n\n    return this.handleDragStart(e);\n  };\n\n  onTouchEnd: EventHandler<MouseTouchEvent> = (e) => {\n    // We're on a touch device now, so change the event handlers\n    dragEventFor = eventsFor.touch;\n\n    return this.handleDragStop(e);\n  };\n\n  render() {\n    // Reuse the child provided\n    // This makes it flexible to use whatever element is wanted (div, ul, etc)\n    return React.cloneElement(React.Children.only(this.props.children), {\n      style: styleHacks(this.props.children.props.style),\n\n      // Note: mouseMove handler is attached to document so it will still function\n      // when the user drags quickly and leaves the bounds of the element.\n      onMouseDown: this.onMouseDown,\n      onTouchStart: this.onTouchStart,\n      onMouseUp: this.onMouseUp,\n      onTouchEnd: this.onTouchEnd\n    });\n  }\n}\n", "// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport type {ControlPosition, PositionOffsetControlPosition, DraggableBounds, DraggableCoreProps} from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\ntype DraggableState = {\n  dragging: boolean,\n  dragged: boolean,\n  x: number, y: number,\n  slackX: number, slackY: number,\n  isElementSVG: boolean,\n  prevPropsPosition: ?ControlPosition,\n};\n\nexport type DraggableProps = {\n  ...$Exact<DraggableCoreProps>,\n  axis: 'both' | 'x' | 'y' | 'none',\n  bounds: DraggableBounds | string | false,\n  defaultClassName: string,\n  defaultClassNameDragging: string,\n  defaultClassNameDragged: string,\n  defaultPosition: ControlPosition,\n  positionOffset: PositionOffsetControlPosition,\n  position: ControlPosition,\n  scale: number\n};\n\n//\n// Define <Draggable>\n//\n\nclass Draggable extends React.Component<DraggableProps, DraggableState> {\n\n  static displayName = 'Draggable';\n\n  static propTypes = {\n    // Accepts all props <DraggableCore> accepts.\n    ...DraggableCore.propTypes,\n\n    /**\n     * `axis` determines which axis the draggable can move.\n     *\n     *  Note that all callbacks will still return data as normal. This only\n     *  controls flushing to the DOM.\n     *\n     * 'both' allows movement horizontally and vertically.\n     * 'x' limits movement to horizontal axis.\n     * 'y' limits movement to vertical axis.\n     * 'none' limits all movement.\n     *\n     * Defaults to 'both'.\n     */\n    axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n    /**\n     * `bounds` determines the range of movement available to the element.\n     * Available values are:\n     *\n     * 'parent' restricts movement within the Draggable's parent node.\n     *\n     * Alternatively, pass an object with the following properties, all of which are optional:\n     *\n     * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n     *\n     * All values are in px.\n     *\n     * Example:\n     *\n     * ```jsx\n     *   let App = React.createClass({\n     *       render: function () {\n     *         return (\n     *            <Draggable bounds={{right: 300, bottom: 300}}>\n     *              <div>Content</div>\n     *           </Draggable>\n     *         );\n     *       }\n     *   });\n     * ```\n     */\n    bounds: PropTypes.oneOfType([\n      PropTypes.shape({\n        left: PropTypes.number,\n        right: PropTypes.number,\n        top: PropTypes.number,\n        bottom: PropTypes.number\n      }),\n      PropTypes.string,\n      PropTypes.oneOf([false])\n    ]),\n\n    defaultClassName: PropTypes.string,\n    defaultClassNameDragging: PropTypes.string,\n    defaultClassNameDragged: PropTypes.string,\n\n    /**\n     * `defaultPosition` specifies the x and y that the dragged item should start at\n     *\n     * Example:\n     *\n     * ```jsx\n     *      let App = React.createClass({\n     *          render: function () {\n     *              return (\n     *                  <Draggable defaultPosition={{x: 25, y: 25}}>\n     *                      <div>I start with transformX: 25px and transformY: 25px;</div>\n     *                  </Draggable>\n     *              );\n     *          }\n     *      });\n     * ```\n     */\n    defaultPosition: PropTypes.shape({\n      x: PropTypes.number,\n      y: PropTypes.number\n    }),\n    positionOffset: PropTypes.shape({\n      x: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n      y: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n    }),\n\n    /**\n     * `position`, if present, defines the current position of the element.\n     *\n     *  This is similar to how form elements in React work - if no `position` is supplied, the component\n     *  is uncontrolled.\n     *\n     * Example:\n     *\n     * ```jsx\n     *      let App = React.createClass({\n     *          render: function () {\n     *              return (\n     *                  <Draggable position={{x: 25, y: 25}}>\n     *                      <div>I start with transformX: 25px and transformY: 25px;</div>\n     *                  </Draggable>\n     *              );\n     *          }\n     *      });\n     * ```\n     */\n    position: PropTypes.shape({\n      x: PropTypes.number,\n      y: PropTypes.number\n    }),\n\n    /**\n     * These properties should be defined on the child, not here.\n     */\n    className: dontSetMe,\n    style: dontSetMe,\n    transform: dontSetMe\n  };\n\n  static defaultProps = {\n    ...DraggableCore.defaultProps,\n    axis: 'both',\n    bounds: false,\n    defaultClassName: 'react-draggable',\n    defaultClassNameDragging: 'react-draggable-dragging',\n    defaultClassNameDragged: 'react-draggable-dragged',\n    defaultPosition: {x: 0, y: 0},\n    position: null,\n    scale: 1\n  };\n\n  // React 16.3+\n  // Arity (props, state)\n  static getDerivedStateFromProps({position}: DraggableProps, {prevPropsPosition}: DraggableState) {\n    // Set x/y if a new position is provided in props that is different than the previous.\n    if (\n      position &&\n      (!prevPropsPosition || \n        position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y\n      )\n    ) {\n      log('Draggable: getDerivedStateFromProps %j', {position, prevPropsPosition});\n      return {\n        x: position.x, \n        y: position.y, \n        prevPropsPosition: {...position}\n      };\n    }\n    return null;\n  }\n\n  constructor(props: DraggableProps) {\n    super(props);\n\n    this.state = {\n      // Whether or not we are currently dragging.\n      dragging: false,\n\n      // Whether or not we have been dragged before.\n      dragged: false,\n\n      // Current transform x and y.\n      x: props.position ? props.position.x : props.defaultPosition.x,\n      y: props.position ? props.position.y : props.defaultPosition.y,\n\n      prevPropsPosition: {...props.position},\n\n      // Used for compensating for out-of-bounds drags\n      slackX: 0, slackY: 0,\n\n      // Can only determine if SVG after mounting\n      isElementSVG: false\n    };\n\n    if (props.position && !(props.onDrag || props.onStop)) {\n      // eslint-disable-next-line no-console\n      console.warn('A `position` was applied to this <Draggable>, without drag handlers. This will make this ' +\n        'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' +\n        '`position` of this element.');\n    }\n  }\n\n  componentDidMount() {\n    // Check to see if the element passed is an instanceof SVGElement\n    if(typeof window.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof window.SVGElement) {\n      this.setState({isElementSVG: true});\n    }\n  }\n\n  componentWillUnmount() {\n    this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n  }\n\n  onDragStart: DraggableEventHandler = (e, coreData) => {\n    log('Draggable: onDragStart: %j', coreData);\n\n    // Short-circuit if user's callback killed it.\n    const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n    // Kills start event on core as well, so move handlers are never bound.\n    if (shouldStart === false) return false;\n\n    this.setState({dragging: true, dragged: true});\n  };\n\n  onDrag: DraggableEventHandler = (e, coreData) => {\n    if (!this.state.dragging) return false;\n    log('Draggable: onDrag: %j', coreData);\n\n    const uiData = createDraggableData(this, coreData);\n\n    const newState: $Shape<DraggableState> = {\n      x: uiData.x,\n      y: uiData.y\n    };\n\n    // Keep within bounds.\n    if (this.props.bounds) {\n      // Save original x and y.\n      const {x, y} = newState;\n\n      // Add slack to the values used to calculate bound position. This will ensure that if\n      // we start removing slack, the element won't react to it right away until it's been\n      // completely removed.\n      newState.x += this.state.slackX;\n      newState.y += this.state.slackY;\n\n      // Get bound position. This will ceil/floor the x and y within the boundaries.\n      const [newStateX, newStateY] = getBoundPosition(this, newState.x, newState.y);\n      newState.x = newStateX;\n      newState.y = newStateY;\n\n      // Recalculate slack by noting how much was shaved by the boundPosition handler.\n      newState.slackX = this.state.slackX + (x - newState.x);\n      newState.slackY = this.state.slackY + (y - newState.y);\n\n      // Update the event we fire to reflect what really happened after bounds took effect.\n      uiData.x = newState.x;\n      uiData.y = newState.y;\n      uiData.deltaX = newState.x - this.state.x;\n      uiData.deltaY = newState.y - this.state.y;\n    }\n\n    // Short-circuit if user's callback killed it.\n    const shouldUpdate = this.props.onDrag(e, uiData);\n    if (shouldUpdate === false) return false;\n\n    this.setState(newState);\n  };\n\n  onDragStop: DraggableEventHandler = (e, coreData) => {\n    if (!this.state.dragging) return false;\n\n    // Short-circuit if user's callback killed it.\n    const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n    if (shouldStop === false) return false;\n\n    log('Draggable: onDragStop: %j', coreData);\n\n    const newState: $Shape<DraggableState> = {\n      dragging: false,\n      slackX: 0,\n      slackY: 0\n    };\n\n    // If this is a controlled component, the result of this operation will be to\n    // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n    const controlled = Boolean(this.props.position);\n    if (controlled) {\n      const {x, y} = this.props.position;\n      newState.x = x;\n      newState.y = y;\n    }\n\n    this.setState(newState);\n  };\n\n  render(): ReactElement<any> {\n    const {\n      axis,\n      bounds,\n      children,\n      defaultPosition,\n      defaultClassName,\n      defaultClassNameDragging,\n      defaultClassNameDragged,\n      position,\n      positionOffset,\n      scale,\n      ...draggableCoreProps\n    } = this.props;\n\n    let style = {};\n    let svgTransform = null;\n\n    // If this is controlled, we don't want to move it - unless it's dragging.\n    const controlled = Boolean(position);\n    const draggable = !controlled || this.state.dragging;\n\n    const validPosition = position || defaultPosition;\n    const transformOpts = {\n      // Set left if horizontal drag is enabled\n      x: canDragX(this) && draggable ?\n        this.state.x :\n        validPosition.x,\n\n      // Set top if vertical drag is enabled\n      y: canDragY(this) && draggable ?\n        this.state.y :\n        validPosition.y\n    };\n\n    // If this element was SVG, we use the `transform` attribute.\n    if (this.state.isElementSVG) {\n      svgTransform = createSVGTransform(transformOpts, positionOffset);\n    } else {\n      // Add a CSS transform to move the element around. This allows us to move the element around\n      // without worrying about whether or not it is relatively or absolutely positioned.\n      // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable>\n      // has a clean slate.\n      style = createCSSTransform(transformOpts, positionOffset);\n    }\n\n    // Mark with class while dragging\n    const className = classNames((children.props.className || ''), defaultClassName, {\n      [defaultClassNameDragging]: this.state.dragging,\n      [defaultClassNameDragged]: this.state.dragged\n    });\n\n    // Reuse the child provided\n    // This makes it flexible to use whatever element is wanted (div, ul, etc)\n    return (\n      <DraggableCore {...draggableCoreProps} onStart={this.onDragStart} onDrag={this.onDrag} onStop={this.onDragStop}>\n        {React.cloneElement(React.Children.only(children), {\n          className: className,\n          style: {...children.props.style, ...style},\n          transform: svgTransform\n        })}\n      </DraggableCore>\n    );\n  }\n}\n\nexport {Draggable as default, DraggableCore};\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { extent, max } from 'd3-array';\nimport { scaleLinear, scalePoint, scaleTime, ScaleTime } from 'd3-scale';\nimport { area, curveBasis, line as d3Line } from 'd3-shape';\nimport { flatten, sortBy, throttle } from 'lodash';\nimport * as React from 'react';\nimport Draggable, { DraggableBounds, DraggableCore, DraggableData } from 'react-draggable';\nimport { colors } from '../../app/theme';\nimport './LineChart.css';\nimport './ZoomTimeLine.css';\n\nexport interface Props {\n  basisCurve?: boolean;\n  endDate?: Date;\n  height: number;\n  leakPeriodDate?: Date;\n  metricType: string;\n  padding: number[];\n  series: T.Chart.Serie[];\n  showAreas?: boolean;\n  showXTicks: boolean;\n  startDate?: Date;\n  updateZoom: (start?: Date, endDate?: Date) => void;\n  width: number;\n}\n\ninterface State {\n  overlayLeftPos?: number;\n  newZoomStart?: number;\n}\n\ntype XScale = ScaleTime<number, number>;\n// It should be `ScaleLinear<number, number> | ScalePoint<number> | ScalePoint<string>`, but in order\n// to make it work, we need to write a lot of type guards :-(. This introduces a lot of unnecessary code,\n// not to mention overhead at runtime. The simplest is just to cast to any, and rely on D3's internals\n// to make it work.\ntype YScale = any;\n\nexport default class ZoomTimeLine extends React.PureComponent<Props, State> {\n  static defaultProps = {\n    padding: [0, 0, 18, 0],\n    showXTicks: true\n  };\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {};\n    this.handleZoomUpdate = throttle(this.handleZoomUpdate, 40);\n  }\n\n  getRatingScale = (availableHeight: number) => {\n    return scalePoint<number>()\n      .domain([5, 4, 3, 2, 1])\n      .range([availableHeight, 0]);\n  };\n\n  getLevelScale = (availableHeight: number) => {\n    return scalePoint()\n      .domain(['ERROR', 'WARN', 'OK'])\n      .range([availableHeight, 0]);\n  };\n\n  getYScale = (availableHeight: number, flatData: T.Chart.Point[]): YScale => {\n    if (this.props.metricType === 'RATING') {\n      return this.getRatingScale(availableHeight);\n    } else if (this.props.metricType === 'LEVEL') {\n      return this.getLevelScale(availableHeight);\n    }\n    return scaleLinear()\n      .range([availableHeight, 0])\n      .domain([0, max(flatData, d => Number(d.y || 0)) as number])\n      .nice();\n  };\n\n  getXScale = (availableWidth: number, flatData: T.Chart.Point[]): XScale => {\n    return scaleTime()\n      .domain(extent(flatData, d => d.x) as [Date, Date])\n      .range([0, availableWidth])\n      .clamp(true);\n  };\n\n  getScales = () => {\n    const availableWidth = this.props.width - this.props.padding[1] - this.props.padding[3];\n    const availableHeight = this.props.height - this.props.padding[0] - this.props.padding[2];\n    const flatData = flatten(this.props.series.map(serie => serie.data));\n    return {\n      xScale: this.getXScale(availableWidth, flatData),\n      yScale: this.getYScale(availableHeight, flatData)\n    };\n  };\n\n  getEventMarker = (size: number) => {\n    const half = size / 2;\n    return `M${half} 0 L${size} ${half} L ${half} ${size} L0 ${half} L${half} 0 L${size} ${half}`;\n  };\n\n  handleDoubleClick = (xScale: XScale, xDim: number[]) => () => {\n    this.handleZoomUpdate(xScale, xDim);\n  };\n\n  handleSelectionDrag = (xScale: XScale, width: number, xDim: number[], checkDelta = false) => (\n    _: MouseEvent,\n    data: DraggableData\n  ) => {\n    if (!checkDelta || data.deltaX) {\n      const x = Math.max(xDim[0], Math.min(data.x, xDim[1] - width));\n      this.handleZoomUpdate(xScale, [x, width + x]);\n    }\n  };\n\n  handleSelectionHandleDrag = (\n    xScale: XScale,\n    fixedX: number,\n    xDim: number[],\n    handleDirection: string,\n    checkDelta = false\n  ) => (_: MouseEvent, data: DraggableData) => {\n    if (!checkDelta || data.deltaX) {\n      const x = Math.max(xDim[0], Math.min(data.x, xDim[1]));\n      this.handleZoomUpdate(xScale, handleDirection === 'right' ? [fixedX, x] : [x, fixedX]);\n    }\n  };\n\n  handleNewZoomDragStart = (xDim: number[]) => (_: MouseEvent, data: DraggableData) => {\n    const overlayLeftPos = data.node.getBoundingClientRect().left;\n    this.setState({\n      overlayLeftPos,\n      newZoomStart: Math.round(Math.max(xDim[0], Math.min(data.x - overlayLeftPos, xDim[1])))\n    });\n  };\n\n  handleNewZoomDrag = (xScale: XScale, xDim: number[]) => (_: MouseEvent, data: DraggableData) => {\n    const { newZoomStart, overlayLeftPos } = this.state;\n    if (newZoomStart != null && overlayLeftPos != null && data.deltaX) {\n      this.handleZoomUpdate(\n        xScale,\n        sortBy([newZoomStart, Math.max(xDim[0], Math.min(data.x - overlayLeftPos, xDim[1]))])\n      );\n    }\n  };\n\n  handleNewZoomDragEnd = (xScale: XScale, xDim: number[]) => (\n    _: MouseEvent,\n    data: DraggableData\n  ) => {\n    const { newZoomStart, overlayLeftPos } = this.state;\n    if (newZoomStart !== undefined && overlayLeftPos !== undefined) {\n      const x = Math.round(Math.max(xDim[0], Math.min(data.x - overlayLeftPos, xDim[1])));\n      this.handleZoomUpdate(xScale, newZoomStart === x ? xDim : sortBy([newZoomStart, x]));\n      this.setState({ newZoomStart: undefined, overlayLeftPos: undefined });\n    }\n  };\n\n  handleZoomUpdate = (xScale: XScale, xArray: number[]) => {\n    const xRange = xScale.range();\n    const startDate =\n      xArray[0] > xRange[0] && xArray[0] < xRange[xRange.length - 1]\n        ? xScale.invert(xArray[0])\n        : undefined;\n    const endDate =\n      xArray[1] > xRange[0] && xArray[1] < xRange[xRange.length - 1]\n        ? xScale.invert(xArray[1])\n        : undefined;\n    this.props.updateZoom(startDate, endDate);\n  };\n\n  renderBaseLine = (xScale: XScale, yScale: YScale) => {\n    return (\n      <line\n        className=\"line-chart-grid\"\n        x1={xScale.range()[0]}\n        x2={xScale.range()[1]}\n        y1={yScale.range()[0]}\n        y2={yScale.range()[0]}\n      />\n    );\n  };\n\n  renderTicks = (xScale: XScale, yScale: YScale) => {\n    const format = xScale.tickFormat(7);\n    const ticks = xScale.ticks(7);\n    const y = yScale.range()[0];\n    return (\n      <g>\n        {ticks.slice(0, -1).map((tick, index) => {\n          const nextTick = index + 1 < ticks.length ? ticks[index + 1] : xScale.domain()[1];\n          const x = (xScale(tick) + xScale(nextTick)) / 2;\n          return (\n            // eslint-disable-next-line react/no-array-index-key\n            <text className=\"chart-zoom-tick\" dy=\"1.3em\" key={index} x={x} y={y}>\n              {format(tick)}\n            </text>\n          );\n        })}\n      </g>\n    );\n  };\n\n  renderLeak = (xScale: XScale, yScale: YScale) => {\n    const { leakPeriodDate } = this.props;\n    if (!leakPeriodDate) {\n      return null;\n    }\n    const yRange = yScale.range();\n    return (\n      <rect\n        fill={colors.leakPrimaryColor}\n        height={yRange[0] - yRange[yRange.length - 1]}\n        width={xScale.range()[1] - xScale(leakPeriodDate)}\n        x={xScale(leakPeriodDate)}\n        y={yRange[yRange.length - 1]}\n      />\n    );\n  };\n\n  renderLines = (xScale: XScale, yScale: YScale) => {\n    const lineGenerator = d3Line<T.Chart.Point>()\n      .defined(d => Boolean(d.y || d.y === 0))\n      .x(d => xScale(d.x))\n      .y(d => yScale(d.y));\n    if (this.props.basisCurve) {\n      lineGenerator.curve(curveBasis);\n    }\n    return (\n      <g>\n        {this.props.series.map((serie, idx) => (\n          <path\n            className={classNames('line-chart-path', 'line-chart-path-' + idx)}\n            d={lineGenerator(serie.data) || undefined}\n            key={serie.name}\n          />\n        ))}\n      </g>\n    );\n  };\n\n  renderAreas = (xScale: XScale, yScale: YScale) => {\n    const areaGenerator = area<T.Chart.Point>()\n      .defined(d => Boolean(d.y || d.y === 0))\n      .x(d => xScale(d.x))\n      .y1(d => yScale(d.y))\n      .y0(yScale(0));\n    if (this.props.basisCurve) {\n      areaGenerator.curve(curveBasis);\n    }\n    return (\n      <g>\n        {this.props.series.map((serie, idx) => (\n          <path\n            className={classNames('line-chart-area', 'line-chart-area-' + idx)}\n            d={areaGenerator(serie.data) || undefined}\n            key={serie.name}\n          />\n        ))}\n      </g>\n    );\n  };\n\n  renderZoomHandle = (options: {\n    xScale: XScale;\n    xPos: number;\n    fixedPos: number;\n    yDim: number[];\n    xDim: number[];\n    direction: string;\n  }) => (\n    <Draggable\n      axis=\"x\"\n      bounds={{ left: options.xDim[0], right: options.xDim[1] } as DraggableBounds}\n      onDrag={this.handleSelectionHandleDrag(\n        options.xScale,\n        options.fixedPos,\n        options.xDim,\n        options.direction,\n        true\n      )}\n      onStop={this.handleSelectionHandleDrag(\n        options.xScale,\n        options.fixedPos,\n        options.xDim,\n        options.direction\n      )}\n      position={{ x: options.xPos, y: 0 }}>\n      <rect\n        className=\"zoom-selection-handle\"\n        height={options.yDim[0] - options.yDim[1] + 1}\n        width={6}\n        x={-3}\n        y={options.yDim[1]}\n      />\n    </Draggable>\n  );\n\n  renderZoom = (xScale: XScale, yScale: YScale) => {\n    const xRange = xScale.range();\n    const yRange = yScale.range();\n    const xDim = [xRange[0], xRange[xRange.length - 1]];\n    const yDim = [yRange[0], yRange[yRange.length - 1]];\n    const startX = Math.round(this.props.startDate ? xScale(this.props.startDate) : xDim[0]);\n    const endX = Math.round(this.props.endDate ? xScale(this.props.endDate) : xDim[1]);\n    const xArray = sortBy([startX, endX]);\n    const zoomBoxWidth = xArray[1] - xArray[0];\n    const showZoomArea =\n      this.state.newZoomStart == null ||\n      this.state.newZoomStart === startX ||\n      this.state.newZoomStart === endX;\n\n    return (\n      <g className=\"chart-zoom\">\n        <DraggableCore\n          onDrag={this.handleNewZoomDrag(xScale, xDim)}\n          onStart={this.handleNewZoomDragStart(xDim)}\n          onStop={this.handleNewZoomDragEnd(xScale, xDim)}>\n          <rect\n            className=\"zoom-overlay\"\n            height={yDim[0] - yDim[1]}\n            width={xDim[1] - xDim[0]}\n            x={xDim[0]}\n            y={yDim[1]}\n          />\n        </DraggableCore>\n        {showZoomArea && (\n          <Draggable\n            axis=\"x\"\n            bounds={{ left: xDim[0], right: Math.floor(xDim[1] - zoomBoxWidth) } as DraggableBounds}\n            onDrag={this.handleSelectionDrag(xScale, zoomBoxWidth, xDim, true)}\n            onStop={this.handleSelectionDrag(xScale, zoomBoxWidth, xDim)}\n            position={{ x: xArray[0], y: 0 }}>\n            <rect\n              className=\"zoom-selection\"\n              height={yDim[0] - yDim[1] + 1}\n              onDoubleClick={this.handleDoubleClick(xScale, xDim)}\n              width={zoomBoxWidth}\n              x={0}\n              y={yDim[1]}\n            />\n          </Draggable>\n        )}\n        {showZoomArea &&\n          this.renderZoomHandle({\n            xScale,\n            xPos: startX,\n            fixedPos: endX,\n            xDim,\n            yDim,\n            direction: 'left'\n          })}\n        {showZoomArea &&\n          this.renderZoomHandle({\n            xScale,\n            xPos: endX,\n            fixedPos: startX,\n            xDim,\n            yDim,\n            direction: 'right'\n          })}\n      </g>\n    );\n  };\n\n  render() {\n    if (!this.props.width || !this.props.height) {\n      return <div />;\n    }\n\n    const { xScale, yScale } = this.getScales();\n\n    return (\n      <svg className=\"line-chart \" height={this.props.height} width={this.props.width}>\n        <g transform={`translate(${this.props.padding[3]}, ${this.props.padding[0] + 2})`}>\n          {this.renderLeak(xScale, yScale)}\n          {this.renderBaseLine(xScale, yScale)}\n          {this.props.showXTicks && this.renderTicks(xScale, yScale)}\n          {this.props.showAreas && this.renderAreas(xScale, yScale)}\n          {this.renderLines(xScale, yScale)}\n          {this.renderZoom(xScale, yScale)}\n        </g>\n      </svg>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport ZoomTimeLine from '../../components/charts/ZoomTimeLine';\nimport { Serie } from '../../types/project-activity';\nimport { hasHistoryData } from './utils';\n\ninterface Props {\n  graphEndDate?: Date;\n  graphStartDate?: Date;\n  leakPeriodDate?: Date;\n  loading: boolean;\n  metricsType: string;\n  series: Serie[];\n  showAreas?: boolean;\n  updateGraphZoom: (from?: Date, to?: Date) => void;\n}\n\nexport default function GraphsZoom(props: Props) {\n  if (props.loading || !hasHistoryData(props.series)) {\n    return null;\n  }\n\n  return (\n    <div className=\"activity-graph-zoom\">\n      <AutoSizer disableHeight={true}>\n        {({ width }) => (\n          <ZoomTimeLine\n            endDate={props.graphEndDate}\n            height={64}\n            leakPeriodDate={props.leakPeriodDate}\n            metricType={props.metricsType}\n            padding={[0, 10, 18, 60]}\n            series={props.series}\n            showAreas={props.showAreas}\n            startDate={props.graphStartDate}\n            updateZoom={props.updateGraphZoom}\n            width={width}\n          />\n        )}\n      </AutoSizer>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce, findLast, maxBy, minBy, sortBy } from 'lodash';\nimport * as React from 'react';\nimport GraphsHeader from '../../../components/activity-graph/GraphsHeader';\nimport GraphsHistory from '../../../components/activity-graph/GraphsHistory';\nimport GraphsZoom from '../../../components/activity-graph/GraphsZoom';\nimport {\n  generateSeries,\n  getActivityGraph,\n  getDisplayedHistoryMetrics,\n  getSeriesMetricType,\n  isCustomGraph,\n  saveActivityGraph,\n  splitSeriesInGraphs\n} from '../../../components/activity-graph/utils';\nimport { GraphType, MeasureHistory, Point, Serie } from '../../../types/project-activity';\nimport { datesQueryChanged, historyQueryChanged, Query } from '../utils';\nimport { PROJECT_ACTIVITY_GRAPH } from './ProjectActivityAppContainer';\n\ninterface Props {\n  analyses: T.ParsedAnalysis[];\n  leakPeriodDate?: Date;\n  loading: boolean;\n  measuresHistory: MeasureHistory[];\n  metrics: T.Metric[];\n  project: string;\n  query: Query;\n  updateQuery: (changes: Partial<Query>) => void;\n}\n\ninterface State {\n  graphStartDate?: Date;\n  graphEndDate?: Date;\n  series: Serie[];\n  graphs: Serie[][];\n}\n\nconst MAX_GRAPH_NB = 2;\nconst MAX_SERIES_PER_GRAPH = 3;\n\nexport default class ProjectActivityGraphs extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    const series = generateSeries(\n      props.measuresHistory,\n      props.query.graph,\n      props.metrics,\n      getDisplayedHistoryMetrics(props.query.graph, props.query.customMetrics)\n    );\n    this.state = {\n      series,\n      graphs: splitSeriesInGraphs(series, MAX_GRAPH_NB, MAX_SERIES_PER_GRAPH),\n      ...this.getStateZoomDates(undefined, props, series)\n    };\n    this.updateQueryDateRange = debounce(this.updateQueryDateRange, 500);\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    let newSeries;\n    let newGraphs;\n    if (\n      prevProps.measuresHistory !== this.props.measuresHistory ||\n      historyQueryChanged(prevProps.query, this.props.query)\n    ) {\n      newSeries = generateSeries(\n        this.props.measuresHistory,\n        this.props.query.graph,\n        this.props.metrics,\n        getDisplayedHistoryMetrics(this.props.query.graph, this.props.query.customMetrics)\n      );\n      newGraphs = splitSeriesInGraphs(newSeries, MAX_GRAPH_NB, MAX_SERIES_PER_GRAPH);\n    }\n\n    const newDates = this.getStateZoomDates(prevProps, this.props, newSeries);\n\n    if (newSeries || newDates) {\n      let newState = {} as State;\n      if (newSeries) {\n        newState.series = newSeries;\n      }\n      if (newGraphs) {\n        newState.graphs = newGraphs;\n      }\n      if (newDates) {\n        newState = { ...newState, ...newDates };\n      }\n      this.setState(newState);\n    }\n  }\n\n  getStateZoomDates = (prevProps: Props | undefined, props: Props, newSeries?: Serie[]) => {\n    const newDates = {\n      from: props.query.from || undefined,\n      to: props.query.to || undefined\n    };\n    if (!prevProps || datesQueryChanged(prevProps.query, props.query)) {\n      return { graphEndDate: newDates.to, graphStartDate: newDates.from };\n    }\n\n    if (newDates.to === undefined && newDates.from === undefined && newSeries !== undefined) {\n      const firstValid = minBy(\n        newSeries.map(serie => serie.data.find(p => Boolean(p.y || p.y === 0))),\n        'x'\n      );\n      const lastValid = maxBy<Point>(\n        newSeries.map(serie => findLast(serie.data, p => Boolean(p.y || p.y === 0))!),\n        'x'\n      );\n      return {\n        graphEndDate: lastValid && lastValid.x,\n        graphStartDate: firstValid && firstValid.x\n      };\n    }\n    return null;\n  };\n\n  getMetricsTypeFilter = () => {\n    if (this.state.graphs.length < MAX_GRAPH_NB) {\n      return undefined;\n    }\n    return this.state.graphs\n      .filter(graph => graph.length < MAX_SERIES_PER_GRAPH)\n      .map(graph => graph[0].type);\n  };\n\n  addCustomMetric = (metric: string) => {\n    const customMetrics = [...this.props.query.customMetrics, metric];\n    saveActivityGraph(PROJECT_ACTIVITY_GRAPH, this.props.project, GraphType.custom, customMetrics);\n    this.props.updateQuery({ customMetrics });\n  };\n\n  removeCustomMetric = (removedMetric: string) => {\n    const customMetrics = this.props.query.customMetrics.filter(metric => metric !== removedMetric);\n    saveActivityGraph(PROJECT_ACTIVITY_GRAPH, this.props.project, GraphType.custom, customMetrics);\n    this.props.updateQuery({ customMetrics });\n  };\n\n  updateGraph = (graph: GraphType) => {\n    saveActivityGraph(PROJECT_ACTIVITY_GRAPH, this.props.project, graph);\n    if (isCustomGraph(graph) && this.props.query.customMetrics.length <= 0) {\n      const { customGraphs } = getActivityGraph(PROJECT_ACTIVITY_GRAPH, this.props.project);\n      this.props.updateQuery({ graph, customMetrics: customGraphs });\n    } else {\n      this.props.updateQuery({ graph, customMetrics: [] });\n    }\n  };\n\n  updateGraphZoom = (graphStartDate?: Date, graphEndDate?: Date) => {\n    if (graphEndDate !== undefined && graphStartDate !== undefined) {\n      const msDiff = Math.abs(graphEndDate.valueOf() - graphStartDate.valueOf());\n      // 12 hours minimum between the two dates\n      if (msDiff < 1000 * 60 * 60 * 12) {\n        return;\n      }\n    }\n\n    this.setState({ graphStartDate, graphEndDate });\n    this.updateQueryDateRange([graphStartDate, graphEndDate]);\n  };\n\n  updateSelectedDate = (selectedDate?: Date) => this.props.updateQuery({ selectedDate });\n\n  updateQueryDateRange = (dates: Array<Date | undefined>) => {\n    if (dates[0] === undefined || dates[1] === undefined) {\n      this.props.updateQuery({ from: dates[0], to: dates[1] });\n    } else {\n      const sortedDates = sortBy(dates);\n      this.props.updateQuery({ from: sortedDates[0], to: sortedDates[1] });\n    }\n  };\n\n  render() {\n    const { leakPeriodDate, loading, metrics, query } = this.props;\n    const { graphEndDate, graphStartDate, series } = this.state;\n\n    return (\n      <div className=\"project-activity-layout-page-main-inner boxed-group boxed-group-inner\">\n        <GraphsHeader\n          addCustomMetric={this.addCustomMetric}\n          className=\"big-spacer-bottom\"\n          graph={query.graph}\n          metrics={metrics}\n          metricsTypeFilter={this.getMetricsTypeFilter()}\n          removeCustomMetric={this.removeCustomMetric}\n          selectedMetrics={this.props.query.customMetrics}\n          updateGraph={this.updateGraph}\n        />\n        <GraphsHistory\n          analyses={this.props.analyses}\n          graph={query.graph}\n          graphEndDate={graphEndDate}\n          graphStartDate={graphStartDate}\n          graphs={this.state.graphs}\n          leakPeriodDate={leakPeriodDate}\n          loading={loading}\n          measuresHistory={this.props.measuresHistory}\n          removeCustomMetric={this.removeCustomMetric}\n          selectedDate={this.props.query.selectedDate}\n          series={series}\n          updateGraphZoom={this.updateGraphZoom}\n          updateSelectedDate={this.updateSelectedDate}\n        />\n        <GraphsZoom\n          graphEndDate={graphEndDate}\n          graphStartDate={graphStartDate}\n          leakPeriodDate={leakPeriodDate}\n          loading={loading}\n          metricsType={getSeriesMetricType(series)}\n          series={series}\n          showAreas={[GraphType.coverage, GraphType.duplications].includes(query.graph)}\n          updateGraphZoom={this.updateGraphZoom}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport DateRangeInput from '../../../components/controls/DateRangeInput';\nimport { translate } from '../../../helpers/l10n';\nimport { Query } from '../utils';\n\ninterface Props {\n  from?: Date;\n  to?: Date;\n  onChange: (changes: Partial<Query>) => void;\n}\n\nexport default class ProjectActivityDateInput extends React.PureComponent<Props> {\n  handleChange = ({ from, to }: { from?: Date; to?: Date }) => {\n    this.props.onChange({ from, to });\n  };\n\n  handleResetClick = () => {\n    this.props.onChange({ from: undefined, to: undefined });\n  };\n\n  render() {\n    return (\n      <div>\n        <DateRangeInput\n          onChange={this.handleChange}\n          value={{ from: this.props.from, to: this.props.to }}\n        />\n        <Button\n          className=\"spacer-left\"\n          disabled={this.props.from === undefined && this.props.to === undefined}\n          onClick={this.handleResetClick}>\n          {translate('project_activity.reset_dates')}\n        </Button>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\nexport interface Option {\n  label: string;\n  value: string;\n}\n\ninterface Props {\n  option: Option;\n  children?: Element | Text;\n  className?: string;\n  isFocused?: boolean;\n  onFocus: (option: Option, event: React.MouseEvent<HTMLDivElement>) => void;\n  onSelect: (option: Option, event: React.MouseEvent<HTMLDivElement>) => void;\n}\n\nexport default class ProjectActivityEventSelectOption extends React.PureComponent<Props> {\n  handleMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {\n    event.preventDefault();\n    event.stopPropagation();\n    this.props.onSelect(this.props.option, event);\n  };\n\n  handleMouseEnter = (event: React.MouseEvent<HTMLDivElement>) => {\n    this.props.onFocus(this.props.option, event);\n  };\n\n  handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n    if (this.props.isFocused) {\n      return;\n    }\n    this.props.onFocus(this.props.option, event);\n  };\n\n  render() {\n    const { option } = this.props;\n    return (\n      <div\n        className={this.props.className}\n        onMouseDown={this.handleMouseDown}\n        onMouseEnter={this.handleMouseEnter}\n        onMouseMove={this.handleMouseMove}\n        role=\"link\"\n        tabIndex={0}\n        title={option.label}>\n        {this.props.children}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport { translate } from '../../../helpers/l10n';\nimport { APPLICATION_EVENT_TYPES, EVENT_TYPES, Query } from '../utils';\nimport ProjectActivityDateInput from './ProjectActivityDateInput';\nimport ProjectActivityEventSelectOption from './ProjectActivityEventSelectOption';\n\ninterface Props {\n  category?: string;\n  from?: Date;\n  project: Pick<T.Component, 'qualifier'>;\n  to?: Date;\n  updateQuery: (changes: Partial<Query>) => void;\n}\n\nexport default class ProjectActivityPageHeader extends React.PureComponent<Props> {\n  handleCategoryChange = (option: { value: string } | null) =>\n    this.props.updateQuery({ category: option ? option.value : '' });\n\n  render() {\n    const isApp = this.props.project.qualifier === 'APP';\n    const eventTypes = isApp ? APPLICATION_EVENT_TYPES : EVENT_TYPES;\n    const options = eventTypes.map(category => ({\n      label: translate('event.category', category),\n      value: category\n    }));\n\n    return (\n      <header className=\"page-header\">\n        {!['VW', 'SVW'].includes(this.props.project.qualifier) && (\n          <Select\n            className={classNames('pull-left big-spacer-right', {\n              'input-medium': !isApp,\n              'input-large': isApp\n            })}\n            clearable={true}\n            onChange={this.handleCategoryChange}\n            optionComponent={ProjectActivityEventSelectOption}\n            options={options}\n            placeholder={translate('project_activity.filter_events') + '...'}\n            searchable={false}\n            value={this.props.category}\n          />\n        )}\n        <ProjectActivityDateInput\n          from={this.props.from}\n          onChange={this.props.updateQuery}\n          to={this.props.to}\n        />\n      </header>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport { parseDate } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport { MeasureHistory } from '../../../types/project-activity';\nimport { Query } from '../utils';\nimport './projectActivity.css';\nimport ProjectActivityAnalysesList from './ProjectActivityAnalysesList';\nimport ProjectActivityGraphs from './ProjectActivityGraphs';\nimport ProjectActivityPageHeader from './ProjectActivityPageHeader';\n\ninterface Props {\n  addCustomEvent: (analysis: string, name: string, category?: string) => Promise<void>;\n  addVersion: (analysis: string, version: string) => Promise<void>;\n  analyses: T.ParsedAnalysis[];\n  analysesLoading: boolean;\n  changeEvent: (event: string, name: string) => Promise<void>;\n  deleteAnalysis: (analysis: string) => Promise<void>;\n  deleteEvent: (analysis: string, event: string) => Promise<void>;\n  graphLoading: boolean;\n  initializing: boolean;\n  project: Pick<T.Component, 'configuration' | 'key' | 'leakPeriodDate' | 'qualifier'>;\n  metrics: T.Metric[];\n  measuresHistory: MeasureHistory[];\n  query: Query;\n  updateQuery: (changes: Partial<Query>) => void;\n}\n\nexport default function ProjectActivityApp(props: Props) {\n  const { analyses, measuresHistory, query } = props;\n  const { configuration } = props.project;\n  const canAdmin =\n    (props.project.qualifier === 'TRK' || props.project.qualifier === 'APP') &&\n    (configuration ? configuration.showHistory : false);\n  const canDeleteAnalyses = configuration ? configuration.showHistory : false;\n  return (\n    <div className=\"page page-limited\" id=\"project-activity\">\n      <Suggestions suggestions=\"project_activity\" />\n      <Helmet defer={false} title={translate('project_activity.page')} />\n\n      <A11ySkipTarget anchor=\"activity_main\" />\n\n      <ProjectActivityPageHeader\n        category={query.category}\n        from={query.from}\n        project={props.project}\n        to={query.to}\n        updateQuery={props.updateQuery}\n      />\n\n      <div className=\"layout-page project-activity-page\">\n        <div className=\"layout-page-side-outer project-activity-page-side-outer boxed-group\">\n          <ProjectActivityAnalysesList\n            addCustomEvent={props.addCustomEvent}\n            addVersion={props.addVersion}\n            analyses={analyses}\n            analysesLoading={props.analysesLoading}\n            canAdmin={canAdmin}\n            canDeleteAnalyses={canDeleteAnalyses}\n            changeEvent={props.changeEvent}\n            deleteAnalysis={props.deleteAnalysis}\n            deleteEvent={props.deleteEvent}\n            initializing={props.initializing}\n            leakPeriodDate={\n              props.project.leakPeriodDate ? parseDate(props.project.leakPeriodDate) : undefined\n            }\n            project={props.project}\n            query={props.query}\n            updateQuery={props.updateQuery}\n          />\n        </div>\n        <div className=\"project-activity-layout-page-main\">\n          <ProjectActivityGraphs\n            analyses={analyses}\n            leakPeriodDate={\n              props.project.leakPeriodDate ? parseDate(props.project.leakPeriodDate) : undefined\n            }\n            loading={props.graphLoading}\n            measuresHistory={measuresHistory}\n            metrics={props.metrics}\n            project={props.project.key}\n            query={query}\n            updateQuery={props.updateQuery}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport * as React from 'react';\nimport { InjectedRouter } from 'react-router';\nimport { getAllMetrics } from '../../../api/metrics';\nimport * as api from '../../../api/projectActivity';\nimport { getAllTimeMachineData } from '../../../api/time-machine';\nimport {\n  DEFAULT_GRAPH,\n  getActivityGraph,\n  getHistoryMetrics,\n  isCustomGraph\n} from '../../../components/activity-graph/utils';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { parseDate } from '../../../helpers/dates';\nimport { BranchLike } from '../../../types/branch-like';\nimport { MetricKey } from '../../../types/metrics';\nimport { GraphType, MeasureHistory } from '../../../types/project-activity';\nimport * as actions from '../actions';\nimport {\n  customMetricsChanged,\n  parseQuery,\n  Query,\n  serializeQuery,\n  serializeUrlQuery\n} from '../utils';\nimport ProjectActivityApp from './ProjectActivityApp';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.Component;\n  location: Location;\n  router: Pick<InjectedRouter, 'push' | 'replace'>;\n}\n\nexport interface State {\n  analyses: T.ParsedAnalysis[];\n  analysesLoading: boolean;\n  graphLoading: boolean;\n  initialized: boolean;\n  metrics: T.Metric[];\n  measuresHistory: MeasureHistory[];\n  query: Query;\n}\n\nexport const PROJECT_ACTIVITY_GRAPH = 'sonar_project_activity.graph';\n\nexport default class ProjectActivityAppContainer extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      analyses: [],\n      analysesLoading: false,\n      graphLoading: true,\n      initialized: false,\n      measuresHistory: [],\n      metrics: [],\n      query: parseQuery(props.location.query)\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    if (this.shouldRedirect()) {\n      const { graph, customGraphs } = getActivityGraph(\n        PROJECT_ACTIVITY_GRAPH,\n        this.props.component.key\n      );\n      const newQuery = { ...this.state.query, graph };\n      if (isCustomGraph(newQuery.graph)) {\n        newQuery.customMetrics = customGraphs;\n      }\n      this.props.router.replace({\n        pathname: this.props.location.pathname,\n        query: {\n          ...serializeUrlQuery(newQuery),\n          ...getBranchLikeQuery(this.props.branchLike)\n        }\n      });\n    } else {\n      this.firstLoadData(this.state.query, this.props.component);\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.location.query !== this.props.location.query) {\n      const query = parseQuery(this.props.location.query);\n      if (query.graph !== this.state.query.graph || customMetricsChanged(this.state.query, query)) {\n        if (this.state.initialized) {\n          this.updateGraphData(query.graph || DEFAULT_GRAPH, query.customMetrics);\n        } else {\n          this.firstLoadData(query, this.props.component);\n        }\n      }\n      this.setState({ query });\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  addCustomEvent = (analysis: string, name: string, category?: string) => {\n    return api.createEvent(analysis, name, category).then(({ analysis, ...event }) => {\n      if (this.mounted) {\n        this.setState(actions.addCustomEvent(analysis, event));\n      }\n    });\n  };\n\n  addVersion = (analysis: string, version: string) => {\n    return this.addCustomEvent(analysis, version, 'VERSION');\n  };\n\n  changeEvent = (event: string, name: string) => {\n    return api.changeEvent(event, name).then(({ analysis, ...event }) => {\n      if (this.mounted) {\n        this.setState(actions.changeEvent(analysis, event));\n      }\n    });\n  };\n\n  deleteAnalysis = (analysis: string) => {\n    return api.deleteAnalysis(analysis).then(() => {\n      if (this.mounted) {\n        this.updateGraphData(\n          this.state.query.graph || DEFAULT_GRAPH,\n          this.state.query.customMetrics\n        );\n        this.setState(actions.deleteAnalysis(analysis));\n      }\n    });\n  };\n\n  deleteEvent = (analysis: string, event: string) => {\n    return api.deleteEvent(event).then(() => {\n      if (this.mounted) {\n        this.setState(actions.deleteEvent(analysis, event));\n      }\n    });\n  };\n\n  fetchActivity = (project: string, p: number, ps: number, additional?: T.RawQuery) => {\n    const parameters = { project, p, ps, ...getBranchLikeQuery(this.props.branchLike) };\n    return api\n      .getProjectActivity({ ...additional, ...parameters })\n      .then(({ analyses, paging }) => ({\n        analyses: analyses.map(analysis => ({\n          ...analysis,\n          date: parseDate(analysis.date)\n        })) as T.ParsedAnalysis[],\n        paging\n      }));\n  };\n\n  fetchMeasuresHistory = (metrics: string[]): Promise<MeasureHistory[]> => {\n    if (metrics.length <= 0) {\n      return Promise.resolve([]);\n    }\n    return getAllTimeMachineData({\n      component: this.props.component.key,\n      metrics: metrics.join(),\n      ...getBranchLikeQuery(this.props.branchLike)\n    }).then(({ measures }) =>\n      measures.map(measure => ({\n        metric: measure.metric,\n        history: measure.history.map(analysis => ({\n          date: parseDate(analysis.date),\n          value: analysis.value!\n        }))\n      }))\n    );\n  };\n\n  fetchAllActivities = (topLevelComponent: string) => {\n    this.setState({ analysesLoading: true });\n    this.loadAllActivities(topLevelComponent).then(\n      ({ analyses }) => {\n        if (this.mounted) {\n          this.setState({\n            analyses,\n            analysesLoading: false\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ analysesLoading: false });\n        }\n      }\n    );\n  };\n\n  loadAllActivities = (\n    project: string,\n    prevResult?: { analyses: T.ParsedAnalysis[]; paging: T.Paging }\n  ): Promise<{ analyses: T.ParsedAnalysis[]; paging: T.Paging }> => {\n    if (\n      prevResult &&\n      prevResult.paging.pageIndex * prevResult.paging.pageSize >= prevResult.paging.total\n    ) {\n      return Promise.resolve(prevResult);\n    }\n    const nextPage = prevResult ? prevResult.paging.pageIndex + 1 : 1;\n    return this.fetchActivity(project, nextPage, 500).then(result => {\n      if (!prevResult) {\n        return this.loadAllActivities(project, result);\n      }\n      return this.loadAllActivities(project, {\n        analyses: prevResult.analyses.concat(result.analyses),\n        paging: result.paging\n      });\n    });\n  };\n\n  getTopLevelComponent = (component: T.Component) => {\n    let current = component.breadcrumbs.length - 1;\n    while (\n      current > 0 &&\n      !['TRK', 'VW', 'APP'].includes(component.breadcrumbs[current].qualifier)\n    ) {\n      current--;\n    }\n    return component.breadcrumbs[current].key;\n  };\n\n  filterMetrics({ qualifier }: T.Component, metrics: T.Metric[]) {\n    return ['VW', 'SVW'].includes(qualifier)\n      ? metrics.filter(metric => metric.key !== MetricKey.security_hotspots_reviewed)\n      : metrics.filter(metric => metric.key !== MetricKey.security_review_rating);\n  }\n\n  firstLoadData(query: Query, component: T.Component) {\n    const graphMetrics = getHistoryMetrics(query.graph || DEFAULT_GRAPH, query.customMetrics);\n    const topLevelComponent = this.getTopLevelComponent(component);\n    Promise.all([\n      this.fetchActivity(topLevelComponent, 1, 100, serializeQuery(query)),\n      getAllMetrics(),\n      this.fetchMeasuresHistory(graphMetrics)\n    ]).then(\n      ([{ analyses }, metrics, measuresHistory]) => {\n        if (this.mounted) {\n          this.setState({\n            analyses,\n            graphLoading: false,\n            initialized: true,\n            measuresHistory,\n            metrics: this.filterMetrics(component, metrics)\n          });\n\n          this.fetchAllActivities(topLevelComponent);\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ initialized: true, graphLoading: false });\n        }\n      }\n    );\n  }\n\n  updateGraphData = (graph: GraphType, customMetrics: string[]) => {\n    const graphMetrics = getHistoryMetrics(graph, customMetrics);\n    this.setState({ graphLoading: true });\n    this.fetchMeasuresHistory(graphMetrics).then(\n      measuresHistory => {\n        if (this.mounted) {\n          this.setState({ graphLoading: false, measuresHistory });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ graphLoading: false, measuresHistory: [] });\n        }\n      }\n    );\n  };\n\n  updateQuery = (newQuery: Query) => {\n    const query = serializeUrlQuery({\n      ...this.state.query,\n      ...newQuery\n    });\n    this.props.router.push({\n      pathname: this.props.location.pathname,\n      query: {\n        ...query,\n        ...getBranchLikeQuery(this.props.branchLike),\n        id: this.props.component.key\n      }\n    });\n  };\n\n  shouldRedirect = () => {\n    const locationQuery = this.props.location.query;\n    if (!locationQuery) {\n      return false;\n    }\n    const filtered = Object.keys(locationQuery).some(\n      key => key !== 'id' && locationQuery[key] !== ''\n    );\n\n    const { graph, customGraphs } = getActivityGraph(\n      PROJECT_ACTIVITY_GRAPH,\n      this.props.component.key\n    );\n    const emptyCustomGraph = isCustomGraph(graph) && customGraphs.length <= 0;\n\n    // if there is no filter, but there are saved preferences in the localStorage\n    // also don't redirect to custom if there is no metrics selected for it\n    return !filtered && graph != null && graph !== DEFAULT_GRAPH && !emptyCustomGraph;\n  };\n\n  render() {\n    if (this.shouldRedirect()) {\n      return null;\n    }\n\n    return (\n      <ProjectActivityApp\n        addCustomEvent={this.addCustomEvent}\n        addVersion={this.addVersion}\n        analyses={this.state.analyses}\n        analysesLoading={this.state.analysesLoading}\n        changeEvent={this.changeEvent}\n        deleteAnalysis={this.deleteAnalysis}\n        deleteEvent={this.deleteEvent}\n        graphLoading={!this.state.initialized || this.state.graphLoading}\n        initializing={!this.state.initialized}\n        measuresHistory={this.state.measuresHistory}\n        metrics={this.state.metrics}\n        project={this.props.component}\n        query={this.state.query}\n        updateQuery={this.updateQuery}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: {\n      component: lazyLoadComponent(() => import('./components/ProjectActivityAppContainer'))\n    }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post } from '../helpers/request';\n\nexport function getNewCodePeriod(data?: {\n  project?: string;\n  branch?: string;\n}): Promise<T.Omit<T.NewCodePeriod, 'effectiveValue'>> {\n  return getJSON('/api/new_code_periods/show', data).catch(throwGlobalError);\n}\n\nexport function setNewCodePeriod(data: {\n  project?: string;\n  branch?: string;\n  type: T.NewCodePeriodSettingType;\n  value?: string;\n}): Promise<void> {\n  return post('/api/new_code_periods/set', data).catch(throwGlobalError);\n}\n\nexport function resetNewCodePeriod(data: { project?: string; branch?: string }): Promise<void> {\n  return post('/api/new_code_periods/unset', data).catch(throwGlobalError);\n}\n\nexport function listBranchesNewCodePeriod(data: {\n  project: string;\n}): Promise<{ newCodePeriods: T.NewCodePeriodBranch[] }> {\n  return getJSON('/api/new_code_periods/list', data).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport function validateDays(days: string) {\n  const parsed = parseInt(days, 10);\n\n  return !(days.length < 1 || isNaN(parsed) || parsed < 1 || String(parsed) !== days);\n}\n\nexport function getSettingValue({\n  analysis,\n  days,\n  referenceBranch,\n  type\n}: {\n  analysis?: string;\n  days?: string;\n  referenceBranch?: string;\n  type?: T.NewCodePeriodSettingType;\n}) {\n  switch (type) {\n    case 'NUMBER_OF_DAYS':\n      return days;\n    case 'REFERENCE_BRANCH':\n      return referenceBranch;\n    case 'SPECIFIC_ANALYSIS':\n      return analysis;\n    default:\n      return undefined;\n  }\n}\n\nexport function validateSetting(state: {\n  analysis?: string;\n  currentSetting?: T.NewCodePeriodSettingType;\n  currentSettingValue?: string;\n  days: string;\n  overrideGeneralSetting?: boolean;\n  referenceBranch?: string;\n  selected?: T.NewCodePeriodSettingType;\n}) {\n  const {\n    analysis = '',\n    currentSetting,\n    currentSettingValue,\n    days,\n    overrideGeneralSetting,\n    referenceBranch = '',\n    selected\n  } = state;\n\n  let isChanged;\n  if (!currentSetting && overrideGeneralSetting !== undefined) {\n    isChanged = overrideGeneralSetting;\n  } else {\n    isChanged =\n      overrideGeneralSetting === false ||\n      selected !== currentSetting ||\n      (selected === 'NUMBER_OF_DAYS' && days !== currentSettingValue) ||\n      (selected === 'SPECIFIC_ANALYSIS' && analysis !== currentSettingValue) ||\n      (selected === 'REFERENCE_BRANCH' && referenceBranch !== currentSettingValue);\n  }\n\n  const isValid =\n    overrideGeneralSetting === false ||\n    selected === 'PREVIOUS_VERSION' ||\n    (selected === 'SPECIFIC_ANALYSIS' && analysis.length > 0) ||\n    (selected === 'NUMBER_OF_DAYS' && validateDays(days)) ||\n    (selected === 'REFERENCE_BRANCH' && referenceBranch.length > 0);\n\n  return { isChanged, isValid };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface AppHeaderProps {\n  canAdmin: boolean;\n}\n\nexport default function AppHeader(props: AppHeaderProps) {\n  const { canAdmin } = props;\n\n  return (\n    <header className=\"page-header\">\n      <h1 className=\"page-title\">{translate('project_baseline.page')}</h1>\n      <p className=\"page-description\">\n        <FormattedMessage\n          defaultMessage={translate('project_baseline.page.description')}\n          id=\"project_baseline.page.description\"\n          values={{\n            link: (\n              <Link to=\"/documentation/project-administration/new-code-period/\">\n                {translate('project_baseline.page.description.link')}\n              </Link>\n            )\n          }}\n        />\n        <br />\n        {canAdmin && (\n          <FormattedMessage\n            defaultMessage={translate('project_baseline.page.description2')}\n            id=\"project_baseline.page.description2\"\n            values={{\n              link: (\n                <Link to=\"/admin/settings?category=new_code_period\">\n                  {translate('project_baseline.page.description2.link')}\n                </Link>\n              )\n            }}\n          />\n        )}\n      </p>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function RecommendedIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M15.089 13.199l-1.742-3.736c-0.962 1.401-2.464 2.398-4.203 2.701l1.459 3.128c0.186 0.4 0.764 0.373 0.914-0.040l0.748-2.054 0.154-0.072 2.054 0.748c0.412 0.151 0.804-0.276 0.618-0.675zM8.040 0.384c-3.003 0-5.446 2.443-5.446 5.446s2.443 5.446 5.446 5.446c3.003 0 5.446-2.443 5.446-5.446s-2.443-5.446-5.446-5.446zM10.689 5.429l-0.966 0.941 0.228 1.33c0.070 0.406-0.358 0.711-0.718 0.522l-1.194-0.628-1.194 0.628c-0.363 0.19-0.788-0.118-0.718-0.522l0.228-1.33-0.966-0.941c-0.293-0.286-0.131-0.786 0.274-0.844l1.335-0.194 0.597-1.209c0.181-0.367 0.707-0.368 0.888 0l0.597 1.209 1.335 0.194c0.405 0.059 0.568 0.558 0.274 0.844zM2.732 9.463l-1.742 3.736c-0.187 0.4 0.208 0.825 0.618 0.674l2.054-0.748 0.154 0.072 0.748 2.054c0.15 0.412 0.727 0.441 0.914 0.040l1.459-3.128c-1.739-0.302-3.241-1.3-4.203-2.701z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { translate } from '../../helpers/l10n';\nimport RecommendedIcon from '../icons/RecommendedIcon';\nimport './Radio.css';\nimport './RadioCard.css';\n\nexport interface RadioCardProps {\n  className?: string;\n  disabled?: boolean;\n  onClick?: () => void;\n  selected?: boolean;\n}\n\ninterface Props extends RadioCardProps {\n  children: React.ReactNode;\n  recommended?: string;\n  title: React.ReactNode;\n  titleInfo?: React.ReactNode;\n  vertical?: boolean;\n}\n\nexport default function RadioCard(props: Props) {\n  const {\n    className,\n    disabled,\n    onClick,\n    recommended,\n    selected,\n    titleInfo,\n    vertical = false\n  } = props;\n  const isActionable = Boolean(onClick);\n  return (\n    <div\n      aria-checked={selected}\n      className={classNames(\n        'radio-card',\n        {\n          'radio-card-actionable': isActionable,\n          'radio-card-vertical': vertical,\n          disabled,\n          selected\n        },\n        className\n      )}\n      onClick={isActionable && !disabled ? onClick : undefined}\n      role=\"radio\"\n      tabIndex={0}>\n      <h2 className=\"radio-card-header big-spacer-bottom\">\n        <span className=\"display-flex-center link-radio\">\n          {isActionable && (\n            <i className={classNames('icon-radio', 'spacer-right', { 'is-checked': selected })} />\n          )}\n          {props.title}\n        </span>\n        {titleInfo}\n      </h2>\n      <div className=\"radio-card-body\">{props.children}</div>\n      {recommended && (\n        <div className=\"radio-card-recommended\">\n          <RecommendedIcon className=\"spacer-right\" />\n          <FormattedMessage\n            defaultMessage={recommended}\n            id={recommended}\n            values={{ recommended: <strong>{translate('recommended')}</strong> }}\n          />\n        </div>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioCard from '../../../components/controls/RadioCard';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface Props {\n  disabled?: boolean;\n  onSelect: (selection: T.NewCodePeriodSettingType) => void;\n  selected: boolean;\n}\n\nexport default function BaselineSettingAnalysis({ disabled, onSelect, selected }: Props) {\n  return (\n    <RadioCard\n      disabled={disabled}\n      onClick={() => onSelect('SPECIFIC_ANALYSIS')}\n      selected={selected}\n      title={translate('baseline.specific_analysis')}>\n      <p className=\"big-spacer-bottom\">{translate('baseline.specific_analysis.description')}</p>\n    </RadioCard>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport AlertErrorIcon from '../icons/AlertErrorIcon';\nimport AlertSuccessIcon from '../icons/AlertSuccessIcon';\nimport MandatoryFieldMarker from '../ui/MandatoryFieldMarker';\nimport HelpTooltip from './HelpTooltip';\n\ninterface Props {\n  description?: React.ReactNode;\n  children: React.ReactNode;\n  className?: string;\n  error: string | undefined;\n  help?: string;\n  id: string;\n  isInvalid: boolean;\n  isValid: boolean;\n  label: React.ReactNode;\n  required?: boolean;\n}\n\nexport default function ValidationInput(props: Props) {\n  const hasError = props.isInvalid && props.error !== undefined;\n  return (\n    <div className={props.className}>\n      <label htmlFor={props.id}>\n        <span className=\"text-middle\">\n          <strong>{props.label}</strong>\n          {props.required && <MandatoryFieldMarker />}\n        </span>\n        {props.help && <HelpTooltip className=\"spacer-left\" overlay={props.help} />}\n      </label>\n      <div className=\"little-spacer-top spacer-bottom\">\n        {props.children}\n        {props.isInvalid && <AlertErrorIcon className=\"spacer-left text-middle\" />}\n        {hasError && (\n          <span className=\"little-spacer-left text-danger text-middle\">{props.error}</span>\n        )}\n        {props.isValid && <AlertSuccessIcon className=\"spacer-left text-middle\" />}\n      </div>\n      {props.description && <div className=\"note abs-width-400\">{props.description}</div>}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioCard from '../../../components/controls/RadioCard';\nimport ValidationInput from '../../../components/controls/ValidationInput';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface Props {\n  className?: string;\n  days: string;\n  disabled?: boolean;\n  isChanged: boolean;\n  isValid: boolean;\n  onChangeDays: (value: string) => void;\n  onSelect: (selection: T.NewCodePeriodSettingType) => void;\n  selected: boolean;\n}\n\nexport default function BaselineSettingDays(props: Props) {\n  const { className, days, disabled, isChanged, isValid, onChangeDays, onSelect, selected } = props;\n  return (\n    <RadioCard\n      className={className}\n      disabled={disabled}\n      onClick={() => onSelect('NUMBER_OF_DAYS')}\n      selected={selected}\n      title={translate('baseline.number_days')}>\n      <>\n        <p className=\"big-spacer-bottom\">{translate('baseline.number_days.description')}</p>\n        {selected && (\n          <>\n            <MandatoryFieldsExplanation />\n\n            <ValidationInput\n              error={undefined}\n              id=\"baseline_number_of_days\"\n              isInvalid={isChanged && !isValid}\n              isValid={isChanged && isValid}\n              label={translate('baseline.specify_days')}\n              required={true}>\n              <input onChange={e => onChangeDays(e.currentTarget.value)} type=\"text\" value={days} />\n            </ValidationInput>\n          </>\n        )}\n      </>\n    </RadioCard>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioCard from '../../../components/controls/RadioCard';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface Props {\n  disabled?: boolean;\n  isDefault?: boolean;\n  onSelect: (selection: T.NewCodePeriodSettingType) => void;\n  selected: boolean;\n}\n\nexport default function BaselineSettingPreviousVersion(props: Props) {\n  const { disabled, isDefault, onSelect, selected } = props;\n  return (\n    <RadioCard\n      disabled={disabled}\n      onClick={() => onSelect('PREVIOUS_VERSION')}\n      selected={selected}\n      title={\n        translate('baseline.previous_version') + (isDefault ? ` (${translate('default')})` : '')\n      }>\n      <p>{translate('baseline.previous_version.description')}</p>\n    </RadioCard>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioCard from '../../../components/controls/RadioCard';\nimport SearchSelect from '../../../components/controls/SearchSelect';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport AlertErrorIcon from '../../../components/icons/AlertErrorIcon';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\nexport interface BaselineSettingReferenceBranchProps {\n  branchList: BranchOption[];\n  className?: string;\n  configuredBranchName?: string;\n  disabled?: boolean;\n  onChangeReferenceBranch: (value: string) => void;\n  onSelect: (selection: T.NewCodePeriodSettingType) => void;\n  referenceBranch: string;\n  selected: boolean;\n  settingLevel: 'project' | 'branch';\n}\n\nexport interface BranchOption {\n  disabled?: boolean;\n  isInvalid?: boolean;\n  isMain: boolean;\n  value: string;\n}\n\nfunction renderBranchOption(option: BranchOption) {\n  return option.isInvalid ? (\n    <Tooltip\n      overlay={translateWithParameters('baseline.reference_branch.does_not_exist', option.value)}>\n      <span>\n        {option.value} <AlertErrorIcon />\n      </span>\n    </Tooltip>\n  ) : (\n    <>\n      <span\n        title={\n          option.disabled ? translate('baseline.reference_branch.cannot_be_itself') : undefined\n        }>\n        {option.value}\n      </span>\n      {option.isMain && (\n        <div className=\"badge spacer-left\">{translate('branches.main_branch')}</div>\n      )}\n    </>\n  );\n}\n\nexport default function BaselineSettingReferenceBranch(props: BaselineSettingReferenceBranchProps) {\n  const { branchList, className, disabled, referenceBranch, selected, settingLevel } = props;\n\n  const currentBranch = branchList.find(b => b.value === referenceBranch) || {\n    value: referenceBranch,\n    isMain: false,\n    isInvalid: true\n  };\n\n  return (\n    <RadioCard\n      className={className}\n      disabled={disabled}\n      onClick={() => props.onSelect('REFERENCE_BRANCH')}\n      selected={selected}\n      title={translate('baseline.reference_branch')}>\n      <>\n        <p>{translate('baseline.reference_branch.description')}</p>\n        {selected && (\n          <>\n            {settingLevel === 'project' && (\n              <p className=\"spacer-top\">{translate('baseline.reference_branch.description2')}</p>\n            )}\n            <div className=\"big-spacer-top display-flex-column\">\n              <MandatoryFieldsExplanation className=\"spacer-bottom\" />\n              <label className=\"text-middle\" htmlFor=\"reference_branch\">\n                <strong>{translate('baseline.reference_branch.choose')}</strong>\n                <MandatoryFieldMarker />\n              </label>\n              <SearchSelect<BranchOption>\n                autofocus={false}\n                className=\"little-spacer-top spacer-bottom\"\n                defaultOptions={branchList}\n                minimumQueryLength={1}\n                onSearch={q => Promise.resolve(branchList.filter(b => b.value.includes(q)))}\n                onSelect={option => props.onChangeReferenceBranch(option.value)}\n                renderOption={renderBranchOption}\n                value={currentBranch}\n              />\n            </div>\n          </>\n        )}\n      </>\n    </RadioCard>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Radio from '../../../components/controls/Radio';\nimport Select from '../../../components/controls/Select';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport DateFormatter from '../../../components/intl/DateFormatter';\nimport TimeFormatter from '../../../components/intl/TimeFormatter';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { parseDate, toShortNotSoISOString } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport Events from '../../projectActivity/components/Events';\nimport { getAnalysesByVersionByDay } from '../../projectActivity/utils';\n\nexport interface BranchAnalysisListRendererProps {\n  analyses: T.ParsedAnalysis[];\n  handleRangeChange: ({ value }: { value: number }) => void;\n  handleScroll: (e: React.SyntheticEvent<HTMLDivElement>) => void;\n  loading: boolean;\n  onSelectAnalysis: (analysis: T.ParsedAnalysis) => void;\n  range: number;\n  registerBadgeNode: (version: string) => (el: HTMLDivElement) => void;\n  registerScrollableNode: (el: HTMLDivElement) => void;\n  selectedAnalysisKey: string;\n  shouldStick: (version: string) => boolean;\n}\n\nfunction renderAnalysis(args: {\n  analysis: T.ParsedAnalysis;\n  isFirst: boolean;\n  onSelectAnalysis: (analysis: T.ParsedAnalysis) => void;\n  selectedAnalysisKey: string;\n}) {\n  const { analysis, isFirst, onSelectAnalysis, selectedAnalysisKey } = args;\n  return (\n    <li\n      className={classNames('branch-analysis', {\n        selected: analysis.key === selectedAnalysisKey\n      })}\n      data-date={parseDate(analysis.date).valueOf()}\n      key={analysis.key}\n      onClick={() => onSelectAnalysis(analysis)}>\n      <div className=\"branch-analysis-time spacer-right\">\n        <TimeFormatter date={parseDate(analysis.date)} long={false}>\n          {formattedTime => (\n            <time className=\"text-middle\" dateTime={parseDate(analysis.date).toISOString()}>\n              {formattedTime}\n            </time>\n          )}\n        </TimeFormatter>\n      </div>\n\n      {analysis.events.length > 0 && (\n        <Events analysisKey={analysis.key} events={analysis.events} isFirst={isFirst} />\n      )}\n\n      <div className=\"analysis-selection-button\">\n        <Radio checked={analysis.key === selectedAnalysisKey} onCheck={() => {}} value=\"\" />\n      </div>\n    </li>\n  );\n}\n\nexport default function BranchAnalysisListRenderer(props: BranchAnalysisListRendererProps) {\n  const { analyses, loading, range, selectedAnalysisKey } = props;\n\n  const byVersionByDay = React.useMemo(\n    () =>\n      getAnalysesByVersionByDay(analyses, {\n        category: ''\n      }),\n    [analyses]\n  );\n\n  const hasFilteredData =\n    byVersionByDay.length > 1 ||\n    (byVersionByDay.length === 1 && Object.keys(byVersionByDay[0].byDay).length > 0);\n\n  return (\n    <>\n      <div className=\"spacer-bottom\">\n        {translate('baseline.analysis_from')}\n        <Select\n          autoBlur={true}\n          className=\"input-medium spacer-left\"\n          clearable={false}\n          onChange={props.handleRangeChange}\n          options={[\n            {\n              label: translate('baseline.branch_analyses.ranges.30days'),\n              value: 30\n            },\n            {\n              label: translate('baseline.branch_analyses.ranges.allTime'),\n              value: 0\n            }\n          ]}\n          searchable={false}\n          value={range}\n        />\n      </div>\n      <div className=\"branch-analysis-list-wrapper\">\n        <div\n          className=\"bordered branch-analysis-list\"\n          onScroll={props.handleScroll}\n          ref={props.registerScrollableNode}>\n          {loading && <DeferredSpinner className=\"big-spacer-top\" />}\n\n          {!loading && !hasFilteredData ? (\n            <div className=\"big-spacer-top big-spacer-bottom strong\">\n              {translate('baseline.no_analyses')}\n            </div>\n          ) : (\n            <ul>\n              {byVersionByDay.map((version, idx) => {\n                const days = Object.keys(version.byDay);\n                if (days.length <= 0) {\n                  return null;\n                }\n                return (\n                  <li key={version.key || 'noversion'}>\n                    {version.version && (\n                      <div\n                        className={classNames('branch-analysis-version-badge', {\n                          first: idx === 0,\n                          sticky: props.shouldStick(version.version)\n                        })}\n                        ref={props.registerBadgeNode(version.version)}>\n                        <Tooltip\n                          mouseEnterDelay={0.5}\n                          overlay={`${translate('version')} ${version.version}`}>\n                          <span className=\"badge\">{version.version}</span>\n                        </Tooltip>\n                      </div>\n                    )}\n                    <ul className=\"branch-analysis-days-list\">\n                      {days.map(day => (\n                        <li\n                          className=\"branch-analysis-day\"\n                          data-day={toShortNotSoISOString(Number(day))}\n                          key={day}>\n                          <div className=\"branch-analysis-date\">\n                            <DateFormatter date={Number(day)} long={true} />\n                          </div>\n                          <ul className=\"branch-analysis-analyses-list\">\n                            {version.byDay[day] != null &&\n                              version.byDay[day].map(analysis =>\n                                renderAnalysis({\n                                  analysis,\n                                  selectedAnalysisKey,\n                                  isFirst: analyses[0].key === analysis.key,\n                                  onSelectAnalysis: props.onSelectAnalysis\n                                })\n                              )}\n                          </ul>\n                        </li>\n                      ))}\n                    </ul>\n                  </li>\n                );\n              })}\n            </ul>\n          )}\n        </div>\n      </div>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { subDays } from 'date-fns';\nimport { throttle } from 'lodash';\nimport * as React from 'react';\nimport { getProjectActivity } from '../../../api/projectActivity';\nimport { parseDate, toShortNotSoISOString } from '../../../helpers/dates';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport BranchAnalysisListRenderer from './BranchAnalysisListRenderer';\n\ninterface Props {\n  analysis: string;\n  branch: string;\n  component: string;\n  onSelectAnalysis: (analysis: T.ParsedAnalysis) => void;\n}\n\ninterface State {\n  analyses: T.ParsedAnalysis[];\n  loading: boolean;\n  range: number;\n  scroll: number;\n}\n\nconst STICKY_BADGE_SCROLL_OFFSET = 10;\n\nexport default class BranchAnalysisList extends React.PureComponent<Props, State> {\n  mounted = false;\n  badges: T.Dict<HTMLDivElement> = {};\n  scrollableNode?: HTMLDivElement;\n  state: State = {\n    analyses: [],\n    loading: true,\n    range: 30,\n    scroll: 0\n  };\n\n  constructor(props: Props) {\n    super(props);\n    this.updateScroll = throttle(this.updateScroll, 20);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchAnalyses(true);\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  scrollToSelected() {\n    const selectedNode = document.querySelector('.branch-analysis.selected');\n    if (this.scrollableNode && selectedNode) {\n      scrollToElement(selectedNode, { parent: this.scrollableNode, bottomOffset: 40 });\n    }\n  }\n\n  fetchAnalyses(initial = false) {\n    const { analysis, branch, component } = this.props;\n    const { range } = this.state;\n    this.setState({ loading: true });\n\n    return getProjectActivity({\n      branch,\n      project: component,\n      from: range ? toShortNotSoISOString(subDays(new Date(), range)) : undefined\n    }).then((result: { analyses: T.Analysis[] }) => {\n      // If the selected analysis wasn't found in the default 30 days range, redo the search\n      if (initial && analysis && !result.analyses.find(a => a.key === analysis)) {\n        this.handleRangeChange({ value: 0 });\n        return;\n      }\n\n      this.setState(\n        {\n          analyses: result.analyses.map(analysis => ({\n            ...analysis,\n            date: parseDate(analysis.date)\n          })) as T.ParsedAnalysis[],\n          loading: false\n        },\n        () => {\n          this.scrollToSelected();\n        }\n      );\n    });\n  }\n\n  handleScroll = (e: React.SyntheticEvent<HTMLDivElement>) => {\n    if (e.currentTarget) {\n      this.updateScroll(e.currentTarget.scrollTop);\n    }\n  };\n\n  updateScroll = (scroll: number) => {\n    this.setState({ scroll });\n  };\n\n  registerBadgeNode = (version: string) => (el: HTMLDivElement) => {\n    if (el) {\n      if (!el.getAttribute('originOffsetTop')) {\n        el.setAttribute('originOffsetTop', String(el.offsetTop));\n      }\n      this.badges[version] = el;\n    }\n  };\n\n  shouldStick = (version: string) => {\n    const badge = this.badges[version];\n    return (\n      !!badge &&\n      Number(badge.getAttribute('originOffsetTop')) < this.state.scroll + STICKY_BADGE_SCROLL_OFFSET\n    );\n  };\n\n  handleRangeChange = ({ value }: { value: number }) => {\n    this.setState({ range: value }, () => this.fetchAnalyses());\n  };\n\n  render() {\n    const { analysis, onSelectAnalysis } = this.props;\n    const { analyses, loading, range } = this.state;\n\n    return (\n      <BranchAnalysisListRenderer\n        analyses={analyses}\n        handleRangeChange={this.handleRangeChange}\n        handleScroll={this.handleScroll}\n        loading={loading}\n        onSelectAnalysis={onSelectAnalysis}\n        range={range}\n        registerBadgeNode={this.registerBadgeNode}\n        registerScrollableNode={el => {\n          this.scrollableNode = el;\n        }}\n        selectedAnalysisKey={analysis}\n        shouldStick={this.shouldStick}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setNewCodePeriod } from '../../../api/newCodePeriod';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { toNotSoISOString } from '../../../helpers/dates';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Branch, BranchWithNewCodePeriod } from '../../../types/branch-like';\nimport { getSettingValue, validateSetting } from '../utils';\nimport BaselineSettingAnalysis from './BaselineSettingAnalysis';\nimport BaselineSettingDays from './BaselineSettingDays';\nimport BaselineSettingPreviousVersion from './BaselineSettingPreviousVersion';\nimport BaselineSettingReferenceBranch from './BaselineSettingReferenceBranch';\nimport BranchAnalysisList from './BranchAnalysisList';\n\ninterface Props {\n  branch: BranchWithNewCodePeriod;\n  branchList: Branch[];\n  component: string;\n  onClose: (branch?: string, newSetting?: T.NewCodePeriod) => void;\n}\n\ninterface State {\n  analysis: string;\n  analysisDate?: Date;\n  days: string;\n  referenceBranch: string;\n  saving: boolean;\n  selected?: T.NewCodePeriodSettingType;\n}\n\nexport default class BranchBaselineSettingModal extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    const otherBranches = props.branchList.filter(b => b.name !== props.branch.name);\n    const defaultBranch = otherBranches.length > 0 ? otherBranches[0].name : '';\n\n    this.state = {\n      analysis: this.getValueFromProps('SPECIFIC_ANALYSIS') || '',\n      days: this.getValueFromProps('NUMBER_OF_DAYS') || '30',\n      referenceBranch: this.getValueFromProps('REFERENCE_BRANCH') || defaultBranch,\n      saving: false,\n      selected: this.props.branch.newCodePeriod && this.props.branch.newCodePeriod.type\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  getValueFromProps(type: T.NewCodePeriodSettingType) {\n    return this.props.branch.newCodePeriod && this.props.branch.newCodePeriod.type === type\n      ? this.props.branch.newCodePeriod.value\n      : null;\n  }\n\n  branchToOption = (b: Branch) => ({\n    value: b.name,\n    isMain: b.isMain,\n    disabled: b.name === this.props.branch.name // cannot itself be used as a reference branch\n  });\n\n  handleSubmit = (e: React.SyntheticEvent<HTMLFormElement>) => {\n    e.preventDefault();\n\n    const { branch, component } = this.props;\n    const { analysis, analysisDate, days, referenceBranch, selected: type } = this.state;\n\n    const value = getSettingValue({ type, analysis, days, referenceBranch });\n\n    if (type) {\n      this.setState({ saving: true });\n      setNewCodePeriod({\n        project: component,\n        type,\n        value,\n        branch: branch.name\n      }).then(\n        () => {\n          this.setState({\n            saving: false\n          });\n          this.props.onClose(branch.name, {\n            type,\n            value,\n            effectiveValue: analysisDate && toNotSoISOString(analysisDate)\n          });\n        },\n        () => {\n          this.setState({\n            saving: false\n          });\n        }\n      );\n    }\n  };\n\n  requestClose = () => this.props.onClose();\n\n  handleSelectAnalysis = (analysis: T.ParsedAnalysis) =>\n    this.setState({ analysis: analysis.key, analysisDate: analysis.date });\n\n  handleSelectDays = (days: string) => this.setState({ days });\n\n  handleSelectReferenceBranch = (referenceBranch: string) => this.setState({ referenceBranch });\n\n  handleSelectSetting = (selected: T.NewCodePeriodSettingType) => this.setState({ selected });\n\n  render() {\n    const { branch, branchList } = this.props;\n    const { analysis, days, referenceBranch, saving, selected } = this.state;\n\n    const header = translateWithParameters('baseline.new_code_period_for_branch_x', branch.name);\n\n    const currentSetting = branch.newCodePeriod && branch.newCodePeriod.type;\n    const currentSettingValue = branch.newCodePeriod && branch.newCodePeriod.value;\n\n    const { isChanged, isValid } = validateSetting({\n      analysis,\n      currentSetting,\n      currentSettingValue,\n      days,\n      referenceBranch,\n      selected\n    });\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.requestClose} size=\"large\">\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n        <form onSubmit={this.handleSubmit}>\n          <div className=\"modal-body modal-container branch-baseline-setting-modal\">\n            <div className=\"display-flex-row huge-spacer-bottom\" role=\"radiogroup\">\n              <BaselineSettingPreviousVersion\n                isDefault={false}\n                onSelect={this.handleSelectSetting}\n                selected={selected === 'PREVIOUS_VERSION'}\n              />\n              <BaselineSettingDays\n                days={days}\n                isChanged={isChanged}\n                isValid={isValid}\n                onChangeDays={this.handleSelectDays}\n                onSelect={this.handleSelectSetting}\n                selected={selected === 'NUMBER_OF_DAYS'}\n              />\n              <BaselineSettingAnalysis\n                onSelect={this.handleSelectSetting}\n                selected={selected === 'SPECIFIC_ANALYSIS'}\n              />\n              <BaselineSettingReferenceBranch\n                branchList={branchList.map(this.branchToOption)}\n                onChangeReferenceBranch={this.handleSelectReferenceBranch}\n                onSelect={this.handleSelectSetting}\n                referenceBranch={referenceBranch}\n                selected={selected === 'REFERENCE_BRANCH'}\n                settingLevel=\"branch\"\n              />\n            </div>\n            {selected === 'SPECIFIC_ANALYSIS' && (\n              <BranchAnalysisList\n                analysis={analysis}\n                branch={branch.name}\n                component={this.props.component}\n                onSelectAnalysis={this.handleSelectAnalysis}\n              />\n            )}\n          </div>\n          <footer className=\"modal-foot\">\n            <DeferredSpinner className=\"spacer-right\" loading={saving} />\n            <SubmitButton disabled={!isChanged || saving || !isValid}>\n              {translate('save')}\n            </SubmitButton>\n            <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BranchIcon from '../../components/icons/BranchIcon';\nimport { IconProps } from '../../components/icons/Icon';\nimport PullRequestIcon from '../../components/icons/PullRequestIcon';\nimport { isPullRequest } from '../../helpers/branch-like';\nimport { BranchLike } from '../../types/branch-like';\n\nexport interface BranchLikeIconProps extends IconProps {\n  branchLike: BranchLike;\n}\n\nexport default function BranchLikeIcon({ branchLike, ...props }: BranchLikeIconProps) {\n  if (isPullRequest(branchLike)) {\n    return <PullRequestIcon {...props} />;\n  }\n  return <BranchIcon {...props} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport BranchLikeIcon from '../../../components/icons/BranchLikeIcon';\nimport WarningIcon from '../../../components/icons/WarningIcon';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { BranchWithNewCodePeriod } from '../../../types/branch-like';\n\nexport interface BranchListRowProps {\n  branch: BranchWithNewCodePeriod;\n  existingBranches: Array<string>;\n  inheritedSetting: T.NewCodePeriod;\n  onOpenEditModal: (branch: BranchWithNewCodePeriod) => void;\n  onResetToDefault: (branchName: string) => void;\n}\n\nfunction renderNewCodePeriodSetting(newCodePeriod: T.NewCodePeriod) {\n  switch (newCodePeriod.type) {\n    case 'SPECIFIC_ANALYSIS':\n      return (\n        <>\n          {`${translate('baseline.specific_analysis')}: `}\n          {newCodePeriod.effectiveValue ? (\n            <DateTimeFormatter date={newCodePeriod.effectiveValue} />\n          ) : (\n            '?'\n          )}\n        </>\n      );\n    case 'NUMBER_OF_DAYS':\n      return `${translate('baseline.number_days')}: ${newCodePeriod.value}`;\n    case 'PREVIOUS_VERSION':\n      return translate('baseline.previous_version');\n    case 'REFERENCE_BRANCH':\n      return `${translate('baseline.reference_branch')}: ${newCodePeriod.value}`;\n    default:\n      return newCodePeriod.type;\n  }\n}\n\nfunction branchInheritsItselfAsReference(\n  branch: BranchWithNewCodePeriod,\n  inheritedSetting: T.NewCodePeriod\n) {\n  return (\n    !branch.newCodePeriod &&\n    inheritedSetting.type === 'REFERENCE_BRANCH' &&\n    branch.name === inheritedSetting.value\n  );\n}\n\nfunction referenceBranchDoesNotExist(\n  branch: BranchWithNewCodePeriod,\n  existingBranches: Array<string>\n) {\n  return (\n    branch.newCodePeriod &&\n    branch.newCodePeriod.value &&\n    branch.newCodePeriod.type === 'REFERENCE_BRANCH' &&\n    !existingBranches.includes(branch.newCodePeriod.value)\n  );\n}\n\nexport default function BranchListRow(props: BranchListRowProps) {\n  const { branch, existingBranches, inheritedSetting } = props;\n\n  let settingWarning: string | undefined;\n  if (branchInheritsItselfAsReference(branch, inheritedSetting)) {\n    settingWarning = translateWithParameters(\n      'baseline.reference_branch.invalid_branch_setting',\n      branch.name\n    );\n  } else if (referenceBranchDoesNotExist(branch, existingBranches)) {\n    settingWarning = translateWithParameters(\n      'baseline.reference_branch.does_not_exist',\n      branch.newCodePeriod?.value || ''\n    );\n  }\n\n  return (\n    <tr className={settingWarning ? 'branch-setting-warning' : ''}>\n      <td className=\"nowrap\">\n        <BranchLikeIcon branchLike={branch} className=\"little-spacer-right\" />\n        {branch.name}\n        {branch.isMain && (\n          <div className=\"badge spacer-left\">{translate('branches.main_branch')}</div>\n        )}\n      </td>\n      <td className=\"huge-spacer-right nowrap\">\n        <Tooltip overlay={settingWarning}>\n          <span>\n            {settingWarning && <WarningIcon className=\"little-spacer-right\" />}\n            {branch.newCodePeriod\n              ? renderNewCodePeriodSetting(branch.newCodePeriod)\n              : translate('branch_list.default_setting')}\n          </span>\n        </Tooltip>\n      </td>\n      <td className=\"text-right\">\n        <ActionsDropdown>\n          <ActionsDropdownItem onClick={() => props.onOpenEditModal(branch)}>\n            {translate('edit')}\n          </ActionsDropdownItem>\n          {branch.newCodePeriod && (\n            <ActionsDropdownItem onClick={() => props.onResetToDefault(branch.name)}>\n              {translate('reset_to_default')}\n            </ActionsDropdownItem>\n          )}\n        </ActionsDropdown>\n      </td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { listBranchesNewCodePeriod, resetNewCodePeriod } from '../../../api/newCodePeriod';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { isBranch, sortBranches } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { Branch, BranchLike, BranchWithNewCodePeriod } from '../../../types/branch-like';\nimport BranchBaselineSettingModal from './BranchBaselineSettingModal';\nimport BranchListRow from './BranchListRow';\n\ninterface Props {\n  branchList: Branch[];\n  component: T.Component;\n  inheritedSetting: T.NewCodePeriod;\n}\n\ninterface State {\n  branches: BranchWithNewCodePeriod[];\n  editedBranch?: BranchWithNewCodePeriod;\n  loading: boolean;\n}\n\nexport default class BranchList extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    branches: [],\n    loading: true\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchBranches();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  sortAndFilterBranches(branchLikes: BranchLike[] = []) {\n    return sortBranches(branchLikes.filter(isBranch));\n  }\n\n  fetchBranches() {\n    const project = this.props.component.key;\n    this.setState({ loading: true });\n\n    listBranchesNewCodePeriod({ project }).then(\n      branchSettings => {\n        const newCodePeriods = branchSettings.newCodePeriods\n          ? branchSettings.newCodePeriods.filter(ncp => !ncp.inherited)\n          : [];\n\n        const branchesWithBaseline = this.props.branchList.map(b => {\n          const newCodePeriod = newCodePeriods.find(ncp => ncp.branchKey === b.name);\n          if (!newCodePeriod) {\n            return b;\n          }\n          const { type = 'PREVIOUS_VERSION', value, effectiveValue } = newCodePeriod;\n          return {\n            ...b,\n            newCodePeriod: { type, value, effectiveValue }\n          };\n        });\n\n        this.setState({ branches: branchesWithBaseline, loading: false });\n      },\n      () => {\n        this.setState({ loading: false });\n      }\n    );\n  }\n\n  updateBranchNewCodePeriod = (branch: string, newSetting: T.NewCodePeriod | undefined) => {\n    const { branches } = this.state;\n\n    const updated = branches.find(b => b.name === branch);\n    if (updated) {\n      updated.newCodePeriod = newSetting;\n    }\n    return branches.slice(0);\n  };\n\n  openEditModal = (branch: BranchWithNewCodePeriod) => {\n    this.setState({ editedBranch: branch });\n  };\n\n  closeEditModal = (branch?: string, newSetting?: T.NewCodePeriod) => {\n    if (branch) {\n      this.setState({\n        branches: this.updateBranchNewCodePeriod(branch, newSetting),\n        editedBranch: undefined\n      });\n    } else {\n      this.setState({ editedBranch: undefined });\n    }\n  };\n\n  resetToDefault = (branch: string) => {\n    return resetNewCodePeriod({\n      project: this.props.component.key,\n      branch\n    }).then(() => {\n      this.setState({ branches: this.updateBranchNewCodePeriod(branch, undefined) });\n    });\n  };\n\n  render() {\n    const { branchList, inheritedSetting } = this.props;\n    const { branches, editedBranch, loading } = this.state;\n\n    if (branches.length < 1) {\n      return null;\n    }\n\n    if (loading) {\n      return <DeferredSpinner />;\n    }\n\n    return (\n      <>\n        <table className=\"data zebra\">\n          <thead>\n            <tr>\n              <th>{translate('branch_list.branch')}</th>\n              <th className=\"nowrap huge-spacer-right\">\n                {translate('branch_list.current_setting')}\n              </th>\n              <th className=\"thin nowrap\">{translate('branch_list.actions')}</th>\n            </tr>\n          </thead>\n          <tbody>\n            {branches.map(branch => (\n              <BranchListRow\n                branch={branch}\n                existingBranches={branchList.map(b => b.name)}\n                inheritedSetting={inheritedSetting}\n                key={branch.name}\n                onOpenEditModal={this.openEditModal}\n                onResetToDefault={this.resetToDefault}\n              />\n            ))}\n          </tbody>\n        </table>\n        {editedBranch && (\n          <BranchBaselineSettingModal\n            branch={editedBranch}\n            branchList={branchList}\n            component={this.props.component.key}\n            onClose={this.closeEditModal}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Radio from '../../../components/controls/Radio';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Branch } from '../../../types/branch-like';\nimport { validateSetting } from '../utils';\nimport BaselineSettingAnalysis from './BaselineSettingAnalysis';\nimport BaselineSettingDays from './BaselineSettingDays';\nimport BaselineSettingPreviousVersion from './BaselineSettingPreviousVersion';\nimport BaselineSettingReferenceBranch from './BaselineSettingReferenceBranch';\nimport BranchAnalysisList from './BranchAnalysisList';\n\nexport interface ProjectBaselineSelectorProps {\n  analysis?: string;\n  branch: Branch;\n  branchList: Branch[];\n  branchesEnabled?: boolean;\n  component: string;\n  currentSetting?: T.NewCodePeriodSettingType;\n  currentSettingValue?: string;\n  days: string;\n  generalSetting: T.NewCodePeriod;\n  onCancel: () => void;\n  onSelectAnalysis: (analysis: T.ParsedAnalysis) => void;\n  onSelectDays: (value: string) => void;\n  onSelectReferenceBranch: (value: string) => void;\n  onSelectSetting: (value?: T.NewCodePeriodSettingType) => void;\n  onSubmit: (e: React.SyntheticEvent<HTMLFormElement>) => void;\n  onToggleSpecificSetting: (selection: boolean) => void;\n  referenceBranch?: string;\n  saving: boolean;\n  selected?: T.NewCodePeriodSettingType;\n  overrideGeneralSetting: boolean;\n}\n\nfunction renderGeneralSetting(generalSetting: T.NewCodePeriod) {\n  let setting: string;\n  let description: string;\n  if (generalSetting.type === 'NUMBER_OF_DAYS') {\n    setting = `${translate('baseline.number_days')} (${translateWithParameters(\n      'duration.days',\n      generalSetting.value || '?'\n    )})`;\n    description = translate('baseline.number_days.description');\n  } else {\n    setting = translate('baseline.previous_version');\n    description = translate('baseline.previous_version.description');\n  }\n\n  return (\n    <div className=\"general-setting\">\n      <strong>{setting}</strong>: {description}\n    </div>\n  );\n}\n\nfunction branchToOption(b: Branch) {\n  return { value: b.name, isMain: b.isMain };\n}\n\nexport default function ProjectBaselineSelector(props: ProjectBaselineSelectorProps) {\n  const {\n    analysis,\n    branch,\n    branchList,\n    branchesEnabled,\n    component,\n    currentSetting,\n    currentSettingValue,\n    days,\n    generalSetting,\n    overrideGeneralSetting,\n    referenceBranch,\n    saving,\n    selected\n  } = props;\n\n  const { isChanged, isValid } = validateSetting({\n    analysis,\n    currentSetting,\n    currentSettingValue,\n    days,\n    overrideGeneralSetting,\n    referenceBranch,\n    selected\n  });\n\n  return (\n    <form className=\"project-baseline-selector\" onSubmit={props.onSubmit}>\n      <div className=\"big-spacer-top spacer-bottom\" role=\"radiogroup\">\n        <Radio\n          checked={!overrideGeneralSetting}\n          className=\"big-spacer-bottom\"\n          onCheck={() => props.onToggleSpecificSetting(false)}\n          value=\"general\">\n          {translate('project_baseline.general_setting')}\n        </Radio>\n        <div className=\"big-spacer-left\">{renderGeneralSetting(generalSetting)}</div>\n\n        <Radio\n          checked={overrideGeneralSetting}\n          className=\"huge-spacer-top\"\n          onCheck={() => props.onToggleSpecificSetting(true)}\n          value=\"specific\">\n          {translate('project_baseline.specific_setting')}\n        </Radio>\n      </div>\n\n      <div className=\"big-spacer-left big-spacer-right project-baseline-setting\">\n        <div className=\"display-flex-row big-spacer-bottom\" role=\"radiogroup\">\n          <BaselineSettingPreviousVersion\n            disabled={!overrideGeneralSetting}\n            onSelect={props.onSelectSetting}\n            selected={overrideGeneralSetting && selected === 'PREVIOUS_VERSION'}\n          />\n          <BaselineSettingDays\n            days={days}\n            disabled={!overrideGeneralSetting}\n            isChanged={isChanged}\n            isValid={isValid}\n            onChangeDays={props.onSelectDays}\n            onSelect={props.onSelectSetting}\n            selected={overrideGeneralSetting && selected === 'NUMBER_OF_DAYS'}\n          />\n          {branchesEnabled ? (\n            <BaselineSettingReferenceBranch\n              branchList={branchList.map(branchToOption)}\n              disabled={!overrideGeneralSetting}\n              onChangeReferenceBranch={props.onSelectReferenceBranch}\n              onSelect={props.onSelectSetting}\n              referenceBranch={referenceBranch || ''}\n              selected={overrideGeneralSetting && selected === 'REFERENCE_BRANCH'}\n              settingLevel=\"project\"\n            />\n          ) : (\n            <BaselineSettingAnalysis\n              disabled={!overrideGeneralSetting}\n              onSelect={props.onSelectSetting}\n              selected={overrideGeneralSetting && selected === 'SPECIFIC_ANALYSIS'}\n            />\n          )}\n        </div>\n        {selected === 'SPECIFIC_ANALYSIS' && (\n          <BranchAnalysisList\n            analysis={analysis || ''}\n            branch={branch.name}\n            component={component}\n            onSelectAnalysis={props.onSelectAnalysis}\n          />\n        )}\n      </div>\n      <div className={classNames('big-spacer-top', { invisible: !isChanged })}>\n        <Alert variant=\"info\" className=\"spacer-bottom\">\n          {translate('baseline.next_analysis_notice')}\n        </Alert>\n        <DeferredSpinner className=\"spacer-right\" loading={saving} />\n        <SubmitButton disabled={saving || !isValid || !isChanged}>{translate('save')}</SubmitButton>\n        <ResetButtonLink className=\"spacer-left\" onClick={props.onCancel}>\n          {translate('cancel')}\n        </ResetButtonLink>\n      </div>\n    </form>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { getNewCodePeriod, resetNewCodePeriod, setNewCodePeriod } from '../../../api/newCodePeriod';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { isBranch, sortBranches } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { Branch, BranchLike } from '../../../types/branch-like';\nimport '../styles.css';\nimport { getSettingValue } from '../utils';\nimport AppHeader from './AppHeader';\nimport BranchList from './BranchList';\nimport ProjectBaselineSelector from './ProjectBaselineSelector';\n\ninterface Props {\n  branchLike: Branch;\n  branchLikes: BranchLike[];\n  branchesEnabled?: boolean;\n  canAdmin?: boolean;\n  component: T.Component;\n}\n\ninterface State {\n  analysis?: string;\n  branchList: Branch[];\n  currentSetting?: T.NewCodePeriodSettingType;\n  currentSettingValue?: string;\n  days: string;\n  generalSetting?: T.NewCodePeriod;\n  loading: boolean;\n  overrideGeneralSetting?: boolean;\n  referenceBranch?: string;\n  saving: boolean;\n  selected?: T.NewCodePeriodSettingType;\n  success?: boolean;\n}\n\nconst DEFAULT_NUMBER_OF_DAYS = '30';\n\nconst DEFAULT_GENERAL_SETTING: { type: T.NewCodePeriodSettingType } = {\n  type: 'PREVIOUS_VERSION'\n};\n\nexport default class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    branchList: [],\n    days: DEFAULT_NUMBER_OF_DAYS,\n    loading: true,\n    saving: false\n  };\n\n  // We use debounce as we could have multiple save in less that 3sec.\n  resetSuccess = debounce(() => this.setState({ success: undefined }), 3000);\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchLeakPeriodSetting();\n    this.sortAndFilterBranches(this.props.branchLikes);\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.branchLikes !== this.props.branchLikes) {\n      this.sortAndFilterBranches(this.props.branchLikes);\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  getUpdatedState(params: {\n    currentSetting?: T.NewCodePeriodSettingType;\n    currentSettingValue?: string;\n    generalSetting: T.NewCodePeriod;\n  }) {\n    const { currentSetting, currentSettingValue, generalSetting } = params;\n    const { referenceBranch } = this.state;\n\n    const defaultDays =\n      (generalSetting.type === 'NUMBER_OF_DAYS' && generalSetting.value) || DEFAULT_NUMBER_OF_DAYS;\n\n    return {\n      loading: false,\n      currentSetting,\n      currentSettingValue,\n      generalSetting,\n      selected: currentSetting || generalSetting.type,\n      overrideGeneralSetting: Boolean(currentSetting),\n      days: (currentSetting === 'NUMBER_OF_DAYS' && currentSettingValue) || defaultDays,\n      analysis: (currentSetting === 'SPECIFIC_ANALYSIS' && currentSettingValue) || '',\n      referenceBranch:\n        (currentSetting === 'REFERENCE_BRANCH' && currentSettingValue) || referenceBranch\n    };\n  }\n\n  sortAndFilterBranches(branchLikes: BranchLike[] = []) {\n    const branchList = sortBranches(branchLikes.filter(isBranch));\n    this.setState({ branchList, referenceBranch: branchList[0].name });\n  }\n\n  fetchLeakPeriodSetting() {\n    const { branchLike, branchesEnabled, component } = this.props;\n\n    this.setState({ loading: true });\n\n    Promise.all([\n      getNewCodePeriod(),\n      getNewCodePeriod({\n        branch: branchesEnabled ? undefined : branchLike.name,\n        project: component.key\n      })\n    ]).then(\n      ([generalSetting, setting]) => {\n        if (this.mounted) {\n          if (!generalSetting.type) {\n            generalSetting = DEFAULT_GENERAL_SETTING;\n          }\n          const currentSettingValue = setting.value;\n          const currentSetting = setting.inherited ? undefined : setting.type || 'PREVIOUS_VERSION';\n\n          this.setState(\n            this.getUpdatedState({\n              generalSetting,\n              currentSetting,\n              currentSettingValue\n            })\n          );\n        }\n      },\n      () => {\n        this.setState({ loading: false });\n      }\n    );\n  }\n\n  resetSetting = () => {\n    this.setState({ saving: true });\n    resetNewCodePeriod({ project: this.props.component.key }).then(\n      () => {\n        this.setState({\n          saving: false,\n          currentSetting: undefined,\n          selected: undefined,\n          success: true\n        });\n        this.resetSuccess();\n      },\n      () => {\n        this.setState({ saving: false });\n      }\n    );\n  };\n\n  handleSelectAnalysis = (analysis: T.ParsedAnalysis) => this.setState({ analysis: analysis.key });\n\n  handleSelectDays = (days: string) => this.setState({ days });\n\n  handleSelectReferenceBranch = (referenceBranch: string) => {\n    this.setState({ referenceBranch });\n  };\n\n  handleCancel = () =>\n    this.setState(\n      ({ generalSetting = DEFAULT_GENERAL_SETTING, currentSetting, currentSettingValue }) =>\n        this.getUpdatedState({ generalSetting, currentSetting, currentSettingValue })\n    );\n\n  handleSelectSetting = (selected?: T.NewCodePeriodSettingType) => this.setState({ selected });\n\n  handleToggleSpecificSetting = (overrideGeneralSetting: boolean) =>\n    this.setState({ overrideGeneralSetting });\n\n  handleSubmit = (e: React.SyntheticEvent<HTMLFormElement>) => {\n    e.preventDefault();\n\n    const { component } = this.props;\n    const { analysis, days, selected: type, referenceBranch, overrideGeneralSetting } = this.state;\n\n    if (!overrideGeneralSetting) {\n      this.resetSetting();\n      return;\n    }\n\n    const value = getSettingValue({ type, analysis, days, referenceBranch });\n\n    if (type) {\n      this.setState({ saving: true });\n      setNewCodePeriod({\n        project: component.key,\n        type,\n        value\n      }).then(\n        () => {\n          this.setState({\n            saving: false,\n            currentSetting: type,\n            currentSettingValue: value || undefined,\n            success: true\n          });\n          this.resetSuccess();\n        },\n        () => {\n          this.setState({ saving: false });\n        }\n      );\n    }\n  };\n\n  render() {\n    const { branchesEnabled, canAdmin, component, branchLike } = this.props;\n    const {\n      analysis,\n      branchList,\n      currentSetting,\n      days,\n      generalSetting,\n      loading,\n      currentSettingValue,\n      overrideGeneralSetting,\n      referenceBranch,\n      saving,\n      selected,\n      success\n    } = this.state;\n\n    return (\n      <>\n        <Suggestions suggestions=\"project_baseline\" />\n        <div className=\"page page-limited\">\n          <AppHeader canAdmin={!!canAdmin} />\n          {loading ? (\n            <DeferredSpinner />\n          ) : (\n            <div className=\"panel-white project-baseline\">\n              {branchesEnabled && <h2>{translate('project_baseline.default_setting')}</h2>}\n\n              {generalSetting && overrideGeneralSetting !== undefined && (\n                <ProjectBaselineSelector\n                  analysis={analysis}\n                  branch={branchLike}\n                  branchList={branchList}\n                  branchesEnabled={branchesEnabled}\n                  component={component.key}\n                  currentSetting={currentSetting}\n                  currentSettingValue={currentSettingValue}\n                  days={days}\n                  generalSetting={generalSetting}\n                  onCancel={this.handleCancel}\n                  onSelectAnalysis={this.handleSelectAnalysis}\n                  onSelectDays={this.handleSelectDays}\n                  onSelectReferenceBranch={this.handleSelectReferenceBranch}\n                  onSelectSetting={this.handleSelectSetting}\n                  onSubmit={this.handleSubmit}\n                  onToggleSpecificSetting={this.handleToggleSpecificSetting}\n                  overrideGeneralSetting={overrideGeneralSetting}\n                  referenceBranch={referenceBranch}\n                  saving={saving}\n                  selected={selected}\n                />\n              )}\n\n              <div className={classNames('spacer-top', { invisible: saving || !success })}>\n                <span className=\"text-success\">\n                  <AlertSuccessIcon className=\"spacer-right\" />\n                  {translate('settings.state.saved')}\n                </span>\n              </div>\n              {generalSetting && branchesEnabled && (\n                <div className=\"huge-spacer-top branch-baseline-selector\">\n                  <hr />\n                  <h2>{translate('project_baseline.configure_branches')}</h2>\n                  <BranchList\n                    branchList={branchList}\n                    component={component}\n                    inheritedSetting={\n                      currentSetting\n                        ? {\n                            type: currentSetting,\n                            value: currentSettingValue\n                          }\n                        : generalSetting\n                    }\n                  />\n                </div>\n              )}\n            </div>\n          )}\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { getAppState, Store } from '../../../store/rootReducer';\nimport App from './App';\n\nconst mapStateToProps = (state: Store) => ({\n  branchesEnabled: getAppState(state).branchesEnabled,\n  canAdmin: getAppState(state).canAdmin\n});\n\nexport default connect(mapStateToProps)(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/AppContainer')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport Level from '../../components/ui/Level';\nimport { getBranchStatusByBranchLike, Store } from '../../store/rootReducer';\nimport { BranchLike } from '../../types/branch-like';\n\ninterface ExposedProps {\n  branchLike: BranchLike;\n  component: string;\n}\n\ninterface BranchStatusProps {\n  status?: string;\n}\n\nexport function BranchStatus({ status }: BranchStatusProps) {\n  if (!status) {\n    return null;\n  }\n\n  return <Level level={status} small={true} />;\n}\n\nconst mapStateToProps = (state: Store, props: ExposedProps) => {\n  const { branchLike, component } = props;\n  const { status } = getBranchStatusByBranchLike(state, component, branchLike);\n  return { status };\n};\n\nexport default connect(mapStateToProps)(BranchStatus);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport CheckIcon from '../icons/CheckIcon';\nimport { Button } from './buttons';\nimport './Toggle.css';\n\ninterface Props {\n  disabled?: boolean;\n  name?: string;\n  onChange?: (value: boolean) => void;\n  value: boolean | string;\n}\n\nexport default class Toggle extends React.PureComponent<Props> {\n  getValue = () => {\n    const { value } = this.props;\n    return typeof value === 'string' ? value === 'true' : value;\n  };\n\n  handleClick = () => {\n    if (this.props.onChange) {\n      const value = this.getValue();\n      this.props.onChange(!value);\n    }\n  };\n\n  render() {\n    const { disabled, name } = this.props;\n    const value = this.getValue();\n    const className = classNames('boolean-toggle', { 'boolean-toggle-on': value });\n\n    return (\n      <Button className={className} disabled={disabled} name={name} onClick={this.handleClick}>\n        <div aria-label={translate(value ? 'on' : 'off')} className=\"boolean-toggle-handle\">\n          <CheckIcon size={12} />\n        </div>\n      </Button>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { excludeBranchFromPurge } from '../../../api/branches';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport Toggle from '../../../components/controls/Toggle';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { isMainBranch } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { Branch } from '../../../types/branch-like';\n\ninterface Props {\n  branch: Branch;\n  component: T.Component;\n}\n\ninterface State {\n  excludedFromPurge: boolean;\n  loading: boolean;\n}\n\nexport default class BranchPurgeSetting extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = { excludedFromPurge: props.branch.excludedFromPurge, loading: false };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleOnChange = () => {\n    const { branch, component } = this.props;\n    const { excludedFromPurge } = this.state;\n    const newValue = !excludedFromPurge;\n\n    this.setState({ loading: true });\n\n    excludeBranchFromPurge(component.key, branch.name, newValue)\n      .then(() => {\n        if (this.mounted) {\n          this.setState({\n            excludedFromPurge: newValue,\n            loading: false\n          });\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      });\n  };\n\n  render() {\n    const { branch } = this.props;\n    const { excludedFromPurge, loading } = this.state;\n\n    const isTheMainBranch = isMainBranch(branch);\n    const disabled = isTheMainBranch || loading;\n\n    return (\n      <>\n        <Toggle disabled={disabled} onChange={this.handleOnChange} value={excludedFromPurge} />\n        <span className=\"spacer-left\">\n          <DeferredSpinner loading={loading} />\n        </span>\n        {isTheMainBranch && (\n          <HelpTooltip\n            overlay={translate(\n              'project_branch_pull_request.branch.auto_deletion.main_branch_tooltip'\n            )}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BranchStatus from '../../../components/common/BranchStatus';\nimport ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown';\nimport BranchLikeIcon from '../../../components/icons/BranchLikeIcon';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport {\n  getBranchLikeDisplayName,\n  isBranch,\n  isMainBranch,\n  isPullRequest\n} from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport BranchPurgeSetting from './BranchPurgeSetting';\n\nexport interface BranchLikeRowProps {\n  branchLike: BranchLike;\n  component: T.Component;\n  displayPurgeSetting?: boolean;\n  onDelete: () => void;\n  onRename: () => void;\n}\n\nexport function BranchLikeRow(props: BranchLikeRowProps) {\n  const { branchLike, component, displayPurgeSetting, onDelete, onRename } = props;\n  const branchLikeDisplayName = getBranchLikeDisplayName(branchLike);\n\n  return (\n    <tr>\n      <td className=\"nowrap hide-overflow\">\n        <BranchLikeIcon branchLike={branchLike} className=\"little-spacer-right\" />\n        <span title={branchLikeDisplayName}>{branchLikeDisplayName}</span>\n        <span>\n          {isMainBranch(branchLike) && (\n            <div className=\"badge spacer-left\">{translate('branches.main_branch')}</div>\n          )}\n        </span>\n      </td>\n      <td className=\"nowrap\">\n        <BranchStatus branchLike={branchLike} component={component.key} />\n      </td>\n      <td className=\"nowrap\">{<DateFromNow date={branchLike.analysisDate} />}</td>\n      {displayPurgeSetting && isBranch(branchLike) && (\n        <td className=\"nowrap js-test-purge-toggle-container\">\n          <BranchPurgeSetting branch={branchLike} component={component} />\n        </td>\n      )}\n      <td className=\"nowrap\">\n        <ActionsDropdown>\n          {isMainBranch(branchLike) ? (\n            <ActionsDropdownItem className=\"js-rename\" onClick={onRename}>\n              {translate('project_branch_pull_request.branch.rename')}\n            </ActionsDropdownItem>\n          ) : (\n            <ActionsDropdownItem className=\"js-delete\" destructive={true} onClick={onDelete}>\n              {translate(\n                isPullRequest(branchLike)\n                  ? 'project_branch_pull_request.pull_request.delete'\n                  : 'project_branch_pull_request.branch.delete'\n              )}\n            </ActionsDropdownItem>\n          )}\n        </ActionsDropdown>\n      </td>\n    </tr>\n  );\n}\n\nexport default React.memo(BranchLikeRow);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { getBranchLikeKey } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport BranchLikeRow from './BranchLikeRow';\n\nexport interface BranchLikeTableProps {\n  branchLikes: BranchLike[];\n  component: T.Component;\n  displayPurgeSetting?: boolean;\n  onDelete: (branchLike: BranchLike) => void;\n  onRename: (branchLike: BranchLike) => void;\n  title: string;\n}\n\nexport function BranchLikeTable(props: BranchLikeTableProps) {\n  const { branchLikes, component, displayPurgeSetting, onDelete, onRename, title } = props;\n\n  return (\n    <div className=\"boxed-group boxed-group-inner\">\n      <table className=\"data zebra zebra-hover fixed\">\n        <thead>\n          <tr>\n            <th className=\"nowrap\">{title}</th>\n            <th className=\"nowrap\" style={{ width: '80px' }}>\n              {translate('status')}\n            </th>\n            <th className=\"nowrap\" style={{ width: '140px' }}>\n              {translate('project_branch_pull_request.last_analysis_date')}\n            </th>\n            {displayPurgeSetting && (\n              <th className=\"nowrap\" style={{ width: '150px' }}>\n                <div className=\"display-flex-center\">\n                  <span>\n                    {translate(\n                      'project_branch_pull_request.branch.auto_deletion.keep_when_inactive'\n                    )}\n                  </span>\n                  <HelpTooltip\n                    className=\"little-spacer-left\"\n                    overlay={translate(\n                      'project_branch_pull_request.branch.auto_deletion.keep_when_inactive.tooltip'\n                    )}\n                  />\n                </div>\n              </th>\n            )}\n            <th className=\"nowrap\" style={{ width: '50px' }}>\n              {translate('actions')}\n            </th>\n          </tr>\n        </thead>\n        <tbody>\n          {branchLikes.map(branchLike => (\n            <BranchLikeRow\n              branchLike={branchLike}\n              component={component}\n              displayPurgeSetting={displayPurgeSetting}\n              key={getBranchLikeKey(branchLike)}\n              onDelete={() => onDelete(branchLike)}\n              onRename={() => onRename(branchLike)}\n            />\n          ))}\n        </tbody>\n      </table>\n    </div>\n  );\n}\n\nexport default React.memo(BranchLikeTable);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { deleteBranch, deletePullRequest } from '../../../api/branches';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { getBranchLikeDisplayName, isPullRequest } from '../../../helpers/branch-like';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\n\ninterface Props {\n  branchLike: BranchLike;\n  component: T.Component;\n  onClose: () => void;\n  onDelete: () => void;\n}\n\ninterface State {\n  loading: boolean;\n}\n\nexport default class DeleteBranchModal extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ loading: true });\n    const request = isPullRequest(this.props.branchLike)\n      ? deletePullRequest({\n          project: this.props.component.key,\n          pullRequest: this.props.branchLike.key\n        })\n      : deleteBranch({\n          branch: this.props.branchLike.name,\n          project: this.props.component.key\n        });\n    request.then(\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n          this.props.onDelete();\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  render() {\n    const { branchLike } = this.props;\n    const header = translate(\n      isPullRequest(branchLike)\n        ? 'project_branch_pull_request.pull_request.delete'\n        : 'project_branch_pull_request.branch.delete'\n    );\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n        <form onSubmit={this.handleSubmit}>\n          <div className=\"modal-body\">\n            {translateWithParameters(\n              isPullRequest(branchLike)\n                ? 'project_branch_pull_request.pull_request.delete.are_you_sure'\n                : 'project_branch_pull_request.branch.delete.are_you_sure',\n              getBranchLikeDisplayName(branchLike)\n            )}\n          </div>\n          <footer className=\"modal-foot\">\n            {this.state.loading && <i className=\"spinner spacer-right\" />}\n            <SubmitButton className=\"button-red\" disabled={this.state.loading}>\n              {translate('delete')}\n            </SubmitButton>\n            <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { renameBranch } from '../../../api/branches';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\nimport { MainBranch } from '../../../types/branch-like';\n\ninterface Props {\n  branch: MainBranch;\n  component: T.Component;\n  onClose: () => void;\n  onRename: () => void;\n}\n\ninterface State {\n  loading: boolean;\n  name?: string;\n}\n\nexport default class RenameBranchModal extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    if (!this.state.name) {\n      return;\n    }\n    this.setState({ loading: true });\n    renameBranch(this.props.component.key, this.state.name).then(\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n          this.props.onRename();\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleNameChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  render() {\n    const { branch } = this.props;\n    const header = translate('project_branch_pull_request.branch.rename');\n    const submitDisabled =\n      this.state.loading || !this.state.name || this.state.name === branch.name;\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose} size=\"small\">\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n        <form onSubmit={this.handleSubmit}>\n          <div className=\"modal-body\">\n            <MandatoryFieldsExplanation className=\"modal-field\" />\n            <div className=\"modal-field\">\n              <label htmlFor=\"rename-branch-name\">\n                {translate('new_name')}\n                <MandatoryFieldMarker />\n              </label>\n              <input\n                autoFocus={true}\n                id=\"rename-branch-name\"\n                maxLength={100}\n                name=\"name\"\n                onChange={this.handleNameChange}\n                required={true}\n                size={50}\n                type=\"text\"\n                value={this.state.name !== undefined ? this.state.name : branch.name}\n              />\n            </div>\n          </div>\n          <footer className=\"modal-foot\">\n            {this.state.loading && <i className=\"spinner spacer-right\" />}\n            <SubmitButton disabled={submitDisabled}>{translate('rename')}</SubmitButton>\n            <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BoxedTabs from '../../../components/controls/BoxedTabs';\nimport BranchIcon from '../../../components/icons/BranchIcon';\nimport PullRequestIcon from '../../../components/icons/PullRequestIcon';\nimport {\n  isBranch,\n  isMainBranch,\n  isPullRequest,\n  sortBranches,\n  sortPullRequests\n} from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport BranchLikeTable from './BranchLikeTable';\nimport DeleteBranchModal from './DeleteBranchModal';\nimport RenameBranchModal from './RenameBranchModal';\n\ninterface Props {\n  branchLikes: BranchLike[];\n  component: T.Component;\n  onBranchesChange: () => void;\n}\n\ninterface State {\n  currentTab: Tabs;\n  deleting?: BranchLike;\n  renaming?: BranchLike;\n}\n\nexport enum Tabs {\n  Branch,\n  PullRequest\n}\n\nconst TABS = [\n  {\n    key: Tabs.Branch,\n    label: (\n      <>\n        <BranchIcon />\n        <span className=\"spacer-left\">\n          {translate('project_branch_pull_request.tabs.branches')}\n        </span>\n      </>\n    )\n  },\n  {\n    key: Tabs.PullRequest,\n    label: (\n      <>\n        <PullRequestIcon />\n        <span className=\"spacer-left\">\n          {translate('project_branch_pull_request.tabs.pull_requests')}\n        </span>\n      </>\n    )\n  }\n];\n\nexport default class BranchLikeTabs extends React.PureComponent<Props, State> {\n  state: State = { currentTab: Tabs.Branch };\n\n  onTabSelect = (currentTab: Tabs) => {\n    this.setState({ currentTab });\n  };\n\n  onDeleteBranchLike = (branchLike: BranchLike) => this.setState({ deleting: branchLike });\n\n  onRenameBranchLike = (branchLike: BranchLike) => this.setState({ renaming: branchLike });\n\n  onClose = () => this.setState({ deleting: undefined, renaming: undefined });\n\n  onModalActionFulfilled = () => {\n    this.onClose();\n    this.props.onBranchesChange();\n  };\n\n  render() {\n    const { branchLikes, component } = this.props;\n    const { currentTab, deleting, renaming } = this.state;\n\n    const isBranchMode = currentTab === Tabs.Branch;\n    const branchLikesToDisplay: BranchLike[] = isBranchMode\n      ? sortBranches(branchLikes.filter(isBranch))\n      : sortPullRequests(branchLikes.filter(isPullRequest));\n    const title = translate(\n      isBranchMode\n        ? 'project_branch_pull_request.table.branch'\n        : 'project_branch_pull_request.table.pull_request'\n    );\n\n    return (\n      <>\n        <BoxedTabs\n          className=\"branch-like-tabs\"\n          onSelect={this.onTabSelect}\n          selected={currentTab}\n          tabs={TABS}\n        />\n\n        <BranchLikeTable\n          branchLikes={branchLikesToDisplay}\n          component={component}\n          displayPurgeSetting={isBranchMode}\n          onDelete={this.onDeleteBranchLike}\n          onRename={this.onRenameBranchLike}\n          title={title}\n        />\n\n        {deleting && (\n          <DeleteBranchModal\n            branchLike={deleting}\n            component={component}\n            onClose={this.onClose}\n            onDelete={this.onModalActionFulfilled}\n          />\n        )}\n\n        {renaming && isMainBranch(renaming) && (\n          <RenameBranchModal\n            branch={renaming}\n            component={component}\n            onClose={this.onClose}\n            onRename={this.onModalActionFulfilled}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\n\nexport interface LifetimeInformationRendererProps {\n  branchAndPullRequestLifeTimeInDays?: string;\n  canAdmin?: boolean;\n  loading: boolean;\n}\n\nexport function LifetimeInformationRenderer(props: LifetimeInformationRendererProps) {\n  const { branchAndPullRequestLifeTimeInDays, canAdmin, loading } = props;\n\n  return (\n    <DeferredSpinner loading={loading}>\n      {branchAndPullRequestLifeTimeInDays && (\n        <p className=\"page-description\">\n          <FormattedMessage\n            defaultMessage={translate('project_branch_pull_request.lifetime_information')}\n            id=\"project_branch_pull_request.lifetime_information\"\n            values={{ days: formatMeasure(branchAndPullRequestLifeTimeInDays, 'INT') }}\n          />\n          {canAdmin && (\n            <FormattedMessage\n              defaultMessage={translate('project_branch_pull_request.lifetime_information.admin')}\n              id=\"project_branch_pull_request.lifetime_information.admin\"\n              values={{\n                settings: <Link to=\"/admin/settings\">{translate('settings.page')}</Link>\n              }}\n            />\n          )}\n        </p>\n      )}\n    </DeferredSpinner>\n  );\n}\n\nexport default React.memo(LifetimeInformationRenderer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getValues } from '../../../api/settings';\nimport { getAppState, Store } from '../../../store/rootReducer';\nimport { SettingsKey } from '../../../types/settings';\nimport LifetimeInformationRenderer from './LifetimeInformationRenderer';\n\ninterface Props {\n  canAdmin?: boolean;\n}\n\ninterface State {\n  branchAndPullRequestLifeTimeInDays?: string;\n  loading: boolean;\n}\n\nexport class LifetimeInformation extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchBranchAndPullRequestLifetimeSetting();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchBranchAndPullRequestLifetimeSetting() {\n    getValues({ keys: SettingsKey.DaysBeforeDeletingInactiveBranchesAndPRs }).then(\n      settings => {\n        if (this.mounted) {\n          this.setState({\n            loading: false,\n            branchAndPullRequestLifeTimeInDays: settings.length > 0 ? settings[0].value : undefined\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  }\n\n  render() {\n    const { canAdmin } = this.props;\n    const { branchAndPullRequestLifeTimeInDays, loading } = this.state;\n\n    return (\n      <LifetimeInformationRenderer\n        branchAndPullRequestLifeTimeInDays={branchAndPullRequestLifeTimeInDays}\n        canAdmin={canAdmin}\n        loading={loading}\n      />\n    );\n  }\n}\n\nconst mapStoreToProps = (state: Store) => ({\n  canAdmin: getAppState(state).canAdmin\n});\n\nexport default connect(mapStoreToProps)(LifetimeInformation);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport BranchLikeTabs from './BranchLikeTabs';\nimport LifetimeInformation from './LifetimeInformation';\n\nexport interface AppProps {\n  branchLikes: BranchLike[];\n  component: T.Component;\n  onBranchesChange: () => void;\n}\n\nexport function App(props: AppProps) {\n  const { branchLikes, component, onBranchesChange } = props;\n\n  return (\n    <div className=\"page page-limited\" id=\"project-branch-like\">\n      <header className=\"page-header\">\n        <h1>{translate('project_branch_pull_request.page')}</h1>\n        <LifetimeInformation />\n      </header>\n\n      <BranchLikeTabs\n        branchLikes={branchLikes}\n        component={component}\n        onBranchesChange={onBranchesChange}\n      />\n    </div>\n  );\n}\n\nexport default React.memo(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/App')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post } from '../helpers/request';\nimport { DumpStatus } from '../types/project-dump';\n\nexport function getStatus(componentKey: string): Promise<DumpStatus> {\n  return getJSON('/api/project_dump/status', { key: componentKey }).catch(throwGlobalError);\n}\n\nexport function doExport(componentKey: string) {\n  return post('/api/project_dump/export', { key: componentKey }).catch(throwGlobalError);\n}\n\nexport function doImport(componentKey: string) {\n  return post('/api/project_dump/import', { key: componentKey }).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { doExport } from '../../../api/project-dump';\nimport { Button } from '../../../components/controls/buttons';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { DumpStatus, DumpTask } from '../../../types/project-dump';\n\ninterface Props {\n  componentKey: string;\n  loadStatus: () => void;\n  status: DumpStatus;\n  task?: DumpTask;\n}\n\nexport default class Export extends React.Component<Props> {\n  handleExport = () => {\n    doExport(this.props.componentKey).then(this.props.loadStatus, () => {\n      /* no catch needed */\n    });\n  };\n\n  renderHeader() {\n    return (\n      <div className=\"boxed-group-header\">\n        <h2>{translate('project_dump.export')}</h2>\n      </div>\n    );\n  }\n\n  renderWhenCanNotExport() {\n    return (\n      <div className=\"boxed-group\" id=\"project-export\">\n        {this.renderHeader()}\n        <div className=\"boxed-group-inner\">\n          <Alert id=\"export-not-possible\" variant=\"warning\">\n            {translate('project_dump.can_not_export')}\n          </Alert>\n        </div>\n      </div>\n    );\n  }\n\n  renderWhenExportPending(task: DumpTask) {\n    return (\n      <div className=\"boxed-group\" id=\"project-export\">\n        {this.renderHeader()}\n        <div className=\"boxed-group-inner\" id=\"export-pending\">\n          <i className=\"spinner spacer-right\" />\n          <DateTimeFormatter date={task.submittedAt}>\n            {formatted => (\n              <span>{translateWithParameters('project_dump.pending_export', formatted)}</span>\n            )}\n          </DateTimeFormatter>\n        </div>\n      </div>\n    );\n  }\n\n  renderWhenExportInProgress(task: DumpTask) {\n    return (\n      <div className=\"boxed-group\" id=\"project-export\">\n        {this.renderHeader()}\n\n        <div className=\"boxed-group-inner\" id=\"export-in-progress\">\n          <i className=\"spinner spacer-right\" />\n          {task.startedAt && (\n            <DateFromNow date={task.startedAt}>\n              {fromNow => (\n                <span>{translateWithParameters('project_dump.in_progress_export', fromNow)}</span>\n              )}\n            </DateFromNow>\n          )}\n        </div>\n      </div>\n    );\n  }\n\n  renderWhenExportFailed() {\n    const { componentKey } = this.props;\n    const detailsUrl = `${getBaseUrl()}/project/background_tasks?id=${encodeURIComponent(\n      componentKey\n    )}&status=FAILED&taskType=PROJECT_EXPORT`;\n\n    return (\n      <div className=\"boxed-group\" id=\"project-export\">\n        {this.renderHeader()}\n\n        <div className=\"boxed-group-inner\">\n          <Alert id=\"export-in-progress\" variant=\"error\">\n            {translate('project_dump.failed_export')}\n            <a className=\"spacer-left\" href={detailsUrl}>\n              {translate('project_dump.see_details')}\n            </a>\n          </Alert>\n\n          {this.renderExport()}\n        </div>\n      </div>\n    );\n  }\n\n  renderDump(task?: DumpTask) {\n    const { status } = this.props;\n\n    return (\n      <Alert className=\"export-dump\" variant=\"success\">\n        {task && task.executedAt && (\n          <DateTimeFormatter date={task.executedAt}>\n            {formatted => (\n              <div className=\"export-dump-message\">\n                {translateWithParameters('project_dump.latest_export_available', formatted)}\n              </div>\n            )}\n          </DateTimeFormatter>\n        )}\n        {!task && (\n          <div className=\"export-dump-message\">{translate('project_dump.export_available')}</div>\n        )}\n        <div className=\"export-dump-path\">\n          <code tabIndex={0}>{status.exportedDump}</code>\n        </div>\n      </Alert>\n    );\n  }\n\n  renderExport() {\n    return (\n      <div>\n        <div className=\"spacer-bottom\">{translate('project_dump.export_form_description')}</div>\n        <Button onClick={this.handleExport}>{translate('project_dump.do_export')}</Button>\n      </div>\n    );\n  }\n\n  render() {\n    const { status, task } = this.props;\n\n    if (!status.canBeExported) {\n      return this.renderWhenCanNotExport();\n    }\n\n    if (task && task.status === 'PENDING') {\n      return this.renderWhenExportPending(task);\n    }\n\n    if (task && task.status === 'IN_PROGRESS') {\n      return this.renderWhenExportInProgress(task);\n    }\n\n    if (task && task.status === 'FAILED') {\n      return this.renderWhenExportFailed();\n    }\n\n    const isDumpAvailable = Boolean(status.exportedDump);\n\n    return (\n      <div className=\"boxed-group\" id=\"project-export\">\n        {this.renderHeader()}\n        <div className=\"boxed-group-inner\">\n          {isDumpAvailable && this.renderDump(task)}\n          {this.renderExport()}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { stringify } from 'querystring';\nimport * as React from 'react';\nimport { doImport } from '../../../api/project-dump';\nimport { Button } from '../../../components/controls/buttons';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { DumpStatus, DumpTask } from '../../../types/project-dump';\nimport { TaskStatuses, TaskTypes } from '../../../types/tasks';\n\ninterface Props {\n  analysis?: DumpTask;\n  componentKey: string;\n  importEnabled: boolean;\n  loadStatus: () => void;\n  status: DumpStatus;\n  task?: DumpTask;\n}\n\nexport default class Import extends React.Component<Props> {\n  handleImport = () => {\n    doImport(this.props.componentKey).then(this.props.loadStatus, () => {\n      /* no catch needed */\n    });\n  };\n\n  renderWhenCanNotImport() {\n    return (\n      <div className=\"boxed-group-inner\" id=\"import-not-possible\">\n        {translate('project_dump.can_not_import')}\n      </div>\n    );\n  }\n\n  renderWhenNoDump() {\n    return (\n      <div className=\"boxed-group-inner\">\n        <Alert id=\"import-no-file\" variant=\"warning\">\n          {translate('project_dump.no_file_to_import')}\n        </Alert>\n      </div>\n    );\n  }\n\n  renderImportForm() {\n    return (\n      <div>\n        <div className=\"spacer-bottom\">{translate('project_dump.import_form_description')}</div>\n        <Button onClick={this.handleImport}>{translate('project_dump.do_import')}</Button>\n      </div>\n    );\n  }\n\n  renderWhenImportSuccess(task: DumpTask) {\n    return (\n      <div className=\"boxed-group-inner\">\n        {task.executedAt && (\n          <DateTimeFormatter date={task.executedAt}>\n            {formatted => (\n              <Alert variant=\"success\">\n                {translateWithParameters('project_dump.import_success', formatted)}\n              </Alert>\n            )}\n          </DateTimeFormatter>\n        )}\n      </div>\n    );\n  }\n\n  renderWhenImportPending(task: DumpTask) {\n    return (\n      <div className=\"boxed-group-inner\" id=\"import-pending\">\n        <i className=\"spinner spacer-right\" />\n        <DateTimeFormatter date={task.submittedAt}>\n          {formatted => (\n            <span>{translateWithParameters('project_dump.pending_import', formatted)}</span>\n          )}\n        </DateTimeFormatter>\n      </div>\n    );\n  }\n\n  renderWhenImportInProgress(task: DumpTask) {\n    return (\n      <div className=\"boxed-group-inner\" id=\"import-in-progress\">\n        <i className=\"spinner spacer-right\" />\n        {task.startedAt && (\n          <DateFromNow date={task.startedAt}>\n            {fromNow => (\n              <span>{translateWithParameters('project_dump.in_progress_import', fromNow)}</span>\n            )}\n          </DateFromNow>\n        )}\n      </div>\n    );\n  }\n\n  renderWhenImportFailed() {\n    const { componentKey } = this.props;\n    const detailsUrl = `${getBaseUrl()}/project/background_tasks?${stringify({\n      id: encodeURIComponent(componentKey),\n      status: TaskStatuses.Failed,\n      taskType: TaskTypes.ProjectImport\n    })}`;\n\n    return (\n      <div className=\"boxed-group-inner\">\n        <Alert id=\"export-in-progress\" variant=\"error\">\n          {translate('project_dump.failed_import')}\n          <a className=\"spacer-left\" href={detailsUrl}>\n            {translate('project_dump.see_details')}\n          </a>\n        </Alert>\n\n        {this.renderImportForm()}\n      </div>\n    );\n  }\n\n  render() {\n    const { importEnabled, status, task, analysis } = this.props;\n\n    let content: React.ReactNode = null;\n    if (task && task.status === TaskStatuses.Success && !analysis) {\n      content = this.renderWhenImportSuccess(task);\n    } else if (task && task.status === TaskStatuses.Pending) {\n      content = this.renderWhenImportPending(task);\n    } else if (task && task.status === TaskStatuses.InProgress) {\n      content = this.renderWhenImportInProgress(task);\n    } else if (task && task.status === TaskStatuses.Failed) {\n      content = this.renderWhenImportFailed();\n    } else if (!status.canBeImported) {\n      content = this.renderWhenCanNotImport();\n    } else if (!status.dumpToImport) {\n      content = this.renderWhenNoDump();\n    } else {\n      content = <div className=\"boxed-group-inner\">{this.renderImportForm()}</div>;\n    }\n    return (\n      <div\n        className={classNames('boxed-group', {\n          'import-disabled text-muted': !importEnabled\n        })}\n        id=\"project-import\">\n        <div className=\"boxed-group-header\">\n          <h2>{translate('project_dump.import')}</h2>\n        </div>\n        {importEnabled ? (\n          content\n        ) : (\n          <div className=\"boxed-group-inner\">\n            {translate('project_dump.import_form_description_disabled')}\n          </div>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getActivity } from '../../api/ce';\nimport { getStatus } from '../../api/project-dump';\nimport throwGlobalError from '../../app/utils/throwGlobalError';\nimport { withAppState } from '../../components/hoc/withAppState';\nimport { translate } from '../../helpers/l10n';\nimport { DumpStatus, DumpTask } from '../../types/project-dump';\nimport { TaskStatuses, TaskTypes } from '../../types/tasks';\nimport Export from './components/Export';\nimport Import from './components/Import';\nimport './styles.css';\n\nconst POLL_INTERNAL = 5000;\n\ninterface Props {\n  appState: Pick<T.AppState, 'projectImportFeatureEnabled'>;\n  component: T.Component;\n}\n\ninterface State {\n  lastAnalysisTask?: DumpTask;\n  lastExportTask?: DumpTask;\n  lastImportTask?: DumpTask;\n  status?: DumpStatus;\n}\n\nexport class ProjectDumpApp extends React.Component<Props, State> {\n  mounted = false;\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadStatus();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.component.key !== this.props.component.key) {\n      this.loadStatus();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  getLastTask(component: string, type: TaskTypes) {\n    const data = {\n      type,\n      component,\n      onlyCurrents: true,\n      status: [\n        TaskStatuses.Pending,\n        TaskStatuses.InProgress,\n        TaskStatuses.Success,\n        TaskStatuses.Failed,\n        TaskStatuses.Canceled\n      ].join(',')\n    };\n    return getActivity(data)\n      .then(({ tasks }) => (tasks.length > 0 ? tasks[0] : undefined), throwGlobalError)\n      .catch(() => undefined);\n  }\n\n  getLastTaskOfEachType(componentKey: string) {\n    const {\n      appState: { projectImportFeatureEnabled }\n    } = this.props;\n\n    const all = projectImportFeatureEnabled\n      ? [\n          this.getLastTask(componentKey, TaskTypes.ProjectExport),\n          this.getLastTask(componentKey, TaskTypes.ProjectImport),\n          this.getLastTask(componentKey, TaskTypes.Report)\n        ]\n      : [\n          this.getLastTask(componentKey, TaskTypes.ProjectExport),\n          Promise.resolve(),\n          this.getLastTask(componentKey, TaskTypes.Report)\n        ];\n    return Promise.all(all).then(([lastExportTask, lastImportTask, lastAnalysisTask]) => ({\n      lastExportTask,\n      lastImportTask,\n      lastAnalysisTask\n    }));\n  }\n\n  loadStatus = () => {\n    const { component } = this.props;\n    return Promise.all([getStatus(component.key), this.getLastTaskOfEachType(component.key)]).then(\n      ([status, { lastExportTask, lastImportTask, lastAnalysisTask }]) => {\n        if (this.mounted) {\n          this.setState({\n            status,\n            lastExportTask,\n            lastImportTask,\n            lastAnalysisTask\n          });\n        }\n        return {\n          status,\n          lastExportTask,\n          lastImportTask,\n          lastAnalysisTask\n        };\n      }\n    );\n  };\n\n  poll = () => {\n    this.loadStatus().then(\n      ({ lastExportTask, lastImportTask }) => {\n        if (this.mounted) {\n          const progressStatus = [TaskStatuses.Pending, TaskStatuses.InProgress];\n          const exportNotFinished =\n            lastExportTask === undefined || progressStatus.includes(lastExportTask.status);\n          const importNotFinished =\n            lastImportTask === undefined || progressStatus.includes(lastImportTask.status);\n          if (exportNotFinished || importNotFinished) {\n            setTimeout(this.poll, POLL_INTERNAL);\n          } else {\n            // Since we fetch status separate from task we could not get an up to date status.\n            // even if we detect that export / import is finish.\n            // Doing a last call will make sur we get the latest status.\n            this.loadStatus();\n          }\n        }\n      },\n      () => {\n        /* no catch needed */\n      }\n    );\n  };\n\n  render() {\n    const {\n      component,\n      appState: { projectImportFeatureEnabled }\n    } = this.props;\n    const { lastAnalysisTask, lastExportTask, lastImportTask, status } = this.state;\n\n    return (\n      <div className=\"page page-limited\" id=\"project-dump\">\n        <header className=\"page-header\">\n          <h1 className=\"page-title\">{translate('project_dump.page')}</h1>\n          <div className=\"page-description\">\n            {projectImportFeatureEnabled\n              ? translate('project_dump.page.description')\n              : translate('project_dump.page.description_without_import')}\n          </div>\n        </header>\n\n        {status === undefined ? (\n          <i className=\"spinner\" />\n        ) : (\n          <div className=\"columns\">\n            <div className=\"column-half\">\n              <Export\n                componentKey={component.key}\n                loadStatus={this.poll}\n                status={status}\n                task={lastExportTask}\n              />\n            </div>\n            <div className=\"column-half\">\n              <Import\n                importEnabled={!!projectImportFeatureEnabled}\n                analysis={lastAnalysisTask}\n                componentKey={component.key}\n                loadStatus={this.poll}\n                status={status}\n                task={lastImportTask}\n              />\n            </div>\n          </div>\n        )}\n      </div>\n    );\n  }\n}\n\nexport default withAppState(ProjectDumpApp);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport ProjectDumpApp from './ProjectDumpApp';\n\nconst routes = [\n  {\n    indexRoute: { component: ProjectDumpApp }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport getHistory from '../../helpers/getHistory';\nimport { requireAuthorization } from '../../store/appState';\nimport getStore from './getStore';\n\nexport default function handleRequiredAuthorization() {\n  const store = getStore();\n  const history = getHistory();\n\n  const returnTo = window.location.pathname + window.location.search + window.location.hash;\n\n  store.dispatch(requireAuthorization());\n  history.replace({ pathname: '/sessions/new', query: { return_to: returnTo } });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const USE_SYSTEM_DEFAULT = '-1';\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../components/controls/Tooltip';\n\nexport interface DisableableSelectOptionProps {\n  className?: string;\n  disabledReason?: string;\n  option: { label?: string; value?: string | number | boolean; disabled?: boolean };\n  disableTooltipOverlay: () => React.ReactNode;\n}\n\nexport default function DisableableSelectOption(props: DisableableSelectOptionProps) {\n  const { option, disableTooltipOverlay, disabledReason, className = '' } = props;\n  const label = option.label || option.value;\n  return option.disabled ? (\n    <Tooltip overlay={disableTooltipOverlay()} placement=\"left\">\n      <span className={className}>\n        {label}\n        {disabledReason !== undefined && (\n          <em className=\"small little-spacer-left\">({disabledReason})</em>\n        )}\n      </span>\n    </Tooltip>\n  ) : (\n    <span className={className}>{label}</span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  className?: string;\n}\n\nexport default function BuiltInQualityGateBadge({ className }: Props) {\n  return (\n    <Tooltip overlay={translate('quality_gates.built_in.help')}>\n      <div className={classNames('badge', className)}>{translate('quality_gates.built_in')}</div>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../app/components/embed-docs-modal/Suggestions';\nimport DisableableSelectOption from '../../components/common/DisableableSelectOption';\nimport { SubmitButton } from '../../components/controls/buttons';\nimport HelpTooltip from '../../components/controls/HelpTooltip';\nimport Radio from '../../components/controls/Radio';\nimport Select from '../../components/controls/Select';\nimport { Alert } from '../../components/ui/Alert';\nimport { translate } from '../../helpers/l10n';\nimport { isDiffMetric } from '../../helpers/measures';\nimport BuiltInQualityGateBadge from '../quality-gates/components/BuiltInQualityGateBadge';\nimport { USE_SYSTEM_DEFAULT } from './constants';\n\nexport interface ProjectQualityGateAppRendererProps {\n  allQualityGates?: T.QualityGate[];\n  currentQualityGate?: T.QualityGate;\n  loading: boolean;\n  onSelect: (id: string) => void;\n  onSubmit: () => void;\n  selectedQualityGateId: string;\n  submitting: boolean;\n}\n\nfunction hasConditionOnNewCode(qualityGate: T.QualityGate): boolean {\n  return !!qualityGate.conditions?.some(condition => isDiffMetric(condition.metric));\n}\n\nexport default function ProjectQualityGateAppRenderer(props: ProjectQualityGateAppRendererProps) {\n  const { allQualityGates, currentQualityGate, loading, selectedQualityGateId, submitting } = props;\n  const defaultQualityGate = allQualityGates?.find(g => g.isDefault);\n\n  if (loading) {\n    return <i className=\"spinner\" />;\n  }\n\n  if (\n    allQualityGates === undefined ||\n    defaultQualityGate === undefined ||\n    currentQualityGate === undefined\n  ) {\n    return null;\n  }\n\n  const usesDefault = selectedQualityGateId === USE_SYSTEM_DEFAULT;\n  const needsReanalysis = usesDefault\n    ? // currentQualityGate.isDefault is not always up to date. We need to check\n      // against defaultQualityGate explicitly.\n      defaultQualityGate.id !== currentQualityGate.id\n    : selectedQualityGateId !== currentQualityGate.id;\n\n  const selectedQualityGate = allQualityGates.find(qg => qg.id === selectedQualityGateId);\n\n  const options = allQualityGates.map(g => ({\n    disabled: g.conditions === undefined || g.conditions.length === 0,\n    label: g.name,\n    value: g.id\n  }));\n\n  return (\n    <div className=\"page page-limited\" id=\"project-quality-gate\">\n      <Suggestions suggestions=\"project_quality_gate\" />\n      <Helmet defer={false} title={translate('project_quality_gate.page')} />\n      <A11ySkipTarget anchor=\"qg_main\" />\n\n      <header className=\"page-header\">\n        <div className=\"page-title display-flex-center\">\n          <h1>{translate('project_quality_gate.page')}</h1>\n          <HelpTooltip\n            className=\"spacer-left\"\n            overlay={\n              <div className=\"big-padded-top big-padded-bottom\">\n                {translate('quality_gates.projects.help')}\n              </div>\n            }\n          />\n        </div>\n      </header>\n\n      <div className=\"boxed-group\">\n        <h2 className=\"boxed-group-header\">{translate('project_quality_gate.subtitle')}</h2>\n\n        <form\n          className=\"boxed-group-inner\"\n          onSubmit={e => {\n            e.preventDefault();\n            props.onSubmit();\n          }}>\n          <p className=\"big-spacer-bottom\">{translate('project_quality_gate.page.description')}</p>\n\n          <div className=\"big-spacer-bottom\">\n            <Radio\n              className=\"display-flex-start\"\n              checked={usesDefault}\n              disabled={submitting}\n              onCheck={() => props.onSelect(USE_SYSTEM_DEFAULT)}\n              value={USE_SYSTEM_DEFAULT}>\n              <div className=\"spacer-left\">\n                <div className=\"little-spacer-bottom\">\n                  {translate('project_quality_gate.always_use_default')}\n                </div>\n                <div className=\"display-flex-center\">\n                  <span className=\"text-muted little-spacer-right\">\n                    {translate('current_noun')}:\n                  </span>\n                  {defaultQualityGate.name}\n                  {defaultQualityGate.isBuiltIn && (\n                    <BuiltInQualityGateBadge className=\"spacer-left\" />\n                  )}\n                </div>\n              </div>\n            </Radio>\n          </div>\n\n          <div className=\"big-spacer-bottom\">\n            <Radio\n              className=\"display-flex-start\"\n              checked={!usesDefault}\n              disabled={submitting}\n              onCheck={value => props.onSelect(value)}\n              value={!usesDefault ? selectedQualityGateId : currentQualityGate.id}>\n              <div className=\"spacer-left\">\n                <div className=\"little-spacer-bottom\">\n                  {translate('project_quality_gate.always_use_specific')}\n                </div>\n                <div className=\"display-flex-center\">\n                  <Select\n                    className=\"abs-width-300\"\n                    clearable={false}\n                    disabled={submitting || usesDefault}\n                    onChange={({ value }: { value: string }) => props.onSelect(value)}\n                    options={options}\n                    optionRenderer={option => (\n                      <DisableableSelectOption\n                        className=\"abs-width-100\"\n                        option={option}\n                        disabledReason={translate('project_quality_gate.no_condition.reason')}\n                        disableTooltipOverlay={() => (\n                          <FormattedMessage\n                            id=\"project_quality_gate.no_condition\"\n                            defaultMessage={translate('project_quality_gate.no_condition')}\n                            values={{\n                              link: (\n                                <Link to={{ pathname: `/quality_gates/show/${option.value}` }}>\n                                  {translate('project_quality_gate.no_condition.link')}\n                                </Link>\n                              )\n                            }}\n                          />\n                        )}\n                      />\n                    )}\n                    value={selectedQualityGateId}\n                  />\n                </div>\n              </div>\n            </Radio>\n\n            {selectedQualityGate && !hasConditionOnNewCode(selectedQualityGate) && (\n              <Alert className=\"abs-width-600 spacer-top\" variant=\"warning\">\n                <FormattedMessage\n                  id=\"project_quality_gate.no_condition_on_new_code\"\n                  defaultMessage={translate('project_quality_gate.no_condition_on_new_code')}\n                  values={{\n                    link: (\n                      <Link to={{ pathname: `/quality_gates/show/${selectedQualityGate.id}` }}>\n                        {translate('project_quality_gate.no_condition.link')}\n                      </Link>\n                    )\n                  }}\n                />\n              </Alert>\n            )}\n            {needsReanalysis && (\n              <Alert className=\"big-spacer-top abs-width-600\" variant=\"warning\">\n                {translate('project_quality_gate.requires_new_analysis')}\n              </Alert>\n            )}\n          </div>\n\n          <div>\n            <SubmitButton disabled={submitting}>{translate('save')}</SubmitButton>\n            {submitting && <i className=\"spinner spacer-left\" />}\n          </div>\n        </form>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport {\n  associateGateWithProject,\n  dissociateGateWithProject,\n  fetchQualityGate,\n  fetchQualityGates,\n  getGateForProject,\n  searchProjects\n} from '../../api/quality-gates';\nimport addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage';\nimport handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization';\nimport { translate } from '../../helpers/l10n';\nimport { USE_SYSTEM_DEFAULT } from './constants';\nimport ProjectQualityGateAppRenderer from './ProjectQualityGateAppRenderer';\n\ninterface Props {\n  component: T.Component;\n  onComponentChange: (changes: {}) => void;\n}\n\ninterface State {\n  allQualityGates?: T.QualityGate[];\n  currentQualityGate?: T.QualityGate;\n  loading: boolean;\n  selectedQualityGateId: string;\n  submitting: boolean;\n}\n\nexport default class ProjectQualityGateApp extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    loading: true,\n    selectedQualityGateId: USE_SYSTEM_DEFAULT,\n    submitting: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    if (this.checkPermissions()) {\n      this.fetchQualityGates();\n    } else {\n      handleRequiredAuthorization();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  checkPermissions = () => {\n    const { configuration } = this.props.component;\n    const hasPermission = configuration && configuration.showQualityGates;\n    return !!hasPermission;\n  };\n\n  isUsingDefault = async (qualityGate: T.QualityGate) => {\n    const { component } = this.props;\n\n    if (!qualityGate.isDefault) {\n      return false;\n    }\n\n    // If this is the default Quality Gate, check if it was explicitly\n    // selected, or if we're inheriting the system default.\n    const selected = await searchProjects({\n      gateName: qualityGate.name,\n      query: component.key\n    })\n      .then(({ results }) => {\n        return Boolean(results.find(r => r.key === component.key)?.selected);\n      })\n      .catch(() => false);\n\n    // If it's NOT selected, it means we're following the system default.\n    return !selected;\n  };\n\n  fetchDetailedQualityGates = async () => {\n    const { qualitygates } = await fetchQualityGates();\n    return Promise.all(\n      qualitygates.map(async qg => {\n        const detailedQp = await fetchQualityGate({ id: qg.id }).catch(() => qg);\n        return { ...detailedQp, ...qg };\n      })\n    );\n  };\n\n  fetchQualityGates = async () => {\n    const { component } = this.props;\n    this.setState({ loading: true });\n\n    const [allQualityGates, currentQualityGate] = await Promise.all([\n      this.fetchDetailedQualityGates(),\n      getGateForProject({ project: component.key })\n    ]).catch(() => []);\n\n    if (allQualityGates && currentQualityGate) {\n      const usingDefault = await this.isUsingDefault(currentQualityGate);\n\n      if (this.mounted) {\n        this.setState({\n          allQualityGates,\n          currentQualityGate,\n          selectedQualityGateId: usingDefault ? USE_SYSTEM_DEFAULT : currentQualityGate.id,\n          loading: false\n        });\n      }\n    } else if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  handleSelect = (selectedQualityGateId: string) => {\n    this.setState({ selectedQualityGateId });\n  };\n\n  handleSubmit = async () => {\n    const { component } = this.props;\n    const { allQualityGates, currentQualityGate, selectedQualityGateId } = this.state;\n\n    if (allQualityGates === undefined || currentQualityGate === undefined) {\n      return;\n    }\n\n    this.setState({ submitting: true });\n\n    if (selectedQualityGateId === USE_SYSTEM_DEFAULT) {\n      await dissociateGateWithProject({\n        gateId: currentQualityGate.id,\n        projectKey: component.key\n      }).catch(() => {\n        /* noop */\n      });\n    } else {\n      await associateGateWithProject({\n        gateId: selectedQualityGateId,\n        projectKey: component.key\n      }).catch(() => {\n        /* noop */\n      });\n    }\n\n    if (this.mounted) {\n      addGlobalSuccessMessage(translate('project_quality_gate.successfully_updated'));\n\n      const newGate =\n        selectedQualityGateId === USE_SYSTEM_DEFAULT\n          ? allQualityGates.find(gate => gate.isDefault)\n          : allQualityGates.find(gate => gate.id === selectedQualityGateId);\n\n      if (newGate) {\n        this.setState({ currentQualityGate: newGate, submitting: false });\n        this.props.onComponentChange({ qualityGate: newGate });\n      }\n    }\n  };\n\n  render() {\n    if (!this.checkPermissions()) {\n      return null;\n    }\n\n    const {\n      allQualityGates,\n      currentQualityGate,\n      loading,\n      selectedQualityGateId,\n      submitting\n    } = this.state;\n\n    return (\n      <ProjectQualityGateAppRenderer\n        allQualityGates={allQualityGates}\n        currentQualityGate={currentQualityGate}\n        loading={loading}\n        onSubmit={this.handleSubmit}\n        onSelect={this.handleSelect}\n        selectedQualityGateId={selectedQualityGateId}\n        submitting={submitting}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./ProjectQualityGateApp')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { difference } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router';\nimport { Profile } from '../../../api/quality-profiles';\nimport DisableableSelectOption from '../../../components/common/DisableableSelectOption';\nimport { ButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Select from '../../../components/controls/Select';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport { translate } from '../../../helpers/l10n';\nimport { getQualityProfileUrl } from '../../../helpers/urls';\nimport { Store } from '../../../store/rootReducer';\n\nexport interface AddLanguageModalProps {\n  languages: T.Languages;\n  onClose: () => void;\n  onSubmit: (key: string) => Promise<void>;\n  profilesByLanguage: T.Dict<Profile[]>;\n  unavailableLanguages: string[];\n}\n\nexport function AddLanguageModal(props: AddLanguageModalProps) {\n  const { languages, profilesByLanguage, unavailableLanguages } = props;\n\n  const [{ language, key }, setSelected] = React.useState<{ language?: string; key?: string }>({\n    language: undefined,\n    key: undefined\n  });\n\n  const header = translate('project_quality_profile.add_language_modal.title');\n\n  const languageOptions = difference(\n    Object.keys(profilesByLanguage),\n    unavailableLanguages\n  ).map(l => ({ value: l, label: languages[l].name }));\n\n  const profileOptions =\n    language !== undefined\n      ? profilesByLanguage[language].map(p => ({\n          value: p.key,\n          label: p.name,\n          disabled: p.activeRuleCount === 0\n        }))\n      : [];\n\n  return (\n    <SimpleModal\n      header={header}\n      onClose={props.onClose}\n      onSubmit={() => {\n        if (language && key) {\n          props.onSubmit(key);\n        }\n      }}>\n      {({ onCloseClick, onFormSubmit, submitting }) => (\n        <>\n          <div className=\"modal-head\">\n            <h2>{header}</h2>\n          </div>\n\n          <form onSubmit={onFormSubmit}>\n            <div className=\"modal-body\">\n              <div className=\"big-spacer-bottom\">\n                <div className=\"little-spacer-bottom\">\n                  <label className=\"text-bold\" htmlFor=\"language\">\n                    {translate('project_quality_profile.add_language_modal.choose_language')}\n                  </label>\n                </div>\n                <Select\n                  className=\"abs-width-300\"\n                  clearable={false}\n                  disabled={submitting}\n                  id=\"language\"\n                  onChange={({ value }: { value: string }) => setSelected({ language: value })}\n                  options={languageOptions}\n                  value={language}\n                />\n              </div>\n\n              <div className=\"big-spacer-bottom\">\n                <div className=\"little-spacer-bottom\">\n                  <label className=\"text-bold\" htmlFor=\"profiles\">\n                    {translate('project_quality_profile.add_language_modal.choose_profile')}\n                  </label>\n                </div>\n                <Select\n                  className=\"abs-width-300\"\n                  clearable={false}\n                  disabled={submitting || !language}\n                  id=\"profiles\"\n                  onChange={({ value }: { value: string }) => setSelected({ language, key: value })}\n                  options={profileOptions}\n                  optionRenderer={option => (\n                    <DisableableSelectOption\n                      option={option}\n                      disabledReason={translate(\n                        'project_quality_profile.add_language_modal.no_active_rules'\n                      )}\n                      disableTooltipOverlay={() => (\n                        <>\n                          <p>\n                            {translate(\n                              'project_quality_profile.add_language_modal.profile_unavailable_no_active_rules'\n                            )}\n                          </p>\n                          {option.label && language && (\n                            <Link to={getQualityProfileUrl(option.label, language)}>\n                              {translate(\n                                'project_quality_profile.add_language_modal.go_to_profile'\n                              )}\n                            </Link>\n                          )}\n                        </>\n                      )}\n                    />\n                  )}\n                  value={key}\n                />\n              </div>\n            </div>\n\n            <div className=\"modal-foot\">\n              {submitting && <i className=\"spinner spacer-right\" />}\n              <SubmitButton disabled={submitting || !language || !key}>\n                {translate('save')}\n              </SubmitButton>\n              <ButtonLink disabled={submitting} onClick={onCloseClick}>\n                {translate('cancel')}\n              </ButtonLink>\n            </div>\n          </form>\n        </>\n      )}\n    </SimpleModal>\n  );\n}\n\nfunction mapStateToProps({ languages }: Store) {\n  return { languages };\n}\n\nexport default connect(mapStateToProps)(AddLanguageModal);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const USE_SYSTEM_DEFAULT = '-1';\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { Profile } from '../../../api/quality-profiles';\nimport DisableableSelectOption from '../../../components/common/DisableableSelectOption';\nimport { ButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Radio from '../../../components/controls/Radio';\nimport Select from '../../../components/controls/Select';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getQualityProfileUrl } from '../../../helpers/urls';\nimport BuiltInQualityProfileBadge from '../../quality-profiles/components/BuiltInQualityProfileBadge';\nimport { USE_SYSTEM_DEFAULT } from '../constants';\n\nexport interface SetQualityProfileModalProps {\n  availableProfiles: Profile[];\n  component: T.Component;\n  currentProfile: Profile;\n  onClose: () => void;\n  onSubmit: (newKey: string | undefined, oldKey: string) => Promise<void>;\n  usesDefault: boolean;\n}\n\nexport default function SetQualityProfileModal(props: SetQualityProfileModalProps) {\n  const { availableProfiles, component, currentProfile, usesDefault } = props;\n  const [selected, setSelected] = React.useState(\n    usesDefault ? USE_SYSTEM_DEFAULT : currentProfile.key\n  );\n\n  const defaultProfile = availableProfiles.find(p => p.isDefault);\n\n  if (defaultProfile === undefined) {\n    // Cannot be undefined\n    return null;\n  }\n\n  const header = translateWithParameters(\n    'project_quality_profile.change_lang_X_profile',\n    currentProfile.languageName\n  );\n  const profileOptions = availableProfiles.map(p => ({\n    value: p.key,\n    label: p.name,\n    disabled: p.activeRuleCount === 0\n  }));\n  const hasSelectedSysDefault = selected === USE_SYSTEM_DEFAULT;\n  const hasChanged = usesDefault ? !hasSelectedSysDefault : selected !== currentProfile.key;\n  const needsReanalysis = !component.qualityProfiles?.some(p =>\n    hasSelectedSysDefault ? p.key === defaultProfile.key : p.key === selected\n  );\n\n  return (\n    <SimpleModal\n      header={header}\n      onClose={props.onClose}\n      onSubmit={() =>\n        props.onSubmit(hasSelectedSysDefault ? undefined : selected, currentProfile.key)\n      }>\n      {({ onCloseClick, onFormSubmit, submitting }) => (\n        <>\n          <div className=\"modal-head\">\n            <h2>{header}</h2>\n          </div>\n\n          <form onSubmit={onFormSubmit}>\n            <div className=\"modal-body\">\n              <div className=\"big-spacer-bottom\">\n                <Radio\n                  className=\"display-flex-start\"\n                  checked={hasSelectedSysDefault}\n                  disabled={submitting}\n                  onCheck={() => setSelected(USE_SYSTEM_DEFAULT)}\n                  value={USE_SYSTEM_DEFAULT}>\n                  <div className=\"spacer-left\">\n                    <div className=\"little-spacer-bottom\">\n                      {translate('project_quality_profile.always_use_default')}\n                    </div>\n                    <div className=\"display-flex-center\">\n                      <span className=\"text-muted spacer-right\">{translate('current_noun')}:</span>\n                      {defaultProfile.name}\n                      {defaultProfile.isBuiltIn && (\n                        <BuiltInQualityProfileBadge className=\"spacer-left\" />\n                      )}\n                    </div>\n                  </div>\n                </Radio>\n              </div>\n\n              <div className=\"big-spacer-bottom\">\n                <Radio\n                  className=\"display-flex-start\"\n                  checked={!hasSelectedSysDefault}\n                  disabled={submitting}\n                  onCheck={() =>\n                    setSelected(!hasSelectedSysDefault ? selected : currentProfile.key)\n                  }\n                  value={currentProfile.key}>\n                  <div className=\"spacer-left\">\n                    <div className=\"little-spacer-bottom\">\n                      {translate('project_quality_profile.always_use_specific')}\n                    </div>\n                    <div className=\"display-flex-center\">\n                      <Select\n                        className=\"abs-width-300\"\n                        clearable={false}\n                        disabled={submitting || hasSelectedSysDefault}\n                        onChange={({ value }: { value: string }) => setSelected(value)}\n                        options={profileOptions}\n                        optionRenderer={option => (\n                          <DisableableSelectOption\n                            option={option}\n                            disabledReason={translate(\n                              'project_quality_profile.add_language_modal.no_active_rules'\n                            )}\n                            disableTooltipOverlay={() => (\n                              <>\n                                <p>\n                                  {translate(\n                                    'project_quality_profile.add_language_modal.profile_unavailable_no_active_rules'\n                                  )}\n                                </p>\n                                {option.label && (\n                                  <Link\n                                    to={getQualityProfileUrl(\n                                      option.label,\n                                      currentProfile.language\n                                    )}>\n                                    {translate(\n                                      'project_quality_profile.add_language_modal.go_to_profile'\n                                    )}\n                                  </Link>\n                                )}\n                              </>\n                            )}\n                          />\n                        )}\n                        value={!hasSelectedSysDefault ? selected : currentProfile.key}\n                      />\n                    </div>\n                  </div>\n                </Radio>\n              </div>\n\n              {needsReanalysis && (\n                <Alert variant=\"warning\">\n                  {translate('project_quality_profile.requires_new_analysis')}\n                </Alert>\n              )}\n            </div>\n\n            <div className=\"modal-foot\">\n              {submitting && <i className=\"spinner spacer-right\" />}\n              <SubmitButton disabled={submitting || !hasChanged}>{translate('save')}</SubmitButton>\n              <ButtonLink disabled={submitting} onClick={onCloseClick}>\n                {translate('cancel')}\n              </ButtonLink>\n            </div>\n          </form>\n        </>\n      )}\n    </SimpleModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy, orderBy } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router';\nimport { Profile } from '../../api/quality-profiles';\nimport A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../app/components/embed-docs-modal/Suggestions';\nimport { Button } from '../../components/controls/buttons';\nimport HelpTooltip from '../../components/controls/HelpTooltip';\nimport EditIcon from '../../components/icons/EditIcon';\nimport PlusCircleIcon from '../../components/icons/PlusCircleIcon';\nimport { translate } from '../../helpers/l10n';\nimport { getRulesUrl } from '../../helpers/urls';\nimport BuiltInQualityProfileBadge from '../quality-profiles/components/BuiltInQualityProfileBadge';\nimport AddLanguageModal from './components/AddLanguageModal';\nimport SetQualityProfileModal from './components/SetQualityProfileModal';\nimport { ProjectProfile } from './types';\n\nexport interface ProjectQualityProfilesAppRendererProps {\n  allProfiles?: Profile[];\n  component: T.Component;\n  loading: boolean;\n  onAddLanguage: (key: string) => Promise<void>;\n  onCloseModal: () => void;\n  onOpenAddLanguageModal: () => void;\n  onOpenSetProfileModal: (projectProfile: ProjectProfile) => void;\n  onSetProfile: (newKey: string | undefined, oldKey: string) => Promise<void>;\n  projectProfiles?: ProjectProfile[];\n  showAddLanguageModal?: boolean;\n  showProjectProfileInModal?: ProjectProfile;\n}\n\nexport default function ProjectQualityProfilesAppRenderer(\n  props: ProjectQualityProfilesAppRendererProps\n) {\n  const {\n    allProfiles,\n    component,\n    loading,\n    showProjectProfileInModal,\n    projectProfiles,\n    showAddLanguageModal\n  } = props;\n\n  const profilesByLanguage = groupBy(allProfiles, 'language');\n  const orderedProfiles = orderBy(projectProfiles, p => p.profile.languageName);\n\n  return (\n    <div className=\"page page-limited\" id=\"project-quality-profiles\">\n      <Suggestions suggestions=\"project_quality_profiles\" />\n      <Helmet defer={false} title={translate('project_quality_profiles.page')} />\n      <A11ySkipTarget anchor=\"profiles_main\" />\n\n      <header className=\"page-header\">\n        <div className=\"page-title display-flex-center\">\n          <h1>{translate('project_quality_profiles.page')} </h1>\n          <HelpTooltip\n            className=\"spacer-left\"\n            overlay={\n              <div className=\"big-padded-top big-padded-bottom\">\n                {translate('quality_profiles.list.projects.help')}\n              </div>\n            }\n          />\n        </div>\n      </header>\n\n      <div className=\"boxed-group\">\n        <h2 className=\"boxed-group-header\">{translate('project_quality_profile.subtitle')}</h2>\n\n        <div className=\"boxed-group-inner\">\n          <p className=\"big-spacer-bottom\">\n            {translate('project_quality_profiles.page.description')}\n          </p>\n\n          {loading && <i className=\"spinner spacer-left\" />}\n\n          {!loading && orderedProfiles.length > 0 && (\n            <table className=\"data zebra\">\n              <thead>\n                <tr>\n                  <th>{translate('language')}</th>\n                  <th className=\"thin nowrap\">{translate('project_quality_profile.current')}</th>\n                  <th className=\"thin nowrap text-right\">\n                    {translate('coding_rules.filters.activation.active_rules')}\n                  </th>\n                  <th aria-label={translate('actions')} />\n                </tr>\n              </thead>\n              <tbody>\n                {orderedProfiles.map(projectProfile => {\n                  const { profile, selected } = projectProfile;\n                  return (\n                    <tr key={profile.language}>\n                      <td>{profile.languageName}</td>\n                      <td className=\"thin nowrap\">\n                        <span className=\"display-inline-flex-center\">\n                          {!selected && profile.isDefault ? (\n                            <em>{translate('project_quality_profile.instance_default')}</em>\n                          ) : (\n                            <>\n                              {profile.name}\n                              {profile.isBuiltIn && (\n                                <BuiltInQualityProfileBadge className=\"spacer-left\" />\n                              )}\n                            </>\n                          )}\n                        </span>\n                      </td>\n                      <td className=\"nowrap text-right\">\n                        <Link to={getRulesUrl({ activation: 'true', qprofile: profile.key })}>\n                          {profile.activeRuleCount}\n                        </Link>\n                      </td>\n                      <td className=\"text-right\">\n                        <Button\n                          onClick={() => {\n                            props.onOpenSetProfileModal(projectProfile);\n                          }}>\n                          <EditIcon className=\"spacer-right\" />\n                          {translate('project_quality_profile.change_profile')}\n                        </Button>\n                      </td>\n                    </tr>\n                  );\n                })}\n              </tbody>\n            </table>\n          )}\n\n          <div className=\"big-spacer-top\">\n            <h2>{translate('project_quality_profile.add_language.title')}</h2>\n\n            <p className=\"spacer-top big-spacer-bottom\">\n              {translate('project_quality_profile.add_language.description')}\n            </p>\n\n            <Button disabled={loading} onClick={props.onOpenAddLanguageModal}>\n              <PlusCircleIcon className=\"little-spacer-right\" />\n              {translate('project_quality_profile.add_language.action')}\n            </Button>\n          </div>\n\n          {showProjectProfileInModal && (\n            <SetQualityProfileModal\n              availableProfiles={profilesByLanguage[showProjectProfileInModal.profile.language]}\n              component={component}\n              currentProfile={showProjectProfileInModal.profile}\n              onClose={props.onCloseModal}\n              onSubmit={props.onSetProfile}\n              usesDefault={!showProjectProfileInModal.selected}\n            />\n          )}\n\n          {showAddLanguageModal && projectProfiles && (\n            <AddLanguageModal\n              profilesByLanguage={profilesByLanguage}\n              onClose={props.onCloseModal}\n              onSubmit={props.onAddLanguage}\n              unavailableLanguages={projectProfiles.map(p => p.profile.language)}\n            />\n          )}\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { differenceBy } from 'lodash';\nimport * as React from 'react';\nimport {\n  associateProject,\n  dissociateProject,\n  getProfileProjects,\n  Profile,\n  searchQualityProfiles\n} from '../../api/quality-profiles';\nimport addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage';\nimport handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization';\nimport { translateWithParameters } from '../../helpers/l10n';\nimport { isDefined } from '../../helpers/types';\nimport ProjectQualityProfilesAppRenderer from './ProjectQualityProfilesAppRenderer';\nimport { ProjectProfile } from './types';\n\ninterface Props {\n  component: T.Component;\n}\n\ninterface State {\n  allProfiles?: Profile[];\n  loading: boolean;\n  projectProfiles?: ProjectProfile[];\n  showAddLanguageModal?: boolean;\n  showProjectProfileInModal?: ProjectProfile;\n}\n\nexport default class ProjectQualityProfilesApp extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    if (this.checkPermissions()) {\n      this.fetchProfiles();\n    } else {\n      handleRequiredAuthorization();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  checkPermissions() {\n    const { configuration } = this.props.component;\n    const hasPermission = configuration && configuration.showQualityProfiles;\n    return !!hasPermission;\n  }\n\n  fetchProfiles = async () => {\n    const { component } = this.props;\n\n    const allProfiles = await searchQualityProfiles()\n      .then(({ profiles }) => profiles)\n      .catch(() => [] as Profile[]);\n\n    // We need to know if a profile was explicitly assigned to a project,\n    // even if it's the system default. For this, we need to fetch the info\n    // for each existing profile. We only keep those that were effectively\n    // selected, and discard the rest.\n    const projectProfiles = await Promise.all(\n      allProfiles.map(profile =>\n        getProfileProjects({\n          key: profile.key,\n          q: component.name,\n          selected: 'selected'\n        })\n          .then(({ results }) => ({\n            selected: Boolean(results.find(p => p.key === component.key)?.selected),\n            profile\n          }))\n          .catch(() => ({ selected: false, profile }))\n      )\n    );\n\n    const selectedProjectProfiles = projectProfiles\n      .filter(({ selected }) => selected)\n      .map(({ profile }) => ({\n        profile,\n        selected: true\n      }));\n\n    // Finally, the project uses some profiles implicitly, either inheriting\n    // from the system defaults, OR because the project wasn't re-analyzed\n    // yet (in which case the info is outdated). We also need this information.\n    const componentProfiles = differenceBy(\n      component.qualityProfiles,\n      selectedProjectProfiles.map(p => p.profile),\n      'key'\n    )\n      // Discard languages we already have up-to-date info for.\n      .filter(({ language }) => !selectedProjectProfiles.some(p => p.profile.language === language))\n      .map(({ key }) => {\n        const profile = allProfiles.find(p => p.key === key);\n        if (profile) {\n          // If the profile is the default profile, all is good.\n          if (profile.isDefault) {\n            return { profile, selected: false };\n          } else {\n            // If it is neither the default, nor explicitly selected, it\n            // means this is outdated information. This can only mean the\n            // user wants to use the default profile, but it will only\n            // be taken into account after a new analysis. Fetch the\n            // default profile.\n            const defaultProfile = allProfiles.find(\n              p => p.isDefault && p.language === profile.language\n            );\n            return (\n              defaultProfile && {\n                profile: defaultProfile,\n                selected: false\n              }\n            );\n          }\n        } else {\n          return undefined;\n        }\n      })\n      .filter(isDefined);\n\n    if (this.mounted) {\n      this.setState({\n        allProfiles,\n        projectProfiles: [...selectedProjectProfiles, ...componentProfiles],\n        loading: false\n      });\n    }\n  };\n\n  handleOpenSetProfileModal = (showProjectProfileInModal: ProjectProfile) => {\n    this.setState({ showProjectProfileInModal });\n  };\n\n  handleOpenAddLanguageModal = () => {\n    this.setState({ showAddLanguageModal: true });\n  };\n\n  handleCloseModal = () => {\n    this.setState({ showAddLanguageModal: false, showProjectProfileInModal: undefined });\n  };\n\n  handleAddLanguage = async (key: string) => {\n    const { component } = this.props;\n    const { allProfiles = [] } = this.state;\n    const newProfile = allProfiles.find(p => p.key === key);\n\n    if (newProfile) {\n      try {\n        await associateProject(newProfile, component.key);\n\n        if (this.mounted) {\n          this.setState(({ projectProfiles = [] }) => {\n            const newProjectProfiles = [\n              ...projectProfiles,\n              {\n                profile: newProfile,\n                selected: true\n              }\n            ];\n\n            return { projectProfiles: newProjectProfiles, showAddLanguageModal: false };\n          });\n\n          addGlobalSuccessMessage(\n            translateWithParameters(\n              'project_quality_profile.successfully_updated',\n              newProfile.languageName\n            )\n          );\n        }\n      } catch (e) {\n        if (this.mounted) {\n          this.setState({ showAddLanguageModal: false });\n        }\n      }\n    }\n  };\n\n  handleSetProfile = async (newKey: string | undefined, oldKey: string) => {\n    const { component } = this.props;\n    const { allProfiles = [], projectProfiles = [] } = this.state;\n\n    const newProfile = newKey && allProfiles.find(p => p.key === newKey);\n    const oldProjectProfile = projectProfiles.find(p => p.profile.key === oldKey);\n    const defaultProfile = allProfiles.find(\n      p => p.isDefault && p.language === oldProjectProfile?.profile.language\n    );\n\n    if (defaultProfile === undefined || oldProjectProfile === undefined) {\n      // Isn't possible. We're in a messed up state.\n      return;\n    }\n\n    let replaceProfile: Profile | undefined;\n    if (newProfile) {\n      replaceProfile = newProfile;\n\n      // Associate with the new profile.\n      try {\n        await associateProject(newProfile, component.key);\n      } catch (e) {\n        // Something went wrong. Keep the old profile in the UI.\n        replaceProfile = oldProjectProfile.profile;\n      }\n    } else if (newKey === undefined) {\n      replaceProfile = defaultProfile;\n\n      // We want to use the system default. Explicitly dissociate the project\n      // profile, if it was explicitly selected.\n      if (oldProjectProfile.selected) {\n        try {\n          await dissociateProject(oldProjectProfile.profile, component.key);\n        } catch (e) {\n          // Something went wrong. Keep the old profile in the UI.\n          replaceProfile = oldProjectProfile.profile;\n        }\n      }\n    }\n\n    if (this.mounted) {\n      const newProjectProfiles = [\n        // Remove the old profile.\n        ...projectProfiles.filter(p => p.profile.key !== oldKey),\n        // Replace with the \"new\" profile.\n        replaceProfile && {\n          profile: replaceProfile,\n          selected: newKey !== undefined\n        }\n      ].filter(isDefined);\n\n      this.setState({ projectProfiles: newProjectProfiles, showProjectProfileInModal: undefined });\n\n      addGlobalSuccessMessage(\n        translateWithParameters(\n          'project_quality_profile.successfully_updated',\n          defaultProfile.languageName\n        )\n      );\n    }\n  };\n\n  render() {\n    if (!this.checkPermissions()) {\n      return null;\n    }\n\n    const {\n      allProfiles,\n      loading,\n      showProjectProfileInModal,\n      projectProfiles,\n      showAddLanguageModal\n    } = this.state;\n\n    return (\n      <ProjectQualityProfilesAppRenderer\n        allProfiles={allProfiles}\n        component={this.props.component}\n        loading={loading}\n        onAddLanguage={this.handleAddLanguage}\n        onCloseModal={this.handleCloseModal}\n        onOpenAddLanguageModal={this.handleOpenAddLanguageModal}\n        onOpenSetProfileModal={this.handleOpenSetProfileModal}\n        onSetProfile={this.handleSetProfile}\n        projectProfiles={projectProfiles}\n        showAddLanguageModal={showAddLanguageModal}\n        showProjectProfileInModal={showProjectProfileInModal}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: {\n      component: lazyLoadComponent(() => import('./ProjectQualityProfilesApp'))\n    }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { ComponentQualifier } from '../../types/component';\nimport { VISUALIZATIONS } from './utils';\n\ntype Level = 'ERROR' | 'WARN' | 'OK';\n\nexport interface Query {\n  gate?: Level;\n  reliability?: number;\n  new_reliability?: number;\n  security?: number;\n  new_security?: number;\n  security_review_rating?: number;\n  new_security_review_rating?: number;\n  maintainability?: number;\n  new_maintainability?: number;\n  coverage?: number;\n  new_coverage?: number;\n  duplications?: number;\n  new_duplications?: number;\n  size?: number;\n  new_lines?: number;\n  languages?: string[];\n  qualifier?: ComponentQualifier;\n  tags?: string[];\n  search?: string;\n  sort?: string;\n  view?: string;\n  visualization?: string;\n  [x: string]: string | number | string[] | undefined;\n}\n\nexport function parseUrlQuery(urlQuery: T.RawQuery): Query {\n  return {\n    gate: getAsLevel(urlQuery['gate']),\n    reliability: getAsNumericRating(urlQuery['reliability']),\n    new_reliability: getAsNumericRating(urlQuery['new_reliability']),\n    security: getAsNumericRating(urlQuery['security']),\n    new_security: getAsNumericRating(urlQuery['new_security']),\n    security_review_rating: getAsNumericRating(urlQuery['security_review']),\n    new_security_review_rating: getAsNumericRating(urlQuery['new_security_review']),\n    maintainability: getAsNumericRating(urlQuery['maintainability']),\n    new_maintainability: getAsNumericRating(urlQuery['new_maintainability']),\n    coverage: getAsNumericRating(urlQuery['coverage']),\n    new_coverage: getAsNumericRating(urlQuery['new_coverage']),\n    duplications: getAsNumericRating(urlQuery['duplications']),\n    new_duplications: getAsNumericRating(urlQuery['new_duplications']),\n    size: getAsNumericRating(urlQuery['size']),\n    new_lines: getAsNumericRating(urlQuery['new_lines']),\n    languages: getAsStringArray(urlQuery['languages']),\n    tags: getAsStringArray(urlQuery['tags']),\n    qualifier: getAsQualifier(urlQuery['qualifier']),\n    search: getAsString(urlQuery['search']),\n    sort: getAsString(urlQuery['sort']),\n    view: getView(urlQuery['view']),\n    visualization: getVisualization(urlQuery['visualization'])\n  };\n}\n\nexport function convertToFilter(query: Query, isFavorite: boolean): string {\n  const conditions: string[] = [];\n\n  if (isFavorite) {\n    conditions.push('isFavorite');\n  }\n\n  if (query['gate'] != null) {\n    conditions.push(mapPropertyToMetric('gate') + ' = ' + query['gate']);\n  }\n\n  ['coverage', 'new_coverage'].forEach(property =>\n    pushMetricToArray(query, property, conditions, convertCoverage)\n  );\n\n  ['duplications', 'new_duplications'].forEach(property =>\n    pushMetricToArray(query, property, conditions, convertDuplications)\n  );\n\n  ['size', 'new_lines'].forEach(property =>\n    pushMetricToArray(query, property, conditions, convertSize)\n  );\n\n  [\n    'reliability',\n    'security',\n    'security_review_rating',\n    'maintainability',\n    'new_reliability',\n    'new_security',\n    'new_security_review_rating',\n    'new_maintainability'\n  ].forEach(property => pushMetricToArray(query, property, conditions, convertIssuesRating));\n\n  ['languages', 'tags', 'qualifier'].forEach(property =>\n    pushMetricToArray(query, property, conditions, convertArrayMetric)\n  );\n\n  if (query['search'] != null) {\n    conditions.push(`${mapPropertyToMetric('search')} = \"${query['search']}\"`);\n  }\n\n  return conditions.join(' and ');\n}\n\nconst visualizationParams = ['sort', 'view', 'visualization'];\n\nexport function hasFilterParams(query: Query) {\n  return Object.keys(query)\n    .filter(key => !visualizationParams.includes(key))\n    .some(key => query[key] !== undefined);\n}\n\nexport function hasVisualizationParams(query: Query) {\n  return Object.keys(query)\n    .filter(key => visualizationParams.includes(key))\n    .some(key => query[key] !== undefined);\n}\n\nfunction getAsNumericRating(value: any): number | undefined {\n  if (value === '' || value == null || isNaN(value)) {\n    return undefined;\n  }\n  const num = Number(value);\n  return num > 0 && num < 7 ? num : undefined;\n}\n\nfunction getAsLevel(value: any): Level | undefined {\n  if (value === 'ERROR' || value === 'WARN' || value === 'OK') {\n    return value;\n  }\n  return undefined;\n}\n\nfunction getAsString(value: any): string | undefined {\n  if (typeof value !== 'string' || !value) {\n    return undefined;\n  }\n  return value;\n}\n\nfunction getAsStringArray(value: any): string[] | undefined {\n  if (typeof value !== 'string' || !value) {\n    return undefined;\n  }\n  return value.split(',');\n}\n\nfunction getAsQualifier(value: string | undefined): ComponentQualifier | undefined {\n  return value ? (value as ComponentQualifier) : undefined;\n}\n\nfunction getView(value: any): string | undefined {\n  return typeof value !== 'string' || value === 'overall' ? undefined : value;\n}\n\nfunction getVisualization(value: string): string | undefined {\n  return VISUALIZATIONS.includes(value) ? value : undefined;\n}\n\nfunction convertIssuesRating(metric: string, rating: number): string {\n  if (rating > 1 && rating < 5) {\n    return `${metric} >= ${rating}`;\n  } else {\n    return `${metric} = ${rating}`;\n  }\n}\n\nfunction convertCoverage(metric: string, coverage: number): string {\n  switch (coverage) {\n    case 1:\n      return metric + ' >= 80';\n    case 2:\n      return metric + ' < 80';\n    case 3:\n      return metric + ' < 70';\n    case 4:\n      return metric + ' < 50';\n    case 5:\n      return metric + ' < 30';\n    case 6:\n      return metric + '= NO_DATA';\n    default:\n      return '';\n  }\n}\n\nfunction convertDuplications(metric: string, duplications: number): string {\n  switch (duplications) {\n    case 1:\n      return metric + ' < 3';\n    case 2:\n      return metric + ' >= 3';\n    case 3:\n      return metric + ' >= 5';\n    case 4:\n      return metric + ' >= 10';\n    case 5:\n      return metric + ' >= 20';\n    case 6:\n      return metric + '= NO_DATA';\n    default:\n      return '';\n  }\n}\n\nfunction convertSize(metric: string, size: number): string {\n  switch (size) {\n    case 1:\n      return metric + ' < 1000';\n    case 2:\n      return metric + ' >= 1000';\n    case 3:\n      return metric + ' >= 10000';\n    case 4:\n      return metric + ' >= 100000';\n    case 5:\n      return metric + ' >= 500000';\n    default:\n      return '';\n  }\n}\n\nfunction mapPropertyToMetric(property?: string): string | undefined {\n  const map: T.Dict<string> = {\n    analysis_date: 'analysisDate',\n    reliability: 'reliability_rating',\n    new_reliability: 'new_reliability_rating',\n    security: 'security_rating',\n    new_security: 'new_security_rating',\n    security_review_rating: 'security_review_rating',\n    new_security_review_rating: 'new_security_review_rating',\n    maintainability: 'sqale_rating',\n    new_maintainability: 'new_maintainability_rating',\n    coverage: 'coverage',\n    new_coverage: 'new_coverage',\n    duplications: 'duplicated_lines_density',\n    new_duplications: 'new_duplicated_lines_density',\n    size: 'ncloc',\n    new_lines: 'new_lines',\n    gate: 'alert_status',\n    languages: 'languages',\n    tags: 'tags',\n    search: 'query',\n    qualifier: 'qualifier'\n  };\n  return property && map[property];\n}\n\nfunction pushMetricToArray(\n  query: Query,\n  property: string,\n  conditionsArray: string[],\n  convertFunction: (metric: string, value: any) => string\n): void {\n  const metric = mapPropertyToMetric(property);\n  if (query[property] != null && metric) {\n    conditionsArray.push(convertFunction(metric, query[property]));\n  }\n}\n\nfunction convertArrayMetric(metric: string, items: string | string[]): string {\n  if (!Array.isArray(items) || items.length < 2) {\n    return metric + ' = ' + items;\n  }\n  return `${metric} IN (${items.join(', ')})`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { invert } from 'lodash';\nimport { Facet, searchProjects } from '../../api/components';\nimport { getMeasuresForProjects } from '../../api/measures';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { isDiffMetric } from '../../helpers/measures';\nimport { RequestData } from '../../helpers/request';\nimport { MetricKey } from '../../types/metrics';\nimport { convertToFilter, Query } from './query';\n\ninterface SortingOption {\n  class?: string;\n  value: string;\n}\n\nexport const PROJECTS_DEFAULT_FILTER = 'sonarqube.projects.default';\nexport const PROJECTS_FAVORITE = 'favorite';\nexport const PROJECTS_ALL = 'all';\n\nexport const SORTING_METRICS: SortingOption[] = [\n  { value: 'name' },\n  { value: 'analysis_date' },\n  { value: 'reliability' },\n  { value: 'security' },\n  { value: 'security_review' },\n  { value: 'maintainability' },\n  { value: 'coverage' },\n  { value: 'duplications' },\n  { value: 'size' }\n];\n\nexport const SORTING_LEAK_METRICS: SortingOption[] = [\n  { value: 'name' },\n  { value: 'analysis_date' },\n  { value: 'new_reliability', class: 'projects-leak-sorting-option' },\n  { value: 'new_security', class: 'projects-leak-sorting-option' },\n  { value: 'new_security_review', class: 'projects-leak-sorting-option' },\n  { value: 'new_maintainability', class: 'projects-leak-sorting-option' },\n  { value: 'new_coverage', class: 'projects-leak-sorting-option' },\n  { value: 'new_duplications', class: 'projects-leak-sorting-option' },\n  { value: 'new_lines', class: 'projects-leak-sorting-option' }\n];\n\nexport const SORTING_SWITCH: T.Dict<string> = {\n  analysis_date: 'analysis_date',\n  name: 'name',\n  reliability: 'new_reliability',\n  security: 'new_security',\n  security_review: 'new_security_review',\n  maintainability: 'new_maintainability',\n  coverage: 'new_coverage',\n  duplications: 'new_duplications',\n  size: 'new_lines',\n  new_reliability: 'reliability',\n  new_security: 'security',\n  new_security_review: 'security_review',\n  new_maintainability: 'maintainability',\n  new_coverage: 'coverage',\n  new_duplications: 'duplications',\n  new_lines: 'size'\n};\n\nexport const VIEWS = [\n  { value: 'overall', label: 'overall' },\n  { value: 'leak', label: 'new_code' }\n];\n\nexport const VISUALIZATIONS = [\n  'risk',\n  'reliability',\n  'security',\n  'maintainability',\n  'coverage',\n  'duplications'\n];\n\nconst PAGE_SIZE = 50;\nconst PAGE_SIZE_VISUALIZATIONS = 99;\n\nconst METRICS = [\n  MetricKey.alert_status,\n  MetricKey.bugs,\n  MetricKey.reliability_rating,\n  MetricKey.vulnerabilities,\n  MetricKey.security_rating,\n  MetricKey.security_hotspots_reviewed,\n  MetricKey.security_review_rating,\n  MetricKey.code_smells,\n  MetricKey.sqale_rating,\n  MetricKey.duplicated_lines_density,\n  MetricKey.coverage,\n  MetricKey.ncloc,\n  MetricKey.ncloc_language_distribution,\n  MetricKey.projects\n];\n\nconst LEAK_METRICS = [\n  MetricKey.alert_status,\n  MetricKey.new_bugs,\n  MetricKey.new_reliability_rating,\n  MetricKey.new_vulnerabilities,\n  MetricKey.new_security_rating,\n  MetricKey.new_security_hotspots_reviewed,\n  MetricKey.new_security_review_rating,\n  MetricKey.new_code_smells,\n  MetricKey.new_maintainability_rating,\n  MetricKey.new_coverage,\n  MetricKey.new_duplicated_lines_density,\n  MetricKey.new_lines,\n  MetricKey.projects\n];\n\nconst METRICS_BY_VISUALIZATION: T.Dict<string[]> = {\n  risk: [\n    MetricKey.reliability_rating,\n    MetricKey.security_rating,\n    MetricKey.coverage,\n    MetricKey.ncloc,\n    MetricKey.sqale_index\n  ],\n  // x, y, size, color\n  reliability: [\n    MetricKey.ncloc,\n    MetricKey.reliability_remediation_effort,\n    MetricKey.bugs,\n    MetricKey.reliability_rating\n  ],\n  security: [\n    MetricKey.ncloc,\n    MetricKey.security_remediation_effort,\n    MetricKey.vulnerabilities,\n    MetricKey.security_rating\n  ],\n  maintainability: [\n    MetricKey.ncloc,\n    MetricKey.sqale_index,\n    MetricKey.code_smells,\n    MetricKey.sqale_rating\n  ],\n  coverage: [MetricKey.complexity, MetricKey.coverage, MetricKey.uncovered_lines],\n  duplications: [MetricKey.ncloc, MetricKey.duplicated_lines_density, MetricKey.duplicated_blocks]\n};\n\nexport const FACETS = [\n  'reliability_rating',\n  'security_rating',\n  'security_review_rating',\n  'sqale_rating',\n  'coverage',\n  'duplicated_lines_density',\n  'ncloc',\n  'alert_status',\n  'languages',\n  'tags',\n  'qualifier'\n];\n\nexport const LEAK_FACETS = [\n  'new_reliability_rating',\n  'new_security_rating',\n  'new_security_review_rating',\n  'new_maintainability_rating',\n  'new_coverage',\n  'new_duplicated_lines_density',\n  'new_lines',\n  'alert_status',\n  'languages',\n  'tags',\n  'qualifier'\n];\n\nconst REVERSED_FACETS = ['coverage', 'new_coverage'];\n\nexport function localizeSorting(sort?: string): string {\n  return translate('projects.sort', sort || 'name');\n}\n\nexport function parseSorting(sort: string): { sortValue: string; sortDesc: boolean } {\n  const desc = sort[0] === '-';\n  return { sortValue: desc ? sort.substr(1) : sort, sortDesc: desc };\n}\n\nexport function fetchProjects(query: Query, isFavorite: boolean, pageIndex = 1) {\n  const ps = query.view === 'visualizations' ? PAGE_SIZE_VISUALIZATIONS : PAGE_SIZE;\n  const data = convertToQueryData(query, isFavorite, {\n    p: pageIndex > 1 ? pageIndex : undefined,\n    ps,\n    facets: defineFacets(query).join(),\n    f: 'analysisDate,leakPeriodDate'\n  });\n  return searchProjects(data)\n    .then(response =>\n      Promise.all([fetchProjectMeasures(response.components, query), Promise.resolve(response)])\n    )\n    .then(([measures, { components, facets, paging }]) => {\n      return {\n        facets: getFacetsMap(facets),\n        projects: components.map(component => {\n          const componentMeasures: T.Dict<string> = {};\n          measures\n            .filter(measure => measure.component === component.key)\n            .forEach(measure => {\n              const value = isDiffMetric(measure.metric) ? measure.period?.value : measure.value;\n              if (value !== undefined) {\n                componentMeasures[measure.metric] = value;\n              }\n            });\n          return { ...component, measures: componentMeasures };\n        }),\n        total: paging.total\n      };\n    });\n}\n\nfunction defineMetrics(query: Query): string[] {\n  switch (query.view) {\n    case 'visualizations':\n      return METRICS_BY_VISUALIZATION[query.visualization || 'risk'];\n    case 'leak':\n      return LEAK_METRICS;\n    default:\n      return METRICS;\n  }\n}\n\nfunction defineFacets(query: Query): string[] {\n  if (query.view === 'leak') {\n    return LEAK_FACETS;\n  }\n  return FACETS;\n}\n\nfunction convertToQueryData(query: Query, isFavorite: boolean, defaultData = {}) {\n  const data: RequestData = { ...defaultData };\n  const filter = convertToFilter(query, isFavorite);\n  const sort = convertToSorting(query);\n\n  if (filter) {\n    data.filter = filter;\n  }\n  if (sort.s) {\n    data.s = sort.s;\n  }\n  if (sort.asc !== undefined) {\n    data.asc = sort.asc;\n  }\n  return data;\n}\n\nexport function fetchProjectMeasures(projects: Array<{ key: string }>, query: Query) {\n  if (!projects.length) {\n    return Promise.resolve([]);\n  }\n\n  const projectKeys = projects.map(project => project.key);\n  const metrics = defineMetrics(query);\n  return getMeasuresForProjects(projectKeys, metrics);\n}\n\nfunction mapFacetValues(values: Array<{ val: string; count: number }>) {\n  const map: T.Dict<number> = {};\n  values.forEach(value => {\n    map[value.val] = value.count;\n  });\n  return map;\n}\n\nconst propertyToMetricMap: T.Dict<string | undefined> = {\n  analysis_date: 'analysisDate',\n  reliability: 'reliability_rating',\n  new_reliability: 'new_reliability_rating',\n  security: 'security_rating',\n  new_security: 'new_security_rating',\n  security_review: 'security_review_rating',\n  new_security_review: 'new_security_review_rating',\n  maintainability: 'sqale_rating',\n  new_maintainability: 'new_maintainability_rating',\n  coverage: 'coverage',\n  new_coverage: 'new_coverage',\n  duplications: 'duplicated_lines_density',\n  new_duplications: 'new_duplicated_lines_density',\n  size: 'ncloc',\n  new_lines: 'new_lines',\n  gate: 'alert_status',\n  languages: 'languages',\n  tags: 'tags',\n  search: 'query',\n  qualifier: 'qualifier'\n};\n\nconst metricToPropertyMap = invert(propertyToMetricMap);\n\nfunction getFacetsMap(facets: Facet[]) {\n  const map: T.Dict<T.Dict<number>> = {};\n  facets.forEach(facet => {\n    const property = metricToPropertyMap[facet.property];\n    const { values } = facet;\n    if (REVERSED_FACETS.includes(property)) {\n      values.reverse();\n    }\n    map[property] = mapFacetValues(values);\n  });\n  return map;\n}\n\nfunction convertToSorting({ sort }: Query): { s?: string; asc?: boolean } {\n  if (sort && sort[0] === '-') {\n    return { s: propertyToMetricMap[sort.substr(1)], asc: false };\n  }\n  return { s: propertyToMetricMap[sort || ''] };\n}\n\nconst ONE_MINUTE = 60000;\nconst ONE_HOUR = 60 * ONE_MINUTE;\nconst ONE_DAY = 24 * ONE_HOUR;\nconst ONE_MONTH = 30 * ONE_DAY;\nconst ONE_YEAR = 12 * ONE_MONTH;\n\nfunction format(periods: Array<{ value: number; label: string }>) {\n  let result = '';\n  let count = 0;\n  let lastId = -1;\n  for (let i = 0; i < periods.length && count < 2; i++) {\n    if (periods[i].value > 0) {\n      count++;\n      if (lastId < 0 || lastId + 1 === i) {\n        lastId = i;\n        result += translateWithParameters(periods[i].label, periods[i].value) + ' ';\n      }\n    }\n  }\n  return result;\n}\n\nexport function formatDuration(ms: number) {\n  if (ms < ONE_MINUTE) {\n    return translate('duration.seconds');\n  }\n  const years = Math.floor(ms / ONE_YEAR);\n  ms -= years * ONE_YEAR;\n  const months = Math.floor(ms / ONE_MONTH);\n  ms -= months * ONE_MONTH;\n  const days = Math.floor(ms / ONE_DAY);\n  ms -= days * ONE_DAY;\n  const hours = Math.floor(ms / ONE_HOUR);\n  ms -= hours * ONE_HOUR;\n  const minutes = Math.floor(ms / ONE_MINUTE);\n  return format([\n    { value: years, label: 'duration.years' },\n    { value: months, label: 'duration.months' },\n    { value: days, label: 'duration.days' },\n    { value: hours, label: 'duration.hours' },\n    { value: minutes, label: 'duration.minutes' }\n  ]);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BubbleChart from '../../../components/charts/BubbleChart';\nimport ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { RATING_COLORS } from '../../../helpers/constants';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { isDefined } from '../../../helpers/types';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { ComponentQualifier } from '../../../types/component';\nimport { Project } from '../types';\n\ninterface Metric {\n  key: string;\n  type: string;\n}\n\ninterface Props {\n  colorMetric?: string;\n  helpText: string;\n  projects: Project[];\n  sizeMetric: Metric;\n  title?: string;\n  xMetric: Metric;\n  yDomain?: [number, number];\n  yMetric: Metric;\n}\n\ninterface State {\n  ratingFilters: { [rating: number]: boolean };\n}\n\nexport default class SimpleBubbleChart extends React.PureComponent<Props, State> {\n  state: State = {\n    ratingFilters: {}\n  };\n\n  getMetricTooltip(metric: Metric, value?: number) {\n    const name = translate('metric', metric.key, 'name');\n    const formattedValue = value != null ? formatMeasure(value, metric.type) : '\u2013';\n    return (\n      <div>\n        {name}\n        {': '}\n        {formattedValue}\n      </div>\n    );\n  }\n\n  getTooltip(project: Project, x?: number, y?: number, size?: number, color?: number) {\n    return (\n      <div className=\"text-left\">\n        <div className=\"little-spacer-bottom display-flex-center display-flex-space-between\">\n          <strong>{project.name}</strong>\n\n          {project.qualifier === ComponentQualifier.Application && (\n            <div className=\"big-spacer-left nowrap\">\n              <QualifierIcon\n                className=\"little-spacer-right\"\n                fill=\"currentColor\"\n                qualifier={ComponentQualifier.Application}\n              />\n              {translate('qualifier.APP')}\n            </div>\n          )}\n        </div>\n        {this.getMetricTooltip(this.props.xMetric, x)}\n        {this.getMetricTooltip(this.props.yMetric, y)}\n        {this.getMetricTooltip(this.props.sizeMetric, size)}\n        {/* if `color` is defined then `this.props.colorMetric` is defined too */}\n        {color && this.getMetricTooltip({ key: this.props.colorMetric!, type: 'RATING' }, color)}\n      </div>\n    );\n  }\n\n  handleRatingFilterClick = (selection: number) => {\n    this.setState(({ ratingFilters }) => {\n      return { ratingFilters: { ...ratingFilters, [selection]: !ratingFilters[selection] } };\n    });\n  };\n\n  render() {\n    const { xMetric, yMetric, sizeMetric, colorMetric } = this.props;\n    const { ratingFilters } = this.state;\n\n    const items = this.props.projects\n      .filter(project => colorMetric == null || project.measures[colorMetric] !== null)\n      .map(project => {\n        const x =\n          project.measures[xMetric.key] != null ? Number(project.measures[xMetric.key]) : undefined;\n        const y =\n          project.measures[yMetric.key] != null ? Number(project.measures[yMetric.key]) : undefined;\n        const size =\n          project.measures[sizeMetric.key] != null\n            ? Number(project.measures[sizeMetric.key])\n            : undefined;\n        const color = colorMetric ? Number(project.measures[colorMetric]) : undefined;\n\n        // Filter out items that match ratingFilters\n        if (color && ratingFilters[color]) {\n          return undefined;\n        }\n\n        return {\n          x: x || 0,\n          y: y || 0,\n          size: size || 0,\n          color: color ? RATING_COLORS[color - 1] : undefined,\n          key: project.key,\n          tooltip: this.getTooltip(project, x, y, size, color),\n          link: getProjectUrl(project.key)\n        };\n      })\n      .filter(isDefined);\n\n    const formatXTick = (tick: number) => formatMeasure(tick, xMetric.type);\n    const formatYTick = (tick: number) => formatMeasure(tick, yMetric.type);\n\n    return (\n      <div>\n        <BubbleChart\n          formatXTick={formatXTick}\n          formatYTick={formatYTick}\n          height={600}\n          items={items}\n          padding={[colorMetric ? 80 : 40, 20, 60, 100]}\n          yDomain={this.props.yDomain}\n        />\n        <div className=\"measure-details-bubble-chart-axis x\">\n          {translate('metric', xMetric.key, 'name')}\n        </div>\n        <div className=\"measure-details-bubble-chart-axis y\">\n          {translate('metric', yMetric.key, 'name')}\n        </div>\n        <div className=\"measure-details-bubble-chart-axis size\">\n          <span className=\"measure-details-bubble-chart-title\">\n            <span className=\"text-middle\">{this.props.title}</span>\n            <HelpTooltip className=\"spacer-left\" overlay={this.props.helpText} />\n          </span>\n          <div>\n            {colorMetric != null && (\n              <span className=\"spacer-right\">\n                {translateWithParameters(\n                  'component_measures.legend.color_x',\n                  translate('metric', colorMetric, 'name')\n                )}\n              </span>\n            )}\n            {translateWithParameters(\n              'component_measures.legend.size_x',\n              translate('metric', sizeMetric.key, 'name')\n            )}\n            {colorMetric != null && (\n              <ColorRatingsLegend\n                className=\"big-spacer-top\"\n                filters={ratingFilters}\n                onRatingClick={this.handleRatingFilterClick}\n              />\n            )}\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Project } from '../types';\nimport SimpleBubbleChart from './SimpleBubbleChart';\n\ninterface Props {\n  helpText: string;\n  projects: Project[];\n}\n\nexport default function Coverage(props: Props) {\n  return (\n    <SimpleBubbleChart\n      {...props}\n      sizeMetric={{ key: 'uncovered_lines', type: 'SHORT_INT' }}\n      title={translate('projects.visualization', 'coverage')}\n      xMetric={{ key: 'complexity', type: 'SHORT_INT' }}\n      yDomain={[100, 0]}\n      yMetric={{ key: 'coverage', type: 'PERCENT' }}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Project } from '../types';\nimport SimpleBubbleChart from './SimpleBubbleChart';\n\ninterface Props {\n  helpText: string;\n  projects: Project[];\n}\n\nexport default function Duplications(props: Props) {\n  return (\n    <SimpleBubbleChart\n      {...props}\n      sizeMetric={{ key: 'duplicated_blocks', type: 'SHORT_INT' }}\n      title={translate('projects.visualization', 'duplications')}\n      xMetric={{ key: 'ncloc', type: 'SHORT_INT' }}\n      yMetric={{ key: 'duplicated_lines_density', type: 'PERCENT' }}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Project } from '../types';\nimport SimpleBubbleChart from './SimpleBubbleChart';\n\ninterface Props {\n  helpText: string;\n  projects: Project[];\n}\n\nexport default function Maintainability(props: Props) {\n  return (\n    <SimpleBubbleChart\n      {...props}\n      colorMetric=\"sqale_rating\"\n      sizeMetric={{ key: 'code_smells', type: 'SHORT_INT' }}\n      title={translate('projects.visualization', 'maintainability')}\n      xMetric={{ key: 'ncloc', type: 'SHORT_INT' }}\n      yMetric={{ key: 'sqale_index', type: 'SHORT_WORK_DUR' }}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Project } from '../types';\nimport SimpleBubbleChart from './SimpleBubbleChart';\n\ninterface Props {\n  helpText: string;\n  projects: Project[];\n}\n\nexport default function Reliability(props: Props) {\n  return (\n    <SimpleBubbleChart\n      {...props}\n      colorMetric=\"reliability_rating\"\n      sizeMetric={{ key: 'bugs', type: 'SHORT_INT' }}\n      title={translate('projects.visualization', 'reliability')}\n      xMetric={{ key: 'ncloc', type: 'SHORT_INT' }}\n      yMetric={{ key: 'reliability_remediation_effort', type: 'SHORT_WORK_DUR' }}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BubbleChart from '../../../components/charts/BubbleChart';\nimport ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { RATING_COLORS } from '../../../helpers/constants';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { isDefined } from '../../../helpers/types';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { ComponentQualifier } from '../../../types/component';\nimport { Project } from '../types';\n\nconst X_METRIC = 'sqale_index';\nconst X_METRIC_TYPE = 'SHORT_WORK_DUR';\nconst Y_METRIC = 'coverage';\nconst Y_METRIC_TYPE = 'PERCENT';\nconst SIZE_METRIC = 'ncloc';\nconst SIZE_METRIC_TYPE = 'SHORT_INT';\nconst COLOR_METRIC_1 = 'reliability_rating';\nconst COLOR_METRIC_2 = 'security_rating';\nconst COLOR_METRIC_TYPE = 'RATING';\n\ninterface Props {\n  helpText: string;\n  projects: Project[];\n}\n\ninterface State {\n  ratingFilters: { [rating: number]: boolean };\n}\n\nexport default class Risk extends React.PureComponent<Props, State> {\n  state: State = {\n    ratingFilters: {}\n  };\n\n  getMetricTooltip(metric: { key: string; type: string }, value?: number) {\n    const name = translate('metric', metric.key, 'name');\n    const formattedValue = value != null ? formatMeasure(value, metric.type) : '\u2013';\n    return (\n      <div>\n        {name}\n        {': '}\n        {formattedValue}\n      </div>\n    );\n  }\n\n  getTooltip(\n    project: Project,\n    x?: number,\n    y?: number,\n    size?: number,\n    color1?: number,\n    color2?: number\n  ) {\n    return (\n      <div className=\"text-left\">\n        <div className=\"little-spacer-bottom display-flex-center display-flex-space-between\">\n          <strong>{project.name}</strong>\n\n          {project.qualifier === ComponentQualifier.Application && (\n            <div className=\"big-spacer-left nowrap\">\n              <QualifierIcon\n                className=\"little-spacer-right\"\n                fill=\"currentColor\"\n                qualifier={ComponentQualifier.Application}\n              />\n              {translate('qualifier.APP')}\n            </div>\n          )}\n        </div>\n        {this.getMetricTooltip({ key: COLOR_METRIC_1, type: COLOR_METRIC_TYPE }, color1)}\n        {this.getMetricTooltip({ key: COLOR_METRIC_2, type: COLOR_METRIC_TYPE }, color2)}\n        {this.getMetricTooltip({ key: Y_METRIC, type: Y_METRIC_TYPE }, y)}\n        {this.getMetricTooltip({ key: X_METRIC, type: X_METRIC_TYPE }, x)}\n        {this.getMetricTooltip({ key: SIZE_METRIC, type: SIZE_METRIC_TYPE }, size)}\n      </div>\n    );\n  }\n\n  handleRatingFilterClick = (selection: number) => {\n    this.setState(({ ratingFilters }) => {\n      return { ratingFilters: { ...ratingFilters, [selection]: !ratingFilters[selection] } };\n    });\n  };\n\n  render() {\n    const { ratingFilters } = this.state;\n\n    const items = this.props.projects\n      .map(project => {\n        const x =\n          project.measures[X_METRIC] != null ? Number(project.measures[X_METRIC]) : undefined;\n        const y =\n          project.measures[Y_METRIC] != null ? Number(project.measures[Y_METRIC]) : undefined;\n        const size =\n          project.measures[SIZE_METRIC] != null ? Number(project.measures[SIZE_METRIC]) : undefined;\n        const color1 =\n          project.measures[COLOR_METRIC_1] != null\n            ? Number(project.measures[COLOR_METRIC_1])\n            : undefined;\n        const color2 =\n          project.measures[COLOR_METRIC_2] != null\n            ? Number(project.measures[COLOR_METRIC_2])\n            : undefined;\n\n        const colorRating =\n          color1 !== undefined && color2 !== undefined ? Math.max(color1, color2) : undefined;\n\n        // Filter out items that match ratingFilters\n        if (colorRating !== undefined && ratingFilters[colorRating]) {\n          return undefined;\n        }\n\n        return {\n          x: x || 0,\n          y: y || 0,\n          size: size || 0,\n          color: colorRating !== undefined ? RATING_COLORS[colorRating - 1] : undefined,\n          key: project.key,\n          tooltip: this.getTooltip(project, x, y, size, color1, color2),\n          link: getProjectUrl(project.key)\n        };\n      })\n      .filter(isDefined);\n\n    const formatXTick = (tick: number) => formatMeasure(tick, X_METRIC_TYPE);\n    const formatYTick = (tick: number) => formatMeasure(tick, Y_METRIC_TYPE);\n\n    return (\n      <div>\n        <BubbleChart\n          formatXTick={formatXTick}\n          formatYTick={formatYTick}\n          height={600}\n          items={items}\n          padding={[80, 20, 60, 100]}\n          yDomain={[100, 0]}\n        />\n\n        <div className=\"measure-details-bubble-chart-axis x\">\n          {translate('metric', X_METRIC, 'name')}\n        </div>\n        <div className=\"measure-details-bubble-chart-axis y\">\n          {translate('metric', Y_METRIC, 'name')}\n        </div>\n        <div className=\"measure-details-bubble-chart-axis size\">\n          <span className=\"measure-details-bubble-chart-title\">\n            <span className=\"text-middle\">{translate('projects.visualization.risk')}</span>\n            <HelpTooltip className=\"spacer-left\" overlay={this.props.helpText} />\n          </span>\n          <div>\n            <span className=\"spacer-right\">\n              {translateWithParameters(\n                'component_measures.legend.color_x',\n                translate('projects.worse_of_reliablity_and_security')\n              )}\n            </span>\n            {translateWithParameters(\n              'component_measures.legend.size_x',\n              translate('metric', SIZE_METRIC, 'name')\n            )}\n            <ColorRatingsLegend\n              className=\"big-spacer-top\"\n              filters={ratingFilters}\n              onRatingClick={this.handleRatingFilterClick}\n            />\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { Project } from '../types';\nimport SimpleBubbleChart from './SimpleBubbleChart';\n\ninterface Props {\n  helpText: string;\n  projects: Project[];\n}\n\nexport default function Security(props: Props) {\n  return (\n    <SimpleBubbleChart\n      {...props}\n      colorMetric=\"security_rating\"\n      sizeMetric={{ key: 'vulnerabilities', type: 'SHORT_INT' }}\n      title={translate('projects.visualization', 'security')}\n      xMetric={{ key: 'ncloc', type: 'SHORT_INT' }}\n      yMetric={{ key: 'security_remediation_effort', type: 'SHORT_WORK_DUR' }}\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Project } from '../types';\nimport { localizeSorting } from '../utils';\nimport Coverage from './Coverage';\nimport Duplications from './Duplications';\nimport Maintainability from './Maintainability';\nimport Reliability from './Reliability';\nimport Risk from './Risk';\nimport Security from './Security';\n\ninterface Props {\n  projects: Project[];\n  sort?: string;\n  total?: number;\n  visualization: string;\n}\n\nexport default class Visualizations extends React.PureComponent<Props> {\n  renderVisualization(projects: Project[]) {\n    const visualizationToComponent: T.Dict<any> = {\n      risk: Risk,\n      reliability: Reliability,\n      security: Security,\n      maintainability: Maintainability,\n      coverage: Coverage,\n      duplications: Duplications\n    };\n    const Component = visualizationToComponent[this.props.visualization];\n\n    return Component ? (\n      <Component\n        helpText={translate('projects.visualization', this.props.visualization, 'description')}\n        projects={projects}\n      />\n    ) : null;\n  }\n\n  renderFooter() {\n    const { projects, total, sort } = this.props;\n\n    const limitReached = projects != null && total != null && projects.length < total;\n\n    return limitReached ? (\n      <footer className=\"projects-visualizations-footer\">\n        <p className=\"note spacer-top\">\n          {translateWithParameters(\n            'projects.limited_set_of_projects',\n            projects!.length,\n            localizeSorting(sort)\n          )}\n        </p>\n      </footer>\n    ) : null;\n  }\n\n  render() {\n    const { projects } = this.props;\n\n    return (\n      <div className=\"boxed-group projects-visualizations\">\n        <main className=\"projects-visualization\">\n          {projects != null && this.renderVisualization(projects)}\n        </main>\n        {this.renderFooter()}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  query: { search?: string };\n  onQueryChange: (change: { search?: string }) => void;\n}\n\nexport default class SearchFilterContainer extends React.PureComponent<Props> {\n  handleSearch = (search?: string) => {\n    this.props.onQueryChange({ search });\n  };\n\n  render() {\n    return (\n      <div className=\"projects-topbar-item projects-topbar-item-search\">\n        <SearchBox\n          minLength={2}\n          onChange={this.handleSearch}\n          placeholder={translate('projects.search')}\n          value={this.props.query.search || ''}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { createApplication } from '../../../api/application';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Radio from '../../../components/controls/Radio';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\nimport { ComponentQualifier, Visibility } from '../../../types/component';\n\ninterface Props {\n  onClose: () => void;\n  onCreate: (application: { key: string; qualifier: ComponentQualifier }) => Promise<void>;\n}\n\ninterface State {\n  description: string;\n  key: string;\n  name: string;\n  visibility: Visibility;\n}\n\nexport default class CreateApplicationForm extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      description: '',\n      key: '',\n      name: '',\n      visibility: Visibility.Public\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleDescriptionChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.setState({ description: event.currentTarget.value });\n  };\n\n  handleKeyChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ key: event.currentTarget.value });\n  };\n\n  handleNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleVisibilityChange = (visibility: Visibility) => {\n    this.setState({ visibility });\n  };\n\n  handleFormSubmit = () => {\n    const { name, description, key, visibility } = this.state;\n    return createApplication(name, description, key.length > 0 ? key : undefined, visibility).then(\n      ({ application }) => {\n        if (this.mounted) {\n          this.props.onCreate({\n            key: application.key,\n            qualifier: ComponentQualifier.Application\n          });\n        }\n      }\n    );\n  };\n\n  render() {\n    const { name, description, key, visibility } = this.state;\n    const header = translate('qualifiers.create.APP');\n    const submitDisabled = !this.state.name.length;\n\n    return (\n      <SimpleModal\n        header={header}\n        onClose={this.props.onClose}\n        onSubmit={this.handleFormSubmit}\n        size=\"small\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form className=\"views-form\" onSubmit={onFormSubmit}>\n            <div className=\"modal-head\">\n              <h2>{header}</h2>\n            </div>\n\n            <div className=\"modal-body\">\n              <MandatoryFieldsExplanation className=\"modal-field\" />\n\n              <div className=\"modal-field\">\n                <label htmlFor=\"view-edit-name\">\n                  {translate('name')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  autoFocus={true}\n                  id=\"view-edit-name\"\n                  maxLength={100}\n                  name=\"name\"\n                  onChange={this.handleNameChange}\n                  size={50}\n                  type=\"text\"\n                  value={name}\n                />\n              </div>\n              <div className=\"modal-field\">\n                <label htmlFor=\"view-edit-description\">{translate('description')}</label>\n                <textarea\n                  id=\"view-edit-description\"\n                  name=\"description\"\n                  onChange={this.handleDescriptionChange}\n                  value={description}\n                />\n              </div>\n              <div className=\"modal-field\">\n                <label htmlFor=\"view-edit-key\">{translate('key')}</label>\n                <input\n                  autoComplete=\"off\"\n                  id=\"view-edit-key\"\n                  maxLength={256}\n                  name=\"key\"\n                  onChange={this.handleKeyChange}\n                  size={256}\n                  type=\"text\"\n                  value={key}\n                />\n                <p className=\"modal-field-description\">\n                  {translate('onboarding.create_application.key.description')}\n                </p>\n              </div>\n\n              <div className=\"modal-field\">\n                <label>{translate('visibility')}</label>\n                <div className=\"little-spacer-top\">\n                  {[Visibility.Public, Visibility.Private].map(v => (\n                    <Radio\n                      className={`big-spacer-right visibility-${v}`}\n                      key={v}\n                      checked={visibility === v}\n                      value={v}\n                      onCheck={this.handleVisibilityChange}>\n                      {translate('visibility', v)}\n                    </Radio>\n                  ))}\n                </div>\n              </div>\n            </div>\n\n            <div className=\"modal-foot\">\n              <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n              <SubmitButton disabled={submitting || submitDisabled}>\n                {translate('create')}\n              </SubmitButton>\n              <ResetButtonLink\n                className=\"js-modal-close\"\n                id=\"view-edit-cancel\"\n                onClick={onCloseClick}>\n                {translate('cancel')}\n              </ResetButtonLink>\n            </div>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nexport enum Permissions {\n  Admin = 'admin',\n  ProjectCreation = 'provisioning',\n  ApplicationCreation = 'applicationcreator',\n  QualityGateAdmin = 'gateadmin'\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getComponentNavigation } from '../../../api/nav';\nimport CreateApplicationForm from '../../../app/components/extensions/CreateApplicationForm';\nimport { Button } from '../../../components/controls/buttons';\nimport { withAppState } from '../../../components/hoc/withAppState';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport { translate } from '../../../helpers/l10n';\nimport { getComponentAdminUrl, getComponentOverviewUrl } from '../../../helpers/urls';\nimport { hasGlobalPermission } from '../../../helpers/users';\nimport { ComponentQualifier } from '../../../types/component';\nimport { Permissions } from '../../../types/permissions';\n\nexport interface ApplicationCreationProps {\n  appState: Pick<T.AppState, 'qualifiers'>;\n  className?: string;\n  currentUser: T.LoggedInUser;\n  router: Router;\n}\n\nexport function ApplicationCreation(props: ApplicationCreationProps) {\n  const { appState, className, currentUser, router } = props;\n\n  const [showForm, setShowForm] = React.useState(false);\n\n  const canCreateApplication =\n    appState.qualifiers.includes(ComponentQualifier.Application) &&\n    hasGlobalPermission(currentUser, Permissions.ApplicationCreation);\n\n  if (!canCreateApplication) {\n    return null;\n  }\n\n  const handleComponentCreate = ({\n    key,\n    qualifier\n  }: {\n    key: string;\n    qualifier: ComponentQualifier;\n  }) => {\n    return getComponentNavigation({ component: key }).then(({ configuration }) => {\n      if (configuration && configuration.showSettings) {\n        router.push(getComponentAdminUrl(key, qualifier));\n      } else {\n        router.push(getComponentOverviewUrl(key, qualifier));\n      }\n      setShowForm(false);\n    });\n  };\n\n  return (\n    <div className={className}>\n      <Button className=\"button-primary\" onClick={() => setShowForm(true)}>\n        {translate('projects.create_application')}\n      </Button>\n\n      {showForm && (\n        <CreateApplicationForm\n          onClose={() => setShowForm(false)}\n          onCreate={handleComponentCreate}\n        />\n      )}\n    </div>\n  );\n}\n\nexport default withAppState(withCurrentUser(withRouter(ApplicationCreation)));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BubblesIcon from '../../../components/icons/BubblesIcon';\nimport ListIcon from '../../../components/icons/ListIcon';\n\nexport interface Option {\n  label: string;\n  type: string;\n  value: string;\n}\n\ninterface Props {\n  option: Option;\n  children?: React.ReactNode;\n  className?: string;\n  isFocused?: boolean;\n  onFocus: (option: Option, event: React.SyntheticEvent<HTMLElement>) => void;\n  onSelect: (option: Option, event: React.SyntheticEvent<HTMLElement>) => void;\n}\n\nexport default class PerspectiveSelectOption extends React.PureComponent<Props> {\n  handleMouseDown = (event: React.SyntheticEvent<HTMLElement>) => {\n    event.preventDefault();\n    event.stopPropagation();\n    this.props.onSelect(this.props.option, event);\n  };\n\n  handleMouseEnter = (event: React.SyntheticEvent<HTMLElement>) => {\n    this.props.onFocus(this.props.option, event);\n  };\n\n  handleMouseMove = (event: React.SyntheticEvent<HTMLElement>) => {\n    if (this.props.isFocused) {\n      return;\n    }\n    this.props.onFocus(this.props.option, event);\n  };\n\n  render() {\n    const { option } = this.props;\n    return (\n      <div\n        className={this.props.className}\n        onMouseDown={this.handleMouseDown}\n        onMouseEnter={this.handleMouseEnter}\n        onMouseMove={this.handleMouseMove}\n        title={option.label}>\n        <div>\n          {option.type === 'view' && <ListIcon className=\"little-spacer-right\" />}\n          {option.type === 'visualization' && <BubblesIcon className=\"little-spacer-right\" />}\n          {this.props.children}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport { translate } from '../../../helpers/l10n';\nimport { VIEWS, VISUALIZATIONS } from '../utils';\nimport PerspectiveSelectOption, { Option } from './PerspectiveSelectOption';\n\ninterface Props {\n  className?: string;\n  onChange: (x: { view: string; visualization?: string }) => void;\n  view: string;\n  visualization?: string;\n}\n\nexport default class PerspectiveSelect extends React.PureComponent<Props> {\n  handleChange = (option: Option) => {\n    if (option.type === 'view') {\n      this.props.onChange({ view: option.value });\n    } else if (option.type === 'visualization') {\n      this.props.onChange({ view: 'visualizations', visualization: option.value });\n    }\n  };\n\n  render() {\n    const { view, visualization } = this.props;\n    const perspective = view === 'visualizations' ? visualization : view;\n    const options = [\n      ...VIEWS.map(opt => ({\n        type: 'view',\n        value: opt.value,\n        label: translate('projects.view', opt.label)\n      })),\n      ...VISUALIZATIONS.map(opt => ({\n        type: 'visualization',\n        value: opt,\n        label: translate('projects.visualization', opt)\n      }))\n    ];\n    return (\n      <div className={this.props.className}>\n        <label>{translate('projects.perspective')}:</label>\n        <Select\n          className=\"little-spacer-left input-medium\"\n          clearable={false}\n          onChange={this.handleChange}\n          optionComponent={PerspectiveSelectOption}\n          options={options}\n          searchable={false}\n          value={perspective}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ChevronsIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M6.27 11.07L3.2 8l3.07-3.07L5.33 4l-4 4 4 4 .94-.93zm3.46 0L12.8 8 9.73 4.93l.94-.93 4 4-4 4-.94-.93z\"\n        fill={fill}\n        fillRule=\"nonzero\"\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport ChevronsIcon from '../../../components/icons/ChevronsIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { AlmKeys } from '../../../types/alm-settings';\n\nexport interface ProjectCreationMenuItemProps {\n  alm: string;\n}\n\nexport default function ProjectCreationMenuItem(props: ProjectCreationMenuItemProps) {\n  const { alm } = props;\n  let almIcon = alm;\n  if (alm === AlmKeys.BitbucketCloud) {\n    almIcon = 'bitbucket';\n  }\n  return (\n    <Link\n      className=\"display-flex-center\"\n      to={{ pathname: '/projects/create', query: { mode: alm } }}>\n      {alm === 'manual' ? (\n        <ChevronsIcon className=\"spacer-right\" />\n      ) : (\n        <img\n          alt={alm}\n          className=\"spacer-right\"\n          width={16}\n          src={`${getBaseUrl()}/images/alm/${almIcon}.svg`}\n        />\n      )}\n      {translate('my_account.add_project', alm)}\n    </Link>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { getAlmSettings } from '../../../api/alm-settings';\nimport { Button } from '../../../components/controls/buttons';\nimport Dropdown from '../../../components/controls/Dropdown';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport EllipsisIcon from '../../../components/icons/EllipsisIcon';\nimport { IMPORT_COMPATIBLE_ALMS, IMPORT_COMPATIBLE_ALM_COUNT } from '../../../helpers/constants';\nimport { translate } from '../../../helpers/l10n';\nimport { hasGlobalPermission } from '../../../helpers/users';\nimport { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';\nimport { Permissions } from '../../../types/permissions';\nimport ProjectCreationMenuItem from './ProjectCreationMenuItem';\n\ninterface Props {\n  className?: string;\n  currentUser: T.LoggedInUser;\n}\n\ninterface State {\n  boundAlms: Array<string>;\n}\n\nconst almSettingsValidators = {\n  [AlmKeys.Azure]: (settings: AlmSettingsInstance) => !!settings.url,\n  [AlmKeys.BitbucketServer]: (_: AlmSettingsInstance) => true,\n  [AlmKeys.BitbucketCloud]: (_: AlmSettingsInstance) => true,\n  [AlmKeys.GitHub]: (_: AlmSettingsInstance) => true,\n  [AlmKeys.GitLab]: (settings: AlmSettingsInstance) => !!settings.url\n};\n\nexport class ProjectCreationMenu extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { boundAlms: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n\n    this.fetchAlmBindings();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  almSettingIsValid = (settings: AlmSettingsInstance) => {\n    return almSettingsValidators[settings.alm](settings);\n  };\n\n  fetchAlmBindings = async () => {\n    const { currentUser } = this.props;\n    const canCreateProject = hasGlobalPermission(currentUser, Permissions.ProjectCreation);\n\n    // getAlmSettings requires branchesEnabled\n    if (!canCreateProject) {\n      return;\n    }\n\n    const almSettings: AlmSettingsInstance[] = await getAlmSettings().catch(() => []);\n\n    // Import is only available if exactly one binding is configured\n    const boundAlms = IMPORT_COMPATIBLE_ALMS.filter(key => {\n      let currentAlmSettings: AlmSettingsInstance[];\n      if (key === AlmKeys.BitbucketServer || key === AlmKeys.BitbucketCloud) {\n        currentAlmSettings = almSettings.filter(\n          s => s.alm === AlmKeys.BitbucketCloud || s.alm === AlmKeys.BitbucketServer\n        );\n      } else {\n        currentAlmSettings = almSettings.filter(s => s.alm === key);\n      }\n      return (\n        currentAlmSettings.length === 1 &&\n        key === currentAlmSettings[0].alm &&\n        this.almSettingIsValid(currentAlmSettings[0])\n      );\n    });\n\n    if (this.mounted) {\n      this.setState({\n        boundAlms\n      });\n    }\n  };\n\n  render() {\n    const { className, currentUser } = this.props;\n    const { boundAlms } = this.state;\n\n    const canCreateProject = hasGlobalPermission(currentUser, Permissions.ProjectCreation);\n\n    if (!canCreateProject) {\n      return null;\n    }\n\n    return (\n      <Dropdown\n        className={className}\n        onOpen={this.fetchAlmBindings}\n        overlay={\n          <ul className=\"menu\">\n            {[...boundAlms, 'manual'].map(alm => (\n              <li className=\"little-spacer-bottom\" key={alm}>\n                <ProjectCreationMenuItem alm={alm} />\n              </li>\n            ))}\n            {boundAlms.length < IMPORT_COMPATIBLE_ALM_COUNT && (\n              <li className=\"bordered-top little-padded-top\">\n                <Link className=\"display-flex-center\" to={{ pathname: '/projects/create' }}>\n                  <EllipsisIcon className=\"spacer-right\" size={16} />\n                  {translate('more')}\n                </Link>\n              </li>\n            )}\n          </ul>\n        }>\n        <Button className=\"button-primary\">\n          {translate('projects.add')}\n          <DropdownIcon className=\"spacer-left \" />\n        </Button>\n      </Dropdown>\n    );\n  }\n}\n\nexport default withCurrentUser(ProjectCreationMenu);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function SortAscIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M6.571 12.857q0 0.107-0.089 0.214l-2.848 2.848q-0.089 0.080-0.205 0.080-0.107 0-0.205-0.080l-2.857-2.857q-0.134-0.143-0.063-0.313 0.071-0.179 0.268-0.179h1.714v-12.286q0-0.125 0.080-0.205t0.205-0.080h1.714q0.125 0 0.205 0.080t0.080 0.205v12.286h1.714q0.125 0 0.205 0.080t0.080 0.205zM16 14v1.714q0 0.125-0.080 0.205t-0.205 0.080h-7.429q-0.125 0-0.205-0.080t-0.080-0.205v-1.714q0-0.125 0.080-0.205t0.205-0.080h7.429q0.125 0 0.205 0.080t0.080 0.205zM14.286 9.429v1.714q0 0.125-0.080 0.205t-0.205 0.080h-5.714q-0.125 0-0.205-0.080t-0.080-0.205v-1.714q0-0.125 0.080-0.205t0.205-0.080h5.714q0.125 0 0.205 0.080t0.080 0.205zM12.571 4.857v1.714q0 0.125-0.080 0.205t-0.205 0.080h-4q-0.125 0-0.205-0.080t-0.080-0.205v-1.714q0-0.125 0.080-0.205t0.205-0.080h4q0.125 0 0.205 0.080t0.080 0.205zM10.857 0.286v1.714q0 0.125-0.080 0.205t-0.205 0.080h-2.286q-0.125 0-0.205-0.080t-0.080-0.205v-1.714q0-0.125 0.080-0.205t0.205-0.080h2.286q0.125 0 0.205 0.080t0.080 0.205z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function SortDescIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M10.857 14v1.714q0 0.125-0.080 0.205t-0.205 0.080h-2.286q-0.125 0-0.205-0.080t-0.080-0.205v-1.714q0-0.125 0.080-0.205t0.205-0.080h2.286q0.125 0 0.205 0.080t0.080 0.205zM6.571 12.857q0 0.107-0.089 0.214l-2.848 2.848q-0.089 0.080-0.205 0.080-0.107 0-0.205-0.080l-2.857-2.857q-0.134-0.143-0.063-0.313 0.071-0.179 0.268-0.179h1.714v-12.286q0-0.125 0.080-0.205t0.205-0.080h1.714q0.125 0 0.205 0.080t0.080 0.205v12.286h1.714q0.125 0 0.205 0.080t0.080 0.205zM12.571 9.429v1.714q0 0.125-0.080 0.205t-0.205 0.080h-4q-0.125 0-0.205-0.080t-0.080-0.205v-1.714q0-0.125 0.080-0.205t0.205-0.080h4q0.125 0 0.205 0.080t0.080 0.205zM14.286 4.857v1.714q0 0.125-0.080 0.205t-0.205 0.080h-5.714q-0.125 0-0.205-0.080t-0.080-0.205v-1.714q0-0.125 0.080-0.205t0.205-0.080h5.714q0.125 0 0.205 0.080t0.080 0.205zM16 0.286v1.714q0 0.125-0.080 0.205t-0.205 0.080h-7.429q-0.125 0-0.205-0.080t-0.080-0.205v-1.714q0-0.125 0.080-0.205t0.205-0.080h7.429q0.125 0 0.205 0.080t0.080 0.205z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nexport interface Option {\n  label: string;\n  value: string;\n  class?: string;\n  short?: string;\n}\n\ninterface Props {\n  option: Option;\n  children?: React.ReactNode;\n  className?: string;\n  isFocused?: boolean;\n  onFocus: (option: Option, event: React.SyntheticEvent<HTMLElement>) => void;\n  onSelect: (option: Option, event: React.SyntheticEvent<HTMLElement>) => void;\n}\n\nexport default class ProjectsSortingSelectOption extends React.PureComponent<Props> {\n  handleMouseDown = (event: React.SyntheticEvent<HTMLElement>) => {\n    event.preventDefault();\n    event.stopPropagation();\n    this.props.onSelect(this.props.option, event);\n  };\n\n  handleMouseEnter = (event: React.SyntheticEvent<HTMLElement>) => {\n    this.props.onFocus(this.props.option, event);\n  };\n\n  handleMouseMove = (event: React.SyntheticEvent<HTMLElement>) => {\n    if (this.props.isFocused) {\n      return;\n    }\n    this.props.onFocus(this.props.option, event);\n  };\n\n  render() {\n    const { option } = this.props;\n    return (\n      <div\n        className={classNames(this.props.className, option.class)}\n        onMouseDown={this.handleMouseDown}\n        onMouseEnter={this.handleMouseEnter}\n        onMouseMove={this.handleMouseMove}\n        title={option.label}>\n        {option.short ? option.short : this.props.children}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { colors } from '../../../app/theme';\nimport { ButtonIcon } from '../../../components/controls/buttons';\nimport Select from '../../../components/controls/Select';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport SortAscIcon from '../../../components/icons/SortAscIcon';\nimport SortDescIcon from '../../../components/icons/SortDescIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { parseSorting, SORTING_LEAK_METRICS, SORTING_METRICS } from '../utils';\nimport ProjectsSortingSelectOption, { Option } from './ProjectsSortingSelectOption';\n\ninterface Props {\n  className?: string;\n  defaultOption: string;\n  onChange: (sort: string, desc: boolean) => void;\n  selectedSort: string;\n  view: string;\n}\n\nexport default class ProjectsSortingSelect extends React.PureComponent<Props> {\n  getSorting = () => parseSorting(this.props.selectedSort);\n\n  getOptions = () => {\n    const sortMetrics = this.props.view === 'leak' ? SORTING_LEAK_METRICS : SORTING_METRICS;\n    return sortBy(sortMetrics, option => (option.value === this.props.defaultOption ? 0 : 1)).map(\n      option => ({\n        value: option.value,\n        label: translate('projects.sorting', option.value),\n        class: option.class\n      })\n    );\n  };\n\n  handleDescToggle = () => {\n    const sorting = this.getSorting();\n    this.props.onChange(sorting.sortValue, !sorting.sortDesc);\n  };\n\n  handleSortChange = (option: Option) =>\n    this.props.onChange(option.value, this.getSorting().sortDesc);\n\n  render() {\n    const { sortDesc, sortValue } = this.getSorting();\n\n    return (\n      <div className={this.props.className}>\n        <label>{translate('projects.sort_by')}:</label>\n        <Select\n          className=\"little-spacer-left input-medium\"\n          clearable={false}\n          onChange={this.handleSortChange}\n          optionComponent={ProjectsSortingSelectOption}\n          options={this.getOptions()}\n          searchable={false}\n          value={sortValue}\n        />\n        <Tooltip\n          overlay={\n            sortDesc ? translate('projects.sort_descending') : translate('projects.sort_ascending')\n          }>\n          <ButtonIcon\n            className=\"js-projects-sorting-invert spacer-left\"\n            color={colors.gray60}\n            onClick={this.handleDescToggle}>\n            {sortDesc ? <SortDescIcon className=\"\" /> : <SortAscIcon className=\"\" />}\n          </ButtonIcon>\n        </Tooltip>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport HomePageSelect from '../../../components/controls/HomePageSelect';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { isLoggedIn } from '../../../helpers/users';\nimport SearchFilterContainer from '../filters/SearchFilterContainer';\nimport { Project } from '../types';\nimport ApplicationCreation from './ApplicationCreation';\nimport PerspectiveSelect from './PerspectiveSelect';\nimport ProjectCreationMenu from './ProjectCreationMenu';\nimport ProjectsSortingSelect from './ProjectsSortingSelect';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  loading: boolean;\n  onPerspectiveChange: (x: { view: string; visualization?: string }) => void;\n  onQueryChange: (change: T.RawQuery) => void;\n  onSortChange: (sort: string, desc: boolean) => void;\n  projects?: Project[];\n  query: T.RawQuery;\n  selectedSort: string;\n  total?: number;\n  view: string;\n  visualization?: string;\n}\n\nexport default function PageHeader(props: Props) {\n  const { loading, total, projects, currentUser, view } = props;\n  const limitReached = projects != null && total != null && projects.length < total;\n  const defaultOption = isLoggedIn(currentUser) ? 'name' : 'analysis_date';\n\n  const sortingDisabled = view === 'visualizations' && !limitReached;\n\n  return (\n    <div className=\"page-header\">\n      <div className=\"display-flex-space-between spacer-top\">\n        <SearchFilterContainer onQueryChange={props.onQueryChange} query={props.query} />\n        <div className=\"display-flex-center\">\n          <ProjectCreationMenu className=\"little-spacer-right\" />\n          <ApplicationCreation className=\"little-spacer-right\" />\n          <HomePageSelect\n            className=\"spacer-left little-spacer-right\"\n            currentPage={{ type: 'PROJECTS' }}\n          />\n        </div>\n      </div>\n      <div className=\"big-spacer-top display-flex-space-between\">\n        <div\n          className={classNames('display-flex-center', {\n            'is-loading': loading\n          })}>\n          {total != null && (\n            <span className=\"projects-total-label\">\n              <strong id=\"projects-total\">{total}</strong> {translate('projects._projects')}\n            </span>\n          )}\n        </div>\n\n        <div className=\"display-flex-center\">\n          <PerspectiveSelect\n            className=\"projects-topbar-item js-projects-perspective-select\"\n            onChange={props.onPerspectiveChange}\n            view={props.view}\n            visualization={props.visualization}\n          />\n\n          <Tooltip overlay={sortingDisabled ? translate('projects.sort.disabled') : undefined}>\n            <div className={classNames('projects-topbar-item', { disabled: sortingDisabled })}>\n              <ProjectsSortingSelect\n                className=\"js-projects-sorting-select\"\n                defaultOption={defaultOption}\n                onChange={props.onSortChange}\n                selectedSort={props.selectedSort}\n                view={props.view}\n              />\n            </div>\n          </Tooltip>\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nfunction checkNumberRating(coverageRating: number): void {\n  if (!(typeof coverageRating === 'number' && coverageRating > 0 && coverageRating < 6)) {\n    throw new Error(`Unknown number rating: \"${coverageRating}\"`);\n  }\n}\n\nexport function getCoverageRatingLabel(rating: number): string {\n  checkNumberRating(rating);\n  const mapping = ['\u2265 80%', '70% - 80%', '50% - 70%', '30% - 50%', '< 30%'];\n  return mapping[rating - 1];\n}\n\nexport function getCoverageRatingAverageValue(rating: number): number {\n  checkNumberRating(rating);\n  const mapping = [90, 75, 60, 40, 15];\n  return mapping[rating - 1];\n}\n\nexport function getDuplicationsRatingLabel(rating: number): string {\n  checkNumberRating(rating);\n  const mapping = ['< 3%', '3% - 5%', '5% - 10%', '10% - 20%', '> 20%'];\n  return mapping[rating - 1];\n}\n\nexport function getDuplicationsRatingAverageValue(rating: number): number {\n  checkNumberRating(rating);\n  const mapping = [1.5, 4, 7.5, 15, 30];\n  return mapping[rating - 1];\n}\n\nexport function getSizeRatingLabel(rating: number): string {\n  checkNumberRating(rating);\n  const mapping = ['< 1k', '1k - 10k', '10k - 100k', '100k - 500k', '> 500k'];\n  return mapping[rating - 1];\n}\n\nexport function getSizeRatingAverageValue(rating: number): number {\n  checkNumberRating(rating);\n  const mapping = [500, 5000, 50000, 250000, 750000];\n  return mapping[rating - 1];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { Facet } from '../types';\n\nexport type Option = string | number;\n\ninterface Props {\n  property: string;\n  className?: string;\n  onQueryChange: (change: T.RawQuery) => void;\n  options: Option[];\n  renderOption: (option: Option, isSelected: boolean) => React.ReactNode;\n\n  value?: Option | Option[];\n  facet?: Facet;\n  maxFacetValue?: number;\n  optionClassName?: string;\n\n  getFacetValueForOption?: (facet: Facet, option: Option) => number;\n\n  halfWidth?: boolean;\n  highlightUnder?: number;\n  highlightUnderMax?: number;\n\n  header?: React.ReactNode;\n  footer?: React.ReactNode;\n}\n\nconst defaultGetFacetValueForOption = (facet: Facet, option: string | number) => facet[option];\n\nexport default class Filter extends React.PureComponent<Props> {\n  isSelected(option: Option): boolean {\n    const { value } = this.props;\n    return Array.isArray(value) ? value.includes(option) : String(option) === String(value);\n  }\n\n  highlightUnder(option?: Option): boolean {\n    return (\n      this.props.highlightUnder != null &&\n      option != null &&\n      option > this.props.highlightUnder &&\n      (this.props.highlightUnderMax == null || option < this.props.highlightUnderMax)\n    );\n  }\n\n  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n\n    const { property, value } = this.props;\n    const { key: option } = event.currentTarget.dataset;\n    let urlOption;\n\n    if (option) {\n      if (Array.isArray(value) && (event.ctrlKey || event.metaKey)) {\n        if (this.isSelected(option)) {\n          urlOption = value.length > 1 ? value.filter(val => val !== option).join(',') : null;\n        } else {\n          urlOption = value.concat(option).join(',');\n        }\n      } else {\n        urlOption =\n          this.isSelected(option) && (!Array.isArray(value) || value.length < 2) ? null : option;\n      }\n\n      this.props.onQueryChange({ [property]: urlOption });\n    }\n  };\n\n  renderOptionBar(facetValue: number | undefined) {\n    if (facetValue === undefined || !this.props.maxFacetValue) {\n      return null;\n    }\n    return (\n      <div className=\"projects-facet-bar\">\n        <div\n          className=\"projects-facet-bar-inner\"\n          style={{ width: (facetValue / this.props.maxFacetValue) * 60 }}\n        />\n      </div>\n    );\n  }\n\n  renderOption(option: Option) {\n    const { facet, getFacetValueForOption = defaultGetFacetValueForOption, value } = this.props;\n    const className = classNames(\n      'facet',\n      'search-navigator-facet',\n      'projects-facet',\n      {\n        active: this.isSelected(option),\n        'search-navigator-facet-half': this.props.halfWidth\n      },\n      this.props.optionClassName\n    );\n\n    const facetValue =\n      facet && getFacetValueForOption ? getFacetValueForOption(facet, option) : undefined;\n\n    const isUnderSelectedOption =\n      typeof value === 'number' &&\n      typeof option === 'number' &&\n      this.highlightUnder(value) &&\n      option > value;\n\n    return (\n      <a className={className} data-key={option} href=\"#\" key={option} onClick={this.handleClick}>\n        <span className=\"facet-name\">\n          {this.props.renderOption(option, this.isSelected(option) || isUnderSelectedOption)}\n        </span>\n        {facetValue != null && (\n          <span className=\"facet-stat\">\n            {formatMeasure(facetValue, 'SHORT_INT')}\n            {this.renderOptionBar(facetValue)}\n          </span>\n        )}\n      </a>\n    );\n  }\n\n  renderOptions = () => {\n    const { options, highlightUnder } = this.props;\n    if (options && options.length > 0) {\n      if (highlightUnder != null) {\n        const max = this.props.highlightUnderMax || options.length;\n        const beforeHighlight = options.slice(0, highlightUnder);\n        const insideHighlight = options.slice(highlightUnder, max);\n        const afterHighlight = options.slice(max);\n        return (\n          <div className=\"search-navigator-facet-list projects-facet-list\">\n            {beforeHighlight.map(option => this.renderOption(option))}\n            <div className=\"search-navigator-facet-highlight-under-container\">\n              {insideHighlight.map(option => this.renderOption(option))}\n            </div>\n            {afterHighlight.map(option => this.renderOption(option))}\n          </div>\n        );\n      } else {\n        return (\n          <div className=\"search-navigator-facet-list projects-facet-list\">\n            {options.map(option => this.renderOption(option))}\n          </div>\n        );\n      }\n    } else {\n      return <div className=\"search-navigator-facet-empty\">{translate('no_results')}</div>;\n    }\n  };\n\n  render() {\n    return (\n      <div\n        className={classNames('search-navigator-facet-box', this.props.className)}\n        data-key={this.props.property}>\n        {this.props.header}\n        {this.renderOptions()}\n        {this.props.footer}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\ninterface Props {\n  children?: React.ReactNode;\n  name: string;\n}\n\nexport default function FilterHeader(props: Props) {\n  return (\n    <div className=\"search-navigator-facet-header projects-facet-header\">\n      <h3 className=\"h4\">{props.name}</h3>\n      {props.children}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CoverageRating from '../../../components/ui/CoverageRating';\nimport { translate } from '../../../helpers/l10n';\nimport { getCoverageRatingAverageValue, getCoverageRatingLabel } from '../../../helpers/ratings';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\n\nexport interface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  property?: string;\n  value?: any;\n}\n\nexport default function CoverageFilter(props: Props) {\n  const { property = 'coverage' } = props;\n\n  return (\n    <Filter\n      className={props.className}\n      facet={props.facet}\n      getFacetValueForOption={getFacetValueForOption}\n      header={<FilterHeader name={translate('metric_domain.Coverage')} />}\n      highlightUnder={1}\n      highlightUnderMax={5}\n      maxFacetValue={props.maxFacetValue}\n      onQueryChange={props.onQueryChange}\n      options={[1, 2, 3, 4, 5, 6]}\n      property={property}\n      renderOption={renderOption}\n      value={props.value}\n    />\n  );\n}\n\nfunction getFacetValueForOption(facet: Facet, option: number): number {\n  const map = ['80.0-*', '70.0-80.0', '50.0-70.0', '30.0-50.0', '*-30.0', 'NO_DATA'];\n  return facet[map[option - 1]];\n}\n\nfunction renderOption(option: number, selected: boolean) {\n  return (\n    <span>\n      {option < 6 && (\n        <CoverageRating\n          muted={!selected}\n          size=\"small\"\n          value={getCoverageRatingAverageValue(option)}\n        />\n      )}\n      <span className=\"spacer-left\">\n        {option < 6 ? (\n          getCoverageRatingLabel(option)\n        ) : (\n          <span className=\"big-spacer-left\">{translate('no_data')}</span>\n        )}\n      </span>\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DuplicationsRating from '../../../components/ui/DuplicationsRating';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  getDuplicationsRatingAverageValue,\n  getDuplicationsRatingLabel\n} from '../../../helpers/ratings';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\n\nexport interface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  property?: string;\n  value?: any;\n}\n\nexport default function DuplicationsFilter(props: Props) {\n  const { property = 'duplications' } = props;\n  return (\n    <Filter\n      className={props.className}\n      facet={props.facet}\n      getFacetValueForOption={getFacetValueForOption}\n      header={<FilterHeader name={translate('metric_domain.Duplications')} />}\n      highlightUnder={1}\n      highlightUnderMax={5}\n      maxFacetValue={props.maxFacetValue}\n      onQueryChange={props.onQueryChange}\n      options={[1, 2, 3, 4, 5, 6]}\n      property={property}\n      renderOption={renderOption}\n      value={props.value}\n    />\n  );\n}\n\nfunction getFacetValueForOption(facet: Facet, option: number) {\n  const map = ['*-3.0', '3.0-5.0', '5.0-10.0', '10.0-20.0', '20.0-*', 'NO_DATA'];\n  return facet[map[option - 1]];\n}\n\nfunction renderOption(option: number, selected: boolean) {\n  return (\n    <span>\n      {option < 6 && (\n        <DuplicationsRating\n          muted={!selected}\n          size=\"small\"\n          value={getDuplicationsRatingAverageValue(option)}\n        />\n      )}\n      <span className=\"spacer-left\">\n        {option < 6 ? (\n          getDuplicationsRatingLabel(option)\n        ) : (\n          <span className=\"big-spacer-left\">{translate('no_data')}</span>\n        )}\n      </span>\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  isFavorite?: boolean;\n  isLoading?: boolean;\n  onInputChange?: (query: string) => void;\n  onOpen?: () => void;\n  onQueryChange: (change: T.RawQuery) => void;\n  options: Array<{ label: string; value: string }>;\n  property: string;\n  query: T.Dict<any>;\n}\n\nexport default class SearchableFilterFooter extends React.PureComponent<Props> {\n  handleOptionChange = ({ value }: { value: string }) => {\n    const urlOptions = (this.props.query[this.props.property] || []).concat(value).join(',');\n    this.props.onQueryChange({ [this.props.property]: urlOptions });\n  };\n\n  render() {\n    return (\n      <div className=\"search-navigator-facet-footer projects-facet-footer\">\n        <Select\n          className=\"input-super-large\"\n          clearable={false}\n          isLoading={this.props.isLoading}\n          onChange={this.handleOptionChange}\n          onInputChange={this.props.onInputChange}\n          onOpen={this.props.onOpen}\n          options={this.props.options}\n          placeholder={translate('search_verb')}\n          searchable={true}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  option?: { name: string };\n  optionKey: string;\n}\n\nexport default function SearchableFilterOption(props: Props) {\n  const optionName = props.option ? props.option.name : props.optionKey;\n  return <span>{props.optionKey !== '<null>' ? optionName : translate('unknown')}</span>;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { difference, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { getLanguageByKey } from '../../../store/languages';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\nimport SearchableFilterFooter from './SearchableFilterFooter';\nimport SearchableFilterOption from './SearchableFilterOption';\n\ninterface Props {\n  facet?: Facet;\n  languages: T.Languages;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  property?: string;\n  query: T.Dict<any>;\n  value?: string[];\n}\n\nexport default class LanguagesFilter extends React.Component<Props> {\n  getSearchOptions = () => {\n    const { facet, languages } = this.props;\n    let languageKeys = Object.keys(languages);\n    if (facet) {\n      languageKeys = difference(languageKeys, Object.keys(facet));\n    }\n    return languageKeys.map(key => ({ label: languages[key].name, value: key }));\n  };\n\n  getSortedOptions = (facet: Facet = {}) =>\n    sortBy(Object.keys(facet), [(option: string) => -facet[option], (option: string) => option]);\n\n  renderOption = (option: string) => (\n    <SearchableFilterOption\n      option={getLanguageByKey(this.props.languages, option)}\n      optionKey={option}\n    />\n  );\n\n  render() {\n    const { property = 'languages' } = this.props;\n\n    return (\n      <Filter\n        facet={this.props.facet}\n        footer={\n          <SearchableFilterFooter\n            onQueryChange={this.props.onQueryChange}\n            options={this.getSearchOptions()}\n            property={property}\n            query={this.props.query}\n          />\n        }\n        header={<FilterHeader name={translate('projects.facets.languages')} />}\n        maxFacetValue={this.props.maxFacetValue}\n        onQueryChange={this.props.onQueryChange}\n        options={this.getSortedOptions(this.props.facet)}\n        property={property}\n        renderOption={this.renderOption}\n        value={this.props.value}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { getLanguages, Store } from '../../../store/rootReducer';\nimport LanguagesFilter from './LanguagesFilter';\n\nconst stateToProps = (state: Store) => ({\n  languages: getLanguages(state)\n});\n\nexport default connect(stateToProps)(LanguagesFilter);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Rating from '../../../components/ui/Rating';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\n\ninterface Props {\n  className?: string;\n  facet?: Facet;\n  headerDetail?: React.ReactNode;\n  maxFacetValue?: number;\n  name: string;\n  onQueryChange: (change: T.RawQuery) => void;\n  property: string;\n  value?: any;\n}\n\nexport default function IssuesFilter(props: Props) {\n  return (\n    <Filter\n      className={props.className}\n      facet={props.facet}\n      header={\n        <FilterHeader name={translate('metric_domain', props.name)}>\n          {props.headerDetail}\n        </FilterHeader>\n      }\n      highlightUnder={1}\n      maxFacetValue={props.maxFacetValue}\n      onQueryChange={props.onQueryChange}\n      options={[1, 2, 3, 4, 5]}\n      property={props.property}\n      renderOption={renderOption}\n      value={props.value}\n    />\n  );\n}\n\nfunction renderOption(option: number, selected: boolean) {\n  return (\n    <span>\n      <Rating muted={!selected} small={true} value={option} />\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CodeSmellIcon from '../../../components/icons/CodeSmellIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport IssuesFilter from './IssuesFilter';\n\ninterface Props {\n  className?: string;\n  facet?: Facet;\n  headerDetail?: React.ReactNode;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  value?: any;\n}\n\nexport default function MaintainabilityFilter(props: Props) {\n  return (\n    <IssuesFilter\n      {...props}\n      headerDetail={\n        <span className=\"note little-spacer-left\">\n          {'( '}\n          <CodeSmellIcon className=\"little-spacer-right\" />\n          {translate('metric.code_smells.name')}\n          {' )'}\n        </span>\n      }\n      name=\"Maintainability\"\n      property=\"maintainability\"\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CoverageFilter, { Props } from './CoverageFilter';\n\nexport default function NewCoverageFilter(props: Props) {\n  return <CoverageFilter {...props} className=\"leak-facet-box\" property=\"new_coverage\" />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DuplicationsFilter, { Props } from './DuplicationsFilter';\n\nexport default function NewDuplicationsFilter(props: Props) {\n  return <DuplicationsFilter {...props} className=\"leak-facet-box\" property=\"new_duplications\" />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { getSizeRatingLabel } from '../../../helpers/ratings';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\n\nexport interface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  property?: string;\n  value?: any;\n}\n\nexport default function NewLinesFilter(props: Props) {\n  const { property = 'new_lines' } = props;\n\n  return (\n    <Filter\n      className=\"leak-facet-box\"\n      facet={props.facet}\n      getFacetValueForOption={getFacetValueForOption}\n      header={<FilterHeader name={translate('projects.facets.new_lines')} />}\n      highlightUnder={1}\n      maxFacetValue={props.maxFacetValue}\n      onQueryChange={props.onQueryChange}\n      options={[1, 2, 3, 4, 5]}\n      property={property}\n      renderOption={renderOption}\n      value={props.value}\n    />\n  );\n}\n\nfunction getFacetValueForOption(facet: Facet, option: number) {\n  const map = ['*-1000.0', '1000.0-10000.0', '10000.0-100000.0', '100000.0-500000.0', '500000.0-*'];\n  return facet[map[option - 1]];\n}\n\nfunction renderOption(option: number) {\n  return <span>{getSizeRatingLabel(option)}</span>;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CodeSmellIcon from '../../../components/icons/CodeSmellIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport IssuesFilter from './IssuesFilter';\n\ninterface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  value?: any;\n}\n\nexport default function NewMaintainabilityFilter(props: Props) {\n  return (\n    <IssuesFilter\n      {...props}\n      className=\"leak-facet-box\"\n      headerDetail={\n        <span className=\"note little-spacer-left\">\n          {'( '}\n          <CodeSmellIcon className=\"little-spacer-right\" />\n          {translate('metric.code_smells.name')}\n          {' )'}\n        </span>\n      }\n      name=\"Maintainability\"\n      property=\"new_maintainability\"\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BugIcon from '../../../components/icons/BugIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport IssuesFilter from './IssuesFilter';\n\ninterface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  value?: any;\n}\n\nexport default function NewReliabilityFilter(props: Props) {\n  return (\n    <IssuesFilter\n      {...props}\n      className=\"leak-facet-box\"\n      headerDetail={\n        <span className=\"note little-spacer-left\">\n          {'( '}\n          <BugIcon className=\"little-spacer-right\" />\n          {translate('metric.bugs.name')}\n          {' )'}\n        </span>\n      }\n      name=\"Reliability\"\n      property=\"new_reliability\"\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport VulnerabilityIcon from '../../../components/icons/VulnerabilityIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport IssuesFilter from './IssuesFilter';\n\ninterface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  value?: any;\n}\n\nexport default function NewSecurityFilter(props: Props) {\n  return (\n    <IssuesFilter\n      {...props}\n      className=\"leak-facet-box\"\n      headerDetail={\n        <span className=\"note little-spacer-left\">\n          {'( '}\n          <VulnerabilityIcon className=\"little-spacer-right\" />\n          {translate('metric.vulnerabilities.name')}\n          {' )'}\n        </span>\n      }\n      name=\"Security\"\n      property=\"new_security\"\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { ComponentQualifier } from '../../../types/component';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\n\nexport interface QualifierFilterProps {\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  value: ComponentQualifier | undefined;\n}\n\nconst options = [ComponentQualifier.Project, ComponentQualifier.Application];\n\nexport default function QualifierFilter(props: QualifierFilterProps) {\n  const { facet, maxFacetValue, value } = props;\n\n  return (\n    <Filter\n      facet={facet}\n      header={<FilterHeader name={translate('projects.facets.qualifier')} />}\n      maxFacetValue={maxFacetValue}\n      onQueryChange={props.onQueryChange}\n      options={options}\n      property=\"qualifier\"\n      renderOption={renderOption}\n      value={value}\n    />\n  );\n}\n\nfunction renderOption(option: string, selected: boolean) {\n  return (\n    <span className=\"display-flex-center\">\n      <QualifierIcon\n        className=\"spacer-right\"\n        fill={selected ? undefined : 'currentColor'}\n        qualifier={option}\n      />\n      {translate('qualifier', option)}\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport Level from '../../../components/ui/Level';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\n\nexport interface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  value?: any;\n}\n\nexport default function QualityGateFilter(props: Props) {\n  const hasWarnStatus = props.facet && props.facet['WARN'] !== undefined;\n  const options = hasWarnStatus ? ['OK', 'WARN', 'ERROR'] : ['OK', 'ERROR'];\n\n  return (\n    <Filter\n      facet={props.facet}\n      header={<FilterHeader name={translate('projects.facets.quality_gate')} />}\n      maxFacetValue={props.maxFacetValue}\n      onQueryChange={props.onQueryChange}\n      options={options}\n      property=\"gate\"\n      renderOption={renderOption}\n      value={props.value}\n    />\n  );\n}\n\nfunction renderOption(option: string, selected: boolean) {\n  return (\n    <>\n      <Level level={option} muted={!selected} small={true} />\n      {option === 'WARN' && (\n        <HelpTooltip\n          className=\"little-spacer-left\"\n          overlay={translate('projects.facets.quality_gate.warning_help')}\n        />\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BugIcon from '../../../components/icons/BugIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport IssuesFilter from './IssuesFilter';\n\ninterface Props {\n  className?: string;\n  facet?: Facet;\n  headerDetail?: React.ReactNode;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  value?: any;\n}\n\nexport default function ReliabilityFilter(props: Props) {\n  return (\n    <IssuesFilter\n      {...props}\n      headerDetail={\n        <span className=\"note little-spacer-left\">\n          {'( '}\n          <BugIcon className=\"little-spacer-right\" />\n          {translate('metric.bugs.name')}\n          {' )'}\n        </span>\n      }\n      name=\"Reliability\"\n      property=\"reliability\"\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport VulnerabilityIcon from '../../../components/icons/VulnerabilityIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport IssuesFilter from './IssuesFilter';\n\ninterface Props {\n  className?: string;\n  facet?: Facet;\n  headerDetail?: React.ReactNode;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  value?: any;\n}\n\nexport default function SecurityFilter(props: Props) {\n  return (\n    <IssuesFilter\n      {...props}\n      headerDetail={\n        <span className=\"note little-spacer-left\">\n          {'( '}\n          <VulnerabilityIcon className=\"little-spacer-right\" />\n          {translate('metric.vulnerabilities.name')}\n          {' )'}\n        </span>\n      }\n      name=\"Security\"\n      property=\"security\"\n    />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon';\nimport Rating from '../../../components/ui/Rating';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\n\nexport interface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  property?: string;\n  value?: any;\n}\n\nconst labels: T.Dict<string> = {\n  1: '\u2265 80%',\n  2: '70% - 80%',\n  3: '50% - 70%',\n  4: '30% - 50%',\n  5: '< 30%'\n};\n\nexport default function SecurityReviewFilter(props: Props) {\n  const { property = 'security_review' } = props;\n\n  return (\n    <Filter\n      className={props.className}\n      facet={props.facet}\n      header={\n        <FilterHeader name={translate('metric_domain.SecurityReview')}>\n          <span className=\"note little-spacer-left\">\n            {'( '}\n            <SecurityHotspotIcon className=\"little-spacer-right\" />\n            {translate('metric.security_hotspots.name')}\n            {' )'}\n          </span>\n        </FilterHeader>\n      }\n      highlightUnder={1}\n      maxFacetValue={props.maxFacetValue}\n      onQueryChange={props.onQueryChange}\n      options={[1, 2, 3, 4, 5]}\n      property={property}\n      renderOption={renderOption}\n      value={props.value}\n    />\n  );\n}\n\nfunction renderOption(option: number, selected: boolean) {\n  return (\n    <span>\n      <Rating muted={!selected} small={true} value={option} />\n      <span className=\"spacer-left\">{labels[option]}</span>\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { inRange } from 'lodash';\nimport * as React from 'react';\nimport './SizeRating.css';\n\nexport interface Props {\n  muted?: boolean;\n  small?: boolean;\n  value: number | null | undefined;\n}\n\nexport default function SizeRating({ small = false, muted = false, value }: Props) {\n  if (value == null) {\n    return <div className=\"size-rating size-rating-muted\">&nbsp;</div>;\n  }\n\n  let letter;\n  if (inRange(value, 0, 1000)) {\n    letter = 'XS';\n  } else if (inRange(value, 1000, 10000)) {\n    letter = 'S';\n  } else if (inRange(value, 10000, 100000)) {\n    letter = 'M';\n  } else if (inRange(value, 100000, 500000)) {\n    letter = 'L';\n  } else if (value >= 500000) {\n    letter = 'XL';\n  }\n\n  const className = classNames('size-rating', {\n    'size-rating-small': small,\n    'size-rating-muted': muted\n  });\n\n  return (\n    <div aria-hidden=\"true\" className={className}>\n      {letter}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SizeRating from '../../../components/ui/SizeRating';\nimport { translate } from '../../../helpers/l10n';\nimport { getSizeRatingAverageValue, getSizeRatingLabel } from '../../../helpers/ratings';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\n\nexport interface Props {\n  className?: string;\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  property?: string;\n  value?: any;\n}\n\nexport default function SizeFilter(props: Props) {\n  const { property = 'size' } = props;\n\n  return (\n    <Filter\n      className={props.className}\n      facet={props.facet}\n      getFacetValueForOption={getFacetValueForOption}\n      header={<FilterHeader name={translate('metric_domain.Size')} />}\n      highlightUnder={1}\n      maxFacetValue={props.maxFacetValue}\n      onQueryChange={props.onQueryChange}\n      options={[1, 2, 3, 4, 5]}\n      property={property}\n      renderOption={renderOption}\n      value={props.value}\n    />\n  );\n}\n\nfunction getFacetValueForOption(facet: Facet, option: number) {\n  const map = ['*-1000.0', '1000.0-10000.0', '10000.0-100000.0', '100000.0-500000.0', '500000.0-*'];\n  return facet[map[option - 1]];\n}\n\nfunction renderOption(option: number, selected: boolean) {\n  return (\n    <span>\n      <SizeRating muted={!selected} small={true} value={getSizeRatingAverageValue(option)} />\n      <span className=\"spacer-left\">{getSizeRatingLabel(option)}</span>\n    </span>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce, difference, size, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { searchProjectTags } from '../../../api/components';\nimport { translate } from '../../../helpers/l10n';\nimport { Facet } from '../types';\nimport Filter from './Filter';\nimport FilterHeader from './FilterHeader';\nimport SearchableFilterFooter from './SearchableFilterFooter';\nimport SearchableFilterOption from './SearchableFilterOption';\n\ninterface Props {\n  facet?: Facet;\n  maxFacetValue?: number;\n  onQueryChange: (change: T.RawQuery) => void;\n  property?: string;\n  query: T.Dict<any>;\n  value?: string[];\n}\n\ninterface State {\n  isLoading: boolean;\n  search: string;\n  tags: string[];\n}\n\nconst LIST_SIZE = 10;\n\nexport default class TagsFilter extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      isLoading: false,\n      search: '',\n      tags: []\n    };\n    this.handleSearch = debounce(this.handleSearch, 250);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  getSearchOptions = () => {\n    let tagsCopy = [...this.state.tags];\n    if (this.props.facet) {\n      tagsCopy = difference(tagsCopy, Object.keys(this.props.facet));\n    }\n    return tagsCopy.slice(0, LIST_SIZE).map(tag => ({ label: tag, value: tag }));\n  };\n\n  handleSearch = (search?: string) => {\n    if (search !== this.state.search) {\n      search = search || '';\n      this.setState({ search, isLoading: true });\n      searchProjectTags({\n        q: search,\n        ps: size(this.props.facet || {}) + LIST_SIZE\n      }).then(\n        result => {\n          if (this.mounted) {\n            this.setState({ isLoading: false, tags: result.tags });\n          }\n        },\n        () => {}\n      );\n    }\n  };\n\n  getSortedOptions = (facet: Facet = {}) =>\n    sortBy(Object.keys(facet), [(option: string) => -facet[option], (option: string) => option]);\n\n  renderOption = (option: string) => <SearchableFilterOption optionKey={option} />;\n\n  render() {\n    const { property = 'tags' } = this.props;\n\n    return (\n      <Filter\n        facet={this.props.facet}\n        footer={\n          <SearchableFilterFooter\n            isLoading={this.state.isLoading}\n            onInputChange={this.handleSearch}\n            onOpen={this.handleSearch}\n            onQueryChange={this.props.onQueryChange}\n            options={this.getSearchOptions()}\n            property={property}\n            query={this.props.query}\n          />\n        }\n        header={<FilterHeader name={translate('projects.facets.tags')} />}\n        maxFacetValue={this.props.maxFacetValue}\n        onQueryChange={this.props.onQueryChange}\n        options={this.getSortedOptions(this.props.facet)}\n        property={property}\n        renderOption={this.renderOption}\n        value={this.props.value}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onClearAll: () => void;\n}\n\nexport default function ClearAll({ onClearAll }: Props) {\n  return (\n    <div className=\"projects-facets-reset\">\n      <Button className=\"button-red\" onClick={onClearAll}>\n        {translate('clear_all_filters')}\n      </Button>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { IndexLink, Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\nimport { save } from '../../../helpers/storage';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE } from '../utils';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  query?: T.RawQuery;\n}\n\nexport default class FavoriteFilter extends React.PureComponent<Props> {\n  handleSaveFavorite = () => {\n    save(PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE);\n  };\n\n  handleSaveAll = () => {\n    save(PROJECTS_DEFAULT_FILTER, PROJECTS_ALL);\n  };\n\n  render() {\n    if (!isLoggedIn(this.props.currentUser)) {\n      return null;\n    }\n\n    const pathnameForFavorite = '/projects/favorite';\n    const pathnameForAll = '/projects';\n\n    return (\n      <div className=\"page-header text-center\">\n        <div className=\"button-group little-spacer-top\">\n          <Link\n            activeClassName=\"button-active\"\n            className=\"button\"\n            id=\"favorite-projects\"\n            onClick={this.handleSaveFavorite}\n            to={{ pathname: pathnameForFavorite, query: this.props.query }}>\n            {translate('my_favorites')}\n          </Link>\n          <IndexLink\n            activeClassName=\"button-active\"\n            className=\"button\"\n            id=\"all-projects\"\n            onClick={this.handleSaveAll}\n            to={{ pathname: pathnameForAll, query: this.props.query }}>\n            {translate('all')}\n          </IndexLink>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { getCurrentUser, Store } from '../../../store/rootReducer';\nimport FavoriteFilter from './FavoriteFilter';\n\nfunction mapStateToProps(state: Store) {\n  return { currentUser: getCurrentUser(state) };\n}\n\nexport default connect(mapStateToProps)(FavoriteFilter);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { flatMap } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport CoverageFilter from '../filters/CoverageFilter';\nimport DuplicationsFilter from '../filters/DuplicationsFilter';\nimport LanguagesFilterContainer from '../filters/LanguagesFilterContainer';\nimport MaintainabilityFilter from '../filters/MaintainabilityFilter';\nimport NewCoverageFilter from '../filters/NewCoverageFilter';\nimport NewDuplicationsFilter from '../filters/NewDuplicationsFilter';\nimport NewLinesFilter from '../filters/NewLinesFilter';\nimport NewMaintainabilityFilter from '../filters/NewMaintainabilityFilter';\nimport NewReliabilityFilter from '../filters/NewReliabilityFilter';\nimport NewSecurityFilter from '../filters/NewSecurityFilter';\nimport QualifierFilter from '../filters/QualifierFilter';\nimport QualityGateFilter from '../filters/QualityGateFilter';\nimport ReliabilityFilter from '../filters/ReliabilityFilter';\nimport SecurityFilter from '../filters/SecurityFilter';\nimport SecurityReviewFilter from '../filters/SecurityReviewFilter';\nimport SizeFilter from '../filters/SizeFilter';\nimport TagsFilter from '../filters/TagsFilter';\nimport { hasFilterParams } from '../query';\nimport { Facets } from '../types';\nimport ClearAll from './ClearAll';\nimport FavoriteFilterContainer from './FavoriteFilterContainer';\n\nexport interface PageSidebarProps {\n  applicationsEnabled: boolean;\n  facets?: Facets;\n  onClearAll: () => void;\n  onQueryChange: (change: T.RawQuery) => void;\n  query: T.RawQuery;\n  view: string;\n  visualization: string;\n}\n\nexport default function PageSidebar(props: PageSidebarProps) {\n  const { applicationsEnabled, facets, onQueryChange, query, view, visualization } = props;\n  const isFiltered = hasFilterParams(query);\n  const isLeakView = view === 'leak';\n  const maxFacetValue = getMaxFacetValue(facets);\n  const facetProps = { onQueryChange, maxFacetValue };\n\n  let linkQuery: T.RawQuery | undefined = undefined;\n  if (view !== 'overall') {\n    linkQuery = { view };\n\n    if (view === 'visualizations') {\n      linkQuery.visualization = visualization;\n    }\n  }\n\n  return (\n    <div>\n      <FavoriteFilterContainer query={linkQuery} />\n\n      <div className=\"projects-facets-header clearfix\">\n        {isFiltered && <ClearAll onClearAll={props.onClearAll} />}\n\n        <h2 className=\"h3\">{translate('filters')}</h2>\n      </div>\n      <QualityGateFilter {...facetProps} facet={getFacet(facets, 'gate')} value={query.gate} />\n      {!isLeakView && (\n        <>\n          <ReliabilityFilter\n            {...facetProps}\n            facet={getFacet(facets, 'reliability')}\n            value={query.reliability}\n          />\n          <SecurityFilter\n            {...facetProps}\n            facet={getFacet(facets, 'security')}\n            value={query.security}\n          />\n\n          <SecurityReviewFilter\n            {...facetProps}\n            facet={getFacet(facets, 'security_review')}\n            value={query.security_review_rating}\n          />\n\n          <MaintainabilityFilter\n            {...facetProps}\n            facet={getFacet(facets, 'maintainability')}\n            value={query.maintainability}\n          />\n          <CoverageFilter\n            {...facetProps}\n            facet={getFacet(facets, 'coverage')}\n            value={query.coverage}\n          />\n          <DuplicationsFilter\n            {...facetProps}\n            facet={getFacet(facets, 'duplications')}\n            value={query.duplications}\n          />\n          <SizeFilter {...facetProps} facet={getFacet(facets, 'size')} value={query.size} />\n        </>\n      )}\n      {isLeakView && (\n        <>\n          <NewReliabilityFilter\n            {...facetProps}\n            facet={getFacet(facets, 'new_reliability')}\n            value={query.new_reliability}\n          />\n          <NewSecurityFilter\n            {...facetProps}\n            facet={getFacet(facets, 'new_security')}\n            value={query.new_security}\n          />\n          <SecurityReviewFilter\n            {...facetProps}\n            className=\"leak-facet-box\"\n            facet={getFacet(facets, 'new_security_review')}\n            property=\"new_security_review\"\n            value={query.new_security_review_rating}\n          />\n          <NewMaintainabilityFilter\n            {...facetProps}\n            facet={getFacet(facets, 'new_maintainability')}\n            value={query.new_maintainability}\n          />\n          <NewCoverageFilter\n            {...facetProps}\n            facet={getFacet(facets, 'new_coverage')}\n            value={query.new_coverage}\n          />\n          <NewDuplicationsFilter\n            {...facetProps}\n            facet={getFacet(facets, 'new_duplications')}\n            value={query.new_duplications}\n          />\n          <NewLinesFilter\n            {...facetProps}\n            facet={getFacet(facets, 'new_lines')}\n            value={query.new_lines}\n          />\n        </>\n      )}\n      <LanguagesFilterContainer\n        {...facetProps}\n        facet={getFacet(facets, 'languages')}\n        query={query}\n        value={query.languages}\n      />\n      {applicationsEnabled && (\n        <QualifierFilter\n          {...facetProps}\n          facet={getFacet(facets, 'qualifier')}\n          value={query.qualifier}\n        />\n      )}\n      <TagsFilter\n        {...facetProps}\n        facet={getFacet(facets, 'tags')}\n        query={query}\n        value={query.tags}\n      />\n    </div>\n  );\n}\n\nfunction getFacet(facets: Facets | undefined, name: string) {\n  return facets && facets[name];\n}\n\nfunction getMaxFacetValue(facets?: Facets) {\n  return facets && Math.max(...flatMap(Object.values(facets), facet => Object.values(facet)));\n}\n", "// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = require('./_to-iobject');\nvar $getOwnPropertyDescriptor = require('./_object-gopd').f;\n\nrequire('./_object-sap')('getOwnPropertyDescriptor', function () {\n  return function getOwnPropertyDescriptor(it, key) {\n    return $getOwnPropertyDescriptor(toIObject(it), key);\n  };\n});\n", "require('../../modules/es6.object.get-own-property-descriptor');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function getOwnPropertyDescriptor(it, key) {\n  return $Object.getOwnPropertyDescriptor(it, key);\n};\n", "module.exports = { \"default\": require(\"core-js/library/fn/object/get-own-property-descriptor\"), __esModule: true };", "function toVal(mix) {\n\tvar k, y, str='';\n\tif (mix) {\n\t\tif (typeof mix === 'object') {\n\t\t\tif (Array.isArray(mix)) {\n\t\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\t\tif (mix[k] && (y = toVal(mix[k]))) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (k in mix) {\n\t\t\t\t\tif (mix[k] && (y = toVal(k))) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof mix !== 'boolean' && !mix.call) {\n\t\t\tstr && (str += ' ');\n\t\t\tstr += mix;\n\t\t}\n\t}\n\treturn str;\n}\n\nmodule.exports = function () {\n\tvar i=0, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (x = toVal(arguments[i++])) {\n\t\t\tstr && (str += ' ');\n\t\t\tstr += x\n\t\t}\n\t}\n\treturn str;\n}\n", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = calculateSizeAndPositionDataAndUpdateScrollOffset;\nfunction calculateSizeAndPositionDataAndUpdateScrollOffset(_ref) {\n  var cellCount = _ref.cellCount,\n      cellSize = _ref.cellSize,\n      computeMetadataCallback = _ref.computeMetadataCallback,\n      computeMetadataCallbackProps = _ref.computeMetadataCallbackProps,\n      nextCellsCount = _ref.nextCellsCount,\n      nextCellSize = _ref.nextCellSize,\n      nextScrollToIndex = _ref.nextScrollToIndex,\n      scrollToIndex = _ref.scrollToIndex,\n      updateScrollOffsetForScrollToIndex = _ref.updateScrollOffsetForScrollToIndex;\n\n  // Don't compare cell sizes if they are functions because inline functions would cause infinite loops.\n  // In that event users should use the manual recompute methods to inform of changes.\n  if (cellCount !== nextCellsCount || (typeof cellSize === 'number' || typeof nextCellSize === 'number') && cellSize !== nextCellSize) {\n    computeMetadataCallback(computeMetadataCallbackProps);\n\n    // Updated cell metadata may have hidden the previous scrolled-to item.\n    // In this case we should also update the scrollTop to ensure it stays visible.\n    if (scrollToIndex >= 0 && scrollToIndex === nextScrollToIndex) {\n      updateScrollOffsetForScrollToIndex();\n    }\n  }\n}\n\n/**\n * Helper method that determines when to recalculate row or column metadata.\n */", "\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (obj, keys) {\n  var target = {};\n\n  for (var i in obj) {\n    if (keys.indexOf(i) >= 0) continue;\n    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n    target[i] = obj[i];\n  }\n\n  return target;\n};", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.bpfrpt_proptype_VisibleCellRange = exports.bpfrpt_proptype_Alignment = exports.bpfrpt_proptype_OverscanIndicesGetter = exports.bpfrpt_proptype_OverscanIndices = exports.bpfrpt_proptype_OverscanIndicesGetterParams = exports.bpfrpt_proptype_RenderedSection = exports.bpfrpt_proptype_ScrollbarPresenceChange = exports.bpfrpt_proptype_Scroll = exports.bpfrpt_proptype_NoContentRenderer = exports.bpfrpt_proptype_CellSize = exports.bpfrpt_proptype_CellSizeGetter = exports.bpfrpt_proptype_CellRangeRenderer = exports.bpfrpt_proptype_CellRangeRendererParams = exports.bpfrpt_proptype_StyleCache = exports.bpfrpt_proptype_CellCache = exports.bpfrpt_proptype_CellRenderer = exports.bpfrpt_proptype_CellRendererParams = exports.bpfrpt_proptype_CellPosition = undefined;\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _ScalingCellSizeAndPositionManager = require('./utils/ScalingCellSizeAndPositionManager');\n\nvar _ScalingCellSizeAndPositionManager2 = _interopRequireDefault(_ScalingCellSizeAndPositionManager);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar bpfrpt_proptype_CellPosition = process.env.NODE_ENV === 'production' ? null : {\n  columnIndex: _propTypes2.default.number.isRequired,\n  rowIndex: _propTypes2.default.number.isRequired\n};\nvar bpfrpt_proptype_CellRendererParams = process.env.NODE_ENV === 'production' ? null : {\n  columnIndex: _propTypes2.default.number.isRequired,\n  isScrolling: _propTypes2.default.bool.isRequired,\n  isVisible: _propTypes2.default.bool.isRequired,\n  key: _propTypes2.default.string.isRequired,\n  parent: _propTypes2.default.object.isRequired,\n  rowIndex: _propTypes2.default.number.isRequired,\n  style: _propTypes2.default.object.isRequired\n};\nvar bpfrpt_proptype_CellRenderer = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.func;\nvar bpfrpt_proptype_CellCache = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.objectOf(_propTypes2.default.node.isRequired);\nvar bpfrpt_proptype_StyleCache = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.objectOf(_propTypes2.default.object.isRequired);\nvar bpfrpt_proptype_CellRangeRendererParams = process.env.NODE_ENV === 'production' ? null : {\n  cellCache: _propTypes2.default.objectOf(_propTypes2.default.node.isRequired).isRequired,\n  cellRenderer: _propTypes2.default.func.isRequired,\n  columnSizeAndPositionManager: function columnSizeAndPositionManager() {\n    return (typeof _ScalingCellSizeAndPositionManager2.default === 'function' ? _propTypes2.default.instanceOf(_ScalingCellSizeAndPositionManager2.default).isRequired : _propTypes2.default.any.isRequired).apply(this, arguments);\n  },\n  columnStartIndex: _propTypes2.default.number.isRequired,\n  columnStopIndex: _propTypes2.default.number.isRequired,\n  deferredMeasurementCache: _propTypes2.default.object,\n  horizontalOffsetAdjustment: _propTypes2.default.number.isRequired,\n  isScrolling: _propTypes2.default.bool.isRequired,\n  isScrollingOptOut: _propTypes2.default.bool.isRequired,\n  parent: _propTypes2.default.object.isRequired,\n  rowSizeAndPositionManager: function rowSizeAndPositionManager() {\n    return (typeof _ScalingCellSizeAndPositionManager2.default === 'function' ? _propTypes2.default.instanceOf(_ScalingCellSizeAndPositionManager2.default).isRequired : _propTypes2.default.any.isRequired).apply(this, arguments);\n  },\n  rowStartIndex: _propTypes2.default.number.isRequired,\n  rowStopIndex: _propTypes2.default.number.isRequired,\n  scrollLeft: _propTypes2.default.number.isRequired,\n  scrollTop: _propTypes2.default.number.isRequired,\n  styleCache: _propTypes2.default.objectOf(_propTypes2.default.object.isRequired).isRequired,\n  verticalOffsetAdjustment: _propTypes2.default.number.isRequired,\n  visibleColumnIndices: _propTypes2.default.object.isRequired,\n  visibleRowIndices: _propTypes2.default.object.isRequired\n};\nvar bpfrpt_proptype_CellRangeRenderer = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.func;\nvar bpfrpt_proptype_CellSizeGetter = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.func;\nvar bpfrpt_proptype_CellSize = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.number]);\nvar bpfrpt_proptype_NoContentRenderer = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.func;\nvar bpfrpt_proptype_Scroll = process.env.NODE_ENV === 'production' ? null : {\n  clientHeight: _propTypes2.default.number.isRequired,\n  clientWidth: _propTypes2.default.number.isRequired,\n  scrollHeight: _propTypes2.default.number.isRequired,\n  scrollLeft: _propTypes2.default.number.isRequired,\n  scrollTop: _propTypes2.default.number.isRequired,\n  scrollWidth: _propTypes2.default.number.isRequired\n};\nvar bpfrpt_proptype_ScrollbarPresenceChange = process.env.NODE_ENV === 'production' ? null : {\n  horizontal: _propTypes2.default.bool.isRequired,\n  vertical: _propTypes2.default.bool.isRequired,\n  size: _propTypes2.default.number.isRequired\n};\nvar bpfrpt_proptype_RenderedSection = process.env.NODE_ENV === 'production' ? null : {\n  columnOverscanStartIndex: _propTypes2.default.number.isRequired,\n  columnOverscanStopIndex: _propTypes2.default.number.isRequired,\n  columnStartIndex: _propTypes2.default.number.isRequired,\n  columnStopIndex: _propTypes2.default.number.isRequired,\n  rowOverscanStartIndex: _propTypes2.default.number.isRequired,\n  rowOverscanStopIndex: _propTypes2.default.number.isRequired,\n  rowStartIndex: _propTypes2.default.number.isRequired,\n  rowStopIndex: _propTypes2.default.number.isRequired\n};\nvar bpfrpt_proptype_OverscanIndicesGetterParams = process.env.NODE_ENV === 'production' ? null : {\n  // One of SCROLL_DIRECTION_HORIZONTAL or SCROLL_DIRECTION_VERTICAL\n  direction: _propTypes2.default.oneOf(['horizontal', 'vertical']).isRequired,\n\n\n  // One of SCROLL_DIRECTION_BACKWARD or SCROLL_DIRECTION_FORWARD\n  scrollDirection: _propTypes2.default.oneOf([-1, 1]).isRequired,\n\n\n  // Number of rows or columns in the current axis\n  cellCount: _propTypes2.default.number.isRequired,\n\n\n  // Maximum number of cells to over-render in either direction\n  overscanCellsCount: _propTypes2.default.number.isRequired,\n\n\n  // Begin of range of visible cells\n  startIndex: _propTypes2.default.number.isRequired,\n\n\n  // End of range of visible cells\n  stopIndex: _propTypes2.default.number.isRequired\n};\nvar bpfrpt_proptype_OverscanIndices = process.env.NODE_ENV === 'production' ? null : {\n  overscanStartIndex: _propTypes2.default.number.isRequired,\n  overscanStopIndex: _propTypes2.default.number.isRequired\n};\nvar bpfrpt_proptype_OverscanIndicesGetter = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.func;\nvar bpfrpt_proptype_Alignment = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.oneOf(['auto', 'end', 'start', 'center']);\nvar bpfrpt_proptype_VisibleCellRange = process.env.NODE_ENV === 'production' ? null : {\n  start: _propTypes2.default.number,\n  stop: _propTypes2.default.number\n};\nexports.bpfrpt_proptype_CellPosition = bpfrpt_proptype_CellPosition;\nexports.bpfrpt_proptype_CellRendererParams = bpfrpt_proptype_CellRendererParams;\nexports.bpfrpt_proptype_CellRenderer = bpfrpt_proptype_CellRenderer;\nexports.bpfrpt_proptype_CellCache = bpfrpt_proptype_CellCache;\nexports.bpfrpt_proptype_StyleCache = bpfrpt_proptype_StyleCache;\nexports.bpfrpt_proptype_CellRangeRendererParams = bpfrpt_proptype_CellRangeRendererParams;\nexports.bpfrpt_proptype_CellRangeRenderer = bpfrpt_proptype_CellRangeRenderer;\nexports.bpfrpt_proptype_CellSizeGetter = bpfrpt_proptype_CellSizeGetter;\nexports.bpfrpt_proptype_CellSize = bpfrpt_proptype_CellSize;\nexports.bpfrpt_proptype_NoContentRenderer = bpfrpt_proptype_NoContentRenderer;\nexports.bpfrpt_proptype_Scroll = bpfrpt_proptype_Scroll;\nexports.bpfrpt_proptype_ScrollbarPresenceChange = bpfrpt_proptype_ScrollbarPresenceChange;\nexports.bpfrpt_proptype_RenderedSection = bpfrpt_proptype_RenderedSection;\nexports.bpfrpt_proptype_OverscanIndicesGetterParams = bpfrpt_proptype_OverscanIndicesGetterParams;\nexports.bpfrpt_proptype_OverscanIndices = bpfrpt_proptype_OverscanIndices;\nexports.bpfrpt_proptype_OverscanIndicesGetter = bpfrpt_proptype_OverscanIndicesGetter;\nexports.bpfrpt_proptype_Alignment = bpfrpt_proptype_Alignment;\nexports.bpfrpt_proptype_VisibleCellRange = bpfrpt_proptype_VisibleCellRange;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _types = require('../types');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Just-in-time calculates and caches size and position information for a collection of cells.\n */\n\nvar CellSizeAndPositionManager = function () {\n\n  // Used in deferred mode to track which cells have been queued for measurement.\n\n  // Cache of size and position data for cells, mapped by cell index.\n  // Note that invalid values may exist in this map so only rely on cells up to this._lastMeasuredIndex\n  function CellSizeAndPositionManager(_ref) {\n    var cellCount = _ref.cellCount,\n        cellSizeGetter = _ref.cellSizeGetter,\n        estimatedCellSize = _ref.estimatedCellSize;\n    (0, _classCallCheck3.default)(this, CellSizeAndPositionManager);\n    this._cellSizeAndPositionData = {};\n    this._lastMeasuredIndex = -1;\n    this._lastBatchedIndex = -1;\n\n    this._cellSizeGetter = cellSizeGetter;\n    this._cellCount = cellCount;\n    this._estimatedCellSize = estimatedCellSize;\n  }\n\n  // Measurements for cells up to this index can be trusted; cells afterward should be estimated.\n\n\n  (0, _createClass3.default)(CellSizeAndPositionManager, [{\n    key: 'areOffsetsAdjusted',\n    value: function areOffsetsAdjusted() {\n      return false;\n    }\n  }, {\n    key: 'configure',\n    value: function configure(_ref2) {\n      var cellCount = _ref2.cellCount,\n          estimatedCellSize = _ref2.estimatedCellSize,\n          cellSizeGetter = _ref2.cellSizeGetter;\n\n      this._cellCount = cellCount;\n      this._estimatedCellSize = estimatedCellSize;\n      this._cellSizeGetter = cellSizeGetter;\n    }\n  }, {\n    key: 'getCellCount',\n    value: function getCellCount() {\n      return this._cellCount;\n    }\n  }, {\n    key: 'getEstimatedCellSize',\n    value: function getEstimatedCellSize() {\n      return this._estimatedCellSize;\n    }\n  }, {\n    key: 'getLastMeasuredIndex',\n    value: function getLastMeasuredIndex() {\n      return this._lastMeasuredIndex;\n    }\n  }, {\n    key: 'getOffsetAdjustment',\n    value: function getOffsetAdjustment() {\n      return 0;\n    }\n\n    /**\n     * This method returns the size and position for the cell at the specified index.\n     * It just-in-time calculates (or used cached values) for cells leading up to the index.\n     */\n\n  }, {\n    key: 'getSizeAndPositionOfCell',\n    value: function getSizeAndPositionOfCell(index) {\n      if (index < 0 || index >= this._cellCount) {\n        throw Error('Requested index ' + index + ' is outside of range 0..' + this._cellCount);\n      }\n\n      if (index > this._lastMeasuredIndex) {\n        var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n        var _offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\n\n        for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {\n          var _size = this._cellSizeGetter({ index: i });\n\n          // undefined or NaN probably means a logic error in the size getter.\n          // null means we're using CellMeasurer and haven't yet measured a given index.\n          if (_size === undefined || isNaN(_size)) {\n            throw Error('Invalid size returned for cell ' + i + ' of value ' + _size);\n          } else if (_size === null) {\n            this._cellSizeAndPositionData[i] = {\n              offset: _offset,\n              size: 0\n            };\n\n            this._lastBatchedIndex = index;\n          } else {\n            this._cellSizeAndPositionData[i] = {\n              offset: _offset,\n              size: _size\n            };\n\n            _offset += _size;\n\n            this._lastMeasuredIndex = index;\n          }\n        }\n      }\n\n      return this._cellSizeAndPositionData[index];\n    }\n  }, {\n    key: 'getSizeAndPositionOfLastMeasuredCell',\n    value: function getSizeAndPositionOfLastMeasuredCell() {\n      return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : {\n        offset: 0,\n        size: 0\n      };\n    }\n\n    /**\n     * Total size of all cells being measured.\n     * This value will be completely estimated initially.\n     * As cells are measured, the estimate will be updated.\n     */\n\n  }, {\n    key: 'getTotalSize',\n    value: function getTotalSize() {\n      var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n      var totalSizeOfMeasuredCells = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\n      var numUnmeasuredCells = this._cellCount - this._lastMeasuredIndex - 1;\n      var totalSizeOfUnmeasuredCells = numUnmeasuredCells * this._estimatedCellSize;\n      return totalSizeOfMeasuredCells + totalSizeOfUnmeasuredCells;\n    }\n\n    /**\n     * Determines a new offset that ensures a certain cell is visible, given the current offset.\n     * If the cell is already visible then the current offset will be returned.\n     * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible.\n     *\n     * @param align Desired alignment within container; one of \"auto\" (default), \"start\", or \"end\"\n     * @param containerSize Size (width or height) of the container viewport\n     * @param currentOffset Container's current (x or y) offset\n     * @param totalSize Total size (width or height) of all cells\n     * @return Offset to use to ensure the specified cell is visible\n     */\n\n  }, {\n    key: 'getUpdatedOffsetForIndex',\n    value: function getUpdatedOffsetForIndex(_ref3) {\n      var _ref3$align = _ref3.align,\n          align = _ref3$align === undefined ? 'auto' : _ref3$align,\n          containerSize = _ref3.containerSize,\n          currentOffset = _ref3.currentOffset,\n          targetIndex = _ref3.targetIndex;\n\n      if (containerSize <= 0) {\n        return 0;\n      }\n\n      var datum = this.getSizeAndPositionOfCell(targetIndex);\n      var maxOffset = datum.offset;\n      var minOffset = maxOffset - containerSize + datum.size;\n\n      var idealOffset = void 0;\n\n      switch (align) {\n        case 'start':\n          idealOffset = maxOffset;\n          break;\n        case 'end':\n          idealOffset = minOffset;\n          break;\n        case 'center':\n          idealOffset = maxOffset - (containerSize - datum.size) / 2;\n          break;\n        default:\n          idealOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));\n          break;\n      }\n\n      var totalSize = this.getTotalSize();\n\n      return Math.max(0, Math.min(totalSize - containerSize, idealOffset));\n    }\n  }, {\n    key: 'getVisibleCellRange',\n    value: function getVisibleCellRange(params) {\n      var containerSize = params.containerSize,\n          offset = params.offset;\n\n\n      var totalSize = this.getTotalSize();\n\n      if (totalSize === 0) {\n        return {};\n      }\n\n      var maxOffset = offset + containerSize;\n      var start = this._findNearestCell(offset);\n\n      var datum = this.getSizeAndPositionOfCell(start);\n      offset = datum.offset + datum.size;\n\n      var stop = start;\n\n      while (offset < maxOffset && stop < this._cellCount - 1) {\n        stop++;\n\n        offset += this.getSizeAndPositionOfCell(stop).size;\n      }\n\n      return {\n        start: start,\n        stop: stop\n      };\n    }\n\n    /**\n     * Clear all cached values for cells after the specified index.\n     * This method should be called for any cell that has changed its size.\n     * It will not immediately perform any calculations; they'll be performed the next time getSizeAndPositionOfCell() is called.\n     */\n\n  }, {\n    key: 'resetCell',\n    value: function resetCell(index) {\n      this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);\n    }\n  }, {\n    key: '_binarySearch',\n    value: function _binarySearch(high, low, offset) {\n      while (low <= high) {\n        var middle = low + Math.floor((high - low) / 2);\n        var _currentOffset = this.getSizeAndPositionOfCell(middle).offset;\n\n        if (_currentOffset === offset) {\n          return middle;\n        } else if (_currentOffset < offset) {\n          low = middle + 1;\n        } else if (_currentOffset > offset) {\n          high = middle - 1;\n        }\n      }\n\n      if (low > 0) {\n        return low - 1;\n      } else {\n        return 0;\n      }\n    }\n  }, {\n    key: '_exponentialSearch',\n    value: function _exponentialSearch(index, offset) {\n      var interval = 1;\n\n      while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {\n        index += interval;\n        interval *= 2;\n      }\n\n      return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);\n    }\n\n    /**\n     * Searches for the cell (index) nearest the specified offset.\n     *\n     * If no exact match is found the next lowest cell index will be returned.\n     * This allows partially visible cells (with offsets just before/above the fold) to be visible.\n     */\n\n  }, {\n    key: '_findNearestCell',\n    value: function _findNearestCell(offset) {\n      if (isNaN(offset)) {\n        throw Error('Invalid offset ' + offset + ' specified');\n      }\n\n      // Our search algorithms find the nearest match at or below the specified offset.\n      // So make sure the offset is at least 0 or no match will be found.\n      offset = Math.max(0, offset);\n\n      var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n      var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);\n\n      if (lastMeasuredCellSizeAndPosition.offset >= offset) {\n        // If we've already measured cells within this range just use a binary search as it's faster.\n        return this._binarySearch(lastMeasuredIndex, 0, offset);\n      } else {\n        // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n        // The exponential search avoids pre-computing sizes for the full set of cells as a binary search would.\n        // The overall complexity for this approach is O(log n).\n        return this._exponentialSearch(lastMeasuredIndex, offset);\n      }\n    }\n  }]);\n  return CellSizeAndPositionManager;\n}();\n\nexports.default = CellSizeAndPositionManager;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar DEFAULT_MAX_ELEMENT_SIZE = 1500000;\nvar CHROME_MAX_ELEMENT_SIZE = 1.67771e7;\n\nvar isBrowser = function isBrowser() {\n  return typeof window !== 'undefined';\n};\n\nvar isChrome = function isChrome() {\n  return !!window.chrome;\n};\n\nvar getMaxElementSize = exports.getMaxElementSize = function getMaxElementSize() {\n  if (isBrowser()) {\n    if (isChrome()) {\n      return CHROME_MAX_ELEMENT_SIZE;\n    }\n  }\n  return DEFAULT_MAX_ELEMENT_SIZE;\n};", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');\n\nvar _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _CellSizeAndPositionManager = require('./CellSizeAndPositionManager');\n\nvar _CellSizeAndPositionManager2 = _interopRequireDefault(_CellSizeAndPositionManager);\n\nvar _maxElementSize = require('./maxElementSize.js');\n\nvar _types = require('../types');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Extends CellSizeAndPositionManager and adds scaling behavior for lists that are too large to fit within a browser's native limits.\n */\n\n\n/**\n * Browsers have scroll offset limitations (eg Chrome stops scrolling at ~33.5M pixels where as Edge tops out at ~1.5M pixels).\n * After a certain position, the browser won't allow the user to scroll further (even via JavaScript scroll offset adjustments).\n * This util picks a lower ceiling for max size and artificially adjusts positions within to make it transparent for users.\n */\n\nvar ScalingCellSizeAndPositionManager = function () {\n  function ScalingCellSizeAndPositionManager(_ref) {\n    var _ref$maxScrollSize = _ref.maxScrollSize,\n        maxScrollSize = _ref$maxScrollSize === undefined ? (0, _maxElementSize.getMaxElementSize)() : _ref$maxScrollSize,\n        params = (0, _objectWithoutProperties3.default)(_ref, ['maxScrollSize']);\n    (0, _classCallCheck3.default)(this, ScalingCellSizeAndPositionManager);\n\n    // Favor composition over inheritance to simplify IE10 support\n    this._cellSizeAndPositionManager = new _CellSizeAndPositionManager2.default(params);\n    this._maxScrollSize = maxScrollSize;\n  }\n\n  (0, _createClass3.default)(ScalingCellSizeAndPositionManager, [{\n    key: 'areOffsetsAdjusted',\n    value: function areOffsetsAdjusted() {\n      return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;\n    }\n  }, {\n    key: 'configure',\n    value: function configure(params) {\n      this._cellSizeAndPositionManager.configure(params);\n    }\n  }, {\n    key: 'getCellCount',\n    value: function getCellCount() {\n      return this._cellSizeAndPositionManager.getCellCount();\n    }\n  }, {\n    key: 'getEstimatedCellSize',\n    value: function getEstimatedCellSize() {\n      return this._cellSizeAndPositionManager.getEstimatedCellSize();\n    }\n  }, {\n    key: 'getLastMeasuredIndex',\n    value: function getLastMeasuredIndex() {\n      return this._cellSizeAndPositionManager.getLastMeasuredIndex();\n    }\n\n    /**\n     * Number of pixels a cell at the given position (offset) should be shifted in order to fit within the scaled container.\n     * The offset passed to this function is scaled (safe) as well.\n     */\n\n  }, {\n    key: 'getOffsetAdjustment',\n    value: function getOffsetAdjustment(_ref2) {\n      var containerSize = _ref2.containerSize,\n          offset = _ref2.offset;\n\n      var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n      var safeTotalSize = this.getTotalSize();\n      var offsetPercentage = this._getOffsetPercentage({\n        containerSize: containerSize,\n        offset: offset,\n        totalSize: safeTotalSize\n      });\n\n      return Math.round(offsetPercentage * (safeTotalSize - totalSize));\n    }\n  }, {\n    key: 'getSizeAndPositionOfCell',\n    value: function getSizeAndPositionOfCell(index) {\n      return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);\n    }\n  }, {\n    key: 'getSizeAndPositionOfLastMeasuredCell',\n    value: function getSizeAndPositionOfLastMeasuredCell() {\n      return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();\n    }\n\n    /** See CellSizeAndPositionManager#getTotalSize */\n\n  }, {\n    key: 'getTotalSize',\n    value: function getTotalSize() {\n      return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());\n    }\n\n    /** See CellSizeAndPositionManager#getUpdatedOffsetForIndex */\n\n  }, {\n    key: 'getUpdatedOffsetForIndex',\n    value: function getUpdatedOffsetForIndex(_ref3) {\n      var _ref3$align = _ref3.align,\n          align = _ref3$align === undefined ? 'auto' : _ref3$align,\n          containerSize = _ref3.containerSize,\n          currentOffset = _ref3.currentOffset,\n          targetIndex = _ref3.targetIndex;\n\n      currentOffset = this._safeOffsetToOffset({\n        containerSize: containerSize,\n        offset: currentOffset\n      });\n\n      var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({\n        align: align,\n        containerSize: containerSize,\n        currentOffset: currentOffset,\n        targetIndex: targetIndex\n      });\n\n      return this._offsetToSafeOffset({\n        containerSize: containerSize,\n        offset: offset\n      });\n    }\n\n    /** See CellSizeAndPositionManager#getVisibleCellRange */\n\n  }, {\n    key: 'getVisibleCellRange',\n    value: function getVisibleCellRange(_ref4) {\n      var containerSize = _ref4.containerSize,\n          offset = _ref4.offset;\n\n      offset = this._safeOffsetToOffset({\n        containerSize: containerSize,\n        offset: offset\n      });\n\n      return this._cellSizeAndPositionManager.getVisibleCellRange({\n        containerSize: containerSize,\n        offset: offset\n      });\n    }\n  }, {\n    key: 'resetCell',\n    value: function resetCell(index) {\n      this._cellSizeAndPositionManager.resetCell(index);\n    }\n  }, {\n    key: '_getOffsetPercentage',\n    value: function _getOffsetPercentage(_ref5) {\n      var containerSize = _ref5.containerSize,\n          offset = _ref5.offset,\n          totalSize = _ref5.totalSize;\n\n      return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize);\n    }\n  }, {\n    key: '_offsetToSafeOffset',\n    value: function _offsetToSafeOffset(_ref6) {\n      var containerSize = _ref6.containerSize,\n          offset = _ref6.offset;\n\n      var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n      var safeTotalSize = this.getTotalSize();\n\n      if (totalSize === safeTotalSize) {\n        return offset;\n      } else {\n        var offsetPercentage = this._getOffsetPercentage({\n          containerSize: containerSize,\n          offset: offset,\n          totalSize: totalSize\n        });\n\n        return Math.round(offsetPercentage * (safeTotalSize - containerSize));\n      }\n    }\n  }, {\n    key: '_safeOffsetToOffset',\n    value: function _safeOffsetToOffset(_ref7) {\n      var containerSize = _ref7.containerSize,\n          offset = _ref7.offset;\n\n      var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n      var safeTotalSize = this.getTotalSize();\n\n      if (totalSize === safeTotalSize) {\n        return offset;\n      } else {\n        var offsetPercentage = this._getOffsetPercentage({\n          containerSize: containerSize,\n          offset: offset,\n          totalSize: safeTotalSize\n        });\n\n        return Math.round(offsetPercentage * (totalSize - containerSize));\n      }\n    }\n  }]);\n  return ScalingCellSizeAndPositionManager;\n}();\n\nexports.default = ScalingCellSizeAndPositionManager;", "// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n  return function keys(it) {\n    return $keys(toObject(it));\n  };\n});\n", "require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n", "module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _keys = require('babel-runtime/core-js/object/keys');\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nexports.default = createCallbackMemoizer;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Helper utility that updates the specified callback whenever any of the specified indices have changed.\n */\nfunction createCallbackMemoizer() {\n  var requireAllKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n  var cachedIndices = {};\n\n  return function (_ref) {\n    var callback = _ref.callback,\n        indices = _ref.indices;\n\n    var keys = (0, _keys2.default)(indices);\n    var allInitialized = !requireAllKeys || keys.every(function (key) {\n      var value = indices[key];\n      return Array.isArray(value) ? value.length > 0 : value >= 0;\n    });\n    var indexChanged = keys.length !== (0, _keys2.default)(cachedIndices).length || keys.some(function (key) {\n      var cachedValue = cachedIndices[key];\n      var value = indices[key];\n\n      return Array.isArray(value) ? cachedValue.join(',') !== value.join(',') : cachedValue !== value;\n    });\n\n    cachedIndices = indices;\n\n    if (allInitialized && indexChanged) {\n      callback(indices);\n    }\n  };\n}", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.SCROLL_DIRECTION_VERTICAL = exports.SCROLL_DIRECTION_HORIZONTAL = exports.SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_BACKWARD = undefined;\nexports.default = defaultOverscanIndicesGetter;\n\nvar _types = require('./types');\n\nvar SCROLL_DIRECTION_BACKWARD = exports.SCROLL_DIRECTION_BACKWARD = -1;\n\nvar SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_FORWARD = 1;\n\nvar SCROLL_DIRECTION_HORIZONTAL = exports.SCROLL_DIRECTION_HORIZONTAL = 'horizontal';\nvar SCROLL_DIRECTION_VERTICAL = exports.SCROLL_DIRECTION_VERTICAL = 'vertical';\n\n/**\n * Calculates the number of cells to overscan before and after a specified range.\n * This function ensures that overscanning doesn't exceed the available cells.\n */\n\nfunction defaultOverscanIndicesGetter(_ref) {\n  var cellCount = _ref.cellCount,\n      overscanCellsCount = _ref.overscanCellsCount,\n      scrollDirection = _ref.scrollDirection,\n      startIndex = _ref.startIndex,\n      stopIndex = _ref.stopIndex;\n\n  if (scrollDirection === SCROLL_DIRECTION_FORWARD) {\n    return {\n      overscanStartIndex: Math.max(0, startIndex),\n      overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\n    };\n  } else {\n    return {\n      overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\n      overscanStopIndex: Math.min(cellCount - 1, stopIndex)\n    };\n  }\n}", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = updateScrollIndexHelper;\n\nvar _ScalingCellSizeAndPositionManager = require('./ScalingCellSizeAndPositionManager.js');\n\nvar _ScalingCellSizeAndPositionManager2 = _interopRequireDefault(_ScalingCellSizeAndPositionManager);\n\nvar _types = require('../types');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Helper function that determines when to update scroll offsets to ensure that a scroll-to-index remains visible.\n * This function also ensures that the scroll ofset isn't past the last column/row of cells.\n */\n\nfunction updateScrollIndexHelper(_ref) {\n  var cellSize = _ref.cellSize,\n      cellSizeAndPositionManager = _ref.cellSizeAndPositionManager,\n      previousCellsCount = _ref.previousCellsCount,\n      previousCellSize = _ref.previousCellSize,\n      previousScrollToAlignment = _ref.previousScrollToAlignment,\n      previousScrollToIndex = _ref.previousScrollToIndex,\n      previousSize = _ref.previousSize,\n      scrollOffset = _ref.scrollOffset,\n      scrollToAlignment = _ref.scrollToAlignment,\n      scrollToIndex = _ref.scrollToIndex,\n      size = _ref.size,\n      sizeJustIncreasedFromZero = _ref.sizeJustIncreasedFromZero,\n      updateScrollIndexCallback = _ref.updateScrollIndexCallback;\n\n  var cellCount = cellSizeAndPositionManager.getCellCount();\n  var hasScrollToIndex = scrollToIndex >= 0 && scrollToIndex < cellCount;\n  var sizeHasChanged = size !== previousSize || sizeJustIncreasedFromZero || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize;\n\n  // If we have a new scroll target OR if height/row-height has changed,\n  // We should ensure that the scroll target is visible.\n  if (hasScrollToIndex && (sizeHasChanged || scrollToAlignment !== previousScrollToAlignment || scrollToIndex !== previousScrollToIndex)) {\n    updateScrollIndexCallback(scrollToIndex);\n\n    // If we don't have a selected item but list size or number of children have decreased,\n    // Make sure we aren't scrolled too far past the current content.\n  } else if (!hasScrollToIndex && cellCount > 0 && (size < previousSize || cellCount < previousCellsCount)) {\n    // We need to ensure that the current scroll offset is still within the collection's range.\n    // To do this, we don't need to measure everything; CellMeasurer would perform poorly.\n    // Just check to make sure we're still okay.\n    // Only adjust the scroll position if we've scrolled below the last set of rows.\n    if (scrollOffset > cellSizeAndPositionManager.getTotalSize() - size) {\n      updateScrollIndexCallback(cellCount - 1);\n    }\n  }\n}", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = defaultCellRangeRenderer;\n\nvar _types = require('./types');\n\n/**\n * Default implementation of cellRangeRenderer used by Grid.\n * This renderer supports cell-caching while the user is scrolling.\n */\n\nfunction defaultCellRangeRenderer(_ref) {\n  var cellCache = _ref.cellCache,\n      cellRenderer = _ref.cellRenderer,\n      columnSizeAndPositionManager = _ref.columnSizeAndPositionManager,\n      columnStartIndex = _ref.columnStartIndex,\n      columnStopIndex = _ref.columnStopIndex,\n      deferredMeasurementCache = _ref.deferredMeasurementCache,\n      horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment,\n      isScrolling = _ref.isScrolling,\n      isScrollingOptOut = _ref.isScrollingOptOut,\n      parent = _ref.parent,\n      rowSizeAndPositionManager = _ref.rowSizeAndPositionManager,\n      rowStartIndex = _ref.rowStartIndex,\n      rowStopIndex = _ref.rowStopIndex,\n      styleCache = _ref.styleCache,\n      verticalOffsetAdjustment = _ref.verticalOffsetAdjustment,\n      visibleColumnIndices = _ref.visibleColumnIndices,\n      visibleRowIndices = _ref.visibleRowIndices;\n\n  var renderedCells = [];\n\n  // Browsers have native size limits for elements (eg Chrome 33M pixels, IE 1.5M pixes).\n  // User cannot scroll beyond these size limitations.\n  // In order to work around this, ScalingCellSizeAndPositionManager compresses offsets.\n  // We should never cache styles for compressed offsets though as this can lead to bugs.\n  // See issue #576 for more.\n  var areOffsetsAdjusted = columnSizeAndPositionManager.areOffsetsAdjusted() || rowSizeAndPositionManager.areOffsetsAdjusted();\n\n  var canCacheStyle = !isScrolling && !areOffsetsAdjusted;\n\n  for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\n    var rowDatum = rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex);\n\n    for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\n      var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);\n      var isVisible = columnIndex >= visibleColumnIndices.start && columnIndex <= visibleColumnIndices.stop && rowIndex >= visibleRowIndices.start && rowIndex <= visibleRowIndices.stop;\n      var key = rowIndex + '-' + columnIndex;\n      var style = void 0;\n\n      // Cache style objects so shallow-compare doesn't re-render unnecessarily.\n      if (canCacheStyle && styleCache[key]) {\n        style = styleCache[key];\n      } else {\n        // In deferred mode, cells will be initially rendered before we know their size.\n        // Don't interfere with CellMeasurer's measurements by setting an invalid size.\n        if (deferredMeasurementCache && !deferredMeasurementCache.has(rowIndex, columnIndex)) {\n          // Position not-yet-measured cells at top/left 0,0,\n          // And give them width/height of 'auto' so they can grow larger than the parent Grid if necessary.\n          // Positioning them further to the right/bottom influences their measured size.\n          style = {\n            height: 'auto',\n            left: 0,\n            position: 'absolute',\n            top: 0,\n            width: 'auto'\n          };\n        } else {\n          style = {\n            height: rowDatum.size,\n            left: columnDatum.offset + horizontalOffsetAdjustment,\n            position: 'absolute',\n            top: rowDatum.offset + verticalOffsetAdjustment,\n            width: columnDatum.size\n          };\n\n          styleCache[key] = style;\n        }\n      }\n\n      var cellRendererParams = {\n        columnIndex: columnIndex,\n        isScrolling: isScrolling,\n        isVisible: isVisible,\n        key: key,\n        parent: parent,\n        rowIndex: rowIndex,\n        style: style\n      };\n\n      var renderedCell = void 0;\n\n      // Avoid re-creating cells while scrolling.\n      // This can lead to the same cell being created many times and can cause performance issues for \"heavy\" cells.\n      // If a scroll is in progress- cache and reuse cells.\n      // This cache will be thrown away once scrolling completes.\n      // However if we are scaling scroll positions and sizes, we should also avoid caching.\n      // This is because the offset changes slightly as scroll position changes and caching leads to stale values.\n      // For more info refer to issue #395\n      //\n      // If isScrollingOptOut is specified, we always cache cells.\n      // For more info refer to issue #1028\n      if ((isScrollingOptOut || isScrolling) && !horizontalOffsetAdjustment && !verticalOffsetAdjustment) {\n        if (!cellCache[key]) {\n          cellCache[key] = cellRenderer(cellRendererParams);\n        }\n\n        renderedCell = cellCache[key];\n\n        // If the user is no longer scrolling, don't cache cells.\n        // This makes dynamic cell content difficult for users and would also lead to a heavier memory footprint.\n      } else {\n        renderedCell = cellRenderer(cellRendererParams);\n      }\n\n      if (renderedCell == null || renderedCell === false) {\n        continue;\n      }\n\n      if (process.env.NODE_ENV !== 'production') {\n        warnAboutMissingStyle(parent, renderedCell);\n      }\n\n      renderedCells.push(renderedCell);\n    }\n  }\n\n  return renderedCells;\n}\n\nfunction warnAboutMissingStyle(parent, renderedCell) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (renderedCell) {\n      // If the direct child is a CellMeasurer, then we should check its child\n      // See issue #611\n      if (renderedCell.type && renderedCell.type.__internalCellMeasurerFlag) {\n        renderedCell = renderedCell.props.children;\n      }\n\n      if (renderedCell && renderedCell.props && renderedCell.props.style === undefined && parent.__warnedAboutMissingStyle !== true) {\n        parent.__warnedAboutMissingStyle = true;\n\n        console.warn('Rendered cell should include style property for positioning.');\n      }\n    }\n  }\n}", "function _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    \"default\": obj\n  };\n}\n\nmodule.exports = _interopRequireDefault;", "\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = scrollbarSize;\n\nvar _canUseDOM = _interopRequireDefault(require(\"./canUseDOM\"));\n\nvar size;\n\nfunction scrollbarSize(recalc) {\n  if (!size && size !== 0 || recalc) {\n    if (_canUseDOM.default) {\n      var scrollDiv = document.createElement('div');\n      scrollDiv.style.position = 'absolute';\n      scrollDiv.style.top = '-9999px';\n      scrollDiv.style.width = '50px';\n      scrollDiv.style.height = '50px';\n      scrollDiv.style.overflow = 'scroll';\n      document.body.appendChild(scrollDiv);\n      size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n      document.body.removeChild(scrollDiv);\n    }\n  }\n\n  return size;\n}\n\nmodule.exports = exports[\"default\"];", "// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n  try {\n    return it[key];\n  } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n  var O, T, B;\n  return it === undefined ? 'Undefined' : it === null ? 'Null'\n    // @@toStringTag case\n    : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n    // builtinTag case\n    : ARG ? cof(O)\n    // ES3 arguments fallback\n    : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n", "module.exports = function (it, Constructor, name, forbiddenField) {\n  if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n    throw TypeError(name + ': incorrect invocation!');\n  } return it;\n};\n", "// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n  try {\n    return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n  // 7.4.6 IteratorClose(iterator, completion)\n  } catch (e) {\n    var ret = iterator['return'];\n    if (ret !== undefined) anObject(ret.call(iterator));\n    throw e;\n  }\n};\n", "// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n", "var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n  if (it != undefined) return it[ITERATOR]\n    || it['@@iterator']\n    || Iterators[classof(it)];\n};\n", "var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n  var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n  var f = ctx(fn, that, entries ? 2 : 1);\n  var index = 0;\n  var length, step, iterator, result;\n  if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n  // fast case for arrays with default iterator\n  if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n    result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n    if (result === BREAK || result === RETURN) return result;\n  } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n    result = call(iterator, f, step.value, entries);\n    if (result === BREAK || result === RETURN) return result;\n  }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n", "// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n  var C = anObject(O).constructor;\n  var S;\n  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n", "// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n  var un = that === undefined;\n  switch (args.length) {\n    case 0: return un ? fn()\n                      : fn.call(that);\n    case 1: return un ? fn(args[0])\n                      : fn.call(that, args[0]);\n    case 2: return un ? fn(args[0], args[1])\n                      : fn.call(that, args[0], args[1]);\n    case 3: return un ? fn(args[0], args[1], args[2])\n                      : fn.call(that, args[0], args[1], args[2]);\n    case 4: return un ? fn(args[0], args[1], args[2], args[3])\n                      : fn.call(that, args[0], args[1], args[2], args[3]);\n  } return fn.apply(that, args);\n};\n", "var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n  var id = +this;\n  // eslint-disable-next-line no-prototype-builtins\n  if (queue.hasOwnProperty(id)) {\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\nvar listener = function (event) {\n  run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n  setTask = function setImmediate(fn) {\n    var args = [];\n    var i = 1;\n    while (arguments.length > i) args.push(arguments[i++]);\n    queue[++counter] = function () {\n      // eslint-disable-next-line no-new-func\n      invoke(typeof fn == 'function' ? fn : Function(fn), args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clearTask = function clearImmediate(id) {\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if (require('./_cof')(process) == 'process') {\n    defer = function (id) {\n      process.nextTick(ctx(run, id, 1));\n    };\n  // Sphere (JS game engine) Dispatch API\n  } else if (Dispatch && Dispatch.now) {\n    defer = function (id) {\n      Dispatch.now(ctx(run, id, 1));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  } else if (MessageChannel) {\n    channel = new MessageChannel();\n    port = channel.port2;\n    channel.port1.onmessage = listener;\n    defer = ctx(port.postMessage, port, 1);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n    defer = function (id) {\n      global.postMessage(id + '', '*');\n    };\n    global.addEventListener('message', listener, false);\n  // IE8-\n  } else if (ONREADYSTATECHANGE in cel('script')) {\n    defer = function (id) {\n      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n        html.removeChild(this);\n        run.call(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function (id) {\n      setTimeout(ctx(run, id, 1), 0);\n    };\n  }\n}\nmodule.exports = {\n  set: setTask,\n  clear: clearTask\n};\n", "var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n  var head, last, notify;\n\n  var flush = function () {\n    var parent, fn;\n    if (isNode && (parent = process.domain)) parent.exit();\n    while (head) {\n      fn = head.fn;\n      head = head.next;\n      try {\n        fn();\n      } catch (e) {\n        if (head) notify();\n        else last = undefined;\n        throw e;\n      }\n    } last = undefined;\n    if (parent) parent.enter();\n  };\n\n  // Node.js\n  if (isNode) {\n    notify = function () {\n      process.nextTick(flush);\n    };\n  // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n  } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n    var toggle = true;\n    var node = document.createTextNode('');\n    new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n    notify = function () {\n      node.data = toggle = !toggle;\n    };\n  // environments with maybe non-completely correct, but existent Promise\n  } else if (Promise && Promise.resolve) {\n    // Promise.resolve without an argument throws an error in LG WebOS 2\n    var promise = Promise.resolve(undefined);\n    notify = function () {\n      promise.then(flush);\n    };\n  // for other environments - macrotask based on:\n  // - setImmediate\n  // - MessageChannel\n  // - window.postMessag\n  // - onreadystatechange\n  // - setTimeout\n  } else {\n    notify = function () {\n      // strange IE + webpack dev server bug - use .call(global)\n      macrotask.call(global, flush);\n    };\n  }\n\n  return function (fn) {\n    var task = { fn: fn, next: undefined };\n    if (last) last.next = task;\n    if (!head) {\n      head = task;\n      notify();\n    } last = task;\n  };\n};\n", "'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n  var resolve, reject;\n  this.promise = new C(function ($$resolve, $$reject) {\n    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n    resolve = $$resolve;\n    reject = $$reject;\n  });\n  this.resolve = aFunction(resolve);\n  this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n  return new PromiseCapability(C);\n};\n", "module.exports = function (exec) {\n  try {\n    return { e: false, v: exec() };\n  } catch (e) {\n    return { e: true, v: e };\n  }\n};\n", "var global = require('./_global');\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n", "var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n  anObject(C);\n  if (isObject(x) && x.constructor === C) return x;\n  var promiseCapability = newPromiseCapability.f(C);\n  var resolve = promiseCapability.resolve;\n  resolve(x);\n  return promiseCapability.promise;\n};\n", "var hide = require('./_hide');\nmodule.exports = function (target, src, safe) {\n  for (var key in src) {\n    if (safe && target[key]) target[key] = src[key];\n    else hide(target, key, src[key]);\n  } return target;\n};\n", "'use strict';\nvar global = require('./_global');\nvar core = require('./_core');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n  var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n  if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n    configurable: true,\n    get: function () { return this; }\n  });\n};\n", "var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n  var riter = [7][ITERATOR]();\n  riter['return'] = function () { SAFE_CLOSING = true; };\n  // eslint-disable-next-line no-throw-literal\n  Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n  if (!skipClosing && !SAFE_CLOSING) return false;\n  var safe = false;\n  try {\n    var arr = [7];\n    var iter = arr[ITERATOR]();\n    iter.next = function () { return { done: safe = true }; };\n    arr[ITERATOR] = function () { return iter; };\n    exec(arr);\n  } catch (e) { /* empty */ }\n  return safe;\n};\n", "'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar userAgent = require('./_user-agent');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n  try {\n    // correct subclassing with @@species support\n    var promise = $Promise.resolve(1);\n    var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n      exec(empty, empty);\n    };\n    // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n    return (isNode || typeof PromiseRejectionEvent == 'function')\n      && promise.then(empty) instanceof FakePromise\n      // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n      // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n      // we can't detect it synchronously, so just check versions\n      && v8.indexOf('6.6') !== 0\n      && userAgent.indexOf('Chrome/66') === -1;\n  } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n  var then;\n  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n  if (promise._n) return;\n  promise._n = true;\n  var chain = promise._c;\n  microtask(function () {\n    var value = promise._v;\n    var ok = promise._s == 1;\n    var i = 0;\n    var run = function (reaction) {\n      var handler = ok ? reaction.ok : reaction.fail;\n      var resolve = reaction.resolve;\n      var reject = reaction.reject;\n      var domain = reaction.domain;\n      var result, then, exited;\n      try {\n        if (handler) {\n          if (!ok) {\n            if (promise._h == 2) onHandleUnhandled(promise);\n            promise._h = 1;\n          }\n          if (handler === true) result = value;\n          else {\n            if (domain) domain.enter();\n            result = handler(value); // may throw\n            if (domain) {\n              domain.exit();\n              exited = true;\n            }\n          }\n          if (result === reaction.promise) {\n            reject(TypeError('Promise-chain cycle'));\n          } else if (then = isThenable(result)) {\n            then.call(result, resolve, reject);\n          } else resolve(result);\n        } else reject(value);\n      } catch (e) {\n        if (domain && !exited) domain.exit();\n        reject(e);\n      }\n    };\n    while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n    promise._c = [];\n    promise._n = false;\n    if (isReject && !promise._h) onUnhandled(promise);\n  });\n};\nvar onUnhandled = function (promise) {\n  task.call(global, function () {\n    var value = promise._v;\n    var unhandled = isUnhandled(promise);\n    var result, handler, console;\n    if (unhandled) {\n      result = perform(function () {\n        if (isNode) {\n          process.emit('unhandledRejection', value, promise);\n        } else if (handler = global.onunhandledrejection) {\n          handler({ promise: promise, reason: value });\n        } else if ((console = global.console) && console.error) {\n          console.error('Unhandled promise rejection', value);\n        }\n      });\n      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n      promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n    } promise._a = undefined;\n    if (unhandled && result.e) throw result.v;\n  });\n};\nvar isUnhandled = function (promise) {\n  return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n  task.call(global, function () {\n    var handler;\n    if (isNode) {\n      process.emit('rejectionHandled', promise);\n    } else if (handler = global.onrejectionhandled) {\n      handler({ promise: promise, reason: promise._v });\n    }\n  });\n};\nvar $reject = function (value) {\n  var promise = this;\n  if (promise._d) return;\n  promise._d = true;\n  promise = promise._w || promise; // unwrap\n  promise._v = value;\n  promise._s = 2;\n  if (!promise._a) promise._a = promise._c.slice();\n  notify(promise, true);\n};\nvar $resolve = function (value) {\n  var promise = this;\n  var then;\n  if (promise._d) return;\n  promise._d = true;\n  promise = promise._w || promise; // unwrap\n  try {\n    if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n    if (then = isThenable(value)) {\n      microtask(function () {\n        var wrapper = { _w: promise, _d: false }; // wrap\n        try {\n          then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n        } catch (e) {\n          $reject.call(wrapper, e);\n        }\n      });\n    } else {\n      promise._v = value;\n      promise._s = 1;\n      notify(promise, false);\n    }\n  } catch (e) {\n    $reject.call({ _w: promise, _d: false }, e); // wrap\n  }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n  // 25.4.3.1 Promise(executor)\n  $Promise = function Promise(executor) {\n    anInstance(this, $Promise, PROMISE, '_h');\n    aFunction(executor);\n    Internal.call(this);\n    try {\n      executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n    } catch (err) {\n      $reject.call(this, err);\n    }\n  };\n  // eslint-disable-next-line no-unused-vars\n  Internal = function Promise(executor) {\n    this._c = [];             // <- awaiting reactions\n    this._a = undefined;      // <- checked in isUnhandled reactions\n    this._s = 0;              // <- state\n    this._d = false;          // <- done\n    this._v = undefined;      // <- value\n    this._h = 0;              // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n    this._n = false;          // <- notify\n  };\n  Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n    // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n    then: function then(onFulfilled, onRejected) {\n      var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n      reaction.fail = typeof onRejected == 'function' && onRejected;\n      reaction.domain = isNode ? process.domain : undefined;\n      this._c.push(reaction);\n      if (this._a) this._a.push(reaction);\n      if (this._s) notify(this, false);\n      return reaction.promise;\n    },\n    // 25.4.5.1 Promise.prototype.catch(onRejected)\n    'catch': function (onRejected) {\n      return this.then(undefined, onRejected);\n    }\n  });\n  OwnPromiseCapability = function () {\n    var promise = new Internal();\n    this.promise = promise;\n    this.resolve = ctx($resolve, promise, 1);\n    this.reject = ctx($reject, promise, 1);\n  };\n  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n    return C === $Promise || C === Wrapper\n      ? new OwnPromiseCapability(C)\n      : newGenericPromiseCapability(C);\n  };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n  // 25.4.4.5 Promise.reject(r)\n  reject: function reject(r) {\n    var capability = newPromiseCapability(this);\n    var $$reject = capability.reject;\n    $$reject(r);\n    return capability.promise;\n  }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n  // 25.4.4.6 Promise.resolve(x)\n  resolve: function resolve(x) {\n    return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n  }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n  $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n  // 25.4.4.1 Promise.all(iterable)\n  all: function all(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var values = [];\n      var index = 0;\n      var remaining = 1;\n      forOf(iterable, false, function (promise) {\n        var $index = index++;\n        var alreadyCalled = false;\n        values.push(undefined);\n        remaining++;\n        C.resolve(promise).then(function (value) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[$index] = value;\n          --remaining || resolve(values);\n        }, reject);\n      });\n      --remaining || resolve(values);\n    });\n    if (result.e) reject(result.v);\n    return capability.promise;\n  },\n  // 25.4.4.4 Promise.race(iterable)\n  race: function race(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var reject = capability.reject;\n    var result = perform(function () {\n      forOf(iterable, false, function (promise) {\n        C.resolve(promise).then(capability.resolve, reject);\n      });\n    });\n    if (result.e) reject(result.v);\n    return capability.promise;\n  }\n});\n", "// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n  var C = speciesConstructor(this, core.Promise || global.Promise);\n  var isFunction = typeof onFinally == 'function';\n  return this.then(\n    isFunction ? function (x) {\n      return promiseResolve(C, onFinally()).then(function () { return x; });\n    } : onFinally,\n    isFunction ? function (e) {\n      return promiseResolve(C, onFinally()).then(function () { throw e; });\n    } : onFinally\n  );\n} });\n", "'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n  var promiseCapability = newPromiseCapability.f(this);\n  var result = perform(callbackfn);\n  (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n  return promiseCapability.promise;\n} });\n", "require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\n", "module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\n\n// Properly handle server-side rendering.\nvar win = void 0;\n\nif (typeof window !== 'undefined') {\n  win = window;\n} else if (typeof self !== 'undefined') {\n  win = self;\n} else {\n  win = {};\n}\n\n// requestAnimationFrame() shim by Paul Irish\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\nvar request = win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.oRequestAnimationFrame || win.msRequestAnimationFrame || function (callback) {\n  return win.setTimeout(callback, 1000 / 60);\n};\n\nvar cancel = win.cancelAnimationFrame || win.webkitCancelAnimationFrame || win.mozCancelAnimationFrame || win.oCancelAnimationFrame || win.msCancelAnimationFrame || function (id) {\n  win.clearTimeout(id);\n};\n\nvar raf = exports.raf = request;\nvar caf = exports.caf = cancel;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.bpfrpt_proptype_AnimationTimeoutId = exports.requestAnimationTimeout = exports.cancelAnimationTimeout = undefined;\n\nvar _promise = require('babel-runtime/core-js/promise');\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _animationFrame = require('./animationFrame');\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar bpfrpt_proptype_AnimationTimeoutId = process.env.NODE_ENV === 'production' ? null : {\n  id: _propTypes2.default.number.isRequired\n};\nvar cancelAnimationTimeout = exports.cancelAnimationTimeout = function cancelAnimationTimeout(frame) {\n  return (0, _animationFrame.caf)(frame.id);\n};\n\n/**\n * Recursively calls requestAnimationFrame until a specified delay has been met or exceeded.\n * When the delay time has been reached the function you're timing out will be called.\n *\n * Credit: Joe Lambert (https://gist.github.com/joelambert/1002116#file-requesttimeout-js)\n */\nvar requestAnimationTimeout = exports.requestAnimationTimeout = function requestAnimationTimeout(callback, delay) {\n  var start = void 0;\n  // wait for end of processing current event handler, because event handler may be long\n  _promise2.default.resolve().then(function () {\n    start = Date.now();\n  });\n\n  var timeout = function timeout() {\n    if (Date.now() - start >= delay) {\n      callback.call();\n    } else {\n      frame.id = (0, _animationFrame.raf)(timeout);\n    }\n  };\n\n  var frame = {\n    id: (0, _animationFrame.raf)(timeout)\n  };\n\n  return frame;\n};\nexports.bpfrpt_proptype_AnimationTimeoutId = bpfrpt_proptype_AnimationTimeoutId;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = undefined;\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _clsx = require('clsx');\n\nvar _clsx2 = _interopRequireDefault(_clsx);\n\nvar _calculateSizeAndPositionDataAndUpdateScrollOffset = require('./utils/calculateSizeAndPositionDataAndUpdateScrollOffset');\n\nvar _calculateSizeAndPositionDataAndUpdateScrollOffset2 = _interopRequireDefault(_calculateSizeAndPositionDataAndUpdateScrollOffset);\n\nvar _ScalingCellSizeAndPositionManager = require('./utils/ScalingCellSizeAndPositionManager');\n\nvar _ScalingCellSizeAndPositionManager2 = _interopRequireDefault(_ScalingCellSizeAndPositionManager);\n\nvar _createCallbackMemoizer = require('../utils/createCallbackMemoizer');\n\nvar _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer);\n\nvar _defaultOverscanIndicesGetter = require('./defaultOverscanIndicesGetter');\n\nvar _defaultOverscanIndicesGetter2 = _interopRequireDefault(_defaultOverscanIndicesGetter);\n\nvar _updateScrollIndexHelper = require('./utils/updateScrollIndexHelper');\n\nvar _updateScrollIndexHelper2 = _interopRequireDefault(_updateScrollIndexHelper);\n\nvar _defaultCellRangeRenderer = require('./defaultCellRangeRenderer');\n\nvar _defaultCellRangeRenderer2 = _interopRequireDefault(_defaultCellRangeRenderer);\n\nvar _scrollbarSize = require('dom-helpers/scrollbarSize');\n\nvar _scrollbarSize2 = _interopRequireDefault(_scrollbarSize);\n\nvar _reactLifecyclesCompat = require('react-lifecycles-compat');\n\nvar _requestAnimationTimeout = require('../utils/requestAnimationTimeout');\n\nvar _types = require('./types');\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Specifies the number of milliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\nvar DEFAULT_SCROLLING_RESET_TIME_INTERVAL = exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;\n\n/**\n * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.\n * This prevents Grid from interrupting mouse-wheel animations (see issue #2).\n */\n\n\nvar SCROLL_POSITION_CHANGE_REASONS = {\n  OBSERVED: 'observed',\n  REQUESTED: 'requested'\n};\n\nvar renderNull = function renderNull() {\n  return null;\n};\n\n/**\n * Renders tabular data with virtualization along the vertical and horizontal axes.\n * Row heights and column widths must be known ahead of time and specified as properties.\n */\nvar Grid = function (_React$PureComponent) {\n  (0, _inherits3.default)(Grid, _React$PureComponent);\n\n  // Invokes onSectionRendered callback only when start/stop row or column indices change\n  function Grid(props) {\n    (0, _classCallCheck3.default)(this, Grid);\n\n    var _this = (0, _possibleConstructorReturn3.default)(this, (Grid.__proto__ || (0, _getPrototypeOf2.default)(Grid)).call(this, props));\n\n    _this._onGridRenderedMemoizer = (0, _createCallbackMemoizer2.default)();\n    _this._onScrollMemoizer = (0, _createCallbackMemoizer2.default)(false);\n    _this._deferredInvalidateColumnIndex = null;\n    _this._deferredInvalidateRowIndex = null;\n    _this._recomputeScrollLeftFlag = false;\n    _this._recomputeScrollTopFlag = false;\n    _this._horizontalScrollBarSize = 0;\n    _this._verticalScrollBarSize = 0;\n    _this._scrollbarPresenceChanged = false;\n    _this._renderedColumnStartIndex = 0;\n    _this._renderedColumnStopIndex = 0;\n    _this._renderedRowStartIndex = 0;\n    _this._renderedRowStopIndex = 0;\n    _this._styleCache = {};\n    _this._cellCache = {};\n\n    _this._debounceScrollEndedCallback = function () {\n      _this._disablePointerEventsTimeoutId = null;\n      // isScrolling is used to determine if we reset styleCache\n      _this.setState({\n        isScrolling: false,\n        needToResetStyleCache: false\n      });\n    };\n\n    _this._invokeOnGridRenderedHelper = function () {\n      var onSectionRendered = _this.props.onSectionRendered;\n\n\n      _this._onGridRenderedMemoizer({\n        callback: onSectionRendered,\n        indices: {\n          columnOverscanStartIndex: _this._columnStartIndex,\n          columnOverscanStopIndex: _this._columnStopIndex,\n          columnStartIndex: _this._renderedColumnStartIndex,\n          columnStopIndex: _this._renderedColumnStopIndex,\n          rowOverscanStartIndex: _this._rowStartIndex,\n          rowOverscanStopIndex: _this._rowStopIndex,\n          rowStartIndex: _this._renderedRowStartIndex,\n          rowStopIndex: _this._renderedRowStopIndex\n        }\n      });\n    };\n\n    _this._setScrollingContainerRef = function (ref) {\n      _this._scrollingContainer = ref;\n    };\n\n    _this._onScroll = function (event) {\n      // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.\n      // This invalid event can be detected by comparing event.target to this component's scrollable DOM element.\n      // See issue #404 for more information.\n      if (event.target === _this._scrollingContainer) {\n        _this.handleScrollEvent(event.target);\n      }\n    };\n\n    var columnSizeAndPositionManager = new _ScalingCellSizeAndPositionManager2.default({\n      cellCount: props.columnCount,\n      cellSizeGetter: function cellSizeGetter(params) {\n        return Grid._wrapSizeGetter(props.columnWidth)(params);\n      },\n      estimatedCellSize: Grid._getEstimatedColumnSize(props)\n    });\n    var rowSizeAndPositionManager = new _ScalingCellSizeAndPositionManager2.default({\n      cellCount: props.rowCount,\n      cellSizeGetter: function cellSizeGetter(params) {\n        return Grid._wrapSizeGetter(props.rowHeight)(params);\n      },\n      estimatedCellSize: Grid._getEstimatedRowSize(props)\n    });\n\n    _this.state = {\n      instanceProps: {\n        columnSizeAndPositionManager: columnSizeAndPositionManager,\n        rowSizeAndPositionManager: rowSizeAndPositionManager,\n\n        prevColumnWidth: props.columnWidth,\n        prevRowHeight: props.rowHeight,\n        prevColumnCount: props.columnCount,\n        prevRowCount: props.rowCount,\n        prevIsScrolling: props.isScrolling === true,\n        prevScrollToColumn: props.scrollToColumn,\n        prevScrollToRow: props.scrollToRow,\n\n        scrollbarSize: 0,\n        scrollbarSizeMeasured: false\n      },\n      isScrolling: false,\n      scrollDirectionHorizontal: _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD,\n      scrollDirectionVertical: _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD,\n      scrollLeft: 0,\n      scrollTop: 0,\n      scrollPositionChangeReason: null,\n\n      needToResetStyleCache: false\n    };\n\n    if (props.scrollToRow > 0) {\n      _this._initialScrollTop = _this._getCalculatedScrollTop(props, _this.state);\n    }\n    if (props.scrollToColumn > 0) {\n      _this._initialScrollLeft = _this._getCalculatedScrollLeft(props, _this.state);\n    }\n    return _this;\n  }\n\n  /**\n   * Gets offsets for a given cell and alignment.\n   */\n\n\n  (0, _createClass3.default)(Grid, [{\n    key: 'getOffsetForCell',\n    value: function getOffsetForCell() {\n      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n          _ref$alignment = _ref.alignment,\n          alignment = _ref$alignment === undefined ? this.props.scrollToAlignment : _ref$alignment,\n          _ref$columnIndex = _ref.columnIndex,\n          columnIndex = _ref$columnIndex === undefined ? this.props.scrollToColumn : _ref$columnIndex,\n          _ref$rowIndex = _ref.rowIndex,\n          rowIndex = _ref$rowIndex === undefined ? this.props.scrollToRow : _ref$rowIndex;\n\n      var offsetProps = (0, _extends3.default)({}, this.props, {\n        scrollToAlignment: alignment,\n        scrollToColumn: columnIndex,\n        scrollToRow: rowIndex\n      });\n\n      return {\n        scrollLeft: this._getCalculatedScrollLeft(offsetProps),\n        scrollTop: this._getCalculatedScrollTop(offsetProps)\n      };\n    }\n\n    /**\n     * Gets estimated total rows' height.\n     */\n\n  }, {\n    key: 'getTotalRowsHeight',\n    value: function getTotalRowsHeight() {\n      return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();\n    }\n\n    /**\n     * Gets estimated total columns' width.\n     */\n\n  }, {\n    key: 'getTotalColumnsWidth',\n    value: function getTotalColumnsWidth() {\n      return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();\n    }\n\n    /**\n     * This method handles a scroll event originating from an external scroll control.\n     * It's an advanced method and should probably not be used unless you're implementing a custom scroll-bar solution.\n     */\n\n  }, {\n    key: 'handleScrollEvent',\n    value: function handleScrollEvent(_ref2) {\n      var _ref2$scrollLeft = _ref2.scrollLeft,\n          scrollLeftParam = _ref2$scrollLeft === undefined ? 0 : _ref2$scrollLeft,\n          _ref2$scrollTop = _ref2.scrollTop,\n          scrollTopParam = _ref2$scrollTop === undefined ? 0 : _ref2$scrollTop;\n\n      // On iOS, we can arrive at negative offsets by swiping past the start.\n      // To prevent flicker here, we make playing in the negative offset zone cause nothing to happen.\n      if (scrollTopParam < 0) {\n        return;\n      }\n\n      // Prevent pointer events from interrupting a smooth scroll\n      this._debounceScrollEnded();\n\n      var _props = this.props,\n          autoHeight = _props.autoHeight,\n          autoWidth = _props.autoWidth,\n          height = _props.height,\n          width = _props.width;\n      var instanceProps = this.state.instanceProps;\n\n      // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,\n      // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.\n      // This causes a series of rapid renders that is slow for long lists.\n      // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.\n\n      var scrollbarSize = instanceProps.scrollbarSize;\n      var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n      var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n      var scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), scrollLeftParam);\n      var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), scrollTopParam);\n\n      // Certain devices (like Apple touchpad) rapid-fire duplicate events.\n      // Don't force a re-render if this is the case.\n      // The mouse may move faster then the animation frame does.\n      // Use requestAnimationFrame to avoid over-updating.\n      if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {\n        // Track scrolling direction so we can more efficiently overscan rows to reduce empty space around the edges while scrolling.\n        // Don't change direction for an axis unless scroll offset has changed.\n        var _scrollDirectionHorizontal = scrollLeft !== this.state.scrollLeft ? scrollLeft > this.state.scrollLeft ? _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD : _defaultOverscanIndicesGetter.SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionHorizontal;\n        var _scrollDirectionVertical = scrollTop !== this.state.scrollTop ? scrollTop > this.state.scrollTop ? _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD : _defaultOverscanIndicesGetter.SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionVertical;\n\n        var newState = {\n          isScrolling: true,\n          scrollDirectionHorizontal: _scrollDirectionHorizontal,\n          scrollDirectionVertical: _scrollDirectionVertical,\n          scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.OBSERVED\n        };\n\n        if (!autoHeight) {\n          newState.scrollTop = scrollTop;\n        }\n\n        if (!autoWidth) {\n          newState.scrollLeft = scrollLeft;\n        }\n\n        newState.needToResetStyleCache = false;\n        this.setState(newState);\n      }\n\n      this._invokeOnScrollMemoizer({\n        scrollLeft: scrollLeft,\n        scrollTop: scrollTop,\n        totalColumnsWidth: totalColumnsWidth,\n        totalRowsHeight: totalRowsHeight\n      });\n    }\n\n    /**\n     * Invalidate Grid size and recompute visible cells.\n     * This is a deferred wrapper for recomputeGridSize().\n     * It sets a flag to be evaluated on cDM/cDU to avoid unnecessary renders.\n     * This method is intended for advanced use-cases like CellMeasurer.\n     */\n    // @TODO (bvaughn) Add automated test coverage for this.\n\n  }, {\n    key: 'invalidateCellSizeAfterRender',\n    value: function invalidateCellSizeAfterRender(_ref3) {\n      var columnIndex = _ref3.columnIndex,\n          rowIndex = _ref3.rowIndex;\n\n      this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;\n      this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;\n    }\n\n    /**\n     * Pre-measure all columns and rows in a Grid.\n     * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured.\n     * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one).\n     */\n\n  }, {\n    key: 'measureAllCells',\n    value: function measureAllCells() {\n      var _props2 = this.props,\n          columnCount = _props2.columnCount,\n          rowCount = _props2.rowCount;\n      var instanceProps = this.state.instanceProps;\n\n      instanceProps.columnSizeAndPositionManager.getSizeAndPositionOfCell(columnCount - 1);\n      instanceProps.rowSizeAndPositionManager.getSizeAndPositionOfCell(rowCount - 1);\n    }\n\n    /**\n     * Forced recompute of row heights and column widths.\n     * This function should be called if dynamic column or row sizes have changed but nothing else has.\n     * Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes.\n     */\n\n  }, {\n    key: 'recomputeGridSize',\n    value: function recomputeGridSize() {\n      var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n          _ref4$columnIndex = _ref4.columnIndex,\n          columnIndex = _ref4$columnIndex === undefined ? 0 : _ref4$columnIndex,\n          _ref4$rowIndex = _ref4.rowIndex,\n          rowIndex = _ref4$rowIndex === undefined ? 0 : _ref4$rowIndex;\n\n      var _props3 = this.props,\n          scrollToColumn = _props3.scrollToColumn,\n          scrollToRow = _props3.scrollToRow;\n      var instanceProps = this.state.instanceProps;\n\n\n      instanceProps.columnSizeAndPositionManager.resetCell(columnIndex);\n      instanceProps.rowSizeAndPositionManager.resetCell(rowIndex);\n\n      // Cell sizes may be determined by a function property.\n      // In this case the cDU handler can't know if they changed.\n      // Store this flag to let the next cDU pass know it needs to recompute the scroll offset.\n      this._recomputeScrollLeftFlag = scrollToColumn >= 0 && (this.state.scrollDirectionHorizontal === _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD ? columnIndex <= scrollToColumn : columnIndex >= scrollToColumn);\n      this._recomputeScrollTopFlag = scrollToRow >= 0 && (this.state.scrollDirectionVertical === _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD ? rowIndex <= scrollToRow : rowIndex >= scrollToRow);\n\n      // Clear cell cache in case we are scrolling;\n      // Invalid row heights likely mean invalid cached content as well.\n      this._styleCache = {};\n      this._cellCache = {};\n\n      this.forceUpdate();\n    }\n\n    /**\n     * Ensure column and row are visible.\n     */\n\n  }, {\n    key: 'scrollToCell',\n    value: function scrollToCell(_ref5) {\n      var columnIndex = _ref5.columnIndex,\n          rowIndex = _ref5.rowIndex;\n      var columnCount = this.props.columnCount;\n\n\n      var props = this.props;\n\n      // Don't adjust scroll offset for single-column grids (eg List, Table).\n      // This can cause a funky scroll offset because of the vertical scrollbar width.\n      if (columnCount > 1 && columnIndex !== undefined) {\n        this._updateScrollLeftForScrollToColumn((0, _extends3.default)({}, props, {\n          scrollToColumn: columnIndex\n        }));\n      }\n\n      if (rowIndex !== undefined) {\n        this._updateScrollTopForScrollToRow((0, _extends3.default)({}, props, {\n          scrollToRow: rowIndex\n        }));\n      }\n    }\n  }, {\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      var _props4 = this.props,\n          getScrollbarSize = _props4.getScrollbarSize,\n          height = _props4.height,\n          scrollLeft = _props4.scrollLeft,\n          scrollToColumn = _props4.scrollToColumn,\n          scrollTop = _props4.scrollTop,\n          scrollToRow = _props4.scrollToRow,\n          width = _props4.width;\n      var instanceProps = this.state.instanceProps;\n\n      // Reset initial offsets to be ignored in browser\n\n      this._initialScrollTop = 0;\n      this._initialScrollLeft = 0;\n\n      // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.\n      // We must do this at the start of the method as we may calculate and update scroll position below.\n      this._handleInvalidatedGridSize();\n\n      // If this component was first rendered server-side, scrollbar size will be undefined.\n      // In that event we need to remeasure.\n      if (!instanceProps.scrollbarSizeMeasured) {\n        this.setState(function (prevState) {\n          var stateUpdate = (0, _extends3.default)({}, prevState, { needToResetStyleCache: false });\n          stateUpdate.instanceProps.scrollbarSize = getScrollbarSize();\n          stateUpdate.instanceProps.scrollbarSizeMeasured = true;\n          return stateUpdate;\n        });\n      }\n\n      if (typeof scrollLeft === 'number' && scrollLeft >= 0 || typeof scrollTop === 'number' && scrollTop >= 0) {\n        var stateUpdate = Grid._getScrollToPositionStateUpdate({\n          prevState: this.state,\n          scrollLeft: scrollLeft,\n          scrollTop: scrollTop\n        });\n        if (stateUpdate) {\n          stateUpdate.needToResetStyleCache = false;\n          this.setState(stateUpdate);\n        }\n      }\n\n      // refs don't work in `react-test-renderer`\n      if (this._scrollingContainer) {\n        // setting the ref's scrollLeft and scrollTop.\n        // Somehow in MultiGrid the main grid doesn't trigger a update on mount.\n        if (this._scrollingContainer.scrollLeft !== this.state.scrollLeft) {\n          this._scrollingContainer.scrollLeft = this.state.scrollLeft;\n        }\n        if (this._scrollingContainer.scrollTop !== this.state.scrollTop) {\n          this._scrollingContainer.scrollTop = this.state.scrollTop;\n        }\n      }\n\n      // Don't update scroll offset if the size is 0; we don't render any cells in this case.\n      // Setting a state may cause us to later thing we've updated the offce when we haven't.\n      var sizeIsBiggerThanZero = height > 0 && width > 0;\n      if (scrollToColumn >= 0 && sizeIsBiggerThanZero) {\n        this._updateScrollLeftForScrollToColumn();\n      }\n      if (scrollToRow >= 0 && sizeIsBiggerThanZero) {\n        this._updateScrollTopForScrollToRow();\n      }\n\n      // Update onRowsRendered callback\n      this._invokeOnGridRenderedHelper();\n\n      // Initialize onScroll callback\n      this._invokeOnScrollMemoizer({\n        scrollLeft: scrollLeft || 0,\n        scrollTop: scrollTop || 0,\n        totalColumnsWidth: instanceProps.columnSizeAndPositionManager.getTotalSize(),\n        totalRowsHeight: instanceProps.rowSizeAndPositionManager.getTotalSize()\n      });\n\n      this._maybeCallOnScrollbarPresenceChange();\n    }\n\n    /**\n     * @private\n     * This method updates scrollLeft/scrollTop in state for the following conditions:\n     * 1) New scroll-to-cell props have been set\n     */\n\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate(prevProps, prevState) {\n      var _this2 = this;\n\n      var _props5 = this.props,\n          autoHeight = _props5.autoHeight,\n          autoWidth = _props5.autoWidth,\n          columnCount = _props5.columnCount,\n          height = _props5.height,\n          rowCount = _props5.rowCount,\n          scrollToAlignment = _props5.scrollToAlignment,\n          scrollToColumn = _props5.scrollToColumn,\n          scrollToRow = _props5.scrollToRow,\n          width = _props5.width;\n      var _state = this.state,\n          scrollLeft = _state.scrollLeft,\n          scrollPositionChangeReason = _state.scrollPositionChangeReason,\n          scrollTop = _state.scrollTop,\n          instanceProps = _state.instanceProps;\n      // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.\n      // We must do this at the start of the method as we may calculate and update scroll position below.\n\n      this._handleInvalidatedGridSize();\n\n      // Handle edge case where column or row count has only just increased over 0.\n      // In this case we may have to restore a previously-specified scroll offset.\n      // For more info see bvaughn/react-virtualized/issues/218\n      var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && prevProps.columnCount === 0 || rowCount > 0 && prevProps.rowCount === 0;\n\n      // Make sure requested changes to :scrollLeft or :scrollTop get applied.\n      // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,\n      // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread).\n      // So we only set these when we require an adjustment of the scroll position.\n      // See issue #2 for more information.\n      if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {\n        // @TRICKY :autoHeight and :autoWidth properties instructs Grid to leave :scrollTop and :scrollLeft management to an external HOC (eg WindowScroller).\n        // In this case we should avoid checking scrollingContainer.scrollTop and scrollingContainer.scrollLeft since it forces layout/flow.\n        if (!autoWidth && scrollLeft >= 0 && (scrollLeft !== this._scrollingContainer.scrollLeft || columnOrRowCountJustIncreasedFromZero)) {\n          this._scrollingContainer.scrollLeft = scrollLeft;\n        }\n        if (!autoHeight && scrollTop >= 0 && (scrollTop !== this._scrollingContainer.scrollTop || columnOrRowCountJustIncreasedFromZero)) {\n          this._scrollingContainer.scrollTop = scrollTop;\n        }\n      }\n\n      // Special case where the previous size was 0:\n      // In this case we don't show any windowed cells at all.\n      // So we should always recalculate offset afterwards.\n      var sizeJustIncreasedFromZero = (prevProps.width === 0 || prevProps.height === 0) && height > 0 && width > 0;\n\n      // Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it\n      // @TODO Do we also need this check or can the one in componentWillUpdate() suffice?\n      if (this._recomputeScrollLeftFlag) {\n        this._recomputeScrollLeftFlag = false;\n        this._updateScrollLeftForScrollToColumn(this.props);\n      } else {\n        (0, _updateScrollIndexHelper2.default)({\n          cellSizeAndPositionManager: instanceProps.columnSizeAndPositionManager,\n          previousCellsCount: prevProps.columnCount,\n          previousCellSize: prevProps.columnWidth,\n          previousScrollToAlignment: prevProps.scrollToAlignment,\n          previousScrollToIndex: prevProps.scrollToColumn,\n          previousSize: prevProps.width,\n          scrollOffset: scrollLeft,\n          scrollToAlignment: scrollToAlignment,\n          scrollToIndex: scrollToColumn,\n          size: width,\n          sizeJustIncreasedFromZero: sizeJustIncreasedFromZero,\n          updateScrollIndexCallback: function updateScrollIndexCallback() {\n            return _this2._updateScrollLeftForScrollToColumn(_this2.props);\n          }\n        });\n      }\n\n      if (this._recomputeScrollTopFlag) {\n        this._recomputeScrollTopFlag = false;\n        this._updateScrollTopForScrollToRow(this.props);\n      } else {\n        (0, _updateScrollIndexHelper2.default)({\n          cellSizeAndPositionManager: instanceProps.rowSizeAndPositionManager,\n          previousCellsCount: prevProps.rowCount,\n          previousCellSize: prevProps.rowHeight,\n          previousScrollToAlignment: prevProps.scrollToAlignment,\n          previousScrollToIndex: prevProps.scrollToRow,\n          previousSize: prevProps.height,\n          scrollOffset: scrollTop,\n          scrollToAlignment: scrollToAlignment,\n          scrollToIndex: scrollToRow,\n          size: height,\n          sizeJustIncreasedFromZero: sizeJustIncreasedFromZero,\n          updateScrollIndexCallback: function updateScrollIndexCallback() {\n            return _this2._updateScrollTopForScrollToRow(_this2.props);\n          }\n        });\n      }\n\n      // Update onRowsRendered callback if start/stop indices have changed\n      this._invokeOnGridRenderedHelper();\n\n      // Changes to :scrollLeft or :scrollTop should also notify :onScroll listeners\n      if (scrollLeft !== prevState.scrollLeft || scrollTop !== prevState.scrollTop) {\n        var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n        var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n\n        this._invokeOnScrollMemoizer({\n          scrollLeft: scrollLeft,\n          scrollTop: scrollTop,\n          totalColumnsWidth: totalColumnsWidth,\n          totalRowsHeight: totalRowsHeight\n        });\n      }\n\n      this._maybeCallOnScrollbarPresenceChange();\n    }\n  }, {\n    key: 'componentWillUnmount',\n    value: function componentWillUnmount() {\n      if (this._disablePointerEventsTimeoutId) {\n        (0, _requestAnimationTimeout.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId);\n      }\n    }\n\n    /**\n     * This method updates scrollLeft/scrollTop in state for the following conditions:\n     * 1) Empty content (0 rows or columns)\n     * 2) New scroll props overriding the current state\n     * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid\n     */\n\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props6 = this.props,\n          autoContainerWidth = _props6.autoContainerWidth,\n          autoHeight = _props6.autoHeight,\n          autoWidth = _props6.autoWidth,\n          className = _props6.className,\n          containerProps = _props6.containerProps,\n          containerRole = _props6.containerRole,\n          containerStyle = _props6.containerStyle,\n          height = _props6.height,\n          id = _props6.id,\n          noContentRenderer = _props6.noContentRenderer,\n          role = _props6.role,\n          style = _props6.style,\n          tabIndex = _props6.tabIndex,\n          width = _props6.width;\n      var _state2 = this.state,\n          instanceProps = _state2.instanceProps,\n          needToResetStyleCache = _state2.needToResetStyleCache;\n\n\n      var isScrolling = this._isScrolling();\n\n      var gridStyle = {\n        boxSizing: 'border-box',\n        direction: 'ltr',\n        height: autoHeight ? 'auto' : height,\n        position: 'relative',\n        width: autoWidth ? 'auto' : width,\n        WebkitOverflowScrolling: 'touch',\n        willChange: 'transform'\n      };\n\n      if (needToResetStyleCache) {\n        this._styleCache = {};\n      }\n\n      // calculate _styleCache here\n      // if state.isScrolling (not from _isScrolling) then reset\n      if (!this.state.isScrolling) {\n        this._resetStyleCache();\n      }\n\n      // calculate children to render here\n      this._calculateChildrenToRender(this.props, this.state);\n\n      var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n      var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n\n      // Force browser to hide scrollbars when we know they aren't necessary.\n      // Otherwise once scrollbars appear they may not disappear again.\n      // For more info see issue #116\n      var verticalScrollBarSize = totalRowsHeight > height ? instanceProps.scrollbarSize : 0;\n      var horizontalScrollBarSize = totalColumnsWidth > width ? instanceProps.scrollbarSize : 0;\n\n      if (horizontalScrollBarSize !== this._horizontalScrollBarSize || verticalScrollBarSize !== this._verticalScrollBarSize) {\n        this._horizontalScrollBarSize = horizontalScrollBarSize;\n        this._verticalScrollBarSize = verticalScrollBarSize;\n        this._scrollbarPresenceChanged = true;\n      }\n\n      // Also explicitly init styles to 'auto' if scrollbars are required.\n      // This works around an obscure edge case where external CSS styles have not yet been loaded,\n      // But an initial scroll index of offset is set as an external prop.\n      // Without this style, Grid would render the correct range of cells but would NOT update its internal offset.\n      // This was originally reported via clauderic/react-infinite-calendar/issues/23\n      gridStyle.overflowX = totalColumnsWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto';\n      gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto';\n\n      var childrenToDisplay = this._childrenToDisplay;\n\n      var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0;\n\n      return React.createElement(\n        'div',\n        (0, _extends3.default)({\n          ref: this._setScrollingContainerRef\n        }, containerProps, {\n          'aria-label': this.props['aria-label'],\n          'aria-readonly': this.props['aria-readonly'],\n          className: (0, _clsx2.default)('ReactVirtualized__Grid', className),\n          id: id,\n          onScroll: this._onScroll,\n          role: role,\n          style: (0, _extends3.default)({}, gridStyle, style),\n          tabIndex: tabIndex }),\n        childrenToDisplay.length > 0 && React.createElement(\n          'div',\n          {\n            className: 'ReactVirtualized__Grid__innerScrollContainer',\n            role: containerRole,\n            style: (0, _extends3.default)({\n              width: autoContainerWidth ? 'auto' : totalColumnsWidth,\n              height: totalRowsHeight,\n              maxWidth: totalColumnsWidth,\n              maxHeight: totalRowsHeight,\n              overflow: 'hidden',\n              pointerEvents: isScrolling ? 'none' : '',\n              position: 'relative'\n            }, containerStyle) },\n          childrenToDisplay\n        ),\n        showNoContentRenderer && noContentRenderer()\n      );\n    }\n\n    /* ---------------------------- Helper methods ---------------------------- */\n\n  }, {\n    key: '_calculateChildrenToRender',\n    value: function _calculateChildrenToRender() {\n      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n      var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n      var cellRenderer = props.cellRenderer,\n          cellRangeRenderer = props.cellRangeRenderer,\n          columnCount = props.columnCount,\n          deferredMeasurementCache = props.deferredMeasurementCache,\n          height = props.height,\n          overscanColumnCount = props.overscanColumnCount,\n          overscanIndicesGetter = props.overscanIndicesGetter,\n          overscanRowCount = props.overscanRowCount,\n          rowCount = props.rowCount,\n          width = props.width,\n          isScrollingOptOut = props.isScrollingOptOut;\n      var scrollDirectionHorizontal = state.scrollDirectionHorizontal,\n          scrollDirectionVertical = state.scrollDirectionVertical,\n          instanceProps = state.instanceProps;\n\n\n      var scrollTop = this._initialScrollTop > 0 ? this._initialScrollTop : state.scrollTop;\n      var scrollLeft = this._initialScrollLeft > 0 ? this._initialScrollLeft : state.scrollLeft;\n\n      var isScrolling = this._isScrolling(props, state);\n\n      this._childrenToDisplay = [];\n\n      // Render only enough columns and rows to cover the visible area of the grid.\n      if (height > 0 && width > 0) {\n        var visibleColumnIndices = instanceProps.columnSizeAndPositionManager.getVisibleCellRange({\n          containerSize: width,\n          offset: scrollLeft\n        });\n        var visibleRowIndices = instanceProps.rowSizeAndPositionManager.getVisibleCellRange({\n          containerSize: height,\n          offset: scrollTop\n        });\n\n        var horizontalOffsetAdjustment = instanceProps.columnSizeAndPositionManager.getOffsetAdjustment({\n          containerSize: width,\n          offset: scrollLeft\n        });\n        var verticalOffsetAdjustment = instanceProps.rowSizeAndPositionManager.getOffsetAdjustment({\n          containerSize: height,\n          offset: scrollTop\n        });\n\n        // Store for _invokeOnGridRenderedHelper()\n        this._renderedColumnStartIndex = visibleColumnIndices.start;\n        this._renderedColumnStopIndex = visibleColumnIndices.stop;\n        this._renderedRowStartIndex = visibleRowIndices.start;\n        this._renderedRowStopIndex = visibleRowIndices.stop;\n\n        var overscanColumnIndices = overscanIndicesGetter({\n          direction: 'horizontal',\n          cellCount: columnCount,\n          overscanCellsCount: overscanColumnCount,\n          scrollDirection: scrollDirectionHorizontal,\n          startIndex: typeof visibleColumnIndices.start === 'number' ? visibleColumnIndices.start : 0,\n          stopIndex: typeof visibleColumnIndices.stop === 'number' ? visibleColumnIndices.stop : -1\n        });\n\n        var overscanRowIndices = overscanIndicesGetter({\n          direction: 'vertical',\n          cellCount: rowCount,\n          overscanCellsCount: overscanRowCount,\n          scrollDirection: scrollDirectionVertical,\n          startIndex: typeof visibleRowIndices.start === 'number' ? visibleRowIndices.start : 0,\n          stopIndex: typeof visibleRowIndices.stop === 'number' ? visibleRowIndices.stop : -1\n        });\n\n        // Store for _invokeOnGridRenderedHelper()\n        var columnStartIndex = overscanColumnIndices.overscanStartIndex;\n        var columnStopIndex = overscanColumnIndices.overscanStopIndex;\n        var rowStartIndex = overscanRowIndices.overscanStartIndex;\n        var rowStopIndex = overscanRowIndices.overscanStopIndex;\n\n        // Advanced use-cases (eg CellMeasurer) require batched measurements to determine accurate sizes.\n        if (deferredMeasurementCache) {\n          // If rows have a dynamic height, scan the rows we are about to render.\n          // If any have not yet been measured, then we need to render all columns initially,\n          // Because the height of the row is equal to the tallest cell within that row,\n          // (And so we can't know the height without measuring all column-cells first).\n          if (!deferredMeasurementCache.hasFixedHeight()) {\n            for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\n              if (!deferredMeasurementCache.has(rowIndex, 0)) {\n                columnStartIndex = 0;\n                columnStopIndex = columnCount - 1;\n                break;\n              }\n            }\n          }\n\n          // If columns have a dynamic width, scan the columns we are about to render.\n          // If any have not yet been measured, then we need to render all rows initially,\n          // Because the width of the column is equal to the widest cell within that column,\n          // (And so we can't know the width without measuring all row-cells first).\n          if (!deferredMeasurementCache.hasFixedWidth()) {\n            for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\n              if (!deferredMeasurementCache.has(0, columnIndex)) {\n                rowStartIndex = 0;\n                rowStopIndex = rowCount - 1;\n                break;\n              }\n            }\n          }\n        }\n\n        this._childrenToDisplay = cellRangeRenderer({\n          cellCache: this._cellCache,\n          cellRenderer: cellRenderer,\n          columnSizeAndPositionManager: instanceProps.columnSizeAndPositionManager,\n          columnStartIndex: columnStartIndex,\n          columnStopIndex: columnStopIndex,\n          deferredMeasurementCache: deferredMeasurementCache,\n          horizontalOffsetAdjustment: horizontalOffsetAdjustment,\n          isScrolling: isScrolling,\n          isScrollingOptOut: isScrollingOptOut,\n          parent: this,\n          rowSizeAndPositionManager: instanceProps.rowSizeAndPositionManager,\n          rowStartIndex: rowStartIndex,\n          rowStopIndex: rowStopIndex,\n          scrollLeft: scrollLeft,\n          scrollTop: scrollTop,\n          styleCache: this._styleCache,\n          verticalOffsetAdjustment: verticalOffsetAdjustment,\n          visibleColumnIndices: visibleColumnIndices,\n          visibleRowIndices: visibleRowIndices\n        });\n\n        // update the indices\n        this._columnStartIndex = columnStartIndex;\n        this._columnStopIndex = columnStopIndex;\n        this._rowStartIndex = rowStartIndex;\n        this._rowStopIndex = rowStopIndex;\n      }\n    }\n\n    /**\n     * Sets an :isScrolling flag for a small window of time.\n     * This flag is used to disable pointer events on the scrollable portion of the Grid.\n     * This prevents jerky/stuttery mouse-wheel scrolling.\n     */\n\n  }, {\n    key: '_debounceScrollEnded',\n    value: function _debounceScrollEnded() {\n      var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;\n\n\n      if (this._disablePointerEventsTimeoutId) {\n        (0, _requestAnimationTimeout.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId);\n      }\n\n      this._disablePointerEventsTimeoutId = (0, _requestAnimationTimeout.requestAnimationTimeout)(this._debounceScrollEndedCallback, scrollingResetTimeInterval);\n    }\n  }, {\n    key: '_handleInvalidatedGridSize',\n\n\n    /**\n     * Check for batched CellMeasurer size invalidations.\n     * This will occur the first time one or more previously unmeasured cells are rendered.\n     */\n    value: function _handleInvalidatedGridSize() {\n      if (typeof this._deferredInvalidateColumnIndex === 'number' && typeof this._deferredInvalidateRowIndex === 'number') {\n        var columnIndex = this._deferredInvalidateColumnIndex;\n        var rowIndex = this._deferredInvalidateRowIndex;\n\n        this._deferredInvalidateColumnIndex = null;\n        this._deferredInvalidateRowIndex = null;\n\n        this.recomputeGridSize({ columnIndex: columnIndex, rowIndex: rowIndex });\n      }\n    }\n  }, {\n    key: '_invokeOnScrollMemoizer',\n    value: function _invokeOnScrollMemoizer(_ref6) {\n      var _this3 = this;\n\n      var scrollLeft = _ref6.scrollLeft,\n          scrollTop = _ref6.scrollTop,\n          totalColumnsWidth = _ref6.totalColumnsWidth,\n          totalRowsHeight = _ref6.totalRowsHeight;\n\n      this._onScrollMemoizer({\n        callback: function callback(_ref7) {\n          var scrollLeft = _ref7.scrollLeft,\n              scrollTop = _ref7.scrollTop;\n          var _props7 = _this3.props,\n              height = _props7.height,\n              onScroll = _props7.onScroll,\n              width = _props7.width;\n\n\n          onScroll({\n            clientHeight: height,\n            clientWidth: width,\n            scrollHeight: totalRowsHeight,\n            scrollLeft: scrollLeft,\n            scrollTop: scrollTop,\n            scrollWidth: totalColumnsWidth\n          });\n        },\n        indices: {\n          scrollLeft: scrollLeft,\n          scrollTop: scrollTop\n        }\n      });\n    }\n  }, {\n    key: '_isScrolling',\n    value: function _isScrolling() {\n      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n      var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n      // If isScrolling is defined in props, use it to override the value in state\n      // This is a performance optimization for WindowScroller + Grid\n      return Object.hasOwnProperty.call(props, 'isScrolling') ? Boolean(props.isScrolling) : Boolean(state.isScrolling);\n    }\n  }, {\n    key: '_maybeCallOnScrollbarPresenceChange',\n    value: function _maybeCallOnScrollbarPresenceChange() {\n      if (this._scrollbarPresenceChanged) {\n        var _onScrollbarPresenceChange = this.props.onScrollbarPresenceChange;\n\n\n        this._scrollbarPresenceChanged = false;\n\n        _onScrollbarPresenceChange({\n          horizontal: this._horizontalScrollBarSize > 0,\n          size: this.state.instanceProps.scrollbarSize,\n          vertical: this._verticalScrollBarSize > 0\n        });\n      }\n    }\n  }, {\n    key: 'scrollToPosition',\n\n\n    /**\n     * Scroll to the specified offset(s).\n     * Useful for animating position changes.\n     */\n    value: function scrollToPosition(_ref8) {\n      var scrollLeft = _ref8.scrollLeft,\n          scrollTop = _ref8.scrollTop;\n\n      var stateUpdate = Grid._getScrollToPositionStateUpdate({\n        prevState: this.state,\n        scrollLeft: scrollLeft,\n        scrollTop: scrollTop\n      });\n\n      if (stateUpdate) {\n        stateUpdate.needToResetStyleCache = false;\n        this.setState(stateUpdate);\n      }\n    }\n  }, {\n    key: '_getCalculatedScrollLeft',\n    value: function _getCalculatedScrollLeft() {\n      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n      var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n      return Grid._getCalculatedScrollLeft(props, state);\n    }\n  }, {\n    key: '_updateScrollLeftForScrollToColumn',\n    value: function _updateScrollLeftForScrollToColumn() {\n      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n      var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n      var stateUpdate = Grid._getScrollLeftForScrollToColumnStateUpdate(props, state);\n      if (stateUpdate) {\n        stateUpdate.needToResetStyleCache = false;\n        this.setState(stateUpdate);\n      }\n    }\n  }, {\n    key: '_getCalculatedScrollTop',\n    value: function _getCalculatedScrollTop() {\n      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n      var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n      return Grid._getCalculatedScrollTop(props, state);\n    }\n  }, {\n    key: '_resetStyleCache',\n    value: function _resetStyleCache() {\n      var styleCache = this._styleCache;\n      var cellCache = this._cellCache;\n      var isScrollingOptOut = this.props.isScrollingOptOut;\n\n      // Reset cell and style caches once scrolling stops.\n      // This makes Grid simpler to use (since cells commonly change).\n      // And it keeps the caches from growing too large.\n      // Performance is most sensitive when a user is scrolling.\n      // Don't clear visible cells from cellCache if isScrollingOptOut is specified.\n      // This keeps the cellCache to a resonable size.\n\n      this._cellCache = {};\n      this._styleCache = {};\n\n      // Copy over the visible cell styles so avoid unnecessary re-render.\n      for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) {\n        for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {\n          var key = rowIndex + '-' + columnIndex;\n          this._styleCache[key] = styleCache[key];\n\n          if (isScrollingOptOut) {\n            this._cellCache[key] = cellCache[key];\n          }\n        }\n      }\n    }\n  }, {\n    key: '_updateScrollTopForScrollToRow',\n    value: function _updateScrollTopForScrollToRow() {\n      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n      var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n      var stateUpdate = Grid._getScrollTopForScrollToRowStateUpdate(props, state);\n      if (stateUpdate) {\n        stateUpdate.needToResetStyleCache = false;\n        this.setState(stateUpdate);\n      }\n    }\n  }], [{\n    key: 'getDerivedStateFromProps',\n    value: function getDerivedStateFromProps(nextProps, prevState) {\n      var newState = {};\n\n      if (nextProps.columnCount === 0 && prevState.scrollLeft !== 0 || nextProps.rowCount === 0 && prevState.scrollTop !== 0) {\n        newState.scrollLeft = 0;\n        newState.scrollTop = 0;\n\n        // only use scroll{Left,Top} from props if scrollTo{Column,Row} isn't specified\n        // scrollTo{Column,Row} should override scroll{Left,Top}\n      } else if (nextProps.scrollLeft !== prevState.scrollLeft && nextProps.scrollToColumn < 0 || nextProps.scrollTop !== prevState.scrollTop && nextProps.scrollToRow < 0) {\n        (0, _assign2.default)(newState, Grid._getScrollToPositionStateUpdate({\n          prevState: prevState,\n          scrollLeft: nextProps.scrollLeft,\n          scrollTop: nextProps.scrollTop\n        }));\n      }\n\n      var instanceProps = prevState.instanceProps;\n\n      // Initially we should not clearStyleCache\n\n      newState.needToResetStyleCache = false;\n      if (nextProps.columnWidth !== instanceProps.prevColumnWidth || nextProps.rowHeight !== instanceProps.prevRowHeight) {\n        // Reset cache. set it to {} in render\n        newState.needToResetStyleCache = true;\n      }\n\n      instanceProps.columnSizeAndPositionManager.configure({\n        cellCount: nextProps.columnCount,\n        estimatedCellSize: Grid._getEstimatedColumnSize(nextProps),\n        cellSizeGetter: Grid._wrapSizeGetter(nextProps.columnWidth)\n      });\n\n      instanceProps.rowSizeAndPositionManager.configure({\n        cellCount: nextProps.rowCount,\n        estimatedCellSize: Grid._getEstimatedRowSize(nextProps),\n        cellSizeGetter: Grid._wrapSizeGetter(nextProps.rowHeight)\n      });\n\n      if (instanceProps.prevColumnCount === 0 || instanceProps.prevRowCount === 0) {\n        instanceProps.prevColumnCount = 0;\n        instanceProps.prevRowCount = 0;\n      }\n\n      // If scrolling is controlled outside this component, clear cache when scrolling stops\n      if (nextProps.autoHeight && nextProps.isScrolling === false && instanceProps.prevIsScrolling === true) {\n        (0, _assign2.default)(newState, {\n          isScrolling: false\n        });\n      }\n\n      var maybeStateA = void 0;\n      var maybeStateB = void 0;\n\n      (0, _calculateSizeAndPositionDataAndUpdateScrollOffset2.default)({\n        cellCount: instanceProps.prevColumnCount,\n        cellSize: typeof instanceProps.prevColumnWidth === 'number' ? instanceProps.prevColumnWidth : null,\n        computeMetadataCallback: function computeMetadataCallback() {\n          return instanceProps.columnSizeAndPositionManager.resetCell(0);\n        },\n        computeMetadataCallbackProps: nextProps,\n        nextCellsCount: nextProps.columnCount,\n        nextCellSize: typeof nextProps.columnWidth === 'number' ? nextProps.columnWidth : null,\n        nextScrollToIndex: nextProps.scrollToColumn,\n        scrollToIndex: instanceProps.prevScrollToColumn,\n        updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() {\n          maybeStateA = Grid._getScrollLeftForScrollToColumnStateUpdate(nextProps, prevState);\n        }\n      });\n      (0, _calculateSizeAndPositionDataAndUpdateScrollOffset2.default)({\n        cellCount: instanceProps.prevRowCount,\n        cellSize: typeof instanceProps.prevRowHeight === 'number' ? instanceProps.prevRowHeight : null,\n        computeMetadataCallback: function computeMetadataCallback() {\n          return instanceProps.rowSizeAndPositionManager.resetCell(0);\n        },\n        computeMetadataCallbackProps: nextProps,\n        nextCellsCount: nextProps.rowCount,\n        nextCellSize: typeof nextProps.rowHeight === 'number' ? nextProps.rowHeight : null,\n        nextScrollToIndex: nextProps.scrollToRow,\n        scrollToIndex: instanceProps.prevScrollToRow,\n        updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() {\n          maybeStateB = Grid._getScrollTopForScrollToRowStateUpdate(nextProps, prevState);\n        }\n      });\n\n      instanceProps.prevColumnCount = nextProps.columnCount;\n      instanceProps.prevColumnWidth = nextProps.columnWidth;\n      instanceProps.prevIsScrolling = nextProps.isScrolling === true;\n      instanceProps.prevRowCount = nextProps.rowCount;\n      instanceProps.prevRowHeight = nextProps.rowHeight;\n      instanceProps.prevScrollToColumn = nextProps.scrollToColumn;\n      instanceProps.prevScrollToRow = nextProps.scrollToRow;\n\n      // getting scrollBarSize (moved from componentWillMount)\n      instanceProps.scrollbarSize = nextProps.getScrollbarSize();\n      if (instanceProps.scrollbarSize === undefined) {\n        instanceProps.scrollbarSizeMeasured = false;\n        instanceProps.scrollbarSize = 0;\n      } else {\n        instanceProps.scrollbarSizeMeasured = true;\n      }\n\n      newState.instanceProps = instanceProps;\n\n      return (0, _extends3.default)({}, newState, maybeStateA, maybeStateB);\n    }\n  }, {\n    key: '_getEstimatedColumnSize',\n    value: function _getEstimatedColumnSize(props) {\n      return typeof props.columnWidth === 'number' ? props.columnWidth : props.estimatedColumnSize;\n    }\n  }, {\n    key: '_getEstimatedRowSize',\n    value: function _getEstimatedRowSize(props) {\n      return typeof props.rowHeight === 'number' ? props.rowHeight : props.estimatedRowSize;\n    }\n  }, {\n    key: '_getScrollToPositionStateUpdate',\n\n\n    /**\n     * Get the updated state after scrolling to\n     * scrollLeft and scrollTop\n     */\n    value: function _getScrollToPositionStateUpdate(_ref9) {\n      var prevState = _ref9.prevState,\n          scrollLeft = _ref9.scrollLeft,\n          scrollTop = _ref9.scrollTop;\n\n      var newState = {\n        scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED\n      };\n\n      if (typeof scrollLeft === 'number' && scrollLeft >= 0) {\n        newState.scrollDirectionHorizontal = scrollLeft > prevState.scrollLeft ? _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD : _defaultOverscanIndicesGetter.SCROLL_DIRECTION_BACKWARD;\n        newState.scrollLeft = scrollLeft;\n      }\n\n      if (typeof scrollTop === 'number' && scrollTop >= 0) {\n        newState.scrollDirectionVertical = scrollTop > prevState.scrollTop ? _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD : _defaultOverscanIndicesGetter.SCROLL_DIRECTION_BACKWARD;\n        newState.scrollTop = scrollTop;\n      }\n\n      if (typeof scrollLeft === 'number' && scrollLeft >= 0 && scrollLeft !== prevState.scrollLeft || typeof scrollTop === 'number' && scrollTop >= 0 && scrollTop !== prevState.scrollTop) {\n        return newState;\n      }\n      return null;\n    }\n  }, {\n    key: '_wrapSizeGetter',\n    value: function _wrapSizeGetter(value) {\n      return typeof value === 'function' ? value : function () {\n        return value;\n      };\n    }\n  }, {\n    key: '_getCalculatedScrollLeft',\n    value: function _getCalculatedScrollLeft(nextProps, prevState) {\n      var columnCount = nextProps.columnCount,\n          height = nextProps.height,\n          scrollToAlignment = nextProps.scrollToAlignment,\n          scrollToColumn = nextProps.scrollToColumn,\n          width = nextProps.width;\n      var scrollLeft = prevState.scrollLeft,\n          instanceProps = prevState.instanceProps;\n\n\n      if (columnCount > 0) {\n        var finalColumn = columnCount - 1;\n        var targetIndex = scrollToColumn < 0 ? finalColumn : Math.min(finalColumn, scrollToColumn);\n        var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n        var scrollBarSize = instanceProps.scrollbarSizeMeasured && totalRowsHeight > height ? instanceProps.scrollbarSize : 0;\n\n        return instanceProps.columnSizeAndPositionManager.getUpdatedOffsetForIndex({\n          align: scrollToAlignment,\n          containerSize: width - scrollBarSize,\n          currentOffset: scrollLeft,\n          targetIndex: targetIndex\n        });\n      }\n      return 0;\n    }\n  }, {\n    key: '_getScrollLeftForScrollToColumnStateUpdate',\n    value: function _getScrollLeftForScrollToColumnStateUpdate(nextProps, prevState) {\n      var scrollLeft = prevState.scrollLeft;\n\n      var calculatedScrollLeft = Grid._getCalculatedScrollLeft(nextProps, prevState);\n\n      if (typeof calculatedScrollLeft === 'number' && calculatedScrollLeft >= 0 && scrollLeft !== calculatedScrollLeft) {\n        return Grid._getScrollToPositionStateUpdate({\n          prevState: prevState,\n          scrollLeft: calculatedScrollLeft,\n          scrollTop: -1\n        });\n      }\n      return null;\n    }\n  }, {\n    key: '_getCalculatedScrollTop',\n    value: function _getCalculatedScrollTop(nextProps, prevState) {\n      var height = nextProps.height,\n          rowCount = nextProps.rowCount,\n          scrollToAlignment = nextProps.scrollToAlignment,\n          scrollToRow = nextProps.scrollToRow,\n          width = nextProps.width;\n      var scrollTop = prevState.scrollTop,\n          instanceProps = prevState.instanceProps;\n\n\n      if (rowCount > 0) {\n        var finalRow = rowCount - 1;\n        var targetIndex = scrollToRow < 0 ? finalRow : Math.min(finalRow, scrollToRow);\n        var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n        var scrollBarSize = instanceProps.scrollbarSizeMeasured && totalColumnsWidth > width ? instanceProps.scrollbarSize : 0;\n\n        return instanceProps.rowSizeAndPositionManager.getUpdatedOffsetForIndex({\n          align: scrollToAlignment,\n          containerSize: height - scrollBarSize,\n          currentOffset: scrollTop,\n          targetIndex: targetIndex\n        });\n      }\n      return 0;\n    }\n  }, {\n    key: '_getScrollTopForScrollToRowStateUpdate',\n    value: function _getScrollTopForScrollToRowStateUpdate(nextProps, prevState) {\n      var scrollTop = prevState.scrollTop;\n\n      var calculatedScrollTop = Grid._getCalculatedScrollTop(nextProps, prevState);\n\n      if (typeof calculatedScrollTop === 'number' && calculatedScrollTop >= 0 && scrollTop !== calculatedScrollTop) {\n        return Grid._getScrollToPositionStateUpdate({\n          prevState: prevState,\n          scrollLeft: -1,\n          scrollTop: calculatedScrollTop\n        });\n      }\n      return null;\n    }\n  }]);\n  return Grid;\n}(React.PureComponent);\n\nGrid.defaultProps = {\n  'aria-label': 'grid',\n  'aria-readonly': true,\n  autoContainerWidth: false,\n  autoHeight: false,\n  autoWidth: false,\n  cellRangeRenderer: _defaultCellRangeRenderer2.default,\n  containerRole: 'rowgroup',\n  containerStyle: {},\n  estimatedColumnSize: 100,\n  estimatedRowSize: 30,\n  getScrollbarSize: _scrollbarSize2.default,\n  noContentRenderer: renderNull,\n  onScroll: function onScroll() {},\n  onScrollbarPresenceChange: function onScrollbarPresenceChange() {},\n  onSectionRendered: function onSectionRendered() {},\n  overscanColumnCount: 0,\n  overscanIndicesGetter: _defaultOverscanIndicesGetter2.default,\n  overscanRowCount: 10,\n  role: 'grid',\n  scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,\n  scrollToAlignment: 'auto',\n  scrollToColumn: -1,\n  scrollToRow: -1,\n  style: {},\n  tabIndex: 0,\n  isScrollingOptOut: false\n};\nGrid.propTypes = process.env.NODE_ENV === 'production' ? null : {\n  \"aria-label\": _propTypes2.default.string.isRequired,\n  \"aria-readonly\": _propTypes2.default.bool,\n\n\n  /**\n   * Set the width of the inner scrollable container to 'auto'.\n   * This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar.\n   */\n  autoContainerWidth: _propTypes2.default.bool.isRequired,\n\n\n  /**\n   * Removes fixed height from the scrollingContainer so that the total height of rows can stretch the window.\n   * Intended for use with WindowScroller\n   */\n  autoHeight: _propTypes2.default.bool.isRequired,\n\n\n  /**\n   * Removes fixed width from the scrollingContainer so that the total width of rows can stretch the window.\n   * Intended for use with WindowScroller\n   */\n  autoWidth: _propTypes2.default.bool.isRequired,\n\n\n  /** Responsible for rendering a cell given an row and column index.  */\n  cellRenderer: function cellRenderer() {\n    return (typeof _types.bpfrpt_proptype_CellRenderer === 'function' ? _types.bpfrpt_proptype_CellRenderer.isRequired ? _types.bpfrpt_proptype_CellRenderer.isRequired : _types.bpfrpt_proptype_CellRenderer : _propTypes2.default.shape(_types.bpfrpt_proptype_CellRenderer).isRequired).apply(this, arguments);\n  },\n\n\n  /** Responsible for rendering a group of cells given their index ranges.  */\n  cellRangeRenderer: function cellRangeRenderer() {\n    return (typeof _types.bpfrpt_proptype_CellRangeRenderer === 'function' ? _types.bpfrpt_proptype_CellRangeRenderer.isRequired ? _types.bpfrpt_proptype_CellRangeRenderer.isRequired : _types.bpfrpt_proptype_CellRangeRenderer : _propTypes2.default.shape(_types.bpfrpt_proptype_CellRangeRenderer).isRequired).apply(this, arguments);\n  },\n\n\n  /** Optional custom CSS class name to attach to root Grid element.  */\n  className: _propTypes2.default.string,\n\n\n  /** Number of columns in grid.  */\n  columnCount: _propTypes2.default.number.isRequired,\n\n\n  /** Either a fixed column width (number) or a function that returns the width of a column given its index.  */\n  columnWidth: function columnWidth() {\n    return (typeof _types.bpfrpt_proptype_CellSize === 'function' ? _types.bpfrpt_proptype_CellSize.isRequired ? _types.bpfrpt_proptype_CellSize.isRequired : _types.bpfrpt_proptype_CellSize : _propTypes2.default.shape(_types.bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n  },\n\n\n  /** Unfiltered props for the Grid container. */\n  containerProps: _propTypes2.default.object,\n\n\n  /** ARIA role for the cell-container.  */\n  containerRole: _propTypes2.default.string.isRequired,\n\n\n  /** Optional inline style applied to inner cell-container */\n  containerStyle: _propTypes2.default.object.isRequired,\n\n\n  /**\n   * If CellMeasurer is used to measure this Grid's children, this should be a pointer to its CellMeasurerCache.\n   * A shared CellMeasurerCache reference enables Grid and CellMeasurer to share measurement data.\n   */\n  deferredMeasurementCache: _propTypes2.default.object,\n\n\n  /**\n   * Used to estimate the total width of a Grid before all of its columns have actually been measured.\n   * The estimated total width is adjusted as columns are rendered.\n   */\n  estimatedColumnSize: _propTypes2.default.number.isRequired,\n\n\n  /**\n   * Used to estimate the total height of a Grid before all of its rows have actually been measured.\n   * The estimated total height is adjusted as rows are rendered.\n   */\n  estimatedRowSize: _propTypes2.default.number.isRequired,\n\n\n  /** Exposed for testing purposes only.  */\n  getScrollbarSize: _propTypes2.default.func.isRequired,\n\n\n  /** Height of Grid; this property determines the number of visible (vs virtualized) rows.  */\n  height: _propTypes2.default.number.isRequired,\n\n\n  /** Optional custom id to attach to root Grid element.  */\n  id: _propTypes2.default.string,\n\n\n  /**\n   * Override internal is-scrolling state tracking.\n   * This property is primarily intended for use with the WindowScroller component.\n   */\n  isScrolling: _propTypes2.default.bool,\n\n\n  /**\n   * Opt-out of isScrolling param passed to cellRangeRenderer.\n   * To avoid the extra render when scroll stops.\n   */\n  isScrollingOptOut: _propTypes2.default.bool.isRequired,\n\n\n  /** Optional renderer to be used in place of rows when either :rowCount or :columnCount is 0.  */\n  noContentRenderer: function noContentRenderer() {\n    return (typeof _types.bpfrpt_proptype_NoContentRenderer === 'function' ? _types.bpfrpt_proptype_NoContentRenderer.isRequired ? _types.bpfrpt_proptype_NoContentRenderer.isRequired : _types.bpfrpt_proptype_NoContentRenderer : _propTypes2.default.shape(_types.bpfrpt_proptype_NoContentRenderer).isRequired).apply(this, arguments);\n  },\n\n\n  /**\n   * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n   * This callback can be used to sync scrolling between lists, tables, or grids.\n   */\n  onScroll: _propTypes2.default.func.isRequired,\n\n\n  /**\n   * Called whenever a horizontal or vertical scrollbar is added or removed.\n   * This prop is not intended for end-user use;\n   * It is used by MultiGrid to support fixed-row/fixed-column scroll syncing.\n   */\n  onScrollbarPresenceChange: _propTypes2.default.func.isRequired,\n\n\n  /** Callback invoked with information about the section of the Grid that was just rendered.  */\n  onSectionRendered: _propTypes2.default.func.isRequired,\n\n\n  /**\n   * Number of columns to render before/after the visible section of the grid.\n   * These columns can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.\n   */\n  overscanColumnCount: _propTypes2.default.number.isRequired,\n\n\n  /**\n   * Calculates the number of cells to overscan before and after a specified range.\n   * This function ensures that overscanning doesn't exceed the available cells.\n   */\n  overscanIndicesGetter: function overscanIndicesGetter() {\n    return (typeof _types.bpfrpt_proptype_OverscanIndicesGetter === 'function' ? _types.bpfrpt_proptype_OverscanIndicesGetter.isRequired ? _types.bpfrpt_proptype_OverscanIndicesGetter.isRequired : _types.bpfrpt_proptype_OverscanIndicesGetter : _propTypes2.default.shape(_types.bpfrpt_proptype_OverscanIndicesGetter).isRequired).apply(this, arguments);\n  },\n\n\n  /**\n   * Number of rows to render above/below the visible section of the grid.\n   * These rows can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.\n   */\n  overscanRowCount: _propTypes2.default.number.isRequired,\n\n\n  /** ARIA role for the grid element.  */\n  role: _propTypes2.default.string.isRequired,\n\n\n  /**\n   * Either a fixed row height (number) or a function that returns the height of a row given its index.\n   * Should implement the following interface: ({ index: number }): number\n   */\n  rowHeight: function rowHeight() {\n    return (typeof _types.bpfrpt_proptype_CellSize === 'function' ? _types.bpfrpt_proptype_CellSize.isRequired ? _types.bpfrpt_proptype_CellSize.isRequired : _types.bpfrpt_proptype_CellSize : _propTypes2.default.shape(_types.bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n  },\n\n\n  /** Number of rows in grid.  */\n  rowCount: _propTypes2.default.number.isRequired,\n\n\n  /** Wait this amount of time after the last scroll event before resetting Grid `pointer-events`. */\n  scrollingResetTimeInterval: _propTypes2.default.number.isRequired,\n\n\n  /** Horizontal offset. */\n  scrollLeft: _propTypes2.default.number,\n\n\n  /**\n   * Controls scroll-to-cell behavior of the Grid.\n   * The default (\"auto\") scrolls the least amount possible to ensure that the specified cell is fully visible.\n   * Use \"start\" to align cells to the top/left of the Grid and \"end\" to align bottom/right.\n   */\n  scrollToAlignment: function scrollToAlignment() {\n    return (typeof _types.bpfrpt_proptype_Alignment === 'function' ? _types.bpfrpt_proptype_Alignment.isRequired ? _types.bpfrpt_proptype_Alignment.isRequired : _types.bpfrpt_proptype_Alignment : _propTypes2.default.shape(_types.bpfrpt_proptype_Alignment).isRequired).apply(this, arguments);\n  },\n\n\n  /** Column index to ensure visible (by forcefully scrolling if necessary) */\n  scrollToColumn: _propTypes2.default.number.isRequired,\n\n\n  /** Vertical offset. */\n  scrollTop: _propTypes2.default.number,\n\n\n  /** Row index to ensure visible (by forcefully scrolling if necessary) */\n  scrollToRow: _propTypes2.default.number.isRequired,\n\n\n  /** Optional inline style */\n  style: _propTypes2.default.object.isRequired,\n\n\n  /** Tab index for focus */\n  tabIndex: _propTypes2.default.number,\n\n\n  /** Width of Grid; this property determines the number of visible (vs virtualized) columns.  */\n  width: _propTypes2.default.number.isRequired\n};\n\n\n(0, _reactLifecyclesCompat.polyfill)(Grid);\nexports.default = Grid;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.SCROLL_DIRECTION_VERTICAL = exports.SCROLL_DIRECTION_HORIZONTAL = exports.SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_BACKWARD = undefined;\nexports.default = defaultOverscanIndicesGetter;\n\nvar _types = require('./types');\n\nvar SCROLL_DIRECTION_BACKWARD = exports.SCROLL_DIRECTION_BACKWARD = -1;\n\nvar SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_FORWARD = 1;\n\nvar SCROLL_DIRECTION_HORIZONTAL = exports.SCROLL_DIRECTION_HORIZONTAL = 'horizontal';\nvar SCROLL_DIRECTION_VERTICAL = exports.SCROLL_DIRECTION_VERTICAL = 'vertical';\n\n/**\n * Calculates the number of cells to overscan before and after a specified range.\n * This function ensures that overscanning doesn't exceed the available cells.\n */\n\nfunction defaultOverscanIndicesGetter(_ref) {\n  var cellCount = _ref.cellCount,\n      overscanCellsCount = _ref.overscanCellsCount,\n      scrollDirection = _ref.scrollDirection,\n      startIndex = _ref.startIndex,\n      stopIndex = _ref.stopIndex;\n\n  // Make sure we render at least 1 cell extra before and after (except near boundaries)\n  // This is necessary in order to support keyboard navigation (TAB/SHIFT+TAB) in some cases\n  // For more info see issues #625\n  overscanCellsCount = Math.max(1, overscanCellsCount);\n\n  if (scrollDirection === SCROLL_DIRECTION_FORWARD) {\n    return {\n      overscanStartIndex: Math.max(0, startIndex - 1),\n      overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\n    };\n  } else {\n    return {\n      overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\n      overscanStopIndex: Math.min(cellCount - 1, stopIndex + 1)\n    };\n  }\n}", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.bpfrpt_proptype_Scroll = exports.bpfrpt_proptype_CellRendererParams = exports.bpfrpt_proptype_RenderedSection = exports.bpfrpt_proptype_OverscanIndicesGetter = exports.bpfrpt_proptype_CellSize = exports.bpfrpt_proptype_CellPosition = exports.bpfrpt_proptype_Alignment = exports.bpfrpt_proptype_NoContentRenderer = exports.defaultOverscanIndicesGetter = exports.defaultCellRangeRenderer = exports.accessibilityOverscanIndicesGetter = exports.Grid = exports.default = undefined;\n\nvar _Grid = require('./Grid');\n\nObject.defineProperty(exports, 'default', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_Grid).default;\n  }\n});\nObject.defineProperty(exports, 'Grid', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_Grid).default;\n  }\n});\n\nvar _accessibilityOverscanIndicesGetter = require('./accessibilityOverscanIndicesGetter');\n\nObject.defineProperty(exports, 'accessibilityOverscanIndicesGetter', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_accessibilityOverscanIndicesGetter).default;\n  }\n});\n\nvar _defaultCellRangeRenderer = require('./defaultCellRangeRenderer');\n\nObject.defineProperty(exports, 'defaultCellRangeRenderer', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_defaultCellRangeRenderer).default;\n  }\n});\n\nvar _defaultOverscanIndicesGetter = require('./defaultOverscanIndicesGetter');\n\nObject.defineProperty(exports, 'defaultOverscanIndicesGetter', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_defaultOverscanIndicesGetter).default;\n  }\n});\n\nvar _types = require('./types');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.bpfrpt_proptype_NoContentRenderer = _types.bpfrpt_proptype_NoContentRenderer;\nexports.bpfrpt_proptype_Alignment = _types.bpfrpt_proptype_Alignment;\nexports.bpfrpt_proptype_CellPosition = _types.bpfrpt_proptype_CellPosition;\nexports.bpfrpt_proptype_CellSize = _types.bpfrpt_proptype_CellSize;\nexports.bpfrpt_proptype_OverscanIndicesGetter = _types.bpfrpt_proptype_OverscanIndicesGetter;\nexports.bpfrpt_proptype_RenderedSection = _types.bpfrpt_proptype_RenderedSection;\nexports.bpfrpt_proptype_CellRendererParams = _types.bpfrpt_proptype_CellRendererParams;\nexports.bpfrpt_proptype_Scroll = _types.bpfrpt_proptype_Scroll;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.bpfrpt_proptype_Scroll = exports.bpfrpt_proptype_RenderedRows = exports.bpfrpt_proptype_RowRenderer = exports.bpfrpt_proptype_RowRendererParams = undefined;\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar bpfrpt_proptype_RowRendererParams = process.env.NODE_ENV === 'production' ? null : {\n  index: _propTypes2.default.number.isRequired,\n  isScrolling: _propTypes2.default.bool.isRequired,\n  isVisible: _propTypes2.default.bool.isRequired,\n  key: _propTypes2.default.string.isRequired,\n  parent: _propTypes2.default.object.isRequired,\n  style: _propTypes2.default.object.isRequired\n};\nvar bpfrpt_proptype_RowRenderer = process.env.NODE_ENV === 'production' ? null : _propTypes2.default.func;\nvar bpfrpt_proptype_RenderedRows = process.env.NODE_ENV === 'production' ? null : {\n  overscanStartIndex: _propTypes2.default.number.isRequired,\n  overscanStopIndex: _propTypes2.default.number.isRequired,\n  startIndex: _propTypes2.default.number.isRequired,\n  stopIndex: _propTypes2.default.number.isRequired\n};\nvar bpfrpt_proptype_Scroll = process.env.NODE_ENV === 'production' ? null : {\n  clientHeight: _propTypes2.default.number.isRequired,\n  scrollHeight: _propTypes2.default.number.isRequired,\n  scrollTop: _propTypes2.default.number.isRequired\n};\nexports.bpfrpt_proptype_RowRendererParams = bpfrpt_proptype_RowRendererParams;\nexports.bpfrpt_proptype_RowRenderer = bpfrpt_proptype_RowRenderer;\nexports.bpfrpt_proptype_RenderedRows = bpfrpt_proptype_RenderedRows;\nexports.bpfrpt_proptype_Scroll = bpfrpt_proptype_Scroll;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _getOwnPropertyDescriptor = require('babel-runtime/core-js/object/get-own-property-descriptor');\n\nvar _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);\n\nvar _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _Grid = require('../Grid');\n\nvar _Grid2 = _interopRequireDefault(_Grid);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _clsx = require('clsx');\n\nvar _clsx2 = _interopRequireDefault(_clsx);\n\nvar _types = require('./types');\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * It is inefficient to create and manage a large list of DOM elements within a scrolling container\n * if only a few of those elements are visible. The primary purpose of this component is to improve\n * performance by only rendering the DOM nodes that a user is able to see based on their current\n * scroll position.\n *\n * This component renders a virtualized list of elements with either fixed or dynamic heights.\n */\n\nvar List = function (_React$PureComponent) {\n  (0, _inherits3.default)(List, _React$PureComponent);\n\n  function List() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    (0, _classCallCheck3.default)(this, List);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = List.__proto__ || (0, _getPrototypeOf2.default)(List)).call.apply(_ref, [this].concat(args))), _this), _this._cellRenderer = function (_ref2) {\n      var parent = _ref2.parent,\n          rowIndex = _ref2.rowIndex,\n          style = _ref2.style,\n          isScrolling = _ref2.isScrolling,\n          isVisible = _ref2.isVisible,\n          key = _ref2.key;\n      var rowRenderer = _this.props.rowRenderer;\n\n      // TRICKY The style object is sometimes cached by Grid.\n      // This prevents new style objects from bypassing shallowCompare().\n      // However as of React 16, style props are auto-frozen (at least in dev mode)\n      // Check to make sure we can still modify the style before proceeding.\n      // https://github.com/facebook/react/commit/977357765b44af8ff0cfea327866861073095c12#commitcomment-20648713\n\n      var _Object$getOwnPropert = (0, _getOwnPropertyDescriptor2.default)(style, 'width'),\n          writable = _Object$getOwnPropert.writable;\n\n      if (writable) {\n        // By default, List cells should be 100% width.\n        // This prevents them from flowing under a scrollbar (if present).\n        style.width = '100%';\n      }\n\n      return rowRenderer({\n        index: rowIndex,\n        style: style,\n        isScrolling: isScrolling,\n        isVisible: isVisible,\n        key: key,\n        parent: parent\n      });\n    }, _this._setRef = function (ref) {\n      _this.Grid = ref;\n    }, _this._onScroll = function (_ref3) {\n      var clientHeight = _ref3.clientHeight,\n          scrollHeight = _ref3.scrollHeight,\n          scrollTop = _ref3.scrollTop;\n      var onScroll = _this.props.onScroll;\n\n\n      onScroll({ clientHeight: clientHeight, scrollHeight: scrollHeight, scrollTop: scrollTop });\n    }, _this._onSectionRendered = function (_ref4) {\n      var rowOverscanStartIndex = _ref4.rowOverscanStartIndex,\n          rowOverscanStopIndex = _ref4.rowOverscanStopIndex,\n          rowStartIndex = _ref4.rowStartIndex,\n          rowStopIndex = _ref4.rowStopIndex;\n      var onRowsRendered = _this.props.onRowsRendered;\n\n\n      onRowsRendered({\n        overscanStartIndex: rowOverscanStartIndex,\n        overscanStopIndex: rowOverscanStopIndex,\n        startIndex: rowStartIndex,\n        stopIndex: rowStopIndex\n      });\n    }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);\n  }\n\n  (0, _createClass3.default)(List, [{\n    key: 'forceUpdateGrid',\n    value: function forceUpdateGrid() {\n      if (this.Grid) {\n        this.Grid.forceUpdate();\n      }\n    }\n\n    /** See Grid#getOffsetForCell */\n\n  }, {\n    key: 'getOffsetForRow',\n    value: function getOffsetForRow(_ref5) {\n      var alignment = _ref5.alignment,\n          index = _ref5.index;\n\n      if (this.Grid) {\n        var _Grid$getOffsetForCel = this.Grid.getOffsetForCell({\n          alignment: alignment,\n          rowIndex: index,\n          columnIndex: 0\n        }),\n            _scrollTop = _Grid$getOffsetForCel.scrollTop;\n\n        return _scrollTop;\n      }\n      return 0;\n    }\n\n    /** CellMeasurer compatibility */\n\n  }, {\n    key: 'invalidateCellSizeAfterRender',\n    value: function invalidateCellSizeAfterRender(_ref6) {\n      var columnIndex = _ref6.columnIndex,\n          rowIndex = _ref6.rowIndex;\n\n      if (this.Grid) {\n        this.Grid.invalidateCellSizeAfterRender({\n          rowIndex: rowIndex,\n          columnIndex: columnIndex\n        });\n      }\n    }\n\n    /** See Grid#measureAllCells */\n\n  }, {\n    key: 'measureAllRows',\n    value: function measureAllRows() {\n      if (this.Grid) {\n        this.Grid.measureAllCells();\n      }\n    }\n\n    /** CellMeasurer compatibility */\n\n  }, {\n    key: 'recomputeGridSize',\n    value: function recomputeGridSize() {\n      var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n          _ref7$columnIndex = _ref7.columnIndex,\n          columnIndex = _ref7$columnIndex === undefined ? 0 : _ref7$columnIndex,\n          _ref7$rowIndex = _ref7.rowIndex,\n          rowIndex = _ref7$rowIndex === undefined ? 0 : _ref7$rowIndex;\n\n      if (this.Grid) {\n        this.Grid.recomputeGridSize({\n          rowIndex: rowIndex,\n          columnIndex: columnIndex\n        });\n      }\n    }\n\n    /** See Grid#recomputeGridSize */\n\n  }, {\n    key: 'recomputeRowHeights',\n    value: function recomputeRowHeights() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n      if (this.Grid) {\n        this.Grid.recomputeGridSize({\n          rowIndex: index,\n          columnIndex: 0\n        });\n      }\n    }\n\n    /** See Grid#scrollToPosition */\n\n  }, {\n    key: 'scrollToPosition',\n    value: function scrollToPosition() {\n      var scrollTop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n      if (this.Grid) {\n        this.Grid.scrollToPosition({ scrollTop: scrollTop });\n      }\n    }\n\n    /** See Grid#scrollToCell */\n\n  }, {\n    key: 'scrollToRow',\n    value: function scrollToRow() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n      if (this.Grid) {\n        this.Grid.scrollToCell({\n          columnIndex: 0,\n          rowIndex: index\n        });\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          className = _props.className,\n          noRowsRenderer = _props.noRowsRenderer,\n          scrollToIndex = _props.scrollToIndex,\n          width = _props.width;\n\n\n      var classNames = (0, _clsx2.default)('ReactVirtualized__List', className);\n\n      return React.createElement(_Grid2.default, (0, _extends3.default)({}, this.props, {\n        autoContainerWidth: true,\n        cellRenderer: this._cellRenderer,\n        className: classNames,\n        columnWidth: width,\n        columnCount: 1,\n        noContentRenderer: noRowsRenderer,\n        onScroll: this._onScroll,\n        onSectionRendered: this._onSectionRendered,\n        ref: this._setRef,\n        scrollToRow: scrollToIndex\n      }));\n    }\n  }]);\n  return List;\n}(React.PureComponent);\n\nList.defaultProps = {\n  autoHeight: false,\n  estimatedRowSize: 30,\n  onScroll: function onScroll() {},\n  noRowsRenderer: function noRowsRenderer() {\n    return null;\n  },\n  onRowsRendered: function onRowsRendered() {},\n  overscanIndicesGetter: _Grid.accessibilityOverscanIndicesGetter,\n  overscanRowCount: 10,\n  scrollToAlignment: 'auto',\n  scrollToIndex: -1,\n  style: {}\n};\nList.propTypes = process.env.NODE_ENV === 'production' ? null : {\n  \"aria-label\": _propTypes2.default.string,\n\n\n  /**\n   * Removes fixed height from the scrollingContainer so that the total height\n   * of rows can stretch the window. Intended for use with WindowScroller\n   */\n  autoHeight: _propTypes2.default.bool.isRequired,\n\n\n  /** Optional CSS class name */\n  className: _propTypes2.default.string,\n\n\n  /**\n   * Used to estimate the total height of a List before all of its rows have actually been measured.\n   * The estimated total height is adjusted as rows are rendered.\n   */\n  estimatedRowSize: _propTypes2.default.number.isRequired,\n\n\n  /** Height constraint for list (determines how many actual rows are rendered) */\n  height: _propTypes2.default.number.isRequired,\n\n\n  /** Optional renderer to be used in place of rows when rowCount is 0 */\n  noRowsRenderer: function noRowsRenderer() {\n    return (typeof _Grid.bpfrpt_proptype_NoContentRenderer === 'function' ? _Grid.bpfrpt_proptype_NoContentRenderer.isRequired ? _Grid.bpfrpt_proptype_NoContentRenderer.isRequired : _Grid.bpfrpt_proptype_NoContentRenderer : _propTypes2.default.shape(_Grid.bpfrpt_proptype_NoContentRenderer).isRequired).apply(this, arguments);\n  },\n\n\n  /** Callback invoked with information about the slice of rows that were just rendered.  */\n\n  onRowsRendered: _propTypes2.default.func.isRequired,\n\n\n  /**\n   * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n   * This callback can be used to sync scrolling between lists, tables, or grids.\n   */\n  onScroll: _propTypes2.default.func.isRequired,\n\n\n  /** See Grid#overscanIndicesGetter */\n  overscanIndicesGetter: function overscanIndicesGetter() {\n    return (typeof _Grid.bpfrpt_proptype_OverscanIndicesGetter === 'function' ? _Grid.bpfrpt_proptype_OverscanIndicesGetter.isRequired ? _Grid.bpfrpt_proptype_OverscanIndicesGetter.isRequired : _Grid.bpfrpt_proptype_OverscanIndicesGetter : _propTypes2.default.shape(_Grid.bpfrpt_proptype_OverscanIndicesGetter).isRequired).apply(this, arguments);\n  },\n\n\n  /**\n   * Number of rows to render above/below the visible bounds of the list.\n   * These rows can help for smoother scrolling on touch devices.\n   */\n  overscanRowCount: _propTypes2.default.number.isRequired,\n\n\n  /** Either a fixed row height (number) or a function that returns the height of a row given its index.  */\n  rowHeight: function rowHeight() {\n    return (typeof _Grid.bpfrpt_proptype_CellSize === 'function' ? _Grid.bpfrpt_proptype_CellSize.isRequired ? _Grid.bpfrpt_proptype_CellSize.isRequired : _Grid.bpfrpt_proptype_CellSize : _propTypes2.default.shape(_Grid.bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n  },\n\n\n  /** Responsible for rendering a row given an index; ({ index: number }): node */\n  rowRenderer: function rowRenderer() {\n    return (typeof _types.bpfrpt_proptype_RowRenderer === 'function' ? _types.bpfrpt_proptype_RowRenderer.isRequired ? _types.bpfrpt_proptype_RowRenderer.isRequired : _types.bpfrpt_proptype_RowRenderer : _propTypes2.default.shape(_types.bpfrpt_proptype_RowRenderer).isRequired).apply(this, arguments);\n  },\n\n\n  /** Number of rows in list. */\n  rowCount: _propTypes2.default.number.isRequired,\n\n\n  /** See Grid#scrollToAlignment */\n  scrollToAlignment: function scrollToAlignment() {\n    return (typeof _Grid.bpfrpt_proptype_Alignment === 'function' ? _Grid.bpfrpt_proptype_Alignment.isRequired ? _Grid.bpfrpt_proptype_Alignment.isRequired : _Grid.bpfrpt_proptype_Alignment : _propTypes2.default.shape(_Grid.bpfrpt_proptype_Alignment).isRequired).apply(this, arguments);\n  },\n\n\n  /** Row index to ensure visible (by forcefully scrolling if necessary) */\n  scrollToIndex: _propTypes2.default.number.isRequired,\n\n\n  /** Vertical offset. */\n  scrollTop: _propTypes2.default.number,\n\n\n  /** Optional inline style */\n  style: _propTypes2.default.object.isRequired,\n\n\n  /** Tab index for focus */\n  tabIndex: _propTypes2.default.number,\n\n\n  /** Width of list */\n  width: _propTypes2.default.number.isRequired\n};\nexports.default = List;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.bpfrpt_proptype_RowRendererParams = exports.List = exports.default = undefined;\n\nvar _List = require('./List');\n\nObject.defineProperty(exports, 'default', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_List).default;\n  }\n});\nObject.defineProperty(exports, 'List', {\n  enumerable: true,\n  get: function get() {\n    return _interopRequireDefault(_List).default;\n  }\n});\n\nvar _types = require('./types');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.bpfrpt_proptype_RowRendererParams = _types.bpfrpt_proptype_RowRendererParams;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.registerScrollListener = registerScrollListener;\nexports.unregisterScrollListener = unregisterScrollListener;\n\nvar _requestAnimationTimeout = require('../../utils/requestAnimationTimeout');\n\nvar _WindowScroller = require('../WindowScroller.js');\n\nvar mountedInstances = [];\n\nvar originalBodyPointerEvents = null;\nvar disablePointerEventsTimeoutId = null;\n\nfunction enablePointerEventsIfDisabled() {\n  if (disablePointerEventsTimeoutId) {\n    disablePointerEventsTimeoutId = null;\n\n    if (document.body && originalBodyPointerEvents != null) {\n      document.body.style.pointerEvents = originalBodyPointerEvents;\n    }\n\n    originalBodyPointerEvents = null;\n  }\n}\n\nfunction enablePointerEventsAfterDelayCallback() {\n  enablePointerEventsIfDisabled();\n  mountedInstances.forEach(function (instance) {\n    return instance.__resetIsScrolling();\n  });\n}\n\nfunction enablePointerEventsAfterDelay() {\n  if (disablePointerEventsTimeoutId) {\n    (0, _requestAnimationTimeout.cancelAnimationTimeout)(disablePointerEventsTimeoutId);\n  }\n\n  var maximumTimeout = 0;\n  mountedInstances.forEach(function (instance) {\n    maximumTimeout = Math.max(maximumTimeout, instance.props.scrollingResetTimeInterval);\n  });\n\n  disablePointerEventsTimeoutId = (0, _requestAnimationTimeout.requestAnimationTimeout)(enablePointerEventsAfterDelayCallback, maximumTimeout);\n}\n\nfunction onScrollWindow(event) {\n  if (event.currentTarget === window && originalBodyPointerEvents == null && document.body) {\n    originalBodyPointerEvents = document.body.style.pointerEvents;\n\n    document.body.style.pointerEvents = 'none';\n  }\n  enablePointerEventsAfterDelay();\n  mountedInstances.forEach(function (instance) {\n    if (instance.props.scrollElement === event.currentTarget) {\n      instance.__handleWindowScrollEvent();\n    }\n  });\n}\n\nfunction registerScrollListener(component, element) {\n  if (!mountedInstances.some(function (instance) {\n    return instance.props.scrollElement === element;\n  })) {\n    element.addEventListener('scroll', onScrollWindow);\n  }\n  mountedInstances.push(component);\n}\n\nfunction unregisterScrollListener(component, element) {\n  mountedInstances = mountedInstances.filter(function (instance) {\n    return instance !== component;\n  });\n  if (!mountedInstances.length) {\n    element.removeEventListener('scroll', onScrollWindow);\n    if (disablePointerEventsTimeoutId) {\n      (0, _requestAnimationTimeout.cancelAnimationTimeout)(disablePointerEventsTimeoutId);\n      enablePointerEventsIfDisabled();\n    }\n  }\n}", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getDimensions = getDimensions;\nexports.getPositionOffset = getPositionOffset;\nexports.getScrollOffset = getScrollOffset;\n\n\n/**\n * Gets the dimensions of the element, accounting for API differences between\n * `window` and other DOM elements.\n */\n\nvar isWindow = function isWindow(element) {\n  return element === window;\n};\n\n// TODO Move this into WindowScroller and import from there\n\n\nvar getBoundingBox = function getBoundingBox(element) {\n  return element.getBoundingClientRect();\n};\n\nfunction getDimensions(scrollElement, props) {\n  if (!scrollElement) {\n    return {\n      height: props.serverHeight,\n      width: props.serverWidth\n    };\n  } else if (isWindow(scrollElement)) {\n    var _window = window,\n        innerHeight = _window.innerHeight,\n        innerWidth = _window.innerWidth;\n\n    return {\n      height: typeof innerHeight === 'number' ? innerHeight : 0,\n      width: typeof innerWidth === 'number' ? innerWidth : 0\n    };\n  } else {\n    return getBoundingBox(scrollElement);\n  }\n}\n\n/**\n * Gets the vertical and horizontal position of an element within its scroll container.\n * Elements that have been \u201Cscrolled past\u201D return negative values.\n * Handles edge-case where a user is navigating back (history) from an already-scrolled page.\n * In this case the body\u2019s top or left position will be a negative number and this element\u2019s top or left will be increased (by that amount).\n */\nfunction getPositionOffset(element, container) {\n  if (isWindow(container) && document.documentElement) {\n    var containerElement = document.documentElement;\n    var elementRect = getBoundingBox(element);\n    var containerRect = getBoundingBox(containerElement);\n    return {\n      top: elementRect.top - containerRect.top,\n      left: elementRect.left - containerRect.left\n    };\n  } else {\n    var scrollOffset = getScrollOffset(container);\n    var _elementRect = getBoundingBox(element);\n    var _containerRect = getBoundingBox(container);\n    return {\n      top: _elementRect.top + scrollOffset.top - _containerRect.top,\n      left: _elementRect.left + scrollOffset.left - _containerRect.left\n    };\n  }\n}\n\n/**\n * Gets the vertical and horizontal scroll amount of the element, accounting for IE compatibility\n * and API differences between `window` and other DOM elements.\n */\nfunction getScrollOffset(element) {\n  if (isWindow(element) && document.documentElement) {\n    return {\n      top: 'scrollY' in window ? window.scrollY : document.documentElement.scrollTop,\n      left: 'scrollX' in window ? window.scrollX : document.documentElement.scrollLeft\n    };\n  } else {\n    return {\n      top: element.scrollTop,\n      left: element.scrollLeft\n    };\n  }\n}", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.IS_SCROLLING_TIMEOUT = undefined;\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _reactDom = require('react-dom');\n\nvar ReactDOM = _interopRequireWildcard(_reactDom);\n\nvar _onScroll = require('./utils/onScroll');\n\nvar _dimensions = require('./utils/dimensions');\n\nvar _detectElementResize = require('../vendor/detectElementResize');\n\nvar _detectElementResize2 = _interopRequireDefault(_detectElementResize);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\nvar IS_SCROLLING_TIMEOUT = exports.IS_SCROLLING_TIMEOUT = 150;\n\nvar getWindow = function getWindow() {\n  return typeof window !== 'undefined' ? window : undefined;\n};\n\nvar WindowScroller = function (_React$PureComponent) {\n  (0, _inherits3.default)(WindowScroller, _React$PureComponent);\n\n  function WindowScroller() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    (0, _classCallCheck3.default)(this, WindowScroller);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = WindowScroller.__proto__ || (0, _getPrototypeOf2.default)(WindowScroller)).call.apply(_ref, [this].concat(args))), _this), _this._window = getWindow(), _this._isMounted = false, _this._positionFromTop = 0, _this._positionFromLeft = 0, _this.state = (0, _extends3.default)({}, (0, _dimensions.getDimensions)(_this.props.scrollElement, _this.props), {\n      isScrolling: false,\n      scrollLeft: 0,\n      scrollTop: 0\n    }), _this._registerChild = function (element) {\n      if (element && !(element instanceof Element)) {\n        console.warn('WindowScroller registerChild expects to be passed Element or null');\n      }\n      _this._child = element;\n      _this.updatePosition();\n    }, _this._onChildScroll = function (_ref2) {\n      var scrollTop = _ref2.scrollTop;\n\n      if (_this.state.scrollTop === scrollTop) {\n        return;\n      }\n\n      var scrollElement = _this.props.scrollElement;\n      if (scrollElement) {\n        if (typeof scrollElement.scrollTo === 'function') {\n          scrollElement.scrollTo(0, scrollTop + _this._positionFromTop);\n        } else {\n          scrollElement.scrollTop = scrollTop + _this._positionFromTop;\n        }\n      }\n    }, _this._registerResizeListener = function (element) {\n      if (element === window) {\n        window.addEventListener('resize', _this._onResize, false);\n      } else {\n        _this._detectElementResize.addResizeListener(element, _this._onResize);\n      }\n    }, _this._unregisterResizeListener = function (element) {\n      if (element === window) {\n        window.removeEventListener('resize', _this._onResize, false);\n      } else if (element) {\n        _this._detectElementResize.removeResizeListener(element, _this._onResize);\n      }\n    }, _this._onResize = function () {\n      _this.updatePosition();\n    }, _this.__handleWindowScrollEvent = function () {\n      if (!_this._isMounted) {\n        return;\n      }\n\n      var onScroll = _this.props.onScroll;\n\n\n      var scrollElement = _this.props.scrollElement;\n      if (scrollElement) {\n        var scrollOffset = (0, _dimensions.getScrollOffset)(scrollElement);\n        var _scrollLeft = Math.max(0, scrollOffset.left - _this._positionFromLeft);\n        var _scrollTop = Math.max(0, scrollOffset.top - _this._positionFromTop);\n\n        _this.setState({\n          isScrolling: true,\n          scrollLeft: _scrollLeft,\n          scrollTop: _scrollTop\n        });\n\n        onScroll({\n          scrollLeft: _scrollLeft,\n          scrollTop: _scrollTop\n        });\n      }\n    }, _this.__resetIsScrolling = function () {\n      _this.setState({\n        isScrolling: false\n      });\n    }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);\n  }\n\n  (0, _createClass3.default)(WindowScroller, [{\n    key: 'updatePosition',\n    value: function updatePosition() {\n      var scrollElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.scrollElement;\n      var onResize = this.props.onResize;\n      var _state = this.state,\n          height = _state.height,\n          width = _state.width;\n\n\n      var thisNode = this._child || ReactDOM.findDOMNode(this);\n      if (thisNode instanceof Element && scrollElement) {\n        var offset = (0, _dimensions.getPositionOffset)(thisNode, scrollElement);\n        this._positionFromTop = offset.top;\n        this._positionFromLeft = offset.left;\n      }\n\n      var dimensions = (0, _dimensions.getDimensions)(scrollElement, this.props);\n      if (height !== dimensions.height || width !== dimensions.width) {\n        this.setState({\n          height: dimensions.height,\n          width: dimensions.width\n        });\n        onResize({\n          height: dimensions.height,\n          width: dimensions.width\n        });\n      }\n    }\n  }, {\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      var scrollElement = this.props.scrollElement;\n\n      this._detectElementResize = (0, _detectElementResize2.default)();\n\n      this.updatePosition(scrollElement);\n\n      if (scrollElement) {\n        (0, _onScroll.registerScrollListener)(this, scrollElement);\n        this._registerResizeListener(scrollElement);\n      }\n\n      this._isMounted = true;\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate(prevProps, prevState) {\n      var scrollElement = this.props.scrollElement;\n      var prevScrollElement = prevProps.scrollElement;\n\n\n      if (prevScrollElement !== scrollElement && prevScrollElement != null && scrollElement != null) {\n        this.updatePosition(scrollElement);\n\n        (0, _onScroll.unregisterScrollListener)(this, prevScrollElement);\n        (0, _onScroll.registerScrollListener)(this, scrollElement);\n\n        this._unregisterResizeListener(prevScrollElement);\n        this._registerResizeListener(scrollElement);\n      }\n    }\n  }, {\n    key: 'componentWillUnmount',\n    value: function componentWillUnmount() {\n      var scrollElement = this.props.scrollElement;\n      if (scrollElement) {\n        (0, _onScroll.unregisterScrollListener)(this, scrollElement);\n        this._unregisterResizeListener(scrollElement);\n      }\n\n      this._isMounted = false;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var children = this.props.children;\n      var _state2 = this.state,\n          isScrolling = _state2.isScrolling,\n          scrollTop = _state2.scrollTop,\n          scrollLeft = _state2.scrollLeft,\n          height = _state2.height,\n          width = _state2.width;\n\n\n      return children({\n        onChildScroll: this._onChildScroll,\n        registerChild: this._registerChild,\n        height: height,\n        isScrolling: isScrolling,\n        scrollLeft: scrollLeft,\n        scrollTop: scrollTop,\n        width: width\n      });\n    }\n\n    // Referenced by utils/onScroll\n\n\n    // Referenced by utils/onScroll\n\n  }]);\n  return WindowScroller;\n}(React.PureComponent);\n\nWindowScroller.defaultProps = {\n  onResize: function onResize() {},\n  onScroll: function onScroll() {},\n  scrollingResetTimeInterval: IS_SCROLLING_TIMEOUT,\n  scrollElement: getWindow(),\n  serverHeight: 0,\n  serverWidth: 0\n};\nWindowScroller.propTypes = process.env.NODE_ENV === 'production' ? null : {\n  /**\n   * Function responsible for rendering children.\n   * This function should implement the following signature:\n   * ({ height, isScrolling, scrollLeft, scrollTop, width }) => PropTypes.element\n   */\n  children: _propTypes2.default.func.isRequired,\n\n\n  /** Callback to be invoked on-resize: ({ height, width }) */\n  onResize: _propTypes2.default.func.isRequired,\n\n\n  /** Callback to be invoked on-scroll: ({ scrollLeft, scrollTop }) */\n  onScroll: _propTypes2.default.func.isRequired,\n\n\n  /** Element to attach scroll event listeners. Defaults to window. */\n  scrollElement: _propTypes2.default.oneOfType([_propTypes2.default.any, function () {\n    return (typeof Element === 'function' ? _propTypes2.default.instanceOf(Element) : _propTypes2.default.any).apply(this, arguments);\n  }]),\n\n  /**\n   * Wait this amount of time after the last scroll event before resetting child `pointer-events`.\n   */\n  scrollingResetTimeInterval: _propTypes2.default.number.isRequired,\n\n\n  /** Height used for server-side rendering */\n  serverHeight: _propTypes2.default.number.isRequired,\n\n\n  /** Width used for server-side rendering */\n  serverWidth: _propTypes2.default.number.isRequired\n};\nexports.default = WindowScroller;", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.IS_SCROLLING_TIMEOUT = exports.WindowScroller = undefined;\n\nvar _WindowScroller = require('./WindowScroller');\n\nvar _WindowScroller2 = _interopRequireDefault(_WindowScroller);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _WindowScroller2.default;\nexports.WindowScroller = _WindowScroller2.default;\nexports.IS_SCROLLING_TIMEOUT = _WindowScroller.IS_SCROLLING_TIMEOUT;", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport '../../../components/common/EmptySearch.css';\nimport { translate } from '../../../helpers/l10n';\nimport { Query } from '../query';\n\nexport default function EmptyFavoriteSearch({ query }: { query: Query }) {\n  return (\n    <div className=\"empty-search\">\n      <h3>{translate('no_results_search.favorites')}</h3>\n      <p className=\"big-spacer-top\">\n        <FormattedMessage\n          defaultMessage={translate('no_results_search.favorites.2')}\n          id=\"no_results_search.favorites.2\"\n          values={{\n            url: <Link to={{ pathname: '/projects', query }}>{translate('all')}</Link>\n          }}\n        />\n      </p>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport { Button } from '../../../components/controls/buttons';\nimport { withRouter } from '../../../components/hoc/withRouter';\nimport { translate } from '../../../helpers/l10n';\nimport { hasGlobalPermission, isLoggedIn } from '../../../helpers/users';\nimport { Permissions } from '../../../types/permissions';\n\nexport interface EmptyInstanceProps {\n  currentUser: T.CurrentUser;\n  router: WithRouterProps['router'];\n}\n\nexport function EmptyInstance(props: EmptyInstanceProps) {\n  const { currentUser, router } = props;\n  const showNewProjectButton =\n    isLoggedIn(currentUser) && hasGlobalPermission(currentUser, Permissions.ProjectCreation);\n\n  return (\n    <div className=\"projects-empty-list\">\n      <h3>\n        {showNewProjectButton\n          ? translate('projects.no_projects.empty_instance.new_project')\n          : translate('projects.no_projects.empty_instance')}\n      </h3>\n      {showNewProjectButton && (\n        <div>\n          <p className=\"big-spacer-top\">\n            {translate('projects.no_projects.empty_instance.how_to_add_projects')}\n          </p>\n          <p className=\"big-spacer-top\">\n            <Button\n              onClick={() => {\n                router.push('/projects/create');\n              }}>\n              {translate('my_account.create_new.TRK')}\n            </Button>\n          </p>\n        </div>\n      )}\n    </div>\n  );\n}\n\nexport default withRouter(EmptyInstance);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function NoFavoriteProjects() {\n  return (\n    <div className=\"projects-empty-list\">\n      <h3>{translate('projects.no_favorite_projects')}</h3>\n\n      <div>\n        <p className=\"big-spacer-top\">{translate('projects.no_favorite_projects.engagement')}</p>\n        <p className=\"big-spacer-top\">\n          <Link className=\"button\" to=\"/projects/all\">\n            {translate('projects.explore_projects')}\n          </Link>\n        </p>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Tooltip from '../../components/controls/Tooltip';\nimport { translate } from '../../helpers/l10n';\n\ninterface PrivacyBadgeContainerProps {\n  className?: string;\n  qualifier: string;\n  visibility: T.Visibility;\n}\n\nexport default function PrivacyBadgeContainer({\n  className,\n  qualifier,\n  visibility\n}: PrivacyBadgeContainerProps) {\n  if (visibility !== 'private') {\n    return null;\n  }\n\n  return (\n    <Tooltip overlay={translate('visibility', visibility, 'description', qualifier)}>\n      <div className={classNames('badge', className)}>{translate('visibility', visibility)}</div>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getJSON, post } from '../helpers/request';\n\nexport function getFavorites(): Promise<any> {\n  return getJSON('/api/favorites/search');\n}\n\nexport function addFavorite(component: string): Promise<void> {\n  return post('/api/favorites/add', { component });\n}\n\nexport function removeFavorite(component: string): Promise<void> {\n  return post('/api/favorites/remove', { component });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport Icon, { IconProps } from './Icon';\n\ninterface Props extends IconProps {\n  favorite: boolean;\n}\n\nexport default function FavoriteIcon({ className, favorite, fill, ...iconProps }: Props) {\n  return (\n    <Icon\n      className={classNames('icon-outline', { 'is-filled': favorite }, className)}\n      style={{ color: fill || colors.orange }}\n      {...iconProps}>\n      <g transform=\"matrix(0.988024,0,0,0.988024,0.0957953,0.717719)\">\n        <path d=\"M15.428,5.777C15.428,5.908 15.35,6.051 15.195,6.205L11.954,9.366L12.722,13.83C12.728,13.872 12.731,13.932 12.731,14.009C12.731,14.134 12.7,14.24 12.637,14.326C12.575,14.412 12.484,14.455 12.365,14.455C12.252,14.455 12.133,14.42 12.008,14.348L7.999,12.241L3.99,14.348C3.859,14.42 3.74,14.455 3.633,14.455C3.508,14.455 3.414,14.412 3.352,14.326C3.289,14.24 3.258,14.134 3.258,14.009C3.258,13.973 3.264,13.914 3.276,13.83L4.044,9.366L0.794,6.205C0.645,6.045 0.57,5.902 0.57,5.777C0.57,5.557 0.737,5.42 1.07,5.366L5.552,4.714L7.561,0.652C7.674,0.408 7.82,0.286 7.999,0.286C8.177,0.286 8.323,0.408 8.436,0.652L10.445,4.714L14.927,5.366C15.261,5.42 15.427,5.557 15.427,5.777L15.428,5.777Z\" />\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport FavoriteIcon from '../icons/FavoriteIcon';\nimport { ButtonLink } from './buttons';\nimport Tooltip from './Tooltip';\n\nexport interface Props {\n  className?: string;\n  favorite: boolean;\n  qualifier: string;\n  toggleFavorite: () => void;\n}\n\nexport default class FavoriteButton extends React.PureComponent<Props> {\n  render() {\n    const { className, favorite, qualifier, toggleFavorite } = this.props;\n    const tooltip = favorite\n      ? translate('favorite.current', qualifier)\n      : translate('favorite.check', qualifier);\n    const ariaLabel = translate('favorite.action', favorite ? 'remove' : 'add');\n\n    return (\n      <Tooltip overlay={tooltip}>\n        <ButtonLink\n          aria-label={ariaLabel}\n          className={classNames('favorite-link', 'link-no-underline', className)}\n          onClick={toggleFavorite}>\n          <FavoriteIcon favorite={favorite} />\n        </ButtonLink>\n      </Tooltip>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { addFavorite, removeFavorite } from '../../api/favorites';\nimport FavoriteButton from '../../components/controls/FavoriteButton';\n\ninterface Props {\n  className?: string;\n  component: string;\n  favorite: boolean;\n  qualifier: string;\n  handleFavorite?: (component: string, isFavorite: boolean) => void;\n}\n\ninterface State {\n  favorite: boolean;\n}\n\nexport default class Favorite extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      favorite: props.favorite\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentDidUpdate(_prevProps: Props, prevState: State) {\n    if (prevState.favorite !== this.props.favorite) {\n      this.setState({ favorite: this.props.favorite });\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  toggleFavorite = () => {\n    const newFavorite = !this.state.favorite;\n    const apiMethod = newFavorite ? addFavorite : removeFavorite;\n\n    return apiMethod(this.props.component).then(() => {\n      if (this.mounted) {\n        this.setState({ favorite: newFavorite }, () => {\n          if (this.props.handleFavorite) {\n            this.props.handleFavorite(this.props.component, newFavorite);\n          }\n        });\n      }\n    });\n  };\n\n  render() {\n    const { className, qualifier } = this.props;\n    const { favorite } = this.state;\n\n    return (\n      <FavoriteButton\n        className={className}\n        favorite={favorite}\n        qualifier={qualifier}\n        toggleFavorite={this.toggleFavorite}\n      />\n    );\n  }\n}\n/*  */\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\n\ninterface Props {\n  className?: string;\n  distribution?: string;\n  languages: T.Languages;\n}\n\nexport default function ProjectCardLanguages({ className, distribution, languages }: Props) {\n  if (distribution === undefined) {\n    return null;\n  }\n\n  const parsedLanguages = distribution.split(';').map(item => item.split('='));\n  const finalLanguages = sortBy(parsedLanguages, l => -1 * Number(l[1])).map(l =>\n    getLanguageName(languages, l[0])\n  );\n\n  const languagesText = finalLanguages.join(', ');\n\n  return (\n    <span className={className} title={languagesText}>\n      {languagesText}\n    </span>\n  );\n}\n\nfunction getLanguageName(languages: T.Languages, key: string): string {\n  if (key === '<null>') {\n    return translate('unknown');\n  }\n  const language = languages[key];\n  return language != null ? language.name : key;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { getLanguages, Store } from '../../../../store/rootReducer';\nimport ProjectCardLanguages from './ProjectCardLanguages';\n\nconst stateToProps = (state: Store) => ({\n  languages: getLanguages(state)\n});\n\nexport default connect(stateToProps)(ProjectCardLanguages);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport IssueTypeIcon from '../../../../components/icons/IssueTypeIcon';\n\nexport interface ProjectCardMeasureProps {\n  iconKey?: string;\n  label: string;\n  metricKey: string;\n  className?: string;\n}\n\nexport default function ProjectCardMeasure(\n  props: React.PropsWithChildren<ProjectCardMeasureProps>\n) {\n  const { iconKey, label, metricKey, children, className } = props;\n\n  const icon = <IssueTypeIcon className=\"spacer-right\" query={iconKey || metricKey} />;\n\n  return (\n    <div\n      data-key={metricKey}\n      className={classNames(\n        'display-flex-column overflow-hidden it__project_card_measure',\n        className\n      )}>\n      <div className=\"spacer-bottom display-flex-center\" title={label}>\n        {icon}\n        <span className=\"text-ellipsis\">{label}</span>\n      </div>\n      <div className=\"flex-grow display-flex-center project-card-measure-value-line overflow-hidden\">\n        <span className=\"invisible\">{icon}</span>\n        <span className=\"text-ellipsis\">{children}</span>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { differenceInMilliseconds } from 'date-fns';\nimport * as React from 'react';\nimport DateTimeFormatter from '../../../../components/intl/DateTimeFormatter';\nimport Measure from '../../../../components/measure/Measure';\nimport CoverageRating from '../../../../components/ui/CoverageRating';\nimport DuplicationsRating from '../../../../components/ui/DuplicationsRating';\nimport Rating from '../../../../components/ui/Rating';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\nimport { isDefined } from '../../../../helpers/types';\nimport { ComponentQualifier } from '../../../../types/component';\nimport { MetricKey } from '../../../../types/metrics';\nimport { formatDuration } from '../../utils';\nimport ProjectCardMeasure from './ProjectCardMeasure';\n\nexport interface ProjectCardMeasuresProps {\n  isNewCode: boolean;\n  measures: T.Dict<string | undefined>;\n  componentQualifier: ComponentQualifier;\n  newCodeStartingDate?: string;\n}\n\nfunction renderCoverage(props: ProjectCardMeasuresProps) {\n  const { measures, isNewCode } = props;\n  const coverageMetric = isNewCode ? MetricKey.new_coverage : MetricKey.coverage;\n\n  return (\n    <ProjectCardMeasure metricKey={coverageMetric} label={translate('metric.coverage.name')}>\n      <div className=\"display-flex-center\">\n        <Measure\n          className=\"big\"\n          metricKey={coverageMetric}\n          metricType=\"PERCENT\"\n          value={measures[coverageMetric]}\n        />\n        {measures[coverageMetric] && (\n          <span className=\"spacer-left project-card-measure-secondary-info\">\n            <CoverageRating value={measures[coverageMetric]} />\n          </span>\n        )}\n      </div>\n    </ProjectCardMeasure>\n  );\n}\n\nfunction renderDuplication(props: ProjectCardMeasuresProps) {\n  const { measures, isNewCode } = props;\n  const duplicationMetric = isNewCode\n    ? MetricKey.new_duplicated_lines_density\n    : MetricKey.duplicated_lines_density;\n\n  return (\n    <ProjectCardMeasure\n      metricKey={duplicationMetric}\n      label={translate('metric.duplicated_lines_density.short_name')}>\n      <div className=\"display-flex-center\">\n        <Measure\n          className=\"big\"\n          metricKey={duplicationMetric}\n          metricType=\"PERCENT\"\n          value={measures[duplicationMetric]}\n        />\n        {measures[duplicationMetric] != null && (\n          <span className=\"spacer-left project-card-measure-secondary-info\">\n            <DuplicationsRating value={Number(measures[duplicationMetric])} />\n          </span>\n        )}\n      </div>\n    </ProjectCardMeasure>\n  );\n}\n\nfunction renderRatings(props: ProjectCardMeasuresProps) {\n  const { isNewCode, measures } = props;\n\n  const measureList = [\n    {\n      iconLabel: translate('metric.bugs.name'),\n      noShrink: true,\n      metricKey: isNewCode ? MetricKey.new_bugs : MetricKey.bugs,\n      metricRatingKey: isNewCode ? MetricKey.new_reliability_rating : MetricKey.reliability_rating,\n      metricType: 'SHORT_INT'\n    },\n    {\n      iconLabel: translate('metric.vulnerabilities.name'),\n      metricKey: isNewCode ? MetricKey.new_vulnerabilities : MetricKey.vulnerabilities,\n      metricRatingKey: isNewCode ? MetricKey.new_security_rating : MetricKey.security_rating,\n      metricType: 'SHORT_INT'\n    },\n    {\n      iconKey: 'security_hotspots',\n      iconLabel: translate('projects.security_hotspots_reviewed'),\n      metricKey: isNewCode\n        ? MetricKey.new_security_hotspots_reviewed\n        : MetricKey.security_hotspots_reviewed,\n      metricRatingKey: isNewCode\n        ? MetricKey.new_security_review_rating\n        : MetricKey.security_review_rating,\n      metricType: 'PERCENT'\n    },\n    {\n      iconLabel: translate('metric.code_smells.name'),\n      metricKey: isNewCode ? MetricKey.new_code_smells : MetricKey.code_smells,\n      metricRatingKey: isNewCode ? MetricKey.new_maintainability_rating : MetricKey.sqale_rating,\n      metricType: 'SHORT_INT'\n    }\n  ];\n\n  return measureList.map(measure => {\n    const { iconKey, iconLabel, metricKey, metricRatingKey, metricType, noShrink } = measure;\n\n    return (\n      <ProjectCardMeasure\n        className={classNames({ 'flex-0': noShrink })}\n        key={metricKey}\n        metricKey={metricKey}\n        iconKey={iconKey}\n        label={iconLabel}>\n        <Measure\n          className=\"spacer-right big project-card-measure-secondary-info\"\n          metricKey={metricKey}\n          metricType={metricType}\n          value={measures[metricKey]}\n        />\n        <span className=\"big\">\n          <Rating value={measures[metricRatingKey]} />\n        </span>\n      </ProjectCardMeasure>\n    );\n  });\n}\n\nexport default function ProjectCardMeasures(props: ProjectCardMeasuresProps) {\n  const { isNewCode, measures, componentQualifier, newCodeStartingDate } = props;\n\n  const { ncloc } = measures;\n\n  if (!isNewCode && !ncloc) {\n    return (\n      <div className=\"note big-spacer-top\">\n        {componentQualifier === ComponentQualifier.Application\n          ? translate('portfolio.app.empty')\n          : translate('overview.project.main_branch_empty')}\n      </div>\n    );\n  }\n\n  const newCodeTimespan = newCodeStartingDate\n    ? differenceInMilliseconds(Date.now(), newCodeStartingDate)\n    : 0;\n\n  const measureList = [\n    ...renderRatings(props),\n    renderCoverage(props),\n    renderDuplication(props)\n  ].filter(isDefined);\n\n  return (\n    <>\n      {isNewCode && newCodeTimespan !== undefined && newCodeStartingDate && (\n        <DateTimeFormatter date={newCodeStartingDate}>\n          {formattedNewCodeStartingDate => (\n            <p className=\"spacer-top spacer-bottom\" title={formattedNewCodeStartingDate}>\n              {translateWithParameters(\n                'projects.new_code_period_x',\n                formatDuration(newCodeTimespan)\n              )}\n            </p>\n          )}\n        </DateTimeFormatter>\n      )}\n      <div className=\"display-flex-row display-flex-space-between\">\n        {measureList.map((measure, i) => (\n          // eslint-disable-next-line react/no-array-index-key\n          <React.Fragment key={i}>\n            {i > 0 && <span className=\"bordered-left little-spacer\" />}\n            {measure}\n          </React.Fragment>\n        ))}\n      </div>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../../components/controls/HelpTooltip';\nimport Level from '../../../../components/ui/Level';\nimport { translate } from '../../../../helpers/l10n';\nimport { formatMeasure } from '../../../../helpers/measures';\n\ninterface Props {\n  status?: string;\n}\n\nexport default function ProjectCardQualityGate({ status }: Props) {\n  if (!status) {\n    return null;\n  }\n\n  const title = `${translate('quality_gates.status')}: ${formatMeasure(status, 'LEVEL')}`;\n\n  return (\n    <div className=\"big-spacer-left\" title={title}>\n      <Level aria-label={title} level={status} small={true} />\n      {status === 'WARN' && (\n        <HelpTooltip\n          className=\"little-spacer-left\"\n          overlay={translate('quality_gates.conditions.warning.tooltip')}\n        />\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport PrivacyBadgeContainer from '../../../../components/common/PrivacyBadgeContainer';\nimport Favorite from '../../../../components/controls/Favorite';\nimport Tooltip from '../../../../components/controls/Tooltip';\nimport QualifierIcon from '../../../../components/icons/QualifierIcon';\nimport DateFromNow from '../../../../components/intl/DateFromNow';\nimport DateTimeFormatter from '../../../../components/intl/DateTimeFormatter';\nimport Measure from '../../../../components/measure/Measure';\nimport TagsList from '../../../../components/tags/TagsList';\nimport SizeRating from '../../../../components/ui/SizeRating';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\nimport { getProjectUrl } from '../../../../helpers/urls';\nimport { isLoggedIn } from '../../../../helpers/users';\nimport { ComponentQualifier } from '../../../../types/component';\nimport { MetricKey } from '../../../../types/metrics';\nimport { Project } from '../../types';\nimport './ProjectCard.css';\nimport ProjectCardLanguagesContainer from './ProjectCardLanguagesContainer';\nimport ProjectCardMeasure from './ProjectCardMeasure';\nimport ProjectCardMeasures from './ProjectCardMeasures';\nimport ProjectCardQualityGate from './ProjectCardQualityGate';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  handleFavorite: (component: string, isFavorite: boolean) => void;\n  height: number;\n  project: Project;\n  type?: string;\n}\n\nfunction renderFirstLine(project: Props['project'], handleFavorite: Props['handleFavorite']) {\n  const {\n    analysisDate,\n    tags,\n    qualifier,\n    isFavorite,\n    key,\n    name,\n    measures,\n    needIssueSync,\n    visibility\n  } = project;\n\n  return (\n    <div className=\"display-flex-center\">\n      <div className=\"project-card-main big-padded padded-bottom display-flex-center\">\n        {isFavorite !== undefined && (\n          <Favorite\n            className=\"spacer-right\"\n            component={key}\n            favorite={isFavorite}\n            handleFavorite={handleFavorite}\n            qualifier={qualifier}\n          />\n        )}\n        {qualifier === ComponentQualifier.Application && (\n          <Tooltip\n            placement=\"top\"\n            overlay={\n              <span>\n                {translate('qualifier.APP')}\n                {measures.projects && (\n                  <span>\n                    {' \u2012 '}\n                    {translateWithParameters('x_projects_', measures.projects)}\n                  </span>\n                )}\n              </span>\n            }>\n            <span className=\"spacer-right\">\n              <QualifierIcon qualifier={qualifier} />\n            </span>\n          </Tooltip>\n        )}\n        <h3 className=\"h2 project-card-name text-ellipsis\" title={name}>\n          {needIssueSync ? name : <Link to={getProjectUrl(key)}>{name}</Link>}\n        </h3>\n\n        {analysisDate && (\n          <>\n            <ProjectCardQualityGate status={measures[MetricKey.alert_status]} />\n            <span className=\"flex-grow\" />\n            <DateTimeFormatter date={analysisDate}>\n              {formattedAnalysisDate => (\n                <span className=\"note big-spacer-left text-ellipsis\" title={formattedAnalysisDate}>\n                  <FormattedMessage\n                    id=\"projects.last_analysis_on_x\"\n                    defaultMessage={translate('projects.last_analysis_on_x')}\n                    values={{\n                      date: <DateFromNow date={analysisDate} />\n                    }}\n                  />\n                </span>\n              )}\n            </DateTimeFormatter>\n          </>\n        )}\n      </div>\n      <div className=\"project-card-meta big-padded padded-bottom display-flex-center\">\n        <div className=\"display-flex-center overflow-hidden\">\n          <PrivacyBadgeContainer\n            className=\"spacer-right\"\n            qualifier={qualifier}\n            visibility={visibility}\n          />\n          {tags.length > 0 && <TagsList className=\"text-ellipsis\" tags={tags} />}\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction renderSecondLine(\n  currentUser: Props['currentUser'],\n  project: Props['project'],\n  isNewCode: boolean\n) {\n  const { measures } = project;\n\n  return (\n    <div\n      className={classNames('display-flex-end flex-grow', {\n        'project-card-leak': isNewCode\n      })}>\n      <div className=\"project-card-main big-padded-left big-padded-right big-padded-bottom\">\n        {renderMeasures(currentUser, project, isNewCode)}\n      </div>\n      <div className=\"project-card-meta display-flex-end big-padded-left big-padded-right big-padded-bottom\">\n        {isNewCode\n          ? measures[MetricKey.new_lines] != null && (\n              <ProjectCardMeasure\n                metricKey={MetricKey.new_lines}\n                label={translate('metric.lines.name')}>\n                <Measure\n                  className=\"big\"\n                  metricKey={MetricKey.new_lines}\n                  metricType=\"SHORT_INT\"\n                  value={measures[MetricKey.new_lines]}\n                />\n              </ProjectCardMeasure>\n            )\n          : measures[MetricKey.ncloc] != null && (\n              <ProjectCardMeasure\n                metricKey={MetricKey.ncloc}\n                label={translate('metric.lines.name')}>\n                <div className=\"display-flex-center\">\n                  <Measure\n                    className=\"big\"\n                    metricKey={MetricKey.ncloc}\n                    metricType=\"SHORT_INT\"\n                    value={measures[MetricKey.ncloc]}\n                  />\n                  <span className=\"spacer-left\">\n                    <SizeRating value={Number(measures[MetricKey.ncloc])} />\n                  </span>\n                  <ProjectCardLanguagesContainer\n                    className=\"small spacer-left text-ellipsis\"\n                    distribution={measures[MetricKey.ncloc_language_distribution]}\n                  />\n                </div>\n              </ProjectCardMeasure>\n            )}\n      </div>\n    </div>\n  );\n}\n\nfunction renderMeasures(\n  currentUser: Props['currentUser'],\n  project: Props['project'],\n  isNewCode: boolean\n) {\n  const { measures, needIssueSync, analysisDate, leakPeriodDate, qualifier, key } = project;\n\n  if (analysisDate && (!isNewCode || leakPeriodDate)) {\n    return (\n      <ProjectCardMeasures\n        measures={measures}\n        componentQualifier={qualifier}\n        isNewCode={isNewCode}\n        newCodeStartingDate={leakPeriodDate}\n      />\n    );\n  }\n\n  return (\n    <div className=\"spacer-top spacer-bottom\">\n      <span className=\"note\">\n        {isNewCode && analysisDate\n          ? translate('projects.no_new_code_period', qualifier)\n          : translate('projects.not_analyzed', qualifier)}\n      </span>\n      {qualifier !== ComponentQualifier.Application &&\n        !analysisDate &&\n        isLoggedIn(currentUser) &&\n        !needIssueSync && (\n          <Link className=\"button spacer-left\" to={getProjectUrl(key)}>\n            {translate('projects.configure_analysis')}\n          </Link>\n        )}\n    </div>\n  );\n}\n\nexport default function ProjectCard(props: Props) {\n  const { currentUser, height, type, project } = props;\n  const isNewCode = type === 'leak';\n\n  return (\n    <div\n      className={classNames('display-flex-column boxed-group it_project_card', {\n        'project-card-disabled': project.needIssueSync\n      })}\n      data-key={project.key}\n      style={{ height }}>\n      {renderFirstLine(project, props.handleFavorite)}\n      {renderSecondLine(currentUser, project, isNewCode)}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';\nimport { List, ListRowProps } from 'react-virtualized/dist/commonjs/List';\nimport { WindowScroller } from 'react-virtualized/dist/commonjs/WindowScroller';\nimport EmptySearch from '../../../components/common/EmptySearch';\nimport { translate } from '../../../helpers/l10n';\nimport { Query } from '../query';\nimport { Project } from '../types';\nimport EmptyFavoriteSearch from './EmptyFavoriteSearch';\nimport EmptyInstance from './EmptyInstance';\nimport NoFavoriteProjects from './NoFavoriteProjects';\nimport ProjectCard from './project-card/ProjectCard';\n\nconst PROJECT_CARD_HEIGHT = 145;\nconst PROJECT_CARD_MARGIN = 20;\n\ninterface Props {\n  cardType?: string;\n  currentUser: T.CurrentUser;\n  handleFavorite: (component: string, isFavorite: boolean) => void;\n  isFavorite: boolean;\n  isFiltered: boolean;\n  projects: Project[];\n  query: Query;\n}\n\nexport default class ProjectsList extends React.PureComponent<Props> {\n  renderNoProjects() {\n    const { currentUser, isFavorite, isFiltered, query } = this.props;\n    if (isFiltered) {\n      return isFavorite ? <EmptyFavoriteSearch query={query} /> : <EmptySearch />;\n    }\n    return isFavorite ? <NoFavoriteProjects /> : <EmptyInstance currentUser={currentUser} />;\n  }\n\n  renderRow = ({ index, key, style }: ListRowProps) => {\n    const project = this.props.projects[index];\n\n    return (\n      <div key={key} role=\"row\" style={{ ...style, height: PROJECT_CARD_HEIGHT }}>\n        <div role=\"gridcell\">\n          <ProjectCard\n            currentUser={this.props.currentUser}\n            handleFavorite={this.props.handleFavorite}\n            height={PROJECT_CARD_HEIGHT}\n            key={project.key}\n            project={project}\n            type={this.props.cardType}\n          />\n        </div>\n      </div>\n    );\n  };\n\n  renderList() {\n    return (\n      <WindowScroller>\n        {({ height, isScrolling, onChildScroll, scrollTop }) => (\n          <AutoSizer disableHeight={true}>\n            {({ width }) => (\n              <div>\n                <List\n                  aria-label={translate('project_plural')}\n                  autoHeight={true}\n                  height={height}\n                  isScrolling={isScrolling}\n                  onScroll={onChildScroll}\n                  overscanRowCount={2}\n                  rowCount={this.props.projects.length}\n                  rowHeight={PROJECT_CARD_HEIGHT + PROJECT_CARD_MARGIN}\n                  rowRenderer={this.renderRow}\n                  scrollTop={scrollTop}\n                  style={{ outline: 'none' }}\n                  width={width}\n                />\n              </div>\n            )}\n          </AutoSizer>\n        )}\n      </WindowScroller>\n    );\n  }\n\n  render() {\n    const { projects } = this.props;\n\n    return (\n      <div className=\"projects-list\">\n        {projects.length > 0 ? this.renderList() : this.renderNoProjects()}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omitBy } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport { Location, Router, withRouter } from '../../../components/hoc/withRouter';\nimport '../../../components/search-navigator.css';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication';\nimport { translate } from '../../../helpers/l10n';\nimport { addSideBarClass, removeSideBarClass } from '../../../helpers/pages';\nimport { get, save } from '../../../helpers/storage';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { ComponentQualifier } from '../../../types/component';\nimport { hasFilterParams, hasVisualizationParams, parseUrlQuery, Query } from '../query';\nimport '../styles.css';\nimport { Facets, Project } from '../types';\nimport { fetchProjects, parseSorting, SORTING_SWITCH } from '../utils';\nimport Visualizations from '../visualizations/Visualizations';\nimport PageHeader from './PageHeader';\nimport PageSidebar from './PageSidebar';\nimport ProjectsList from './ProjectsList';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  isFavorite: boolean;\n  location: Pick<Location, 'pathname' | 'query'>;\n  qualifiers: ComponentQualifier[];\n  router: Pick<Router, 'push' | 'replace'>;\n}\n\ninterface State {\n  facets?: Facets;\n  loading: boolean;\n  pageIndex?: number;\n  projects?: Project[];\n  query: Query;\n  total?: number;\n}\n\nexport const LS_PROJECTS_SORT = 'sonarqube.projects.sort';\nexport const LS_PROJECTS_VIEW = 'sonarqube.projects.view';\nexport const LS_PROJECTS_VISUALIZATION = 'sonarqube.projects.visualization';\n\nexport class AllProjects extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = { loading: true, query: {} };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n\n    if (this.props.isFavorite && !isLoggedIn(this.props.currentUser)) {\n      handleRequiredAuthentication();\n      return;\n    }\n    this.handleQueryChange(true);\n    addSideBarClass();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.location.query !== this.props.location.query) {\n      this.handleQueryChange(false);\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    removeSideBarClass();\n  }\n\n  fetchProjects = (query: Query) => {\n    this.setState({ loading: true, query });\n    fetchProjects(query, this.props.isFavorite).then(response => {\n      if (this.mounted) {\n        this.setState({\n          facets: response.facets,\n          loading: false,\n          pageIndex: 1,\n          projects: response.projects,\n          total: response.total\n        });\n      }\n    }, this.stopLoading);\n  };\n\n  fetchMoreProjects = () => {\n    const { pageIndex, projects, query } = this.state;\n    if (pageIndex && projects && query) {\n      this.setState({ loading: true });\n      fetchProjects(query, this.props.isFavorite, pageIndex + 1).then(response => {\n        if (this.mounted) {\n          this.setState({\n            loading: false,\n            pageIndex: pageIndex + 1,\n            projects: [...projects, ...response.projects]\n          });\n        }\n      }, this.stopLoading);\n    }\n  };\n\n  getSort = () => this.state.query.sort || 'name';\n\n  getStorageOptions = () => {\n    const options: {\n      sort?: string;\n      view?: string;\n      visualization?: string;\n    } = {};\n    if (get(LS_PROJECTS_SORT)) {\n      options.sort = get(LS_PROJECTS_SORT) || undefined;\n    }\n    if (get(LS_PROJECTS_VIEW)) {\n      options.view = get(LS_PROJECTS_VIEW) || undefined;\n    }\n    if (get(LS_PROJECTS_VISUALIZATION)) {\n      options.visualization = get(LS_PROJECTS_VISUALIZATION) || undefined;\n    }\n    return options;\n  };\n\n  getView = () => this.state.query.view || 'overall';\n\n  getVisualization = () => this.state.query.visualization || 'risk';\n\n  handleClearAll = () => {\n    this.props.router.push({ pathname: this.props.location.pathname });\n  };\n\n  handleFavorite = (key: string, isFavorite: boolean) => {\n    this.setState(({ projects }) => {\n      if (!projects) {\n        return null;\n      }\n\n      return {\n        projects: projects.map(p => (p.key === key ? { ...p, isFavorite } : p))\n      };\n    });\n  };\n\n  handlePerspectiveChange = ({ view, visualization }: { view: string; visualization?: string }) => {\n    const query: {\n      view: string | undefined;\n      visualization: string | undefined;\n      sort?: string | undefined;\n    } = {\n      view: view === 'overall' ? undefined : view,\n      visualization\n    };\n\n    if (this.state.query.view === 'leak' || view === 'leak') {\n      if (this.state.query.sort) {\n        const sort = parseSorting(this.state.query.sort);\n        if (SORTING_SWITCH[sort.sortValue]) {\n          query.sort = (sort.sortDesc ? '-' : '') + SORTING_SWITCH[sort.sortValue];\n        }\n      }\n      this.props.router.push({ pathname: this.props.location.pathname, query });\n    } else {\n      this.updateLocationQuery(query);\n    }\n\n    save(LS_PROJECTS_SORT, query.sort);\n    save(LS_PROJECTS_VIEW, query.view);\n    save(LS_PROJECTS_VISUALIZATION, visualization);\n  };\n\n  handleQueryChange(initialMount: boolean) {\n    const query = parseUrlQuery(this.props.location.query);\n    const savedOptions = this.getStorageOptions();\n    const savedOptionsSet = savedOptions.sort || savedOptions.view || savedOptions.visualization;\n\n    // if there is no visualization parameters (sort, view, visualization), but there are saved preferences in the localStorage\n    if (initialMount && !hasVisualizationParams(query) && savedOptionsSet) {\n      this.props.router.replace({ pathname: this.props.location.pathname, query: savedOptions });\n    } else {\n      this.fetchProjects(query);\n    }\n  }\n\n  handleSortChange = (sort: string, desc: boolean) => {\n    const asString = (desc ? '-' : '') + sort;\n    this.updateLocationQuery({ sort: asString });\n    save(LS_PROJECTS_SORT, asString);\n  };\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  updateLocationQuery = (newQuery: T.RawQuery) => {\n    const query = omitBy({ ...this.props.location.query, ...newQuery }, x => !x);\n    this.props.router.push({ pathname: this.props.location.pathname, query });\n  };\n\n  renderSide = () => (\n    <ScreenPositionHelper className=\"layout-page-side-outer\">\n      {({ top }) => (\n        <section\n          aria-label={translate('filters')}\n          className=\"layout-page-side projects-page-side\"\n          style={{ top }}>\n          <div className=\"layout-page-side-inner\">\n            <div className=\"layout-page-filters\">\n              <A11ySkipTarget\n                anchor=\"projects_filters\"\n                label={translate('projects.skip_to_filters')}\n                weight={10}\n              />\n\n              <PageSidebar\n                applicationsEnabled={this.props.qualifiers.includes(ComponentQualifier.Application)}\n                facets={this.state.facets}\n                onClearAll={this.handleClearAll}\n                onQueryChange={this.updateLocationQuery}\n                query={this.state.query}\n                view={this.getView()}\n                visualization={this.getVisualization()}\n              />\n            </div>\n          </div>\n        </section>\n      )}\n    </ScreenPositionHelper>\n  );\n\n  renderHeader = () => (\n    <div className=\"layout-page-header-panel layout-page-main-header\">\n      <div className=\"layout-page-header-panel-inner layout-page-main-header-inner\">\n        <div className=\"layout-page-main-inner\">\n          <PageHeader\n            currentUser={this.props.currentUser}\n            loading={this.state.loading}\n            onPerspectiveChange={this.handlePerspectiveChange}\n            onQueryChange={this.updateLocationQuery}\n            onSortChange={this.handleSortChange}\n            projects={this.state.projects}\n            query={this.state.query}\n            selectedSort={this.getSort()}\n            total={this.state.total}\n            view={this.getView()}\n            visualization={this.getVisualization()}\n          />\n        </div>\n      </div>\n    </div>\n  );\n\n  renderMain = () => {\n    if (this.state.loading && this.state.projects === undefined) {\n      return <DeferredSpinner />;\n    }\n\n    return this.getView() === 'visualizations' ? (\n      <div className=\"layout-page-main-inner\">\n        {this.state.projects && (\n          <Visualizations\n            projects={this.state.projects}\n            sort={this.state.query.sort}\n            total={this.state.total}\n            visualization={this.getVisualization()}\n          />\n        )}\n      </div>\n    ) : (\n      <div className=\"layout-page-main-inner\">\n        {this.state.projects && (\n          <ProjectsList\n            cardType={this.getView()}\n            currentUser={this.props.currentUser}\n            handleFavorite={this.handleFavorite}\n            isFavorite={this.props.isFavorite}\n            isFiltered={hasFilterParams(this.state.query)}\n            projects={this.state.projects}\n            query={this.state.query}\n          />\n        )}\n        <ListFooter\n          count={this.state.projects !== undefined ? this.state.projects.length : 0}\n          loading={this.state.loading}\n          loadMore={this.fetchMoreProjects}\n          ready={!this.state.loading}\n          total={this.state.total !== undefined ? this.state.total : 0}\n        />\n      </div>\n    );\n  };\n\n  render() {\n    return (\n      <div className=\"layout-page projects-page\" id=\"projects-page\">\n        <Suggestions suggestions=\"projects\" />\n        <Helmet defer={false} title={translate('projects.page')} />\n\n        <h1 className=\"a11y-hidden\">{translate('projects.page')}</h1>\n\n        {this.renderSide()}\n\n        <div className=\"layout-page-main\">\n          <A11ySkipTarget anchor=\"projects_main\" />\n\n          <div role=\"main\">\n            <h2 className=\"a11y-hidden\">{translate('list_of_projects')}</h2>\n            {this.renderHeader()}\n            {this.renderMain()}\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default withRouter(AllProjects);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\nimport { getAppState, getCurrentUser, Store } from '../../../store/rootReducer';\nimport { ComponentQualifier } from '../../../types/component';\n\nconst stateToProps = (state: Store) => ({\n  currentUser: getCurrentUser(state),\n  qualifiers: getAppState(state).qualifiers as ComponentQualifier[]\n});\n\nexport default connect(stateToProps)(lazyLoadComponent(() => import('./AllProjects')));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { searchProjects } from '../../../api/components';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport { Location, Router, withRouter } from '../../../components/hoc/withRouter';\nimport { get } from '../../../helpers/storage';\nimport { hasGlobalPermission, isLoggedIn } from '../../../helpers/users';\nimport { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE } from '../utils';\nimport AllProjectsContainer from './AllProjectsContainer';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  location: Pick<Location, 'pathname' | 'query'>;\n  router: Pick<Router, 'replace'>;\n}\n\ninterface State {\n  checking: boolean;\n}\n\nexport class DefaultPageSelector extends React.PureComponent<Props, State> {\n  state: State = { checking: true };\n\n  componentDidMount() {\n    this.checkIfNeedsRedirecting();\n  }\n\n  checkIfNeedsRedirecting = async () => {\n    const { currentUser, router, location } = this.props;\n    const setting = get(PROJECTS_DEFAULT_FILTER);\n\n    // 1. Don't have to redirect if:\n    //   1.1 User is anonymous\n    //   1.2 There's a query, which means the user is interacting with the current page\n    //   1.3 The last interaction with the filter was to set it to \"all\"\n    if (\n      !isLoggedIn(currentUser) ||\n      Object.keys(location.query).length > 0 ||\n      setting === PROJECTS_ALL\n    ) {\n      this.setState({ checking: false });\n      return;\n    }\n\n    // 2. Redirect to the favorites page if:\n    //   2.1 The last interaction with the filter was to set it to \"favorites\"\n    //   2.2 The user has starred some projects\n    if (\n      setting === PROJECTS_FAVORITE ||\n      (await searchProjects({ filter: 'isFavorite', ps: 1 })).paging.total > 0\n    ) {\n      router.replace('/projects/favorite');\n      return;\n    }\n\n    // 3. Redirect to the create project page if:\n    //   3.1 The user has permission to provision projects, AND there are 0 projects on the instance\n    if (\n      hasGlobalPermission(currentUser, 'provisioning') &&\n      (await searchProjects({ ps: 1 })).paging.total === 0\n    ) {\n      this.props.router.replace('/projects/create');\n    }\n\n    // None of the above apply. Do not redirect, and stay on this page.\n    this.setState({ checking: false });\n  };\n\n  render() {\n    const { checking } = this.state;\n\n    if (checking) {\n      // We don't return a loader here, on purpose. We don't want to show anything\n      // just yet.\n      return null;\n    }\n\n    return <AllProjectsContainer isFavorite={false} />;\n  }\n}\n\nexport default withCurrentUser(withRouter(DefaultPageSelector));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport AllProjectsContainer from './AllProjectsContainer';\n\nexport default function FavoriteProjectsContainer(props: any) {\n  return <AllProjectsContainer isFavorite={true} {...props} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { ButtonLink } from '../../../../components/controls/buttons';\nimport { Alert } from '../../../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmBindingDefinitionBase } from '../../../../types/alm-settings';\nimport '../../styles.css';\n\nexport interface AlmBindingDefinitionFormFieldProps<B extends AlmBindingDefinitionBase> {\n  autoFocus?: boolean;\n  help?: React.ReactNode;\n  id: string;\n  isTextArea?: boolean;\n  maxLength?: number;\n  onFieldChange: (id: keyof B, value: string) => void;\n  optional?: boolean;\n  overwriteOnly?: boolean;\n  propKey: keyof B;\n  value: string;\n  isSecret?: boolean;\n}\n\nexport function AlmBindingDefinitionFormField<B extends AlmBindingDefinitionBase>(\n  props: AlmBindingDefinitionFormFieldProps<B>\n) {\n  const {\n    autoFocus,\n    help,\n    id,\n    isTextArea,\n    maxLength,\n    optional,\n    overwriteOnly = false,\n    propKey,\n    value,\n    isSecret\n  } = props;\n  const [showField, setShowField] = React.useState(!overwriteOnly);\n\n  return (\n    <div className=\"settings-definition\">\n      <div className=\"settings-definition-left\">\n        <label className=\"h3\" htmlFor={id}>\n          {translate('settings.almintegration.form', id)}\n        </label>\n        {!optional && <MandatoryFieldMarker />}\n        {help && <div className=\"markdown small spacer-top\">{help}</div>}\n      </div>\n      <div className=\"settings-definition-right big-padded-top display-flex-column\">\n        {!showField && overwriteOnly && (\n          <div>\n            <p>{translate('settings.almintegration.form.secret.field')}</p>\n            <ButtonLink\n              onClick={() => {\n                props.onFieldChange(propKey, '');\n                setShowField(true);\n              }}>\n              {translate('settings.almintegration.form.secret.update_field')}\n            </ButtonLink>\n          </div>\n        )}\n\n        {showField && isTextArea && (\n          <textarea\n            className=\"width-100\"\n            id={id}\n            maxLength={maxLength || 2000}\n            onChange={e => props.onFieldChange(propKey, e.currentTarget.value)}\n            required={!optional}\n            rows={5}\n            value={value}\n          />\n        )}\n\n        {showField && !isTextArea && (\n          <input\n            className=\"width-100\"\n            autoFocus={autoFocus}\n            id={id}\n            maxLength={maxLength || 100}\n            name={id}\n            onChange={e => props.onFieldChange(propKey, e.currentTarget.value)}\n            size={50}\n            type=\"text\"\n            value={value}\n          />\n        )}\n\n        {showField && isSecret && (\n          <Alert variant=\"info\" className=\"spacer-top\">\n            <FormattedMessage\n              id=\"settings.almintegration.form.secret.can_encrypt\"\n              defaultMessage={translate('settings.almintegration.form.secret.can_encrypt')}\n              values={{\n                learn_more: (\n                  <Link\n                    target=\"_blank\"\n                    to={{\n                      pathname:\n                        '/documentation/instance-administration/security/#settings-encryption'\n                    }}>\n                    {translate('learn_more')}\n                  </Link>\n                )\n              }}\n            />\n          </Alert>\n        )}\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmKeys, AzureBindingDefinition } from '../../../../types/alm-settings';\nimport { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField';\n\nexport interface AzureFormProps {\n  formData: AzureBindingDefinition;\n  onFieldChange: (fieldId: keyof AzureBindingDefinition, value: string) => void;\n}\n\nexport default function AzureForm(props: AzureFormProps) {\n  const { formData, onFieldChange } = props;\n\n  return (\n    <>\n      <AlmBindingDefinitionFormField\n        autoFocus={true}\n        help={translate('settings.almintegration.form.name.azure.help')}\n        id=\"name.azure\"\n        onFieldChange={onFieldChange}\n        propKey=\"key\"\n        value={formData.key}\n        maxLength={200}\n      />\n      <AlmBindingDefinitionFormField\n        help={\n          <>\n            {translate('settings.almintegration.form.url.azure.help1')}\n            <br />\n            <em>https://ado.your-company.com/your_collection</em>\n            <br />\n            <br />\n            {translate('settings.almintegration.form.url.azure.help2')}\n            <br />\n            <em>https://dev.azure.com/your_organization</em>\n          </>\n        }\n        id=\"url.azure\"\n        maxLength={2000}\n        onFieldChange={onFieldChange}\n        propKey=\"url\"\n        value={formData.url || ''}\n      />\n      <AlmBindingDefinitionFormField\n        help={\n          <FormattedMessage\n            defaultMessage={translate(\n              'settings.almintegration.form.personal_access_token.azure.help'\n            )}\n            id=\"settings.almintegration.form.personal_access_token.azure.help\"\n            values={{\n              pat: (\n                <a\n                  href=\"https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate\"\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  {translate('settings.almintegration.form.personal_access_token.azure.help.url')}\n                </a>\n              ),\n              permission: <strong>{'Code > Read & Write'}</strong>,\n              doc_link: (\n                <Link target=\"_blank\" to={ALM_DOCUMENTATION_PATHS[AlmKeys.Azure]}>\n                  {translate('learn_more')}\n                </Link>\n              )\n            }}\n          />\n        }\n        id=\"personal_access_token\"\n        isTextArea={true}\n        onFieldChange={onFieldChange}\n        overwriteOnly={Boolean(formData.key)}\n        propKey=\"personalAccessToken\"\n        value={formData.personalAccessToken}\n        maxLength={2000}\n        isSecret={true}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmKeys, BitbucketCloudBindingDefinition } from '../../../../types/alm-settings';\nimport { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField';\n\nexport interface BitbucketCloudFormProps {\n  formData: BitbucketCloudBindingDefinition;\n  onFieldChange: (fieldId: keyof BitbucketCloudBindingDefinition, value: string) => void;\n}\n\nexport default function BitbucketCloudForm(props: BitbucketCloudFormProps) {\n  const { formData } = props;\n\n  return (\n    <>\n      <AlmBindingDefinitionFormField\n        autoFocus={true}\n        help={translate('settings.almintegration.form.name.bitbucketcloud.help')}\n        id=\"name.bitbucket\"\n        maxLength={200}\n        onFieldChange={props.onFieldChange}\n        propKey=\"key\"\n        value={formData.key || ''}\n      />\n      <AlmBindingDefinitionFormField\n        help={\n          <FormattedMessage\n            defaultMessage={translate('settings.almintegration.form.workspace.bitbucketcloud.help')}\n            id=\"settings.almintegration.form.workspace.bitbucketcloud.help\"\n            values={{\n              example: (\n                <>\n                  {'https://bitbucket.org/'}\n                  <strong>{'{workspace}'}</strong>\n                  {'/{repository}'}\n                </>\n              )\n            }}\n          />\n        }\n        id=\"workspace.bitbucketcloud\"\n        maxLength={80}\n        onFieldChange={props.onFieldChange}\n        propKey=\"workspace\"\n        value={formData.workspace || ''}\n      />\n      <Alert className=\"big-spacer-top\" variant=\"info\">\n        <FormattedMessage\n          defaultMessage={translate(`settings.almintegration.bitbucketcloud.info`)}\n          id=\"settings.almintegration.bitbucketcloud.info\"\n          values={{\n            oauth: (\n              <a\n                href=\"https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/\"\n                rel=\"noopener noreferrer\"\n                target=\"_blank\">\n                {translate('settings.almintegration.bitbucketcloud.oauth')}\n              </a>\n            ),\n            permission: <strong>Pull Requests: Read</strong>,\n            doc_link: (\n              <Link target=\"_blank\" to={ALM_DOCUMENTATION_PATHS[AlmKeys.BitbucketCloud]}>\n                {translate('learn_more')}\n              </Link>\n            )\n          }}\n        />\n      </Alert>\n      <AlmBindingDefinitionFormField\n        id=\"client_id.bitbucketcloud\"\n        help={translate('settings.almintegration.form.oauth_key.bitbucketcloud.help')}\n        onFieldChange={props.onFieldChange}\n        propKey=\"clientId\"\n        value={formData.clientId || ''}\n        maxLength={80}\n      />\n      <AlmBindingDefinitionFormField\n        id=\"client_secret.bitbucketcloud\"\n        help={translate('settings.almintegration.form.oauth_secret.bitbucketcloud.help')}\n        onFieldChange={props.onFieldChange}\n        overwriteOnly={Boolean(formData.key)}\n        propKey=\"clientSecret\"\n        value={formData.clientSecret || ''}\n        maxLength={160}\n        isSecret={true}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmKeys, BitbucketServerBindingDefinition } from '../../../../types/alm-settings';\nimport { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField';\n\nexport interface BitbucketServerFormProps {\n  formData: BitbucketServerBindingDefinition;\n  onFieldChange: (fieldId: keyof BitbucketServerBindingDefinition, value: string) => void;\n}\n\nexport default function BitbucketServerForm(props: BitbucketServerFormProps) {\n  const { formData } = props;\n\n  return (\n    <>\n      <AlmBindingDefinitionFormField\n        autoFocus={true}\n        help={translate('settings.almintegration.form.name.bitbucket.help')}\n        id=\"name.bitbucket\"\n        maxLength={200}\n        onFieldChange={props.onFieldChange}\n        propKey=\"key\"\n        value={formData.key || ''}\n      />\n      <AlmBindingDefinitionFormField\n        help={\n          <FormattedMessage\n            defaultMessage={translate('settings.almintegration.form.url.bitbucket.help')}\n            id=\"settings.almintegration.form.url.bitbucket.help\"\n            values={{ example: 'https://bitbucket-server.your-company.com' }}\n          />\n        }\n        id=\"url.bitbucket\"\n        maxLength={2000}\n        onFieldChange={props.onFieldChange}\n        propKey=\"url\"\n        value={formData.url || ''}\n      />\n      <AlmBindingDefinitionFormField\n        id=\"personal_access_token\"\n        help={\n          <FormattedMessage\n            defaultMessage={translate(\n              'settings.almintegration.form.personal_access_token.bitbucket.help'\n            )}\n            id=\"settings.almintegration.form.personal_access_token.bitbucket.help\"\n            values={{\n              pat: (\n                <a\n                  href=\"https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html\"\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  {translate(\n                    'settings.almintegration.form.personal_access_token.bitbucket.help.url'\n                  )}\n                </a>\n              ),\n              permission: <strong>Read</strong>,\n              doc_link: (\n                <Link target=\"_blank\" to={ALM_DOCUMENTATION_PATHS[AlmKeys.BitbucketServer]}>\n                  {translate('learn_more')}\n                </Link>\n              )\n            }}\n          />\n        }\n        isTextArea={true}\n        onFieldChange={props.onFieldChange}\n        overwriteOnly={Boolean(formData.key)}\n        propKey=\"personalAccessToken\"\n        value={formData.personalAccessToken || ''}\n        maxLength={2000}\n        isSecret={true}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport RadioToggle from '../../../../components/controls/RadioToggle';\nimport { translate } from '../../../../helpers/l10n';\nimport {\n  AlmKeys,\n  BitbucketCloudBindingDefinition,\n  BitbucketServerBindingDefinition\n} from '../../../../types/alm-settings';\nimport BitbucketCloudForm from './BitbucketCloudForm';\nimport BitbucketServerForm from './BitbucketServerForm';\n\nexport interface BitbucketFormProps {\n  formData: BitbucketServerBindingDefinition | BitbucketCloudBindingDefinition;\n  isUpdate: boolean;\n  onFieldChange: (\n    fieldId: keyof (BitbucketServerBindingDefinition & BitbucketCloudBindingDefinition),\n    value: string\n  ) => void;\n  variant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud;\n  onVariantChange: (variant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud) => void;\n}\n\nexport default function BitbucketForm(props: BitbucketFormProps) {\n  const { isUpdate, formData, variant } = props;\n\n  return (\n    <>\n      {!isUpdate && (\n        <div className=\"display-flex-column\">\n          <strong>{translate('settings.almintegration.form.choose_bitbucket_variant')}</strong>\n          <RadioToggle\n            className=\"little-spacer-top big-spacer-bottom\"\n            name=\"variant\"\n            onCheck={props.onVariantChange}\n            options={[\n              {\n                label: 'Bitbucket Server',\n                value: AlmKeys.BitbucketServer\n              },\n              { label: 'Bitbucket Cloud', value: AlmKeys.BitbucketCloud }\n            ]}\n            value={variant}\n          />\n        </div>\n      )}\n\n      {variant !== undefined && (\n        <>\n          {variant === AlmKeys.BitbucketServer && (\n            <BitbucketServerForm\n              onFieldChange={props.onFieldChange}\n              formData={formData as BitbucketServerBindingDefinition}\n            />\n          )}\n\n          {variant === AlmKeys.BitbucketCloud && (\n            <BitbucketCloudForm\n              onFieldChange={props.onFieldChange}\n              formData={formData as BitbucketCloudBindingDefinition}\n            />\n          )}\n        </>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmKeys, GithubBindingDefinition } from '../../../../types/alm-settings';\nimport { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField';\n\nexport interface GithubFormProps {\n  formData: GithubBindingDefinition;\n  onFieldChange: (fieldId: keyof GithubBindingDefinition, value: string) => void;\n}\n\nexport default function GithubForm(props: GithubFormProps) {\n  const { formData, onFieldChange } = props;\n\n  return (\n    <>\n      <AlmBindingDefinitionFormField\n        autoFocus={true}\n        help={translate('settings.almintegration.form.name.github.help')}\n        id=\"name.github\"\n        onFieldChange={onFieldChange}\n        propKey=\"key\"\n        value={formData.key}\n        maxLength={200}\n      />\n      <AlmBindingDefinitionFormField\n        help={\n          <>\n            {translate('settings.almintegration.form.url.github.help1')}\n            <br />\n            <em>https://github.company.com/api/v3</em>\n            <br />\n            <br />\n            {translate('settings.almintegration.form.url.github.help2')}\n            <br />\n            <em>https://api.github.com/</em>\n          </>\n        }\n        id=\"url.github\"\n        maxLength={2000}\n        onFieldChange={onFieldChange}\n        propKey=\"url\"\n        value={formData.url}\n      />\n      <Alert className=\"big-spacer-top\" variant=\"info\">\n        <FormattedMessage\n          defaultMessage={translate(`settings.almintegration.github.info`)}\n          id=\"settings.almintegration.github.info\"\n          values={{\n            link: (\n              <Link target=\"_blank\" to={ALM_DOCUMENTATION_PATHS[AlmKeys.GitHub]}>\n                {translate('learn_more')}\n              </Link>\n            )\n          }}\n        />\n      </Alert>\n      <AlmBindingDefinitionFormField\n        id=\"app_id\"\n        help={translate('settings.almintegration.form.app_id.github.help')}\n        maxLength={80}\n        onFieldChange={onFieldChange}\n        propKey=\"appId\"\n        value={formData.appId}\n      />\n      <AlmBindingDefinitionFormField\n        id=\"client_id.github\"\n        help={translate('settings.almintegration.form.client_id.github.help')}\n        maxLength={80}\n        onFieldChange={onFieldChange}\n        propKey=\"clientId\"\n        value={formData.clientId}\n      />\n      <AlmBindingDefinitionFormField\n        id=\"client_secret.github\"\n        help={translate('settings.almintegration.form.client_secret.github.help')}\n        maxLength={160}\n        onFieldChange={onFieldChange}\n        overwriteOnly={Boolean(formData.key)}\n        propKey=\"clientSecret\"\n        value={formData.clientSecret}\n        isSecret={true}\n      />\n      <AlmBindingDefinitionFormField\n        id=\"private_key\"\n        help={translate('settings.almintegration.form.private_key.github.help')}\n        isTextArea={true}\n        onFieldChange={onFieldChange}\n        overwriteOnly={Boolean(formData.key)}\n        propKey=\"privateKey\"\n        value={formData.privateKey}\n        maxLength={2500}\n        isSecret={true}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmKeys, GitlabBindingDefinition } from '../../../../types/alm-settings';\nimport { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField';\n\nexport interface GitlabFormProps {\n  formData: GitlabBindingDefinition;\n  onFieldChange: (fieldId: keyof GitlabBindingDefinition, value: string) => void;\n}\n\nexport default function GitlabForm(props: GitlabFormProps) {\n  const { formData, onFieldChange } = props;\n\n  return (\n    <>\n      <AlmBindingDefinitionFormField\n        autoFocus={true}\n        help={translate('settings.almintegration.form.name.gitlab.help')}\n        id=\"name.gitlab\"\n        onFieldChange={onFieldChange}\n        propKey=\"key\"\n        value={formData.key}\n        maxLength={200}\n      />\n      <AlmBindingDefinitionFormField\n        help={\n          <>\n            {translate('settings.almintegration.form.url.gitlab.help')}\n            <br />\n            <em>https://gitlab.com/api/v4</em>\n          </>\n        }\n        id=\"url.gitlab\"\n        maxLength={2000}\n        onFieldChange={onFieldChange}\n        propKey=\"url\"\n        value={formData.url || ''}\n      />\n      <AlmBindingDefinitionFormField\n        help={\n          <FormattedMessage\n            defaultMessage={translate(\n              `settings.almintegration.form.personal_access_token.gitlab.help`\n            )}\n            id=\"settings.almintegration.form.personal_access_token.gitlab.help\"\n            values={{\n              pat: (\n                <a\n                  href=\"https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html\"\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  {translate('settings.almintegration.form.personal_access_token.gitlab.help.url')}\n                </a>\n              ),\n              permission: <strong>Reporter</strong>,\n              scope: <strong>api</strong>,\n              doc_link: (\n                <Link target=\"_blank\" to={ALM_DOCUMENTATION_PATHS[AlmKeys.GitLab]}>\n                  {translate('learn_more')}\n                </Link>\n              )\n            }}\n          />\n        }\n        id=\"personal_access_token\"\n        isTextArea={true}\n        onFieldChange={onFieldChange}\n        overwriteOnly={Boolean(formData.key)}\n        propKey=\"personalAccessToken\"\n        value={formData.personalAccessToken}\n        maxLength={2000}\n        isSecret={true}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../../components/controls/buttons';\nimport Modal from '../../../../components/controls/Modal';\nimport { Alert } from '../../../../components/ui/Alert';\nimport DeferredSpinner from '../../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../../helpers/l10n';\nimport {\n  AlmBindingDefinition,\n  AlmKeys,\n  AzureBindingDefinition,\n  BitbucketCloudBindingDefinition,\n  BitbucketServerBindingDefinition,\n  GithubBindingDefinition,\n  GitlabBindingDefinition\n} from '../../../../types/alm-settings';\nimport AzureForm from './AzureForm';\nimport BitbucketForm from './BitbucketForm';\nimport GithubForm from './GithubForm';\nimport GitlabForm from './GitlabForm';\n\nexport interface AlmBindingDefinitionFormProps {\n  alm: AlmKeys;\n  isUpdate: boolean;\n  canSubmit: boolean;\n  alreadyHaveInstanceConfigured: boolean;\n  onCancel: () => void;\n  onSubmit: () => void;\n  onFieldChange: (fieldId: keyof AlmBindingDefinition, value: string) => void;\n  formData: AlmBindingDefinition;\n  submitting: boolean;\n  bitbucketVariant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud;\n  onBitbucketVariantChange: (\n    bitbucketVariant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud\n  ) => void;\n  validationError?: string;\n}\n\nexport default class AlmBindingDefinitionFormRenderer extends React.PureComponent<\n  AlmBindingDefinitionFormProps\n> {\n  renderForm = () => {\n    const { alm, formData, isUpdate, bitbucketVariant } = this.props;\n\n    switch (alm) {\n      case AlmKeys.GitLab:\n        return (\n          <GitlabForm\n            onFieldChange={this.props.onFieldChange}\n            formData={formData as GitlabBindingDefinition}\n          />\n        );\n      case AlmKeys.Azure:\n        return (\n          <AzureForm\n            onFieldChange={this.props.onFieldChange}\n            formData={formData as AzureBindingDefinition}\n          />\n        );\n      case AlmKeys.GitHub:\n        return (\n          <GithubForm\n            onFieldChange={this.props.onFieldChange}\n            formData={formData as GithubBindingDefinition}\n          />\n        );\n      case AlmKeys.BitbucketServer:\n        return (\n          <BitbucketForm\n            onFieldChange={this.props.onFieldChange}\n            formData={\n              formData as BitbucketServerBindingDefinition | BitbucketCloudBindingDefinition\n            }\n            isUpdate={isUpdate}\n            variant={bitbucketVariant}\n            onVariantChange={this.props.onBitbucketVariantChange}\n          />\n        );\n      default:\n        return null;\n    }\n  };\n\n  render() {\n    const {\n      isUpdate,\n      alreadyHaveInstanceConfigured,\n      canSubmit,\n      submitting,\n      validationError\n    } = this.props;\n    const header = translate('settings.almintegration.form.header', isUpdate ? 'edit' : 'create');\n\n    const handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n      event.preventDefault();\n      this.props.onSubmit();\n    };\n\n    return (\n      <Modal\n        contentLabel={header}\n        onRequestClose={this.props.onCancel}\n        shouldCloseOnOverlayClick={false}\n        size=\"medium\">\n        <form className=\"views-form\" onSubmit={handleSubmit}>\n          <div className=\"modal-head\">\n            <h2>{header}</h2>\n          </div>\n\n          <div className=\"modal-body modal-container\">\n            {alreadyHaveInstanceConfigured && !isUpdate && (\n              <Alert className=\"big-spacer-bottom\" variant=\"warning\">\n                {translate('settings.almintegration.form.second_instance_warning')}\n              </Alert>\n            )}\n            {this.renderForm()}\n            {validationError && !canSubmit && (\n              <Alert variant=\"error\">\n                <p className=\"spacer-bottom\">\n                  {translate('settings.almintegration.configuration_invalid')}\n                </p>\n                <ul className=\"list-styled\">\n                  <li>{validationError}</li>\n                </ul>\n              </Alert>\n            )}\n          </div>\n\n          <div className=\"modal-foot\">\n            <SubmitButton disabled={!canSubmit || submitting}>\n              {translate('settings.almintegration.form.save')}\n              <DeferredSpinner className=\"spacer-left\" loading={submitting} />\n            </SubmitButton>\n            <ResetButtonLink onClick={this.props.onCancel}>{translate('cancel')}</ResetButtonLink>\n          </div>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport {\n  createAzureConfiguration,\n  createBitbucketCloudConfiguration,\n  createBitbucketServerConfiguration,\n  createGithubConfiguration,\n  createGitlabConfiguration,\n  deleteConfiguration,\n  updateAzureConfiguration,\n  updateBitbucketCloudConfiguration,\n  updateBitbucketServerConfiguration,\n  updateGithubConfiguration,\n  updateGitlabConfiguration,\n  validateAlmSettings\n} from '../../../../api/alm-settings';\nimport {\n  AlmBindingDefinition,\n  AlmBindingDefinitionBase,\n  AlmKeys,\n  AzureBindingDefinition,\n  BitbucketCloudBindingDefinition,\n  BitbucketServerBindingDefinition,\n  GithubBindingDefinition,\n  GitlabBindingDefinition,\n  isBitbucketCloudBindingDefinition\n} from '../../../../types/alm-settings';\nimport AlmBindingDefinitionFormRenderer from './AlmBindingDefinitionFormRenderer';\n\ninterface Props {\n  alm: AlmKeys;\n  bindingDefinition?: AlmBindingDefinition;\n  alreadyHaveInstanceConfigured: boolean;\n  onCancel: () => void;\n  afterSubmit: (data: AlmBindingDefinitionBase) => void;\n  enforceValidation?: boolean;\n}\n\ninterface State {\n  formData: AlmBindingDefinition;\n  touched: boolean;\n  submitting: boolean;\n  bitbucketVariant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud;\n  alreadySavedFormData?: AlmBindingDefinition;\n  validationError?: string;\n}\n\nconst BINDING_PER_ALM = {\n  [AlmKeys.Azure]: {\n    createApi: createAzureConfiguration,\n    updateApi: updateAzureConfiguration,\n    defaultBinding: { key: '', personalAccessToken: '', url: '' } as AzureBindingDefinition\n  },\n  [AlmKeys.GitHub]: {\n    createApi: createGithubConfiguration,\n    updateApi: updateGithubConfiguration,\n    defaultBinding: {\n      key: '',\n      appId: '',\n      clientId: '',\n      clientSecret: '',\n      url: '',\n      privateKey: ''\n    } as GithubBindingDefinition\n  },\n  [AlmKeys.GitLab]: {\n    createApi: createGitlabConfiguration,\n    updateApi: updateGitlabConfiguration,\n    defaultBinding: { key: '', personalAccessToken: '', url: '' } as GitlabBindingDefinition\n  },\n  [AlmKeys.BitbucketServer]: {\n    createApi: createBitbucketServerConfiguration,\n    updateApi: updateBitbucketServerConfiguration,\n    defaultBinding: {\n      key: '',\n      url: '',\n      personalAccessToken: ''\n    } as BitbucketServerBindingDefinition\n  },\n  [AlmKeys.BitbucketCloud]: {\n    createApi: createBitbucketCloudConfiguration,\n    updateApi: updateBitbucketCloudConfiguration,\n    defaultBinding: {\n      key: '',\n      clientId: '',\n      clientSecret: '',\n      workspace: ''\n    } as BitbucketCloudBindingDefinition\n  }\n};\n\nexport default class AlmBindingDefinitionForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  constructor(props: Props) {\n    super(props);\n\n    let bitbucketVariant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud | undefined = undefined;\n\n    if (props.bindingDefinition && props.alm === AlmKeys.BitbucketServer) {\n      bitbucketVariant = isBitbucketCloudBindingDefinition(props.bindingDefinition)\n        ? AlmKeys.BitbucketCloud\n        : AlmKeys.BitbucketServer;\n    }\n\n    const alm = bitbucketVariant || props.alm;\n\n    this.state = {\n      formData: props.bindingDefinition ?? BINDING_PER_ALM[alm].defaultBinding,\n      touched: false,\n      submitting: false,\n      bitbucketVariant\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleFieldChange = (fieldId: string, value: string) => {\n    this.setState(({ formData }) => ({\n      formData: {\n        ...formData,\n        [fieldId]: value\n      },\n      touched: true\n    }));\n  };\n\n  handleFormSubmit = async () => {\n    const { alm, enforceValidation } = this.props;\n    const { formData, bitbucketVariant, alreadySavedFormData, validationError } = this.state;\n    const apiAlm = bitbucketVariant ?? alm;\n\n    let apiMethod;\n\n    if (alreadySavedFormData && validationError) {\n      apiMethod = BINDING_PER_ALM[apiAlm].updateApi({\n        newKey: formData.key,\n        ...formData,\n        key: alreadySavedFormData.key\n      } as any);\n    } else if (this.props.bindingDefinition?.key) {\n      apiMethod = BINDING_PER_ALM[apiAlm].updateApi({\n        newKey: formData.key,\n        ...formData,\n        key: this.props.bindingDefinition.key\n      } as any);\n    } else {\n      apiMethod = BINDING_PER_ALM[apiAlm].createApi({ ...formData } as any);\n    }\n\n    this.setState({ submitting: true });\n\n    try {\n      await apiMethod;\n\n      if (!this.mounted) {\n        return;\n      }\n\n      this.setState({ alreadySavedFormData: formData });\n\n      let error: string | undefined;\n\n      if (enforceValidation) {\n        error = await validateAlmSettings(formData.key);\n      }\n\n      if (!this.mounted) {\n        return;\n      }\n\n      if (error) {\n        this.setState({ validationError: error });\n      } else {\n        this.props.afterSubmit(formData);\n      }\n    } finally {\n      if (this.mounted) {\n        this.setState({ submitting: false, touched: false });\n      }\n    }\n  };\n\n  handleOnCancel = async () => {\n    const { alreadySavedFormData } = this.state;\n\n    if (alreadySavedFormData) {\n      await deleteConfiguration(alreadySavedFormData.key);\n    }\n\n    this.props.onCancel();\n  };\n\n  handleBitbucketVariantChange = (\n    bitbucketVariant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud\n  ) => {\n    this.setState({\n      bitbucketVariant,\n      formData: { ...BINDING_PER_ALM[bitbucketVariant].defaultBinding }\n    });\n  };\n\n  canSubmit = () => {\n    const { formData, touched } = this.state;\n\n    return touched && !Object.values(formData).some(v => !v);\n  };\n\n  render() {\n    const { alm, bindingDefinition, alreadyHaveInstanceConfigured } = this.props;\n    const { formData, submitting, bitbucketVariant, validationError } = this.state;\n\n    const isUpdate = !!bindingDefinition;\n\n    return (\n      <AlmBindingDefinitionFormRenderer\n        alm={alm}\n        isUpdate={isUpdate}\n        canSubmit={this.canSubmit()}\n        alreadyHaveInstanceConfigured={alreadyHaveInstanceConfigured}\n        onCancel={this.handleOnCancel}\n        onSubmit={this.handleFormSubmit}\n        onFieldChange={this.handleFieldChange}\n        formData={formData}\n        submitting={submitting}\n        bitbucketVariant={bitbucketVariant}\n        onBitbucketVariantChange={this.handleBitbucketVariantChange}\n        validationError={validationError}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { get, getJSON, parseError, post, postJSON } from '../helpers/request';\nimport {\n  AzureProject,\n  AzureRepository,\n  BitbucketCloudRepository,\n  BitbucketProject,\n  BitbucketRepository,\n  GithubOrganization,\n  GithubRepository,\n  GitlabProject\n} from '../types/alm-integration';\nimport { ProjectBase } from './components';\n\nexport function setAlmPersonalAccessToken(\n  almSetting: string,\n  pat: string,\n  username?: string\n): Promise<void> {\n  return post('/api/alm_integrations/set_pat', { almSetting, pat, username }).catch(\n    throwGlobalError\n  );\n}\n\nexport function checkPersonalAccessTokenIsValid(\n  almSetting: string\n): Promise<{ status: boolean; error?: string }> {\n  return get('/api/alm_integrations/check_pat', { almSetting })\n    .then(() => ({ status: true }))\n    .catch(async (response: Response) => {\n      if (response.status === 400) {\n        const error = await parseError(response);\n        return { status: false, error };\n      }\n      return throwGlobalError(response);\n    });\n}\n\nexport function getAzureProjects(almSetting: string): Promise<{ projects: AzureProject[] }> {\n  return getJSON('/api/alm_integrations/list_azure_projects', { almSetting }).catch(\n    throwGlobalError\n  );\n}\n\nexport function getAzureRepositories(\n  almSetting: string,\n  projectName: string\n): Promise<{ repositories: AzureRepository[] }> {\n  return getJSON('/api/alm_integrations/search_azure_repos', { almSetting, projectName }).catch(\n    throwGlobalError\n  );\n}\n\nexport function searchAzureRepositories(\n  almSetting: string,\n  searchQuery: string\n): Promise<{ repositories: AzureRepository[] }> {\n  return getJSON('/api/alm_integrations/search_azure_repos', { almSetting, searchQuery }).catch(\n    throwGlobalError\n  );\n}\n\nexport function importAzureRepository(\n  almSetting: string,\n  projectName: string,\n  repositoryName: string\n): Promise<{ project: ProjectBase }> {\n  return postJSON('/api/alm_integrations/import_azure_project', {\n    almSetting,\n    projectName,\n    repositoryName\n  }).catch(throwGlobalError);\n}\n\nexport function getBitbucketServerProjects(\n  almSetting: string\n): Promise<{ projects: BitbucketProject[] }> {\n  return getJSON('/api/alm_integrations/list_bitbucketserver_projects', { almSetting });\n}\n\nexport function getBitbucketServerRepositories(\n  almSetting: string,\n  projectName: string\n): Promise<{\n  isLastPage: boolean;\n  repositories: BitbucketRepository[];\n}> {\n  return getJSON('/api/alm_integrations/search_bitbucketserver_repos', {\n    almSetting,\n    projectName\n  });\n}\n\nexport function importBitbucketServerProject(\n  almSetting: string,\n  projectKey: string,\n  repositorySlug: string\n): Promise<{ project: ProjectBase }> {\n  return postJSON('/api/alm_integrations/import_bitbucketserver_project', {\n    almSetting,\n    projectKey,\n    repositorySlug\n  }).catch(throwGlobalError);\n}\n\nexport function searchForBitbucketServerRepositories(\n  almSetting: string,\n  repositoryName: string\n): Promise<{\n  isLastPage: boolean;\n  repositories: BitbucketRepository[];\n}> {\n  return getJSON('/api/alm_integrations/search_bitbucketserver_repos', {\n    almSetting,\n    repositoryName\n  });\n}\n\nexport function searchForBitbucketCloudRepositories(\n  almSetting: string,\n  repositoryName: string,\n  pageSize: number,\n  page?: number\n): Promise<{\n  isLastPage: boolean;\n  repositories: BitbucketCloudRepository[];\n}> {\n  return getJSON('/api/alm_integrations/search_bitbucketcloud_repos', {\n    almSetting,\n    repositoryName,\n    p: page,\n    ps: pageSize\n  });\n}\n\nexport function getGithubClientId(almSetting: string): Promise<{ clientId?: string }> {\n  return getJSON('/api/alm_integrations/get_github_client_id', { almSetting });\n}\n\nexport function importBitbucketCloudRepository(\n  almSetting: string,\n  repositorySlug: string\n): Promise<{ project: ProjectBase }> {\n  return postJSON('/api/alm_integrations/import_bitbucketcloud_repo', {\n    almSetting,\n    repositorySlug\n  }).catch(throwGlobalError);\n}\n\nexport function importGithubRepository(\n  almSetting: string,\n  organization: string,\n  repositoryKey: string\n): Promise<{ project: ProjectBase }> {\n  return postJSON('/api/alm_integrations/import_github_project', {\n    almSetting,\n    organization,\n    repositoryKey\n  }).catch(throwGlobalError);\n}\n\nexport function getGithubOrganizations(\n  almSetting: string,\n  token: string\n): Promise<{ organizations: GithubOrganization[] }> {\n  return getJSON('/api/alm_integrations/list_github_organizations', {\n    almSetting,\n    token\n  }).catch((response?: Response) => {\n    if (response && response.status !== 400) {\n      throwGlobalError(response);\n    }\n  });\n}\n\nexport function getGithubRepositories(data: {\n  almSetting: string;\n  organization: string;\n  pageSize: number;\n  page?: number;\n  query?: string;\n}): Promise<{ repositories: GithubRepository[]; paging: T.Paging }> {\n  const { almSetting, organization, pageSize, page = 1, query } = data;\n  return getJSON('/api/alm_integrations/list_github_repositories', {\n    almSetting,\n    organization,\n    p: page,\n    ps: pageSize,\n    q: query || undefined\n  }).catch(throwGlobalError);\n}\n\nexport function getGitlabProjects(data: {\n  almSetting: string;\n  page?: number;\n  pageSize?: number;\n  query?: string;\n}): Promise<{ projects: GitlabProject[]; projectsPaging: T.Paging }> {\n  const { almSetting, pageSize, page, query } = data;\n  return getJSON('/api/alm_integrations/search_gitlab_repos', {\n    almSetting,\n    projectName: query || undefined,\n    p: page,\n    ps: pageSize\n  })\n    .then(({ repositories, paging }) => ({ projects: repositories, projectsPaging: paging }))\n    .catch(throwGlobalError);\n}\n\nexport function importGitlabProject(data: {\n  almSetting: string;\n  gitlabProjectId: string;\n}): Promise<{ project: ProjectBase }> {\n  const { almSetting, gitlabProjectId } = data;\n  return postJSON('/api/alm_integrations/import_gitlab_project', {\n    almSetting,\n    gitlabProjectId\n  }).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { SubmitButton } from '../../../components/controls/buttons';\nimport ValidationInput from '../../../components/controls/ValidationInput';\nimport DetachIcon from '../../../components/icons/DetachIcon';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { AlmSettingsInstance } from '../../../types/alm-settings';\n\nexport interface AzurePersonalAccessTokenFormProps {\n  almSetting: AlmSettingsInstance;\n  onPersonalAccessTokenCreate: (token: string) => void;\n  submitting?: boolean;\n  validationFailed: boolean;\n}\n\nfunction getAzurePatUrl(url: string) {\n  return `${url.replace(/\\/$/, '')}/_usersSettings/tokens`;\n}\n\nexport default function AzurePersonalAccessTokenForm(props: AzurePersonalAccessTokenFormProps) {\n  const {\n    almSetting: { alm, url },\n    submitting = false,\n    validationFailed\n  } = props;\n\n  const [touched, setTouched] = React.useState(false);\n  React.useEffect(() => {\n    setTouched(false);\n  }, [submitting]);\n\n  const [token, setToken] = React.useState('');\n\n  const isInvalid = (validationFailed && !touched) || (touched && !token);\n\n  let errorMessage;\n  if (!token) {\n    errorMessage = translate('onboarding.create_project.pat_form.pat_required');\n  } else if (isInvalid) {\n    errorMessage = translate('onboarding.create_project.pat_incorrect', alm);\n  }\n\n  return (\n    <div className=\"boxed-group abs-width-600\">\n      <div className=\"boxed-group-inner\">\n        <h2>{translate('onboarding.create_project.pat_form.title', alm)}</h2>\n\n        <div className=\"big-spacer-top big-spacer-bottom\">\n          <FormattedMessage\n            id=\"onboarding.create_project.pat_help.instructions\"\n            defaultMessage={translate('onboarding.create_project.pat_help.instructions', alm)}\n            values={{\n              link: url ? (\n                <a\n                  className=\"link-with-icon\"\n                  href={getAzurePatUrl(url)}\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  <DetachIcon className=\"little-spacer-right\" />\n                  <span>\n                    {translate('onboarding.create_project.pat_help.instructions.link', alm)}\n                  </span>\n                </a>\n              ) : (\n                translate('onboarding.create_project.pat_help.instructions.link', alm)\n              ),\n              scope: (\n                <strong>\n                  <em>Code (Read & Write)</em>\n                </strong>\n              )\n            }}\n          />\n        </div>\n\n        <form\n          onSubmit={(e: React.SyntheticEvent<HTMLFormElement>) => {\n            e.preventDefault();\n            props.onPersonalAccessTokenCreate(token);\n          }}>\n          <ValidationInput\n            error={errorMessage}\n            id=\"personal_access_token\"\n            isInvalid={isInvalid}\n            isValid={false}\n            label={translate('onboarding.create_project.enter_pat')}\n            required={true}>\n            <input\n              autoFocus={true}\n              className={classNames('width-100 little-spacer-bottom', {\n                'is-invalid': isInvalid\n              })}\n              id=\"personal_access_token\"\n              minLength={1}\n              name=\"personal_access_token\"\n              onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n                setToken(e.target.value);\n                setTouched(true);\n              }}\n              type=\"text\"\n              value={token}\n            />\n          </ValidationInput>\n\n          <SubmitButton disabled={isInvalid || submitting || !touched}>\n            {translate('onboarding.create_project.pat_form.list_repositories')}\n          </SubmitButton>\n          <DeferredSpinner className=\"spacer-left\" loading={submitting} />\n        </form>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum CreateProjectModes {\n  Manual = 'manual',\n  AzureDevOps = 'azure',\n  BitbucketServer = 'bitbucket',\n  BitbucketCloud = 'bitbucketcloud',\n  GitHub = 'github',\n  GitLab = 'gitlab'\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { colors } from '../../../app/theme';\nimport BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport Radio from '../../../components/controls/Radio';\nimport CheckIcon from '../../../components/icons/CheckIcon';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { AzureProject, AzureRepository } from '../../../types/alm-integration';\nimport { CreateProjectModes } from './types';\n\nexport interface AzureProjectAccordionProps {\n  importing: boolean;\n  loading: boolean;\n  onOpen: (key: string) => void;\n  onSelectRepository: (repository: AzureRepository) => void;\n  project: AzureProject;\n  repositories?: AzureRepository[];\n  searchQuery?: string;\n  selectedRepository?: AzureRepository;\n  startsOpen: boolean;\n}\n\nconst PAGE_SIZE = 30;\n\nfunction highlight(text: string, term?: string, underline = false) {\n  if (!term || !text.toLowerCase().includes(term.toLowerCase())) {\n    return text;\n  }\n\n  // Capture only the first occurence by using a capturing group to get\n  // everything after the first occurence\n  const [pre, found, post] = text.split(new RegExp(`(${term})(.*)`, 'i'));\n  return (\n    <>\n      {pre}\n      <strong className={classNames({ underline })}>{found}</strong>\n      {post}\n    </>\n  );\n}\n\nexport default function AzureProjectAccordion(props: AzureProjectAccordionProps) {\n  const {\n    importing,\n    loading,\n    startsOpen,\n    project,\n    repositories = [],\n    searchQuery,\n    selectedRepository\n  } = props;\n\n  const [open, setOpen] = React.useState(startsOpen);\n  const handleClick = () => {\n    if (!open) {\n      props.onOpen(project.name);\n    }\n    setOpen(!open);\n  };\n\n  const [page, setPage] = React.useState(1);\n  const limitedRepositories = repositories.slice(0, page * PAGE_SIZE);\n\n  const isSelected = (repo: AzureRepository) =>\n    selectedRepository?.projectName === project.name && selectedRepository.name === repo.name;\n\n  return (\n    <BoxedGroupAccordion\n      className={classNames('big-spacer-bottom', {\n        open\n      })}\n      onClick={handleClick}\n      open={open}\n      title={<h3 title={project.description}>{highlight(project.name, searchQuery, true)}</h3>}>\n      {open && (\n        <DeferredSpinner loading={loading}>\n          {/* The extra loading guard is to prevent the flash of the Alert */}\n          {!loading && repositories.length === 0 ? (\n            <Alert variant=\"warning\">\n              <FormattedMessage\n                defaultMessage={translate('onboarding.create_project.azure.no_repositories')}\n                id=\"onboarding.create_project.azure.no_repositories\"\n                values={{\n                  link: (\n                    <Link\n                      to={{\n                        pathname: '/projects/create',\n                        query: { mode: CreateProjectModes.AzureDevOps, resetPat: 1 }\n                      }}>\n                      {translate('onboarding.create_project.update_your_token')}\n                    </Link>\n                  )\n                }}\n              />\n            </Alert>\n          ) : (\n            <>\n              <div className=\"display-flex-wrap\">\n                {limitedRepositories.map(repo => (\n                  <div\n                    className=\"create-project-azdo-repo display-flex-start spacer-bottom padded-right\"\n                    key={repo.name}>\n                    {repo.sqProjectKey ? (\n                      <>\n                        <CheckIcon className=\"spacer-right\" fill={colors.green} size={14} />\n                        <div className=\"overflow-hidden\">\n                          <div className=\"little-spacer-bottom text-ellipsis\">\n                            <Link to={getProjectUrl(repo.sqProjectKey)} title={repo.sqProjectName}>\n                              {highlight(repo.sqProjectName || repo.name, searchQuery)}\n                            </Link>\n                          </div>\n                          <em>{translate('onboarding.create_project.repository_imported')}</em>\n                        </div>\n                      </>\n                    ) : (\n                      <Radio\n                        checked={isSelected(repo)}\n                        className=\"overflow-hidden\"\n                        disabled={importing}\n                        onCheck={() => props.onSelectRepository(repo)}\n                        value={repo.name}>\n                        <span className=\"text-ellipsis\" title={repo.name}>\n                          {highlight(repo.name, searchQuery)}\n                        </span>\n                      </Radio>\n                    )}\n                  </div>\n                ))}\n              </div>\n              <ListFooter\n                count={limitedRepositories.length}\n                total={repositories.length}\n                loadMore={() => setPage(p => p + 1)}\n              />\n            </>\n          )}\n        </DeferredSpinner>\n      )}\n    </BoxedGroupAccordion>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { AzureProject, AzureRepository } from '../../../types/alm-integration';\nimport AzureProjectAccordion from './AzureProjectAccordion';\nimport { CreateProjectModes } from './types';\n\nexport interface AzureProjectsListProps {\n  importing: boolean;\n  loadingRepositories: T.Dict<boolean>;\n  onOpenProject: (key: string) => void;\n  onSelectRepository: (repository: AzureRepository) => void;\n  projects?: AzureProject[];\n  repositories: T.Dict<AzureRepository[]>;\n  searchResults?: T.Dict<AzureRepository[]>;\n  searchQuery?: string;\n  selectedRepository?: AzureRepository;\n}\n\nconst PAGE_SIZE = 10;\n\nexport default function AzureProjectsList(props: AzureProjectsListProps) {\n  const {\n    importing,\n    loadingRepositories,\n    projects = [],\n    repositories,\n    searchResults,\n    searchQuery,\n    selectedRepository\n  } = props;\n\n  const [page, setPage] = React.useState(1);\n\n  const filteredProjects = searchResults\n    ? projects.filter(p => searchResults[p.name] !== undefined)\n    : projects;\n\n  if (filteredProjects.length === 0) {\n    return (\n      <Alert className=\"spacer-top\" variant=\"warning\">\n        {searchResults ? (\n          translate('onboarding.create_project.azure.no_results')\n        ) : (\n          <FormattedMessage\n            defaultMessage={translate('onboarding.create_project.azure.no_projects')}\n            id=\"onboarding.create_project.azure.no_projects\"\n            values={{\n              link: (\n                <Link\n                  to={{\n                    pathname: '/projects/create',\n                    query: { mode: CreateProjectModes.AzureDevOps, resetPat: 1 }\n                  }}>\n                  {translate('onboarding.create_project.update_your_token')}\n                </Link>\n              )\n            }}\n          />\n        )}\n      </Alert>\n    );\n  }\n\n  const displayedProjects = filteredProjects.slice(0, page * PAGE_SIZE);\n\n  // Add a suffix to the key to force react to not reuse AzureProjectAccordions between\n  // search results and project exploration\n  const keySuffix = searchResults ? ' - result' : '';\n\n  return (\n    <div>\n      {displayedProjects.map((p, i) => (\n        <AzureProjectAccordion\n          key={`${p.name}${keySuffix}`}\n          importing={importing}\n          loading={Boolean(loadingRepositories[p.name])}\n          onOpen={props.onOpenProject}\n          onSelectRepository={props.onSelectRepository}\n          project={p}\n          repositories={searchResults ? searchResults[p.name] : repositories[p.name]}\n          selectedRepository={selectedRepository}\n          searchQuery={searchQuery}\n          startsOpen={searchResults !== undefined || i === 0}\n        />\n      ))}\n\n      <ListFooter\n        count={displayedProjects.length}\n        loadMore={() => setPage(p => p + 1)}\n        total={filteredProjects.length}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\nexport interface CreateProjectPageHeaderProps {\n  additionalActions?: React.ReactNode;\n  title: React.ReactNode;\n}\n\nexport default function CreateProjectPageHeader(props: CreateProjectPageHeaderProps) {\n  const { additionalActions, title } = props;\n\n  return (\n    <header className=\"huge-spacer-bottom bordered-bottom overflow-hidden\">\n      <h1 className=\"pull-left huge big-spacer-bottom\">{title}</h1>\n\n      {additionalActions}\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { getGlobalSettingsUrl } from '../../../helpers/urls';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport { ALM_INTEGRATION } from '../../settings/components/AdditionalCategoryKeys';\n\nexport interface WrongBindingCountAlertProps {\n  alm: AlmKeys;\n  canAdmin: boolean;\n}\n\nexport default function WrongBindingCountAlert(props: WrongBindingCountAlertProps) {\n  const { alm, canAdmin } = props;\n\n  return (\n    <Alert variant=\"error\">\n      {canAdmin ? (\n        <FormattedMessage\n          defaultMessage={translate('onboarding.create_project.wrong_binding_count.admin')}\n          id=\"onboarding.create_project.wrong_binding_count.admin\"\n          values={{\n            alm: translate('onboarding.alm', alm),\n            url: (\n              <Link to={getGlobalSettingsUrl(ALM_INTEGRATION)}>{translate('settings.page')}</Link>\n            )\n          }}\n        />\n      ) : (\n        <FormattedMessage\n          defaultMessage={translate('onboarding.create_project.wrong_binding_count')}\n          id=\"onboarding.create_project.wrong_binding_count\"\n          values={{\n            alm: translate('onboarding.alm', alm)\n          }}\n        />\n      )}\n    </Alert>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Button } from '../../../components/controls/buttons';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { getGlobalSettingsUrl } from '../../../helpers/urls';\nimport { AzureProject, AzureRepository } from '../../../types/alm-integration';\nimport { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';\nimport { ALM_INTEGRATION } from '../../settings/components/AdditionalCategoryKeys';\nimport AzurePersonalAccessTokenForm from './AzurePersonalAccessTokenForm';\nimport AzureProjectsList from './AzureProjectsList';\nimport CreateProjectPageHeader from './CreateProjectPageHeader';\nimport WrongBindingCountAlert from './WrongBindingCountAlert';\n\nexport interface AzureProjectCreateRendererProps {\n  canAdmin?: boolean;\n  importing: boolean;\n  loading: boolean;\n  loadingRepositories: T.Dict<boolean>;\n  onImportRepository: () => void;\n  onOpenProject: (key: string) => void;\n  onPersonalAccessTokenCreate: (token: string) => void;\n  onSearch: (query: string) => void;\n  onSelectRepository: (repository: AzureRepository) => void;\n  projects?: AzureProject[];\n  repositories: T.Dict<AzureRepository[]>;\n  searching?: boolean;\n  searchResults?: T.Dict<AzureRepository[]>;\n  searchQuery?: string;\n  selectedRepository?: AzureRepository;\n  settings?: AlmSettingsInstance;\n  showPersonalAccessTokenForm?: boolean;\n  submittingToken?: boolean;\n  tokenValidationFailed: boolean;\n}\n\nexport default function AzureProjectCreateRenderer(props: AzureProjectCreateRendererProps) {\n  const {\n    canAdmin,\n    importing,\n    loading,\n    loadingRepositories,\n    projects,\n    repositories,\n    searching,\n    searchResults,\n    searchQuery,\n    selectedRepository,\n    settings,\n    showPersonalAccessTokenForm,\n    submittingToken,\n    tokenValidationFailed\n  } = props;\n\n  const settingIsValid = settings && settings.url;\n  const showCountError = !loading && !settings;\n  const showUrlError = !loading && settings && !settings.url;\n\n  return (\n    <>\n      <CreateProjectPageHeader\n        additionalActions={\n          !showPersonalAccessTokenForm &&\n          settingIsValid && (\n            <div className=\"display-flex-center pull-right\">\n              <DeferredSpinner className=\"spacer-right\" loading={importing} />\n              <Button\n                className=\"button-large button-primary\"\n                disabled={!selectedRepository || importing}\n                onClick={props.onImportRepository}>\n                {translate('onboarding.create_project.import_selected_repo')}\n              </Button>\n            </div>\n          )\n        }\n        title={\n          <span className=\"text-middle\">\n            <img\n              alt=\"\" // Should be ignored by screen readers\n              className=\"spacer-right\"\n              height=\"24\"\n              src={`${getBaseUrl()}/images/alm/azure.svg`}\n            />\n            {translate('onboarding.create_project.azure.title')}\n          </span>\n        }\n      />\n\n      {loading && <i className=\"spinner\" />}\n\n      {showUrlError && (\n        <Alert variant=\"error\">\n          {canAdmin ? (\n            <FormattedMessage\n              defaultMessage={translate('onboarding.create_project.azure.no_url.admin')}\n              id=\"onboarding.create_project.azure.no_url.admin\"\n              values={{\n                alm: translate('onboarding.alm', AlmKeys.Azure),\n                url: (\n                  <Link to={getGlobalSettingsUrl(ALM_INTEGRATION)}>\n                    {translate('settings.page')}\n                  </Link>\n                )\n              }}\n            />\n          ) : (\n            translate('onboarding.create_project.azure.no_url')\n          )}\n        </Alert>\n      )}\n\n      {showCountError && <WrongBindingCountAlert alm={AlmKeys.Azure} canAdmin={!!canAdmin} />}\n\n      {!loading &&\n        settings &&\n        settings.url &&\n        (showPersonalAccessTokenForm ? (\n          <div className=\"display-flex-justify-center\">\n            <AzurePersonalAccessTokenForm\n              almSetting={settings}\n              onPersonalAccessTokenCreate={props.onPersonalAccessTokenCreate}\n              submitting={submittingToken}\n              validationFailed={tokenValidationFailed}\n            />\n          </div>\n        ) : (\n          <>\n            <div className=\"huge-spacer-bottom\">\n              <SearchBox\n                onChange={props.onSearch}\n                placeholder={translate('onboarding.create_project.search_projects_repositories')}\n              />\n            </div>\n            <DeferredSpinner loading={Boolean(searching)}>\n              <AzureProjectsList\n                importing={importing}\n                loadingRepositories={loadingRepositories}\n                onOpenProject={props.onOpenProject}\n                onSelectRepository={props.onSelectRepository}\n                projects={projects}\n                repositories={repositories}\n                searchResults={searchResults}\n                searchQuery={searchQuery}\n                selectedRepository={selectedRepository}\n              />\n            </DeferredSpinner>\n          </>\n        ))}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy } from 'lodash';\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport {\n  checkPersonalAccessTokenIsValid,\n  getAzureProjects,\n  getAzureRepositories,\n  importAzureRepository,\n  searchAzureRepositories,\n  setAlmPersonalAccessToken\n} from '../../../api/alm-integrations';\nimport { AzureProject, AzureRepository } from '../../../types/alm-integration';\nimport { AlmSettingsInstance } from '../../../types/alm-settings';\nimport AzureCreateProjectRenderer from './AzureProjectCreateRenderer';\n\ninterface Props extends Pick<WithRouterProps, 'location' | 'router'> {\n  canAdmin: boolean;\n  loadingBindings: boolean;\n  onProjectCreate: (projectKey: string) => void;\n  settings: AlmSettingsInstance[];\n}\n\ninterface State {\n  importing: boolean;\n  loading: boolean;\n  loadingRepositories: T.Dict<boolean>;\n  patIsValid?: boolean;\n  projects?: AzureProject[];\n  repositories: T.Dict<AzureRepository[]>;\n  searching?: boolean;\n  searchResults?: T.Dict<AzureRepository[]>;\n  searchQuery?: string;\n  selectedRepository?: AzureRepository;\n  settings?: AlmSettingsInstance;\n  submittingToken?: boolean;\n  tokenValidationFailed: boolean;\n}\n\nexport default class AzureProjectCreate extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      // For now, we only handle a single instance. So we always use the first\n      // one from the list.\n      settings: props.settings[0],\n      importing: false,\n      loading: false,\n      loadingRepositories: {},\n      repositories: {},\n      tokenValidationFailed: false\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchInitialData();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.settings.length === 0 && this.props.settings.length > 0) {\n      this.setState(\n        { settings: this.props.settings.length === 1 ? this.props.settings[0] : undefined },\n        () => this.fetchInitialData()\n      );\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchInitialData = async () => {\n    this.setState({ loading: true });\n\n    const patIsValid = await this.checkPersonalAccessToken().catch(() => false);\n\n    let projects: AzureProject[] | undefined;\n    if (patIsValid) {\n      projects = await this.fetchAzureProjects();\n    }\n\n    const { repositories } = this.state;\n\n    let firstProjectName: string;\n\n    if (projects && projects.length > 0) {\n      firstProjectName = projects[0].name;\n\n      this.setState(({ loadingRepositories }) => ({\n        loadingRepositories: { ...loadingRepositories, [firstProjectName]: true }\n      }));\n\n      const repos = await this.fetchAzureRepositories(firstProjectName);\n      repositories[firstProjectName] = repos;\n    }\n\n    if (this.mounted) {\n      this.setState(({ loadingRepositories }) => {\n        if (firstProjectName) {\n          loadingRepositories[firstProjectName] = false;\n        }\n\n        return {\n          patIsValid,\n          loading: false,\n          loadingRepositories: { ...loadingRepositories },\n          projects,\n          repositories\n        };\n      });\n    }\n  };\n\n  fetchAzureProjects = (): Promise<AzureProject[] | undefined> => {\n    const { settings } = this.state;\n\n    if (!settings) {\n      return Promise.resolve(undefined);\n    }\n\n    return getAzureProjects(settings.key).then(({ projects }) => projects);\n  };\n\n  fetchAzureRepositories = (projectName: string): Promise<AzureRepository[]> => {\n    const { settings } = this.state;\n\n    if (!settings) {\n      return Promise.resolve([]);\n    }\n\n    return getAzureRepositories(settings.key, projectName)\n      .then(({ repositories }) => repositories)\n      .catch(() => []);\n  };\n\n  cleanUrl = () => {\n    const { location, router } = this.props;\n    delete location.query.resetPat;\n    router.replace(location);\n  };\n\n  handleOpenProject = async (projectKey: string) => {\n    if (this.state.searchResults) {\n      return;\n    }\n\n    this.setState(({ loadingRepositories }) => ({\n      loadingRepositories: { ...loadingRepositories, [projectKey]: true }\n    }));\n\n    const projectRepos = await this.fetchAzureRepositories(projectKey);\n\n    this.setState(({ loadingRepositories, repositories }) => ({\n      loadingRepositories: { ...loadingRepositories, [projectKey]: false },\n      repositories: { ...repositories, [projectKey]: projectRepos }\n    }));\n  };\n\n  handleSearchRepositories = async (searchQuery: string) => {\n    const { settings } = this.state;\n\n    if (!settings) {\n      return;\n    }\n\n    if (searchQuery.length === 0) {\n      this.setState({ searchResults: undefined, searchQuery: undefined });\n      return;\n    }\n\n    this.setState({ searching: true });\n\n    const results: AzureRepository[] = await searchAzureRepositories(settings.key, searchQuery)\n      .then(({ repositories }) => repositories)\n      .catch(() => []);\n\n    if (this.mounted) {\n      this.setState({\n        searching: false,\n        searchResults: groupBy(results, 'projectName'),\n        searchQuery\n      });\n    }\n  };\n\n  handleImportRepository = async () => {\n    const { selectedRepository, settings } = this.state;\n\n    if (!settings || !selectedRepository) {\n      return;\n    }\n\n    this.setState({ importing: true });\n\n    const createdProject = await importAzureRepository(\n      settings.key,\n      selectedRepository.projectName,\n      selectedRepository.name\n    )\n      .then(({ project }) => project)\n      .catch(() => undefined);\n\n    if (this.mounted) {\n      this.setState({ importing: false });\n      if (createdProject) {\n        this.props.onProjectCreate(createdProject.key);\n      }\n    }\n  };\n\n  handleSelectRepository = (selectedRepository: AzureRepository) => {\n    this.setState({ selectedRepository });\n  };\n\n  checkPersonalAccessToken = () => {\n    const { settings } = this.state;\n\n    if (!settings) {\n      return Promise.resolve(false);\n    }\n\n    return checkPersonalAccessTokenIsValid(settings.key).then(({ status }) => status);\n  };\n\n  handlePersonalAccessTokenCreate = async (token: string) => {\n    const { settings } = this.state;\n\n    if (!settings || token.length < 1) {\n      return;\n    }\n\n    this.setState({ submittingToken: true, tokenValidationFailed: false });\n\n    try {\n      await setAlmPersonalAccessToken(settings.key, token);\n      const patIsValid = await this.checkPersonalAccessToken();\n\n      if (this.mounted) {\n        this.setState({ submittingToken: false, patIsValid, tokenValidationFailed: !patIsValid });\n\n        if (patIsValid) {\n          this.cleanUrl();\n          this.fetchInitialData();\n        }\n      }\n    } catch (e) {\n      if (this.mounted) {\n        this.setState({ submittingToken: false });\n      }\n    }\n  };\n\n  render() {\n    const { canAdmin, loadingBindings, location } = this.props;\n    const {\n      importing,\n      loading,\n      loadingRepositories,\n      patIsValid,\n      projects,\n      repositories,\n      searching,\n      searchResults,\n      searchQuery,\n      selectedRepository,\n      settings,\n      submittingToken,\n      tokenValidationFailed\n    } = this.state;\n\n    return (\n      <AzureCreateProjectRenderer\n        canAdmin={canAdmin}\n        importing={importing}\n        loading={loading || loadingBindings}\n        loadingRepositories={loadingRepositories}\n        onImportRepository={this.handleImportRepository}\n        onOpenProject={this.handleOpenProject}\n        onPersonalAccessTokenCreate={this.handlePersonalAccessTokenCreate}\n        onSearch={this.handleSearchRepositories}\n        onSelectRepository={this.handleSelectRepository}\n        projects={projects}\n        repositories={repositories}\n        searching={searching}\n        searchResults={searchResults}\n        searchQuery={searchQuery}\n        selectedRepository={selectedRepository}\n        settings={settings}\n        showPersonalAccessTokenForm={!patIsValid || Boolean(location.query.resetPat)}\n        submittingToken={submittingToken}\n        tokenValidationFailed={tokenValidationFailed}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Button } from '../../../components/controls/buttons';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport CheckIcon from '../../../components/icons/CheckIcon';\nimport DetachIcon from '../../../components/icons/DetachIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { BitbucketCloudRepository } from '../../../types/alm-integration';\nimport { ComponentQualifier } from '../../../types/component';\nimport { CreateProjectModes } from './types';\n\nexport interface BitbucketCloudSearchFormProps {\n  importingSlug?: string;\n  isLastPage: boolean;\n  loadingMore: boolean;\n  onImport: (repositorySlug: string) => void;\n  onLoadMore: () => void;\n  onSearch: (searchQuery: string) => void;\n  repositories?: BitbucketCloudRepository[];\n  searching: boolean;\n  searchQuery: string;\n}\n\nfunction getRepositoryUrl(workspace: string, slug: string) {\n  return `https://bitbucket.org/${workspace}/${slug}`;\n}\n\nexport default function BitbucketCloudSearchForm(props: BitbucketCloudSearchFormProps) {\n  const {\n    importingSlug,\n    isLastPage,\n    loadingMore,\n    repositories = [],\n    searching,\n    searchQuery\n  } = props;\n\n  if (repositories.length === 0 && searchQuery.length === 0 && !searching) {\n    return (\n      <Alert className=\"spacer-top\" variant=\"warning\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.create_project.bitbucketcloud.no_projects')}\n          id=\"onboarding.create_project.bitbucketcloud.no_projects\"\n          values={{\n            link: (\n              <Link\n                to={{\n                  pathname: '/projects/create',\n                  query: { mode: CreateProjectModes.BitbucketCloud, resetPat: 1 }\n                }}>\n                {translate('onboarding.create_project.update_your_token')}\n              </Link>\n            )\n          }}\n        />\n      </Alert>\n    );\n  }\n\n  return (\n    <div className=\"boxed-group big-padded create-project-import\">\n      <SearchBox\n        className=\"spacer\"\n        loading={searching}\n        minLength={3}\n        onChange={props.onSearch}\n        placeholder={translate('onboarding.create_project.search_prompt')}\n      />\n\n      <hr />\n\n      {repositories.length === 0 ? (\n        <div className=\"padded\">{translate('no_results')}</div>\n      ) : (\n        <table className=\"data zebra zebra-hover\">\n          <tbody>\n            {repositories.map(repository => (\n              <tr key={repository.uuid}>\n                <td>\n                  <Tooltip overlay={repository.slug}>\n                    <strong className=\"project-name display-inline-block text-ellipsis\">\n                      {repository.sqProjectKey ? (\n                        <Link to={getProjectUrl(repository.sqProjectKey)}>\n                          <QualifierIcon\n                            className=\"spacer-right\"\n                            qualifier={ComponentQualifier.Project}\n                          />\n                          {repository.name}\n                        </Link>\n                      ) : (\n                        repository.name\n                      )}\n                    </strong>\n                  </Tooltip>\n                  <br />\n                  <Tooltip overlay={repository.projectKey}>\n                    <span className=\"text-muted project-path display-inline-block text-ellipsis\">\n                      {repository.projectKey}\n                    </span>\n                  </Tooltip>\n                </td>\n                <td>\n                  <a\n                    className=\"display-inline-flex-center big-spacer-right\"\n                    href={getRepositoryUrl(repository.workspace, repository.slug)}\n                    rel=\"noopener noreferrer\"\n                    target=\"_blank\">\n                    <DetachIcon className=\"little-spacer-right\" />\n                    {translate('onboarding.create_project.bitbucketcloud.link')}\n                  </a>\n                </td>\n                {repository.sqProjectKey ? (\n                  <td>\n                    <span className=\"display-flex-center display-flex-justify-end already-set-up\">\n                      <CheckIcon className=\"little-spacer-right\" size={12} />\n                      {translate('onboarding.create_project.repository_imported')}\n                    </span>\n                  </td>\n                ) : (\n                  <td className=\"text-right\">\n                    <Button\n                      disabled={Boolean(importingSlug)}\n                      onClick={() => {\n                        props.onImport(repository.slug);\n                      }}>\n                      {translate('onboarding.create_project.set_up')}\n                      {importingSlug === repository.slug && (\n                        <DeferredSpinner className=\"spacer-left\" />\n                      )}\n                    </Button>\n                  </td>\n                )}\n              </tr>\n            ))}\n          </tbody>\n        </table>\n      )}\n      <footer className=\"spacer-top note text-center\">\n        {isLastPage &&\n          translateWithParameters(\n            'x_of_y_shown',\n            formatMeasure(repositories.length, 'INT', null),\n            formatMeasure(repositories.length, 'INT', null)\n          )}\n        {!isLastPage && (\n          <Button\n            className=\"spacer-left\"\n            disabled={loadingMore}\n            data-test=\"show-more\"\n            onClick={props.onLoadMore}>\n            {translate('show_more')}\n          </Button>\n        )}\n        {loadingMore && <DeferredSpinner className=\"text-bottom spacer-left position-absolute\" />}\n      </footer>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport {\n  checkPersonalAccessTokenIsValid,\n  setAlmPersonalAccessToken\n} from '../../../api/alm-integrations';\nimport { SubmitButton } from '../../../components/controls/buttons';\nimport ValidationInput from '../../../components/controls/ValidationInput';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';\n\ninterface Props {\n  almSetting: AlmSettingsInstance;\n  resetPat: boolean;\n  onPersonalAccessTokenCreated: () => void;\n}\n\ninterface State {\n  validationFailed: boolean;\n  validationErrorMessage?: string;\n  touched: boolean;\n  password: string;\n  username?: string;\n  submitting: boolean;\n  checkingPat: boolean;\n}\n\nfunction getPatUrl(alm: AlmKeys, url = '') {\n  if (alm === AlmKeys.BitbucketServer) {\n    return `${url.replace(/\\/$/, '')}/plugins/servlet/access-tokens/add`;\n  } else if (alm === AlmKeys.BitbucketCloud) {\n    return 'https://bitbucket.org/account/settings/app-passwords/new';\n  } else if (alm === AlmKeys.GitLab) {\n    return 'https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html';\n  }\n\n  return '';\n}\n\nexport default class PersonalAccessTokenForm extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      checkingPat: false,\n      touched: false,\n      password: '',\n      submitting: false,\n      validationFailed: false\n    };\n  }\n\n  async componentDidMount() {\n    const {\n      almSetting: { key },\n      resetPat\n    } = this.props;\n    this.mounted = true;\n\n    // We don't need to check PAT if we want to reset\n    if (!resetPat) {\n      this.setState({ checkingPat: true });\n      const { patIsValid, error } = await checkPersonalAccessTokenIsValid(key)\n        .then(({ status, error }) => ({ patIsValid: status, error }))\n        .catch(() => ({ patIsValid: status, error: translate('default_error_message') }));\n      if (patIsValid) {\n        this.props.onPersonalAccessTokenCreated();\n      }\n      if (this.mounted) {\n        // This is the initial message when no token was provided\n        if (error === `personal access token for '${key}' is missing`) {\n          this.setState({\n            checkingPat: false\n          });\n        } else {\n          this.setState({\n            checkingPat: false,\n            validationFailed: true,\n            validationErrorMessage: error\n          });\n        }\n      }\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleUsernameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({\n      touched: true,\n      username: event.target.value\n    });\n  };\n\n  handlePasswordChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({\n      touched: true,\n      password: event.target.value\n    });\n  };\n\n  handleSubmit = async (e: React.SyntheticEvent<HTMLFormElement>) => {\n    const { password, username } = this.state;\n    const {\n      almSetting: { key }\n    } = this.props;\n\n    e.preventDefault();\n    if (password) {\n      this.setState({ submitting: true });\n\n      await setAlmPersonalAccessToken(key, password, username).catch(() => {\n        /* Set will not check pat validity. We need to check again so we will catch issue after */\n      });\n\n      const { status, error } = await checkPersonalAccessTokenIsValid(key)\n        .then(({ status, error }) => ({ status, error }))\n        .catch(() => ({ status: false, error: translate('default_error_message') }));\n\n      if (this.mounted && status) {\n        // Let's reset status,\n        this.setState({\n          checkingPat: false,\n          touched: false,\n          password: '',\n          submitting: false,\n          username: '',\n          validationFailed: false\n        });\n        this.props.onPersonalAccessTokenCreated();\n      } else if (this.mounted) {\n        this.setState({\n          submitting: false,\n          touched: false,\n          validationFailed: true,\n          validationErrorMessage: error\n        });\n      }\n    }\n  };\n\n  render() {\n    const {\n      almSetting: { alm, url }\n    } = this.props;\n    const {\n      checkingPat,\n      submitting,\n      touched,\n      password,\n      username,\n      validationFailed,\n      validationErrorMessage\n    } = this.state;\n\n    if (checkingPat) {\n      return <DeferredSpinner className=\"spacer-left\" loading={true} />;\n    }\n\n    const suffixTranslationKey = alm === AlmKeys.BitbucketCloud ? '.bitbucketcloud' : '';\n\n    const isInvalid = validationFailed && !touched;\n    const canSubmit = Boolean(password) && (alm !== AlmKeys.BitbucketCloud || Boolean(username));\n    const submitButtonDiabled = isInvalid || submitting || !canSubmit;\n\n    const errorMessage =\n      validationErrorMessage ?? translate('onboarding.create_project.pat_incorrect', alm);\n\n    return (\n      <div className=\"display-flex-start\">\n        <form className=\"width-50\" onSubmit={this.handleSubmit}>\n          <h2 className=\"big\">{translate('onboarding.create_project.pat_form.title', alm)}</h2>\n          <p className=\"big-spacer-top big-spacer-bottom\">\n            {translate('onboarding.create_project.pat_form.help', alm)}\n          </p>\n\n          {alm === AlmKeys.BitbucketCloud && (\n            <ValidationInput\n              error={undefined}\n              id=\"enter_username_validation\"\n              isInvalid={false}\n              isValid={false}\n              label={translate('onboarding.create_project.enter_username')}\n              required={true}>\n              <input\n                autoFocus={true}\n                className={classNames('input-super-large', {\n                  'is-invalid': isInvalid\n                })}\n                id=\"username\"\n                minLength={1}\n                name=\"username\"\n                value={username}\n                onChange={this.handleUsernameChange}\n                type=\"text\"\n              />\n            </ValidationInput>\n          )}\n\n          <ValidationInput\n            error={errorMessage}\n            id=\"personal_access_token_validation\"\n            isInvalid={false}\n            isValid={false}\n            label={translate(`onboarding.create_project.enter_pat${suffixTranslationKey}`)}\n            required={true}>\n            <input\n              autoFocus={alm !== AlmKeys.BitbucketCloud}\n              className={classNames('input-super-large', {\n                'is-invalid': isInvalid\n              })}\n              id=\"personal_access_token\"\n              minLength={1}\n              value={password}\n              onChange={this.handlePasswordChange}\n              type=\"text\"\n            />\n          </ValidationInput>\n\n          <ValidationInput\n            error={errorMessage}\n            id=\"personal_access_token_submit\"\n            isInvalid={isInvalid}\n            isValid={false}\n            label={null}>\n            <SubmitButton disabled={submitButtonDiabled}>{translate('save')}</SubmitButton>\n            <DeferredSpinner className=\"spacer-left\" loading={submitting} />\n          </ValidationInput>\n        </form>\n\n        <Alert className=\"big-spacer-left width-50\" display=\"block\" variant=\"info\">\n          {alm === AlmKeys.BitbucketCloud && (\n            <>\n              <h3>\n                {translate(\n                  'onboarding.create_project.pat_help.instructions_username.bitbucketcloud.title'\n                )}\n              </h3>\n              <p className=\"big-spacer-top big-spacer-bottom\">\n                {translate(\n                  'onboarding.create_project.pat_help.instructions_username.bitbucketcloud'\n                )}\n              </p>\n\n              <div className=\"text-middle big-spacer-bottom\">\n                <img\n                  alt=\"\" // Should be ignored by screen readers\n                  className=\"spacer-right\"\n                  height=\"16\"\n                  src={`${getBaseUrl()}/images/alm/${AlmKeys.BitbucketServer}.svg`}\n                />\n                <a\n                  href=\"https://bitbucket.org/account/settings/\"\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  {translate(\n                    'onboarding.create_project.pat_help.instructions_username.bitbucketcloud.link'\n                  )}\n                </a>\n              </div>\n            </>\n          )}\n\n          <h3>{translate(`onboarding.create_project.pat_help${suffixTranslationKey}.title`)}</h3>\n\n          <p className=\"big-spacer-top big-spacer-bottom\">\n            <FormattedMessage\n              id=\"onboarding.create_project.pat_help.instructions\"\n              defaultMessage={translate(\n                `onboarding.create_project.pat_help${suffixTranslationKey}.instructions`\n              )}\n              values={{ alm: translate('onboarding.alm', alm) }}\n            />\n          </p>\n\n          {(url || alm === AlmKeys.BitbucketCloud) && (\n            <div className=\"text-middle\">\n              <img\n                alt=\"\" // Should be ignored by screen readers\n                className=\"spacer-right\"\n                height=\"16\"\n                src={`${getBaseUrl()}/images/alm/${\n                  alm === AlmKeys.BitbucketCloud ? AlmKeys.BitbucketServer : alm\n                }.svg`}\n              />\n              <a href={getPatUrl(alm, url)} rel=\"noopener noreferrer\" target=\"_blank\">\n                {translate(`onboarding.create_project.pat_help${suffixTranslationKey}.link`)}\n              </a>\n            </div>\n          )}\n\n          <p className=\"big-spacer-top big-spacer-bottom\">\n            {translate('onboarding.create_project.pat_help.instructions2', alm)}\n          </p>\n\n          <ul>\n            {alm === AlmKeys.BitbucketServer && (\n              <li>\n                <FormattedMessage\n                  defaultMessage={translate(\n                    'onboarding.create_project.pat_help.bbs_permission_projects'\n                  )}\n                  id=\"onboarding.create_project.pat_help.bbs_permission_projects\"\n                  values={{\n                    perm: (\n                      <strong>\n                        {translate('onboarding.create_project.pat_help.read_permission')}\n                      </strong>\n                    )\n                  }}\n                />\n              </li>\n            )}\n            {(alm === AlmKeys.BitbucketServer || alm === AlmKeys.BitbucketCloud) && (\n              <li>\n                <FormattedMessage\n                  defaultMessage={translate(\n                    'onboarding.create_project.pat_help.bbs_permission_repos'\n                  )}\n                  id=\"onboarding.create_project.pat_help.bbs_permission_repos\"\n                  values={{\n                    perm: (\n                      <strong>\n                        {translate('onboarding.create_project.pat_help.read_permission')}\n                      </strong>\n                    )\n                  }}\n                />\n              </li>\n            )}\n\n            {alm === AlmKeys.GitLab && (\n              <li className=\"spacer-bottom\">\n                <strong>\n                  {translate('onboarding.create_project.pat_help.gitlab.read_api_permission')}\n                </strong>\n              </li>\n            )}\n          </ul>\n        </Alert>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { BitbucketCloudRepository } from '../../../types/alm-integration';\nimport { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';\nimport BitbucketCloudSearchForm from './BitbucketCloudSearchForm';\nimport CreateProjectPageHeader from './CreateProjectPageHeader';\nimport PersonalAccessTokenForm from './PersonalAccessTokenForm';\nimport WrongBindingCountAlert from './WrongBindingCountAlert';\n\nexport interface BitbucketCloudProjectCreateRendererProps {\n  importingSlug?: string;\n  isLastPage: boolean;\n  canAdmin?: boolean;\n  loading: boolean;\n  loadingMore: boolean;\n  onImport: (repositorySlug: string) => void;\n  onLoadMore: () => void;\n  onPersonalAccessTokenCreated: () => void;\n  onSearch: (searchQuery: string) => void;\n  repositories?: BitbucketCloudRepository[];\n  resetPat: boolean;\n  searching: boolean;\n  searchQuery: string;\n  showPersonalAccessTokenForm: boolean;\n  settings?: AlmSettingsInstance;\n}\n\nexport default function BitbucketCloudProjectCreateRenderer(\n  props: BitbucketCloudProjectCreateRendererProps\n) {\n  const {\n    importingSlug,\n    isLastPage,\n    settings,\n    canAdmin,\n    loading,\n    loadingMore,\n    repositories,\n    resetPat,\n    searching,\n    searchQuery,\n    showPersonalAccessTokenForm\n  } = props;\n\n  return (\n    <>\n      <CreateProjectPageHeader\n        title={\n          <span className=\"text-middle\">\n            <img\n              alt=\"\" // Should be ignored by screen readers\n              className=\"spacer-right\"\n              height=\"24\"\n              src={`${getBaseUrl()}/images/alm/bitbucket.svg`}\n            />\n            {translate('onboarding.create_project.bitbucketcloud.title')}\n          </span>\n        }\n      />\n      {loading && <i className=\"spinner\" />}\n\n      {!loading && !settings && (\n        <WrongBindingCountAlert alm={AlmKeys.BitbucketCloud} canAdmin={!!canAdmin} />\n      )}\n\n      {!loading &&\n        settings &&\n        (showPersonalAccessTokenForm ? (\n          <PersonalAccessTokenForm\n            almSetting={settings}\n            resetPat={resetPat}\n            onPersonalAccessTokenCreated={props.onPersonalAccessTokenCreated}\n          />\n        ) : (\n          <BitbucketCloudSearchForm\n            importingSlug={importingSlug}\n            isLastPage={isLastPage}\n            loadingMore={loadingMore}\n            searchQuery={searchQuery}\n            searching={searching}\n            onImport={props.onImport}\n            onSearch={props.onSearch}\n            onLoadMore={props.onLoadMore}\n            repositories={repositories}\n          />\n        ))}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport {\n  importBitbucketCloudRepository,\n  searchForBitbucketCloudRepositories\n} from '../../../api/alm-integrations';\nimport { BitbucketCloudRepository } from '../../../types/alm-integration';\nimport { AlmSettingsInstance } from '../../../types/alm-settings';\nimport BitbucketCloudProjectCreateRenderer from './BitbucketCloudProjectCreateRender';\n\ninterface Props extends Pick<WithRouterProps, 'location' | 'router'> {\n  canAdmin: boolean;\n  settings: AlmSettingsInstance[];\n  loadingBindings: boolean;\n  onProjectCreate: (projectKey: string) => void;\n}\n\ninterface State {\n  importingSlug?: string;\n  isLastPage?: boolean;\n  loading: boolean;\n  loadingMore: boolean;\n  projectsPaging: Omit<T.Paging, 'total'>;\n  resetPat: boolean;\n  repositories: BitbucketCloudRepository[];\n  searching: boolean;\n  searchQuery: string;\n  settings: AlmSettingsInstance;\n  showPersonalAccessTokenForm: boolean;\n}\n\nexport const BITBUCKET_CLOUD_PROJECTS_PAGESIZE = 30;\nexport default class BitbucketCloudProjectCreate extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      // For now, we only handle a single instance. So we always use the first\n      // one from the list.\n      loading: false,\n      loadingMore: false,\n      resetPat: false,\n      projectsPaging: { pageIndex: 1, pageSize: BITBUCKET_CLOUD_PROJECTS_PAGESIZE },\n      repositories: [],\n      searching: false,\n      searchQuery: '',\n      settings: props.settings[0],\n      showPersonalAccessTokenForm: true\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.settings.length === 0 && this.props.settings.length > 0) {\n      this.setState({ settings: this.props.settings[0] }, () => this.fetchData());\n    }\n  }\n\n  handlePersonalAccessTokenCreated = async () => {\n    this.setState({ showPersonalAccessTokenForm: false });\n    this.cleanUrl();\n    this.setState({ loading: true });\n    await this.fetchData();\n    this.setState({ loading: false });\n  };\n\n  cleanUrl = () => {\n    const { location, router } = this.props;\n    delete location.query.resetPat;\n    router.replace(location);\n  };\n\n  async fetchData(more = false) {\n    const {\n      settings,\n      searchQuery,\n      projectsPaging: { pageIndex, pageSize },\n      showPersonalAccessTokenForm\n    } = this.state;\n    if (settings && !showPersonalAccessTokenForm) {\n      const { isLastPage, repositories } = await searchForBitbucketCloudRepositories(\n        settings.key,\n        searchQuery,\n        pageSize,\n        pageIndex\n      ).catch(() => {\n        this.handleError();\n        return { isLastPage: undefined, repositories: undefined };\n      });\n      if (this.mounted && isLastPage !== undefined && repositories !== undefined) {\n        if (more) {\n          this.setState(state => ({\n            isLastPage,\n            repositories: [...state.repositories, ...repositories]\n          }));\n        } else {\n          this.setState({ isLastPage, repositories });\n        }\n      }\n    }\n  }\n\n  handleError = () => {\n    if (this.mounted) {\n      this.setState({\n        projectsPaging: { pageIndex: 1, pageSize: BITBUCKET_CLOUD_PROJECTS_PAGESIZE },\n        repositories: [],\n        resetPat: true,\n        showPersonalAccessTokenForm: true\n      });\n    }\n\n    return undefined;\n  };\n\n  handleSearch = (searchQuery: string) => {\n    this.setState(\n      {\n        searching: true,\n        projectsPaging: { pageIndex: 1, pageSize: BITBUCKET_CLOUD_PROJECTS_PAGESIZE },\n        searchQuery\n      },\n      async () => {\n        await this.fetchData();\n        if (this.mounted) {\n          this.setState({ searching: false });\n        }\n      }\n    );\n  };\n\n  handleLoadMore = () => {\n    this.setState(\n      state => ({\n        loadingMore: true,\n        projectsPaging: {\n          pageIndex: state.projectsPaging.pageIndex + 1,\n          pageSize: state.projectsPaging.pageSize\n        }\n      }),\n      async () => {\n        await this.fetchData(true);\n        if (this.mounted) {\n          this.setState({ loadingMore: false });\n        }\n      }\n    );\n  };\n\n  handleImport = async (repositorySlug: string) => {\n    const { settings } = this.state;\n\n    if (!settings) {\n      return;\n    }\n\n    this.setState({ importingSlug: repositorySlug });\n\n    const result = await importBitbucketCloudRepository(settings.key, repositorySlug).catch(\n      () => undefined\n    );\n\n    if (this.mounted) {\n      this.setState({ importingSlug: undefined });\n\n      if (result) {\n        this.props.onProjectCreate(result.project.key);\n      }\n    }\n  };\n\n  render() {\n    const { canAdmin, loadingBindings, location } = this.props;\n    const {\n      importingSlug,\n      isLastPage = true,\n      settings,\n      loading,\n      loadingMore,\n      repositories,\n      showPersonalAccessTokenForm,\n      resetPat,\n      searching,\n      searchQuery\n    } = this.state;\n    return (\n      <BitbucketCloudProjectCreateRenderer\n        importingSlug={importingSlug}\n        isLastPage={isLastPage}\n        settings={settings}\n        canAdmin={canAdmin}\n        loadingMore={loadingMore}\n        loading={loading || loadingBindings}\n        onImport={this.handleImport}\n        onLoadMore={this.handleLoadMore}\n        onPersonalAccessTokenCreated={this.handlePersonalAccessTokenCreated}\n        onSearch={this.handleSearch}\n        repositories={repositories}\n        searching={searching}\n        searchQuery={searchQuery}\n        resetPat={resetPat || Boolean(location.query.resetPat)}\n        showPersonalAccessTokenForm={\n          showPersonalAccessTokenForm || Boolean(location.query.resetPat)\n        }\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { colors } from '../../../app/theme';\nimport BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion';\nimport Radio from '../../../components/controls/Radio';\nimport CheckIcon from '../../../components/icons/CheckIcon';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { BitbucketProject, BitbucketRepository } from '../../../types/alm-integration';\nimport { CreateProjectModes } from './types';\n\nexport interface BitbucketProjectAccordionProps {\n  disableRepositories: boolean;\n  onClick?: () => void;\n  onSelectRepository: (repo: BitbucketRepository) => void;\n  open: boolean;\n  project?: BitbucketProject;\n  repositories: BitbucketRepository[];\n  selectedRepository?: BitbucketRepository;\n  showingAllRepositories: boolean;\n}\n\nexport default function BitbucketProjectAccordion(props: BitbucketProjectAccordionProps) {\n  const {\n    disableRepositories,\n    open,\n    project,\n    repositories,\n    selectedRepository,\n    showingAllRepositories\n  } = props;\n\n  const repositoryCount = repositories.length;\n\n  const title = project?.name ?? translate('search_results');\n\n  return (\n    <BoxedGroupAccordion\n      className={classNames('big-spacer-bottom', {\n        open,\n        'not-clickable': !props.onClick,\n        'no-hover': !props.onClick\n      })}\n      onClick={\n        props.onClick\n          ? props.onClick\n          : () => {\n              /* noop */\n            }\n      }\n      open={open}\n      title={<h3>{title}</h3>}>\n      {open && (\n        <>\n          <div className=\"display-flex-wrap\">\n            {repositoryCount === 0 && (\n              <Alert variant=\"warning\">\n                <FormattedMessage\n                  defaultMessage={translate('onboarding.create_project.no_bbs_repos')}\n                  id=\"onboarding.create_project.no_bbs_repos\"\n                  values={{\n                    link: (\n                      <Link\n                        to={{\n                          pathname: '/projects/create',\n                          query: { mode: CreateProjectModes.BitbucketServer, resetPat: 1 }\n                        }}>\n                        {translate('onboarding.create_project.update_your_token')}\n                      </Link>\n                    )\n                  }}\n                />\n              </Alert>\n            )}\n\n            {repositories.map(repo =>\n              repo.sqProjectKey ? (\n                <div\n                  className=\"display-flex-start spacer-right spacer-bottom create-project-import-bbs-repo\"\n                  key={repo.id}>\n                  <CheckIcon className=\"spacer-right\" fill={colors.green} size={14} />\n                  <div className=\"overflow-hidden\">\n                    <div className=\"little-spacer-bottom text-ellipsis\">\n                      <strong title={repo.name}>\n                        <Link to={getProjectUrl(repo.sqProjectKey)}>{repo.name}</Link>\n                      </strong>\n                    </div>\n                    <em>{translate('onboarding.create_project.repository_imported')}</em>\n                  </div>\n                </div>\n              ) : (\n                <Radio\n                  checked={selectedRepository?.id === repo.id}\n                  className={classNames(\n                    'display-flex-start spacer-right spacer-bottom create-project-import-bbs-repo overflow-hidden',\n                    {\n                      disabled: disableRepositories,\n                      'text-muted': disableRepositories,\n                      'link-no-underline': disableRepositories\n                    }\n                  )}\n                  key={repo.id}\n                  onCheck={() => props.onSelectRepository(repo)}\n                  value={String(repo.id)}>\n                  <strong className=\"text-ellipsis\" title={repo.name}>\n                    {repo.name}\n                  </strong>\n                </Radio>\n              )\n            )}\n          </div>\n\n          {!showingAllRepositories && repositoryCount > 0 && (\n            <Alert variant=\"warning\">\n              {translateWithParameters(\n                'onboarding.create_project.only_showing_X_first_repos',\n                repositoryCount\n              )}\n            </Alert>\n          )}\n        </>\n      )}\n    </BoxedGroupAccordion>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniq, without } from 'lodash';\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  BitbucketProject,\n  BitbucketProjectRepositories,\n  BitbucketRepository\n} from '../../../types/alm-integration';\nimport BitbucketProjectAccordion from './BitbucketProjectAccordion';\n\nexport interface BitbucketRepositoriesProps {\n  disableRepositories: boolean;\n  onSelectRepository: (repo: BitbucketRepository) => void;\n  projects: BitbucketProject[];\n  projectRepositories: BitbucketProjectRepositories;\n  selectedRepository?: BitbucketRepository;\n}\n\nexport default function BitbucketRepositories(props: BitbucketRepositoriesProps) {\n  const { disableRepositories, projects, projectRepositories, selectedRepository } = props;\n\n  const [openProjectKeys, setOpenProjectKeys] = React.useState(\n    projects.length > 0 ? [projects[0].key] : []\n  );\n\n  const allAreExpanded = projects.length <= openProjectKeys.length;\n\n  const handleClick = (isOpen: boolean, projectKey: string) => {\n    setOpenProjectKeys(\n      isOpen ? without(openProjectKeys, projectKey) : uniq([...openProjectKeys, projectKey])\n    );\n  };\n\n  return (\n    <>\n      <div className=\"overflow-hidden spacer-bottom\">\n        <ButtonLink\n          className=\"pull-right\"\n          onClick={() => setOpenProjectKeys(allAreExpanded ? [] : projects.map(p => p.key))}>\n          {allAreExpanded ? translate('collapse_all') : translate('expand_all')}\n        </ButtonLink>\n      </div>\n\n      {projects.map(project => {\n        const isOpen = openProjectKeys.includes(project.key);\n        const { allShown, repositories = [] } = projectRepositories[project.key] || {};\n\n        return (\n          <BitbucketProjectAccordion\n            disableRepositories={disableRepositories}\n            key={project.key}\n            onClick={() => handleClick(isOpen, project.key)}\n            onSelectRepository={props.onSelectRepository}\n            open={isOpen}\n            project={project}\n            repositories={repositories}\n            selectedRepository={selectedRepository}\n            showingAllRepositories={allShown}\n          />\n        );\n      })}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { BitbucketProject, BitbucketRepository } from '../../../types/alm-integration';\nimport BitbucketProjectAccordion from './BitbucketProjectAccordion';\n\nexport interface BitbucketSearchResultsProps {\n  disableRepositories: boolean;\n  onSelectRepository: (repo: BitbucketRepository) => void;\n  projects: BitbucketProject[];\n  searching: boolean;\n  searchResults?: BitbucketRepository[];\n  selectedRepository?: BitbucketRepository;\n}\n\nexport default function BitbucketSearchResults(props: BitbucketSearchResultsProps) {\n  const {\n    disableRepositories,\n    projects,\n    searching,\n    searchResults = [],\n    selectedRepository\n  } = props;\n\n  if (searchResults.length === 0 && !searching) {\n    return (\n      <Alert className=\"big-spacer-top\" variant=\"warning\">\n        {translate('onboarding.create_project.no_bbs_repos.filter')}\n      </Alert>\n    );\n  }\n\n  const filteredProjects = projects.filter(p => searchResults.some(r => r.projectKey === p.key));\n  const filteredProjectKeys = filteredProjects.map(p => p.key);\n  const filteredSearchResults = searchResults.filter(\n    r => !filteredProjectKeys.includes(r.projectKey)\n  );\n\n  return (\n    <div className=\"big-spacer-top\">\n      <DeferredSpinner loading={searching}>\n        {filteredSearchResults.length > 0 && (\n          <BitbucketProjectAccordion\n            disableRepositories={disableRepositories}\n            onSelectRepository={props.onSelectRepository}\n            open={true}\n            repositories={filteredSearchResults}\n            selectedRepository={selectedRepository}\n            showingAllRepositories={true}\n          />\n        )}\n\n        {filteredProjects.map(project => {\n          const repositories = searchResults.filter(r => r.projectKey === project.key);\n\n          return (\n            <BitbucketProjectAccordion\n              disableRepositories={disableRepositories}\n              key={project.key}\n              onSelectRepository={props.onSelectRepository}\n              open={true}\n              project={project}\n              repositories={repositories}\n              selectedRepository={selectedRepository}\n              showingAllRepositories={true}\n            />\n          );\n        })}\n      </DeferredSpinner>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  BitbucketProject,\n  BitbucketProjectRepositories,\n  BitbucketRepository\n} from '../../../types/alm-integration';\nimport BitbucketRepositories from './BitbucketRepositories';\nimport BitbucketSearchResults from './BitbucketSearchResults';\nimport { CreateProjectModes } from './types';\n\nexport interface BitbucketImportRepositoryFormProps {\n  disableRepositories: boolean;\n  onSearch: (query: string) => void;\n  onSelectRepository: (repo: BitbucketRepository) => void;\n  projects?: BitbucketProject[];\n  projectRepositories?: BitbucketProjectRepositories;\n  searching: boolean;\n  searchResults?: BitbucketRepository[];\n  selectedRepository?: BitbucketRepository;\n}\n\nexport default function BitbucketImportRepositoryForm(props: BitbucketImportRepositoryFormProps) {\n  const {\n    disableRepositories,\n    projects = [],\n    projectRepositories = {},\n    searchResults,\n    searching,\n    selectedRepository\n  } = props;\n\n  if (projects.length === 0) {\n    return (\n      <Alert className=\"spacer-top\" variant=\"warning\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.create_project.no_bbs_projects')}\n          id=\"onboarding.create_project.no_bbs_projects\"\n          values={{\n            link: (\n              <Link\n                to={{\n                  pathname: '/projects/create',\n                  query: { mode: CreateProjectModes.BitbucketServer, resetPat: 1 }\n                }}>\n                {translate('onboarding.create_project.update_your_token')}\n              </Link>\n            )\n          }}\n        />\n      </Alert>\n    );\n  }\n\n  return (\n    <div className=\"create-project-import-bbs\">\n      <SearchBox\n        onChange={props.onSearch}\n        placeholder={translate('onboarding.create_project.search_repositories_by_name')}\n      />\n\n      {searching || searchResults ? (\n        <BitbucketSearchResults\n          disableRepositories={disableRepositories}\n          onSelectRepository={props.onSelectRepository}\n          projects={projects}\n          searchResults={searchResults}\n          searching={searching}\n          selectedRepository={selectedRepository}\n        />\n      ) : (\n        <BitbucketRepositories\n          disableRepositories={disableRepositories}\n          onSelectRepository={props.onSelectRepository}\n          projectRepositories={projectRepositories}\n          projects={projects}\n          selectedRepository={selectedRepository}\n        />\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport {\n  BitbucketProject,\n  BitbucketProjectRepositories,\n  BitbucketRepository\n} from '../../../types/alm-integration';\nimport { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';\nimport BitbucketImportRepositoryForm from './BitbucketImportRepositoryForm';\nimport CreateProjectPageHeader from './CreateProjectPageHeader';\nimport PersonalAccessTokenForm from './PersonalAccessTokenForm';\nimport WrongBindingCountAlert from './WrongBindingCountAlert';\n\nexport interface BitbucketProjectCreateRendererProps {\n  bitbucketSetting?: AlmSettingsInstance;\n  canAdmin?: boolean;\n  importing: boolean;\n  loading: boolean;\n  onImportRepository: () => void;\n  onSearch: (query: string) => void;\n  onSelectRepository: (repo: BitbucketRepository) => void;\n  onPersonalAccessTokenCreated: () => void;\n  projects?: BitbucketProject[];\n  projectRepositories?: BitbucketProjectRepositories;\n  resetPat: boolean;\n  searching: boolean;\n  searchResults?: BitbucketRepository[];\n  selectedRepository?: BitbucketRepository;\n  showPersonalAccessTokenForm?: boolean;\n}\n\nexport default function BitbucketProjectCreateRenderer(props: BitbucketProjectCreateRendererProps) {\n  const {\n    bitbucketSetting,\n    canAdmin,\n    importing,\n    loading,\n    projects,\n    projectRepositories,\n    selectedRepository,\n    searching,\n    searchResults,\n    showPersonalAccessTokenForm,\n    resetPat\n  } = props;\n\n  return (\n    <>\n      <CreateProjectPageHeader\n        additionalActions={\n          !showPersonalAccessTokenForm && (\n            <div className=\"display-flex-center pull-right\">\n              <DeferredSpinner className=\"spacer-right\" loading={importing} />\n              <Button\n                className=\"button-large button-primary\"\n                disabled={!selectedRepository || importing}\n                onClick={props.onImportRepository}>\n                {translate('onboarding.create_project.import_selected_repo')}\n              </Button>\n            </div>\n          )\n        }\n        title={\n          <span className=\"text-middle\">\n            <img\n              alt=\"\" // Should be ignored by screen readers\n              className=\"spacer-right\"\n              height=\"24\"\n              src={`${getBaseUrl()}/images/alm/bitbucket.svg`}\n            />\n            {translate('onboarding.create_project.from_bbs')}\n          </span>\n        }\n      />\n\n      {loading && <i className=\"spinner\" />}\n\n      {!loading && !bitbucketSetting && (\n        <WrongBindingCountAlert alm={AlmKeys.BitbucketServer} canAdmin={!!canAdmin} />\n      )}\n\n      {!loading &&\n        bitbucketSetting &&\n        (showPersonalAccessTokenForm ? (\n          <PersonalAccessTokenForm\n            almSetting={bitbucketSetting}\n            onPersonalAccessTokenCreated={props.onPersonalAccessTokenCreated}\n            resetPat={resetPat}\n          />\n        ) : (\n          <BitbucketImportRepositoryForm\n            disableRepositories={importing}\n            onSearch={props.onSearch}\n            onSelectRepository={props.onSelectRepository}\n            projectRepositories={projectRepositories}\n            projects={projects}\n            searchResults={searchResults}\n            searching={searching}\n            selectedRepository={selectedRepository}\n          />\n        ))}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const PROJECT_NAME_MAX_LEN = 255;\n\nexport const DEFAULT_BBS_PAGE_SIZE = 25;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport {\n  getBitbucketServerProjects,\n  getBitbucketServerRepositories,\n  importBitbucketServerProject,\n  searchForBitbucketServerRepositories\n} from '../../../api/alm-integrations';\nimport {\n  BitbucketProject,\n  BitbucketProjectRepositories,\n  BitbucketRepository\n} from '../../../types/alm-integration';\nimport { AlmSettingsInstance } from '../../../types/alm-settings';\nimport BitbucketCreateProjectRenderer from './BitbucketProjectCreateRenderer';\nimport { DEFAULT_BBS_PAGE_SIZE } from './constants';\n\ninterface Props extends Pick<WithRouterProps, 'location' | 'router'> {\n  canAdmin: boolean;\n  bitbucketSettings: AlmSettingsInstance[];\n  loadingBindings: boolean;\n  onProjectCreate: (projectKey: string) => void;\n}\n\ninterface State {\n  bitbucketSetting?: AlmSettingsInstance;\n  importing: boolean;\n  loading: boolean;\n  projects?: BitbucketProject[];\n  projectRepositories?: BitbucketProjectRepositories;\n  searching: boolean;\n  searchResults?: BitbucketRepository[];\n  selectedRepository?: BitbucketRepository;\n  showPersonalAccessTokenForm: boolean;\n}\n\nexport default class BitbucketProjectCreate extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      // For now, we only handle a single instance. So we always use the first\n      // one from the list.\n      bitbucketSetting: props.bitbucketSettings[0],\n      importing: false,\n      loading: false,\n      searching: false,\n      showPersonalAccessTokenForm: true\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.bitbucketSettings.length === 0 && this.props.bitbucketSettings.length > 0) {\n      this.setState({ bitbucketSetting: this.props.bitbucketSettings[0] }, () =>\n        this.fetchInitialData()\n      );\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchInitialData = async () => {\n    const { showPersonalAccessTokenForm } = this.state;\n\n    if (!showPersonalAccessTokenForm) {\n      this.setState({ loading: true });\n      const projects = await this.fetchBitbucketProjects().catch(() => undefined);\n\n      let projectRepositories;\n      if (projects && projects.length > 0) {\n        projectRepositories = await this.fetchBitbucketRepositories(projects).catch(\n          () => undefined\n        );\n      }\n\n      if (this.mounted) {\n        this.setState({\n          projects,\n          projectRepositories,\n          loading: false\n        });\n      }\n    }\n  };\n\n  fetchBitbucketProjects = (): Promise<BitbucketProject[] | undefined> => {\n    const { bitbucketSetting } = this.state;\n\n    if (!bitbucketSetting) {\n      return Promise.resolve(undefined);\n    }\n\n    return getBitbucketServerProjects(bitbucketSetting.key).then(({ projects }) => projects);\n  };\n\n  fetchBitbucketRepositories = (\n    projects: BitbucketProject[]\n  ): Promise<BitbucketProjectRepositories | undefined> => {\n    const { bitbucketSetting } = this.state;\n\n    if (!bitbucketSetting) {\n      return Promise.resolve(undefined);\n    }\n\n    return Promise.all(\n      projects.map(p => {\n        return getBitbucketServerRepositories(bitbucketSetting.key, p.name).then(\n          ({ isLastPage, repositories }) => {\n            // Because the WS uses the project name rather than its key to find\n            // repositories, we can match more repositories than we expect. For\n            // example, p.name = \"A1\" would find repositories for projects \"A1\",\n            // \"A10\", \"A11\", etc. This is a limitation of BBS. To make sure we\n            // don't display incorrect information, filter on the project key.\n            const filteredRepositories = repositories.filter(r => r.projectKey === p.key);\n\n            // And because of the above, the \"isLastPage\" cannot be relied upon\n            // either. This one is impossible to get 100% for now. We can only\n            // make some assumptions: by default, the page size for BBS is 25\n            // (this is not part of the payload, so we don't know the actual\n            // number; but changing this implies changing some advanced config,\n            // so it's not likely). If the filtered repos is larger than this\n            // number AND isLastPage is false, we'll keep it at false.\n            // Otherwise, we assume it's true.\n            const realIsLastPage =\n              isLastPage || filteredRepositories.length < DEFAULT_BBS_PAGE_SIZE;\n\n            return {\n              repositories: filteredRepositories,\n              isLastPage: realIsLastPage,\n              projectKey: p.key\n            };\n          }\n        );\n      })\n    ).then(results => {\n      return results.reduce(\n        (acc: BitbucketProjectRepositories, { isLastPage, projectKey, repositories }) => {\n          return { ...acc, [projectKey]: { allShown: isLastPage, repositories } };\n        },\n        {}\n      );\n    });\n  };\n\n  cleanUrl = () => {\n    const { location, router } = this.props;\n    delete location.query.resetPat;\n    router.replace(location);\n  };\n\n  handlePersonalAccessTokenCreated = async () => {\n    this.setState({ showPersonalAccessTokenForm: false });\n    this.cleanUrl();\n    await this.fetchInitialData();\n  };\n\n  handleImportRepository = () => {\n    const { bitbucketSetting, selectedRepository } = this.state;\n\n    if (!bitbucketSetting || !selectedRepository) {\n      return;\n    }\n\n    this.setState({ importing: true });\n    importBitbucketServerProject(\n      bitbucketSetting.key,\n      selectedRepository.projectKey,\n      selectedRepository.slug\n    )\n      .then(({ project: { key } }) => {\n        if (this.mounted) {\n          this.setState({ importing: false });\n          this.props.onProjectCreate(key);\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ importing: false });\n        }\n      });\n  };\n\n  handleSearch = (query: string) => {\n    const { bitbucketSetting } = this.state;\n\n    if (!bitbucketSetting) {\n      return;\n    }\n\n    if (!query) {\n      this.setState({ searching: false, searchResults: undefined, selectedRepository: undefined });\n      return;\n    }\n\n    this.setState({ searching: true, selectedRepository: undefined });\n    searchForBitbucketServerRepositories(bitbucketSetting.key, query)\n      .then(({ repositories }) => {\n        if (this.mounted) {\n          this.setState({ searching: false, searchResults: repositories });\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ searching: false });\n        }\n      });\n  };\n\n  handleSelectRepository = (selectedRepository: BitbucketRepository) => {\n    this.setState({ selectedRepository });\n  };\n\n  render() {\n    const { canAdmin, loadingBindings, location } = this.props;\n    const {\n      bitbucketSetting,\n      importing,\n      loading,\n      projectRepositories,\n      projects,\n      searching,\n      searchResults,\n      selectedRepository,\n      showPersonalAccessTokenForm\n    } = this.state;\n\n    return (\n      <BitbucketCreateProjectRenderer\n        bitbucketSetting={bitbucketSetting}\n        canAdmin={canAdmin}\n        importing={importing}\n        loading={loading || loadingBindings}\n        onImportRepository={this.handleImportRepository}\n        onPersonalAccessTokenCreated={this.handlePersonalAccessTokenCreated}\n        onSearch={this.handleSearch}\n        onSelectRepository={this.handleSelectRepository}\n        projectRepositories={projectRepositories}\n        projects={projects}\n        resetPat={Boolean(location.query.resetPat)}\n        searchResults={searchResults}\n        searching={searching}\n        selectedRepository={selectedRepository}\n        showPersonalAccessTokenForm={\n          showPersonalAccessTokenForm || Boolean(location.query.resetPat)\n        }\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { withAppState } from '../../../components/hoc/withAppState';\nimport ChevronsIcon from '../../../components/icons/ChevronsIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { AlmKeys } from '../../../types/alm-settings';\nimport { CreateProjectModes } from './types';\n\nexport interface CreateProjectModeSelectionProps {\n  almCounts: {\n    [k in AlmKeys]: number;\n  };\n  appState: Pick<T.AppState, 'canAdmin'>;\n  loadingBindings: boolean;\n  onSelectMode: (mode: CreateProjectModes) => void;\n  onConfigMode: (mode: AlmKeys) => void;\n}\n\nconst DEFAULT_ICON_SIZE = 50;\n\nfunction renderAlmOption(\n  props: CreateProjectModeSelectionProps,\n  alm: AlmKeys.Azure | AlmKeys.BitbucketServer | AlmKeys.GitHub | AlmKeys.GitLab,\n  mode: CreateProjectModes,\n  last = false\n) {\n  const {\n    almCounts,\n    appState: { canAdmin },\n    loadingBindings\n  } = props;\n\n  const hasBitbucketCloudConf = almCounts[AlmKeys.BitbucketCloud] > 0;\n  const isBitbucketOption = alm === AlmKeys.BitbucketServer;\n\n  const count = isBitbucketOption\n    ? almCounts[AlmKeys.BitbucketServer] + almCounts[AlmKeys.BitbucketCloud]\n    : almCounts[alm];\n  const hasConfig = count > 0;\n  const hasTooManyConfig = count > 1;\n  const disabled = loadingBindings || hasTooManyConfig || (!hasConfig && !canAdmin);\n\n  const onClick = () => {\n    if (hasTooManyConfig || (!hasConfig && !canAdmin)) {\n      return null;\n    }\n\n    if (!hasConfig && canAdmin) {\n      return props.onConfigMode(alm);\n    }\n\n    return props.onSelectMode(\n      isBitbucketOption && hasBitbucketCloudConf ? CreateProjectModes.BitbucketCloud : mode\n    );\n  };\n\n  let errorMessage = '';\n\n  if (hasTooManyConfig) {\n    errorMessage = translateWithParameters(\n      'onboarding.create_project.too_many_alm_instances_X',\n      translate('alm', alm)\n    );\n  } else if (!hasConfig) {\n    errorMessage = canAdmin\n      ? translate('onboarding.create_project.alm_not_configured.admin')\n      : translate('onboarding.create_project.alm_not_configured');\n  }\n\n  return (\n    <div className=\"display-flex-column\">\n      <button\n        className={classNames(\n          'button button-huge display-flex-column create-project-mode-type-alm',\n          { disabled, 'big-spacer-right': !last }\n        )}\n        disabled={disabled}\n        onClick={onClick}\n        type=\"button\">\n        <img\n          alt=\"\" // Should be ignored by screen readers\n          height={DEFAULT_ICON_SIZE}\n          src={`${getBaseUrl()}/images/alm/${alm}.svg`}\n        />\n        <div className=\"medium big-spacer-top abs-height-50 display-flex-center\">\n          {translate('onboarding.create_project.select_method', alm)}\n        </div>\n\n        {loadingBindings && (\n          <span>\n            {translate('onboarding.create_project.check_alm_supported')}\n            <i className=\"little-spacer-left spinner\" />\n          </span>\n        )}\n\n        {!loadingBindings && errorMessage && (\n          <p className=\"text-muted small spacer-top\" style={{ lineHeight: 1.5 }}>\n            {errorMessage}\n          </p>\n        )}\n      </button>\n    </div>\n  );\n}\n\nexport function CreateProjectModeSelection(props: CreateProjectModeSelectionProps) {\n  const {\n    appState: { canAdmin },\n    almCounts\n  } = props;\n  const almTotalCount = Object.values(almCounts).reduce((prev, cur) => prev + cur);\n\n  return (\n    <>\n      <h1 className=\"huge-spacer-top huge-spacer-bottom\">\n        {translate('onboarding.create_project.select_method')}\n      </h1>\n\n      <p>{translate('onboarding.create_project.select_method.devops_platform')}</p>\n      {almTotalCount === 0 && canAdmin && (\n        <p className=\"spacer-top\">\n          {translate('onboarding.create_project.select_method.no_alm_yet.admin')}\n        </p>\n      )}\n      <div className=\"big-spacer-top huge-spacer-bottom display-flex-center\">\n        {renderAlmOption(props, AlmKeys.Azure, CreateProjectModes.AzureDevOps)}\n        {renderAlmOption(props, AlmKeys.BitbucketServer, CreateProjectModes.BitbucketServer)}\n        {renderAlmOption(props, AlmKeys.GitHub, CreateProjectModes.GitHub)}\n        {renderAlmOption(props, AlmKeys.GitLab, CreateProjectModes.GitLab, true)}\n      </div>\n\n      <p className=\"big-spacer-bottom\">\n        {translate('onboarding.create_project.select_method.manually')}\n      </p>\n      <button\n        className=\"button button-huge display-flex-column create-project-mode-type-manual\"\n        onClick={() => props.onSelectMode(CreateProjectModes.Manual)}\n        type=\"button\">\n        <ChevronsIcon size={DEFAULT_ICON_SIZE} />\n        <div className=\"medium big-spacer-top\">\n          {translate('onboarding.create_project.select_method.manual')}\n        </div>\n      </button>\n    </>\n  );\n}\n\nexport default withAppState(CreateProjectModeSelection);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { colors } from '../../../app/theme';\nimport { Button } from '../../../components/controls/buttons';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport Radio from '../../../components/controls/Radio';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport SearchSelect from '../../../components/controls/SearchSelect';\nimport CheckIcon from '../../../components/icons/CheckIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { GithubOrganization, GithubRepository } from '../../../types/alm-integration';\nimport { ComponentQualifier } from '../../../types/component';\nimport CreateProjectPageHeader from './CreateProjectPageHeader';\n\nexport interface GitHubProjectCreateRendererProps {\n  canAdmin: boolean;\n  error: boolean;\n  importing: boolean;\n  loadingBindings: boolean;\n  loadingOrganizations: boolean;\n  loadingRepositories: boolean;\n  onImportRepository: () => void;\n  onLoadMore: () => void;\n  onSearch: (q: string) => void;\n  onSelectOrganization: (key: string) => void;\n  onSelectRepository: (key: string) => void;\n  organizations: GithubOrganization[];\n  repositories?: GithubRepository[];\n  repositoryPaging: T.Paging;\n  searchQuery: string;\n  selectedOrganization?: GithubOrganization;\n  selectedRepository?: GithubRepository;\n}\n\nfunction orgToOption({ key, name }: GithubOrganization) {\n  return { value: key, label: name };\n}\n\nconst handleSearch = (organizations: GithubOrganization[]) => (q: string) =>\n  Promise.resolve(organizations.filter(o => !q || o.name.includes(q)).map(orgToOption));\n\nfunction renderRepositoryList(props: GitHubProjectCreateRendererProps) {\n  const {\n    importing,\n    loadingRepositories,\n    repositories,\n    repositoryPaging,\n    searchQuery,\n    selectedOrganization,\n    selectedRepository\n  } = props;\n\n  const isChecked = (repository: GithubRepository) =>\n    !!repository.sqProjectKey ||\n    (!!selectedRepository && selectedRepository.key === repository.key);\n\n  const isDisabled = (repository: GithubRepository) =>\n    !!repository.sqProjectKey || loadingRepositories || importing;\n\n  return (\n    selectedOrganization &&\n    repositories && (\n      <div className=\"boxed-group padded display-flex-wrap\">\n        <div className=\"width-100\">\n          <SearchBox\n            className=\"big-spacer-bottom\"\n            onChange={props.onSearch}\n            placeholder={translate('onboarding.create_project.search_repositories')}\n            value={searchQuery}\n          />\n        </div>\n\n        {repositories.length === 0 ? (\n          <div className=\"padded\">\n            <DeferredSpinner loading={loadingRepositories}>\n              {translate('no_results')}\n            </DeferredSpinner>\n          </div>\n        ) : (\n          repositories.map(r => (\n            <Radio\n              className=\"spacer-top spacer-bottom padded create-project-github-repository\"\n              key={r.key}\n              checked={isChecked(r)}\n              disabled={isDisabled(r)}\n              value={r.key}\n              onCheck={props.onSelectRepository}>\n              <div className=\"big overflow-hidden max-width-100\" title={r.name}>\n                <div className=\"text-ellipsis\">\n                  {r.sqProjectKey ? (\n                    <div className=\"display-flex-center max-width-100\">\n                      <Link\n                        className=\"display-flex-center max-width-60\"\n                        to={getProjectUrl(r.sqProjectKey)}>\n                        <QualifierIcon\n                          className=\"spacer-right\"\n                          qualifier={ComponentQualifier.Project}\n                        />\n                        <span className=\"text-ellipsis\">{r.name}</span>\n                      </Link>\n                      <em className=\"display-flex-center small big-spacer-left flex-0\">\n                        <span className=\"text-muted-2\">\n                          {translate('onboarding.create_project.repository_imported')}\n                        </span>\n                        <CheckIcon className=\"little-spacer-left\" size={12} fill={colors.green} />\n                      </em>\n                    </div>\n                  ) : (\n                    r.name\n                  )}\n                </div>\n                {r.url && (\n                  <a\n                    className=\"notice small display-flex-center little-spacer-top\"\n                    onClick={e => e.stopPropagation()}\n                    target=\"_blank\"\n                    href={r.url}\n                    rel=\"noopener noreferrer\">\n                    {translate('onboarding.create_project.see_on_github')}\n                  </a>\n                )}\n              </div>\n            </Radio>\n          ))\n        )}\n\n        <div className=\"display-flex-justify-center width-100\">\n          <ListFooter\n            count={repositories.length}\n            total={repositoryPaging.total}\n            loadMore={props.onLoadMore}\n            loading={loadingRepositories}\n          />\n        </div>\n      </div>\n    )\n  );\n}\n\nexport default function GitHubProjectCreateRenderer(props: GitHubProjectCreateRendererProps) {\n  const {\n    canAdmin,\n    error,\n    importing,\n    loadingBindings,\n    loadingOrganizations,\n    organizations,\n    selectedOrganization,\n    selectedRepository\n  } = props;\n\n  if (loadingBindings) {\n    return <DeferredSpinner />;\n  }\n\n  return (\n    <div>\n      <CreateProjectPageHeader\n        additionalActions={\n          selectedOrganization && (\n            <div className=\"display-flex-center pull-right\">\n              <DeferredSpinner className=\"spacer-right\" loading={importing} />\n              <Button\n                className=\"button-large button-primary\"\n                disabled={!selectedRepository || importing}\n                onClick={props.onImportRepository}>\n                {translate('onboarding.create_project.import_selected_repo')}\n              </Button>\n            </div>\n          )\n        }\n        title={\n          <span className=\"text-middle display-flex-center\">\n            <img\n              alt=\"\" // Should be ignored by screen readers\n              className=\"spacer-right\"\n              height={24}\n              src={`${getBaseUrl()}/images/alm/github.svg`}\n            />\n            {translate('onboarding.create_project.github.title')}\n          </span>\n        }\n      />\n\n      {error ? (\n        <div className=\"display-flex-justify-center\">\n          <div className=\"boxed-group padded width-50 huge-spacer-top\">\n            <h2 className=\"big-spacer-bottom\">\n              {translate('onboarding.create_project.github.warning.title')}\n            </h2>\n            <Alert variant=\"warning\">\n              {canAdmin ? (\n                <FormattedMessage\n                  id=\"onboarding.create_project.github.warning.message_admin\"\n                  defaultMessage={translate(\n                    'onboarding.create_project.github.warning.message_admin'\n                  )}\n                  values={{\n                    link: (\n                      <Link to=\"/admin/settings?category=almintegration\">\n                        {translate('onboarding.create_project.github.warning.message_admin.link')}\n                      </Link>\n                    )\n                  }}\n                />\n              ) : (\n                translate('onboarding.create_project.github.warning.message')\n              )}\n            </Alert>\n          </div>\n        </div>\n      ) : (\n        <DeferredSpinner loading={loadingOrganizations}>\n          <div className=\"form-field\">\n            <label>{translate('onboarding.create_project.github.choose_organization')}</label>\n            {organizations.length > 0 ? (\n              <SearchSelect\n                defaultOptions={organizations.map(orgToOption)}\n                onSearch={handleSearch(organizations)}\n                minimumQueryLength={0}\n                onSelect={({ value }) => props.onSelectOrganization(value)}\n                value={selectedOrganization && orgToOption(selectedOrganization)}\n              />\n            ) : (\n              !loadingOrganizations && (\n                <Alert className=\"spacer-top\" variant=\"error\">\n                  {canAdmin ? (\n                    <FormattedMessage\n                      id=\"onboarding.create_project.github.no_orgs_admin\"\n                      defaultMessage={translate('onboarding.create_project.github.no_orgs_admin')}\n                      values={{\n                        link: (\n                          <Link to=\"/admin/settings?category=almintegration\">\n                            {translate(\n                              'onboarding.create_project.github.warning.message_admin.link'\n                            )}\n                          </Link>\n                        )\n                      }}\n                    />\n                  ) : (\n                    translate('onboarding.create_project.github.no_orgs')\n                  )}\n                </Alert>\n              )\n            )}\n          </div>\n        </DeferredSpinner>\n      )}\n\n      {renderRepositoryList(props)}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport {\n  getGithubClientId,\n  getGithubOrganizations,\n  getGithubRepositories,\n  importGithubRepository\n} from '../../../api/alm-integrations';\nimport { getHostUrl } from '../../../helpers/urls';\nimport { GithubOrganization, GithubRepository } from '../../../types/alm-integration';\nimport { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';\nimport GitHubProjectCreateRenderer from './GitHubProjectCreateRenderer';\n\ninterface Props extends Pick<WithRouterProps, 'location' | 'router'> {\n  canAdmin: boolean;\n  loadingBindings: boolean;\n  onProjectCreate: (projectKey: string) => void;\n  settings: AlmSettingsInstance[];\n}\n\ninterface State {\n  error: boolean;\n  importing: boolean;\n  loadingOrganizations: boolean;\n  loadingRepositories: boolean;\n  organizations: GithubOrganization[];\n  repositoryPaging: T.Paging;\n  repositories: GithubRepository[];\n  searchQuery: string;\n  selectedOrganization?: GithubOrganization;\n  selectedRepository?: GithubRepository;\n  settings?: AlmSettingsInstance;\n}\n\nconst REPOSITORY_PAGE_SIZE = 30;\n\nexport default class GitHubProjectCreate extends React.Component<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      error: false,\n      importing: false,\n      loadingOrganizations: true,\n      loadingRepositories: false,\n      organizations: [],\n      repositories: [],\n      repositoryPaging: { pageSize: REPOSITORY_PAGE_SIZE, total: 0, pageIndex: 1 },\n      searchQuery: '',\n      settings: props.settings[0]\n    };\n\n    this.triggerSearch = debounce(this.triggerSearch, 250);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n\n    this.initialize();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.settings.length === 0 && this.props.settings.length > 0) {\n      this.setState({ settings: this.props.settings[0] }, () => this.initialize());\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  async initialize() {\n    const { location, router } = this.props;\n    const { settings } = this.state;\n\n    if (!settings || !settings.url) {\n      this.setState({ error: true });\n      return;\n    } else {\n      this.setState({ error: false });\n    }\n\n    const code = location.query?.code;\n\n    try {\n      if (!code) {\n        await this.redirectToGithub(settings);\n      } else {\n        delete location.query.code;\n        router.replace(location);\n        await this.fetchOrganizations(settings, code);\n      }\n    } catch (e) {\n      if (this.mounted) {\n        this.setState({ error: true });\n      }\n    }\n  }\n\n  async redirectToGithub(settings: AlmSettingsInstance) {\n    if (!settings.url) {\n      return;\n    }\n\n    const { clientId } = await getGithubClientId(settings.key);\n\n    if (!clientId) {\n      this.setState({ error: true });\n      return;\n    }\n\n    const queryParams = [\n      { param: 'client_id', value: clientId },\n      { param: 'redirect_uri', value: `${getHostUrl()}/projects/create?mode=${AlmKeys.GitHub}` }\n    ]\n      .map(({ param, value }) => `${param}=${value}`)\n      .join('&');\n\n    let instanceRootUrl;\n    // Strip the api section from the url, since we're not hitting the api here.\n    if (settings.url.includes('/api/v3')) {\n      // GitHub Enterprise\n      instanceRootUrl = settings.url.replace('/api/v3', '');\n    } else {\n      // github.com\n      instanceRootUrl = settings.url.replace('api.', '');\n    }\n\n    // strip the trailing /\n    instanceRootUrl = instanceRootUrl.replace(/\\/$/, '');\n    window.location.replace(`${instanceRootUrl}/login/oauth/authorize?${queryParams}`);\n  }\n\n  async fetchOrganizations(settings: AlmSettingsInstance, token: string) {\n    const { organizations } = await getGithubOrganizations(settings.key, token);\n\n    if (this.mounted) {\n      this.setState({ loadingOrganizations: false, organizations });\n    }\n  }\n\n  async fetchRepositories(params: { organizationKey: string; page?: number; query?: string }) {\n    const { organizationKey, page = 1, query } = params;\n    const { settings } = this.state;\n\n    if (!settings) {\n      this.setState({ error: true });\n      return;\n    }\n\n    this.setState({ loadingRepositories: true });\n\n    try {\n      const data = await getGithubRepositories({\n        almSetting: settings.key,\n        organization: organizationKey,\n        pageSize: REPOSITORY_PAGE_SIZE,\n        page,\n        query\n      });\n\n      if (this.mounted) {\n        this.setState(({ repositories }) => ({\n          loadingRepositories: false,\n          repositoryPaging: data.paging,\n          repositories: page === 1 ? data.repositories : [...repositories, ...data.repositories]\n        }));\n      }\n    } catch (_) {\n      if (this.mounted) {\n        this.setState({\n          loadingRepositories: false,\n          repositoryPaging: { pageIndex: 1, pageSize: REPOSITORY_PAGE_SIZE, total: 0 },\n          repositories: []\n        });\n      }\n    }\n  }\n\n  triggerSearch = (query: string) => {\n    const { selectedOrganization } = this.state;\n    if (selectedOrganization) {\n      this.setState({ selectedRepository: undefined });\n      this.fetchRepositories({ organizationKey: selectedOrganization.key, query });\n    }\n  };\n\n  handleSelectOrganization = (key: string) => {\n    this.setState(({ organizations }) => ({\n      searchQuery: '',\n      selectedRepository: undefined,\n      selectedOrganization: organizations.find(o => o.key === key)\n    }));\n    this.fetchRepositories({ organizationKey: key });\n  };\n\n  handleSelectRepository = (key: string) => {\n    this.setState(({ repositories }) => ({\n      selectedRepository: repositories?.find(r => r.key === key)\n    }));\n  };\n\n  handleSearch = (searchQuery: string) => {\n    this.setState({ searchQuery });\n    this.triggerSearch(searchQuery);\n  };\n\n  handleLoadMore = () => {\n    const { repositoryPaging, searchQuery, selectedOrganization } = this.state;\n\n    if (selectedOrganization) {\n      this.fetchRepositories({\n        organizationKey: selectedOrganization.key,\n        page: repositoryPaging.pageIndex + 1,\n        query: searchQuery\n      });\n    }\n  };\n\n  handleImportRepository = async () => {\n    const { selectedOrganization, selectedRepository, settings } = this.state;\n\n    if (settings && selectedOrganization && selectedRepository) {\n      this.setState({ importing: true });\n\n      try {\n        const { project } = await importGithubRepository(\n          settings.key,\n          selectedOrganization.key,\n          selectedRepository.key\n        );\n\n        this.props.onProjectCreate(project.key);\n      } finally {\n        if (this.mounted) {\n          this.setState({ importing: false });\n        }\n      }\n    }\n  };\n\n  render() {\n    const { canAdmin, loadingBindings } = this.props;\n    const {\n      error,\n      importing,\n      loadingOrganizations,\n      loadingRepositories,\n      organizations,\n      repositoryPaging,\n      repositories,\n      searchQuery,\n      selectedOrganization,\n      selectedRepository\n    } = this.state;\n\n    return (\n      <GitHubProjectCreateRenderer\n        canAdmin={canAdmin}\n        error={error}\n        importing={importing}\n        loadingBindings={loadingBindings}\n        loadingOrganizations={loadingOrganizations}\n        loadingRepositories={loadingRepositories}\n        onImportRepository={this.handleImportRepository}\n        onLoadMore={this.handleLoadMore}\n        onSearch={this.handleSearch}\n        onSelectOrganization={this.handleSelectOrganization}\n        onSelectRepository={this.handleSelectRepository}\n        organizations={organizations}\n        repositoryPaging={repositoryPaging}\n        searchQuery={searchQuery}\n        repositories={repositories}\n        selectedOrganization={selectedOrganization}\n        selectedRepository={selectedRepository}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Button } from '../../../components/controls/buttons';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport CheckIcon from '../../../components/icons/CheckIcon';\nimport DetachIcon from '../../../components/icons/DetachIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { GitlabProject } from '../../../types/alm-integration';\nimport { ComponentQualifier } from '../../../types/component';\nimport { CreateProjectModes } from './types';\n\nexport interface GitlabProjectSelectionFormProps {\n  importingGitlabProjectId?: string;\n  loadingMore: boolean;\n  onImport: (gitlabProjectId: string) => void;\n  onLoadMore: () => void;\n  onSearch: (searchQuery: string) => void;\n  projects?: GitlabProject[];\n  projectsPaging: T.Paging;\n  searching: boolean;\n  searchQuery: string;\n}\n\nexport default function GitlabProjectSelectionForm(props: GitlabProjectSelectionFormProps) {\n  const {\n    importingGitlabProjectId,\n    loadingMore,\n    projects = [],\n    projectsPaging,\n    searching,\n    searchQuery\n  } = props;\n\n  if (projects.length === 0 && searchQuery.length === 0 && !searching) {\n    return (\n      <Alert className=\"spacer-top\" variant=\"warning\">\n        <FormattedMessage\n          defaultMessage={translate('onboarding.create_project.gitlab.no_projects')}\n          id=\"onboarding.create_project.gitlab.no_projects\"\n          values={{\n            link: (\n              <Link\n                to={{\n                  pathname: '/projects/create',\n                  query: { mode: CreateProjectModes.GitLab, resetPat: 1 }\n                }}>\n                {translate('onboarding.create_project.update_your_token')}\n              </Link>\n            )\n          }}\n        />\n      </Alert>\n    );\n  }\n\n  return (\n    <div className=\"boxed-group big-padded create-project-import\">\n      <SearchBox\n        className=\"spacer\"\n        loading={searching}\n        minLength={3}\n        onChange={props.onSearch}\n        placeholder={translate('onboarding.create_project.search_prompt')}\n      />\n\n      <hr />\n\n      {projects.length === 0 ? (\n        <div className=\"padded\">{translate('no_results')}</div>\n      ) : (\n        <table className=\"data zebra zebra-hover\">\n          <tbody>\n            {projects.map(project => (\n              <tr key={project.id}>\n                <td>\n                  <Tooltip overlay={project.slug}>\n                    <strong className=\"project-name display-inline-block text-ellipsis\">\n                      {project.sqProjectKey ? (\n                        <Link to={getProjectUrl(project.sqProjectKey)}>\n                          <QualifierIcon\n                            className=\"spacer-right\"\n                            qualifier={ComponentQualifier.Project}\n                          />\n                          {project.sqProjectName}\n                        </Link>\n                      ) : (\n                        project.name\n                      )}\n                    </strong>\n                  </Tooltip>\n                  <br />\n                  <Tooltip overlay={project.pathSlug}>\n                    <span className=\"text-muted project-path display-inline-block text-ellipsis\">\n                      {project.pathName}\n                    </span>\n                  </Tooltip>\n                </td>\n                <td>\n                  <a\n                    className=\"display-inline-flex-center big-spacer-right\"\n                    href={project.url}\n                    rel=\"noopener noreferrer\"\n                    target=\"_blank\">\n                    <DetachIcon className=\"little-spacer-right\" />\n                    {translate('onboarding.create_project.gitlab.link')}\n                  </a>\n                </td>\n                {project.sqProjectKey ? (\n                  <td>\n                    <span className=\"display-flex-center display-flex-justify-end already-set-up\">\n                      <CheckIcon className=\"little-spacer-right\" size={12} />\n                      {translate('onboarding.create_project.repository_imported')}\n                    </span>\n                  </td>\n                ) : (\n                  <td className=\"text-right\">\n                    <Button\n                      disabled={!!importingGitlabProjectId}\n                      onClick={() => props.onImport(project.id)}>\n                      {translate('onboarding.create_project.set_up')}\n                      {importingGitlabProjectId === project.id && (\n                        <DeferredSpinner className=\"spacer-left\" />\n                      )}\n                    </Button>\n                  </td>\n                )}\n              </tr>\n            ))}\n          </tbody>\n        </table>\n      )}\n      <ListFooter\n        count={projects.length}\n        loadMore={props.onLoadMore}\n        loading={loadingMore}\n        pageSize={projectsPaging.pageSize}\n        total={projectsPaging.total}\n      />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { GitlabProject } from '../../../types/alm-integration';\nimport { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';\nimport CreateProjectPageHeader from './CreateProjectPageHeader';\nimport GitlabProjectSelectionForm from './GitlabProjectSelectionForm';\nimport PersonalAccessTokenForm from './PersonalAccessTokenForm';\nimport WrongBindingCountAlert from './WrongBindingCountAlert';\n\nexport interface GitlabProjectCreateRendererProps {\n  canAdmin?: boolean;\n  importingGitlabProjectId?: string;\n  loading: boolean;\n  loadingMore: boolean;\n  onImport: (gitlabProjectId: string) => void;\n  onLoadMore: () => void;\n  onPersonalAccessTokenCreated: () => void;\n  onSearch: (searchQuery: string) => void;\n  projects?: GitlabProject[];\n  projectsPaging: T.Paging;\n  resetPat: boolean;\n  searching: boolean;\n  searchQuery: string;\n  settings?: AlmSettingsInstance;\n  showPersonalAccessTokenForm?: boolean;\n}\n\nexport default function GitlabProjectCreateRenderer(props: GitlabProjectCreateRendererProps) {\n  const {\n    canAdmin,\n    importingGitlabProjectId,\n    loading,\n    loadingMore,\n    projects,\n    projectsPaging,\n    resetPat,\n    searching,\n    searchQuery,\n    settings,\n    showPersonalAccessTokenForm\n  } = props;\n\n  return (\n    <>\n      <CreateProjectPageHeader\n        title={\n          <span className=\"text-middle\">\n            <img\n              alt=\"\" // Should be ignored by screen readers\n              className=\"spacer-right\"\n              height=\"24\"\n              src={`${getBaseUrl()}/images/alm/gitlab.svg`}\n            />\n            {translate('onboarding.create_project.gitlab.title')}\n          </span>\n        }\n      />\n\n      {loading && <i className=\"spinner\" />}\n\n      {!loading && !settings && (\n        <WrongBindingCountAlert alm={AlmKeys.GitLab} canAdmin={!!canAdmin} />\n      )}\n\n      {!loading &&\n        settings &&\n        (showPersonalAccessTokenForm ? (\n          <PersonalAccessTokenForm\n            almSetting={settings}\n            resetPat={resetPat}\n            onPersonalAccessTokenCreated={props.onPersonalAccessTokenCreated}\n          />\n        ) : (\n          <GitlabProjectSelectionForm\n            importingGitlabProjectId={importingGitlabProjectId}\n            loadingMore={loadingMore}\n            onImport={props.onImport}\n            onLoadMore={props.onLoadMore}\n            onSearch={props.onSearch}\n            projects={projects}\n            projectsPaging={projectsPaging}\n            searching={searching}\n            searchQuery={searchQuery}\n          />\n        ))}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport { getGitlabProjects, importGitlabProject } from '../../../api/alm-integrations';\nimport { GitlabProject } from '../../../types/alm-integration';\nimport { AlmSettingsInstance } from '../../../types/alm-settings';\nimport GitlabProjectCreateRenderer from './GitlabProjectCreateRenderer';\n\ninterface Props extends Pick<WithRouterProps, 'location' | 'router'> {\n  canAdmin: boolean;\n  loadingBindings: boolean;\n  onProjectCreate: (projectKey: string) => void;\n  settings: AlmSettingsInstance[];\n}\n\ninterface State {\n  importingGitlabProjectId?: string;\n  loading: boolean;\n  loadingMore: boolean;\n  projects?: GitlabProject[];\n  projectsPaging: T.Paging;\n  resetPat: boolean;\n  searching: boolean;\n  searchQuery: string;\n  settings?: AlmSettingsInstance;\n  showPersonalAccessTokenForm: boolean;\n}\n\nconst GITLAB_PROJECTS_PAGESIZE = 30;\n\nexport default class GitlabProjectCreate extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      loading: false,\n      loadingMore: false,\n      projectsPaging: { pageIndex: 1, total: 0, pageSize: GITLAB_PROJECTS_PAGESIZE },\n      resetPat: false,\n      showPersonalAccessTokenForm: true,\n      searching: false,\n      searchQuery: '',\n      settings: props.settings.length === 1 ? props.settings[0] : undefined\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.settings.length === 0 && this.props.settings.length > 0) {\n      this.setState(\n        { settings: this.props.settings.length === 1 ? this.props.settings[0] : undefined },\n        () => this.fetchInitialData()\n      );\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchInitialData = async () => {\n    const { showPersonalAccessTokenForm } = this.state;\n\n    if (!showPersonalAccessTokenForm) {\n      this.setState({ loading: true });\n      const result = await this.fetchProjects();\n      if (this.mounted && result) {\n        const { projects, projectsPaging } = result;\n\n        this.setState({\n          loading: false,\n          projects,\n          projectsPaging\n        });\n      } else {\n        this.setState({\n          loading: false\n        });\n      }\n    }\n  };\n\n  handleError = () => {\n    if (this.mounted) {\n      this.setState({ resetPat: true, showPersonalAccessTokenForm: true });\n    }\n\n    return undefined;\n  };\n\n  fetchProjects = async (pageIndex = 1, query?: string) => {\n    const { settings } = this.state;\n    if (!settings) {\n      return Promise.resolve(undefined);\n    }\n\n    try {\n      return await getGitlabProjects({\n        almSetting: settings.key,\n        page: pageIndex,\n        pageSize: GITLAB_PROJECTS_PAGESIZE,\n        query\n      });\n    } catch (_) {\n      return this.handleError();\n    }\n  };\n\n  doImport = async (gitlabProjectId: string) => {\n    const { settings } = this.state;\n\n    if (!settings) {\n      return Promise.resolve(undefined);\n    }\n\n    try {\n      return await importGitlabProject({\n        almSetting: settings.key,\n        gitlabProjectId\n      });\n    } catch (_) {\n      return this.handleError();\n    }\n  };\n\n  handleImport = async (gitlabProjectId: string) => {\n    this.setState({ importingGitlabProjectId: gitlabProjectId });\n\n    const result = await this.doImport(gitlabProjectId);\n\n    if (this.mounted) {\n      this.setState({ importingGitlabProjectId: undefined });\n\n      if (result) {\n        this.props.onProjectCreate(result.project.key);\n      }\n    }\n  };\n\n  handleLoadMore = async () => {\n    this.setState({ loadingMore: true });\n\n    const {\n      projectsPaging: { pageIndex },\n      searchQuery\n    } = this.state;\n\n    const result = await this.fetchProjects(pageIndex + 1, searchQuery);\n\n    if (this.mounted) {\n      this.setState(({ projects = [], projectsPaging }) => ({\n        loadingMore: false,\n        projects: result ? [...projects, ...result.projects] : projects,\n        projectsPaging: result ? result.projectsPaging : projectsPaging\n      }));\n    }\n  };\n\n  handleSearch = async (searchQuery: string) => {\n    this.setState({ searching: true, searchQuery });\n\n    const result = await this.fetchProjects(1, searchQuery);\n\n    if (this.mounted) {\n      this.setState(({ projects, projectsPaging }) => ({\n        searching: false,\n        projects: result ? result.projects : projects,\n        projectsPaging: result ? result.projectsPaging : projectsPaging\n      }));\n    }\n  };\n\n  cleanUrl = () => {\n    const { location, router } = this.props;\n    delete location.query.resetPat;\n    router.replace(location);\n  };\n\n  handlePersonalAccessTokenCreated = async () => {\n    this.setState({ showPersonalAccessTokenForm: false, resetPat: false });\n    this.cleanUrl();\n    await this.fetchInitialData();\n  };\n\n  render() {\n    const { canAdmin, loadingBindings, location } = this.props;\n    const {\n      importingGitlabProjectId,\n      loading,\n      loadingMore,\n      projects,\n      projectsPaging,\n      resetPat,\n      searching,\n      searchQuery,\n      settings,\n      showPersonalAccessTokenForm\n    } = this.state;\n\n    return (\n      <GitlabProjectCreateRenderer\n        settings={settings}\n        canAdmin={canAdmin}\n        importingGitlabProjectId={importingGitlabProjectId}\n        loading={loading || loadingBindings}\n        loadingMore={loadingMore}\n        onImport={this.handleImport}\n        onLoadMore={this.handleLoadMore}\n        onPersonalAccessTokenCreated={this.handlePersonalAccessTokenCreated}\n        onSearch={this.handleSearch}\n        projects={projects}\n        projectsPaging={projectsPaging}\n        resetPat={resetPat || Boolean(location.query.resetPat)}\n        searching={searching}\n        searchQuery={searchQuery}\n        showPersonalAccessTokenForm={\n          showPersonalAccessTokenForm || Boolean(location.query.resetPat)\n        }\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport ValidationInput from '../../components/controls/ValidationInput';\nimport { PROJECT_KEY_MAX_LEN } from '../../helpers/constants';\nimport { translate } from '../../helpers/l10n';\n\nexport interface ProjectKeyInputProps {\n  error?: string;\n  help?: string;\n  label?: string;\n  onProjectKeyChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n  placeholder?: string;\n  projectKey?: string;\n  touched: boolean;\n  validating?: boolean;\n  autofocus?: boolean;\n}\n\nexport default function ProjectKeyInput(props: ProjectKeyInputProps) {\n  const {\n    error,\n    help,\n    label,\n    placeholder,\n    projectKey,\n    touched,\n    validating,\n    autofocus = false\n  } = props;\n\n  const isInvalid = touched && error !== undefined;\n  const isValid = touched && !validating && error === undefined;\n\n  return (\n    <ValidationInput\n      className=\"form-field\"\n      description={translate('onboarding.create_project.project_key.description')}\n      error={error}\n      help={help}\n      id=\"project-key\"\n      isInvalid={isInvalid}\n      isValid={isValid}\n      label={label}\n      required={label !== undefined}>\n      <input\n        autoFocus={autofocus}\n        className={classNames('input-super-large', {\n          'is-invalid': isInvalid,\n          'is-valid': isValid\n        })}\n        id=\"project-key\"\n        maxLength={PROJECT_KEY_MAX_LEN}\n        minLength={1}\n        onChange={props.onProjectKeyChange}\n        placeholder={placeholder}\n        type=\"text\"\n        value={projectKey}\n      />\n    </ValidationInput>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { ProjectKeyValidationResult } from '../types/component';\nimport { PROJECT_KEY_MAX_LEN } from './constants';\n\n// This is the regex used on the backend:\n//   [\\p{Alnum}\\-_.:]*[\\p{Alpha}\\-_.:]+[\\p{Alnum}\\-_.:]*\n// See sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java\nexport const PROJECT_KEY_REGEX = /^[\\w\\-.:]*[a-z\\-_.:]+[\\w\\-.:]*$/i;\nexport const PROJECT_KEY_INVALID_CHARACTERS = /[^\\w\\-:.]+/gi;\n\nexport function validateProjectKey(projectKey: string): ProjectKeyValidationResult {\n  if (projectKey.length === 0) {\n    return ProjectKeyValidationResult.Empty;\n  } else if (projectKey.length > PROJECT_KEY_MAX_LEN) {\n    return ProjectKeyValidationResult.TooLong;\n  } else if (PROJECT_KEY_REGEX.test(projectKey)) {\n    return ProjectKeyValidationResult.Valid;\n  } else if (/^[0-9]+$/.test(projectKey)) {\n    return ProjectKeyValidationResult.OnlyDigits;\n  }\n  return ProjectKeyValidationResult.InvalidChar;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { createProject, doesComponentExists } from '../../../api/components';\nimport ProjectKeyInput from '../../../components/common/ProjectKeyInput';\nimport { SubmitButton } from '../../../components/controls/buttons';\nimport ValidationInput from '../../../components/controls/ValidationInput';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\nimport { PROJECT_KEY_INVALID_CHARACTERS, validateProjectKey } from '../../../helpers/projects';\nimport { ProjectKeyValidationResult } from '../../../types/component';\nimport { PROJECT_NAME_MAX_LEN } from './constants';\nimport CreateProjectPageHeader from './CreateProjectPageHeader';\nimport './ManualProjectCreate.css';\n\ninterface Props {\n  branchesEnabled: boolean;\n  onProjectCreate: (projectKey: string) => void;\n}\n\ninterface State {\n  projectName: string;\n  projectNameError?: string;\n  projectNameTouched?: boolean;\n  projectKey: string;\n  projectKeyError?: string;\n  projectKeyTouched?: boolean;\n  validatingProjectKey: boolean;\n  submitting: boolean;\n}\n\ntype ValidState = State & Required<Pick<State, 'projectKey' | 'projectName'>>;\n\nexport default class ManualProjectCreate extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      projectKey: '',\n      projectName: '',\n      submitting: false,\n      validatingProjectKey: false\n    };\n    this.checkFreeKey = debounce(this.checkFreeKey, 250);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  checkFreeKey = (key: string) => {\n    this.setState({ validatingProjectKey: true });\n\n    return doesComponentExists({ component: key })\n      .then(alreadyExist => {\n        if (this.mounted && key === this.state.projectKey) {\n          this.setState({\n            projectKeyError: alreadyExist\n              ? translate('onboarding.create_project.project_key.taken')\n              : undefined,\n            validatingProjectKey: false\n          });\n        }\n      })\n      .catch(() => {\n        if (this.mounted && key === this.state.projectKey) {\n          this.setState({ projectKeyError: undefined, validatingProjectKey: false });\n        }\n      });\n  };\n\n  canSubmit(state: State): state is ValidState {\n    const { projectKey, projectKeyError, projectName, projectNameError } = state;\n    return Boolean(\n      projectKeyError === undefined &&\n        projectNameError === undefined &&\n        projectKey.length > 0 &&\n        projectName.length > 0\n    );\n  }\n\n  handleFormSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const { state } = this;\n    if (this.canSubmit(state)) {\n      this.setState({ submitting: true });\n      createProject({\n        project: state.projectKey,\n        name: (state.projectName || state.projectKey).trim()\n      }).then(\n        ({ project }) => this.props.onProjectCreate(project.key),\n        () => {\n          if (this.mounted) {\n            this.setState({ submitting: false });\n          }\n        }\n      );\n    }\n  };\n\n  handleProjectKeyChange = (projectKey: string, fromUI = false) => {\n    const projectKeyError = this.validateKey(projectKey);\n\n    this.setState({\n      projectKey,\n      projectKeyError,\n      projectKeyTouched: fromUI\n    });\n\n    if (projectKeyError === undefined) {\n      this.checkFreeKey(projectKey);\n    }\n  };\n\n  handleProjectNameChange = (projectName: string, fromUI = false) => {\n    this.setState(\n      {\n        projectName,\n        projectNameError: this.validateName(projectName),\n        projectNameTouched: fromUI\n      },\n      () => {\n        if (!this.state.projectKeyTouched) {\n          const sanitizedProjectKey = this.state.projectName\n            .trim()\n            .replace(PROJECT_KEY_INVALID_CHARACTERS, '-');\n          this.handleProjectKeyChange(sanitizedProjectKey);\n        }\n      }\n    );\n  };\n\n  validateKey = (projectKey: string) => {\n    const result = validateProjectKey(projectKey);\n    return result === ProjectKeyValidationResult.Valid\n      ? undefined\n      : translate('onboarding.create_project.project_key.error', result);\n  };\n\n  validateName = (projectName: string) => {\n    if (projectName.length === 0) {\n      return translate('onboarding.create_project.display_name.error.empty');\n    } else if (projectName.length > PROJECT_NAME_MAX_LEN) {\n      return translate('onboarding.create_project.display_name.error.too_long');\n    }\n    return undefined;\n  };\n\n  render() {\n    const {\n      projectKey,\n      projectKeyError,\n      projectKeyTouched,\n      projectName,\n      projectNameError,\n      projectNameTouched,\n      validatingProjectKey,\n      submitting\n    } = this.state;\n    const { branchesEnabled } = this.props;\n\n    const touched = !!(projectKeyTouched || projectNameTouched);\n    const projectNameIsInvalid = touched && projectNameError !== undefined;\n    const projectNameIsValid = touched && projectNameError === undefined;\n\n    return (\n      <>\n        <CreateProjectPageHeader title={translate('onboarding.create_project.setup_manually')} />\n\n        <div className=\"create-project-manual\">\n          <div className=\"flex-1 huge-spacer-right\">\n            <form className=\"manual-project-create\" onSubmit={this.handleFormSubmit}>\n              <MandatoryFieldsExplanation className=\"big-spacer-bottom\" />\n\n              <ValidationInput\n                className=\"form-field\"\n                description={translate('onboarding.create_project.display_name.description')}\n                error={projectNameError}\n                id=\"project-name\"\n                isInvalid={projectNameIsInvalid}\n                isValid={projectNameIsValid}\n                label={translate('onboarding.create_project.display_name')}\n                required={true}>\n                <input\n                  className={classNames('input-super-large', {\n                    'is-invalid': projectNameIsInvalid,\n                    'is-valid': projectNameIsValid\n                  })}\n                  id=\"project-name\"\n                  maxLength={PROJECT_NAME_MAX_LEN}\n                  minLength={1}\n                  onChange={e => this.handleProjectNameChange(e.currentTarget.value, true)}\n                  type=\"text\"\n                  value={projectName}\n                  autoFocus={true}\n                />\n              </ValidationInput>\n              <ProjectKeyInput\n                error={projectKeyError}\n                label={translate('onboarding.create_project.project_key')}\n                onProjectKeyChange={e => this.handleProjectKeyChange(e.currentTarget.value, true)}\n                projectKey={projectKey}\n                touched={touched}\n                validating={validatingProjectKey}\n              />\n\n              <SubmitButton disabled={!this.canSubmit(this.state) || submitting}>\n                {translate('set_up')}\n              </SubmitButton>\n              <DeferredSpinner className=\"spacer-left\" loading={submitting} />\n            </form>\n\n            {branchesEnabled && (\n              <Alert variant=\"info\" display=\"inline\" className=\"big-spacer-top\">\n                {translate('onboarding.create_project.pr_decoration.information')}\n              </Alert>\n            )}\n          </div>\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { WithRouterProps } from 'react-router';\nimport { getAlmSettings } from '../../../api/alm-settings';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport { whenLoggedIn } from '../../../components/hoc/whenLoggedIn';\nimport { withAppState } from '../../../components/hoc/withAppState';\nimport { translate } from '../../../helpers/l10n';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';\nimport AlmBindingDefinitionForm from '../../settings/components/almIntegration/AlmBindingDefinitionForm';\nimport AzureProjectCreate from './AzureProjectCreate';\nimport BitbucketCloudProjectCreate from './BitbucketCloudProjectCreate';\nimport BitbucketProjectCreate from './BitbucketProjectCreate';\nimport CreateProjectModeSelection from './CreateProjectModeSelection';\nimport GitHubProjectCreate from './GitHubProjectCreate';\nimport GitlabProjectCreate from './GitlabProjectCreate';\nimport ManualProjectCreate from './ManualProjectCreate';\nimport './style.css';\nimport { CreateProjectModes } from './types';\n\ninterface Props extends Pick<WithRouterProps, 'router' | 'location'> {\n  appState: Pick<T.AppState, 'canAdmin' | 'branchesEnabled'>;\n  currentUser: T.LoggedInUser;\n}\n\ninterface State {\n  azureSettings: AlmSettingsInstance[];\n  bitbucketSettings: AlmSettingsInstance[];\n  bitbucketCloudSettings: AlmSettingsInstance[];\n  githubSettings: AlmSettingsInstance[];\n  gitlabSettings: AlmSettingsInstance[];\n  loading: boolean;\n  creatingAlmDefinition?: AlmKeys;\n}\n\nconst PROJECT_MODE_FOR_ALM_KEY = {\n  [AlmKeys.Azure]: CreateProjectModes.AzureDevOps,\n  [AlmKeys.BitbucketCloud]: CreateProjectModes.BitbucketCloud,\n  [AlmKeys.BitbucketServer]: CreateProjectModes.BitbucketServer,\n  [AlmKeys.GitHub]: CreateProjectModes.GitHub,\n  [AlmKeys.GitLab]: CreateProjectModes.GitLab\n};\n\nexport class CreateProjectPage extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    azureSettings: [],\n    bitbucketSettings: [],\n    bitbucketCloudSettings: [],\n    githubSettings: [],\n    gitlabSettings: [],\n    loading: true\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchAlmBindings();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchAlmBindings = () => {\n    this.setState({ loading: true });\n    return getAlmSettings()\n      .then(almSettings => {\n        if (this.mounted) {\n          this.setState({\n            azureSettings: almSettings.filter(s => s.alm === AlmKeys.Azure),\n            bitbucketSettings: almSettings.filter(s => s.alm === AlmKeys.BitbucketServer),\n            bitbucketCloudSettings: almSettings.filter(s => s.alm === AlmKeys.BitbucketCloud),\n            githubSettings: almSettings.filter(s => s.alm === AlmKeys.GitHub),\n            gitlabSettings: almSettings.filter(s => s.alm === AlmKeys.GitLab),\n            loading: false\n          });\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      });\n  };\n\n  handleModeSelect = (mode: CreateProjectModes) => {\n    const { router, location } = this.props;\n    router.push({\n      pathname: location.pathname,\n      query: { mode }\n    });\n  };\n\n  handleModeConfig = (alm: AlmKeys) => {\n    this.setState({ creatingAlmDefinition: alm });\n  };\n\n  handleProjectCreate = (projectKey: string) => {\n    this.props.router.push(getProjectUrl(projectKey));\n  };\n\n  handleOnCancelCreation = () => {\n    this.setState({ creatingAlmDefinition: undefined });\n  };\n\n  handleAfterSubmit = async () => {\n    let { creatingAlmDefinition: createdAlmDefinition } = this.state;\n\n    this.setState({ creatingAlmDefinition: undefined });\n\n    await this.fetchAlmBindings();\n\n    if (this.mounted && createdAlmDefinition) {\n      const { bitbucketCloudSettings } = this.state;\n\n      if (createdAlmDefinition === AlmKeys.BitbucketServer && bitbucketCloudSettings.length > 0) {\n        createdAlmDefinition = AlmKeys.BitbucketCloud;\n      }\n\n      this.handleModeSelect(PROJECT_MODE_FOR_ALM_KEY[createdAlmDefinition]);\n    }\n  };\n\n  renderProjectCreation(mode?: CreateProjectModes) {\n    const {\n      appState: { canAdmin, branchesEnabled },\n      location,\n      router\n    } = this.props;\n    const {\n      azureSettings,\n      bitbucketSettings,\n      bitbucketCloudSettings,\n      githubSettings,\n      gitlabSettings,\n      loading\n    } = this.state;\n\n    switch (mode) {\n      case CreateProjectModes.AzureDevOps: {\n        return (\n          <AzureProjectCreate\n            canAdmin={!!canAdmin}\n            loadingBindings={loading}\n            location={location}\n            onProjectCreate={this.handleProjectCreate}\n            router={router}\n            settings={azureSettings}\n          />\n        );\n      }\n      case CreateProjectModes.BitbucketServer: {\n        return (\n          <BitbucketProjectCreate\n            canAdmin={!!canAdmin}\n            bitbucketSettings={bitbucketSettings}\n            loadingBindings={loading}\n            location={location}\n            onProjectCreate={this.handleProjectCreate}\n            router={router}\n          />\n        );\n      }\n      case CreateProjectModes.BitbucketCloud: {\n        return (\n          <BitbucketCloudProjectCreate\n            canAdmin={!!canAdmin}\n            loadingBindings={loading}\n            location={location}\n            onProjectCreate={this.handleProjectCreate}\n            router={router}\n            settings={bitbucketCloudSettings}\n          />\n        );\n      }\n      case CreateProjectModes.GitHub: {\n        return (\n          <GitHubProjectCreate\n            canAdmin={!!canAdmin}\n            loadingBindings={loading}\n            location={location}\n            onProjectCreate={this.handleProjectCreate}\n            router={router}\n            settings={githubSettings}\n          />\n        );\n      }\n      case CreateProjectModes.GitLab: {\n        return (\n          <GitlabProjectCreate\n            canAdmin={!!canAdmin}\n            loadingBindings={loading}\n            location={location}\n            onProjectCreate={this.handleProjectCreate}\n            router={router}\n            settings={gitlabSettings}\n          />\n        );\n      }\n      case CreateProjectModes.Manual: {\n        return (\n          <ManualProjectCreate\n            branchesEnabled={!!branchesEnabled}\n            onProjectCreate={this.handleProjectCreate}\n          />\n        );\n      }\n      default: {\n        const almCounts = {\n          [AlmKeys.Azure]: azureSettings.length,\n          [AlmKeys.BitbucketServer]: bitbucketSettings.length,\n          [AlmKeys.BitbucketCloud]: bitbucketCloudSettings.length,\n          [AlmKeys.GitHub]: githubSettings.length,\n          [AlmKeys.GitLab]: gitlabSettings.length\n        };\n        return (\n          <CreateProjectModeSelection\n            almCounts={almCounts}\n            loadingBindings={loading}\n            onSelectMode={this.handleModeSelect}\n            onConfigMode={this.handleModeConfig}\n          />\n        );\n      }\n    }\n  }\n\n  render() {\n    const { location } = this.props;\n    const { creatingAlmDefinition } = this.state;\n    const mode: CreateProjectModes | undefined = location.query?.mode;\n\n    return (\n      <>\n        <Helmet title={translate('onboarding.create_project.select_method')} titleTemplate=\"%s\" />\n        <A11ySkipTarget anchor=\"create_project_main\" />\n        <div className=\"page page-limited huge-spacer-bottom position-relative\" id=\"create-project\">\n          {this.renderProjectCreation(mode)}\n          {creatingAlmDefinition && (\n            <AlmBindingDefinitionForm\n              alm={creatingAlmDefinition}\n              alreadyHaveInstanceConfigured={false}\n              onCancel={this.handleOnCancelCreation}\n              afterSubmit={this.handleAfterSubmit}\n              enforceValidation={true}\n            />\n          )}\n        </div>\n      </>\n    );\n  }\n}\n\nexport default whenLoggedIn(withAppState(CreateProjectPage));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { RedirectFunction, RouterState } from 'react-router';\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\nimport { save } from '../../helpers/storage';\nimport { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER } from './utils';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/DefaultPageSelector')) }\n  },\n  {\n    path: 'all',\n    onEnter(_: RouterState, replace: RedirectFunction) {\n      save(PROJECTS_DEFAULT_FILTER, PROJECTS_ALL);\n      replace('/projects');\n    }\n  },\n  {\n    path: 'favorite',\n    component: lazyLoadComponent(() => import('./components/FavoriteProjectsContainer'))\n  },\n  {\n    path: 'create',\n    component: lazyLoadComponent(() => import('../create/project/CreateProjectPage'))\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { createProject } from '../../api/components';\nimport VisibilitySelector from '../../components/common/VisibilitySelector';\nimport { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';\nimport Modal from '../../components/controls/Modal';\nimport { Alert } from '../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../helpers/l10n';\nimport { getProjectUrl } from '../../helpers/urls';\n\ninterface Props {\n  defaultProjectVisibility?: T.Visibility;\n  onClose: () => void;\n  onProjectCreated: () => void;\n}\n\ninterface State {\n  createdProject?: { key: string; name: string };\n  key: string;\n  loading: boolean;\n  name: string;\n  visibility?: T.Visibility;\n  // add index declaration to be able to do `this.setState({ [name]: value });`\n  [x: string]: any;\n}\n\nexport default class CreateProjectForm extends React.PureComponent<Props, State> {\n  closeButton?: HTMLElement | null;\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      key: '',\n      loading: false,\n      name: '',\n      visibility: props.defaultProjectVisibility\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentDidUpdate() {\n    // wrap with `setTimeout` because of https://github.com/reactjs/react-modal/issues/338\n    setTimeout(() => {\n      if (this.closeButton) {\n        this.closeButton.focus();\n      }\n    }, 0);\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleInputChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n    const { name, value } = event.currentTarget;\n    this.setState({ [name]: value });\n  };\n\n  handleVisibilityChange = (visibility: T.Visibility) => {\n    this.setState({ visibility });\n  };\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n\n    const data = {\n      name: this.state.name,\n      project: this.state.key,\n      visibility: this.state.visibility\n    };\n\n    this.setState({ loading: true });\n    createProject(data).then(\n      response => {\n        if (this.mounted) {\n          this.setState({ createdProject: response.project, loading: false });\n          this.props.onProjectCreated();\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  render() {\n    const { defaultProjectVisibility } = this.props;\n    const { createdProject } = this.state;\n\n    return (\n      <Modal contentLabel=\"modal form\" onRequestClose={this.props.onClose}>\n        {createdProject ? (\n          <div>\n            <header className=\"modal-head\">\n              <h2>{translate('qualifiers.create.TRK')}</h2>\n            </header>\n\n            <div className=\"modal-body\">\n              <Alert variant=\"success\">\n                <FormattedMessage\n                  defaultMessage={translate(\n                    'projects_management.project_has_been_successfully_created'\n                  )}\n                  id=\"projects_management.project_has_been_successfully_created\"\n                  values={{\n                    project: (\n                      <Link to={getProjectUrl(createdProject.key)}>{createdProject.name}</Link>\n                    )\n                  }}\n                />\n              </Alert>\n            </div>\n\n            <footer className=\"modal-foot\">\n              <ResetButtonLink\n                id=\"create-project-close\"\n                innerRef={node => (this.closeButton = node)}\n                onClick={this.props.onClose}>\n                {translate('close')}\n              </ResetButtonLink>\n            </footer>\n          </div>\n        ) : (\n          <form id=\"create-project-form\" onSubmit={this.handleFormSubmit}>\n            <header className=\"modal-head\">\n              <h2>{translate('qualifiers.create.TRK')}</h2>\n            </header>\n\n            <div className=\"modal-body\">\n              <MandatoryFieldsExplanation className=\"modal-field\" />\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-project-name\">\n                  {translate('name')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  autoFocus={true}\n                  id=\"create-project-name\"\n                  maxLength={2000}\n                  name=\"name\"\n                  onChange={this.handleInputChange}\n                  required={true}\n                  type=\"text\"\n                  value={this.state.name}\n                />\n              </div>\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-project-key\">\n                  {translate('key')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  id=\"create-project-key\"\n                  maxLength={400}\n                  name=\"key\"\n                  onChange={this.handleInputChange}\n                  required={true}\n                  type=\"text\"\n                  value={this.state.key}\n                />\n              </div>\n              <div className=\"modal-field\">\n                <label>{translate('visibility')}</label>\n                <VisibilitySelector\n                  canTurnToPrivate={defaultProjectVisibility !== undefined}\n                  className=\"little-spacer-top\"\n                  onChange={this.handleVisibilityChange}\n                  visibility={this.state.visibility}\n                />\n              </div>\n            </div>\n\n            <footer className=\"modal-foot\">\n              {this.state.loading && <i className=\"spinner spacer-right\" />}\n              <SubmitButton disabled={this.state.loading} id=\"create-project-submit\">\n                {translate('create')}\n              </SubmitButton>\n              <ResetButtonLink id=\"create-project-cancel\" onClick={this.props.onClose}>\n                {translate('cancel')}\n              </ResetButtonLink>\n            </footer>\n          </form>\n        )}\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button, ResetButtonLink } from '../../components/controls/buttons';\nimport Modal from '../../components/controls/Modal';\nimport Radio from '../../components/controls/Radio';\nimport { Alert } from '../../components/ui/Alert';\nimport { translate } from '../../helpers/l10n';\n\nexport interface Props {\n  defaultVisibility: T.Visibility;\n  onClose: () => void;\n  onConfirm: (visiblity: T.Visibility) => void;\n}\n\ninterface State {\n  visibility: T.Visibility;\n}\n\nexport default class ChangeDefaultVisibilityForm extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = { visibility: props.defaultVisibility };\n  }\n\n  handleConfirmClick = () => {\n    this.props.onConfirm(this.state.visibility);\n    this.props.onClose();\n  };\n\n  handleVisibilityChange = (visibility: T.Visibility) => {\n    this.setState({ visibility });\n  };\n\n  render() {\n    return (\n      <Modal contentLabel=\"modal form\" onRequestClose={this.props.onClose}>\n        <header className=\"modal-head\">\n          <h2>{translate('settings.projects.change_visibility_form.header')}</h2>\n        </header>\n\n        <div className=\"modal-body\">\n          {['public', 'private'].map(visibility => (\n            <div className=\"big-spacer-bottom\" key={visibility}>\n              <Radio\n                value={visibility}\n                checked={this.state.visibility === visibility}\n                onCheck={this.handleVisibilityChange}>\n                <div>\n                  {translate('visibility', visibility)}\n                  <p className=\"text-muted spacer-top\">\n                    {translate('visibility', visibility, 'description.short')}\n                  </p>\n                </div>\n              </Radio>\n            </div>\n          ))}\n\n          <Alert variant=\"warning\">\n            {translate('settings.projects.change_visibility_form.warning')}\n          </Alert>\n        </div>\n\n        <footer className=\"modal-foot\">\n          <Button className=\"js-confirm\" onClick={this.handleConfirmClick}>\n            {translate('settings.projects.change_visibility_form.submit')}\n          </Button>\n          <ResetButtonLink className=\"js-modal-close\" onClick={this.props.onClose}>\n            {translate('cancel')}\n          </ResetButtonLink>\n        </footer>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button, EditButton } from '../../components/controls/buttons';\nimport { translate } from '../../helpers/l10n';\nimport ChangeDefaultVisibilityForm from './ChangeDefaultVisibilityForm';\n\nexport interface Props {\n  defaultProjectVisibility?: T.Visibility;\n  hasProvisionPermission?: boolean;\n  onProjectCreate: () => void;\n  onChangeDefaultProjectVisibility: (visibility: T.Visibility) => void;\n}\n\ninterface State {\n  visibilityForm: boolean;\n}\n\nexport default class Header extends React.PureComponent<Props, State> {\n  state: State = { visibilityForm: false };\n\n  handleChangeVisibilityClick = () => {\n    this.setState({ visibilityForm: true });\n  };\n\n  closeVisiblityForm = () => {\n    this.setState({ visibilityForm: false });\n  };\n\n  render() {\n    const { defaultProjectVisibility, hasProvisionPermission } = this.props;\n    const { visibilityForm } = this.state;\n\n    return (\n      <header className=\"page-header\">\n        <h1 className=\"page-title\">{translate('projects_management')}</h1>\n\n        <div className=\"page-actions\">\n          <span className=\"big-spacer-right\">\n            <span className=\"text-middle\">\n              {translate('settings.projects.default_visibility_of_new_projects')}{' '}\n              <strong>\n                {defaultProjectVisibility ? translate('visibility', defaultProjectVisibility) : '\u2014'}\n              </strong>\n            </span>\n            <EditButton\n              className=\"js-change-visibility spacer-left button-small\"\n              onClick={this.handleChangeVisibilityClick}\n            />\n          </span>\n\n          {hasProvisionPermission && (\n            <Button id=\"create-project\" onClick={this.props.onProjectCreate}>\n              {translate('qualifiers.create.TRK')}\n            </Button>\n          )}\n        </div>\n\n        <p className=\"page-description\">{translate('projects_management.page.description')}</p>\n\n        {visibilityForm && (\n          <ChangeDefaultVisibilityForm\n            defaultVisibility={defaultProjectVisibility || 'public'}\n            onClose={this.closeVisiblityForm}\n            onConfirm={this.props.onChangeDefaultProjectVisibility}\n          />\n        )}\n      </header>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Project } from '../../api/components';\nimport { grantPermissionToUser } from '../../api/permissions';\nimport { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';\nimport Modal from '../../components/controls/Modal';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  currentUser: Pick<T.LoggedInUser, 'login'>;\n  onClose: () => void;\n  onRestoreAccess: () => void;\n  project: Project;\n}\n\ninterface State {\n  loading: boolean;\n}\n\nexport default class RestoreAccessModal extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ loading: true });\n    Promise.all([this.grantPermission('user'), this.grantPermission('admin')]).then(\n      this.props.onRestoreAccess,\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  grantPermission = (permission: string) =>\n    grantPermissionToUser({\n      projectKey: this.props.project.key,\n      login: this.props.currentUser.login,\n      permission\n    });\n\n  render() {\n    const header = translate('global_permissions.restore_access');\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <form onSubmit={this.handleFormSubmit}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n          </header>\n\n          <div className=\"modal-body\">\n            <FormattedMessage\n              defaultMessage={translate('global_permissions.restore_access.message')}\n              id=\"global_permissions.restore_access.message\"\n              values={{\n                browse: <strong>{translate('projects_role.user')}</strong>,\n                administer: <strong>{translate('projects_role.admin')}</strong>\n              }}\n            />\n          </div>\n\n          <footer className=\"modal-foot\">\n            {this.state.loading && <i className=\"spinner spacer-right\" />}\n            <SubmitButton disabled={this.state.loading}>{translate('restore')}</SubmitButton>\n            <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Project } from '../../api/components';\nimport { getComponentNavigation } from '../../api/nav';\nimport ActionsDropdown, { ActionsDropdownItem } from '../../components/controls/ActionsDropdown';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate } from '../../helpers/l10n';\nimport { getComponentPermissionsUrl } from '../../helpers/urls';\nimport ApplyTemplate from '../permissions/project/components/ApplyTemplate';\nimport RestoreAccessModal from './RestoreAccessModal';\n\nexport interface Props {\n  currentUser: Pick<T.LoggedInUser, 'login'>;\n  project: Project;\n}\n\ninterface State {\n  applyTemplateModal: boolean;\n  hasAccess?: boolean;\n  loading: boolean;\n  restoreAccessModal: boolean;\n}\n\nexport default class ProjectRowActions extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { applyTemplateModal: false, loading: false, restoreAccessModal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchPermissions = () => {\n    this.setState({ loading: true });\n    getComponentNavigation({ component: this.props.project.key }).then(\n      ({ configuration }) => {\n        if (this.mounted) {\n          const hasAccess = Boolean(\n            configuration && configuration.showPermissions && configuration.canBrowseProject\n          );\n          this.setState({ hasAccess, loading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleDropdownOpen = () => {\n    if (this.state.hasAccess === undefined && !this.state.loading) {\n      this.fetchPermissions();\n    }\n  };\n\n  handleApplyTemplateClick = () => {\n    this.setState({ applyTemplateModal: true });\n  };\n\n  handleApplyTemplateClose = () => {\n    if (this.mounted) {\n      this.setState({ applyTemplateModal: false });\n    }\n  };\n\n  handleRestoreAccessClick = () => {\n    this.setState({ restoreAccessModal: true });\n  };\n\n  handleRestoreAccessClose = () => this.setState({ restoreAccessModal: false });\n\n  handleRestoreAccessDone = () => {\n    this.setState({ hasAccess: true, restoreAccessModal: false });\n  };\n\n  render() {\n    const { hasAccess, loading } = this.state;\n\n    return (\n      <>\n        <ActionsDropdown onOpen={this.handleDropdownOpen}>\n          {loading ? (\n            <ActionsDropdownItem>\n              <DeferredSpinner />\n            </ActionsDropdownItem>\n          ) : (\n            <>\n              {hasAccess === true && (\n                <ActionsDropdownItem\n                  className=\"js-edit-permissions\"\n                  to={getComponentPermissionsUrl(this.props.project.key)}>\n                  {translate('edit_permissions')}\n                </ActionsDropdownItem>\n              )}\n\n              {hasAccess === false && (\n                <ActionsDropdownItem\n                  className=\"js-restore-access\"\n                  onClick={this.handleRestoreAccessClick}>\n                  {translate('global_permissions.restore_access')}\n                </ActionsDropdownItem>\n              )}\n            </>\n          )}\n\n          <ActionsDropdownItem\n            className=\"js-apply-template\"\n            onClick={this.handleApplyTemplateClick}>\n            {translate('projects_role.apply_template')}\n          </ActionsDropdownItem>\n        </ActionsDropdown>\n\n        {this.state.restoreAccessModal && (\n          <RestoreAccessModal\n            currentUser={this.props.currentUser}\n            onClose={this.handleRestoreAccessClose}\n            onRestoreAccess={this.handleRestoreAccessDone}\n            project={this.props.project}\n          />\n        )}\n\n        {this.state.applyTemplateModal && (\n          <ApplyTemplate onClose={this.handleApplyTemplateClose} project={this.props.project} />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { Project } from '../../api/components';\nimport PrivacyBadgeContainer from '../../components/common/PrivacyBadgeContainer';\nimport Checkbox from '../../components/controls/Checkbox';\nimport Tooltip from '../../components/controls/Tooltip';\nimport QualifierIcon from '../../components/icons/QualifierIcon';\nimport DateFormatter from '../../components/intl/DateFormatter';\nimport { getComponentOverviewUrl } from '../../helpers/urls';\nimport './ProjectRow.css';\nimport ProjectRowActions from './ProjectRowActions';\n\ninterface Props {\n  currentUser: Pick<T.LoggedInUser, 'login'>;\n  onProjectCheck: (project: Project, checked: boolean) => void;\n  project: Project;\n  selected: boolean;\n}\n\nexport default class ProjectRow extends React.PureComponent<Props> {\n  handleProjectCheck = (checked: boolean) => {\n    this.props.onProjectCheck(this.props.project, checked);\n  };\n\n  render() {\n    const { project, selected } = this.props;\n\n    return (\n      <tr data-project-key={project.key}>\n        <td className=\"thin\">\n          <Checkbox checked={selected} onCheck={this.handleProjectCheck} />\n        </td>\n\n        <td className=\"nowrap hide-overflow project-row-text-cell\">\n          <Link\n            className=\"link-with-icon\"\n            to={getComponentOverviewUrl(project.key, project.qualifier)}>\n            <QualifierIcon className=\"little-spacer-right\" qualifier={project.qualifier} />\n\n            <Tooltip overlay={project.name} placement=\"left\">\n              <span>{project.name}</span>\n            </Tooltip>\n          </Link>\n        </td>\n\n        <td className=\"thin nowrap\">\n          <PrivacyBadgeContainer qualifier={project.qualifier} visibility={project.visibility} />\n        </td>\n\n        <td className=\"nowrap hide-overflow project-row-text-cell\">\n          <Tooltip overlay={project.key} placement=\"left\">\n            <span className=\"note\">{project.key}</span>\n          </Tooltip>\n        </td>\n\n        <td className=\"thin nowrap text-right\">\n          {project.lastAnalysisDate ? (\n            <DateFormatter date={project.lastAnalysisDate} />\n          ) : (\n            <span className=\"note\">\u2014</span>\n          )}\n        </td>\n\n        <td className=\"thin nowrap\">\n          <ProjectRowActions currentUser={this.props.currentUser} project={project} />\n        </td>\n      </tr>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Project } from '../../api/components';\nimport { translate } from '../../helpers/l10n';\nimport ProjectRow from './ProjectRow';\n\ninterface Props {\n  currentUser: Pick<T.LoggedInUser, 'login'>;\n  onProjectDeselected: (project: string) => void;\n  onProjectSelected: (project: string) => void;\n  projects: Project[];\n  ready?: boolean;\n  selection: string[];\n}\n\nexport default class Projects extends React.PureComponent<Props> {\n  onProjectCheck = (project: Project, checked: boolean) => {\n    if (checked) {\n      this.props.onProjectSelected(project.key);\n    } else {\n      this.props.onProjectDeselected(project.key);\n    }\n  };\n\n  render() {\n    return (\n      <div className=\"boxed-group boxed-group-inner\">\n        <table\n          className={classNames('data', 'zebra', { 'new-loading': !this.props.ready })}\n          id=\"projects-management-page-projects\">\n          <thead>\n            <tr>\n              <th />\n              <th>{translate('name')}</th>\n              <th />\n              <th>{translate('key')}</th>\n              <th className=\"thin nowrap text-right\">{translate('last_analysis')}</th>\n              <th />\n            </tr>\n          </thead>\n          <tbody>\n            {this.props.projects.map(project => (\n              <ProjectRow\n                currentUser={this.props.currentUser}\n                key={project.key}\n                onProjectCheck={this.onProjectCheck}\n                project={project}\n                selected={this.props.selection.includes(project.key)}\n              />\n            ))}\n          </tbody>\n        </table>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { bulkApplyTemplate, getPermissionTemplates } from '../../api/permissions';\nimport { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';\nimport Modal from '../../components/controls/Modal';\nimport Select from '../../components/controls/Select';\nimport { Alert } from '../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation';\nimport { toNotSoISOString } from '../../helpers/dates';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\n\nexport interface Props {\n  analyzedBefore: Date | undefined;\n  onClose: () => void;\n  provisioned: boolean;\n  qualifier: string;\n  query: string;\n  selection: string[];\n  total: number;\n}\n\ninterface State {\n  done: boolean;\n  loading: boolean;\n  permissionTemplate?: string;\n  permissionTemplates?: T.PermissionTemplate[];\n  submitting: boolean;\n}\n\nexport default class BulkApplyTemplateModal extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { done: false, loading: true, submitting: false };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadPermissionTemplates();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadPermissionTemplates() {\n    this.setState({ loading: true });\n    getPermissionTemplates().then(\n      ({ permissionTemplates }) => {\n        if (this.mounted) {\n          this.setState({\n            loading: false,\n            permissionTemplate:\n              permissionTemplates.length > 0 ? permissionTemplates[0].id : undefined,\n            permissionTemplates\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  }\n\n  handleConfirmClick = () => {\n    const { analyzedBefore } = this.props;\n    const { permissionTemplate } = this.state;\n    if (permissionTemplate) {\n      this.setState({ submitting: true });\n      const parameters = this.props.selection.length\n        ? {\n            projects: this.props.selection.join(),\n            qualifiers: this.props.qualifier,\n            templateId: permissionTemplate\n          }\n        : {\n            analyzedBefore: analyzedBefore && toNotSoISOString(analyzedBefore),\n            onProvisionedOnly: this.props.provisioned || undefined,\n            qualifiers: this.props.qualifier,\n            q: this.props.query || undefined,\n            templateId: permissionTemplate\n          };\n      bulkApplyTemplate(parameters).then(\n        () => {\n          if (this.mounted) {\n            this.setState({ done: true, submitting: false });\n          }\n        },\n        () => {\n          if (this.mounted) {\n            this.setState({ submitting: false });\n          }\n        }\n      );\n    }\n  };\n\n  handlePermissionTemplateChange = ({ value }: { value: string }) => {\n    this.setState({ permissionTemplate: value });\n  };\n\n  renderWarning = () => (\n    <Alert variant=\"warning\">\n      {this.props.selection.length\n        ? translateWithParameters(\n            'permission_templates.bulk_apply_permission_template.apply_to_selected',\n            this.props.selection.length\n          )\n        : translateWithParameters(\n            'permission_templates.bulk_apply_permission_template.apply_to_all',\n            this.props.total\n          )}\n    </Alert>\n  );\n\n  renderSelect = () => (\n    <div className=\"modal-field\">\n      <label>\n        {translate('template')}\n        <MandatoryFieldMarker />\n      </label>\n      <Select\n        clearable={false}\n        disabled={this.state.submitting}\n        onChange={this.handlePermissionTemplateChange}\n        options={this.state.permissionTemplates!.map(t => ({ label: t.name, value: t.id }))}\n        value={this.state.permissionTemplate}\n      />\n    </div>\n  );\n\n  render() {\n    const { done, loading, permissionTemplates, submitting } = this.state;\n    const header = translate('permission_templates.bulk_apply_permission_template');\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose} size=\"small\">\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n\n        <div className=\"modal-body\">\n          {done && (\n            <Alert variant=\"success\">{translate('projects_role.apply_template.success')}</Alert>\n          )}\n\n          {loading && <i className=\"spinner\" />}\n\n          {!loading && !done && permissionTemplates && (\n            <>\n              <MandatoryFieldsExplanation className=\"spacer-bottom\" />\n              {this.renderWarning()}\n              {this.renderSelect()}\n            </>\n          )}\n        </div>\n\n        <footer className=\"modal-foot\">\n          {submitting && <i className=\"spinner spacer-right\" />}\n          {!loading && !done && permissionTemplates && (\n            <SubmitButton disabled={submitting} onClick={this.handleConfirmClick}>\n              {translate('apply')}\n            </SubmitButton>\n          )}\n          <ResetButtonLink onClick={this.props.onClose}>\n            {done ? translate('close') : translate('cancel')}\n          </ResetButtonLink>\n        </footer>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { bulkDeleteProjects } from '../../api/components';\nimport { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';\nimport Modal from '../../components/controls/Modal';\nimport { Alert } from '../../components/ui/Alert';\nimport { toNotSoISOString } from '../../helpers/dates';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\n\nexport interface Props {\n  analyzedBefore: Date | undefined;\n  onClose: () => void;\n  onConfirm: () => void;\n  provisioned: boolean;\n  qualifier: string;\n  query: string;\n  selection: string[];\n  total: number;\n}\n\ninterface State {\n  loading: boolean;\n}\n\nexport default class DeleteModal extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleConfirmClick = () => {\n    this.setState({ loading: true });\n    const { analyzedBefore } = this.props;\n    const parameters = this.props.selection.length\n      ? {\n          projects: this.props.selection.join()\n        }\n      : {\n          analyzedBefore: analyzedBefore && toNotSoISOString(analyzedBefore),\n          onProvisionedOnly: this.props.provisioned || undefined,\n          qualifiers: this.props.qualifier,\n          q: this.props.query || undefined\n        };\n    bulkDeleteProjects(parameters).then(\n      () => {\n        if (this.mounted) {\n          this.props.onConfirm();\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  renderWarning = () => (\n    <Alert variant=\"warning\">\n      {this.props.selection.length\n        ? translateWithParameters(\n            'projects_management.delete_selected_warning',\n            this.props.selection.length\n          )\n        : translateWithParameters('projects_management.delete_all_warning', this.props.total)}\n    </Alert>\n  );\n\n  render() {\n    const header = translate('qualifiers.delete', this.props.qualifier);\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n\n        <div className=\"modal-body\">\n          {this.renderWarning()}\n          {translate('qualifiers.delete_confirm', this.props.qualifier)}\n        </div>\n\n        <footer className=\"modal-foot\">\n          {this.state.loading && <i className=\"spinner spacer-right\" />}\n          <SubmitButton\n            className=\"button-red\"\n            disabled={this.state.loading}\n            onClick={this.handleConfirmClick}>\n            {translate('delete')}\n          </SubmitButton>\n          <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n        </footer>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Project } from '../../api/components';\nimport { Button } from '../../components/controls/buttons';\nimport Checkbox from '../../components/controls/Checkbox';\nimport DateInput from '../../components/controls/DateInput';\nimport HelpTooltip from '../../components/controls/HelpTooltip';\nimport SearchBox from '../../components/controls/SearchBox';\nimport Select from '../../components/controls/Select';\nimport QualifierIcon from '../../components/icons/QualifierIcon';\nimport { translate } from '../../helpers/l10n';\nimport BulkApplyTemplateModal from './BulkApplyTemplateModal';\nimport DeleteModal from './DeleteModal';\n\nexport interface Props {\n  analyzedBefore: Date | undefined;\n  onAllDeselected: () => void;\n  onAllSelected: () => void;\n  onDateChanged: (analyzedBefore: Date | undefined) => void;\n  onDeleteProjects: () => void;\n  onProvisionedChanged: (provisioned: boolean) => void;\n  onQualifierChanged: (qualifier: string) => void;\n  onVisibilityChanged: (qualifier: string) => void;\n  onSearch: (query: string) => void;\n  projects: Project[];\n  provisioned: boolean;\n  qualifiers: string;\n  query: string;\n  ready: boolean;\n  selection: any[];\n  topLevelQualifiers: string[];\n  total: number;\n  visibility?: T.Visibility;\n}\n\ninterface State {\n  bulkApplyTemplateModal: boolean;\n  deleteModal: boolean;\n}\n\nconst QUALIFIERS_ORDER = ['TRK', 'VW', 'APP'];\n\nexport default class Search extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { bulkApplyTemplateModal: false, deleteModal: false };\n\n  getQualifierOptions = () => {\n    const options = this.props.topLevelQualifiers.map(q => ({\n      label: translate('qualifiers', q),\n      value: q\n    }));\n    return sortBy(options, option => QUALIFIERS_ORDER.indexOf(option.value));\n  };\n\n  onCheck = (checked: boolean) => {\n    if (checked) {\n      this.props.onAllSelected();\n    } else {\n      this.props.onAllDeselected();\n    }\n  };\n\n  handleDeleteClick = () => {\n    this.setState({ deleteModal: true });\n  };\n\n  closeDeleteModal = () => {\n    this.setState({ deleteModal: false });\n  };\n\n  handleDeleteConfirm = () => {\n    this.closeDeleteModal();\n    this.props.onDeleteProjects();\n  };\n\n  handleBulkApplyTemplateClick = () => {\n    this.setState({ bulkApplyTemplateModal: true });\n  };\n\n  closeBulkApplyTemplateModal = () => {\n    this.setState({ bulkApplyTemplateModal: false });\n  };\n\n  handleQualifierChange = ({ value }: { value: string }) => this.props.onQualifierChanged(value);\n\n  handleVisibilityChange = ({ value }: { value: string }) => this.props.onVisibilityChanged(value);\n\n  renderCheckbox = () => {\n    const isAllChecked =\n      this.props.projects.length > 0 && this.props.selection.length === this.props.projects.length;\n    const thirdState =\n      this.props.projects.length > 0 &&\n      this.props.selection.length > 0 &&\n      this.props.selection.length < this.props.projects.length;\n    const checked = isAllChecked || thirdState;\n    return (\n      <Checkbox\n        checked={checked}\n        id=\"projects-selection\"\n        onCheck={this.onCheck}\n        thirdState={thirdState}\n      />\n    );\n  };\n\n  renderQualifierOption = (option: { label: string; value: string }) => (\n    <span>\n      <QualifierIcon className=\"little-spacer-right\" qualifier={option.value} />\n      {option.label}\n    </span>\n  );\n\n  renderQualifierFilter = () => {\n    const options = this.getQualifierOptions();\n    if (options.length < 2) {\n      return null;\n    }\n    return (\n      <td className=\"thin nowrap text-middle\">\n        <Select\n          className=\"input-medium\"\n          clearable={false}\n          disabled={!this.props.ready}\n          name=\"projects-qualifier\"\n          onChange={this.handleQualifierChange}\n          optionRenderer={this.renderQualifierOption}\n          options={this.getQualifierOptions()}\n          searchable={false}\n          value={this.props.qualifiers}\n          valueRenderer={this.renderQualifierOption}\n        />\n      </td>\n    );\n  };\n\n  renderVisibilityFilter = () => {\n    return (\n      <td className=\"thin nowrap text-middle\">\n        <Select\n          className=\"input-small\"\n          clearable={false}\n          disabled={!this.props.ready}\n          name=\"projects-visibility\"\n          onChange={this.handleVisibilityChange}\n          options={[\n            { value: 'all', label: translate('visibility.both') },\n            { value: 'public', label: translate('visibility.public') },\n            { value: 'private', label: translate('visibility.private') }\n          ]}\n          searchable={false}\n          value={this.props.visibility || 'all'}\n        />\n      </td>\n    );\n  };\n\n  renderTypeFilter = () =>\n    this.props.qualifiers === 'TRK' ? (\n      <td className=\"thin nowrap text-middle\">\n        <Checkbox\n          checked={this.props.provisioned}\n          className=\"link-checkbox-control\"\n          id=\"projects-provisioned\"\n          onCheck={this.props.onProvisionedChanged}>\n          <span className=\"text-middle little-spacer-left\">\n            {translate('provisioning.only_provisioned')}\n          </span>\n        </Checkbox>\n        <HelpTooltip\n          className=\"spacer-left\"\n          overlay={translate('provisioning.only_provisioned.tooltip')}\n        />\n      </td>\n    ) : null;\n\n  renderDateFilter = () => {\n    return (\n      <td className=\"thin nowrap text-middle\">\n        <DateInput\n          inputClassName=\"input-medium\"\n          name=\"analyzed-before\"\n          onChange={this.props.onDateChanged}\n          placeholder={translate('last_analysis_before')}\n          value={this.props.analyzedBefore}\n        />\n      </td>\n    );\n  };\n\n  render() {\n    return (\n      <div className=\"big-spacer-bottom\">\n        <table className=\"data\">\n          <tbody>\n            <tr>\n              <td className=\"thin text-middle\">\n                {this.props.ready ? this.renderCheckbox() : <i className=\"spinner\" />}\n              </td>\n              {this.renderQualifierFilter()}\n              {this.renderDateFilter()}\n              {this.renderVisibilityFilter()}\n              {this.renderTypeFilter()}\n              <td className=\"text-middle\">\n                <SearchBox\n                  minLength={3}\n                  onChange={this.props.onSearch}\n                  placeholder={translate('search.search_by_name_or_key')}\n                  value={this.props.query}\n                />\n              </td>\n              <td className=\"thin nowrap text-middle\">\n                <Button\n                  className=\"js-bulk-apply-permission-template\"\n                  disabled={this.props.selection.length === 0}\n                  onClick={this.handleBulkApplyTemplateClick}>\n                  {translate('permission_templates.bulk_apply_permission_template')}\n                </Button>\n                {this.props.qualifiers === 'TRK' && (\n                  <Button\n                    className=\"js-delete spacer-left button-red\"\n                    disabled={this.props.selection.length === 0}\n                    onClick={this.handleDeleteClick}\n                    title={\n                      this.props.selection.length === 0\n                        ? translate('permission_templates.select_to_delete')\n                        : translate('permission_templates.delete_selected')\n                    }>\n                    {translate('delete')}\n                  </Button>\n                )}\n              </td>\n            </tr>\n          </tbody>\n        </table>\n\n        {this.state.bulkApplyTemplateModal && (\n          <BulkApplyTemplateModal\n            analyzedBefore={this.props.analyzedBefore}\n            onClose={this.closeBulkApplyTemplateModal}\n            provisioned={this.props.provisioned}\n            qualifier={this.props.qualifiers}\n            query={this.props.query}\n            selection={this.props.selection}\n            total={this.props.total}\n          />\n        )}\n\n        {this.state.deleteModal && (\n          <DeleteModal\n            analyzedBefore={this.props.analyzedBefore}\n            onClose={this.closeDeleteModal}\n            onConfirm={this.handleDeleteConfirm}\n            provisioned={this.props.provisioned}\n            qualifier={this.props.qualifiers}\n            query={this.props.query}\n            selection={this.props.selection}\n            total={this.props.total}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce, uniq, without } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { getComponents, Project } from '../../api/components';\nimport { changeProjectDefaultVisibility } from '../../api/permissions';\nimport { getValues } from '../../api/settings';\nimport Suggestions from '../../app/components/embed-docs-modal/Suggestions';\nimport ListFooter from '../../components/controls/ListFooter';\nimport { toShortNotSoISOString } from '../../helpers/dates';\nimport { translate } from '../../helpers/l10n';\nimport { hasGlobalPermission } from '../../helpers/users';\nimport { getAppState, getCurrentUser, Store } from '../../store/rootReducer';\nimport { Permissions } from '../../types/permissions';\nimport { SettingsKey } from '../../types/settings';\nimport CreateProjectForm from './CreateProjectForm';\nimport Header from './Header';\nimport Projects from './Projects';\nimport Search from './Search';\n\nexport interface Props {\n  currentUser: T.LoggedInUser;\n  appState: Pick<T.AppState, 'qualifiers'>;\n}\n\ninterface State {\n  analyzedBefore?: Date;\n  createProjectForm: boolean;\n  defaultProjectVisibility?: T.Visibility;\n  page: number;\n  projects: Project[];\n  provisioned: boolean;\n  qualifiers: string;\n  query: string;\n  ready: boolean;\n  selection: string[];\n  total: number;\n  visibility?: T.Visibility;\n}\n\nconst PAGE_SIZE = 50;\n\nexport class App extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      createProjectForm: false,\n      ready: false,\n      projects: [],\n      provisioned: false,\n      total: 0,\n      page: 1,\n      query: '',\n      qualifiers: 'TRK',\n      selection: []\n    };\n    this.requestProjects = debounce(this.requestProjects, 250);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.requestProjects();\n    this.fetchDefaultProjectVisibility();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchDefaultProjectVisibility = async () => {\n    const results = await getValues({ keys: SettingsKey.DefaultProjectVisibility });\n\n    if (this.mounted && results.length > 0 && results[0].value) {\n      this.setState({ defaultProjectVisibility: results[0].value as T.Visibility });\n    }\n  };\n\n  handleDefaultProjectVisibilityChange = async (visibility: T.Visibility) => {\n    await changeProjectDefaultVisibility(visibility);\n\n    if (this.mounted) {\n      this.setState({ defaultProjectVisibility: visibility });\n    }\n  };\n\n  requestProjects = () => {\n    const { analyzedBefore } = this.state;\n    const parameters = {\n      analyzedBefore: analyzedBefore && toShortNotSoISOString(analyzedBefore),\n      onProvisionedOnly: this.state.provisioned || undefined,\n      p: this.state.page !== 1 ? this.state.page : undefined,\n      ps: PAGE_SIZE,\n      q: this.state.query || undefined,\n      qualifiers: this.state.qualifiers,\n      visibility: this.state.visibility\n    };\n    return getComponents(parameters).then(r => {\n      if (this.mounted) {\n        let projects: Project[] = r.components;\n        if (this.state.page > 1) {\n          projects = [...this.state.projects, ...projects];\n        }\n        this.setState({ ready: true, projects, selection: [], total: r.paging.total });\n      }\n    });\n  };\n\n  loadMore = () => {\n    this.setState(({ page }) => ({ ready: false, page: page + 1 }), this.requestProjects);\n  };\n\n  onSearch = (query: string) => {\n    this.setState({ ready: false, page: 1, query, selection: [] }, this.requestProjects);\n  };\n\n  onProvisionedChanged = (provisioned: boolean) => {\n    this.setState(\n      { ready: false, page: 1, query: '', provisioned, qualifiers: 'TRK', selection: [] },\n      this.requestProjects\n    );\n  };\n\n  onQualifierChanged = (newQualifier: string) => {\n    this.setState(\n      {\n        ready: false,\n        page: 1,\n        provisioned: false,\n        query: '',\n        qualifiers: newQualifier,\n        selection: []\n      },\n      this.requestProjects\n    );\n  };\n\n  onVisibilityChanged = (newVisibility: T.Visibility | 'all') => {\n    this.setState(\n      {\n        ready: false,\n        page: 1,\n        provisioned: false,\n        query: '',\n        visibility: newVisibility === 'all' ? undefined : newVisibility,\n        selection: []\n      },\n      this.requestProjects\n    );\n  };\n\n  handleDateChanged = (analyzedBefore: Date | undefined) =>\n    this.setState({ ready: false, page: 1, analyzedBefore }, this.requestProjects);\n\n  onProjectSelected = (project: string) => {\n    this.setState(({ selection }) => ({ selection: uniq([...selection, project]) }));\n  };\n\n  onProjectDeselected = (project: string) => {\n    this.setState(({ selection }) => ({ selection: without(selection, project) }));\n  };\n\n  onAllSelected = () => {\n    this.setState(({ projects }) => ({ selection: projects.map(project => project.key) }));\n  };\n\n  onAllDeselected = () => {\n    this.setState({ selection: [] });\n  };\n\n  openCreateProjectForm = () => {\n    this.setState({ createProjectForm: true });\n  };\n\n  closeCreateProjectForm = () => {\n    this.setState({ createProjectForm: false });\n  };\n\n  render() {\n    const { appState, currentUser } = this.props;\n    const { defaultProjectVisibility } = this.state;\n    return (\n      <div className=\"page page-limited\" id=\"projects-management-page\">\n        <Suggestions suggestions=\"projects_management\" />\n        <Helmet defer={false} title={translate('projects_management')} />\n\n        <Header\n          defaultProjectVisibility={defaultProjectVisibility}\n          hasProvisionPermission={hasGlobalPermission(currentUser, Permissions.ProjectCreation)}\n          onChangeDefaultProjectVisibility={this.handleDefaultProjectVisibilityChange}\n          onProjectCreate={this.openCreateProjectForm}\n        />\n\n        <Search\n          analyzedBefore={this.state.analyzedBefore}\n          onAllDeselected={this.onAllDeselected}\n          onAllSelected={this.onAllSelected}\n          onDateChanged={this.handleDateChanged}\n          onDeleteProjects={this.requestProjects}\n          onProvisionedChanged={this.onProvisionedChanged}\n          onQualifierChanged={this.onQualifierChanged}\n          onSearch={this.onSearch}\n          onVisibilityChanged={this.onVisibilityChanged}\n          projects={this.state.projects}\n          provisioned={this.state.provisioned}\n          qualifiers={this.state.qualifiers}\n          query={this.state.query}\n          ready={this.state.ready}\n          selection={this.state.selection}\n          topLevelQualifiers={appState.qualifiers}\n          total={this.state.total}\n          visibility={this.state.visibility}\n        />\n\n        <Projects\n          currentUser={this.props.currentUser}\n          onProjectDeselected={this.onProjectDeselected}\n          onProjectSelected={this.onProjectSelected}\n          projects={this.state.projects}\n          ready={this.state.ready}\n          selection={this.state.selection}\n        />\n\n        <ListFooter\n          count={this.state.projects.length}\n          loadMore={this.loadMore}\n          ready={this.state.ready}\n          total={this.state.total}\n        />\n\n        {this.state.createProjectForm && (\n          <CreateProjectForm\n            defaultProjectVisibility={defaultProjectVisibility}\n            onClose={this.closeCreateProjectForm}\n            onProjectCreated={this.requestProjects}\n          />\n        )}\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({\n  appState: getAppState(state),\n  currentUser: getCurrentUser(state) as T.LoggedInUser\n});\n\nexport default connect(mapStateToProps)(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./App')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport getStore from '../../app/utils/getStore';\nimport { getLocalizedMetricName } from '../../helpers/l10n';\nimport { isDiffMetric } from '../../helpers/measures';\nimport { getMetricByKey } from '../../store/rootReducer';\n\nexport function checkIfDefault(qualityGate: T.QualityGate, list: T.QualityGate[]): boolean {\n  const finding = list.find(candidate => candidate.id === qualityGate.id);\n  return (finding && finding.isDefault) || false;\n}\n\nexport function addCondition(qualityGate: T.QualityGate, condition: T.Condition): T.QualityGate {\n  const oldConditions = qualityGate.conditions || [];\n  const conditions = [...oldConditions, condition];\n  return { ...qualityGate, conditions };\n}\n\nexport function deleteCondition(qualityGate: T.QualityGate, condition: T.Condition): T.QualityGate {\n  const conditions =\n    qualityGate.conditions && qualityGate.conditions.filter(candidate => candidate !== condition);\n  return { ...qualityGate, conditions };\n}\n\nexport function replaceCondition(\n  qualityGate: T.QualityGate,\n  newCondition: T.Condition,\n  oldCondition: T.Condition\n): T.QualityGate {\n  const conditions =\n    qualityGate.conditions &&\n    qualityGate.conditions.map(candidate => {\n      return candidate === oldCondition ? newCondition : candidate;\n    });\n  return { ...qualityGate, conditions };\n}\n\nexport function getPossibleOperators(metric: T.Metric) {\n  if (metric.direction === 1) {\n    return 'LT';\n  } else if (metric.direction === -1) {\n    return 'GT';\n  } else {\n    return ['LT', 'GT'];\n  }\n}\n\nexport function metricKeyExists(key: string) {\n  return getMetricByKey(getStore().getState(), key) !== undefined;\n}\n\nfunction getNoDiffMetric(metric: T.Metric) {\n  const store = getStore().getState();\n  const regularMetricKey = metric.key.replace(/^new_/, '');\n  if (isDiffMetric(metric.key) && metricKeyExists(regularMetricKey)) {\n    return getMetricByKey(store, regularMetricKey);\n  } else if (metric.key === 'new_maintainability_rating') {\n    return getMetricByKey(store, 'sqale_rating') || metric;\n  } else {\n    return metric;\n  }\n}\n\nexport function getLocalizedMetricNameNoDiffMetric(metric: T.Metric) {\n  return getLocalizedMetricName(getNoDiffMetric(metric));\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport { translate } from '../../../helpers/l10n';\nimport { getPossibleOperators } from '../utils';\n\ninterface Props {\n  metric: T.Metric;\n  onOperatorChange: (op: string) => void;\n  op?: string;\n}\n\nexport default class ConditionOperator extends React.PureComponent<Props> {\n  handleChange = ({ value }: { label: string; value: string }) => {\n    this.props.onOperatorChange(value);\n  };\n\n  getLabel(op: string, metric: T.Metric) {\n    return metric.type === 'RATING'\n      ? translate('quality_gates.operator', op, 'rating')\n      : translate('quality_gates.operator', op);\n  }\n\n  render() {\n    const operators = getPossibleOperators(this.props.metric);\n\n    if (Array.isArray(operators)) {\n      const operatorOptions = operators.map(op => {\n        const label = this.getLabel(op, this.props.metric);\n        return { label, value: op };\n      });\n\n      return (\n        <Select\n          autoFocus={true}\n          className=\"input-medium\"\n          clearable={false}\n          id=\"condition-operator\"\n          name=\"operator\"\n          onChange={this.handleChange}\n          options={operatorOptions}\n          searchable={false}\n          value={this.props.op}\n        />\n      );\n    } else {\n      return (\n        <span className=\"display-inline-block note abs-width-150\">\n          {this.getLabel(operators, this.props.metric)}\n        </span>\n      );\n    }\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport { getLocalizedMetricDomain, translate } from '../../../helpers/l10n';\nimport { getLocalizedMetricNameNoDiffMetric } from '../utils';\n\ninterface Props {\n  metric?: T.Metric;\n  metrics: T.Metric[];\n  onMetricChange: (metric: T.Metric) => void;\n}\n\ninterface Option {\n  disabled?: boolean;\n  label: string;\n  value: string;\n}\n\nexport default class MetricSelect extends React.PureComponent<Props> {\n  handleChange = (option: Option | null) => {\n    if (option) {\n      const { metrics } = this.props;\n      const selectedMetric = metrics.find(metric => metric.key === option.value);\n      if (selectedMetric) {\n        this.props.onMetricChange(selectedMetric);\n      }\n    }\n  };\n\n  render() {\n    const { metric, metrics } = this.props;\n\n    const options: Array<Option & { domain?: string }> = sortBy(\n      metrics.map(metric => ({\n        value: metric.key,\n        label: getLocalizedMetricNameNoDiffMetric(metric),\n        domain: metric.domain\n      })),\n      'domain'\n    );\n\n    // Use \"disabled\" property to emulate optgroups.\n    const optionsWithDomains: Option[] = [];\n    options.forEach((option, index, options) => {\n      const previous = index > 0 ? options[index - 1] : null;\n      if (option.domain && (!previous || previous.domain !== option.domain)) {\n        optionsWithDomains.push({\n          value: '<domain>',\n          label: getLocalizedMetricDomain(option.domain),\n          disabled: true\n        });\n      }\n      optionsWithDomains.push(option);\n    });\n\n    return (\n      <Select\n        className=\"text-middle quality-gate-metric-select\"\n        id=\"condition-metric\"\n        onChange={this.handleChange}\n        options={optionsWithDomains}\n        placeholder={translate('search.search_for_metrics')}\n        value={metric && metric.key}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\n\ninterface Props {\n  name: string;\n  value: string;\n  metric: T.Metric;\n  onChange: (value: string) => void;\n}\n\nexport default class ThresholdInput extends React.PureComponent<Props> {\n  handleChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\n    this.props.onChange(e.currentTarget.value);\n  };\n\n  handleSelectChange = (option: { value: string } | null) => {\n    if (option) {\n      this.props.onChange(option.value);\n    } else {\n      this.props.onChange('');\n    }\n  };\n\n  renderRatingInput() {\n    const { name, value } = this.props;\n\n    const options = [\n      { label: 'A', value: '1' },\n      { label: 'B', value: '2' },\n      { label: 'C', value: '3' },\n      { label: 'D', value: '4' }\n    ];\n\n    return (\n      <Select\n        className=\"input-tiny text-middle\"\n        clearable={true}\n        id=\"condition-threshold\"\n        name={name}\n        onChange={this.handleSelectChange}\n        options={options}\n        placeholder=\"\"\n        searchable={false}\n        value={value}\n      />\n    );\n  }\n\n  render() {\n    const { name, value, metric } = this.props;\n\n    if (metric.type === 'RATING') {\n      return this.renderRatingInput();\n    }\n\n    return (\n      <input\n        className=\"input-tiny text-middle\"\n        data-type={metric.type}\n        id=\"condition-threshold\"\n        name={name}\n        onChange={this.handleChange}\n        type=\"text\"\n        value={value}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { createCondition, updateCondition } from '../../../api/quality-gates';\nimport ConfirmModal from '../../../components/controls/ConfirmModal';\nimport Radio from '../../../components/controls/Radio';\nimport { Alert } from '../../../components/ui/Alert';\nimport { getLocalizedMetricName, translate } from '../../../helpers/l10n';\nimport { isDiffMetric } from '../../../helpers/measures';\nimport { getPossibleOperators } from '../utils';\nimport ConditionOperator from './ConditionOperator';\nimport MetricSelect from './MetricSelect';\nimport ThresholdInput from './ThresholdInput';\n\ninterface Props {\n  condition?: T.Condition;\n  metric?: T.Metric;\n  metrics?: T.Metric[];\n  header: string;\n  onAddCondition: (condition: T.Condition) => void;\n  onClose: () => void;\n  qualityGate: T.QualityGate;\n}\n\ninterface State {\n  error: string;\n  errorMessage?: string;\n  metric?: T.Metric;\n  op?: string;\n  scope: 'new' | 'overall';\n}\n\nexport default class ConditionModal extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      error: props.condition ? props.condition.error : '',\n      scope: 'new',\n      metric: props.metric ? props.metric : undefined,\n      op: props.condition ? props.condition.op : undefined\n    };\n  }\n\n  getSinglePossibleOperator(metric: T.Metric) {\n    const operators = getPossibleOperators(metric);\n    return Array.isArray(operators) ? undefined : operators;\n  }\n\n  handleFormSubmit = () => {\n    if (this.state.metric) {\n      const { condition, qualityGate } = this.props;\n      const newCondition: T.Omit<T.Condition, 'id'> = {\n        metric: this.state.metric.key,\n        op: this.getSinglePossibleOperator(this.state.metric) || this.state.op,\n        error: this.state.error\n      };\n      const submitPromise = condition\n        ? updateCondition({ id: condition.id, ...newCondition })\n        : createCondition({ gateId: qualityGate.id, ...newCondition });\n      return submitPromise.then(this.props.onAddCondition);\n    }\n    return Promise.reject();\n  };\n\n  handleScopeChange = (scope: 'new' | 'overall') => {\n    this.setState(({ metric }) => {\n      const { metrics } = this.props;\n      let correspondingMetric;\n\n      if (metric && metrics) {\n        const correspondingMetricKey =\n          scope === 'new' ? `new_${metric.key}` : metric.key.replace(/^new_/, '');\n        correspondingMetric = metrics.find(m => m.key === correspondingMetricKey);\n      }\n\n      return { scope, metric: correspondingMetric };\n    });\n  };\n\n  handleMetricChange = (metric: T.Metric) => {\n    this.setState({ metric, op: undefined, error: '' });\n  };\n\n  handleOperatorChange = (op: string) => {\n    this.setState({ op });\n  };\n\n  handleErrorChange = (error: string) => {\n    this.setState({ error });\n  };\n\n  render() {\n    const { header, metrics, onClose } = this.props;\n    const { op, error, scope, metric } = this.state;\n    return (\n      <ConfirmModal\n        confirmButtonText={header}\n        confirmDisable={metric === undefined}\n        header={header}\n        onClose={onClose}\n        onConfirm={this.handleFormSubmit}\n        size=\"small\">\n        {this.state.errorMessage && <Alert variant=\"error\">{this.state.errorMessage}</Alert>}\n\n        {this.props.metric === undefined && (\n          <div className=\"modal-field display-flex-center\">\n            <Radio checked={scope === 'new'} onCheck={this.handleScopeChange} value=\"new\">\n              <span data-test=\"quality-gates__condition-scope-new\">\n                {translate('quality_gates.conditions.new_code')}\n              </span>\n            </Radio>\n            <Radio\n              checked={scope === 'overall'}\n              className=\"big-spacer-left\"\n              onCheck={this.handleScopeChange}\n              value=\"overall\">\n              <span data-test=\"quality-gates__condition-scope-overall\">\n                {translate('quality_gates.conditions.overall_code')}\n              </span>\n            </Radio>\n          </div>\n        )}\n\n        <div className=\"modal-field\">\n          <label htmlFor=\"condition-metric\">\n            {translate('quality_gates.conditions.fails_when')}\n          </label>\n          {metrics && (\n            <MetricSelect\n              metric={metric}\n              metrics={metrics.filter(metric =>\n                scope === 'new' ? isDiffMetric(metric.key) : !isDiffMetric(metric.key)\n              )}\n              onMetricChange={this.handleMetricChange}\n            />\n          )}\n          {this.props.metric && (\n            <span className=\"note\">{getLocalizedMetricName(this.props.metric)}</span>\n          )}\n        </div>\n\n        {metric && (\n          <>\n            <div className=\"modal-field display-inline-block\">\n              <label htmlFor=\"condition-operator\">\n                {translate('quality_gates.conditions.operator')}\n              </label>\n              <ConditionOperator\n                metric={metric}\n                onOperatorChange={this.handleOperatorChange}\n                op={op}\n              />\n            </div>\n            <div className=\"modal-field display-inline-block spacer-left\">\n              <label htmlFor=\"condition-threshold\">\n                {translate('quality_gates.conditions.value')}\n              </label>\n              <ThresholdInput\n                metric={metric}\n                name=\"error\"\n                onChange={this.handleErrorChange}\n                value={error}\n              />\n            </div>\n          </>\n        )}\n      </ConfirmModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { deleteCondition } from '../../../api/quality-gates';\nimport { DeleteButton, EditButton } from '../../../components/controls/buttons';\nimport ConfirmModal from '../../../components/controls/ConfirmModal';\nimport { getLocalizedMetricName, translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { getLocalizedMetricNameNoDiffMetric } from '../utils';\nimport ConditionModal from './ConditionModal';\n\ninterface Props {\n  condition: T.Condition;\n  canEdit: boolean;\n  metric: T.Metric;\n  onRemoveCondition: (Condition: T.Condition) => void;\n  onSaveCondition: (newCondition: T.Condition, oldCondition: T.Condition) => void;\n  qualityGate: T.QualityGate;\n  updated?: boolean;\n}\n\ninterface State {\n  deleteFormOpen: boolean;\n  modal: boolean;\n}\n\nexport default class Condition extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      deleteFormOpen: false,\n      modal: false\n    };\n  }\n\n  handleUpdateCondition = (newCondition: T.Condition) => {\n    this.props.onSaveCondition(newCondition, this.props.condition);\n  };\n\n  handleOpenUpdate = () => {\n    this.setState({ modal: true });\n  };\n\n  handleUpdateClose = () => {\n    this.setState({ modal: false });\n  };\n\n  handleDeleteClick = () => {\n    this.setState({ deleteFormOpen: true });\n  };\n\n  closeDeleteForm = () => {\n    this.setState({ deleteFormOpen: false });\n  };\n\n  removeCondition = (condition: T.Condition) => {\n    deleteCondition({ id: condition.id }).then(\n      () => this.props.onRemoveCondition(condition),\n      () => {}\n    );\n  };\n\n  renderOperator() {\n    // TODO can operator be missing?\n    const { op = 'GT' } = this.props.condition;\n    return this.props.metric.type === 'RATING'\n      ? translate('quality_gates.operator', op, 'rating')\n      : translate('quality_gates.operator', op);\n  }\n\n  render() {\n    const { condition, canEdit, metric, qualityGate, updated } = this.props;\n    return (\n      <tr className={classNames({ highlighted: updated })}>\n        <td className=\"text-middle\">\n          {getLocalizedMetricNameNoDiffMetric(metric)}\n          {metric.hidden && (\n            <span className=\"text-danger little-spacer-left\">{translate('deprecated')}</span>\n          )}\n        </td>\n\n        <td className=\"text-middle nowrap\">{this.renderOperator()}</td>\n\n        <td className=\"text-middle nowrap\">{formatMeasure(condition.error, metric.type)}</td>\n\n        {canEdit && (\n          <>\n            <td className=\"text-center thin\">\n              <EditButton\n                data-test=\"quality-gates__condition-update\"\n                onClick={this.handleOpenUpdate}\n              />\n            </td>\n            <td className=\"text-center thin\">\n              <DeleteButton\n                data-test=\"quality-gates__condition-delete\"\n                onClick={this.handleDeleteClick}\n              />\n            </td>\n            {this.state.modal && (\n              <ConditionModal\n                condition={condition}\n                header={translate('quality_gates.update_condition')}\n                metric={metric}\n                onAddCondition={this.handleUpdateCondition}\n                onClose={this.handleUpdateClose}\n                qualityGate={qualityGate}\n              />\n            )}\n            {this.state.deleteFormOpen && (\n              <ConfirmModal\n                confirmButtonText={translate('delete')}\n                confirmData={condition}\n                header={translate('quality_gates.delete_condition')}\n                isDestructive={true}\n                onClose={this.closeDeleteForm}\n                onConfirm={this.removeCondition}>\n                {translateWithParameters(\n                  'quality_gates.delete_condition.confirm.message',\n                  getLocalizedMetricName(this.props.metric)\n                )}\n              </ConfirmModal>\n            )}\n          </>\n        )}\n      </tr>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { differenceWith, map, sortBy, uniqBy } from 'lodash';\nimport * as React from 'react';\nimport DocumentationTooltip from '../../../components/common/DocumentationTooltip';\nimport { Button } from '../../../components/controls/buttons';\nimport ModalButton from '../../../components/controls/ModalButton';\nimport { withAppState } from '../../../components/hoc/withAppState';\nimport { Alert } from '../../../components/ui/Alert';\nimport { getLocalizedMetricName, translate } from '../../../helpers/l10n';\nimport { isDiffMetric } from '../../../helpers/measures';\nimport { MetricKey } from '../../../types/metrics';\nimport Condition from './Condition';\nimport ConditionModal from './ConditionModal';\n\ninterface Props {\n  appState: Pick<T.AppState, 'branchesEnabled'>;\n  canEdit: boolean;\n  conditions: T.Condition[];\n  metrics: T.Dict<T.Metric>;\n  onAddCondition: (condition: T.Condition) => void;\n  onRemoveCondition: (Condition: T.Condition) => void;\n  onSaveCondition: (newCondition: T.Condition, oldCondition: T.Condition) => void;\n  qualityGate: T.QualityGate;\n  updatedConditionId?: number;\n}\n\nconst FORBIDDEN_METRIC_TYPES = ['DATA', 'DISTRIB', 'STRING', 'BOOL'];\nconst FORBIDDEN_METRICS: string[] = [\n  MetricKey.alert_status,\n  MetricKey.releasability_rating,\n  MetricKey.security_hotspots,\n  MetricKey.new_security_hotspots\n];\n\nexport class Conditions extends React.PureComponent<Props> {\n  renderConditionsTable = (conditions: T.Condition[], scope: 'new' | 'overall') => {\n    const {\n      qualityGate,\n      metrics,\n      canEdit,\n      onRemoveCondition,\n      onSaveCondition,\n      updatedConditionId\n    } = this.props;\n    return (\n      <table className=\"data zebra\" data-test={`quality-gates__conditions-${scope}`}>\n        <thead>\n          <tr>\n            <th className=\"nowrap\" style={{ width: 300 }}>\n              {translate('quality_gates.conditions.metric')}\n            </th>\n            <th className=\"nowrap\">{translate('quality_gates.conditions.operator')}</th>\n            <th className=\"nowrap\">{translate('quality_gates.conditions.value')}</th>\n            {canEdit && (\n              <>\n                <th className=\"thin\">{translate('edit')}</th>\n                <th className=\"thin\">{translate('delete')}</th>\n              </>\n            )}\n          </tr>\n        </thead>\n        <tbody>\n          {conditions.map(condition => (\n            <Condition\n              canEdit={canEdit}\n              condition={condition}\n              key={condition.id}\n              metric={metrics[condition.metric]}\n              onRemoveCondition={onRemoveCondition}\n              onSaveCondition={onSaveCondition}\n              qualityGate={qualityGate}\n              updated={condition.id === updatedConditionId}\n            />\n          ))}\n        </tbody>\n      </table>\n    );\n  };\n\n  render() {\n    const { appState, conditions, metrics, canEdit } = this.props;\n\n    const existingConditions = conditions.filter(condition => metrics[condition.metric]);\n    const sortedConditions = sortBy(\n      existingConditions,\n      condition => metrics[condition.metric] && metrics[condition.metric].name\n    );\n\n    const sortedConditionsOnOverallMetrics = sortedConditions.filter(\n      condition => !isDiffMetric(condition.metric)\n    );\n    const sortedConditionsOnNewMetrics = sortedConditions.filter(condition =>\n      isDiffMetric(condition.metric)\n    );\n\n    const duplicates: T.Condition[] = [];\n    const savedConditions = existingConditions.filter(condition => condition.id != null);\n    savedConditions.forEach(condition => {\n      const sameCount = savedConditions.filter(sample => sample.metric === condition.metric).length;\n      if (sameCount > 1) {\n        duplicates.push(condition);\n      }\n    });\n\n    const uniqDuplicates = uniqBy(duplicates, d => d.metric).map(condition => ({\n      ...condition,\n      metric: metrics[condition.metric]\n    }));\n\n    const availableMetrics = differenceWith(\n      map(metrics, metric => metric).filter(\n        metric =>\n          !metric.hidden &&\n          !FORBIDDEN_METRIC_TYPES.includes(metric.type) &&\n          !FORBIDDEN_METRICS.includes(metric.key)\n      ),\n      conditions,\n      (metric, condition) => metric.key === condition.metric\n    );\n\n    return (\n      <div className=\"quality-gate-section\">\n        {canEdit && (\n          <div className=\"pull-right\">\n            <ModalButton\n              modal={({ onClose }) => (\n                <ConditionModal\n                  header={translate('quality_gates.add_condition')}\n                  metrics={availableMetrics}\n                  onAddCondition={this.props.onAddCondition}\n                  onClose={onClose}\n                  qualityGate={this.props.qualityGate}\n                />\n              )}>\n              {({ onClick }) => (\n                <Button data-test=\"quality-gates__add-condition\" onClick={onClick}>\n                  {translate('quality_gates.add_condition')}\n                </Button>\n              )}\n            </ModalButton>\n          </div>\n        )}\n\n        <header className=\"display-flex-center spacer-bottom\">\n          <h3>{translate('quality_gates.conditions')}</h3>\n          <DocumentationTooltip\n            className=\"spacer-left\"\n            content={translate('quality_gates.conditions.help')}\n            links={[\n              {\n                href: '/documentation/user-guide/clean-as-you-code/',\n                label: translate('quality_gates.conditions.help.link')\n              }\n            ]}\n          />\n        </header>\n\n        {uniqDuplicates.length > 0 && (\n          <Alert variant=\"warning\">\n            <p>{translate('quality_gates.duplicated_conditions')}</p>\n            <ul className=\"list-styled spacer-top\">\n              {uniqDuplicates.map(d => (\n                <li key={d.metric.key}>{getLocalizedMetricName(d.metric)}</li>\n              ))}\n            </ul>\n          </Alert>\n        )}\n\n        {sortedConditionsOnNewMetrics.length > 0 && (\n          <div className=\"big-spacer-top\">\n            <h4>{translate('quality_gates.conditions.new_code.long')}</h4>\n\n            {appState.branchesEnabled && (\n              <p className=\"spacer-top spacer-bottom\">\n                {translate('quality_gates.conditions.new_code.description')}\n              </p>\n            )}\n\n            {this.renderConditionsTable(sortedConditionsOnNewMetrics, 'new')}\n          </div>\n        )}\n\n        {sortedConditionsOnOverallMetrics.length > 0 && (\n          <div className=\"big-spacer-top\">\n            <h4>{translate('quality_gates.conditions.overall_code.long')}</h4>\n\n            {appState.branchesEnabled && (\n              <p className=\"spacer-top spacer-bottom\">\n                {translate('quality_gates.conditions.overall_code.description')}\n              </p>\n            )}\n\n            {this.renderConditionsTable(sortedConditionsOnOverallMetrics, 'overall')}\n          </div>\n        )}\n\n        {existingConditions.length === 0 && (\n          <div className=\"big-spacer-top\">{translate('quality_gates.no_conditions')}</div>\n        )}\n      </div>\n    );\n  }\n}\n\nexport default withAppState(Conditions);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { find, without } from 'lodash';\nimport * as React from 'react';\nimport {\n  associateGateWithProject,\n  dissociateGateWithProject,\n  searchProjects\n} from '../../../api/quality-gates';\nimport SelectList, {\n  SelectListFilter,\n  SelectListSearchParams\n} from '../../../components/controls/SelectList';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  canEdit?: boolean;\n  qualityGate: T.QualityGate;\n}\n\ninterface State {\n  needToReload: boolean;\n  lastSearchParams?: SelectListSearchParams;\n  projects: Array<{ key: string; name: string; selected: boolean }>;\n  projectsTotalCount?: number;\n  selectedProjects: string[];\n}\n\nexport default class Projects extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      needToReload: false,\n      projects: [],\n      selectedProjects: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchProjects = (searchParams: SelectListSearchParams) =>\n    searchProjects({\n      gateName: this.props.qualityGate.name,\n      page: searchParams.page,\n      pageSize: searchParams.pageSize,\n      query: searchParams.query !== '' ? searchParams.query : undefined,\n      selected: searchParams.filter\n    }).then(data => {\n      if (this.mounted) {\n        this.setState(prevState => {\n          const more = searchParams.page != null && searchParams.page > 1;\n\n          const projects = more ? [...prevState.projects, ...data.results] : data.results;\n          const newSelectedProjects = data.results\n            .filter(project => project.selected)\n            .map(project => project.key);\n          const selectedProjects = more\n            ? [...prevState.selectedProjects, ...newSelectedProjects]\n            : newSelectedProjects;\n\n          return {\n            lastSearchParams: searchParams,\n            needToReload: false,\n            projects,\n            projectsTotalCount: data.paging.total,\n            selectedProjects\n          };\n        });\n      }\n    });\n\n  handleSelect = (key: string) =>\n    associateGateWithProject({\n      gateId: this.props.qualityGate.id,\n      projectKey: key\n    }).then(() => {\n      if (this.mounted) {\n        this.setState(prevState => ({\n          needToReload: true,\n          selectedProjects: [...prevState.selectedProjects, key]\n        }));\n      }\n    });\n\n  handleUnselect = (key: string) =>\n    dissociateGateWithProject({\n      gateId: this.props.qualityGate.id,\n      projectKey: key\n    }).then(() => {\n      if (this.mounted) {\n        this.setState(prevState => ({\n          needToReload: true,\n          selectedProjects: without(prevState.selectedProjects, key)\n        }));\n      }\n    });\n\n  renderElement = (key: string): React.ReactNode => {\n    const project = find(this.state.projects, { key });\n    return (\n      <div className=\"select-list-list-item\">\n        {project === undefined ? (\n          key\n        ) : (\n          <>\n            {project.name}\n            <br />\n            <span className=\"note\">{project.key}</span>\n          </>\n        )}\n      </div>\n    );\n  };\n\n  render() {\n    const { qualityGate } = this.props;\n\n    if (qualityGate.conditions === undefined || qualityGate.conditions.length === 0) {\n      return (\n        <div>{translate('quality_gates.projects.cannot_associate_projects_no_conditions')}</div>\n      );\n    }\n\n    return (\n      <SelectList\n        elements={this.state.projects.map(project => project.key)}\n        elementsTotalCount={this.state.projectsTotalCount}\n        labelAll={translate('quality_gates.projects.all')}\n        labelSelected={translate('quality_gates.projects.with')}\n        labelUnselected={translate('quality_gates.projects.without')}\n        needToReload={\n          this.state.needToReload &&\n          this.state.lastSearchParams &&\n          this.state.lastSearchParams.filter !== SelectListFilter.All\n        }\n        onSearch={this.fetchProjects}\n        onSelect={this.handleSelect}\n        onUnselect={this.handleUnselect}\n        readOnly={!this.props.canEdit}\n        renderElement={this.renderElement}\n        selectedElements={this.state.selectedProjects}\n        withPaging={true}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { BranchLike } from './branch-like';\n\nexport interface QualityGateProjectStatus {\n  conditions?: QualityGateProjectStatusCondition[];\n  ignoredConditions: boolean;\n  status: T.Status;\n}\n\nexport interface QualityGateProjectStatusCondition {\n  actualValue: string;\n  comparator: string;\n  errorThreshold: string;\n  metricKey: string;\n  periodIndex: number;\n  status: T.Status;\n}\n\nexport interface QualityGateApplicationStatus {\n  metrics: T.Metric[];\n  projects: QualityGateApplicationStatusChildProject[];\n  status: T.Status;\n}\n\nexport interface QualityGateApplicationStatusCondition {\n  comparator: string;\n  errorThreshold?: string;\n  metric: string;\n  periodIndex?: number;\n  onLeak?: boolean;\n  status: T.Status;\n  value: string;\n  warningThreshold?: string;\n}\n\nexport interface QualityGateApplicationStatusChildProject {\n  conditions: QualityGateApplicationStatusCondition[];\n  key: string;\n  name: string;\n  status: T.Status;\n}\n\nexport interface QualityGateStatus {\n  failedConditions: QualityGateStatusConditionEnhanced[];\n  ignoredConditions?: boolean;\n  key: string;\n  name: string;\n  status: T.Status;\n  branchLike?: BranchLike;\n}\n\nexport interface QualityGateStatusCondition {\n  actual?: string;\n  error?: string;\n  level: T.Status;\n  metric: string;\n  op: string;\n  period?: number;\n  warning?: string;\n}\n\nexport interface QualityGateStatusConditionEnhanced extends QualityGateStatusCondition {\n  measure: T.MeasureEnhanced;\n}\n\nexport interface SearchPermissionsParameters {\n  gateName: string;\n  q?: string;\n  selected?: 'all' | 'selected' | 'deselected';\n}\n\nexport interface AddDeleteUserPermissionsParameters {\n  gateName: string;\n  login: string;\n}\n\nexport interface AddDeleteGroupPermissionsParameters {\n  gateName: string;\n  groupName: string;\n}\n\nexport interface Group {\n  name: string;\n}\n\nexport function isUser(item: T.UserBase | Group): item is T.UserBase {\n  return item && (item as T.UserBase).login !== undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DeleteButton } from '../../../components/controls/buttons';\nimport GroupIcon from '../../../components/icons/GroupIcon';\nimport Avatar from '../../../components/ui/Avatar';\nimport { Group, isUser } from '../../../types/quality-gates';\n\nexport interface PermissionItemProps {\n  onClickDelete: (item: T.UserBase | Group) => void;\n  item: T.UserBase | Group;\n}\n\nexport default function PermissionItem(props: PermissionItemProps) {\n  const { item } = props;\n\n  return (\n    <div className=\"display-flex-center permission-list-item padded\">\n      {isUser(item) ? (\n        <Avatar className=\"spacer-right\" hash={item.avatar} name={item.name} size={32} />\n      ) : (\n        <GroupIcon className=\"pull-left spacer-right\" size={32} />\n      )}\n\n      <div className=\"overflow-hidden flex-1\">\n        <strong>{item.name}</strong>\n        {isUser(item) && <div className=\"note\">{item.login}</div>}\n      </div>\n\n      <DeleteButton onClick={() => props.onClickDelete(item)} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport Select from '../../../components/controls/Select';\nimport GroupIcon from '../../../components/icons/GroupIcon';\nimport Avatar from '../../../components/ui/Avatar';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Group, isUser } from '../../../types/quality-gates';\n\nexport interface QualityGatePermissionsAddModalRendererProps {\n  onClose: () => void;\n  onInputChange: (query: string) => void;\n  onSubmit: (event: React.SyntheticEvent<HTMLFormElement>) => void;\n  onSelection: (selection: T.UserBase | Group) => void;\n  submitting: boolean;\n  loading: boolean;\n  query: string;\n  searchResults: Array<T.UserBase | Group>;\n  selection?: T.UserBase | Group;\n}\n\ntype Option = (T.UserBase | Group) & { value: string };\n\nexport default function QualityGatePermissionsAddModalRenderer(\n  props: QualityGatePermissionsAddModalRendererProps\n) {\n  const { loading, query = '', searchResults, selection, submitting } = props;\n\n  const header = translate('quality_gates.permissions.grant');\n\n  const noResultsText =\n    query.length === 1 ? translateWithParameters('select2.tooShort', 2) : translate('no_results');\n\n  return (\n    <Modal contentLabel={header} onRequestClose={props.onClose}>\n      <header className=\"modal-head\">\n        <h2>{header}</h2>\n      </header>\n      <form onSubmit={props.onSubmit}>\n        <div className=\"modal-body\">\n          <div className=\"modal-field\">\n            <label>{translate('quality_gates.permissions.search')}</label>\n            <Select\n              autoFocus={true}\n              className=\"Select-big\"\n              clearable={false}\n              // disable default react-select filtering\n              filterOptions={i => i}\n              isLoading={loading}\n              noResultsText={noResultsText}\n              onChange={props.onSelection}\n              onInputChange={props.onInputChange}\n              optionRenderer={optionRenderer}\n              options={searchResults.map(r => ({ ...r, value: isUser(r) ? r.login : r.name }))}\n              placeholder=\"\"\n              searchable={true}\n              value={selection}\n              valueRenderer={optionRenderer}\n            />\n          </div>\n        </div>\n        <footer className=\"modal-foot\">\n          {submitting && <i className=\"spinner spacer-right\" />}\n          <SubmitButton disabled={!selection || submitting}>{translate('add_verb')}</SubmitButton>\n          <ResetButtonLink onClick={props.onClose}>{translate('cancel')}</ResetButtonLink>\n        </footer>\n      </form>\n    </Modal>\n  );\n}\n\nfunction optionRenderer(option: Option) {\n  return (\n    <>\n      {isUser(option) ? (\n        <Avatar hash={option.avatar} name={option.name} size={16} />\n      ) : (\n        <GroupIcon size={16} />\n      )}\n      <strong className=\"spacer-left\">{option.name}</strong>\n      {isUser(option) && <span className=\"note little-spacer-left\">{option.login}</span>}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { searchGroups, searchUsers } from '../../../api/quality-gates';\nimport { Group, SearchPermissionsParameters } from '../../../types/quality-gates';\nimport QualityGatePermissionsAddModalRenderer from './QualityGatePermissionsAddModalRenderer';\n\ninterface Props {\n  onClose: () => void;\n  onSubmit: (selection: T.UserBase | Group) => void;\n  qualityGate: T.QualityGate;\n  submitting: boolean;\n}\n\ninterface State {\n  loading: boolean;\n  query?: string;\n  searchResults: Array<T.UserBase | Group>;\n  selection?: T.UserBase | Group;\n}\n\nconst DEBOUNCE_DELAY = 250;\n\nexport default class QualityGatePermissionsAddModal extends React.Component<Props, State> {\n  mounted = false;\n  state: State = {\n    loading: false,\n    searchResults: []\n  };\n\n  constructor(props: Props) {\n    super(props);\n    this.handleSearch = debounce(this.handleSearch, DEBOUNCE_DELAY);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSearch = async (query: string) => {\n    const { qualityGate } = this.props;\n    this.setState({ loading: true });\n\n    const queryParams: SearchPermissionsParameters = {\n      gateName: qualityGate.name,\n      q: query,\n      selected: 'deselected'\n    };\n\n    try {\n      const [{ users }, { groups }] = await Promise.all([\n        searchUsers(queryParams),\n        searchGroups(queryParams)\n      ]);\n      if (this.mounted) {\n        this.setState({ loading: false, searchResults: [...users, ...groups] });\n      }\n    } catch {\n      if (this.mounted) {\n        this.setState({ loading: false });\n      }\n    }\n  };\n\n  handleInputChange = (query: string) => {\n    this.setState({ query });\n    if (query.length > 1) {\n      this.handleSearch(query);\n    }\n  };\n\n  handleSelection = (selection: T.UserBase | Group) => {\n    this.setState({ selection });\n  };\n\n  handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const { selection } = this.state;\n    if (selection) {\n      this.props.onSubmit(selection);\n    }\n  };\n\n  render() {\n    const { submitting } = this.props;\n    const { loading, query = '', searchResults, selection } = this.state;\n\n    return (\n      <QualityGatePermissionsAddModalRenderer\n        loading={loading}\n        onClose={this.props.onClose}\n        onInputChange={this.handleInputChange}\n        onSelection={this.handleSelection}\n        onSubmit={this.handleSubmit}\n        query={query}\n        searchResults={searchResults}\n        selection={selection}\n        submitting={submitting}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Button } from '../../../components/controls/buttons';\nimport ConfirmModal from '../../../components/controls/ConfirmModal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { Group, isUser } from '../../../types/quality-gates';\nimport PermissionItem from './PermissionItem';\nimport QualityGatePermissionsAddModal from './QualityGatePermissionsAddModal';\n\nexport interface QualityGatePermissionsRendererProps {\n  groups: Group[];\n  loading: boolean;\n  onClickAddPermission: () => void;\n  onCloseAddPermission: () => void;\n  onSubmitAddPermission: (item: T.UserBase | Group) => void;\n  onCloseDeletePermission: () => void;\n  onConfirmDeletePermission: (item: T.UserBase | Group) => void;\n  onClickDeletePermission: (item: T.UserBase | Group) => void;\n  permissionToDelete?: T.UserBase | Group;\n  qualityGate: T.QualityGate;\n  showAddModal: boolean;\n  submitting: boolean;\n  users: T.UserBase[];\n}\n\nexport default function QualityGatePermissionsRenderer(props: QualityGatePermissionsRendererProps) {\n  const {\n    groups,\n    loading,\n    permissionToDelete,\n    qualityGate,\n    showAddModal,\n    submitting,\n    users\n  } = props;\n\n  return (\n    <div className=\"quality-gate-permissions\">\n      <h3 className=\"spacer-bottom\">{translate('quality_gates.permissions')}</h3>\n      <p className=\"spacer-bottom\">{translate('quality_gates.permissions.help')}</p>\n      <div>\n        <DeferredSpinner loading={loading}>\n          <ul>\n            {users.map(user => (\n              <li key={user.login}>\n                <PermissionItem onClickDelete={props.onClickDeletePermission} item={user} />\n              </li>\n            ))}\n            {groups.map(group => (\n              <li key={group.name}>\n                <PermissionItem onClickDelete={props.onClickDeletePermission} item={group} />\n              </li>\n            ))}\n          </ul>\n        </DeferredSpinner>\n      </div>\n\n      <Button className=\"big-spacer-top\" onClick={props.onClickAddPermission}>\n        {translate('quality_gates.permissions.grant')}\n      </Button>\n\n      {showAddModal && (\n        <QualityGatePermissionsAddModal\n          qualityGate={qualityGate}\n          onClose={props.onCloseAddPermission}\n          onSubmit={props.onSubmitAddPermission}\n          submitting={submitting}\n        />\n      )}\n\n      {permissionToDelete && (\n        <ConfirmModal\n          header={\n            isUser(permissionToDelete)\n              ? translate('quality_gates.permissions.remove.user')\n              : translate('quality_gates.permissions.remove.group')\n          }\n          confirmButtonText={translate('remove')}\n          isDestructive={true}\n          confirmData={permissionToDelete}\n          onClose={props.onCloseDeletePermission}\n          onConfirm={props.onConfirmDeletePermission}>\n          <FormattedMessage\n            defaultMessage={\n              isUser(permissionToDelete)\n                ? translate('quality_gates.permissions.remove.user.confirmation')\n                : translate('quality_gates.permissions.remove.group.confirmation')\n            }\n            id=\"remove.confirmation\"\n            values={{\n              user: <strong>{permissionToDelete.name}</strong>\n            }}\n          />\n        </ConfirmModal>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport {\n  addGroup,\n  addUser,\n  removeGroup,\n  removeUser,\n  searchGroups,\n  searchUsers\n} from '../../../api/quality-gates';\nimport { Group, isUser, SearchPermissionsParameters } from '../../../types/quality-gates';\nimport QualityGatePermissionsRenderer from './QualityGatePermissionsRenderer';\n\ninterface Props {\n  qualityGate: T.QualityGate;\n}\n\ninterface State {\n  groups: Group[];\n  submitting: boolean;\n  loading: boolean;\n  showAddModal: boolean;\n  permissionToDelete?: T.UserBase | Group;\n  users: T.UserBase[];\n}\n\nexport default class QualityGatePermissions extends React.Component<Props, State> {\n  mounted = false;\n  state: State = {\n    groups: [],\n    submitting: false,\n    loading: true,\n    showAddModal: false,\n    users: []\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n\n    this.fetchPermissions();\n  }\n\n  componentDidUpdate(newProps: Props) {\n    if (this.props.qualityGate.id !== newProps.qualityGate.id) {\n      this.fetchPermissions();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchPermissions = async () => {\n    const { qualityGate } = this.props;\n    this.setState({ loading: true });\n\n    const params: SearchPermissionsParameters = {\n      gateName: qualityGate.name,\n      selected: 'selected'\n    };\n    const [{ users }, { groups }] = await Promise.all([\n      searchUsers(params).catch(() => ({ users: [] })),\n      searchGroups(params).catch(() => ({ groups: [] }))\n    ]);\n\n    if (this.mounted) {\n      this.setState({ groups, loading: false, users });\n    }\n  };\n\n  handleCloseAddPermission = () => {\n    this.setState({ showAddModal: false });\n  };\n\n  handleClickAddPermission = () => {\n    this.setState({ showAddModal: true });\n  };\n\n  handleSubmitAddPermission = async (item: T.UserBase | Group) => {\n    const { qualityGate } = this.props;\n    this.setState({ submitting: true });\n\n    let error = false;\n    try {\n      if (isUser(item)) {\n        await addUser({ gateName: qualityGate.name, login: item.login });\n      } else {\n        await addGroup({ gateName: qualityGate.name, groupName: item.name });\n      }\n    } catch {\n      error = true;\n    }\n\n    if (this.mounted && !error) {\n      if (isUser(item)) {\n        this.setState(({ users }) => ({\n          showAddModal: false,\n          users: sortBy(users.concat(item), u => u.name)\n        }));\n      } else {\n        this.setState(({ groups }) => ({\n          showAddModal: false,\n          groups: sortBy(groups.concat(item), g => g.name)\n        }));\n      }\n    }\n\n    if (this.mounted) {\n      this.setState({\n        submitting: false\n      });\n    }\n  };\n\n  handleCloseDeletePermission = () => {\n    this.setState({ permissionToDelete: undefined });\n  };\n\n  handleClickDeletePermission = (permissionToDelete?: T.UserBase | Group) => {\n    this.setState({ permissionToDelete });\n  };\n\n  handleConfirmDeletePermission = async (item: T.UserBase | Group) => {\n    const { qualityGate } = this.props;\n\n    let error = false;\n    try {\n      if (isUser(item)) {\n        await removeUser({ gateName: qualityGate.name, login: item.login });\n      } else {\n        await removeGroup({ gateName: qualityGate.name, groupName: item.name });\n      }\n    } catch {\n      error = true;\n    }\n\n    if (this.mounted && !error) {\n      if (isUser(item)) {\n        this.setState(({ users }) => ({\n          users: users.filter(u => u.login !== item.login)\n        }));\n      } else {\n        this.setState(({ groups }) => ({\n          groups: groups.filter(g => g.name !== item.name)\n        }));\n      }\n    }\n  };\n\n  render() {\n    const { qualityGate } = this.props;\n    const { groups, submitting, loading, showAddModal, permissionToDelete, users } = this.state;\n    return (\n      <QualityGatePermissionsRenderer\n        groups={groups}\n        loading={loading}\n        onClickAddPermission={this.handleClickAddPermission}\n        onCloseAddPermission={this.handleCloseAddPermission}\n        onSubmitAddPermission={this.handleSubmitAddPermission}\n        onCloseDeletePermission={this.handleCloseDeletePermission}\n        onClickDeletePermission={this.handleClickDeletePermission}\n        onConfirmDeletePermission={this.handleConfirmDeletePermission}\n        permissionToDelete={permissionToDelete}\n        qualityGate={qualityGate}\n        showAddModal={showAddModal}\n        submitting={submitting}\n        users={users}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport Conditions from './Conditions';\nimport Projects from './Projects';\nimport QualityGatePermissions from './QualityGatePermissions';\n\nexport interface DetailsContentProps {\n  isDefault?: boolean;\n  metrics: T.Dict<T.Metric>;\n  onAddCondition: (condition: T.Condition) => void;\n  onRemoveCondition: (Condition: T.Condition) => void;\n  onSaveCondition: (newCondition: T.Condition, oldCondition: T.Condition) => void;\n  qualityGate: T.QualityGate;\n  updatedConditionId?: number;\n}\n\nexport function DetailsContent(props: DetailsContentProps) {\n  const { isDefault, metrics, qualityGate, updatedConditionId } = props;\n  const conditions = qualityGate.conditions || [];\n  const actions = qualityGate.actions || {};\n\n  return (\n    <div className=\"layout-page-main-inner\">\n      {isDefault && (qualityGate.conditions === undefined || qualityGate.conditions.length === 0) && (\n        <Alert className=\"big-spacer-bottom\" variant=\"warning\">\n          {translate('quality_gates.is_default_no_conditions')}\n        </Alert>\n      )}\n\n      <Conditions\n        canEdit={Boolean(actions.manageConditions)}\n        conditions={conditions}\n        metrics={metrics}\n        onAddCondition={props.onAddCondition}\n        onRemoveCondition={props.onRemoveCondition}\n        onSaveCondition={props.onSaveCondition}\n        qualityGate={qualityGate}\n        updatedConditionId={updatedConditionId}\n      />\n\n      <div className=\"display-flex-row huge-spacer-top\">\n        <div className=\"quality-gate-section width-50 big-padded-right\" id=\"quality-gate-projects\">\n          <header className=\"display-flex-center spacer-bottom\">\n            <h3>{translate('quality_gates.projects')}</h3>\n            <HelpTooltip\n              className=\"spacer-left\"\n              overlay={\n                <div className=\"big-padded-top big-padded-bottom\">\n                  {translate('quality_gates.projects.help')}\n                </div>\n              }\n            />\n          </header>\n          {isDefault ? (\n            translate('quality_gates.projects_for_default')\n          ) : (\n            <Projects\n              canEdit={actions.associateProjects}\n              // pass unique key to re-mount the component when the quality gate changes\n              key={qualityGate.id}\n              qualityGate={qualityGate}\n            />\n          )}\n        </div>\n        {actions.delegate && (\n          <div className=\"width-50 big-padded-left\">\n            <QualityGatePermissions qualityGate={qualityGate} />\n          </div>\n        )}\n      </div>\n    </div>\n  );\n}\n\nexport default React.memo(DetailsContent);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { copyQualityGate } from '../../../api/quality-gates';\nimport ConfirmModal from '../../../components/controls/ConfirmModal';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\nimport { getQualityGateUrl } from '../../../helpers/urls';\n\ninterface Props {\n  onClose: () => void;\n  onCopy: () => Promise<void>;\n  qualityGate: T.QualityGate;\n  router: Pick<Router, 'push'>;\n}\n\ninterface State {\n  name: string;\n}\n\nexport class CopyQualityGateForm extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = { name: props.qualityGate.name };\n  }\n\n  handleNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleCopy = () => {\n    const { qualityGate } = this.props;\n    const { name } = this.state;\n\n    if (!name) {\n      return undefined;\n    }\n\n    return copyQualityGate({ id: qualityGate.id, name }).then(newQualityGate => {\n      this.props.onCopy();\n      this.props.router.push(getQualityGateUrl(String(newQualityGate.id)));\n    });\n  };\n\n  render() {\n    const { qualityGate } = this.props;\n    const { name } = this.state;\n    const confirmDisable = !name || (qualityGate && qualityGate.name === name);\n\n    return (\n      <ConfirmModal\n        confirmButtonText={translate('copy')}\n        confirmDisable={confirmDisable}\n        header={translate('quality_gates.copy')}\n        onClose={this.props.onClose}\n        onConfirm={this.handleCopy}\n        size=\"small\">\n        <MandatoryFieldsExplanation className=\"modal-field\" />\n        <div className=\"modal-field\">\n          <label htmlFor=\"quality-gate-form-name\">\n            {translate('name')}\n            <MandatoryFieldMarker />\n          </label>\n          <input\n            autoFocus={true}\n            id=\"quality-gate-form-name\"\n            maxLength={100}\n            onChange={this.handleNameChange}\n            required={true}\n            size={50}\n            type=\"text\"\n            value={name}\n          />\n        </div>\n      </ConfirmModal>\n    );\n  }\n}\n\nexport default withRouter(CopyQualityGateForm);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { deleteQualityGate } from '../../../api/quality-gates';\nimport { Button } from '../../../components/controls/buttons';\nimport ConfirmButton from '../../../components/controls/ConfirmButton';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getQualityGatesUrl } from '../../../helpers/urls';\n\ninterface Props {\n  onDelete: () => Promise<void>;\n  qualityGate: T.QualityGate;\n  router: Pick<Router, 'push'>;\n}\n\nexport class DeleteQualityGateForm extends React.PureComponent<Props> {\n  onDelete = () => {\n    const { qualityGate } = this.props;\n    return deleteQualityGate({ id: qualityGate.id })\n      .then(this.props.onDelete)\n      .then(() => {\n        this.props.router.push(getQualityGatesUrl());\n      });\n  };\n\n  render() {\n    const { qualityGate } = this.props;\n\n    return (\n      <ConfirmButton\n        confirmButtonText={translate('delete')}\n        isDestructive={true}\n        modalBody={translateWithParameters(\n          'quality_gates.delete.confirm.message',\n          qualityGate.name\n        )}\n        modalHeader={translate('quality_gates.delete')}\n        onConfirm={this.onDelete}>\n        {({ onClick }) => (\n          <Button\n            className=\"little-spacer-left button-red\"\n            id=\"quality-gate-delete\"\n            onClick={onClick}>\n            {translate('delete')}\n          </Button>\n        )}\n      </ConfirmButton>\n    );\n  }\n}\n\nexport default withRouter(DeleteQualityGateForm);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { renameQualityGate } from '../../../api/quality-gates';\nimport ConfirmModal from '../../../components/controls/ConfirmModal';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onClose: () => void;\n  onRename: () => Promise<void>;\n  qualityGate: T.QualityGate;\n}\n\ninterface State {\n  name: string;\n}\n\nexport default class RenameQualityGateForm extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = { name: props.qualityGate.name };\n  }\n\n  handleNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleRename = () => {\n    const { qualityGate } = this.props;\n    const { name } = this.state;\n\n    if (!name) {\n      return undefined;\n    }\n\n    return renameQualityGate({ id: qualityGate.id, name }).then(() => this.props.onRename());\n  };\n\n  render() {\n    const { qualityGate } = this.props;\n    const { name } = this.state;\n    const confirmDisable = !name || (qualityGate && qualityGate.name === name);\n\n    return (\n      <ConfirmModal\n        confirmButtonText={translate('rename')}\n        confirmDisable={confirmDisable}\n        header={translate('quality_gates.rename')}\n        onClose={this.props.onClose}\n        onConfirm={this.handleRename}\n        size=\"small\">\n        <MandatoryFieldsExplanation className=\"modal-field\" />\n        <div className=\"modal-field\">\n          <label htmlFor=\"quality-gate-form-name\">\n            {translate('name')}\n            <MandatoryFieldMarker />\n          </label>\n          <input\n            autoFocus={true}\n            id=\"quality-gate-form-name\"\n            maxLength={100}\n            onChange={this.handleNameChange}\n            required={true}\n            size={50}\n            type=\"text\"\n            value={name}\n          />\n        </div>\n      </ConfirmModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setQualityGateAsDefault } from '../../../api/quality-gates';\nimport { Button } from '../../../components/controls/buttons';\nimport ModalButton from '../../../components/controls/ModalButton';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\nimport BuiltInQualityGateBadge from './BuiltInQualityGateBadge';\nimport CopyQualityGateForm from './CopyQualityGateForm';\nimport DeleteQualityGateForm from './DeleteQualityGateForm';\nimport RenameQualityGateForm from './RenameQualityGateForm';\n\ninterface Props {\n  onSetDefault: () => void;\n  qualityGate: T.QualityGate;\n  refreshItem: () => Promise<void>;\n  refreshList: () => Promise<void>;\n}\n\nexport default class DetailsHeader extends React.PureComponent<Props> {\n  handleActionRefresh = () => {\n    const { refreshItem, refreshList } = this.props;\n    return Promise.all([refreshItem(), refreshList()]).then(\n      () => {},\n      () => {}\n    );\n  };\n\n  handleSetAsDefaultClick = () => {\n    const { qualityGate } = this.props;\n    if (!qualityGate.isDefault) {\n      // Optimistic update\n      this.props.onSetDefault();\n      setQualityGateAsDefault({ id: qualityGate.id }).then(\n        this.handleActionRefresh,\n        this.handleActionRefresh\n      );\n    }\n  };\n\n  render() {\n    const { qualityGate } = this.props;\n    const actions = qualityGate.actions || ({} as any);\n    const hasNoConditions =\n      qualityGate.conditions === undefined || qualityGate.conditions.length === 0;\n    return (\n      <div className=\"layout-page-header-panel layout-page-main-header issues-main-header\">\n        <div className=\"layout-page-header-panel-inner layout-page-main-header-inner\">\n          <div className=\"layout-page-main-inner\">\n            <div className=\"pull-left display-flex-center\">\n              <h2>{qualityGate.name}</h2>\n              {qualityGate.isBuiltIn && <BuiltInQualityGateBadge className=\"spacer-left\" />}\n            </div>\n\n            <div className=\"pull-right\">\n              {actions.rename && (\n                <ModalButton\n                  modal={({ onClose }) => (\n                    <RenameQualityGateForm\n                      onClose={onClose}\n                      onRename={this.handleActionRefresh}\n                      qualityGate={qualityGate}\n                    />\n                  )}>\n                  {({ onClick }) => (\n                    <Button id=\"quality-gate-rename\" onClick={onClick}>\n                      {translate('rename')}\n                    </Button>\n                  )}\n                </ModalButton>\n              )}\n              {actions.copy && (\n                <ModalButton\n                  modal={({ onClose }) => (\n                    <CopyQualityGateForm\n                      onClose={onClose}\n                      onCopy={this.handleActionRefresh}\n                      qualityGate={qualityGate}\n                    />\n                  )}>\n                  {({ onClick }) => (\n                    <Button className=\"little-spacer-left\" id=\"quality-gate-copy\" onClick={onClick}>\n                      {translate('copy')}\n                    </Button>\n                  )}\n                </ModalButton>\n              )}\n              {actions.setAsDefault && (\n                <Tooltip\n                  overlay={\n                    hasNoConditions\n                      ? translate('quality_gates.cannot_set_default_no_conditions')\n                      : null\n                  }>\n                  <Button\n                    className=\"little-spacer-left\"\n                    disabled={hasNoConditions}\n                    id=\"quality-gate-toggle-default\"\n                    onClick={this.handleSetAsDefaultClick}>\n                    {translate('set_as_default')}\n                  </Button>\n                </Tooltip>\n              )}\n              {actions.delete && (\n                <DeleteQualityGateForm\n                  onDelete={this.props.refreshList}\n                  qualityGate={qualityGate}\n                />\n              )}\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { fetchQualityGate } from '../../../api/quality-gates';\nimport addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { fetchMetrics } from '../../../store/rootActions';\nimport { getMetrics, Store } from '../../../store/rootReducer';\nimport { addCondition, checkIfDefault, deleteCondition, replaceCondition } from '../utils';\nimport DetailsContent from './DetailsContent';\nimport DetailsHeader from './DetailsHeader';\n\ninterface OwnProps {\n  id: string;\n  onSetDefault: (qualityGate: T.QualityGate) => void;\n  qualityGates: T.QualityGate[];\n  refreshQualityGates: () => Promise<void>;\n}\n\ninterface StateToProps {\n  metrics: T.Dict<T.Metric>;\n}\n\ninterface DispatchToProps {\n  fetchMetrics: () => void;\n}\n\ntype Props = StateToProps & DispatchToProps & OwnProps;\n\ninterface State {\n  loading: boolean;\n  qualityGate?: T.QualityGate;\n  updatedConditionId?: number;\n}\n\nexport class Details extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.props.fetchMetrics();\n    this.fetchDetails();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.id !== this.props.id) {\n      this.fetchDetails();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchDetails = () => {\n    const { id } = this.props;\n    this.setState({ loading: true });\n    return fetchQualityGate({ id }).then(\n      qualityGate => {\n        if (this.mounted) {\n          this.setState({ loading: false, qualityGate, updatedConditionId: undefined });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleAddCondition = (condition: T.Condition) => {\n    this.setState(({ qualityGate }) => {\n      if (!qualityGate) {\n        return null;\n      }\n      addGlobalSuccessMessage(translate('quality_gates.condition_added'));\n      return {\n        qualityGate: addCondition(qualityGate, condition),\n        updatedConditionId: condition.id\n      };\n    });\n  };\n\n  handleSaveCondition = (newCondition: T.Condition, oldCondition: T.Condition) => {\n    this.setState(({ qualityGate }) => {\n      if (!qualityGate) {\n        return null;\n      }\n      addGlobalSuccessMessage(translate('quality_gates.condition_updated'));\n      return {\n        qualityGate: replaceCondition(qualityGate, newCondition, oldCondition),\n        updatedConditionId: newCondition.id\n      };\n    });\n  };\n\n  handleRemoveCondition = (condition: T.Condition) => {\n    this.setState(({ qualityGate }) => {\n      if (!qualityGate) {\n        return null;\n      }\n      addGlobalSuccessMessage(translate('quality_gates.condition_deleted'));\n      return {\n        qualityGate: deleteCondition(qualityGate, condition),\n        updatedConditionId: undefined\n      };\n    });\n  };\n\n  handleSetDefault = () => {\n    this.setState(({ qualityGate }) => {\n      if (!qualityGate) {\n        return null;\n      }\n      this.props.onSetDefault(qualityGate);\n      const newQualityGate: T.QualityGate = {\n        ...qualityGate,\n        actions: { ...qualityGate.actions, delete: false, setAsDefault: false }\n      };\n      return { qualityGate: newQualityGate };\n    });\n  };\n\n  render() {\n    const { metrics, refreshQualityGates } = this.props;\n    const { loading, qualityGate, updatedConditionId } = this.state;\n\n    return (\n      <div className=\"layout-page-main\">\n        <DeferredSpinner loading={loading} timeout={200}>\n          {qualityGate && (\n            <>\n              <Helmet defer={false} title={qualityGate.name} />\n              <DetailsHeader\n                onSetDefault={this.handleSetDefault}\n                qualityGate={qualityGate}\n                refreshItem={this.fetchDetails}\n                refreshList={refreshQualityGates}\n              />\n              <DetailsContent\n                isDefault={checkIfDefault(qualityGate, this.props.qualityGates)}\n                metrics={metrics}\n                onAddCondition={this.handleAddCondition}\n                onRemoveCondition={this.handleRemoveCondition}\n                onSaveCondition={this.handleSaveCondition}\n                qualityGate={qualityGate}\n                updatedConditionId={updatedConditionId}\n              />\n            </>\n          )}\n        </DeferredSpinner>\n      </div>\n    );\n  }\n}\n\nconst mapDispatchToProps: DispatchToProps = { fetchMetrics };\n\nconst mapStateToProps = (state: Store): StateToProps => ({\n  metrics: getMetrics(state)\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Details);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\nimport { getQualityGateUrl } from '../../../helpers/urls';\nimport BuiltInQualityGateBadge from './BuiltInQualityGateBadge';\n\ninterface Props {\n  qualityGates: T.QualityGate[];\n}\n\nexport default function List({ qualityGates }: Props) {\n  return (\n    <div className=\"list-group\">\n      {qualityGates.map(qualityGate => (\n        <Link\n          activeClassName=\"active\"\n          className=\"list-group-item display-flex-center\"\n          data-id={qualityGate.id}\n          key={qualityGate.id}\n          to={getQualityGateUrl(String(qualityGate.id))}>\n          <span className=\"flex-1\">{qualityGate.name}</span>\n          {qualityGate.isDefault && (\n            <span className=\"badge little-spacer-left\">{translate('default')}</span>\n          )}\n          {qualityGate.isBuiltIn && <BuiltInQualityGateBadge className=\"little-spacer-left\" />}\n        </Link>\n      ))}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { createQualityGate } from '../../../api/quality-gates';\nimport ConfirmModal from '../../../components/controls/ConfirmModal';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\nimport { getQualityGateUrl } from '../../../helpers/urls';\n\ninterface Props {\n  onClose: () => void;\n  onCreate: () => Promise<void>;\n  router: Pick<Router, 'push'>;\n}\n\ninterface State {\n  name: string;\n}\n\nexport class CreateQualityGateForm extends React.PureComponent<Props, State> {\n  state: State = { name: '' };\n\n  handleNameChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleCreate = async () => {\n    const { name } = this.state;\n\n    if (name) {\n      const qualityGate = await createQualityGate({ name });\n\n      await this.props.onCreate();\n\n      this.props.router.push(getQualityGateUrl(String(qualityGate.id)));\n    }\n  };\n\n  render() {\n    const { name } = this.state;\n    return (\n      <ConfirmModal\n        confirmButtonText={translate('save')}\n        confirmDisable={!name}\n        header={translate('quality_gates.create')}\n        onClose={this.props.onClose}\n        onConfirm={this.handleCreate}\n        size=\"small\">\n        <MandatoryFieldsExplanation className=\"modal-field\" />\n        <div className=\"modal-field\">\n          <label htmlFor=\"quality-gate-form-name\">\n            {translate('name')}\n            <MandatoryFieldMarker />\n          </label>\n          <input\n            autoFocus={true}\n            id=\"quality-gate-form-name\"\n            maxLength={100}\n            onChange={this.handleNameChange}\n            required={true}\n            size={50}\n            type=\"text\"\n            value={name}\n          />\n        </div>\n      </ConfirmModal>\n    );\n  }\n}\n\nexport default withRouter(CreateQualityGateForm);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DocumentationTooltip from '../../../components/common/DocumentationTooltip';\nimport { Button } from '../../../components/controls/buttons';\nimport ModalButton from '../../../components/controls/ModalButton';\nimport { translate } from '../../../helpers/l10n';\nimport CreateQualityGateForm from './CreateQualityGateForm';\n\ninterface Props {\n  canCreate: boolean;\n  refreshQualityGates: () => Promise<void>;\n}\n\nexport default function ListHeader({ canCreate, refreshQualityGates }: Props) {\n  return (\n    <header className=\"page-header\">\n      {canCreate && (\n        <div className=\"page-actions\">\n          <ModalButton\n            modal={({ onClose }) => (\n              <CreateQualityGateForm onClose={onClose} onCreate={refreshQualityGates} />\n            )}>\n            {({ onClick }) => (\n              <Button data-test=\"quality-gates__add\" onClick={onClick}>\n                {translate('create')}\n              </Button>\n            )}\n          </ModalButton>\n        </div>\n      )}\n\n      <div className=\"display-flex-center\">\n        <h1 className=\"page-title\">{translate('quality_gates.page')}</h1>\n        <DocumentationTooltip\n          className=\"spacer-left\"\n          content={translate('quality_gates.help')}\n          links={[\n            {\n              href: '/documentation/user-guide/quality-gates/',\n              label: translate('learn_more')\n            }\n          ]}\n        />\n      </div>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { WithRouterProps } from 'react-router';\nimport { fetchQualityGates } from '../../../api/quality-gates';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';\nimport '../../../components/search-navigator.css';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  addSideBarClass,\n  addWhitePageClass,\n  removeSideBarClass,\n  removeWhitePageClass\n} from '../../../helpers/pages';\nimport { getQualityGateUrl } from '../../../helpers/urls';\nimport '../styles.css';\nimport Details from './Details';\nimport List from './List';\nimport ListHeader from './ListHeader';\n\ninterface State {\n  canCreate: boolean;\n  loading: boolean;\n  qualityGates: T.QualityGate[];\n}\n\nclass App extends React.PureComponent<Pick<WithRouterProps, 'params' | 'router'>, State> {\n  mounted = false;\n  state: State = { canCreate: false, loading: true, qualityGates: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchQualityGates();\n    addWhitePageClass();\n    addSideBarClass();\n  }\n\n  componentDidUpdate(prevProps: WithRouterProps) {\n    if (prevProps.params.id !== undefined && this.props.params.id === undefined) {\n      this.openDefault(this.state.qualityGates);\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    removeWhitePageClass();\n    removeSideBarClass();\n  }\n\n  fetchQualityGates = () => {\n    return fetchQualityGates().then(\n      ({ actions, qualitygates: qualityGates }) => {\n        if (this.mounted) {\n          this.setState({ canCreate: actions.create, loading: false, qualityGates });\n\n          if (!this.props.params.id) {\n            this.openDefault(qualityGates);\n          }\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  openDefault(qualityGates: T.QualityGate[]) {\n    const defaultQualityGate = qualityGates.find(gate => Boolean(gate.isDefault))!;\n    this.props.router.replace(getQualityGateUrl(String(defaultQualityGate.id)));\n  }\n\n  handleSetDefault = (qualityGate: T.QualityGate) => {\n    this.setState(({ qualityGates }) => {\n      return {\n        qualityGates: qualityGates.map(candidate => {\n          if (candidate.isDefault || candidate.id === qualityGate.id) {\n            return { ...candidate, isDefault: candidate.id === qualityGate.id };\n          }\n          return candidate;\n        })\n      };\n    });\n  };\n\n  render() {\n    const { id } = this.props.params;\n    const { canCreate, qualityGates } = this.state;\n    const defaultTitle = translate('quality_gates.page');\n\n    return (\n      <>\n        <Helmet defaultTitle={defaultTitle} defer={false} titleTemplate={`%s - ${defaultTitle}`} />\n        <div className=\"layout-page\" id=\"quality-gates-page\">\n          <Suggestions suggestions=\"quality_gates\" />\n\n          <ScreenPositionHelper className=\"layout-page-side-outer\">\n            {({ top }) => (\n              <div className=\"layout-page-side\" style={{ top }}>\n                <div className=\"layout-page-side-inner\">\n                  <div className=\"layout-page-filters\">\n                    <ListHeader\n                      canCreate={canCreate}\n                      refreshQualityGates={this.fetchQualityGates}\n                    />\n                    <DeferredSpinner loading={this.state.loading}>\n                      <List qualityGates={qualityGates} />\n                    </DeferredSpinner>\n                  </div>\n                </div>\n              </div>\n            )}\n          </ScreenPositionHelper>\n\n          {id !== undefined && (\n            <Details\n              id={id}\n              onSetDefault={this.handleSetDefault}\n              qualityGates={this.state.qualityGates}\n              refreshQualityGates={this.fetchQualityGates}\n            />\n          )}\n        </div>\n      </>\n    );\n  }\n}\n\nexport default App;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst App = lazyLoadComponent(() => import('./components/App'));\n\nconst routes = [{ indexRoute: { component: App } }, { path: 'show/:id', component: App }];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { Actions, getExporters, searchQualityProfiles } from '../../../api/quality-profiles';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport { translate } from '../../../helpers/l10n';\nimport '../styles.css';\nimport { Exporter, Profile } from '../types';\nimport { sortProfiles } from '../utils';\n\ninterface Props {\n  children: React.ReactElement<any>;\n  languages: T.Languages;\n}\n\ninterface State {\n  actions?: Actions;\n  loading: boolean;\n  exporters?: Exporter[];\n  profiles?: Profile[];\n}\n\nexport default class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadData();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchProfiles() {\n    return searchQualityProfiles();\n  }\n\n  loadData() {\n    this.setState({ loading: true });\n    Promise.all([getExporters(), this.fetchProfiles()]).then(\n      responses => {\n        if (this.mounted) {\n          const [exporters, profilesResponse] = responses;\n          this.setState({\n            actions: profilesResponse.actions,\n            exporters,\n            profiles: sortProfiles(profilesResponse.profiles),\n            loading: false\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  }\n\n  updateProfiles = () => {\n    return this.fetchProfiles().then(r => {\n      if (this.mounted) {\n        this.setState({ profiles: sortProfiles(r.profiles) });\n      }\n    });\n  };\n\n  renderChild() {\n    if (this.state.loading) {\n      return <i className=\"spinner\" />;\n    }\n    const finalLanguages = Object.values(this.props.languages);\n\n    return React.cloneElement(this.props.children, {\n      actions: this.state.actions || {},\n      profiles: this.state.profiles || [],\n      languages: finalLanguages,\n      exporters: this.state.exporters,\n      updateProfiles: this.updateProfiles\n    });\n  }\n\n  render() {\n    return (\n      <div className=\"page page-limited\">\n        <Suggestions suggestions=\"quality_profiles\" />\n        <Helmet defer={false} title={translate('quality_profiles.page')} />\n\n        {this.renderChild()}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { getLanguages, Store } from '../../../store/rootReducer';\nimport App from './App';\n\nconst mapStateToProps = (state: Store) => ({\n  languages: getLanguages(state)\n});\n\nexport default connect(mapStateToProps)(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { getProfilePath } from '../utils';\n\ninterface Props {\n  className?: string;\n  children?: React.ReactElement<any> | string;\n  language: string;\n  name: string;\n}\n\nexport default function ProfileLink({ name, language, children, ...other }: Props) {\n  return (\n    <Link activeClassName=\"link-no-underline\" to={getProfilePath(name, language)} {...other}>\n      {children}\n    </Link>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getDeprecatedActiveRulesUrl } from '../../../helpers/urls';\nimport ProfileLink from '../components/ProfileLink';\nimport { Profile } from '../types';\n\ninterface Props {\n  profiles: Profile[];\n}\n\ninterface InheritedRulesInfo {\n  count: number;\n  from: Profile;\n}\n\nexport default class EvolutionDeprecated extends React.PureComponent<Props> {\n  getDeprecatedRulesInheritanceChain = (profile: Profile, profilesWithDeprecations: Profile[]) => {\n    let rules: InheritedRulesInfo[] = [];\n    let count = profile.activeDeprecatedRuleCount;\n\n    if (count === 0) {\n      return rules;\n    }\n\n    if (profile.parentKey) {\n      const parentProfile = profilesWithDeprecations.find(p => p.key === profile.parentKey);\n      if (parentProfile) {\n        const parentRules = this.getDeprecatedRulesInheritanceChain(\n          parentProfile,\n          profilesWithDeprecations\n        );\n        if (parentRules.length) {\n          count -= parentRules.reduce((n, rule) => n + rule.count, 0);\n          rules = rules.concat(parentRules);\n        }\n      }\n    }\n\n    if (count > 0) {\n      rules.push({\n        count,\n        from: profile\n      });\n    }\n\n    return rules;\n  };\n\n  renderInheritedInfo = (profile: Profile, profilesWithDeprecations: Profile[]) => {\n    const rules = this.getDeprecatedRulesInheritanceChain(profile, profilesWithDeprecations);\n    if (rules.length) {\n      return (\n        <>\n          {rules.map(rule => {\n            if (rule.from.key === profile.key) {\n              return null;\n            }\n\n            return (\n              <div className=\"muted\" key={rule.from.key}>\n                {' '}\n                {translateWithParameters(\n                  'coding_rules.filters.inheritance.x_inherited_from_y',\n                  rule.count,\n                  rule.from.name\n                )}\n              </div>\n            );\n          })}\n        </>\n      );\n    }\n    return null;\n  };\n\n  render() {\n    const profilesWithDeprecations = this.props.profiles.filter(\n      profile => profile.activeDeprecatedRuleCount > 0\n    );\n\n    if (profilesWithDeprecations.length === 0) {\n      return null;\n    }\n\n    const sortedProfiles = sortBy(profilesWithDeprecations, p => -p.activeDeprecatedRuleCount);\n\n    return (\n      <div className=\"boxed-group boxed-group-inner quality-profiles-evolution-deprecated\">\n        <div className=\"spacer-bottom\">\n          <strong>{translate('quality_profiles.deprecated_rules')}</strong>\n        </div>\n        <div className=\"spacer-bottom\">\n          {translateWithParameters(\n            'quality_profiles.deprecated_rules_are_still_activated',\n            profilesWithDeprecations.length\n          )}\n        </div>\n        <ul>\n          {sortedProfiles.map(profile => (\n            <li className=\"spacer-top\" key={profile.key}>\n              <div className=\"text-ellipsis\">\n                <ProfileLink\n                  className=\"link-no-underline\"\n                  language={profile.language}\n                  name={profile.name}>\n                  {profile.name}\n                </ProfileLink>\n              </div>\n              <div className=\"note\">\n                {profile.languageName}\n                {', '}\n                <Link\n                  className=\"text-muted\"\n                  to={getDeprecatedActiveRulesUrl({ qprofile: profile.key })}>\n                  {translateWithParameters(\n                    'quality_profile.x_rules',\n                    profile.activeDeprecatedRuleCount\n                  )}\n                </Link>\n                {this.renderInheritedInfo(profile, profilesWithDeprecations)}\n              </div>\n            </li>\n          ))}\n        </ul>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { searchRules } from '../../../api/rules';\nimport { toShortNotSoISOString } from '../../../helpers/dates';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { getRulesUrl } from '../../../helpers/urls';\n\nconst RULES_LIMIT = 10;\n\nfunction parseRules(rules: T.Rule[], actives?: T.Dict<T.RuleActivation[]>): ExtendedRule[] {\n  return rules.map(rule => {\n    const activations = actives && actives[rule.key];\n    return { ...rule, activations: activations ? activations.length : 0 };\n  });\n}\n\ninterface ExtendedRule extends T.Rule {\n  activations: number;\n}\n\ninterface State {\n  latestRules?: ExtendedRule[];\n  latestRulesTotal?: number;\n}\n\nexport default class EvolutionRules extends React.PureComponent<{}, State> {\n  periodStartDate: string;\n  mounted = false;\n\n  constructor(props: {}) {\n    super(props);\n    this.state = {};\n    const startDate = new Date();\n    startDate.setFullYear(startDate.getFullYear() - 1);\n    this.periodStartDate = toShortNotSoISOString(startDate);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadLatestRules();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadLatestRules() {\n    const data = {\n      asc: false,\n      available_since: this.periodStartDate,\n      f: 'name,langName,actives',\n      ps: RULES_LIMIT,\n      s: 'createdAt'\n    };\n\n    searchRules(data).then(\n      ({ actives, rules, total }) => {\n        if (this.mounted) {\n          this.setState({\n            latestRules: sortBy(parseRules(rules, actives), 'langName'),\n            latestRulesTotal: total\n          });\n        }\n      },\n      () => {\n        /*noop*/\n      }\n    );\n  }\n\n  render() {\n    if (!this.state.latestRulesTotal || !this.state.latestRules) {\n      return null;\n    }\n\n    const newRulesUrl = getRulesUrl({ available_since: this.periodStartDate });\n\n    return (\n      <div className=\"boxed-group boxed-group-inner quality-profiles-evolution-rules\">\n        <div className=\"clearfix\">\n          <strong className=\"pull-left\">{translate('quality_profiles.latest_new_rules')}</strong>\n        </div>\n        <ul>\n          {this.state.latestRules.map(rule => (\n            <li className=\"spacer-top\" key={rule.key}>\n              <div className=\"text-ellipsis\">\n                <Link className=\"link-no-underline\" to={getRulesUrl({ rule_key: rule.key })}>\n                  {' '}\n                  {rule.name}\n                </Link>\n                <div className=\"note\">\n                  {rule.activations\n                    ? translateWithParameters(\n                        'quality_profiles.latest_new_rules.activated',\n                        rule.langName!,\n                        rule.activations\n                      )\n                    : translateWithParameters(\n                        'quality_profiles.latest_new_rules.not_activated',\n                        rule.langName!\n                      )}\n                </div>\n              </div>\n            </li>\n          ))}\n        </ul>\n        {this.state.latestRulesTotal > RULES_LIMIT && (\n          <div className=\"spacer-top\">\n            <Link className=\"small\" to={newRulesUrl}>\n              {translate('see_all')} {formatMeasure(this.state.latestRulesTotal, 'SHORT_INT', null)}\n            </Link>\n          </div>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DateFormatter from '../../../components/intl/DateFormatter';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport ProfileLink from '../components/ProfileLink';\nimport { Profile } from '../types';\nimport { isStagnant } from '../utils';\n\ninterface Props {\n  profiles: Profile[];\n}\n\nexport default function EvolutionStagnant(props: Props) {\n  const outdated = props.profiles.filter(profile => !profile.isBuiltIn && isStagnant(profile));\n\n  if (outdated.length === 0) {\n    return null;\n  }\n\n  return (\n    <div className=\"boxed-group boxed-group-inner quality-profiles-evolution-stagnant\">\n      <div className=\"spacer-bottom\">\n        <strong>{translate('quality_profiles.stagnant_profiles')}</strong>\n      </div>\n      <div className=\"spacer-bottom\">\n        {translate('quality_profiles.not_updated_more_than_year')}\n      </div>\n      <ul>\n        {outdated.map(profile => (\n          <li className=\"spacer-top\" key={profile.key}>\n            <div className=\"text-ellipsis\">\n              <ProfileLink\n                className=\"link-no-underline\"\n                language={profile.language}\n                name={profile.name}>\n                {profile.name}\n              </ProfileLink>\n            </div>\n            {profile.rulesUpdatedAt && (\n              <DateFormatter date={profile.rulesUpdatedAt} long={true}>\n                {formattedDate => (\n                  <div className=\"note\">\n                    {translateWithParameters(\n                      'quality_profiles.x_updated_on_y',\n                      profile.languageName,\n                      formattedDate\n                    )}\n                  </div>\n                )}\n              </DateFormatter>\n            )}\n          </li>\n        ))}\n      </ul>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Profile } from '../types';\nimport EvolutionDeprecated from './EvolutionDeprecated';\nimport EvolutionRules from './EvolutionRules';\nimport EvolutionStagnant from './EvolutionStagnant';\n\nexport interface EvolutionProps {\n  profiles: Profile[];\n}\n\nexport default function Evolution({ profiles }: EvolutionProps) {\n  return (\n    <div className=\"quality-profiles-evolution\">\n      <EvolutionDeprecated profiles={profiles} />\n      <EvolutionStagnant profiles={profiles} />\n      <EvolutionRules />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport {\n  changeProfileParent,\n  createQualityProfile,\n  getImporters\n} from '../../../api/quality-profiles';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport Select from '../../../components/controls/Select';\nimport { Location } from '../../../components/hoc/withRouter';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\nimport { parseAsOptionalString } from '../../../helpers/query';\nimport { Profile } from '../types';\n\ninterface Props {\n  languages: Array<{ key: string; name: string }>;\n  location: Location;\n  onClose: () => void;\n  onCreate: Function;\n  profiles: Profile[];\n}\n\ninterface State {\n  importers: Array<{ key: string; languages: Array<string>; name: string }>;\n  language?: string;\n  loading: boolean;\n  name: string;\n  parent?: string;\n  preloading: boolean;\n}\n\nexport default class CreateProfileForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { importers: [], loading: false, name: '', preloading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchImporters();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchImporters() {\n    getImporters().then(\n      importers => {\n        if (this.mounted) {\n          this.setState({ importers, preloading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ preloading: false });\n        }\n      }\n    );\n  }\n\n  handleNameChange = (event: React.SyntheticEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleLanguageChange = (option: { value: string }) => {\n    this.setState({ language: option.value });\n  };\n\n  handleParentChange = (option: { value: string } | null) => {\n    this.setState({ parent: option ? option.value : undefined });\n  };\n\n  handleFormSubmit = async (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n\n    this.setState({ loading: true });\n\n    const data = new FormData(event.currentTarget);\n\n    try {\n      const { profile } = await createQualityProfile(data);\n\n      const parentProfile = this.props.profiles.find(p => p.key === this.state.parent);\n      if (parentProfile) {\n        await changeProfileParent(profile, parentProfile);\n      }\n\n      this.props.onCreate(profile);\n    } finally {\n      if (this.mounted) {\n        this.setState({ loading: false });\n      }\n    }\n  };\n\n  render() {\n    const header = translate('quality_profiles.new_profile');\n    const languageQueryFilter = parseAsOptionalString(this.props.location.query.language);\n    const languages = sortBy(this.props.languages, 'name');\n    let profiles: Array<{ label: string; value: string }> = [];\n\n    const selectedLanguage = this.state.language || languageQueryFilter || languages[0].key;\n    const importers = this.state.importers.filter(importer =>\n      importer.languages.includes(selectedLanguage)\n    );\n\n    if (selectedLanguage) {\n      const languageProfiles = this.props.profiles.filter(p => p.language === selectedLanguage);\n      profiles = [\n        { label: translate('none'), value: '' },\n        ...sortBy(languageProfiles, 'name').map(profile => ({\n          label: profile.isBuiltIn\n            ? `${profile.name} (${translate('quality_profiles.built_in')})`\n            : profile.name,\n          value: profile.key\n        }))\n      ];\n    }\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose} size=\"small\">\n        <form id=\"create-profile-form\" onSubmit={this.handleFormSubmit}>\n          <div className=\"modal-head\">\n            <h2>{header}</h2>\n          </div>\n\n          {this.state.preloading ? (\n            <div className=\"modal-body\">\n              <i className=\"spinner\" />\n            </div>\n          ) : (\n            <div className=\"modal-body\">\n              <MandatoryFieldsExplanation className=\"modal-field\" />\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-profile-name\">\n                  {translate('name')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  autoFocus={true}\n                  id=\"create-profile-name\"\n                  maxLength={100}\n                  name=\"name\"\n                  onChange={this.handleNameChange}\n                  required={true}\n                  size={50}\n                  type=\"text\"\n                  value={this.state.name}\n                />\n              </div>\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-profile-language\">\n                  {translate('language')}\n                  <MandatoryFieldMarker />\n                </label>\n                <Select\n                  clearable={false}\n                  id=\"create-profile-language\"\n                  name=\"language\"\n                  onChange={this.handleLanguageChange}\n                  options={languages.map(l => ({\n                    label: l.name,\n                    value: l.key\n                  }))}\n                  value={selectedLanguage}\n                />\n              </div>\n              {selectedLanguage && profiles.length && (\n                <div className=\"modal-field\">\n                  <label htmlFor=\"create-profile-parent\">\n                    {translate('quality_profiles.parent')}\n                  </label>\n                  <Select\n                    clearable={true}\n                    id=\"create-profile-parent\"\n                    name=\"parentKey\"\n                    onChange={this.handleParentChange}\n                    options={profiles}\n                    value={this.state.parent || ''}\n                  />\n                </div>\n              )}\n              {importers.map(importer => (\n                <div\n                  className=\"modal-field spacer-bottom js-importer\"\n                  data-key={importer.key}\n                  key={importer.key}>\n                  <label htmlFor={'create-profile-form-backup-' + importer.key}>\n                    {importer.name}\n                  </label>\n                  <input\n                    id={'create-profile-form-backup-' + importer.key}\n                    name={'backup_' + importer.key}\n                    type=\"file\"\n                  />\n                  <p className=\"note\">\n                    {translate('quality_profiles.optional_configuration_file')}\n                  </p>\n                </div>\n              ))}\n              {/* drop me when we stop supporting ie11 */}\n              <input name=\"hello-ie11\" type=\"hidden\" value=\"\" />\n            </div>\n          )}\n\n          <div className=\"modal-foot\">\n            {this.state.loading && <i className=\"spinner spacer-right\" />}\n            {!this.state.preloading && (\n              <SubmitButton disabled={this.state.loading} id=\"create-profile-submit\">\n                {translate('create')}\n              </SubmitButton>\n            )}\n            <ResetButtonLink id=\"create-profile-cancel\" onClick={this.props.onClose}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </div>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { restoreQualityProfile } from '../../../api/quality-profiles';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { Alert } from '../../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\ninterface Props {\n  onClose: () => void;\n  onRestore: () => void;\n}\n\ninterface State {\n  loading: boolean;\n  profile?: { name: string };\n  ruleFailures?: number;\n  ruleSuccesses?: number;\n}\n\nexport default class RestoreProfileForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n\n    this.setState({ loading: true });\n\n    const data = new FormData(event.currentTarget);\n\n    restoreQualityProfile(data).then(\n      (response: any) => {\n        if (this.mounted) {\n          this.setState({\n            loading: false,\n            profile: response.profile,\n            ruleFailures: response.ruleFailures,\n            ruleSuccesses: response.ruleSuccesses\n          });\n        }\n        this.props.onRestore();\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  renderAlert(profile: { name: string }, ruleFailures = 0, ruleSuccesses: number): React.ReactNode {\n    return ruleFailures ? (\n      <Alert variant=\"warning\">\n        {translateWithParameters(\n          'quality_profiles.restore_profile.warning',\n          profile.name,\n          ruleSuccesses,\n          ruleFailures\n        )}\n      </Alert>\n    ) : (\n      <Alert variant=\"success\">\n        {translateWithParameters(\n          'quality_profiles.restore_profile.success',\n          profile.name,\n          ruleSuccesses\n        )}\n      </Alert>\n    );\n  }\n\n  render() {\n    const header = translate('quality_profiles.restore_profile');\n\n    const { loading, profile, ruleFailures, ruleSuccesses } = this.state;\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose} size=\"small\">\n        <form id=\"restore-profile-form\" onSubmit={this.handleFormSubmit}>\n          <div className=\"modal-head\">\n            <h2>{header}</h2>\n          </div>\n\n          <div className=\"modal-body\">\n            {profile != null && ruleSuccesses != null ? (\n              this.renderAlert(profile, ruleFailures, ruleSuccesses)\n            ) : (\n              <>\n                <MandatoryFieldsExplanation className=\"modal-field\" />\n                <div className=\"modal-field\">\n                  <label htmlFor=\"restore-profile-backup\">\n                    {translate('backup')}\n                    <MandatoryFieldMarker />\n                  </label>\n                  <input id=\"restore-profile-backup\" name=\"backup\" required={true} type=\"file\" />\n                </div>\n              </>\n            )}\n          </div>\n\n          {ruleSuccesses == null ? (\n            <div className=\"modal-foot\">\n              {loading && <i className=\"spinner spacer-right\" />}\n              <SubmitButton disabled={loading} id=\"restore-profile-submit\">\n                {translate('restore')}\n              </SubmitButton>\n              <ResetButtonLink id=\"restore-profile-cancel\" onClick={this.props.onClose}>\n                {translate('cancel')}\n              </ResetButtonLink>\n            </div>\n          ) : (\n            <div className=\"modal-foot\">\n              <ResetButtonLink id=\"restore-profile-cancel\" onClick={this.props.onClose}>\n                {translate('close')}\n              </ResetButtonLink>\n            </div>\n          )}\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { Actions } from '../../../api/quality-profiles';\nimport { Button } from '../../../components/controls/buttons';\nimport { Location, Router, withRouter } from '../../../components/hoc/withRouter';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { Profile } from '../types';\nimport { getProfilePath } from '../utils';\nimport CreateProfileForm from './CreateProfileForm';\nimport RestoreProfileForm from './RestoreProfileForm';\n\ninterface Props {\n  actions: Actions;\n  languages: Array<{ key: string; name: string }>;\n  location: Location;\n  profiles: Profile[];\n  router: Pick<Router, 'push'>;\n  updateProfiles: () => Promise<void>;\n}\n\ninterface State {\n  createFormOpen: boolean;\n  restoreFormOpen: boolean;\n}\n\nexport class PageHeader extends React.PureComponent<Props, State> {\n  state: State = {\n    createFormOpen: false,\n    restoreFormOpen: false\n  };\n\n  handleCreateClick = () => {\n    this.setState({ createFormOpen: true });\n  };\n\n  handleCreate = (profile: Profile) => {\n    this.props.updateProfiles().then(\n      () => {\n        this.props.router.push(getProfilePath(profile.name, profile.language));\n      },\n      () => {}\n    );\n  };\n\n  closeCreateForm = () => {\n    this.setState({ createFormOpen: false });\n  };\n\n  handleRestoreClick = () => {\n    this.setState({ restoreFormOpen: true });\n  };\n\n  closeRestoreForm = () => {\n    this.setState({ restoreFormOpen: false });\n  };\n\n  render() {\n    const { actions, languages, location, profiles } = this.props;\n    return (\n      <header className=\"page-header\">\n        <h1 className=\"page-title\">{translate('quality_profiles.page')}</h1>\n\n        {actions.create && (\n          <div className=\"page-actions\">\n            <Button\n              disabled={languages.length === 0}\n              id=\"quality-profiles-create\"\n              onClick={this.handleCreateClick}>\n              {translate('create')}\n            </Button>\n            <Button\n              className=\"little-spacer-left\"\n              id=\"quality-profiles-restore\"\n              onClick={this.handleRestoreClick}>\n              {translate('restore')}\n            </Button>\n            {languages.length === 0 && (\n              <Alert className=\"spacer-top\" variant=\"warning\">\n                {translate('quality_profiles.no_languages_available')}\n              </Alert>\n            )}\n          </div>\n        )}\n\n        <div className=\"page-description markdown\">\n          {translate('quality_profiles.intro1')}\n          <br />\n          {translate('quality_profiles.intro2')}\n          <Link\n            className=\"spacer-left\"\n            target=\"_blank\"\n            to={{\n              pathname: '/documentation/instance-administration/quality-profiles/'\n            }}>\n            {translate('learn_more')}\n          </Link>\n        </div>\n\n        {this.state.restoreFormOpen && (\n          <RestoreProfileForm\n            onClose={this.closeRestoreForm}\n            onRestore={this.props.updateProfiles}\n          />\n        )}\n\n        {this.state.createFormOpen && (\n          <CreateProfileForm\n            languages={languages}\n            location={location}\n            onClose={this.closeCreateForm}\n            onCreate={this.handleCreate}\n            profiles={profiles}\n          />\n        )}\n      </header>\n    );\n  }\n}\n\nexport default withRouter(PageHeader);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport { translate } from '../../../helpers/l10n';\nimport { getProfilesForLanguagePath, PROFILE_PATH } from '../utils';\n\ninterface Props {\n  currentFilter?: string;\n  languages: Array<{ key: string; name: string }>;\n  router: Pick<Router, 'replace'>;\n}\n\nexport class ProfilesListHeader extends React.PureComponent<Props> {\n  handleChange = (option: { value: string } | null) => {\n    const { router } = this.props;\n\n    router.replace(!option ? PROFILE_PATH : getProfilesForLanguagePath(option.value));\n  };\n\n  render() {\n    const { currentFilter, languages } = this.props;\n    if (languages.length < 2) {\n      return null;\n    }\n\n    const options = languages.map(language => ({\n      label: language.name,\n      value: language.key\n    }));\n\n    const currentLanguage = currentFilter && options.find(l => l.value === currentFilter);\n\n    return (\n      <header className=\"quality-profiles-list-header clearfix\">\n        <span className=\"spacer-right\">{translate('quality_profiles.filter_by')}:</span>\n        <Select\n          className=\"input-medium\"\n          clearable={true}\n          onChange={this.handleChange}\n          options={options}\n          value={currentLanguage}\n        />\n      </header>\n    );\n  }\n}\n\nexport default withRouter(ProfilesListHeader);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Profile as BaseProfile } from '../../api/quality-profiles';\n\nexport interface Profile extends BaseProfile {\n  depth: number;\n  childrenCount: number;\n}\n\nexport interface Exporter {\n  key: string;\n  name: string;\n  languages: string[];\n}\n\nexport interface ProfileChangelogEvent {\n  action: string;\n  authorName: string;\n  date: string;\n  params?: T.Dict<string | null>;\n  ruleKey: string;\n  ruleName: string;\n}\n\nexport enum ProfileActionModals {\n  Copy,\n  Extend,\n  Rename,\n  Delete\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Profile } from '../types';\n\nexport interface DeleteProfileFormProps {\n  loading: boolean;\n  onClose: () => void;\n  onDelete: () => void;\n  profile: Profile;\n}\n\nexport default function DeleteProfileForm(props: DeleteProfileFormProps) {\n  const { loading, profile } = props;\n  const header = translate('quality_profiles.delete_confirm_title');\n\n  return (\n    <Modal contentLabel={header} onRequestClose={props.onClose}>\n      <form\n        onSubmit={(e: React.SyntheticEvent<HTMLFormElement>) => {\n          e.preventDefault();\n          props.onDelete();\n        }}>\n        <div className=\"modal-head\">\n          <h2>{header}</h2>\n        </div>\n        <div className=\"modal-body\">\n          {profile.childrenCount > 0 ? (\n            <div>\n              <Alert variant=\"warning\">\n                {translate('quality_profiles.this_profile_has_descendants')}\n              </Alert>\n              <p>\n                {translateWithParameters(\n                  'quality_profiles.are_you_sure_want_delete_profile_x_and_descendants',\n                  profile.name,\n                  profile.languageName\n                )}\n              </p>\n            </div>\n          ) : (\n            <p>\n              {translateWithParameters(\n                'quality_profiles.are_you_sure_want_delete_profile_x',\n                profile.name,\n                profile.languageName\n              )}\n            </p>\n          )}\n        </div>\n        <div className=\"modal-foot\">\n          {loading && <i className=\"spinner spacer-right\" />}\n          <SubmitButton className=\"button-red\" disabled={loading}>\n            {translate('delete')}\n          </SubmitButton>\n          <ResetButtonLink onClick={props.onClose}>{translate('cancel')}</ResetButtonLink>\n        </div>\n      </form>\n    </Modal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Profile } from '../types';\n\nexport interface ProfileModalFormProps {\n  btnLabelKey: string;\n  headerKey: string;\n  loading: boolean;\n  onClose: () => void;\n  onSubmit: (name: string) => void;\n  profile: Profile;\n}\n\nexport default function ProfileModalForm(props: ProfileModalFormProps) {\n  const { btnLabelKey, headerKey, loading, profile } = props;\n  const [name, setName] = React.useState<string | undefined>(undefined);\n\n  const submitDisabled = loading || !name || name === profile.name;\n  const header = translateWithParameters(headerKey, profile.name, profile.languageName);\n\n  return (\n    <Modal contentLabel={header} onRequestClose={props.onClose} size=\"small\">\n      <form\n        onSubmit={(e: React.SyntheticEvent<HTMLFormElement>) => {\n          e.preventDefault();\n          if (name) {\n            props.onSubmit(name);\n          }\n        }}>\n        <div className=\"modal-head\">\n          <h2>{header}</h2>\n        </div>\n        <div className=\"modal-body\">\n          <MandatoryFieldsExplanation className=\"modal-field\" />\n          <div className=\"modal-field\">\n            <label htmlFor=\"profile-name\">\n              {translate('quality_profiles.new_name')}\n              <MandatoryFieldMarker />\n            </label>\n            <input\n              autoFocus={true}\n              id=\"profile-name\"\n              maxLength={100}\n              name=\"name\"\n              onChange={(e: React.SyntheticEvent<HTMLInputElement>) => {\n                setName(e.currentTarget.value);\n              }}\n              required={true}\n              size={50}\n              type=\"text\"\n              value={name ?? profile.name}\n            />\n          </div>\n        </div>\n        <div className=\"modal-foot\">\n          {loading && <i className=\"spinner spacer-right\" />}\n          <SubmitButton disabled={submitDisabled}>{translate(btnLabelKey)}</SubmitButton>\n          <ResetButtonLink onClick={props.onClose}>{translate('cancel')}</ResetButtonLink>\n        </div>\n      </form>\n    </Modal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport {\n  changeProfileParent,\n  copyProfile,\n  createQualityProfile,\n  deleteProfile,\n  getQualityProfileBackupUrl,\n  renameProfile,\n  setDefaultProfile\n} from '../../../api/quality-profiles';\nimport ActionsDropdown, {\n  ActionsDropdownDivider,\n  ActionsDropdownItem\n} from '../../../components/controls/ActionsDropdown';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { Router, withRouter } from '../../../components/hoc/withRouter';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { getRulesUrl } from '../../../helpers/urls';\nimport { Profile, ProfileActionModals } from '../types';\nimport { getProfileComparePath, getProfilePath, PROFILE_PATH } from '../utils';\nimport DeleteProfileForm from './DeleteProfileForm';\nimport ProfileModalForm from './ProfileModalForm';\n\ninterface Props {\n  className?: string;\n  fromList?: boolean;\n  profile: Profile;\n  router: Pick<Router, 'push' | 'replace'>;\n  updateProfiles: () => Promise<void>;\n}\n\ninterface State {\n  loading: boolean;\n  openModal?: ProfileActionModals;\n}\n\nexport class ProfileActions extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    loading: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleCloseModal = () => {\n    this.setState({ openModal: undefined });\n  };\n\n  handleCopyClick = () => {\n    this.setState({ openModal: ProfileActionModals.Copy });\n  };\n\n  handleExtendClick = () => {\n    this.setState({ openModal: ProfileActionModals.Extend });\n  };\n\n  handleRenameClick = () => {\n    this.setState({ openModal: ProfileActionModals.Rename });\n  };\n\n  handleDeleteClick = () => {\n    this.setState({ openModal: ProfileActionModals.Delete });\n  };\n\n  handleProfileCopy = async (name: string) => {\n    this.setState({ loading: true });\n\n    try {\n      await copyProfile(this.props.profile.key, name);\n      this.profileActionPerformed(name);\n    } catch {\n      this.profileActionError();\n    }\n  };\n\n  handleProfileExtend = async (name: string) => {\n    const { profile: parentProfile } = this.props;\n\n    const data = {\n      language: parentProfile.language,\n      name\n    };\n\n    this.setState({ loading: true });\n\n    try {\n      const { profile: newProfile } = await createQualityProfile(data);\n      await changeProfileParent(newProfile, parentProfile);\n      this.profileActionPerformed(name);\n    } catch {\n      this.profileActionError();\n    }\n  };\n\n  handleProfileRename = async (name: string) => {\n    this.setState({ loading: true });\n\n    try {\n      await renameProfile(this.props.profile.key, name);\n      this.profileActionPerformed(name);\n    } catch {\n      this.profileActionError();\n    }\n  };\n\n  handleProfileDelete = async () => {\n    this.setState({ loading: true });\n\n    try {\n      await deleteProfile(this.props.profile);\n\n      if (this.mounted) {\n        this.setState({ loading: false, openModal: undefined });\n        this.props.router.replace(PROFILE_PATH);\n        this.props.updateProfiles();\n      }\n    } catch {\n      this.profileActionError();\n    }\n  };\n\n  handleSetDefaultClick = () => {\n    const { profile } = this.props;\n    if (profile.activeRuleCount > 0) {\n      setDefaultProfile(profile).then(this.props.updateProfiles, () => {\n        /* noop */\n      });\n    }\n  };\n\n  profileActionPerformed = (name: string) => {\n    const { profile, router } = this.props;\n    if (this.mounted) {\n      this.setState({ loading: false, openModal: undefined });\n      this.props.updateProfiles().then(\n        () => {\n          router.push(getProfilePath(name, profile.language));\n        },\n        () => {\n          /* noop */\n        }\n      );\n    }\n  };\n\n  profileActionError = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  render() {\n    const { profile } = this.props;\n    const { loading, openModal } = this.state;\n    const { actions = {} } = profile;\n\n    const backupUrl = `${getBaseUrl()}${getQualityProfileBackupUrl(profile)}`;\n\n    const activateMoreUrl = getRulesUrl({\n      qprofile: profile.key,\n      activation: 'false'\n    });\n\n    const hasNoActiveRules = profile.activeRuleCount === 0;\n\n    return (\n      <>\n        <ActionsDropdown className={this.props.className}>\n          {actions.edit && (\n            <ActionsDropdownItem\n              className=\"it__quality-profiles__activate-more-rules\"\n              to={activateMoreUrl}>\n              {translate('quality_profiles.activate_more_rules')}\n            </ActionsDropdownItem>\n          )}\n\n          {!profile.isBuiltIn && (\n            <ActionsDropdownItem\n              className=\"it__quality-profiles__backup\"\n              download={`${profile.key}.xml`}\n              to={backupUrl}>\n              {translate('backup_verb')}\n            </ActionsDropdownItem>\n          )}\n\n          <ActionsDropdownItem\n            className=\"it__quality-profiles__compare\"\n            to={getProfileComparePath(profile.name, profile.language)}>\n            {translate('compare')}\n          </ActionsDropdownItem>\n\n          {actions.copy && (\n            <>\n              <ActionsDropdownItem\n                className=\"it__quality-profiles__copy\"\n                onClick={this.handleCopyClick}>\n                {translate('copy')}\n              </ActionsDropdownItem>\n\n              <ActionsDropdownItem\n                className=\"it__quality-profiles__extend\"\n                onClick={this.handleExtendClick}>\n                {translate('extend')}\n              </ActionsDropdownItem>\n            </>\n          )}\n\n          {actions.edit && (\n            <ActionsDropdownItem\n              className=\"it__quality-profiles__rename\"\n              onClick={this.handleRenameClick}>\n              {translate('rename')}\n            </ActionsDropdownItem>\n          )}\n\n          {actions.setAsDefault &&\n            (hasNoActiveRules ? (\n              <li>\n                <Tooltip\n                  placement=\"left\"\n                  overlay={translate('quality_profiles.cannot_set_default_no_rules')}>\n                  <span className=\"it__quality-profiles__set-as-default text-muted-2\">\n                    {translate('set_as_default')}\n                  </span>\n                </Tooltip>\n              </li>\n            ) : (\n              <ActionsDropdownItem\n                className=\"it__quality-profiles__set-as-default\"\n                onClick={this.handleSetDefaultClick}>\n                {translate('set_as_default')}\n              </ActionsDropdownItem>\n            ))}\n\n          {actions.delete && <ActionsDropdownDivider />}\n\n          {actions.delete && (\n            <ActionsDropdownItem\n              className=\"it__quality-profiles__delete\"\n              destructive={true}\n              onClick={this.handleDeleteClick}>\n              {translate('delete')}\n            </ActionsDropdownItem>\n          )}\n        </ActionsDropdown>\n\n        {openModal === ProfileActionModals.Copy && (\n          <ProfileModalForm\n            btnLabelKey=\"copy\"\n            headerKey=\"quality_profiles.copy_x_title\"\n            loading={loading}\n            onClose={this.handleCloseModal}\n            onSubmit={this.handleProfileCopy}\n            profile={profile}\n          />\n        )}\n\n        {openModal === ProfileActionModals.Extend && (\n          <ProfileModalForm\n            btnLabelKey=\"extend\"\n            headerKey=\"quality_profiles.extend_x_title\"\n            loading={loading}\n            onClose={this.handleCloseModal}\n            onSubmit={this.handleProfileExtend}\n            profile={profile}\n          />\n        )}\n\n        {openModal === ProfileActionModals.Rename && (\n          <ProfileModalForm\n            btnLabelKey=\"rename\"\n            headerKey=\"quality_profiles.rename_x_title\"\n            loading={loading}\n            onClose={this.handleCloseModal}\n            onSubmit={this.handleProfileRename}\n            profile={profile}\n          />\n        )}\n\n        {openModal === ProfileActionModals.Delete && (\n          <DeleteProfileForm\n            loading={loading}\n            onClose={this.handleCloseModal}\n            onDelete={this.handleProfileDelete}\n            profile={profile}\n          />\n        )}\n      </>\n    );\n  }\n}\n\nexport default withRouter(ProfileActions);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport { translate } from '../../../helpers/l10n';\nimport { getRulesUrl } from '../../../helpers/urls';\nimport BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge';\nimport ProfileActions from '../components/ProfileActions';\nimport ProfileLink from '../components/ProfileLink';\nimport { Profile } from '../types';\n\nexport interface ProfilesListRowProps {\n  profile: Profile;\n  updateProfiles: () => Promise<void>;\n}\n\nexport function ProfilesListRow(props: ProfilesListRowProps) {\n  const { profile } = props;\n\n  const offset = 25 * (profile.depth - 1);\n  const activeRulesUrl = getRulesUrl({\n    qprofile: profile.key,\n    activation: 'true'\n  });\n  const deprecatedRulesUrl = getRulesUrl({\n    qprofile: profile.key,\n    activation: 'true',\n    statuses: 'DEPRECATED'\n  });\n\n  return (\n    <tr\n      className=\"quality-profiles-table-row text-middle\"\n      data-key={profile.key}\n      data-name={profile.name}>\n      <td className=\"quality-profiles-table-name text-middle\">\n        <div className=\"display-flex-center\" style={{ paddingLeft: offset }}>\n          <div>\n            <ProfileLink language={profile.language} name={profile.name}>\n              {profile.name}\n            </ProfileLink>\n          </div>\n          {profile.isBuiltIn && <BuiltInQualityProfileBadge className=\"spacer-left\" />}\n        </div>\n      </td>\n\n      <td className=\"quality-profiles-table-projects thin nowrap text-middle text-right\">\n        {profile.isDefault ? (\n          <Tooltip overlay={translate('quality_profiles.list.default.help')}>\n            <span className=\"badge\">{translate('default')}</span>\n          </Tooltip>\n        ) : (\n          <span>{profile.projectCount}</span>\n        )}\n      </td>\n\n      <td className=\"quality-profiles-table-rules thin nowrap text-middle text-right\">\n        <div>\n          {profile.activeDeprecatedRuleCount > 0 && (\n            <span className=\"spacer-right\">\n              <Tooltip overlay={translate('quality_profiles.deprecated_rules')}>\n                <Link className=\"badge badge-error\" to={deprecatedRulesUrl}>\n                  {profile.activeDeprecatedRuleCount}\n                </Link>\n              </Tooltip>\n            </span>\n          )}\n\n          <Link to={activeRulesUrl}>{profile.activeRuleCount}</Link>\n        </div>\n      </td>\n\n      <td className=\"quality-profiles-table-date thin nowrap text-middle text-right\">\n        <DateFromNow date={profile.rulesUpdatedAt} />\n      </td>\n\n      <td className=\"quality-profiles-table-date thin nowrap text-middle text-right\">\n        <DateFromNow date={profile.lastUsed} />\n      </td>\n\n      <td className=\"quality-profiles-table-actions thin nowrap text-middle text-right\">\n        <ProfileActions fromList={true} profile={profile} updateProfiles={props.updateProfiles} />\n      </td>\n    </tr>\n  );\n}\n\nexport default React.memo(ProfilesListRow);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport { groupBy, pick, sortBy } from 'lodash';\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Profile } from '../types';\nimport ProfilesListHeader from './ProfilesListHeader';\nimport ProfilesListRow from './ProfilesListRow';\n\ninterface Props {\n  languages: T.Language[];\n  location: Pick<Location, 'query'>;\n  profiles: Profile[];\n  updateProfiles: () => Promise<void>;\n}\n\nexport default class ProfilesList extends React.PureComponent<Props> {\n  renderProfiles(profiles: Profile[]) {\n    return profiles.map(profile => (\n      <ProfilesListRow\n        key={profile.key}\n        profile={profile}\n        updateProfiles={this.props.updateProfiles}\n      />\n    ));\n  }\n\n  renderHeader(languageKey: string, profilesCount: number) {\n    const language = this.props.languages.find(l => l.key === languageKey);\n\n    if (!language) {\n      return null;\n    }\n\n    return (\n      <thead>\n        <tr>\n          <th>\n            {language.name}\n            {', '}\n            {translateWithParameters('quality_profiles.x_profiles', profilesCount)}\n          </th>\n          <th className=\"text-right nowrap\">\n            {translate('quality_profiles.list.projects')}\n            <HelpTooltip\n              className=\"table-cell-doc\"\n              overlay={\n                <div className=\"big-padded-top big-padded-bottom\">\n                  {translate('quality_profiles.list.projects.help')}\n                </div>\n              }\n            />\n          </th>\n          <th className=\"text-right nowrap\">{translate('quality_profiles.list.rules')}</th>\n          <th className=\"text-right nowrap\">{translate('quality_profiles.list.updated')}</th>\n          <th className=\"text-right nowrap\">{translate('quality_profiles.list.used')}</th>\n          <th>&nbsp;</th>\n        </tr>\n      </thead>\n    );\n  }\n\n  renderLanguage = (languageKey: string, profiles: Profile[] | undefined) => {\n    return (\n      <div className=\"boxed-group boxed-group-inner quality-profiles-table\" key={languageKey}>\n        <table className=\"data zebra zebra-hover\" data-language={languageKey}>\n          {profiles !== undefined && this.renderHeader(languageKey, profiles.length)}\n          <tbody>{profiles !== undefined && this.renderProfiles(profiles)}</tbody>\n        </table>\n      </div>\n    );\n  };\n\n  render() {\n    const { profiles, languages } = this.props;\n    const { language } = this.props.location.query;\n\n    const profilesIndex: T.Dict<Profile[]> = groupBy<Profile>(\n      profiles,\n      profile => profile.language\n    );\n\n    const profilesToShow = language ? pick(profilesIndex, language) : profilesIndex;\n\n    let languagesToShow: string[];\n    if (language) {\n      languagesToShow = languages.find(({ key }) => key === language) ? [language] : [];\n    } else {\n      languagesToShow = sortBy(languages, ({ name }) => name).map(({ key }) => key);\n    }\n\n    return (\n      <div>\n        <ProfilesListHeader currentFilter={language} languages={languages} />\n\n        {Object.keys(profilesToShow).length === 0 && (\n          <Alert className=\"spacer-top\" variant=\"warning\">\n            {translate('no_results')}\n          </Alert>\n        )}\n\n        {languagesToShow.map(languageKey =>\n          this.renderLanguage(languageKey, profilesToShow[languageKey])\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Actions } from '../../../api/quality-profiles';\nimport { Location } from '../../../components/hoc/withRouter';\nimport { Profile } from '../types';\nimport Evolution from './Evolution';\nimport PageHeader from './PageHeader';\nimport ProfilesList from './ProfilesList';\n\ninterface Props {\n  actions: Actions;\n  languages: Array<{ key: string; name: string }>;\n  location: Location;\n  profiles: Profile[];\n  updateProfiles: () => Promise<void>;\n}\n\nexport default function HomeContainer(props: Props) {\n  return (\n    <div>\n      <PageHeader {...props} />\n\n      <div className=\"page-with-sidebar\">\n        <div className=\"page-main\">\n          <ProfilesList {...props} />\n        </div>\n        <div className=\"page-sidebar\">\n          <Evolution {...props} />\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { IndexLink, Link } from 'react-router';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport { translate } from '../../../helpers/l10n';\nimport BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge';\nimport ProfileActions from '../components/ProfileActions';\nimport ProfileLink from '../components/ProfileLink';\nimport { Profile } from '../types';\nimport { getProfileChangelogPath, getProfilesForLanguagePath, PROFILE_PATH } from '../utils';\n\ninterface Props {\n  profile: Profile;\n  updateProfiles: () => Promise<void>;\n}\n\nexport default class ProfileHeader extends React.PureComponent<Props> {\n  render() {\n    const { profile } = this.props;\n\n    return (\n      <header className=\"page-header quality-profile-header\">\n        <div className=\"note spacer-bottom\">\n          <IndexLink className=\"text-muted\" to={PROFILE_PATH}>\n            {translate('quality_profiles.page')}\n          </IndexLink>\n          {' / '}\n          <Link className=\"text-muted\" to={getProfilesForLanguagePath(profile.language)}>\n            {profile.languageName}\n          </Link>\n        </div>\n\n        <h1 className=\"page-title\">\n          <ProfileLink className=\"link-base-color\" language={profile.language} name={profile.name}>\n            <span>{profile.name}</span>\n          </ProfileLink>\n          {profile.isDefault && (\n            <Tooltip overlay={translate('quality_profiles.list.default.help')}>\n              <span className=\" spacer-left badge\">{translate('default')}</span>\n            </Tooltip>\n          )}\n          {profile.isBuiltIn && (\n            <BuiltInQualityProfileBadge className=\"spacer-left\" tooltip={false} />\n          )}\n        </h1>\n\n        <div className=\"pull-right\">\n          <ul className=\"list-inline\" style={{ lineHeight: '24px' }}>\n            <li className=\"small spacer-right\">\n              {translate('quality_profiles.updated_')} <DateFromNow date={profile.rulesUpdatedAt} />\n            </li>\n            <li className=\"small big-spacer-right\">\n              {translate('quality_profiles.used_')} <DateFromNow date={profile.lastUsed} />\n            </li>\n            <li>\n              <Link className=\"button\" to={getProfileChangelogPath(profile.name, profile.language)}>\n                {translate('changelog')}\n              </Link>\n            </li>\n            <li>\n              <ProfileActions\n                className=\"pull-left\"\n                profile={profile}\n                updateProfiles={this.props.updateProfiles}\n              />\n            </li>\n          </ul>\n        </div>\n\n        {profile.isBuiltIn && (\n          <div className=\"page-description\">\n            {translate('quality_profiles.built_in.description')}\n          </div>\n        )}\n      </header>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { IndexLink } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\nimport { PROFILE_PATH } from '../utils';\n\nexport default function ProfileNotFound() {\n  return (\n    <div className=\"quality-profile-not-found\">\n      <div className=\"note spacer-bottom\">\n        <IndexLink className=\"text-muted\" to={PROFILE_PATH}>\n          {translate('quality_profiles.page')}\n        </IndexLink>\n      </div>\n\n      <div>{translate('quality_profiles.not_found')}</div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { WithRouterProps } from 'react-router';\nimport ProfileHeader from '../details/ProfileHeader';\nimport { Profile } from '../types';\nimport ProfileNotFound from './ProfileNotFound';\n\ninterface Props {\n  children: React.ReactElement<any>;\n  profiles: Profile[];\n  updateProfiles: () => Promise<void>;\n}\n\nexport default class ProfileContainer extends React.PureComponent<Props & WithRouterProps> {\n  componentDidMount() {\n    const { location, profiles, router } = this.props;\n    if (location.query.key) {\n      // try to find a quality profile with the given key\n      // if managed to find one, redirect to a new version\n      // otherwise do nothing, `render` will show not found page\n      const profile = profiles.find(profile => profile.key === location.query.key);\n      if (profile) {\n        router.replace({\n          pathname: location.pathname,\n          query: { language: profile.language, name: profile.name }\n        });\n      }\n    }\n  }\n\n  render() {\n    const { profiles, location, ...other } = this.props;\n    const { key, language, name } = location.query;\n\n    if (key) {\n      // if there is a `key` parameter,\n      // then if we managed to find a quality profile with this key\n      // then we will be redirected in `componentDidMount`\n      // otherwise show `ProfileNotFound`\n      const profile = profiles.find(profile => profile.key === location.query.key);\n      return profile ? null : <ProfileNotFound />;\n    }\n\n    const profile = profiles.find(\n      profile => profile.language === language && profile.name === name\n    );\n\n    if (!profile) {\n      return <ProfileNotFound />;\n    }\n\n    const child = React.cloneElement(this.props.children, {\n      profile,\n      profiles,\n      ...other\n    });\n\n    return (\n      <div id=\"quality-profile\">\n        <Helmet defer={false} title={profile.name} />\n        <ProfileHeader profile={profile} updateProfiles={this.props.updateProfiles} />\n        {child}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getQualityProfileExporterUrl } from '../../../api/quality-profiles';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { Exporter, Profile } from '../types';\n\ninterface Props {\n  exporters: Exporter[];\n  profile: Profile;\n}\n\nexport default class ProfileExporters extends React.PureComponent<Props> {\n  getExportUrl(exporter: Exporter) {\n    const { profile } = this.props;\n    return `${getBaseUrl()}${getQualityProfileExporterUrl(exporter, profile)}`;\n  }\n\n  render() {\n    const { exporters, profile } = this.props;\n    const exportersForLanguage = exporters.filter(e => e.languages.includes(profile.language));\n\n    if (exportersForLanguage.length === 0) {\n      return null;\n    }\n\n    return (\n      <div className=\"boxed-group quality-profile-exporters\">\n        <h2>{translate('quality_profiles.exporters')}</h2>\n        <div className=\"boxed-group-inner\">\n          <Alert className=\"big-spacer-bottom\" variant=\"warning\">\n            {translate('quality_profiles.exporters.deprecated')}\n          </Alert>\n          <ul>\n            {exportersForLanguage.map((exporter, index) => (\n              <li\n                className={index > 0 ? 'spacer-top' : undefined}\n                data-key={exporter.key}\n                key={exporter.key}>\n                <a href={this.getExportUrl(exporter)} rel=\"noopener noreferrer\" target=\"_blank\">\n                  {exporter.name}\n                </a>\n              </li>\n            ))}\n          </ul>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { changeProfileParent } from '../../../api/quality-profiles';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport Select from '../../../components/controls/Select';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\nimport { Profile } from '../types';\n\ninterface Props {\n  onChange: () => void;\n  onClose: () => void;\n  profile: Profile;\n  profiles: Profile[];\n}\n\ninterface State {\n  loading: boolean;\n  selected: string | null;\n}\n\nexport default class ChangeParentForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    loading: false,\n    selected: null\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSelectChange = (option: { value: string }) => {\n    this.setState({ selected: option.value });\n  };\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n\n    const parent = this.props.profiles.find(p => p.key === this.state.selected);\n\n    this.setState({ loading: true });\n    changeProfileParent(this.props.profile, parent)\n      .then(this.props.onChange)\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      });\n  };\n\n  render() {\n    const { profiles } = this.props;\n\n    const options = [\n      { label: translate('none'), value: '' },\n      ...sortBy(profiles, 'name').map(profile => ({\n        label: profile.isBuiltIn\n          ? `${profile.name} (${translate('quality_profiles.built_in')})`\n          : profile.name,\n        value: profile.key\n      }))\n    ];\n\n    const submitDisabled =\n      this.state.loading ||\n      this.state.selected == null ||\n      this.state.selected === this.props.profile.parentKey;\n\n    return (\n      <Modal\n        contentLabel={translate('quality_profiles.change_parent')}\n        onRequestClose={this.props.onClose}\n        size=\"small\">\n        <form id=\"change-profile-parent-form\" onSubmit={this.handleFormSubmit}>\n          <div className=\"modal-head\">\n            <h2>{translate('quality_profiles.change_parent')}</h2>\n          </div>\n          <div className=\"modal-body\">\n            <MandatoryFieldsExplanation className=\"modal-field\" />\n            <div className=\"modal-field\">\n              <label htmlFor=\"change-profile-parent\">\n                {translate('quality_profiles.parent')}\n                <MandatoryFieldMarker />\n              </label>\n              <Select\n                clearable={false}\n                id=\"change-profile-parent\"\n                name=\"parentKey\"\n                onChange={this.handleSelectChange}\n                options={options}\n                value={\n                  this.state.selected != null\n                    ? this.state.selected\n                    : this.props.profile.parentKey || ''\n                }\n              />\n            </div>\n          </div>\n          <div className=\"modal-foot\">\n            {this.state.loading && <i className=\"spinner spacer-right\" />}\n            <SubmitButton disabled={submitDisabled} id=\"change-profile-parent-submit\">\n              {translate('change_verb')}\n            </SubmitButton>\n            <ResetButtonLink id=\"change-profile-parent-cancel\" onClick={this.props.onClose}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </div>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge';\nimport ProfileLink from '../components/ProfileLink';\n\ninterface Props {\n  className?: string;\n  depth: number;\n  displayLink?: boolean;\n  extendsBuiltIn?: boolean;\n  language: string;\n  profile: T.ProfileInheritanceDetails;\n  type?: string;\n}\n\nexport default function ProfileInheritanceBox(props: Props) {\n  const {\n    className,\n    depth,\n    extendsBuiltIn,\n    language,\n    profile,\n    displayLink = true,\n    type = 'current'\n  } = props;\n  const offset = 25 * depth;\n\n  return (\n    <tr className={classNames(`it__quality-profiles__inheritance-${type}`, className)}>\n      <td>\n        <div style={{ paddingLeft: offset }}>\n          {displayLink ? (\n            <ProfileLink className=\"text-middle\" language={language} name={profile.name}>\n              {profile.name}\n            </ProfileLink>\n          ) : (\n            <span className=\"text-middle\">{profile.name}</span>\n          )}\n          {profile.isBuiltIn && <BuiltInQualityProfileBadge className=\"spacer-left\" />}\n          {extendsBuiltIn && (\n            <HelpTooltip\n              className=\"spacer-left\"\n              overlay={translate('quality_profiles.extends_built_in')}\n            />\n          )}\n        </div>\n      </td>\n\n      <td>{translateWithParameters('quality_profile.x_active_rules', profile.activeRuleCount)}</td>\n\n      <td>\n        {profile.overridingRuleCount != null && (\n          <p>\n            {translateWithParameters(\n              'quality_profiles.x_overridden_rules',\n              profile.overridingRuleCount\n            )}\n          </p>\n        )}\n      </td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { getProfileInheritance } from '../../../api/quality-profiles';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport { Profile } from '../types';\nimport ChangeParentForm from './ChangeParentForm';\nimport ProfileInheritanceBox from './ProfileInheritanceBox';\n\ninterface Props {\n  profile: Profile;\n  profiles: Profile[];\n  updateProfiles: () => Promise<void>;\n}\n\ninterface State {\n  ancestors?: T.ProfileInheritanceDetails[];\n  children?: T.ProfileInheritanceDetails[];\n  formOpen: boolean;\n  loading: boolean;\n  profile?: T.ProfileInheritanceDetails;\n}\n\nexport default class ProfileInheritance extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state: State = {\n    formOpen: false,\n    loading: true\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadData();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.profile.key !== this.props.profile.key) {\n      this.loadData();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadData() {\n    getProfileInheritance(this.props.profile).then(\n      r => {\n        if (this.mounted) {\n          const { ancestors, children } = r;\n          ancestors.reverse();\n\n          this.setState({\n            children,\n            ancestors,\n            profile: r.profile,\n            loading: false\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  }\n\n  handleChangeParentClick = () => {\n    this.setState({ formOpen: true });\n  };\n\n  closeForm = () => {\n    this.setState({ formOpen: false });\n  };\n\n  handleParentChange = () => {\n    this.props.updateProfiles().then(\n      () => {\n        this.loadData();\n      },\n      () => {}\n    );\n    this.closeForm();\n  };\n\n  render() {\n    const { profile, profiles } = this.props;\n    const { ancestors } = this.state;\n\n    const highlightCurrent =\n      !this.state.loading &&\n      ancestors != null &&\n      this.state.children != null &&\n      (ancestors.length > 0 || this.state.children.length > 0);\n\n    const extendsBuiltIn = ancestors != null && ancestors.some(profile => profile.isBuiltIn);\n\n    return (\n      <div className=\"boxed-group quality-profile-inheritance\">\n        {profile.actions && profile.actions.edit && !profile.isBuiltIn && (\n          <div className=\"boxed-group-actions\">\n            <Button className=\"pull-right js-change-parent\" onClick={this.handleChangeParentClick}>\n              {translate('quality_profiles.change_parent')}\n            </Button>\n          </div>\n        )}\n\n        <header className=\"boxed-group-header\">\n          <h2>{translate('quality_profiles.profile_inheritance')}</h2>\n        </header>\n\n        <div className=\"boxed-group-inner\">\n          {this.state.loading ? (\n            <i className=\"spinner\" />\n          ) : (\n            <table className=\"data zebra\">\n              <tbody>\n                {ancestors != null &&\n                  ancestors.map((ancestor, index) => (\n                    <ProfileInheritanceBox\n                      depth={index}\n                      key={ancestor.key}\n                      language={profile.language}\n                      profile={ancestor}\n                      type=\"ancestor\"\n                    />\n                  ))}\n\n                {this.state.profile != null && (\n                  <ProfileInheritanceBox\n                    className={classNames({\n                      selected: highlightCurrent\n                    })}\n                    depth={ancestors ? ancestors.length : 0}\n                    displayLink={false}\n                    extendsBuiltIn={extendsBuiltIn}\n                    language={profile.language}\n                    profile={this.state.profile}\n                  />\n                )}\n\n                {this.state.children != null &&\n                  this.state.children.map(child => (\n                    <ProfileInheritanceBox\n                      depth={ancestors ? ancestors.length + 1 : 0}\n                      key={child.key}\n                      language={profile.language}\n                      profile={child}\n                      type=\"child\"\n                    />\n                  ))}\n              </tbody>\n            </table>\n          )}\n        </div>\n\n        {this.state.formOpen && (\n          <ChangeParentForm\n            onChange={this.handleParentChange}\n            onClose={this.closeForm}\n            profile={profile}\n            profiles={profiles.filter(p => p !== profile && p.language === profile.language)}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce, identity } from 'lodash';\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport GroupIcon from '../../../components/icons/GroupIcon';\nimport Avatar from '../../../components/ui/Avatar';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { Group } from './ProfilePermissions';\n\ntype Option = T.UserSelected | Group;\ntype OptionWithValue = Option & { value: string };\n\ninterface Props {\n  onChange: (option: OptionWithValue) => void;\n  onSearch: (query: string) => Promise<Option[]>;\n  selected?: Option;\n}\n\ninterface State {\n  loading: boolean;\n  query: string;\n  searchResults: Option[];\n}\n\nexport default class ProfilePermissionsFormSelect extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.handleSearch = debounce(this.handleSearch, 250);\n    this.state = { loading: false, query: '', searchResults: [] };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.handleSearch(this.state.query);\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSearch = (query: string) => {\n    this.setState({ loading: true });\n    this.props.onSearch(query).then(\n      searchResults => {\n        if (this.mounted) {\n          this.setState({ loading: false, searchResults });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleInputChange = (query: string) => {\n    this.setState({ query });\n    if (query.length > 1) {\n      this.handleSearch(query);\n    }\n  };\n\n  render() {\n    const noResultsText =\n      this.state.query.length === 1\n        ? translateWithParameters('select2.tooShort', 2)\n        : translate('no_results');\n\n    // create a uniq string both for users and groups\n    const options = this.state.searchResults.map(r => ({ ...r, value: getStringValue(r) }));\n\n    return (\n      <Select\n        autoFocus={true}\n        className=\"Select-big\"\n        clearable={false}\n        // disable default react-select filtering\n        filterOptions={identity}\n        isLoading={this.state.loading}\n        noResultsText={noResultsText}\n        onChange={this.props.onChange}\n        onInputChange={this.handleInputChange}\n        optionRenderer={optionRenderer}\n        options={options}\n        placeholder=\"\"\n        searchable={true}\n        value={this.props.selected && getStringValue(this.props.selected)}\n        valueRenderer={optionRenderer}\n      />\n    );\n  }\n}\n\nfunction isUser(option: Option): option is T.UserSelected {\n  return (option as T.UserSelected).login !== undefined;\n}\n\nfunction getStringValue(option: Option) {\n  return isUser(option) ? `user:${option.login}` : `group:${option.name}`;\n}\n\nfunction optionRenderer(option: OptionWithValue) {\n  return isUser(option) ? (\n    <>\n      <Avatar hash={option.avatar} name={option.name} size={16} />\n      <strong className=\"spacer-left\">{option.name}</strong>\n      <span className=\"note little-spacer-left\">{option.login}</span>\n    </>\n  ) : (\n    <>\n      <GroupIcon size={16} />\n      <strong className=\"spacer-left\">{option.name}</strong>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport {\n  addGroup,\n  addUser,\n  searchGroups,\n  searchUsers,\n  SearchUsersGroupsParameters\n} from '../../../api/quality-profiles';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { translate } from '../../../helpers/l10n';\nimport { Group } from './ProfilePermissions';\nimport ProfilePermissionsFormSelect from './ProfilePermissionsFormSelect';\n\ninterface Props {\n  onClose: () => void;\n  onGroupAdd: (group: Group) => void;\n  onUserAdd: (user: T.UserSelected) => void;\n  profile: { language: string; name: string };\n}\n\ninterface State {\n  selected?: T.UserSelected | Group;\n  submitting: boolean;\n}\n\nexport default class ProfilePermissionsForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { submitting: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopSubmitting = () => {\n    if (this.mounted) {\n      this.setState({ submitting: false });\n    }\n  };\n\n  handleUserAdd = (user: T.UserSelected) => {\n    const {\n      profile: { language, name }\n    } = this.props;\n    addUser({\n      language,\n      login: user.login,\n      qualityProfile: name\n    }).then(() => this.props.onUserAdd(user), this.stopSubmitting);\n  };\n\n  handleGroupAdd = (group: Group) => {\n    const {\n      profile: { language, name }\n    } = this.props;\n    addGroup({\n      group: group.name,\n      language,\n      qualityProfile: name\n    }).then(() => this.props.onGroupAdd(group), this.stopSubmitting);\n  };\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const { selected } = this.state;\n    if (selected) {\n      this.setState({ submitting: true });\n      if ((selected as T.UserSelected).login !== undefined) {\n        this.handleUserAdd(selected as T.UserSelected);\n      } else {\n        this.handleGroupAdd(selected as Group);\n      }\n    }\n  };\n\n  handleSearch = (q: string) => {\n    const { profile } = this.props;\n    const parameters: SearchUsersGroupsParameters = {\n      language: profile.language,\n      q,\n      qualityProfile: profile.name,\n      selected: 'deselected'\n    };\n    return Promise.all([\n      searchUsers(parameters),\n      searchGroups(parameters)\n    ]).then(([usersResponse, groupsResponse]) => [\n      ...usersResponse.users,\n      ...groupsResponse.groups\n    ]);\n  };\n\n  handleValueChange = (selected: T.UserSelected | Group) => {\n    this.setState({ selected });\n  };\n\n  render() {\n    const header = translate('quality_profiles.grant_permissions_to_user_or_group');\n    const submitDisabled = !this.state.selected || this.state.submitting;\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n        <form onSubmit={this.handleFormSubmit}>\n          <div className=\"modal-body\">\n            <div className=\"modal-field\">\n              <label>{translate('quality_profiles.search_description')}</label>\n              <ProfilePermissionsFormSelect\n                onChange={this.handleValueChange}\n                onSearch={this.handleSearch}\n                selected={this.state.selected}\n              />\n            </div>\n          </div>\n          <footer className=\"modal-foot\">\n            {this.state.submitting && <i className=\"spinner spacer-right\" />}\n            <SubmitButton disabled={submitDisabled}>{translate('add_verb')}</SubmitButton>\n            <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { removeGroup } from '../../../api/quality-profiles';\nimport { Button, DeleteButton, ResetButtonLink } from '../../../components/controls/buttons';\nimport SimpleModal, { ChildrenProps } from '../../../components/controls/SimpleModal';\nimport GroupIcon from '../../../components/icons/GroupIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { Group } from './ProfilePermissions';\n\ninterface Props {\n  group: Group;\n  onDelete: (group: Group) => void;\n  profile: { language: string; name: string };\n}\n\ninterface State {\n  deleteModal: boolean;\n}\n\nexport default class ProfilePermissionsGroup extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { deleteModal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleDeleteClick = () => {\n    this.setState({ deleteModal: true });\n  };\n\n  handleDeleteModalClose = () => {\n    if (this.mounted) {\n      this.setState({ deleteModal: false });\n    }\n  };\n\n  handleDelete = () => {\n    const { group, profile } = this.props;\n\n    return removeGroup({\n      group: group.name,\n      language: profile.language,\n      qualityProfile: profile.name\n    }).then(() => {\n      this.handleDeleteModalClose();\n      this.props.onDelete(group);\n    });\n  };\n\n  renderDeleteModal = (props: ChildrenProps) => (\n    <div>\n      <header className=\"modal-head\">\n        <h2>{translate('quality_profiles.permissions.remove.group')}</h2>\n      </header>\n\n      <div className=\"modal-body\">\n        <FormattedMessage\n          defaultMessage={translate('quality_profiles.permissions.remove.group.confirmation')}\n          id=\"quality_profiles.permissions.remove.group.confirmation\"\n          values={{\n            user: <strong>{this.props.group.name}</strong>\n          }}\n        />\n      </div>\n\n      <footer className=\"modal-foot\">\n        {props.submitting && <i className=\"spinner spacer-right\" />}\n        <Button className=\"button-red\" disabled={props.submitting} onClick={props.onSubmitClick}>\n          {translate('remove')}\n        </Button>\n        <ResetButtonLink onClick={props.onCloseClick}>{translate('cancel')}</ResetButtonLink>\n      </footer>\n    </div>\n  );\n\n  render() {\n    const { group } = this.props;\n\n    return (\n      <div className=\"clearfix big-spacer-bottom\">\n        <DeleteButton\n          className=\"pull-right spacer-top spacer-left spacer-right button-small\"\n          onClick={this.handleDeleteClick}\n        />\n        <GroupIcon className=\"pull-left spacer-right\" size={32} />\n        <div className=\"overflow-hidden\" style={{ lineHeight: '32px' }}>\n          <strong>{group.name}</strong>\n        </div>\n\n        {this.state.deleteModal && (\n          <SimpleModal\n            header={translate('quality_profiles.permissions.remove.group')}\n            onClose={this.handleDeleteModalClose}\n            onSubmit={this.handleDelete}>\n            {this.renderDeleteModal}\n          </SimpleModal>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { removeUser } from '../../../api/quality-profiles';\nimport { DeleteButton, ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal, { ChildrenProps } from '../../../components/controls/SimpleModal';\nimport Avatar from '../../../components/ui/Avatar';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onDelete: (user: T.UserSelected) => void;\n  profile: { language: string; name: string };\n  user: T.UserSelected;\n}\n\ninterface State {\n  deleteModal: boolean;\n}\n\nexport default class ProfilePermissionsUser extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { deleteModal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleDeleteClick = () => {\n    this.setState({ deleteModal: true });\n  };\n\n  handleDeleteModalClose = () => {\n    if (this.mounted) {\n      this.setState({ deleteModal: false });\n    }\n  };\n\n  handleDelete = () => {\n    const { profile, user } = this.props;\n\n    return removeUser({\n      language: profile.language,\n      login: user.login,\n      qualityProfile: profile.name\n    }).then(() => {\n      this.handleDeleteModalClose();\n      this.props.onDelete(user);\n    });\n  };\n\n  renderDeleteModal = (props: ChildrenProps) => (\n    <div>\n      <header className=\"modal-head\">\n        <h2>{translate('quality_profiles.permissions.remove.user')}</h2>\n      </header>\n\n      <div className=\"modal-body\">\n        <FormattedMessage\n          defaultMessage={translate('quality_profiles.permissions.remove.user.confirmation')}\n          id=\"quality_profiles.permissions.remove.user.confirmation\"\n          values={{\n            user: <strong>{this.props.user.name}</strong>\n          }}\n        />\n      </div>\n\n      <footer className=\"modal-foot\">\n        {props.submitting && <i className=\"spinner spacer-right\" />}\n        <SubmitButton\n          className=\"button-red\"\n          disabled={props.submitting}\n          onClick={props.onSubmitClick}>\n          {translate('remove')}\n        </SubmitButton>\n        <ResetButtonLink onClick={props.onCloseClick}>{translate('cancel')}</ResetButtonLink>\n      </footer>\n    </div>\n  );\n\n  render() {\n    const { user } = this.props;\n\n    return (\n      <div className=\"clearfix big-spacer-bottom\">\n        <DeleteButton\n          className=\"pull-right spacer-top spacer-left spacer-right button-small\"\n          onClick={this.handleDeleteClick}\n        />\n        <Avatar className=\"pull-left spacer-right\" hash={user.avatar} name={user.name} size={32} />\n        <div className=\"overflow-hidden\">\n          <strong>{user.name}</strong>\n          <div className=\"note\">{user.login}</div>\n        </div>\n\n        {this.state.deleteModal && (\n          <SimpleModal\n            header={translate('quality_profiles.permissions.remove.user')}\n            onClose={this.handleDeleteModalClose}\n            onSubmit={this.handleDelete}>\n            {this.renderDeleteModal}\n          </SimpleModal>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy, uniqBy } from 'lodash';\nimport * as React from 'react';\nimport {\n  searchGroups,\n  searchUsers,\n  SearchUsersGroupsParameters\n} from '../../../api/quality-profiles';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport { Profile } from '../types';\nimport ProfilePermissionsForm from './ProfilePermissionsForm';\nimport ProfilePermissionsGroup from './ProfilePermissionsGroup';\nimport ProfilePermissionsUser from './ProfilePermissionsUser';\n\nexport interface Group {\n  name: string;\n}\n\ninterface Props {\n  profile: Pick<Profile, 'key' | 'language' | 'name'>;\n}\n\ninterface State {\n  addUserForm: boolean;\n  groups?: Group[];\n  loading: boolean;\n  users?: T.UserSelected[];\n}\n\nexport default class ProfilePermissions extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { addUserForm: false, loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchUsersAndGroups();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.profile.key !== this.props.profile.key) {\n      this.fetchUsersAndGroups();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchUsersAndGroups() {\n    this.setState({ loading: true });\n    const { profile } = this.props;\n    const parameters: SearchUsersGroupsParameters = {\n      language: profile.language,\n      qualityProfile: profile.name,\n      selected: 'selected'\n    };\n    Promise.all([searchUsers(parameters), searchGroups(parameters)]).then(\n      ([usersResponse, groupsResponse]) => {\n        if (this.mounted) {\n          this.setState({\n            groups: groupsResponse.groups,\n            loading: false,\n            users: usersResponse.users\n          });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  }\n\n  handleAddUserButtonClick = () => {\n    this.setState({ addUserForm: true });\n  };\n\n  handleAddUserFormClose = () => {\n    if (this.mounted) {\n      this.setState({ addUserForm: false });\n    }\n  };\n\n  handleUserAdd = (addedUser: T.UserSelected) => {\n    if (this.mounted) {\n      this.setState((state: State) => ({\n        addUserForm: false,\n        users: state.users && uniqBy([...state.users, addedUser], user => user.login)\n      }));\n    }\n  };\n\n  handleUserDelete = (removedUser: T.UserSelected) => {\n    if (this.mounted) {\n      this.setState((state: State) => ({\n        users: state.users && state.users.filter(user => user !== removedUser)\n      }));\n    }\n  };\n\n  handleGroupAdd = (addedGroup: T.Group) => {\n    if (this.mounted) {\n      this.setState((state: State) => ({\n        addUserForm: false,\n        groups: state.groups && uniqBy([...state.groups, addedGroup], group => group.name)\n      }));\n    }\n  };\n\n  handleGroupDelete = (removedGroup: T.Group) => {\n    if (this.mounted) {\n      this.setState((state: State) => ({\n        groups: state.groups && state.groups.filter(group => group !== removedGroup)\n      }));\n    }\n  };\n\n  render() {\n    return (\n      <div className=\"boxed-group\">\n        <h2>{translate('permissions.page')}</h2>\n        <div className=\"boxed-group-inner\">\n          <p className=\"note\">{translate('quality_profiles.default_permissions')}</p>\n\n          {this.state.loading ? (\n            <div className=\"big-spacer-top\">\n              <i className=\"spinner\" />\n            </div>\n          ) : (\n            <div className=\"big-spacer-top\">\n              {this.state.users &&\n                sortBy(this.state.users, 'name').map(user => (\n                  <ProfilePermissionsUser\n                    key={user.login}\n                    onDelete={this.handleUserDelete}\n                    profile={this.props.profile}\n                    user={user}\n                  />\n                ))}\n              {this.state.groups &&\n                sortBy(this.state.groups, 'name').map(group => (\n                  <ProfilePermissionsGroup\n                    group={group}\n                    key={group.name}\n                    onDelete={this.handleGroupDelete}\n                    profile={this.props.profile}\n                  />\n                ))}\n              <div className=\"text-right\">\n                <Button onClick={this.handleAddUserButtonClick}>\n                  {translate('quality_profiles.grant_permissions_to_more_users')}\n                </Button>\n              </div>\n            </div>\n          )}\n        </div>\n\n        {this.state.addUserForm && (\n          <ProfilePermissionsForm\n            onClose={this.handleAddUserFormClose}\n            onGroupAdd={this.handleGroupAdd}\n            onUserAdd={this.handleUserAdd}\n            profile={this.props.profile}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { find, without } from 'lodash';\nimport * as React from 'react';\nimport {\n  associateProject,\n  dissociateProject,\n  getProfileProjects,\n  ProfileProject\n} from '../../../api/quality-profiles';\nimport Modal from '../../../components/controls/Modal';\nimport SelectList, {\n  SelectListFilter,\n  SelectListSearchParams\n} from '../../../components/controls/SelectList';\nimport { translate } from '../../../helpers/l10n';\nimport { Profile } from '../types';\n\ninterface Props {\n  onClose: () => void;\n  profile: Profile;\n}\n\ninterface State {\n  needToReload: boolean;\n  lastSearchParams?: SelectListSearchParams;\n  projects: ProfileProject[];\n  projectsTotalCount?: number;\n  selectedProjects: string[];\n}\n\nexport default class ChangeProjectsForm extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      needToReload: false,\n      projects: [],\n      selectedProjects: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchProjects = (searchParams: SelectListSearchParams) =>\n    getProfileProjects({\n      key: this.props.profile.key,\n      p: searchParams.page,\n      ps: searchParams.pageSize,\n      q: searchParams.query !== '' ? searchParams.query : undefined,\n      selected: searchParams.filter\n    }).then(data => {\n      if (this.mounted) {\n        this.setState(prevState => {\n          const more = searchParams.page != null && searchParams.page > 1;\n\n          const projects = more ? [...prevState.projects, ...data.results] : data.results;\n          const newSeletedProjects = data.results\n            .filter(project => project.selected)\n            .map(project => project.key);\n          const selectedProjects = more\n            ? [...prevState.selectedProjects, ...newSeletedProjects]\n            : newSeletedProjects;\n\n          return {\n            lastSearchParams: searchParams,\n            needToReload: false,\n            projects,\n            projectsTotalCount: data.paging.total,\n            selectedProjects\n          };\n        });\n      }\n    });\n\n  handleSelect = (key: string) =>\n    associateProject(this.props.profile, key).then(() => {\n      if (this.mounted) {\n        this.setState((state: State) => ({\n          needToReload: true,\n          selectedProjects: [...state.selectedProjects, key]\n        }));\n      }\n    });\n\n  handleUnselect = (key: string) =>\n    dissociateProject(this.props.profile, key).then(() => {\n      if (this.mounted) {\n        this.setState((state: State) => ({\n          needToReload: true,\n          selectedProjects: without(state.selectedProjects, key)\n        }));\n      }\n    });\n\n  handleCloseClick = (event: React.SyntheticEvent<HTMLElement>) => {\n    event.preventDefault();\n    this.props.onClose();\n  };\n\n  renderElement = (key: string): React.ReactNode => {\n    const project = find(this.state.projects, { key });\n    return (\n      <div className=\"select-list-list-item\">\n        {project === undefined ? (\n          key\n        ) : (\n          <>\n            {project.name}\n            <br />\n            <span className=\"note\">{project.key}</span>\n          </>\n        )}\n      </div>\n    );\n  };\n\n  render() {\n    const header = translate('projects');\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <div className=\"modal-head\">\n          <h2>{header}</h2>\n        </div>\n\n        <div className=\"modal-body modal-container\" id=\"profile-projects\">\n          <SelectList\n            allowBulkSelection={true}\n            elements={this.state.projects.map(project => project.key)}\n            elementsTotalCount={this.state.projectsTotalCount}\n            labelAll={translate('quality_gates.projects.all')}\n            labelSelected={translate('quality_gates.projects.with')}\n            labelUnselected={translate('quality_gates.projects.without')}\n            needToReload={\n              this.state.needToReload &&\n              this.state.lastSearchParams &&\n              this.state.lastSearchParams.filter !== SelectListFilter.All\n            }\n            onSearch={this.fetchProjects}\n            onSelect={this.handleSelect}\n            onUnselect={this.handleUnselect}\n            renderElement={this.renderElement}\n            selectedElements={this.state.selectedProjects}\n            withPaging={true}\n          />\n        </div>\n\n        <div className=\"modal-foot\">\n          <a href=\"#\" onClick={this.handleCloseClick}>\n            {translate('close')}\n          </a>\n        </div>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { getProfileProjects } from '../../../api/quality-profiles';\nimport { Button } from '../../../components/controls/buttons';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { getProjectUrl } from '../../../helpers/urls';\nimport { Profile } from '../types';\nimport ChangeProjectsForm from './ChangeProjectsForm';\n\ninterface Props {\n  profile: Profile;\n}\n\ninterface State {\n  formOpen: boolean;\n  loading: boolean;\n  loadingMore: boolean;\n  page: number;\n  projects: Array<{ key: string; name: string }>;\n  total: number;\n}\n\nexport default class ProfileProjects extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state: State = {\n    formOpen: false,\n    loading: true,\n    loadingMore: false,\n    page: 1,\n    projects: [],\n    total: 0\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadProjects();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.profile.key !== this.props.profile.key) {\n      this.loadProjects();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  loadProjects() {\n    if (this.props.profile.isDefault) {\n      this.setState({ loading: false, projects: [] });\n      return;\n    }\n\n    this.setState({ loading: true });\n    const data = { key: this.props.profile.key, page: this.state.page };\n    getProfileProjects(data).then(({ paging, results }) => {\n      if (this.mounted) {\n        this.setState({\n          projects: results,\n          total: paging.total,\n          loading: false\n        });\n      }\n    }, this.stopLoading);\n  }\n\n  loadMore = () => {\n    this.setState({ loadingMore: true });\n    const data = { key: this.props.profile.key, page: this.state.page + 1 };\n    getProfileProjects(data).then(({ paging, results }) => {\n      if (this.mounted) {\n        this.setState(state => ({\n          projects: [...state.projects, ...results],\n          total: paging.total,\n          loadingMore: false\n        }));\n      }\n    }, this.stopLoading);\n  };\n\n  handleChangeClick = () => {\n    this.setState({ formOpen: true });\n  };\n\n  closeForm = () => {\n    this.setState({ formOpen: false });\n    this.loadProjects();\n  };\n\n  renderDefault() {\n    return (\n      <div>\n        <span className=\"badge spacer-right\">{translate('default')}</span>\n        {translate('quality_profiles.projects_for_default')}\n      </div>\n    );\n  }\n\n  renderProjects() {\n    if (this.state.loading) {\n      return <i className=\"spinner\" />;\n    }\n\n    const { projects } = this.state;\n    const { profile } = this.props;\n\n    if (profile.activeRuleCount === 0 && projects.length === 0) {\n      return <div>{translate('quality_profiles.cannot_associate_projects_no_rules')}</div>;\n    }\n\n    if (projects.length === 0) {\n      return <div>{translate('quality_profiles.no_projects_associated_to_profile')}</div>;\n    }\n\n    return (\n      <>\n        <ul>\n          {projects.map(project => (\n            <li className=\"spacer-top js-profile-project\" data-key={project.key} key={project.key}>\n              <Link className=\"link-with-icon\" to={getProjectUrl(project.key)}>\n                <QualifierIcon qualifier=\"TRK\" /> <span>{project.name}</span>\n              </Link>\n            </li>\n          ))}\n        </ul>\n        <ListFooter\n          count={projects.length}\n          loadMore={this.loadMore}\n          ready={!this.state.loadingMore}\n          total={this.state.total}\n        />\n      </>\n    );\n  }\n\n  render() {\n    const { profile } = this.props;\n    const hasNoActiveRules = profile.activeRuleCount === 0;\n    return (\n      <div className=\"boxed-group quality-profile-projects\">\n        {profile.actions && profile.actions.associateProjects && (\n          <div className=\"boxed-group-actions\">\n            <Tooltip\n              overlay={\n                hasNoActiveRules\n                  ? translate('quality_profiles.cannot_associate_projects_no_rules')\n                  : null\n              }>\n              <Button\n                className=\"js-change-projects\"\n                onClick={this.handleChangeClick}\n                disabled={hasNoActiveRules}>\n                {translate('quality_profiles.change_projects')}\n              </Button>\n            </Tooltip>\n          </div>\n        )}\n\n        <header className=\"boxed-group-header\">\n          <h2>{translate('projects')}</h2>\n        </header>\n\n        <div className=\"boxed-group-inner\">\n          {profile.isDefault ? this.renderDefault() : this.renderProjects()}\n        </div>\n\n        {this.state.formOpen && <ChangeProjectsForm onClose={this.closeForm} profile={profile} />}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { getDeprecatedActiveRulesUrl } from '../../../helpers/urls';\n\ninterface Props {\n  activeDeprecatedRules: number;\n  profile: string;\n}\n\nexport default function ProfileRulesDeprecatedWarning(props: Props) {\n  return (\n    <div className=\"quality-profile-rules-deprecated clearfix\">\n      <span className=\"pull-left\">\n        <span className=\"text-middle\">{translate('quality_profiles.deprecated_rules')}</span>\n        <HelpTooltip\n          className=\"spacer-left\"\n          overlay={translate('quality_profiles.deprecated_rules_description')}\n        />\n      </span>\n      <Link className=\"pull-right\" to={getDeprecatedActiveRulesUrl({ qprofile: props.profile })}>\n        {props.activeDeprecatedRules}\n      </Link>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport IssueTypeIcon from '../../../components/icons/IssueTypeIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { getRulesUrl } from '../../../helpers/urls';\n\ninterface Props {\n  count: number | null;\n  qprofile: string;\n  total: number | null;\n  type: string;\n}\n\nexport default function ProfileRulesRowOfType(props: Props) {\n  const activeRulesUrl = getRulesUrl({\n    qprofile: props.qprofile,\n    activation: 'true',\n    types: props.type\n  });\n  const inactiveRulesUrl = getRulesUrl({\n    qprofile: props.qprofile,\n    activation: 'false',\n    types: props.type\n  });\n  let inactiveCount = null;\n  if (props.count != null && props.total != null) {\n    inactiveCount = props.total - props.count;\n  }\n\n  return (\n    <tr>\n      <td>\n        <span>\n          <IssueTypeIcon className=\"little-spacer-right\" query={props.type} />\n          {translate('issue.type', props.type, 'plural')}\n        </span>\n      </td>\n      <td className=\"thin nowrap text-right\">\n        {props.count != null && (\n          <Link to={activeRulesUrl}>{formatMeasure(props.count, 'SHORT_INT', null)}</Link>\n        )}\n      </td>\n      <td className=\"thin nowrap text-right\">\n        {inactiveCount != null &&\n          (inactiveCount > 0 ? (\n            <Link className=\"small text-muted\" to={inactiveRulesUrl}>\n              {formatMeasure(inactiveCount, 'SHORT_INT', null)}\n            </Link>\n          ) : (\n            <span className=\"note text-muted\">0</span>\n          ))}\n      </td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { getRulesUrl } from '../../../helpers/urls';\n\ninterface Props {\n  count: number | null;\n  qprofile: string;\n  total: number | null;\n}\n\nexport default function ProfileRulesRowTotal(props: Props) {\n  const activeRulesUrl = getRulesUrl({ qprofile: props.qprofile, activation: 'true' });\n  const inactiveRulesUrl = getRulesUrl({ qprofile: props.qprofile, activation: 'false' });\n  let inactiveCount = null;\n  if (props.count != null && props.total != null) {\n    inactiveCount = props.total - props.count;\n  }\n\n  return (\n    <tr>\n      <td>\n        <strong>{translate('total')}</strong>\n      </td>\n      <td className=\"thin nowrap text-right\">\n        {props.count != null && (\n          <Link to={activeRulesUrl}>\n            <strong>{formatMeasure(props.count, 'SHORT_INT', null)}</strong>\n          </Link>\n        )}\n      </td>\n      <td className=\"thin nowrap text-right\">\n        {inactiveCount != null &&\n          (inactiveCount > 0 ? (\n            <Link className=\"small text-muted\" to={inactiveRulesUrl}>\n              <strong>{formatMeasure(inactiveCount, 'SHORT_INT', null)}</strong>\n            </Link>\n          ) : (\n            <span className=\"note text-muted\">0</span>\n          ))}\n      </td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { getRulesUrl } from '../../../helpers/urls';\n\ninterface Props {\n  language: string;\n  profile: string;\n  sonarway: string;\n  sonarWayMissingRules: number;\n}\n\nexport default function ProfileRulesSonarWayComparison(props: Props) {\n  const url = getRulesUrl({\n    qprofile: props.profile,\n    activation: 'false',\n    compareToProfile: props.sonarway,\n    languages: props.language\n  });\n\n  return (\n    <div className=\"quality-profile-rules-sonarway-missing clearfix\">\n      <span className=\"pull-left\">\n        <span className=\"text-middle\">{translate('quality_profiles.sonarway_missing_rules')}</span>\n        <HelpTooltip\n          className=\"spacer-left\"\n          overlay={translate('quality_profiles.sonarway_missing_rules_description')}\n        />\n      </span>\n      <Link className=\"pull-right\" data-test=\"rules\" to={url}>\n        {props.sonarWayMissingRules}\n      </Link>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { keyBy } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { getQualityProfile } from '../../../api/quality-profiles';\nimport { searchRules, takeFacet } from '../../../api/rules';\nimport { Button } from '../../../components/controls/buttons';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { getRulesUrl } from '../../../helpers/urls';\nimport { Profile } from '../types';\nimport ProfileRulesDeprecatedWarning from './ProfileRulesDeprecatedWarning';\nimport ProfileRulesRowOfType from './ProfileRulesRowOfType';\nimport ProfileRulesRowTotal from './ProfileRulesRowTotal';\nimport ProfileRulesSonarWayComparison from './ProfileRulesSonarWayComparison';\n\nconst TYPES = ['BUG', 'VULNERABILITY', 'CODE_SMELL', 'SECURITY_HOTSPOT'];\n\ninterface Props {\n  profile: Profile;\n}\n\ninterface ByType {\n  val: string;\n  count: number | null;\n}\n\ninterface State {\n  activatedTotal: number | null;\n  activatedByType: T.Dict<ByType>;\n  allByType: T.Dict<ByType>;\n  compareToSonarWay: { profile: string; profileName: string; missingRuleCount: number } | null;\n  total: number | null;\n}\n\nexport default class ProfileRules extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state: State = {\n    activatedTotal: null,\n    activatedByType: keyBy(\n      TYPES.map(t => ({ val: t, count: null })),\n      'val'\n    ),\n    allByType: keyBy(\n      TYPES.map(t => ({ val: t, count: null })),\n      'val'\n    ),\n    compareToSonarWay: null,\n    total: null\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadRules();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.profile.key !== this.props.profile.key) {\n      this.loadRules();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadProfile() {\n    if (this.props.profile.isBuiltIn) {\n      return Promise.resolve(null);\n    }\n    return getQualityProfile({\n      compareToSonarWay: true,\n      profile: this.props.profile\n    });\n  }\n\n  loadAllRules() {\n    return searchRules({\n      languages: this.props.profile.language,\n      facets: 'types',\n      ps: 1\n    });\n  }\n\n  loadActivatedRules() {\n    return searchRules({\n      activation: 'true',\n      facets: 'types',\n      ps: 1,\n      qprofile: this.props.profile.key\n    });\n  }\n\n  loadRules() {\n    return Promise.all([this.loadAllRules(), this.loadActivatedRules(), this.loadProfile()]).then(\n      responses => {\n        if (this.mounted) {\n          const [allRules, activatedRules, showProfile] = responses;\n          this.setState({\n            activatedTotal: activatedRules.total,\n            allByType: keyBy<ByType>(takeFacet(allRules, 'types'), 'val'),\n            activatedByType: keyBy<ByType>(takeFacet(activatedRules, 'types'), 'val'),\n            compareToSonarWay: showProfile && showProfile.compareToSonarWay,\n            total: allRules.total\n          });\n        }\n      }\n    );\n  }\n\n  getRulesCountForType(type: string) {\n    return this.state.activatedByType && this.state.activatedByType[type]\n      ? this.state.activatedByType[type].count\n      : null;\n  }\n\n  getRulesTotalForType(type: string) {\n    return this.state.allByType && this.state.allByType[type]\n      ? this.state.allByType[type].count\n      : null;\n  }\n\n  render() {\n    const { profile } = this.props;\n    const { compareToSonarWay } = this.state;\n    const activateMoreUrl = getRulesUrl({ qprofile: profile.key, activation: 'false' });\n    const { actions = {} } = profile;\n\n    return (\n      <div className=\"boxed-group quality-profile-rules\">\n        <div className=\"quality-profile-rules-distribution\">\n          <table className=\"data condensed\">\n            <thead>\n              <tr>\n                <th>\n                  <h2>{translate('rules')}</h2>\n                </th>\n                <th>{translate('active')}</th>\n                <th>{translate('inactive')}</th>\n              </tr>\n            </thead>\n            <tbody>\n              <ProfileRulesRowTotal\n                count={this.state.activatedTotal}\n                qprofile={profile.key}\n                total={this.state.total}\n              />\n              {TYPES.map(type => (\n                <ProfileRulesRowOfType\n                  count={this.getRulesCountForType(type)}\n                  key={type}\n                  qprofile={profile.key}\n                  total={this.getRulesTotalForType(type)}\n                  type={type}\n                />\n              ))}\n            </tbody>\n          </table>\n\n          {actions.edit && !profile.isBuiltIn && (\n            <div className=\"text-right big-spacer-top\">\n              <Link className=\"button js-activate-rules\" to={activateMoreUrl}>\n                {translate('quality_profiles.activate_more')}\n              </Link>\n            </div>\n          )}\n\n          {/* if a user is allowed to `copy` a profile if they are a global admin */}\n          {/* this user could potentially active more rules if the profile was not built-in */}\n          {/* in such cases it's better to show the button but disable it with a tooltip */}\n          {actions.copy && profile.isBuiltIn && (\n            <div className=\"text-right big-spacer-top\">\n              <Tooltip overlay={translate('quality_profiles.activate_more.help.built_in')}>\n                <Button className=\"disabled js-activate-rules\">\n                  {translate('quality_profiles.activate_more')}\n                </Button>\n              </Tooltip>\n            </div>\n          )}\n        </div>\n        {profile.activeDeprecatedRuleCount > 0 && (\n          <ProfileRulesDeprecatedWarning\n            activeDeprecatedRules={profile.activeDeprecatedRuleCount}\n            profile={profile.key}\n          />\n        )}\n        {compareToSonarWay != null && compareToSonarWay.missingRuleCount > 0 && (\n          <ProfileRulesSonarWayComparison\n            language={profile.language}\n            profile={profile.key}\n            sonarWayMissingRules={compareToSonarWay.missingRuleCount}\n            sonarway={compareToSonarWay.profile}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { Exporter, Profile } from '../types';\nimport ProfileExporters from './ProfileExporters';\nimport ProfileInheritance from './ProfileInheritance';\nimport ProfilePermissions from './ProfilePermissions';\nimport ProfileProjects from './ProfileProjects';\nimport ProfileRules from './ProfileRules';\n\nexport interface ProfileDetailsProps {\n  exporters: Exporter[];\n  profile: Profile;\n  profiles: Profile[];\n  updateProfiles: () => Promise<void>;\n}\n\nexport default function ProfileDetails(props: ProfileDetailsProps) {\n  const { profile } = props;\n  return (\n    <div>\n      <div className=\"quality-profile-grid\">\n        <div className=\"quality-profile-grid-left\">\n          <ProfileRules profile={profile} />\n          <ProfileExporters exporters={props.exporters} profile={profile} />\n          {profile.actions && profile.actions.edit && !profile.isBuiltIn && (\n            <ProfilePermissions profile={profile} />\n          )}\n        </div>\n        <div className=\"quality-profile-grid-right\">\n          {profile.activeRuleCount === 0 && (profile.projectCount || profile.isDefault) && (\n            <Alert className=\"big-spacer-bottom\" variant=\"warning\">\n              {profile.projectCount !== undefined &&\n                profile.projectCount > 0 &&\n                translate('quality_profiles.warning.used_by_projects_no_rules')}\n              {!profile.projectCount &&\n                profile.isDefault &&\n                translate('quality_profiles.warning.is_default_no_rules')}\n            </Alert>\n          )}\n\n          <ProfileInheritance\n            profile={profile}\n            profiles={props.profiles}\n            updateProfiles={props.updateProfiles}\n          />\n          <ProfileProjects profile={profile} />\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translateWithParameters } from '../../../helpers/l10n';\n\ninterface Props {\n  name: string;\n  value: string | null;\n}\n\nexport default function ParameterChange({ name, value }: Props) {\n  return (\n    <div className=\"quality-profile-changelog-parameter\">\n      {value == null\n        ? translateWithParameters(\n            'quality_profiles.changelog.parameter_reset_to_default_value',\n            name\n          )\n        : translateWithParameters('quality_profiles.parameter_set_to', name, value)}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SeverityHelper from '../../../components/shared/SeverityHelper';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  severity: string;\n}\n\nexport default function SeverityChange({ severity }: Props) {\n  return (\n    <div className=\"nowrap\">\n      {translate('quality_profiles.severity_set_to')} <SeverityHelper severity={severity} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ParameterChange from './ParameterChange';\nimport SeverityChange from './SeverityChange';\n\ninterface Props {\n  changes: T.Dict<string | null>;\n}\n\nexport default function ChangesList({ changes }: Props) {\n  const renderSeverity = (key: string) => {\n    const severity = changes[key];\n    return severity ? <SeverityChange severity={severity} /> : null;\n  };\n\n  return (\n    <ul>\n      {Object.keys(changes).map(key => (\n        <li key={key}>\n          {key === 'severity' ? (\n            renderSeverity(key)\n          ) : (\n            <ParameterChange name={key} value={changes[key]} />\n          )}\n        </li>\n      ))}\n    </ul>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { isSameMinute } from 'date-fns';\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport { parseDate } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport { getRulesUrl } from '../../../helpers/urls';\nimport { ProfileChangelogEvent } from '../types';\nimport ChangesList from './ChangesList';\n\ninterface Props {\n  events: ProfileChangelogEvent[];\n}\n\nexport default function Changelog(props: Props) {\n  let isEvenRow = false;\n  const sortedRows = sortBy(\n    props.events,\n    // sort events by date, rounded to a minute, recent events first\n    e => -Number(parseDate(e.date)),\n    e => e.action\n  );\n\n  const rows = sortedRows.map((event, index) => {\n    const prev = index > 0 ? sortedRows[index - 1] : null;\n    const isSameDate = prev != null && isSameMinute(parseDate(prev.date), parseDate(event.date));\n    const isBulkChange =\n      prev != null &&\n      isSameDate &&\n      prev.authorName === event.authorName &&\n      prev.action === event.action;\n\n    if (!isBulkChange) {\n      isEvenRow = !isEvenRow;\n    }\n\n    const className = 'js-profile-changelog-event ' + (isEvenRow ? 'even' : 'odd');\n\n    return (\n      <tr className={className} key={index}>\n        <td className=\"thin nowrap\">{!isBulkChange && <DateTimeFormatter date={event.date} />}</td>\n\n        <td className=\"thin nowrap\">\n          {!isBulkChange &&\n            (event.authorName ? (\n              <span>{event.authorName}</span>\n            ) : (\n              <span className=\"note\">System</span>\n            ))}\n        </td>\n\n        <td className=\"thin nowrap\">\n          {!isBulkChange && translate('quality_profiles.changelog', event.action)}\n        </td>\n\n        <td className=\"quality-profile-changelog-rule-cell\">\n          <Link to={getRulesUrl({ rule_key: event.ruleKey })}>{event.ruleName}</Link>\n        </td>\n\n        <td>{event.params && <ChangesList changes={event.params} />}</td>\n      </tr>\n    );\n  });\n\n  return (\n    <table className=\"data zebra-hover\">\n      <thead>\n        <tr>\n          <th className=\"thin nowrap\">{translate('date')}</th>\n          <th className=\"thin nowrap\">{translate('user')}</th>\n          <th className=\"thin nowrap\">{translate('action')}</th>\n          <th>{translate('rule')}</th>\n          <th>{translate('parameters')}</th>\n        </tr>\n      </thead>\n      <tbody>{rows}</tbody>\n    </table>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function ChangelogEmpty() {\n  return <div className=\"big-spacer-top\">{translate('no_results')}</div>;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport DateRangeInput from '../../../components/controls/DateRangeInput';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  dateRange: { from?: Date; to?: Date } | undefined;\n  onDateRangeChange: (range: { from?: Date; to?: Date }) => void;\n  onReset: () => void;\n}\n\nexport default class ChangelogSearch extends React.PureComponent<Props> {\n  render() {\n    return (\n      <div className=\"display-inline-block\" id=\"quality-profile-changelog-form\">\n        <DateRangeInput onChange={this.props.onDateRangeChange} value={this.props.dateRange} />\n        <Button className=\"spacer-left text-top\" onClick={this.props.onReset}>\n          {translate('reset_verb')}\n        </Button>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport { getProfileChangelog } from '../../../api/quality-profiles';\nimport { withRouter } from '../../../components/hoc/withRouter';\nimport { parseDate, toShortNotSoISOString } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport { Profile, ProfileChangelogEvent } from '../types';\nimport { getProfileChangelogPath } from '../utils';\nimport Changelog from './Changelog';\nimport ChangelogEmpty from './ChangelogEmpty';\nimport ChangelogSearch from './ChangelogSearch';\n\ninterface Props extends Pick<WithRouterProps, 'router' | 'location'> {\n  profile: Profile;\n}\n\ninterface State {\n  events?: ProfileChangelogEvent[];\n  loading: boolean;\n  page?: number;\n  total?: number;\n}\n\nexport class ChangelogContainer extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadChangelog();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.location !== this.props.location) {\n      this.loadChangelog();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  stopLoading() {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  }\n\n  loadChangelog() {\n    this.setState({ loading: true });\n    const {\n      location: { query },\n      profile\n    } = this.props;\n\n    getProfileChangelog(query.since, query.to, profile)\n      .then((r: any) => {\n        if (this.mounted) {\n          this.setState({\n            events: r.events,\n            total: r.total,\n            page: r.p,\n            loading: false\n          });\n        }\n      })\n      .catch(this.stopLoading);\n  }\n\n  loadMore(event: React.SyntheticEvent<HTMLElement>) {\n    event.preventDefault();\n    event.currentTarget.blur();\n\n    if (this.state.page != null) {\n      this.setState({ loading: true });\n      const {\n        location: { query },\n        profile\n      } = this.props;\n\n      getProfileChangelog(query.since, query.to, profile, this.state.page + 1)\n        .then((r: any) => {\n          if (this.mounted && this.state.events) {\n            this.setState(({ events = [] }) => ({\n              events: [...events, ...r.events],\n              total: r.total,\n              page: r.p,\n              loading: false\n            }));\n          }\n        })\n        .catch(this.stopLoading);\n    }\n  }\n\n  handleDateRangeChange = ({ from, to }: { from?: Date; to?: Date }) => {\n    const path = getProfileChangelogPath(this.props.profile.name, this.props.profile.language, {\n      since: from && toShortNotSoISOString(from),\n      to: to && toShortNotSoISOString(to)\n    });\n    this.props.router.push(path);\n  };\n\n  handleReset = () => {\n    const path = getProfileChangelogPath(this.props.profile.name, this.props.profile.language);\n    this.props.router.push(path);\n  };\n\n  render() {\n    const { query } = this.props.location;\n\n    const shouldDisplayFooter =\n      this.state.events != null &&\n      this.state.total != null &&\n      this.state.events.length < this.state.total;\n\n    return (\n      <div className=\"boxed-group boxed-group-inner js-profile-changelog\">\n        <header className=\"spacer-bottom\">\n          <ChangelogSearch\n            dateRange={{\n              from: query.since ? parseDate(query.since) : undefined,\n              to: query.to ? parseDate(query.to) : undefined\n            }}\n            onDateRangeChange={this.handleDateRangeChange}\n            onReset={this.handleReset}\n          />\n\n          {this.state.loading && <i className=\"spinner spacer-left\" />}\n        </header>\n\n        {this.state.events != null && this.state.events.length === 0 && <ChangelogEmpty />}\n\n        {this.state.events != null && this.state.events.length > 0 && (\n          <Changelog events={this.state.events} />\n        )}\n\n        {shouldDisplayFooter && (\n          <footer className=\"text-center spacer-top small\">\n            <a href=\"#\" onClick={this.loadMore.bind(this)}>\n              {translate('show_more')}\n            </a>\n          </footer>\n        )}\n      </div>\n    );\n  }\n}\n\nexport default withRouter(ChangelogContainer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../components/controls/Select';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\nimport { Profile } from '../types';\n\ninterface Props {\n  profile: Profile;\n  profiles: Profile[];\n  onCompare: (rule: string) => void;\n  withKey?: string;\n}\n\nexport default class ComparisonForm extends React.PureComponent<Props> {\n  handleChange = (option: { value: string }) => {\n    this.props.onCompare(option.value);\n  };\n\n  render() {\n    const { profile, profiles, withKey } = this.props;\n    const options = profiles\n      .filter(p => p.language === profile.language && p !== profile)\n      .map(p => ({ value: p.key, label: p.name, isDefault: p.isDefault }));\n\n    function renderValue(p: typeof options[0]) {\n      return (\n        <div>\n          <span>{p.label}</span>\n          {p.isDefault && (\n            <Tooltip overlay={translate('quality_profiles.list.default.help')}>\n              <span className=\" spacer-left badge\">{translate('default')}</span>\n            </Tooltip>\n          )}\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"display-inline-block\">\n        <label className=\"spacer-right\">{translate('quality_profiles.compare_with')}</label>\n        <Select\n          className=\"input-large\"\n          clearable={false}\n          onChange={this.handleChange}\n          options={options}\n          valueRenderer={renderValue}\n          optionRenderer={renderValue}\n          placeholder={translate('select_verb')}\n          value={withKey}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function ComparisonEmpty() {\n  return <div className=\"big-spacer-top\">{translate('quality_profile.empty_comparison')}</div>;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Profile } from '../../../api/quality-profiles';\nimport { getRuleDetails } from '../../../api/rules';\nimport { Button } from '../../../components/controls/buttons';\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\n\nconst ActivationFormModal = lazyLoadComponent(\n  () => import('../../coding-rules/components/ActivationFormModal'),\n  'ActivationFormModal'\n);\n\ninterface Props {\n  onDone: () => Promise<void>;\n  profile: Profile;\n  ruleKey: string;\n}\n\ninterface State {\n  rule?: T.RuleDetails;\n  state: 'closed' | 'opening' | 'open';\n}\n\nexport default class ComparisonResultActivation extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { state: 'closed' };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleButtonClick = () => {\n    this.setState({ state: 'opening' });\n    getRuleDetails({ key: this.props.ruleKey }).then(\n      ({ rule }) => {\n        if (this.mounted) {\n          this.setState({ rule, state: 'open' });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ state: 'closed' });\n        }\n      }\n    );\n  };\n\n  handleCloseModal = () => {\n    this.setState({ state: 'closed' });\n  };\n\n  isOpen(state: State): state is { state: 'open'; rule: T.RuleDetails } {\n    return state.state === 'open';\n  }\n\n  render() {\n    const { profile } = this.props;\n\n    const canActivate = !profile.isBuiltIn && profile.actions && profile.actions.edit;\n    if (!canActivate) {\n      return null;\n    }\n\n    return (\n      <DeferredSpinner loading={this.state.state === 'opening'}>\n        <Button disabled={this.state.state !== 'closed'} onClick={this.handleButtonClick}>\n          {this.props.children}\n        </Button>\n\n        {this.isOpen(this.state) && (\n          <ActivationFormModal\n            modalHeader={translate('coding_rules.activate_in_quality_profile')}\n            onClose={this.handleCloseModal}\n            onDone={this.props.onDone}\n            profiles={[profile]}\n            rule={this.state.rule}\n          />\n        )}\n      </DeferredSpinner>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { CompareResponse, Profile } from '../../../api/quality-profiles';\nimport ChevronLeftIcon from '../../../components/icons/ChevronLeftIcon';\nimport ChevronRightIcon from '../../../components/icons/ChevronRightIcon';\nimport SeverityIcon from '../../../components/icons/SeverityIcon';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { getRulesUrl } from '../../../helpers/urls';\nimport ComparisonEmpty from './ComparisonEmpty';\nimport ComparisonResultActivation from './ComparisonResultActivation';\n\ntype Params = T.Dict<string>;\n\ninterface Props extends CompareResponse {\n  leftProfile: Profile;\n  refresh: () => Promise<void>;\n  rightProfile?: Profile;\n}\n\nexport default class ComparisonResults extends React.PureComponent<Props> {\n  renderRule(rule: { key: string; name: string }, severity: string) {\n    return (\n      <div>\n        <SeverityIcon severity={severity} />{' '}\n        <Link to={getRulesUrl({ rule_key: rule.key, open: rule.key })}>{rule.name}</Link>\n      </div>\n    );\n  }\n\n  renderParameters(params: Params) {\n    if (!params) {\n      return null;\n    }\n    return (\n      <ul>\n        {Object.keys(params).map(key => (\n          <li className=\"spacer-top\" key={key}>\n            <code>\n              {key}\n              {': '}\n              {params[key]}\n            </code>\n          </li>\n        ))}\n      </ul>\n    );\n  }\n\n  renderLeft() {\n    if (this.props.inLeft.length === 0) {\n      return null;\n    }\n    return (\n      <>\n        <tr>\n          <td>\n            <h6>\n              {translateWithParameters(\n                'quality_profiles.x_rules_only_in',\n                this.props.inLeft.length\n              )}{' '}\n              {this.props.left.name}\n            </h6>\n          </td>\n          <td>&nbsp;</td>\n        </tr>\n        {this.props.inLeft.map(rule => (\n          <tr className=\"js-comparison-in-left\" key={`left-${rule.key}`}>\n            <td>{this.renderRule(rule, rule.severity)}</td>\n            <td>\n              {this.props.rightProfile && (\n                <ComparisonResultActivation\n                  key={rule.key}\n                  onDone={this.props.refresh}\n                  profile={this.props.rightProfile}\n                  ruleKey={rule.key}>\n                  <ChevronRightIcon />\n                </ComparisonResultActivation>\n              )}\n            </td>\n          </tr>\n        ))}\n      </>\n    );\n  }\n\n  renderRight() {\n    if (this.props.inRight.length === 0) {\n      return null;\n    }\n    return (\n      <>\n        <tr>\n          <td>&nbsp;</td>\n          <td>\n            <h6>\n              {translateWithParameters(\n                'quality_profiles.x_rules_only_in',\n                this.props.inRight.length\n              )}{' '}\n              {this.props.right.name}\n            </h6>\n          </td>\n        </tr>\n        {this.props.inRight.map(rule => (\n          <tr className=\"js-comparison-in-right\" key={`right-${rule.key}`}>\n            <td className=\"text-right\">\n              <ComparisonResultActivation\n                key={rule.key}\n                onDone={this.props.refresh}\n                profile={this.props.leftProfile}\n                ruleKey={rule.key}>\n                <ChevronLeftIcon />\n              </ComparisonResultActivation>\n            </td>\n            <td>{this.renderRule(rule, rule.severity)}</td>\n          </tr>\n        ))}\n      </>\n    );\n  }\n\n  renderModified() {\n    if (this.props.modified.length === 0) {\n      return null;\n    }\n    return (\n      <>\n        <tr>\n          <td className=\"text-center\" colSpan={2}>\n            <h6>\n              {translateWithParameters(\n                'quality_profiles.x_rules_have_different_configuration',\n                this.props.modified.length\n              )}\n            </h6>\n          </td>\n        </tr>\n        <tr>\n          <td>\n            <h6>{this.props.left.name}</h6>\n          </td>\n          <td>\n            <h6>{this.props.right.name}</h6>\n          </td>\n        </tr>\n        {this.props.modified.map(rule => (\n          <tr className=\"js-comparison-modified\" key={`modified-${rule.key}`}>\n            <td>\n              {this.renderRule(rule, rule.left.severity)}\n              {this.renderParameters(rule.left.params)}\n            </td>\n            <td>\n              {this.renderRule(rule, rule.right.severity)}\n              {this.renderParameters(rule.right.params)}\n            </td>\n          </tr>\n        ))}\n      </>\n    );\n  }\n\n  render() {\n    if (!this.props.inLeft.length && !this.props.inRight.length && !this.props.modified.length) {\n      return <ComparisonEmpty />;\n    }\n\n    return (\n      <table className=\"data zebra quality-profile-comparison-table\">\n        <tbody>\n          {this.renderLeft()}\n          {this.renderRight()}\n          {this.renderModified()}\n        </tbody>\n      </table>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { withRouter, WithRouterProps } from 'react-router';\nimport { compareProfiles, CompareResponse } from '../../../api/quality-profiles';\nimport { Profile } from '../types';\nimport { getProfileComparePath } from '../utils';\nimport ComparisonForm from './ComparisonForm';\nimport ComparisonResults from './ComparisonResults';\n\ninterface Props extends WithRouterProps {\n  profile: Profile;\n  profiles: Profile[];\n}\n\ntype State = { loading: boolean } & Partial<CompareResponse>;\ntype StateWithResults = { loading: boolean } & CompareResponse;\n\nclass ComparisonContainer extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadResults();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.profile !== this.props.profile || prevProps.location !== this.props.location) {\n      this.loadResults();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadResults = () => {\n    const { withKey } = this.props.location.query;\n    if (!withKey) {\n      this.setState({ left: undefined, loading: false });\n      return Promise.resolve();\n    }\n\n    this.setState({ loading: true });\n    return compareProfiles(this.props.profile.key, withKey).then(\n      ({ left, right, inLeft, inRight, modified }) => {\n        if (this.mounted) {\n          this.setState({ left, right, inLeft, inRight, modified, loading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleCompare = (withKey: string) => {\n    const path = getProfileComparePath(\n      this.props.profile.name,\n      this.props.profile.language,\n      withKey\n    );\n    this.props.router.push(path);\n  };\n\n  hasResults(state: State): state is StateWithResults {\n    return state.left !== undefined;\n  }\n\n  render() {\n    const { profile, profiles, location } = this.props;\n    const { withKey } = location.query;\n\n    return (\n      <div className=\"boxed-group boxed-group-inner js-profile-comparison\">\n        <header>\n          <ComparisonForm\n            onCompare={this.handleCompare}\n            profile={profile}\n            profiles={profiles}\n            withKey={withKey}\n          />\n\n          {this.state.loading && <i className=\"spinner spacer-left\" />}\n        </header>\n\n        {this.hasResults(this.state) && (\n          <div className=\"spacer-top\">\n            <ComparisonResults\n              inLeft={this.state.inLeft}\n              inRight={this.state.inRight}\n              left={this.state.left}\n              leftProfile={profile}\n              modified={this.state.modified}\n              refresh={this.loadResults}\n              right={this.state.right}\n              rightProfile={profiles.find(p => p.key === withKey)}\n            />\n          </div>\n        )}\n      </div>\n    );\n  }\n}\n\nexport default withRouter(ComparisonContainer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    component: lazyLoadComponent(() => import('./components/AppContainer')),\n    indexRoute: { component: lazyLoadComponent(() => import('./home/HomeContainer')) },\n    childRoutes: [\n      {\n        component: lazyLoadComponent(() => import('./components/ProfileContainer')),\n        childRoutes: [\n          {\n            path: 'show',\n            component: lazyLoadComponent(() => import('./details/ProfileDetails'))\n          },\n          {\n            path: 'changelog',\n            component: lazyLoadComponent(() => import('./changelog/ChangelogContainer'))\n          },\n          {\n            path: 'compare',\n            component: lazyLoadComponent(() => import('./compare/ComparisonContainer'))\n          }\n        ]\n      }\n    ]\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { keyframes } from '@emotion/core';\nimport styled from '@emotion/styled';\nimport * as React from 'react';\nimport { colors, sizes, zIndexes } from '../../app/theme';\nimport { cutLongWords } from '../../helpers/path';\nimport { ClearButton } from './buttons';\n\ninterface IMessage {\n  id: string;\n  level: 'ERROR' | 'SUCCESS';\n  message: string;\n}\n\nexport interface GlobalMessagesProps {\n  closeGlobalMessage: (id: string) => void;\n  messages: IMessage[];\n}\n\nexport default function GlobalMessages({ closeGlobalMessage, messages }: GlobalMessagesProps) {\n  if (messages.length === 0) {\n    return null;\n  }\n\n  return (\n    <MessagesContainer>\n      {messages.map(message => (\n        <GlobalMessage closeGlobalMessage={closeGlobalMessage} key={message.id} message={message} />\n      ))}\n    </MessagesContainer>\n  );\n}\n\nconst MessagesContainer = styled.div`\n  position: fixed;\n  z-index: ${zIndexes.processContainerZIndex};\n  top: 0;\n  left: 50%;\n  width: 350px;\n  margin-left: -175px;\n`;\n\nexport class GlobalMessage extends React.PureComponent<{\n  closeGlobalMessage: (id: string) => void;\n  message: IMessage;\n}> {\n  handleClose = () => {\n    this.props.closeGlobalMessage(this.props.message.id);\n  };\n\n  render() {\n    const { message } = this.props;\n    return (\n      <Message\n        data-test={`global-message__${message.level}`}\n        level={message.level}\n        role={message.level === 'SUCCESS' ? 'status' : 'alert'}>\n        {cutLongWords(message.message)}\n        <CloseButton\n          className=\"button-small\"\n          color=\"#fff\"\n          level={message.level}\n          onClick={this.handleClose}\n        />\n      </Message>\n    );\n  }\n}\n\nconst appearAnim = keyframes`\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n  }\n`;\n\nconst Message = styled.div<Pick<IMessage, 'level'>>`\n  position: relative;\n  padding: 0 30px 0 10px;\n  line-height: ${sizes.controlHeight};\n  border-radius: 0 0 3px 3px;\n  box-sizing: border-box;\n  color: #ffffff;\n  background-color: ${({ level }) => (level === 'SUCCESS' ? colors.green : colors.red)};\n  text-align: center;\n  opacity: 0;\n  animation: ${appearAnim} 0.2s ease forwards;\n\n  & + & {\n    margin-top: calc(${sizes.gridSize} / 2);\n    border-radius: 3px;\n  }\n`;\n\nconst CloseButton = styled(ClearButton)<Pick<IMessage, 'level'>>`\n  position: absolute;\n  top: calc(${sizes.gridSize} / 4);\n  right: calc(${sizes.gridSize} / 4);\n\n  &:hover svg,\n  &:focus svg {\n    color: ${({ level }) => (level === 'SUCCESS' ? colors.green : colors.red)};\n  }\n`;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport GlobalMessages from '../../components/controls/GlobalMessages';\nimport { closeGlobalMessage } from '../../store/globalMessages';\nimport { getGlobalMessages, Store } from '../../store/rootReducer';\n\nconst mapStateToProps = (state: Store) => ({\n  messages: getGlobalMessages(state)\n});\n\nconst mapDispatchToProps = { closeGlobalMessage };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(GlobalMessages);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { SubmitButton } from '../../../components/controls/buttons';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport './LoginForm.css';\n\ninterface Props {\n  collapsed?: boolean;\n  onSubmit: (login: string, password: string) => Promise<void>;\n  returnTo: string;\n}\n\ninterface State {\n  collapsed: boolean;\n  loading: boolean;\n  login: string;\n  password: string;\n}\n\nexport default class LoginForm extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      collapsed: Boolean(props.collapsed),\n      loading: false,\n      login: '',\n      password: ''\n    };\n  }\n\n  stopLoading = () => {\n    this.setState({ loading: false });\n  };\n\n  handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ loading: true });\n    this.props\n      .onSubmit(this.state.login, this.state.password)\n      .then(this.stopLoading, this.stopLoading);\n  };\n\n  handleMoreOptionsClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.setState({ collapsed: false });\n  };\n\n  handleLoginChange = (event: React.ChangeEvent<HTMLInputElement>) =>\n    this.setState({ login: event.currentTarget.value });\n\n  handlePwdChange = (event: React.ChangeEvent<HTMLInputElement>) =>\n    this.setState({ password: event.currentTarget.value });\n\n  render() {\n    if (this.state.collapsed) {\n      return (\n        <div className=\"text-center\">\n          <a\n            className=\"small text-muted js-more-options\"\n            href=\"#\"\n            onClick={this.handleMoreOptionsClick}>\n            {translate('login.more_options')}\n          </a>\n        </div>\n      );\n    }\n    return (\n      <form className=\"login-form\" onSubmit={this.handleSubmit}>\n        <div className=\"big-spacer-bottom\">\n          <label className=\"login-label\" htmlFor=\"login\">\n            {translate('login')}\n          </label>\n          <input\n            autoFocus={true}\n            className=\"login-input\"\n            id=\"login\"\n            maxLength={255}\n            name=\"login\"\n            onChange={this.handleLoginChange}\n            placeholder={translate('login')}\n            required={true}\n            type=\"text\"\n            value={this.state.login}\n          />\n        </div>\n\n        <div className=\"big-spacer-bottom\">\n          <label className=\"login-label\" htmlFor=\"password\">\n            {translate('password')}\n          </label>\n          <input\n            className=\"login-input\"\n            id=\"password\"\n            name=\"password\"\n            onChange={this.handlePwdChange}\n            placeholder={translate('password')}\n            required={true}\n            type=\"password\"\n            value={this.state.password}\n          />\n        </div>\n\n        <div>\n          <div className=\"text-right overflow-hidden\">\n            <DeferredSpinner className=\"spacer-right\" loading={this.state.loading} />\n            <SubmitButton disabled={this.state.loading}>\n              {translate('sessions.log_in')}\n            </SubmitButton>\n            <a className=\"spacer-left\" href={`${getBaseUrl()}/`}>\n              {translate('cancel')}\n            </a>\n          </div>\n        </div>\n      </form>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { isDarkColor } from '../../helpers/colors';\nimport { getBaseUrl } from '../../helpers/system';\nimport './IdentityProviderLink.css';\n\ninterface Props {\n  backgroundColor: string;\n  children: React.ReactNode;\n  className?: string;\n  iconPath: string;\n  name: string;\n  onClick?: () => void;\n  small?: boolean;\n  url: string | undefined;\n}\n\nexport default function IdentityProviderLink({\n  backgroundColor,\n  children,\n  className,\n  iconPath,\n  name,\n  onClick,\n  small,\n  url\n}: Props) {\n  const size = small ? 14 : 20;\n\n  return (\n    <a\n      className={classNames(\n        'identity-provider-link',\n        { 'dark-text': !isDarkColor(backgroundColor), small },\n        className\n      )}\n      href={url}\n      onClick={onClick}\n      style={{ backgroundColor }}>\n      <img alt={name} height={size} src={getBaseUrl() + iconPath} width={size} />\n      {children}\n    </a>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport IdentityProviderLink from '../../../components/controls/IdentityProviderLink';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport './OAuthProviders.css';\n\ninterface Props {\n  className?: string;\n  formatLabel?: (name: string) => React.ReactNode;\n  identityProviders: T.IdentityProvider[];\n  returnTo: string;\n}\n\nexport default function OAuthProviders(props: Props) {\n  const formatFunction = props.formatLabel || defaultFormatLabel;\n  return (\n    <section className={classNames('oauth-providers', props.className)}>\n      <ul>\n        {props.identityProviders.map(identityProvider => (\n          <OAuthProvider\n            format={formatFunction}\n            identityProvider={identityProvider}\n            key={identityProvider.key}\n            returnTo={props.returnTo}\n          />\n        ))}\n      </ul>\n    </section>\n  );\n}\n\ninterface ItemProps {\n  format: (name: string) => React.ReactNode;\n  identityProvider: T.IdentityProvider;\n  returnTo: string;\n}\n\nfunction OAuthProvider({ format, identityProvider, returnTo }: ItemProps) {\n  return (\n    <li>\n      <IdentityProviderLink\n        backgroundColor={identityProvider.backgroundColor}\n        iconPath={identityProvider.iconPath}\n        name={identityProvider.name}\n        url={\n          `${getBaseUrl()}/sessions/init/${identityProvider.key}` +\n          `?return_to=${encodeURIComponent(returnTo)}`\n        }>\n        <span>{format(identityProvider.name)}</span>\n      </IdentityProviderLink>\n      {identityProvider.helpMessage && (\n        <HelpTooltip className=\"oauth-providers-help\" overlay={identityProvider.helpMessage} />\n      )}\n    </li>\n  );\n}\n\nfunction defaultFormatLabel(name: string) {\n  return translateWithParameters('login.login_with_x', name);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport GlobalMessagesContainer from '../../../app/components/GlobalMessagesContainer';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { Store } from '../../../store/rootReducer';\nimport './Login.css';\nimport LoginForm from './LoginForm';\nimport OAuthProviders from './OAuthProviders';\n\nexport interface LoginProps {\n  authorizationError?: boolean;\n  authenticationError?: boolean;\n  identityProviders: T.IdentityProvider[];\n  onSubmit: (login: string, password: string) => Promise<void>;\n  returnTo: string;\n}\n\nexport function Login(props: LoginProps) {\n  const { authorizationError, authenticationError, identityProviders, returnTo } = props;\n  const displayError = authorizationError || authenticationError;\n\n  return (\n    <div className=\"login-page\" id=\"login_form\">\n      <h1 className=\"login-title text-center huge-spacer-bottom\">\n        {translate('login.login_to_sonarqube')}\n      </h1>\n\n      {displayError && (\n        <Alert className=\"huge-spacer-bottom\" display=\"block\" variant=\"error\">\n          {translate('login.unauthorized_access_alert')}\n        </Alert>\n      )}\n\n      {identityProviders.length > 0 && (\n        <OAuthProviders identityProviders={identityProviders} returnTo={returnTo} />\n      )}\n\n      <LoginForm\n        collapsed={identityProviders.length > 0}\n        onSubmit={props.onSubmit}\n        returnTo={returnTo}\n      />\n\n      <GlobalMessagesContainer />\n    </div>\n  );\n}\n\nconst mapStateToProps = (state: Store) => ({\n  authorizationError: state.appState.authorizationError,\n  authenticationError: state.appState.authenticationError\n});\n\nexport default connect(mapStateToProps)(Login);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getIdentityProviders } from '../../../api/users';\nimport { getReturnUrl } from '../../../helpers/urls';\nimport { doLogin } from '../../../store/rootActions';\nimport Login from './Login';\n\ninterface OwnProps {\n  location: Pick<Location, 'hash' | 'pathname' | 'query'> & {\n    query: { advanced?: string; return_to?: string };\n  };\n}\n\ninterface DispatchToProps {\n  doLogin: (login: string, password: string) => Promise<void>;\n}\n\ntype Props = OwnProps & DispatchToProps;\n\ninterface State {\n  identityProviders?: T.IdentityProvider[];\n}\n\nexport class LoginContainer extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n    getIdentityProviders().then(\n      ({ identityProviders }) => {\n        if (this.mounted) {\n          this.setState({ identityProviders });\n        }\n      },\n      () => {}\n    );\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSuccessfulLogin = () => {\n    window.location.href = getReturnUrl(this.props.location);\n  };\n\n  handleSubmit = (login: string, password: string) => {\n    return this.props.doLogin(login, password).then(this.handleSuccessfulLogin, () => {});\n  };\n\n  render() {\n    const { location } = this.props;\n    const { identityProviders } = this.state;\n\n    if (!identityProviders) {\n      return null;\n    }\n\n    return (\n      <Login\n        identityProviders={identityProviders}\n        onSubmit={this.handleSubmit}\n        returnTo={getReturnUrl(location)}\n      />\n    );\n  }\n}\n\nconst mapStateToProps = null;\nconst mapDispatchToProps = { doLogin: doLogin as any };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(LoginContainer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { get, remove, save } from '../../helpers/storage';\n\nconst RECENT_HISTORY = 'sonar_recent_history';\nconst HISTORY_LIMIT = 10;\n\nexport type History = Array<{\n  key: string;\n  name: string;\n  icon: string;\n}>;\n\nexport default class RecentHistory {\n  static get(): History {\n    const history = get(RECENT_HISTORY);\n    if (history == null) {\n      return [];\n    } else {\n      try {\n        return JSON.parse(history);\n      } catch {\n        remove(RECENT_HISTORY);\n        return [];\n      }\n    }\n  }\n\n  static set(newHistory: History) {\n    save(RECENT_HISTORY, JSON.stringify(newHistory));\n  }\n\n  static clear() {\n    remove(RECENT_HISTORY);\n  }\n\n  static add(componentKey: string, componentName: string, icon: string) {\n    const sonarHistory = RecentHistory.get();\n    const newEntry = { key: componentKey, name: componentName, icon };\n    let newHistory = sonarHistory.filter(entry => entry.key !== newEntry.key);\n    newHistory.unshift(newEntry);\n    newHistory = newHistory.slice(0, HISTORY_LIMIT);\n    RecentHistory.set(newHistory);\n  }\n\n  static remove(componentKey: string) {\n    const history = RecentHistory.get();\n    const newHistory = history.filter(entry => entry.key !== componentKey);\n    RecentHistory.set(newHistory);\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport GlobalMessagesContainer from '../../../app/components/GlobalMessagesContainer';\nimport RecentHistory from '../../../app/components/RecentHistory';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { doLogout } from '../../../store/rootActions';\n\ninterface Props {\n  doLogout: () => Promise<void>;\n}\n\nexport class Logout extends React.PureComponent<Props> {\n  componentDidMount() {\n    this.props.doLogout().then(\n      () => {\n        RecentHistory.clear();\n        window.location.replace(getBaseUrl() + '/');\n      },\n      () => {}\n    );\n  }\n\n  render() {\n    return (\n      <div className=\"page page-limited\">\n        <GlobalMessagesContainer />\n        <div className=\"text-center\">{translate('logging_out')}</div>\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = () => ({});\n\nconst mapDispatchToProps = { doLogout };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Logout as any);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getCookie } from '../../../helpers/cookies';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\n\nexport default function Unauthorized() {\n  const message = decodeURIComponent(getCookie('AUTHENTICATION-ERROR') || '');\n  return (\n    <div className=\"page-wrapper-simple\" id=\"bd\">\n      <div className=\"page-simple\" id=\"nonav\">\n        <div className=\"text-center\">\n          <p id=\"unauthorized\">{translate('unauthorized.message')}</p>\n\n          {Boolean(message) && (\n            <p className=\"spacer-top\">\n              {translate('unauthorized.reason')} {message}\n            </p>\n          )}\n\n          <div className=\"big-spacer-top\">\n            <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    path: 'new',\n    component: lazyLoadComponent(() => import('./components/LoginContainer'))\n  },\n  {\n    path: 'logout',\n    component: lazyLoadComponent(() => import('./components/Logout'))\n  },\n  {\n    path: 'unauthorized',\n    component: lazyLoadComponent(() => import('./components/Unauthorized'))\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button, ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { translate } from '../../../helpers/l10n';\nimport { Setting } from '../../../types/settings';\nimport { getDefaultValue, isEmptyValue } from '../utils';\n\ntype Props = {\n  changedValue: string;\n  hasError: boolean;\n  hasValueChanged: boolean;\n  isDefault: boolean;\n  onCancel: () => void;\n  onReset: () => void;\n  onSave: () => void;\n  setting: Setting;\n};\n\ntype State = { reseting: boolean };\n\nexport default class DefinitionActions extends React.PureComponent<Props, State> {\n  state: State = { reseting: false };\n\n  handleClose = () => {\n    this.setState({ reseting: false });\n  };\n\n  handleReset = () => {\n    this.setState({ reseting: true });\n  };\n\n  handleSubmit = () => {\n    this.props.onReset();\n    this.handleClose();\n  };\n\n  renderModal() {\n    const header = translate('settings.reset_confirm.title');\n    return (\n      <Modal contentLabel={header} onRequestClose={this.handleClose}>\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n        <form onSubmit={this.handleSubmit}>\n          <div className=\"modal-body\">\n            <p>{translate('settings.reset_confirm.description')}</p>\n          </div>\n          <footer className=\"modal-foot\">\n            <SubmitButton className=\"button-red\">{translate('reset_verb')}</SubmitButton>\n            <ResetButtonLink onClick={this.handleClose}>{translate('cancel')}</ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n\n  render() {\n    const { setting, changedValue, isDefault, hasValueChanged } = this.props;\n    const hasBeenChangedToEmptyValue =\n      changedValue != null && isEmptyValue(setting.definition, changedValue);\n    const showReset = hasBeenChangedToEmptyValue || (!isDefault && setting.hasValue);\n\n    return (\n      <>\n        {isDefault && !hasValueChanged && (\n          <div className=\"spacer-top note\" style={{ lineHeight: '24px' }}>\n            {translate('settings._default')}\n          </div>\n        )}\n        <div className=\"settings-definition-changes nowrap\">\n          {hasValueChanged && (\n            <Button\n              className=\"spacer-right button-success\"\n              disabled={this.props.hasError}\n              onClick={this.props.onSave}>\n              {translate('save')}\n            </Button>\n          )}\n\n          {showReset && (\n            <Button className=\"spacer-right\" onClick={this.handleReset}>\n              {translate('reset_verb')}\n            </Button>\n          )}\n\n          {hasValueChanged && (\n            <ResetButtonLink className=\"spacer-right\" onClick={this.props.onCancel}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          )}\n\n          {showReset && (\n            <span className=\"note\">\n              {translate('default')}\n              {': '}\n              {getDefaultValue(setting)}\n            </span>\n          )}\n\n          {this.state.reseting && this.renderModal()}\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function LockIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M5.455 7.364h5.09v-1.91A2.55 2.55 0 0 0 8 2.91a2.55 2.55 0 0 0-2.545 2.546v1.909zm8.272.954v5.727a.955.955 0 0 1-.954.955H3.227a.955.955 0 0 1-.954-.955V8.318c0-.527.427-.954.954-.954h.318v-1.91C3.545 3.01 5.554 1 8 1s4.455 2.009 4.455 4.455v1.909h.318c.527 0 .954.427.954.954z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../../../app/theme';\nimport { Button } from '../../../../components/controls/buttons';\nimport LockIcon from '../../../../components/icons/LockIcon';\nimport { translate } from '../../../../helpers/l10n';\nimport {\n  DefaultInputProps,\n  DefaultSpecializedInputProps,\n  getUniqueName,\n  isDefaultOrInherited\n} from '../../utils';\n\ninterface State {\n  changing: boolean;\n}\n\ninterface Props extends DefaultInputProps {\n  input: React.ComponentType<DefaultSpecializedInputProps>;\n}\n\nexport default class InputForSecured extends React.PureComponent<Props, State> {\n  state: State = {\n    changing: !this.props.setting.hasValue\n  };\n\n  componentWillReceiveProps(nextProps: Props) {\n    /*\n     * Reset `changing` if:\n     *  - the value is reset (valueChanged -> !valueChanged)\n     *     or\n     *  - the value changes from outside the input (i.e. store update/reset/cancel)\n     */\n    if (\n      (this.props.hasValueChanged || this.props.setting !== nextProps.setting) &&\n      !nextProps.hasValueChanged\n    ) {\n      this.setState({ changing: !nextProps.setting.hasValue });\n    }\n  }\n\n  handleInputChange = (value: string) => {\n    this.props.onChange(value);\n  };\n\n  handleChangeClick = () => {\n    this.setState({ changing: true });\n  };\n\n  renderInput() {\n    const { input: Input, setting, value } = this.props;\n    const name = getUniqueName(setting.definition);\n    return (\n      // The input hidden will prevent browser asking for saving login information\n      <>\n        <input className=\"hidden\" type=\"password\" />\n        <Input\n          autoComplete=\"off\"\n          className=\"js-setting-input settings-large-input\"\n          isDefault={isDefaultOrInherited(setting)}\n          name={name}\n          onChange={this.handleInputChange}\n          setting={setting}\n          type=\"password\"\n          value={value}\n        />\n      </>\n    );\n  }\n\n  render() {\n    if (this.state.changing) {\n      return this.renderInput();\n    }\n\n    return (\n      <>\n        <LockIcon className=\"text-middle big-spacer-right\" fill={colors.gray60} />\n        <Button className=\"text-middle\" onClick={this.handleChangeClick}>\n          {translate('change_verb')}\n        </Button>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Toggle from '../../../../components/controls/Toggle';\nimport { translate } from '../../../../helpers/l10n';\nimport { DefaultSpecializedInputProps } from '../../utils';\n\ninterface Props extends DefaultSpecializedInputProps {\n  value: string | boolean | undefined;\n}\n\nexport default function InputForBoolean({ onChange, name, value }: Props) {\n  const displayedValue = value != null ? value : false;\n  return (\n    <div className=\"display-inline-block text-top\">\n      <Toggle name={name} onChange={onChange} value={displayedValue} />\n      {value == null && <span className=\"spacer-left note\">{translate('settings.not_set')}</span>}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../../components/controls/buttons';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport { DefaultSpecializedInputProps } from '../../utils';\n\nconst JSON_SPACE_SIZE = 4;\n\ninterface State {\n  formatError: boolean;\n}\n\nexport default class InputForJSON extends React.PureComponent<DefaultSpecializedInputProps, State> {\n  state: State = { formatError: false };\n\n  handleInputChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.setState({ formatError: false });\n    this.props.onChange(event.target.value);\n  };\n\n  format = () => {\n    const { value } = this.props;\n    try {\n      if (value) {\n        this.props.onChange(JSON.stringify(JSON.parse(value), undefined, JSON_SPACE_SIZE));\n      }\n    } catch (e) {\n      this.setState({ formatError: true });\n    }\n  };\n\n  render() {\n    const { formatError } = this.state;\n    return (\n      <div className=\"display-flex-end\">\n        <textarea\n          className=\"settings-large-input text-top monospaced spacer-right\"\n          name={this.props.name}\n          onChange={this.handleInputChange}\n          rows={5}\n          value={this.props.value || ''}\n        />\n        <div>\n          {formatError && <Alert variant=\"info\">{translate('settings.json.format_error')} </Alert>}\n          <Button className=\"spacer-top\" onClick={this.format}>\n            {translate('settings.json.format')}\n          </Button>\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { DefaultSpecializedInputProps } from '../../utils';\n\ninterface Props extends DefaultSpecializedInputProps {\n  value: string | number;\n}\n\nexport default class SimpleInput extends React.PureComponent<Props> {\n  handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.props.onChange(event.currentTarget.value);\n  };\n\n  handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n    if (event.keyCode === 13 && this.props.onSave) {\n      this.props.onSave();\n    } else if (event.keyCode === 27 && this.props.onCancel) {\n      this.props.onCancel();\n    }\n  };\n\n  render() {\n    const { autoComplete, autoFocus, className, name, value = '', type } = this.props;\n    return (\n      <input\n        autoComplete={autoComplete}\n        autoFocus={autoFocus}\n        className={classNames('text-top', className)}\n        name={name}\n        onChange={this.handleInputChange}\n        onKeyDown={this.handleKeyDown}\n        type={type}\n        value={value}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DefaultSpecializedInputProps } from '../../utils';\nimport SimpleInput from './SimpleInput';\n\nexport default function InputForNumber(props: DefaultSpecializedInputProps) {\n  return <SimpleInput className=\"input-small\" type=\"text\" {...props} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DefaultSpecializedInputProps } from '../../utils';\nimport SimpleInput from './SimpleInput';\n\nexport default function InputForPassword(props: DefaultSpecializedInputProps) {\n  return (\n    <SimpleInput {...props} className=\"settings-large-input\" type=\"password\" autoComplete=\"off\" />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Select from '../../../../components/controls/Select';\nimport { SettingCategoryDefinition } from '../../../../types/settings';\nimport { DefaultSpecializedInputProps } from '../../utils';\n\ntype Props = DefaultSpecializedInputProps & Pick<SettingCategoryDefinition, 'options'>;\n\nexport default class InputForSingleSelectList extends React.PureComponent<Props> {\n  handleInputChange = ({ value }: { value: string }) => {\n    this.props.onChange(value);\n  };\n\n  render() {\n    const options = this.props.options.map(option => ({\n      label: option,\n      value: option\n    }));\n\n    return (\n      <Select\n        className=\"settings-large-input\"\n        clearable={false}\n        name={this.props.name}\n        onChange={this.handleInputChange}\n        options={options}\n        value={this.props.value}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DefaultSpecializedInputProps } from '../../utils';\nimport SimpleInput from './SimpleInput';\n\nexport default function InputForString(props: DefaultSpecializedInputProps) {\n  return <SimpleInput className=\"settings-large-input\" type=\"text\" {...props} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DefaultSpecializedInputProps } from '../../utils';\n\nexport default class InputForText extends React.PureComponent<DefaultSpecializedInputProps> {\n  handleInputChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.props.onChange(event.target.value);\n  };\n\n  render() {\n    return (\n      <textarea\n        className=\"settings-large-input text-top\"\n        name={this.props.name}\n        onChange={this.handleInputChange}\n        rows={5}\n        value={this.props.value || ''}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { SettingType } from '../../../../types/settings';\nimport { DefaultSpecializedInputProps } from '../../utils';\nimport InputForBoolean from './InputForBoolean';\nimport InputForJSON from './InputForJSON';\nimport InputForNumber from './InputForNumber';\nimport InputForPassword from './InputForPassword';\nimport InputForSingleSelectList from './InputForSingleSelectList';\nimport InputForString from './InputForString';\nimport InputForText from './InputForText';\n\nfunction withOptions(options: string[]): React.ComponentType<DefaultSpecializedInputProps> {\n  return function Wrapped(props: DefaultSpecializedInputProps) {\n    return <InputForSingleSelectList options={options} {...props} />;\n  };\n}\n\nexport default function PrimitiveInput(props: DefaultSpecializedInputProps) {\n  const { setting, name, isDefault, ...other } = props;\n  const { definition } = setting;\n  const typeMapping: {\n    [type in SettingType]?: React.ComponentType<DefaultSpecializedInputProps>;\n  } = {\n    STRING: InputForString,\n    TEXT: InputForText,\n    JSON: InputForJSON,\n    PASSWORD: InputForPassword,\n    BOOLEAN: InputForBoolean,\n    INTEGER: InputForNumber,\n    LONG: InputForNumber,\n    FLOAT: InputForNumber,\n    SINGLE_SELECT_LIST: withOptions(definition.options)\n  };\n\n  const InputComponent = (definition.type && typeMapping[definition.type]) || InputForString;\n\n  return <InputComponent isDefault={isDefault} name={name} setting={setting} {...other} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DeleteButton } from '../../../../components/controls/buttons';\nimport { DefaultSpecializedInputProps, getEmptyValue } from '../../utils';\nimport PrimitiveInput from './PrimitiveInput';\n\nexport default class MultiValueInput extends React.PureComponent<DefaultSpecializedInputProps> {\n  ensureValue = () => {\n    return this.props.value || [];\n  };\n\n  handleSingleInputChange = (index: number, value: any) => {\n    const newValue = [...this.ensureValue()];\n    newValue.splice(index, 1, value);\n    this.props.onChange(newValue);\n  };\n\n  handleDeleteValue = (index: number) => {\n    const newValue = [...this.ensureValue()];\n    newValue.splice(index, 1);\n    this.props.onChange(newValue);\n  };\n\n  renderInput(value: any, index: number, isLast: boolean) {\n    const { setting, isDefault, name } = this.props;\n    return (\n      <li className=\"spacer-bottom\" key={index}>\n        <PrimitiveInput\n          isDefault={isDefault}\n          name={name}\n          hasValueChanged={this.props.hasValueChanged}\n          onChange={value => this.handleSingleInputChange(index, value)}\n          setting={setting}\n          value={value}\n        />\n\n        {!isLast && (\n          <div className=\"display-inline-block spacer-left\">\n            <DeleteButton\n              className=\"js-remove-value\"\n              onClick={() => this.handleDeleteValue(index)}\n            />\n          </div>\n        )}\n      </li>\n    );\n  }\n\n  render() {\n    const displayedValue = [...this.ensureValue(), ...getEmptyValue(this.props.setting.definition)];\n    return (\n      <div>\n        <ul>\n          {displayedValue.map((value, index) =>\n            this.renderInput(value, index, index === displayedValue.length - 1)\n          )}\n        </ul>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DeleteButton } from '../../../../components/controls/buttons';\nimport {\n  DefaultSpecializedInputProps,\n  getEmptyValue,\n  getUniqueName,\n  isCategoryDefinition\n} from '../../utils';\nimport PrimitiveInput from './PrimitiveInput';\n\nexport default class PropertySetInput extends React.PureComponent<DefaultSpecializedInputProps> {\n  ensureValue() {\n    return this.props.value || [];\n  }\n\n  handleDeleteValue = (index: number) => {\n    const newValue = [...this.ensureValue()];\n    newValue.splice(index, 1);\n    this.props.onChange(newValue);\n  };\n\n  handleInputChange = (index: number, fieldKey: string, value: any) => {\n    const emptyValue = getEmptyValue(this.props.setting.definition)[0];\n    const newValue = [...this.ensureValue()];\n    const newFields = { ...emptyValue, ...newValue[index], [fieldKey]: value };\n    newValue.splice(index, 1, newFields);\n    return this.props.onChange(newValue);\n  };\n\n  renderFields(fieldValues: any, index: number, isLast: boolean) {\n    const { setting, isDefault } = this.props;\n    const { definition } = setting;\n\n    return (\n      <tr key={index}>\n        {isCategoryDefinition(definition) &&\n          definition.fields.map(field => {\n            const newSetting = {\n              ...setting,\n              definition: field,\n              value: fieldValues[field.key]\n            };\n            return (\n              <td key={field.key}>\n                <PrimitiveInput\n                  isDefault={isDefault}\n                  hasValueChanged={this.props.hasValueChanged}\n                  name={getUniqueName(definition, field.key)}\n                  onChange={value => this.handleInputChange(index, field.key, value)}\n                  setting={newSetting}\n                  value={fieldValues[field.key]}\n                />\n              </td>\n            );\n          })}\n        <td className=\"thin nowrap text-middle\">\n          {!isLast && (\n            <DeleteButton\n              className=\"js-remove-value\"\n              onClick={() => this.handleDeleteValue(index)}\n            />\n          )}\n        </td>\n      </tr>\n    );\n  }\n\n  render() {\n    const { definition } = this.props.setting;\n    const displayedValue = [...this.ensureValue(), ...getEmptyValue(definition)];\n\n    return (\n      <div>\n        <table\n          className=\"data zebra-hover no-outer-padding\"\n          style={{ width: 'auto', minWidth: 480, marginTop: -12 }}>\n          <thead>\n            <tr>\n              {isCategoryDefinition(definition) &&\n                definition.fields.map(field => (\n                  <th key={field.key}>\n                    {field.name}\n                    {field.description != null && (\n                      <span className=\"spacer-top small\">{field.description}</span>\n                    )}\n                  </th>\n                ))}\n              <th>&nbsp;</th>\n            </tr>\n          </thead>\n          <tbody>\n            {displayedValue.map((fieldValues, index) =>\n              this.renderFields(fieldValues, index, index === displayedValue.length - 1)\n            )}\n          </tbody>\n        </table>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { SettingType } from '../../../../types/settings';\nimport {\n  DefaultInputProps,\n  DefaultSpecializedInputProps,\n  getUniqueName,\n  isCategoryDefinition,\n  isDefaultOrInherited,\n  isSecuredDefinition\n} from '../../utils';\nimport InputForSecured from './InputForSecured';\nimport MultiValueInput from './MultiValueInput';\nimport PrimitiveInput from './PrimitiveInput';\nimport PropertySetInput from './PropertySetInput';\n\nexport default function Input(props: DefaultInputProps) {\n  const { setting } = props;\n  const { definition } = setting;\n  const name = getUniqueName(definition);\n\n  let Input: React.ComponentType<DefaultSpecializedInputProps> = PrimitiveInput;\n\n  if (isCategoryDefinition(definition) && definition.multiValues) {\n    Input = MultiValueInput;\n  }\n\n  if (definition.type === SettingType.PROPERTY_SET) {\n    Input = PropertySetInput;\n  }\n\n  if (isSecuredDefinition(definition)) {\n    return <InputForSecured input={Input} {...props} />;\n  }\n\n  return <Input {...props} name={name} isDefault={isDefaultOrInherited(setting)} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport AlertErrorIcon from '../../../components/icons/AlertErrorIcon';\nimport AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { sanitizeStringRestricted } from '../../../helpers/sanitize';\nimport {\n  getSettingsAppChangedValue,\n  getSettingsAppValidationMessage,\n  isSettingsAppLoading,\n  Store\n} from '../../../store/rootReducer';\nimport { Setting } from '../../../types/settings';\nimport { checkValue, resetValue, saveValue } from '../store/actions';\nimport { cancelChange, changeValue, passValidation } from '../store/settingsPage';\nimport {\n  getPropertyDescription,\n  getPropertyName,\n  getSettingValue,\n  isDefaultOrInherited\n} from '../utils';\nimport DefinitionActions from './DefinitionActions';\nimport Input from './inputs/Input';\n\ninterface Props {\n  cancelChange: (key: string) => void;\n  changeValue: (key: string, value: any) => void;\n  changedValue: any;\n  checkValue: (key: string) => boolean;\n  component?: T.Component;\n  loading: boolean;\n  passValidation: (key: string) => void;\n  resetValue: (key: string, component?: string) => Promise<void>;\n  saveValue: (key: string, component?: string) => Promise<void>;\n  setting: Setting;\n  validationMessage?: string;\n}\n\ninterface State {\n  success: boolean;\n}\n\nconst SAFE_SET_STATE_DELAY = 3000;\n\nexport class Definition extends React.PureComponent<Props, State> {\n  timeout?: number;\n  mounted = false;\n  state = { success: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  safeSetState(changes: State) {\n    if (this.mounted) {\n      this.setState(changes);\n    }\n  }\n\n  handleChange = (value: any) => {\n    clearTimeout(this.timeout);\n    this.props.changeValue(this.props.setting.definition.key, value);\n    this.handleCheck();\n  };\n\n  handleReset = () => {\n    const { component, setting } = this.props;\n    const { definition } = setting;\n    const componentKey = component && component.key;\n    return this.props.resetValue(definition.key, componentKey).then(() => {\n      this.props.cancelChange(definition.key);\n      this.safeSetState({ success: true });\n      this.timeout = window.setTimeout(\n        () => this.safeSetState({ success: false }),\n        SAFE_SET_STATE_DELAY\n      );\n    });\n  };\n\n  handleCancel = () => {\n    const { setting } = this.props;\n    this.props.cancelChange(setting.definition.key);\n    this.props.passValidation(setting.definition.key);\n  };\n\n  handleCheck = () => {\n    const { setting } = this.props;\n    this.props.checkValue(setting.definition.key);\n  };\n\n  handleSave = () => {\n    if (this.props.changedValue != null) {\n      this.safeSetState({ success: false });\n      const { component, setting } = this.props;\n      this.props.saveValue(setting.definition.key, component && component.key).then(\n        () => {\n          this.safeSetState({ success: true });\n          this.timeout = window.setTimeout(\n            () => this.safeSetState({ success: false }),\n            SAFE_SET_STATE_DELAY\n          );\n        },\n        () => {\n          /* Do nothing */\n        }\n      );\n    }\n  };\n\n  render() {\n    const { changedValue, loading, setting, validationMessage } = this.props;\n    const { definition } = setting;\n    const propertyName = getPropertyName(definition);\n    const hasError = validationMessage != null;\n    const hasValueChanged = changedValue != null;\n    const effectiveValue = hasValueChanged ? changedValue : getSettingValue(setting);\n    const isDefault = isDefaultOrInherited(setting);\n    const description = getPropertyDescription(definition);\n    return (\n      <div\n        className={classNames('settings-definition', {\n          'settings-definition-changed': hasValueChanged\n        })}\n        data-key={definition.key}>\n        <div className=\"settings-definition-left\">\n          <h3 className=\"settings-definition-name\" title={propertyName}>\n            {propertyName}\n          </h3>\n\n          {description && (\n            <div\n              className=\"markdown small spacer-top\"\n              // eslint-disable-next-line react/no-danger\n              dangerouslySetInnerHTML={{ __html: sanitizeStringRestricted(description) }}\n            />\n          )}\n\n          <div className=\"settings-definition-key note little-spacer-top\">\n            {translateWithParameters('settings.key_x', definition.key)}\n          </div>\n        </div>\n\n        <div className=\"settings-definition-right\">\n          <div className=\"settings-definition-state\">\n            {loading && (\n              <span className=\"text-info\">\n                <i className=\"spinner spacer-right\" />\n                {translate('settings.state.saving')}\n              </span>\n            )}\n\n            {!loading && validationMessage && (\n              <span className=\"text-danger\">\n                <AlertErrorIcon className=\"spacer-right\" />\n                <span>\n                  {translateWithParameters('settings.state.validation_failed', validationMessage)}\n                </span>\n              </span>\n            )}\n\n            {!loading && !hasError && this.state.success && (\n              <span className=\"text-success\">\n                <AlertSuccessIcon className=\"spacer-right\" />\n                {translate('settings.state.saved')}\n              </span>\n            )}\n          </div>\n          <form>\n            <Input\n              hasValueChanged={hasValueChanged}\n              onCancel={this.handleCancel}\n              onChange={this.handleChange}\n              onSave={this.handleSave}\n              setting={setting}\n              value={effectiveValue}\n            />\n            <DefinitionActions\n              changedValue={changedValue}\n              hasError={hasError}\n              hasValueChanged={hasValueChanged}\n              isDefault={isDefault}\n              onCancel={this.handleCancel}\n              onReset={this.handleReset}\n              onSave={this.handleSave}\n              setting={setting}\n            />\n          </form>\n        </div>\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store, ownProps: Pick<Props, 'setting'>) => ({\n  changedValue: getSettingsAppChangedValue(state, ownProps.setting.definition.key),\n  loading: isSettingsAppLoading(state, ownProps.setting.definition.key),\n  validationMessage: getSettingsAppValidationMessage(state, ownProps.setting.definition.key)\n});\n\nconst mapDispatchToProps = {\n  cancelChange: cancelChange as any,\n  changeValue: changeValue as any,\n  checkValue: checkValue as any,\n  passValidation: passValidation as any,\n  resetValue: resetValue as any,\n  saveValue: saveValue as any\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Definition);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Setting } from '../../../types/settings';\nimport Definition from './Definition';\n\ninterface Props {\n  component?: T.Component;\n  scrollToDefinition: (element: HTMLLIElement) => void;\n  settings: Setting[];\n}\n\nexport default function DefinitionsList(props: Props) {\n  const { component, settings } = props;\n  return (\n    <ul className=\"settings-definitions-list\">\n      {settings.map(setting => (\n        <li\n          key={setting.definition.key}\n          data-key={setting.definition.key}\n          ref={props.scrollToDefinition}>\n          <Definition component={component} setting={setting} />\n        </li>\n      ))}\n    </ul>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { sendTestEmail } from '../../../api/settings';\nimport { SubmitButton } from '../../../components/controls/buttons';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport { Alert } from '../../../components/ui/Alert';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { parseError } from '../../../helpers/request';\n\ninterface Props {\n  currentUser: T.LoggedInUser;\n}\n\ninterface State {\n  recipient: string;\n  subject: string;\n  message: string;\n  loading: boolean;\n  success?: string;\n  error?: string;\n}\n\nexport class EmailForm extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      recipient: this.props.currentUser.email || '',\n      subject: translate('email_configuration.test.subject'),\n      message: translate('email_configuration.test.message_text'),\n      loading: false\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleError = (response: Response) => {\n    return parseError(response).then(message => {\n      if (this.mounted) {\n        this.setState({ error: message, loading: false });\n      }\n    });\n  };\n\n  handleFormSubmit = (event: React.FormEvent) => {\n    event.preventDefault();\n    this.setState({ success: undefined, error: undefined, loading: true });\n    const { recipient, subject, message } = this.state;\n    sendTestEmail(recipient, subject, message).then(() => {\n      if (this.mounted) {\n        this.setState({ success: recipient, loading: false });\n      }\n    }, this.handleError);\n  };\n\n  onRecipientChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ recipient: event.target.value });\n  };\n\n  onSubjectChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ subject: event.target.value });\n  };\n\n  onMessageChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.setState({ message: event.target.value });\n  };\n\n  render() {\n    const { error, loading, message, recipient, subject, success } = this.state;\n    return (\n      <div className=\"settings-definition\">\n        <div className=\"settings-definition-left\">\n          <h3 className=\"settings-definition-name\">\n            {translate('email_configuration.test.title')}\n          </h3>\n        </div>\n\n        <form className=\"settings-definition-right\" onSubmit={this.handleFormSubmit}>\n          {success && (\n            <div className=\"form-field\">\n              <Alert variant=\"success\">\n                {translateWithParameters('email_configuration.test.email_was_sent_to_x', success)}\n              </Alert>\n            </div>\n          )}\n\n          {error !== undefined && (\n            <div className=\"form-field\">\n              <Alert variant=\"error\">{error}</Alert>\n            </div>\n          )}\n\n          <MandatoryFieldsExplanation className=\"form-field\" />\n\n          <div className=\"form-field\">\n            <label htmlFor=\"test-email-to\">\n              {translate('email_configuration.test.to_address')}\n              <MandatoryFieldMarker />\n            </label>\n            <input\n              className=\"settings-large-input\"\n              disabled={loading}\n              id=\"test-email-to\"\n              onChange={this.onRecipientChange}\n              required={true}\n              type=\"email\"\n              value={recipient}\n            />\n          </div>\n          <div className=\"form-field\">\n            <label htmlFor=\"test-email-subject\">\n              {translate('email_configuration.test.subject')}\n            </label>\n            <input\n              className=\"settings-large-input\"\n              disabled={loading}\n              id=\"test-email-subject\"\n              onChange={this.onSubjectChange}\n              type=\"text\"\n              value={subject}\n            />\n          </div>\n          <div className=\"form-field\">\n            <label htmlFor=\"test-email-message\">\n              {translate('email_configuration.test.message')}\n              <MandatoryFieldMarker />\n            </label>\n            <textarea\n              className=\"settings-large-input\"\n              disabled={loading}\n              id=\"test-email-message\"\n              onChange={this.onMessageChange}\n              required={true}\n              rows={5}\n              value={message}\n            />\n          </div>\n\n          <SubmitButton disabled={loading}>\n            {translate('email_configuration.test.send')}\n          </SubmitButton>\n          {loading && <DeferredSpinner className=\"spacer-left\" />}\n        </form>\n      </div>\n    );\n  }\n}\n\nexport default withCurrentUser(EmailForm);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy, isEqual, sortBy } from 'lodash';\nimport * as React from 'react';\nimport { Location, withRouter } from '../../../components/hoc/withRouter';\nimport { sanitizeStringRestricted } from '../../../helpers/sanitize';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { SettingWithCategory } from '../../../types/settings';\nimport { getSubCategoryDescription, getSubCategoryName } from '../utils';\nimport DefinitionsList from './DefinitionsList';\nimport EmailForm from './EmailForm';\n\nexport interface SubCategoryDefinitionsListProps {\n  category: string;\n  component?: T.Component;\n  fetchValues: Function;\n  location: Location;\n  settings: Array<SettingWithCategory>;\n  subCategory?: string;\n}\n\nconst SCROLL_OFFSET_TOP = 200;\nconst SCROLL_OFFSET_BOTTOM = 500;\n\nexport class SubCategoryDefinitionsList extends React.PureComponent<\n  SubCategoryDefinitionsListProps\n> {\n  componentDidMount() {\n    this.fetchValues();\n  }\n\n  componentDidUpdate(prevProps: SubCategoryDefinitionsListProps) {\n    const prevKeys = prevProps.settings.map(setting => setting.definition.key);\n    const keys = this.props.settings.map(setting => setting.definition.key);\n    if (prevProps.component !== this.props.component || !isEqual(prevKeys, keys)) {\n      this.fetchValues();\n    }\n\n    const { hash } = this.props.location;\n    if (hash && prevProps.location.hash !== hash) {\n      const query = `[data-key=${hash.substr(1).replace(/[.#/]/g, '\\\\$&')}]`;\n      const element = document.querySelector<HTMLHeadingElement | HTMLLIElement>(query);\n      this.scrollToSubCategoryOrDefinition(element);\n    }\n  }\n\n  scrollToSubCategoryOrDefinition = (element: HTMLHeadingElement | HTMLLIElement | null) => {\n    if (element) {\n      const { hash } = this.props.location;\n      if (hash && hash.substr(1) === element.getAttribute('data-key')) {\n        scrollToElement(element, {\n          topOffset: SCROLL_OFFSET_TOP,\n          bottomOffset: SCROLL_OFFSET_BOTTOM,\n          smooth: true\n        });\n      }\n    }\n  };\n\n  fetchValues() {\n    const keys = this.props.settings.map(setting => setting.definition.key);\n    return this.props.fetchValues(keys, this.props.component && this.props.component.key);\n  }\n\n  renderEmailForm = (subCategoryKey: string) => {\n    const isEmailSettings = this.props.category === 'general' && subCategoryKey === 'email';\n    if (!isEmailSettings) {\n      return null;\n    }\n    return <EmailForm />;\n  };\n\n  render() {\n    const bySubCategory = groupBy(this.props.settings, setting => setting.definition.subCategory);\n    const subCategories = Object.keys(bySubCategory).map(key => ({\n      key,\n      name: getSubCategoryName(bySubCategory[key][0].definition.category, key),\n      description: getSubCategoryDescription(bySubCategory[key][0].definition.category, key)\n    }));\n    const sortedSubCategories = sortBy(subCategories, subCategory =>\n      subCategory.name.toLowerCase()\n    );\n    const filteredSubCategories = this.props.subCategory\n      ? sortedSubCategories.filter(c => c.key === this.props.subCategory)\n      : sortedSubCategories;\n    return (\n      <ul className=\"settings-sub-categories-list\">\n        {filteredSubCategories.map(subCategory => (\n          <li key={subCategory.key}>\n            <h2\n              className=\"settings-sub-category-name\"\n              data-key={subCategory.key}\n              ref={this.scrollToSubCategoryOrDefinition}>\n              {subCategory.name}\n            </h2>\n            {subCategory.description != null && (\n              <div\n                className=\"settings-sub-category-description markdown\"\n                // eslint-disable-next-line react/no-danger\n                dangerouslySetInnerHTML={{\n                  __html: sanitizeStringRestricted(subCategory.description)\n                }}\n              />\n            )}\n            <DefinitionsList\n              component={this.props.component}\n              scrollToDefinition={this.scrollToSubCategoryOrDefinition}\n              settings={bySubCategory[subCategory.key]}\n            />\n            {this.renderEmailForm(subCategory.key)}\n          </li>\n        ))}\n      </ul>\n    );\n  }\n}\n\nexport default withRouter(SubCategoryDefinitionsList);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { connect } from 'react-redux';\nimport { getSettingsAppSettingsForCategory, Store } from '../../../store/rootReducer';\nimport { fetchValues } from '../store/actions';\nimport SubCategoryDefinitionsList from './SubCategoryDefinitionsList';\n\ninterface Props {\n  category: string;\n  component?: T.Component;\n}\n\nconst mapStateToProps = (state: Store, ownProps: Props) => ({\n  settings: getSettingsAppSettingsForCategory(\n    state,\n    ownProps.category,\n    ownProps.component && ownProps.component.key\n  )\n});\n\nconst mapDispatchToProps = { fetchValues };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SubCategoryDefinitionsList);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Button } from '../../../../components/controls/buttons';\nimport HelpTooltip from '../../../../components/controls/HelpTooltip';\nimport Tooltip from '../../../../components/controls/Tooltip';\nimport AlertErrorIcon from '../../../../components/icons/AlertErrorIcon';\nimport AlertSuccessIcon from '../../../../components/icons/AlertSuccessIcon';\nimport DeleteIcon from '../../../../components/icons/DeleteIcon';\nimport EditIcon from '../../../../components/icons/EditIcon';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { ALM_DOCUMENTATION_PATHS, IMPORT_COMPATIBLE_ALMS } from '../../../../helpers/constants';\nimport { getEdition, getEditionUrl } from '../../../../helpers/editions';\nimport { translate } from '../../../../helpers/l10n';\nimport {\n  AlmBindingDefinitionBase,\n  AlmKeys,\n  AlmSettingsBindingStatus,\n  AlmSettingsBindingStatusType\n} from '../../../../types/alm-settings';\nimport { EditionKey } from '../../../../types/editions';\n\nexport interface AlmBindingDefinitionBoxProps {\n  alm: AlmKeys;\n  branchesEnabled: boolean;\n  definition: AlmBindingDefinitionBase;\n  multipleDefinitions: boolean;\n  onCheck: (definitionKey: string) => void;\n  onDelete: (definitionKey: string) => void;\n  onEdit: (definitionKey: string) => void;\n  status?: AlmSettingsBindingStatus;\n}\n\nconst DEFAULT_STATUS: AlmSettingsBindingStatus = {\n  alertSuccess: false,\n  failureMessage: '',\n  type: AlmSettingsBindingStatusType.Validating\n};\n\nconst STATUS_ICON = {\n  [AlmSettingsBindingStatusType.Failure]: <AlertErrorIcon className=\"spacer-left\" />,\n  [AlmSettingsBindingStatusType.Success]: <AlertSuccessIcon className=\"spacer-left\" />\n};\n\nfunction getPRDecorationFeatureStatus(\n  branchesEnabled: boolean,\n  type: AlmSettingsBindingStatusType.Success | AlmSettingsBindingStatusType.Failure\n) {\n  if (branchesEnabled) {\n    return STATUS_ICON[type];\n  }\n\n  return (\n    <div className=\"display-inline-flex-center\">\n      <strong className=\"spacer-left\">\n        {translate('settings.almintegration.feature.pr_decoration.disabled')}\n      </strong>\n      <HelpTooltip\n        className=\"little-spacer-left\"\n        overlay={\n          <FormattedMessage\n            id=\"settings.almintegration.feature.pr_decoration.disabled.no_branches\"\n            defaultMessage={translate(\n              'settings.almintegration.feature.pr_decoration.disabled.no_branches'\n            )}\n            values={{\n              link: (\n                <a\n                  href={getEditionUrl(getEdition(EditionKey.developer), {\n                    sourceEdition: EditionKey.community\n                  })}\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  {translate(\n                    'settings.almintegration.feature.pr_decoration.disabled.no_branches.link'\n                  )}\n                </a>\n              )\n            }}\n          />\n        }\n      />\n    </div>\n  );\n}\n\nfunction getImportFeatureStatus(\n  alm: AlmKeys,\n  definition: AlmBindingDefinitionBase,\n  multipleDefinitions: boolean,\n  type: AlmSettingsBindingStatusType.Success | AlmSettingsBindingStatusType.Failure\n) {\n  if (multipleDefinitions) {\n    return (\n      <div className=\"display-inline-flex-center\">\n        <strong className=\"spacer-left\">\n          {translate('settings.almintegration.feature.alm_repo_import.disabled')}\n        </strong>\n        <HelpTooltip\n          className=\"little-spacer-left\"\n          overlay={translate('settings.almintegration.feature.alm_repo_import.disabled.multiple')}\n        />\n      </div>\n    );\n  }\n\n  if (!definition.url && alm !== AlmKeys.BitbucketCloud) {\n    return (\n      <div className=\"display-inline-flex-center\">\n        <strong className=\"spacer-left\">\n          {translate('settings.almintegration.feature.alm_repo_import.disabled')}\n        </strong>\n        <HelpTooltip\n          className=\"little-spacer-left\"\n          overlay={translate('settings.almintegration.feature.alm_repo_import.disabled.no_url')}\n        />\n      </div>\n    );\n  }\n\n  return STATUS_ICON[type];\n}\n\nfunction getPrDecoFeatureDescription(alm: AlmKeys) {\n  switch (alm) {\n    case AlmKeys.GitLab:\n      return translate('settings.almintegration.feature.status_reporting.description_mr');\n    case AlmKeys.GitHub:\n      return translate(\n        'settings.almintegration.feature.status_reporting.description_pr_and_commits'\n      );\n    default:\n      return translate('settings.almintegration.feature.status_reporting.description_pr');\n  }\n}\n\nexport default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxProps) {\n  const { alm, branchesEnabled, definition, multipleDefinitions, status = DEFAULT_STATUS } = props;\n\n  return (\n    <div className=\"boxed-group-inner bordered spacer-top spacer-bottom it__alm-binding-definition\">\n      <div className=\"actions pull-right\">\n        <Button onClick={() => props.onEdit(definition.key)}>\n          <EditIcon className=\"spacer-right\" />\n          {translate('edit')}\n        </Button>\n        <Button className=\"button-red spacer-left\" onClick={() => props.onDelete(definition.key)}>\n          <DeleteIcon className=\"spacer-right\" />\n          {translate('delete')}\n        </Button>\n      </div>\n\n      <div className=\"big-spacer-bottom\">\n        <h3>{definition.key}</h3>\n        {definition.url && <span>{definition.url}</span>}\n      </div>\n\n      {status.type === AlmSettingsBindingStatusType.Validating ? (\n        <>\n          <i className=\"spinner spacer-right\" />\n          {translate('settings.almintegration.checking_configuration')}\n        </>\n      ) : (\n        <>\n          {status.type !== AlmSettingsBindingStatusType.Warning && (\n            <div className=\"display-flex-row spacer-bottom\">\n              <div className=\"huge-spacer-right\">\n                <Tooltip overlay={getPrDecoFeatureDescription(alm)}>\n                  <span>{translate('settings.almintegration.feature.status_reporting.title')}</span>\n                </Tooltip>\n                {getPRDecorationFeatureStatus(branchesEnabled, status.type)}\n              </div>\n              {IMPORT_COMPATIBLE_ALMS.includes(alm) && (\n                <div>\n                  <Tooltip\n                    overlay={translate(\n                      'settings.almintegration.feature.alm_repo_import.description'\n                    )}>\n                    <span>\n                      {translate('settings.almintegration.feature.alm_repo_import.title')}\n                    </span>\n                  </Tooltip>\n                  {getImportFeatureStatus(alm, definition, multipleDefinitions, status.type)}\n                </div>\n              )}\n            </div>\n          )}\n\n          <div className=\"width-50\">\n            {status.type === AlmSettingsBindingStatusType.Warning && (\n              <Alert variant=\"warning\">\n                {translate('settings.almintegration.could_not_validate')}\n              </Alert>\n            )}\n\n            {status.type === AlmSettingsBindingStatusType.Failure && (\n              <Alert variant=\"error\">{status.failureMessage}</Alert>\n            )}\n\n            {status.type === AlmSettingsBindingStatusType.Success && status.alertSuccess && (\n              <>\n                <Alert variant=\"success\">\n                  {translate('settings.almintegration.configuration_valid')}\n                </Alert>\n                {alm === AlmKeys.GitHub && (\n                  <Alert variant=\"warning\">\n                    <FormattedMessage\n                      id=\"settings.almintegration.github.additional_permission\"\n                      defaultMessage={translate(\n                        'settings.almintegration.github.additional_permission'\n                      )}\n                      values={{\n                        link: (\n                          <Link target=\"_blank\" to={ALM_DOCUMENTATION_PATHS[AlmKeys.GitHub]}>\n                            {translate('learn_more')}\n                          </Link>\n                        )\n                      }}\n                    />\n                  </Alert>\n                )}\n              </>\n            )}\n          </div>\n\n          <Button className=\"big-spacer-top\" onClick={() => props.onCheck(definition.key)}>\n            {translate('settings.almintegration.check_configuration')}\n          </Button>\n        </>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport Tooltip from '../../../../components/controls/Tooltip';\nimport { withAppState } from '../../../../components/hoc/withAppState';\nimport { getEdition, getEditionUrl } from '../../../../helpers/editions';\nimport { translate } from '../../../../helpers/l10n';\nimport { AlmKeys } from '../../../../types/alm-settings';\nimport { EditionKey } from '../../../../types/editions';\n\nexport interface CreationTooltipProps {\n  alm: AlmKeys;\n  appState: T.AppState;\n  children: React.ReactElement<{}>;\n  preventCreation: boolean;\n}\n\nexport function CreationTooltip(props: CreationTooltipProps) {\n  const {\n    alm,\n    appState: { edition },\n    children,\n    preventCreation\n  } = props;\n\n  const sourceEdition = edition ? EditionKey[edition] : undefined;\n\n  return (\n    <Tooltip\n      overlay={\n        preventCreation ? (\n          <FormattedMessage\n            id=\"settings.almintegration.create.tooltip\"\n            defaultMessage={translate('settings.almintegration.create.tooltip')}\n            values={{\n              link: (\n                <a\n                  href={getEditionUrl(getEdition(EditionKey.enterprise), {\n                    sourceEdition\n                  })}\n                  rel=\"noopener noreferrer\"\n                  target=\"_blank\">\n                  {translate('settings.almintegration.create.tooltip.link')}\n                </a>\n              ),\n              alm: translate('alm', alm)\n            }}\n          />\n        ) : null\n      }\n      mouseLeaveDelay={0.25}>\n      {children}\n    </Tooltip>\n  );\n}\n\nexport default withAppState(CreationTooltip);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../../components/controls/buttons';\nimport DeferredSpinner from '../../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../../helpers/l10n';\nimport {\n  AlmBindingDefinition,\n  AlmBindingDefinitionBase,\n  AlmKeys,\n  AlmSettingsBindingStatus,\n  isBitbucketCloudBindingDefinition\n} from '../../../../types/alm-settings';\nimport { ALM_INTEGRATION } from '../AdditionalCategoryKeys';\nimport CategoryDefinitionsList from '../CategoryDefinitionsList';\nimport AlmBindingDefinitionBox from './AlmBindingDefinitionBox';\nimport AlmBindingDefinitionForm from './AlmBindingDefinitionForm';\nimport { AlmTabs } from './AlmIntegration';\nimport CreationTooltip from './CreationTooltip';\n\nexport interface AlmTabRendererProps {\n  almTab: AlmTabs;\n  branchesEnabled: boolean;\n  definitionStatus: T.Dict<AlmSettingsBindingStatus>;\n  editDefinition?: boolean;\n  editedDefinition?: AlmBindingDefinition;\n  definitions: AlmBindingDefinition[];\n  loadingAlmDefinitions: boolean;\n  loadingProjectCount: boolean;\n  multipleAlmEnabled: boolean;\n  onCancel: () => void;\n  onCheck: (definitionKey: string) => void;\n  onCreate: () => void;\n  onDelete: (definitionKey: string) => void;\n  onEdit: (definitionKey: string) => void;\n  afterSubmit: (config: AlmBindingDefinitionBase) => void;\n}\n\nexport default function AlmTabRenderer(props: AlmTabRendererProps) {\n  const {\n    almTab,\n    branchesEnabled,\n    definitions,\n    definitionStatus,\n    editDefinition,\n    editedDefinition,\n    loadingAlmDefinitions,\n    loadingProjectCount,\n    multipleAlmEnabled\n  } = props;\n\n  const preventCreation = loadingProjectCount || (!multipleAlmEnabled && definitions.length > 0);\n\n  return (\n    <div className=\"bordered\">\n      <div className=\"big-padded\">\n        <DeferredSpinner loading={loadingAlmDefinitions}>\n          {definitions.length === 0 && (\n            <p className=\"spacer-top\">{translate('settings.almintegration.empty', almTab)}</p>\n          )}\n\n          <div className={definitions.length > 0 ? 'spacer-bottom text-right' : 'big-spacer-top'}>\n            <CreationTooltip alm={almTab} preventCreation={preventCreation}>\n              <Button\n                data-test=\"settings__alm-create\"\n                disabled={preventCreation}\n                onClick={props.onCreate}>\n                {translate('settings.almintegration.create')}\n              </Button>\n            </CreationTooltip>\n          </div>\n          {definitions.map(def => (\n            <AlmBindingDefinitionBox\n              alm={isBitbucketCloudBindingDefinition(def) ? AlmKeys.BitbucketCloud : almTab}\n              branchesEnabled={branchesEnabled}\n              definition={def}\n              key={def.key}\n              multipleDefinitions={definitions.length > 1}\n              onCheck={props.onCheck}\n              onDelete={props.onDelete}\n              onEdit={props.onEdit}\n              status={definitionStatus[def.key]}\n            />\n          ))}\n\n          {editDefinition && (\n            <AlmBindingDefinitionForm\n              alm={almTab}\n              bindingDefinition={editedDefinition}\n              alreadyHaveInstanceConfigured={definitions.length > 0}\n              onCancel={props.onCancel}\n              afterSubmit={props.afterSubmit}\n            />\n          )}\n        </DeferredSpinner>\n      </div>\n\n      <div className=\"huge-spacer-top huge-spacer-bottom bordered-top\" />\n\n      <div className=\"big-padded\">\n        <CategoryDefinitionsList category={ALM_INTEGRATION} subCategory={almTab} />\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport {\n  AlmBindingDefinition,\n  AlmBindingDefinitionBase,\n  AlmSettingsBindingStatus\n} from '../../../../types/alm-settings';\nimport { AlmTabs } from './AlmIntegration';\nimport AlmTabRenderer from './AlmTabRenderer';\n\ninterface Props {\n  almTab: AlmTabs;\n  branchesEnabled: boolean;\n  definitions: AlmBindingDefinition[];\n  definitionStatus: T.Dict<AlmSettingsBindingStatus>;\n  loadingAlmDefinitions: boolean;\n  loadingProjectCount: boolean;\n  multipleAlmEnabled: boolean;\n  onCheck: (definitionKey: string) => void;\n  onDelete: (definitionKey: string) => void;\n  onUpdateDefinitions: () => void;\n}\n\ninterface State {\n  editedDefinition?: AlmBindingDefinition;\n  editDefinition?: boolean;\n}\n\nexport default class AlmTab extends React.PureComponent<Props, State> {\n  state: State = {};\n  mounted = false;\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleCancel = () => {\n    this.setState({ editDefinition: false, editedDefinition: undefined });\n  };\n\n  handleCreate = () => {\n    this.setState({ editDefinition: true, editedDefinition: undefined });\n  };\n\n  handleEdit = (definitionKey: string) => {\n    const editedDefinition = this.props.definitions.find(d => d.key === definitionKey);\n    this.setState({ editDefinition: true, editedDefinition });\n  };\n\n  handleAfterSubmit = (config: AlmBindingDefinitionBase) => {\n    if (this.mounted) {\n      this.setState({\n        editDefinition: false,\n        editedDefinition: undefined\n      });\n    }\n\n    this.props.onUpdateDefinitions();\n\n    this.props.onCheck(config.key);\n  };\n\n  render() {\n    const {\n      almTab,\n      branchesEnabled,\n      definitions,\n      definitionStatus,\n      loadingAlmDefinitions,\n      loadingProjectCount,\n      multipleAlmEnabled\n    } = this.props;\n    const { editDefinition, editedDefinition } = this.state;\n\n    return (\n      <AlmTabRenderer\n        almTab={almTab}\n        branchesEnabled={branchesEnabled}\n        definitions={definitions}\n        definitionStatus={definitionStatus}\n        editDefinition={editDefinition}\n        editedDefinition={editedDefinition}\n        loadingAlmDefinitions={loadingAlmDefinitions}\n        loadingProjectCount={loadingProjectCount}\n        multipleAlmEnabled={multipleAlmEnabled}\n        onCheck={this.props.onCheck}\n        onCreate={this.handleCreate}\n        onDelete={this.props.onDelete}\n        onEdit={this.handleEdit}\n        onCancel={this.handleCancel}\n        afterSubmit={this.handleAfterSubmit}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport ConfirmModal from '../../../../components/controls/ConfirmModal';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\n\nexport interface DeleteModalProps {\n  id: string;\n  projectCount?: number;\n  onDelete: (id: string) => void;\n  onCancel: () => void;\n}\n\nfunction showProjectCountWarning(projectCount?: number) {\n  if (projectCount === undefined) {\n    return <p>{translate('settings.almintegration.delete.no_info')}</p>;\n  }\n\n  return projectCount ? (\n    <p>{translateWithParameters('settings.almintegration.delete.info', projectCount)} </p>\n  ) : null;\n}\n\nexport default function DeleteModal({ id, onDelete, onCancel, projectCount }: DeleteModalProps) {\n  return (\n    <ConfirmModal\n      confirmButtonText={translate('delete')}\n      confirmData={id}\n      header={translate('settings.almintegration.delete.header')}\n      isDestructive={true}\n      onClose={onCancel}\n      onConfirm={onDelete}>\n      <>\n        <p className=\"spacer-bottom\">\n          <FormattedMessage\n            defaultMessage={translate('settings.almintegration.delete.message')}\n            id=\"settings.almintegration.delete.message\"\n            values={{ id: <b>{id}</b> }}\n          />\n        </p>\n        {showProjectCountWarning(projectCount)}\n      </>\n    </ConfirmModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BoxedTabs from '../../../../components/controls/BoxedTabs';\nimport { translate } from '../../../../helpers/l10n';\nimport { getBaseUrl } from '../../../../helpers/system';\nimport {\n  AlmKeys,\n  AlmSettingsBindingDefinitions,\n  AlmSettingsBindingStatus\n} from '../../../../types/alm-settings';\nimport { AlmTabs } from './AlmIntegration';\nimport AlmTab from './AlmTab';\nimport DeleteModal from './DeleteModal';\n\nexport interface AlmIntegrationRendererProps {\n  branchesEnabled: boolean;\n  currentAlmTab: AlmTabs;\n  definitionKeyForDeletion?: string;\n  definitions: AlmSettingsBindingDefinitions;\n  definitionStatus: T.Dict<AlmSettingsBindingStatus>;\n  loadingAlmDefinitions: boolean;\n  loadingProjectCount: boolean;\n  multipleAlmEnabled: boolean;\n  onCancelDelete: () => void;\n  onCheckConfiguration: (definitionKey: string) => void;\n  onConfirmDelete: (definitionKey: string) => void;\n  onDelete: (definitionKey: string) => void;\n  onSelectAlmTab: (alm: AlmTabs) => void;\n  onUpdateDefinitions: () => void;\n  projectCount?: number;\n}\n\nconst tabs = [\n  {\n    key: AlmKeys.GitHub,\n    label: (\n      <>\n        <img\n          alt=\"github\"\n          className=\"spacer-right\"\n          height={16}\n          src={`${getBaseUrl()}/images/alm/github.svg`}\n        />\n        GitHub\n      </>\n    )\n  },\n  {\n    key: AlmKeys.BitbucketServer,\n    label: (\n      <>\n        <img\n          alt=\"bitbucket\"\n          className=\"spacer-right\"\n          height={16}\n          src={`${getBaseUrl()}/images/alm/bitbucket.svg`}\n        />\n        Bitbucket\n      </>\n    )\n  },\n  {\n    key: AlmKeys.Azure,\n    label: (\n      <>\n        <img\n          alt=\"azure\"\n          className=\"spacer-right\"\n          height={16}\n          src={`${getBaseUrl()}/images/alm/azure.svg`}\n        />\n        Azure DevOps\n      </>\n    )\n  },\n  {\n    key: AlmKeys.GitLab,\n    label: (\n      <>\n        <img\n          alt=\"gitlab\"\n          className=\"spacer-right\"\n          height={16}\n          src={`${getBaseUrl()}/images/alm/gitlab.svg`}\n        />\n        GitLab\n      </>\n    )\n  }\n];\n\nexport default function AlmIntegrationRenderer(props: AlmIntegrationRendererProps) {\n  const {\n    definitionKeyForDeletion,\n    definitions,\n    definitionStatus,\n    currentAlmTab,\n    loadingAlmDefinitions,\n    loadingProjectCount,\n    branchesEnabled,\n    multipleAlmEnabled,\n    projectCount\n  } = props;\n\n  const bindingDefinitions = {\n    [AlmKeys.Azure]: definitions.azure,\n    [AlmKeys.GitLab]: definitions.gitlab,\n    [AlmKeys.GitHub]: definitions.github,\n    [AlmKeys.BitbucketServer]: [...definitions.bitbucket, ...definitions.bitbucketcloud]\n  };\n\n  return (\n    <>\n      <header className=\"page-header\">\n        <h1 className=\"page-title\">{translate('settings.almintegration.title')}</h1>\n      </header>\n\n      <div className=\"markdown small spacer-top big-spacer-bottom\">\n        {translate('settings.almintegration.description')}\n      </div>\n\n      <BoxedTabs onSelect={props.onSelectAlmTab} selected={currentAlmTab} tabs={tabs} />\n\n      <AlmTab\n        almTab={currentAlmTab}\n        branchesEnabled={branchesEnabled}\n        definitions={bindingDefinitions[currentAlmTab]}\n        definitionStatus={definitionStatus}\n        loadingAlmDefinitions={loadingAlmDefinitions}\n        loadingProjectCount={loadingProjectCount}\n        multipleAlmEnabled={multipleAlmEnabled}\n        onCheck={props.onCheckConfiguration}\n        onDelete={props.onDelete}\n        onUpdateDefinitions={props.onUpdateDefinitions}\n      />\n\n      {definitionKeyForDeletion && (\n        <DeleteModal\n          id={definitionKeyForDeletion}\n          onCancel={props.onCancelDelete}\n          onDelete={props.onConfirmDelete}\n          projectCount={projectCount}\n        />\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport {\n  countBindedProjects,\n  deleteConfiguration,\n  getAlmDefinitions,\n  validateAlmSettings\n} from '../../../../api/alm-settings';\nimport { withAppState } from '../../../../components/hoc/withAppState';\nimport { withRouter } from '../../../../components/hoc/withRouter';\nimport {\n  AlmBindingDefinitionBase,\n  AlmKeys,\n  AlmSettingsBindingDefinitions,\n  AlmSettingsBindingStatus,\n  AlmSettingsBindingStatusType\n} from '../../../../types/alm-settings';\nimport AlmIntegrationRenderer from './AlmIntegrationRenderer';\n\ninterface Props extends Pick<WithRouterProps, 'location' | 'router'> {\n  appState: Pick<T.AppState, 'branchesEnabled' | 'multipleAlmEnabled'>;\n}\n\nexport type AlmTabs = AlmKeys.Azure | AlmKeys.GitHub | AlmKeys.GitLab | AlmKeys.BitbucketServer;\n\ninterface State {\n  currentAlmTab: AlmTabs;\n  definitionKeyForDeletion?: string;\n  definitions: AlmSettingsBindingDefinitions;\n  definitionStatus: T.Dict<AlmSettingsBindingStatus>;\n  loadingAlmDefinitions: boolean;\n  loadingProjectCount: boolean;\n  projectCount?: number;\n}\n\nexport class AlmIntegration extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State;\n\n  constructor(props: Props) {\n    super(props);\n\n    let currentAlmTab = props.location.query.alm || AlmKeys.GitHub;\n    if (currentAlmTab === AlmKeys.BitbucketCloud) {\n      currentAlmTab = AlmKeys.BitbucketServer;\n    }\n\n    this.state = {\n      currentAlmTab,\n      definitions: {\n        [AlmKeys.Azure]: [],\n        [AlmKeys.BitbucketServer]: [],\n        [AlmKeys.BitbucketCloud]: [],\n        [AlmKeys.GitHub]: [],\n        [AlmKeys.GitLab]: []\n      },\n      definitionStatus: {},\n      loadingAlmDefinitions: true,\n      loadingProjectCount: false\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    return this.fetchPullRequestDecorationSetting().then(definitions => {\n      if (definitions) {\n        // Validate all alms on load:\n        [\n          AlmKeys.Azure,\n          AlmKeys.BitbucketCloud,\n          AlmKeys.BitbucketServer,\n          AlmKeys.GitHub,\n          AlmKeys.GitLab\n        ].forEach(alm => {\n          this.state.definitions[alm].forEach((def: AlmBindingDefinitionBase) =>\n            this.handleCheck(def.key, false)\n          );\n        });\n      }\n    });\n  }\n\n  componentDidUpdate() {\n    const { location } = this.props;\n    if (location.query.alm && this.mounted) {\n      this.setState({ currentAlmTab: location.query.alm });\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleConfirmDelete = (definitionKey: string) => {\n    return deleteConfiguration(definitionKey)\n      .then(() => {\n        if (this.mounted) {\n          this.setState({ definitionKeyForDeletion: undefined, projectCount: undefined });\n        }\n      })\n      .then(this.fetchPullRequestDecorationSetting);\n  };\n\n  fetchPullRequestDecorationSetting = () => {\n    this.setState({ loadingAlmDefinitions: true });\n    return getAlmDefinitions()\n      .then(definitions => {\n        if (this.mounted) {\n          this.setState({\n            definitions,\n            loadingAlmDefinitions: false\n          });\n          return definitions;\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loadingAlmDefinitions: false });\n        }\n      });\n  };\n\n  handleSelectAlm = (currentAlmTab: AlmTabs) => {\n    const { location, router } = this.props;\n    location.query.alm = currentAlmTab;\n    location.hash = '';\n    router.push(location);\n    this.setState({ currentAlmTab });\n  };\n\n  handleCancelDelete = () => {\n    this.setState({ definitionKeyForDeletion: undefined, projectCount: undefined });\n  };\n\n  handleDelete = (definitionKey: string) => {\n    this.setState({ loadingProjectCount: true });\n    return countBindedProjects(definitionKey)\n      .then(projectCount => {\n        if (this.mounted) {\n          this.setState({\n            definitionKeyForDeletion: definitionKey,\n            loadingProjectCount: false,\n            projectCount\n          });\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loadingProjectCount: false });\n        }\n      });\n  };\n\n  handleCheck = async (definitionKey: string, alertSuccess = true) => {\n    this.setState(({ definitionStatus }) => {\n      definitionStatus[definitionKey] = {\n        ...definitionStatus[definitionKey],\n        type: AlmSettingsBindingStatusType.Validating\n      };\n\n      return { definitionStatus: { ...definitionStatus } };\n    });\n\n    let type: AlmSettingsBindingStatusType;\n    let failureMessage = '';\n\n    try {\n      failureMessage = await validateAlmSettings(definitionKey);\n      type = failureMessage\n        ? AlmSettingsBindingStatusType.Failure\n        : AlmSettingsBindingStatusType.Success;\n    } catch (_) {\n      type = AlmSettingsBindingStatusType.Warning;\n    }\n\n    if (this.mounted) {\n      this.setState(({ definitionStatus }) => {\n        definitionStatus[definitionKey] = {\n          alertSuccess,\n          failureMessage,\n          type\n        };\n\n        return { definitionStatus: { ...definitionStatus } };\n      });\n    }\n  };\n\n  render() {\n    const {\n      appState: { branchesEnabled, multipleAlmEnabled }\n    } = this.props;\n    const {\n      currentAlmTab,\n      definitionKeyForDeletion,\n      definitions,\n      definitionStatus,\n      loadingAlmDefinitions,\n      loadingProjectCount,\n      projectCount\n    } = this.state;\n\n    return (\n      <AlmIntegrationRenderer\n        branchesEnabled={Boolean(branchesEnabled)}\n        multipleAlmEnabled={Boolean(multipleAlmEnabled)}\n        onCancelDelete={this.handleCancelDelete}\n        onConfirmDelete={this.handleConfirmDelete}\n        onCheckConfiguration={this.handleCheck}\n        onDelete={this.handleDelete}\n        onSelectAlmTab={this.handleSelectAlm}\n        onUpdateDefinitions={this.fetchPullRequestDecorationSetting}\n        currentAlmTab={currentAlmTab}\n        definitionKeyForDeletion={definitionKeyForDeletion}\n        definitions={definitions}\n        definitionStatus={definitionStatus}\n        loadingAlmDefinitions={loadingAlmDefinitions}\n        loadingProjectCount={loadingProjectCount}\n        projectCount={projectCount}\n      />\n    );\n  }\n}\n\nexport default withRouter(withAppState(AlmIntegration));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\nimport { AdditionalCategoryComponentProps } from './AdditionalCategories';\nimport CategoryDefinitionsList from './CategoryDefinitionsList';\n\nexport function AnalysisScope(props: AdditionalCategoryComponentProps) {\n  const { component, selectedCategory } = props;\n\n  return (\n    <>\n      <p className=\"spacer-bottom\">\n        {translate('settings.analysis_scope.wildcards.introduction')}\n        <Link\n          className=\"spacer-left\"\n          to=\"/documentation/project-administration/narrowing-the-focus/\">\n          {translate('learn_more')}\n        </Link>\n      </p>\n\n      <table className=\"data spacer-bottom\">\n        <tbody>\n          <tr>\n            <td>*</td>\n            <td>{translate('settings.analysis_scope.wildcards.zero_more_char')}</td>\n          </tr>\n          <tr>\n            <td>**</td>\n            <td>{translate('settings.analysis_scope.wildcards.zero_more_dir')}</td>\n          </tr>\n          <tr>\n            <td>?</td>\n            <td>{translate('settings.analysis_scope.wildcards.single_char')}</td>\n          </tr>\n        </tbody>\n      </table>\n\n      <div className=\"settings-sub-category\">\n        <CategoryDefinitionsList category={selectedCategory} component={component} />\n      </div>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { LANGUAGES_CATEGORY } from './AdditionalCategoryKeys';\n\nconst CATEGORY_OVERRIDES: T.Dict<string> = {\n  abap: LANGUAGES_CATEGORY,\n  apex: LANGUAGES_CATEGORY,\n  'c / c++ / objective-c': LANGUAGES_CATEGORY,\n  'c#': LANGUAGES_CATEGORY,\n  cloudformation: LANGUAGES_CATEGORY,\n  cobol: LANGUAGES_CATEGORY,\n  css: LANGUAGES_CATEGORY,\n  flex: LANGUAGES_CATEGORY,\n  go: LANGUAGES_CATEGORY,\n  html: LANGUAGES_CATEGORY,\n  java: LANGUAGES_CATEGORY,\n  javascript: LANGUAGES_CATEGORY,\n  'javascript / typescript': LANGUAGES_CATEGORY,\n  json: LANGUAGES_CATEGORY,\n  kotlin: LANGUAGES_CATEGORY,\n  php: LANGUAGES_CATEGORY,\n  'pl/i': LANGUAGES_CATEGORY,\n  'pl/sql': LANGUAGES_CATEGORY,\n  python: LANGUAGES_CATEGORY,\n  rpg: LANGUAGES_CATEGORY,\n  ruby: LANGUAGES_CATEGORY,\n  scala: LANGUAGES_CATEGORY,\n  swift: LANGUAGES_CATEGORY,\n  't-sql': LANGUAGES_CATEGORY,\n  terraform: LANGUAGES_CATEGORY,\n  typescript: LANGUAGES_CATEGORY,\n  'vb.net': LANGUAGES_CATEGORY,\n  'visual basic': LANGUAGES_CATEGORY,\n  xml: LANGUAGES_CATEGORY,\n  yaml: LANGUAGES_CATEGORY\n};\n\nexport default CATEGORY_OVERRIDES;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport Select from '../../../components/controls/Select';\nimport { Location, Router, withRouter } from '../../../components/hoc/withRouter';\nimport { translate } from '../../../helpers/l10n';\nimport { getSettingsAppAllCategories, Store } from '../../../store/rootReducer';\nimport { getCategoryName } from '../utils';\nimport { AdditionalCategoryComponentProps } from './AdditionalCategories';\nimport { LANGUAGES_CATEGORY } from './AdditionalCategoryKeys';\nimport CategoryDefinitionsList from './CategoryDefinitionsList';\nimport CATEGORY_OVERRIDES from './CategoryOverrides';\n\nexport interface LanguagesProps extends AdditionalCategoryComponentProps {\n  categories: string[];\n  location: Location;\n  router: Router;\n}\n\ninterface SelectOption {\n  label: string;\n  originalValue: string;\n  value: string;\n}\n\nexport function Languages(props: LanguagesProps) {\n  const { categories, component, location, router, selectedCategory } = props;\n  const { availableLanguages, selectedLanguage } = getLanguages(categories, selectedCategory);\n\n  const handleOnChange = (newOption: SelectOption) => {\n    router.push({\n      ...location,\n      query: { ...location.query, category: newOption.originalValue }\n    });\n  };\n\n  return (\n    <>\n      <h2 className=\"settings-sub-category-name\">{translate('property.category.languages')}</h2>\n      <div data-test=\"language-select\">\n        <Select\n          className=\"input-large\"\n          onChange={handleOnChange}\n          options={availableLanguages}\n          placeholder={translate('settings.languages.select_a_language_placeholder')}\n          value={selectedLanguage}\n        />\n      </div>\n      {selectedLanguage && (\n        <div className=\"settings-sub-category\">\n          <CategoryDefinitionsList category={selectedLanguage} component={component} />\n        </div>\n      )}\n    </>\n  );\n}\n\nfunction getLanguages(categories: string[], selectedCategory: string) {\n  const lowerCasedLanguagesCategory = LANGUAGES_CATEGORY.toLowerCase();\n  const lowerCasedSelectedCategory = selectedCategory.toLowerCase();\n\n  const availableLanguages = categories\n    .filter(c => CATEGORY_OVERRIDES[c.toLowerCase()] === lowerCasedLanguagesCategory)\n    .map(c => ({\n      label: getCategoryName(c),\n      value: c.toLowerCase(),\n      originalValue: c\n    }));\n\n  let selectedLanguage = undefined;\n\n  if (\n    lowerCasedSelectedCategory !== lowerCasedLanguagesCategory &&\n    availableLanguages.find(c => c.value === lowerCasedSelectedCategory)\n  ) {\n    selectedLanguage = lowerCasedSelectedCategory;\n  }\n\n  return {\n    availableLanguages,\n    selectedLanguage\n  };\n}\n\nexport default withRouter(\n  connect((state: Store) => ({\n    categories: getSettingsAppAllCategories(state)\n  }))(Languages)\n);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { getNewCodePeriod, setNewCodePeriod } from '../../../api/newCodePeriod';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport BaselineSettingDays from '../../projectBaseline/components/BaselineSettingDays';\nimport BaselineSettingPreviousVersion from '../../projectBaseline/components/BaselineSettingPreviousVersion';\nimport { validateDays } from '../../projectBaseline/utils';\n\ninterface State {\n  currentSetting?: T.NewCodePeriodSettingType;\n  days: string;\n  loading: boolean;\n  currentSettingValue?: string | number;\n  saving: boolean;\n  selected?: T.NewCodePeriodSettingType;\n  success: boolean;\n}\n\nconst DEFAULT_SETTING = 'PREVIOUS_VERSION';\n\nexport default class NewCodePeriod extends React.PureComponent<{}, State> {\n  mounted = false;\n  state: State = {\n    loading: true,\n    days: '30',\n    saving: false,\n    success: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchNewCodePeriodSetting();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchNewCodePeriodSetting() {\n    getNewCodePeriod()\n      .then(({ type, value }) => {\n        const currentSetting = type || DEFAULT_SETTING;\n\n        this.setState(({ days }) => ({\n          currentSetting,\n          days: currentSetting === 'NUMBER_OF_DAYS' ? String(value) : days,\n          loading: false,\n          currentSettingValue: value,\n          selected: currentSetting\n        }));\n      })\n      .catch(() => {\n        this.setState({ loading: false });\n      });\n  }\n\n  onSelectDays = (days: string) => {\n    this.setState({ days, success: false });\n  };\n\n  onSelectSetting = (selected: T.NewCodePeriodSettingType) => {\n    this.setState({ selected, success: false });\n  };\n\n  onCancel = () => {\n    this.setState(({ currentSetting, currentSettingValue, days }) => ({\n      selected: currentSetting,\n      days: currentSetting === 'NUMBER_OF_DAYS' ? String(currentSettingValue) : days\n    }));\n  };\n\n  onSubmit = (e: React.SyntheticEvent<HTMLFormElement>) => {\n    e.preventDefault();\n\n    const { days, selected } = this.state;\n\n    const type = selected;\n    const value = type === 'NUMBER_OF_DAYS' ? days : undefined;\n\n    if (type) {\n      this.setState({ saving: true, success: false });\n      setNewCodePeriod({\n        type,\n        value\n      }).then(\n        () => {\n          this.setState({\n            saving: false,\n            currentSetting: type,\n            currentSettingValue: value || undefined,\n            success: true\n          });\n        },\n        () => {\n          this.setState({\n            saving: false\n          });\n        }\n      );\n    }\n  };\n\n  render() {\n    const {\n      currentSetting,\n      days,\n      loading,\n      currentSettingValue,\n      saving,\n      selected,\n      success\n    } = this.state;\n\n    const isChanged =\n      selected !== currentSetting ||\n      (selected === 'NUMBER_OF_DAYS' && String(days) !== currentSettingValue);\n\n    const isValid = selected !== 'NUMBER_OF_DAYS' || validateDays(days);\n\n    return (\n      <ul className=\"settings-sub-categories-list\">\n        <li>\n          <ul className=\"settings-definitions-list\">\n            <li>\n              <div className=\"settings-definition\">\n                <div className=\"settings-definition-left\">\n                  <h3\n                    className=\"settings-definition-name\"\n                    title={translate('settings.new_code_period.title')}>\n                    {translate('settings.new_code_period.title')}\n                  </h3>\n\n                  <div className=\"small big-spacer-top\">\n                    <FormattedMessage\n                      defaultMessage={translate('settings.new_code_period.description')}\n                      id=\"settings.new_code_period.description\"\n                      values={{\n                        link: (\n                          <Link to=\"/documentation/project-administration/new-code-period/\">\n                            {translate('learn_more')}\n                          </Link>\n                        )\n                      }}\n                    />\n                    <p className=\"spacer-top\">\n                      {translate('settings.new_code_period.description2')}\n                    </p>\n                  </div>\n                </div>\n\n                <div className=\"settings-definition-right\">\n                  {loading ? (\n                    <DeferredSpinner />\n                  ) : (\n                    <form onSubmit={this.onSubmit}>\n                      <BaselineSettingPreviousVersion\n                        isDefault={true}\n                        onSelect={this.onSelectSetting}\n                        selected={selected === 'PREVIOUS_VERSION'}\n                      />\n                      <BaselineSettingDays\n                        className=\"spacer-top\"\n                        days={days}\n                        isChanged={isChanged}\n                        isValid={isValid}\n                        onChangeDays={this.onSelectDays}\n                        onSelect={this.onSelectSetting}\n                        selected={selected === 'NUMBER_OF_DAYS'}\n                      />\n                      {isChanged && (\n                        <div className=\"big-spacer-top\">\n                          <p className=\"spacer-bottom\">\n                            {translate('baseline.next_analysis_notice')}\n                          </p>\n                          <DeferredSpinner className=\"spacer-right\" loading={saving} />\n                          <SubmitButton disabled={saving || !isValid}>\n                            {translate('save')}\n                          </SubmitButton>\n                          <ResetButtonLink className=\"spacer-left\" onClick={this.onCancel}>\n                            {translate('cancel')}\n                          </ResetButtonLink>\n                        </div>\n                      )}\n                      {!saving && !loading && success && (\n                        <div className=\"big-spacer-top\">\n                          <span className=\"text-success\">\n                            <AlertSuccessIcon className=\"spacer-right\" />\n                            {translate('settings.state.saved')}\n                          </span>\n                        </div>\n                      )}\n                    </form>\n                  )}\n                </div>\n              </div>\n            </li>\n          </ul>\n        </li>\n      </ul>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport Toggle from '../../../../components/controls/Toggle';\nimport { Alert } from '../../../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker';\nimport { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';\nimport { translate } from '../../../../helpers/l10n';\nimport { convertGithubApiUrlToLink, stripTrailingSlash } from '../../../../helpers/urls';\nimport {\n  AlmKeys,\n  AlmSettingsInstance,\n  ProjectAlmBindingResponse\n} from '../../../../types/alm-settings';\n\nexport interface AlmSpecificFormProps {\n  alm: AlmKeys;\n  instances: AlmSettingsInstance[];\n  formData: T.Omit<ProjectAlmBindingResponse, 'alm'>;\n  onFieldChange: (id: keyof ProjectAlmBindingResponse, value: string | boolean) => void;\n  monorepoEnabled: boolean;\n}\n\ninterface LabelProps {\n  id: string;\n  optional?: boolean;\n}\n\ninterface CommonFieldProps extends LabelProps {\n  help?: boolean;\n  helpParams?: T.Dict<string | JSX.Element>;\n  helpExample?: JSX.Element;\n  onFieldChange: (id: keyof ProjectAlmBindingResponse, value: string | boolean) => void;\n  propKey: keyof ProjectAlmBindingResponse;\n}\n\nfunction renderFieldWrapper(\n  label: React.ReactNode,\n  input: React.ReactNode,\n  help?: React.ReactNode\n) {\n  return (\n    <div className=\"settings-definition\">\n      <div className=\"settings-definition-left\">\n        {label}\n        {help && <div className=\"markdown small spacer-top\">{help}</div>}\n      </div>\n      <div className=\"settings-definition-right padded-top\">{input}</div>\n    </div>\n  );\n}\n\nfunction renderHelp({ help, helpExample, helpParams, id }: CommonFieldProps) {\n  return (\n    help && (\n      <>\n        <FormattedMessage\n          defaultMessage={translate('settings.pr_decoration.binding.form', id, 'help')}\n          id={`settings.pr_decoration.binding.form.${id}.help`}\n          values={helpParams}\n        />\n        {helpExample && (\n          <div className=\"spacer-top nowrap\">\n            {translate('example')}: <em>{helpExample}</em>\n          </div>\n        )}\n      </>\n    )\n  );\n}\n\nfunction renderLabel(props: LabelProps) {\n  const { optional, id } = props;\n  return (\n    <label className=\"h3\" htmlFor={id}>\n      {translate('settings.pr_decoration.binding.form', id)}\n      {!optional && <MandatoryFieldMarker />}\n    </label>\n  );\n}\n\nfunction renderBooleanField(\n  props: Omit<CommonFieldProps, 'optional'> & {\n    value: boolean;\n    inputExtra?: React.ReactNode;\n  }\n) {\n  const { id, value, onFieldChange, propKey, inputExtra } = props;\n  return renderFieldWrapper(\n    renderLabel({ ...props, optional: true }),\n    <div className=\"display-flex-center big-spacer-top\">\n      <div className=\"display-inline-block text-top\">\n        <Toggle name={id} onChange={v => onFieldChange(propKey, v)} value={value} />\n        {value == null && <span className=\"spacer-left note\">{translate('settings.not_set')}</span>}\n      </div>\n      {inputExtra}\n    </div>,\n    renderHelp(props)\n  );\n}\n\nfunction renderField(\n  props: CommonFieldProps & {\n    value: string;\n  }\n) {\n  const { id, propKey, value, onFieldChange } = props;\n  return renderFieldWrapper(\n    renderLabel(props),\n    <input\n      className=\"input-super-large big-spacer-top\"\n      id={id}\n      maxLength={256}\n      name={id}\n      onChange={e => onFieldChange(propKey, e.currentTarget.value)}\n      type=\"text\"\n      value={value}\n    />,\n    renderHelp(props)\n  );\n}\n\nexport default function AlmSpecificForm(props: AlmSpecificFormProps) {\n  const {\n    alm,\n    instances,\n    formData: { repository, slug, summaryCommentEnabled, monorepo },\n    monorepoEnabled\n  } = props;\n\n  let formFields: JSX.Element;\n  const instance = instances.find(i => i.alm === alm);\n\n  switch (alm) {\n    case AlmKeys.Azure:\n      formFields = (\n        <>\n          {renderField({\n            help: true,\n            helpExample: <strong>My Project</strong>,\n            id: 'azure.project',\n            onFieldChange: props.onFieldChange,\n            propKey: 'slug',\n            value: slug || ''\n          })}\n          {renderField({\n            help: true,\n            helpExample: <strong>My Repository</strong>,\n            id: 'azure.repository',\n            onFieldChange: props.onFieldChange,\n            propKey: 'repository',\n            value: repository || ''\n          })}\n        </>\n      );\n      break;\n    case AlmKeys.BitbucketServer:\n      formFields = (\n        <>\n          {renderField({\n            help: true,\n            helpExample: (\n              <>\n                {instance?.url\n                  ? `${stripTrailingSlash(instance.url)}/projects/`\n                  : 'https://bb.company.com/projects/'}\n                <strong>{'MY_PROJECT_KEY'}</strong>\n                {'/repos/my-repository-slug/browse'}\n              </>\n            ),\n            id: 'bitbucket.repository',\n            onFieldChange: props.onFieldChange,\n            propKey: 'repository',\n            value: repository || ''\n          })}\n          {renderField({\n            help: true,\n            helpExample: (\n              <>\n                {instance?.url\n                  ? `${stripTrailingSlash(instance.url)}/projects/MY_PROJECT_KEY/repos/`\n                  : 'https://bb.company.com/projects/MY_PROJECT_KEY/repos/'}\n                <strong>{'my-repository-slug'}</strong>\n                {'/browse'}\n              </>\n            ),\n            id: 'bitbucket.slug',\n            onFieldChange: props.onFieldChange,\n            propKey: 'slug',\n            value: slug || ''\n          })}\n        </>\n      );\n      break;\n    case AlmKeys.BitbucketCloud:\n      formFields = (\n        <>\n          {renderField({\n            help: true,\n            helpExample: (\n              <>\n                {'https://bitbucket.org/my-workspace/'}\n                <strong>{'my-repository-slug'}</strong>\n              </>\n            ),\n            id: 'bitbucketcloud.repository',\n            onFieldChange: props.onFieldChange,\n            propKey: 'repository',\n            value: repository || ''\n          })}\n        </>\n      );\n      break;\n    case AlmKeys.GitHub:\n      formFields = (\n        <>\n          {renderField({\n            help: true,\n            helpExample: (\n              <>\n                {instance?.url\n                  ? `${stripTrailingSlash(convertGithubApiUrlToLink(instance.url))}/`\n                  : 'https://github.com/'}\n                <strong>{'sonarsource/sonarqube'}</strong>\n              </>\n            ),\n            id: 'github.repository',\n            onFieldChange: props.onFieldChange,\n            propKey: 'repository',\n            value: repository || ''\n          })}\n          {renderBooleanField({\n            help: true,\n            id: 'github.summary_comment_setting',\n            onFieldChange: props.onFieldChange,\n            propKey: 'summaryCommentEnabled',\n            value: summaryCommentEnabled === undefined ? true : summaryCommentEnabled\n          })}\n        </>\n      );\n      break;\n    case AlmKeys.GitLab:\n      formFields = (\n        <>\n          {renderField({\n            help: true,\n            helpExample: <strong>123456</strong>,\n            id: 'gitlab.repository',\n            onFieldChange: props.onFieldChange,\n            propKey: 'repository',\n            value: repository || ''\n          })}\n        </>\n      );\n      break;\n  }\n\n  return (\n    <>\n      {formFields}\n      {monorepoEnabled &&\n        renderBooleanField({\n          help: true,\n          helpParams: {\n            doc_link: (\n              <Link to={ALM_DOCUMENTATION_PATHS[alm]} target=\"_blank\">\n                {translate('learn_more')}\n              </Link>\n            )\n          },\n          id: 'monorepo',\n          onFieldChange: props.onFieldChange,\n          propKey: 'monorepo',\n          value: monorepo,\n          inputExtra: monorepo && (\n            <Alert className=\"no-margin-bottom spacer-left\" variant=\"warning\" display=\"inline\">\n              {translate('settings.pr_decoration.binding.form.monorepo.warning')}\n            </Alert>\n          )\n        })}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Button, SubmitButton } from '../../../../components/controls/buttons';\nimport Select from '../../../../components/controls/Select';\nimport AlertSuccessIcon from '../../../../components/icons/AlertSuccessIcon';\nimport { Alert } from '../../../../components/ui/Alert';\nimport DeferredSpinner from '../../../../components/ui/DeferredSpinner';\nimport MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../../helpers/l10n';\nimport { getGlobalSettingsUrl } from '../../../../helpers/urls';\nimport {\n  AlmSettingsInstance,\n  ProjectAlmBindingConfigurationErrors,\n  ProjectAlmBindingConfigurationErrorScope,\n  ProjectAlmBindingResponse\n} from '../../../../types/alm-settings';\nimport { ALM_INTEGRATION } from '../AdditionalCategoryKeys';\nimport AlmSpecificForm from './AlmSpecificForm';\n\nexport interface PRDecorationBindingRendererProps {\n  formData: T.Omit<ProjectAlmBindingResponse, 'alm'>;\n  instances: AlmSettingsInstance[];\n  isChanged: boolean;\n  isConfigured: boolean;\n  isValid: boolean;\n  loading: boolean;\n  onFieldChange: (id: keyof ProjectAlmBindingResponse, value: string | boolean) => void;\n  onReset: () => void;\n  onSubmit: () => void;\n  updating: boolean;\n  successfullyUpdated: boolean;\n  monorepoEnabled: boolean;\n  onCheckConfiguration: () => void;\n  checkingConfiguration: boolean;\n  configurationErrors?: ProjectAlmBindingConfigurationErrors;\n  isSysAdmin: boolean;\n}\n\nfunction optionRenderer(instance: AlmSettingsInstance) {\n  return instance.url ? (\n    <>\n      <span>{instance.key} \u2014 </span>\n      <span className=\"text-muted\">{instance.url}</span>\n    </>\n  ) : (\n    <span>{instance.key}</span>\n  );\n}\n\nexport default function PRDecorationBindingRenderer(props: PRDecorationBindingRendererProps) {\n  const {\n    formData,\n    instances,\n    isChanged,\n    isConfigured,\n    isValid,\n    loading,\n    updating,\n    successfullyUpdated,\n    monorepoEnabled,\n    checkingConfiguration,\n    configurationErrors,\n    isSysAdmin\n  } = props;\n\n  if (loading) {\n    return <DeferredSpinner />;\n  }\n\n  if (instances.length < 1) {\n    return (\n      <div>\n        <Alert className=\"spacer-top huge-spacer-bottom\" variant=\"info\">\n          {isSysAdmin ? (\n            <FormattedMessage\n              defaultMessage={translate('settings.pr_decoration.binding.no_bindings.admin')}\n              id=\"settings.pr_decoration.binding.no_bindings.admin\"\n              values={{\n                link: (\n                  <Link to={getGlobalSettingsUrl(ALM_INTEGRATION)}>\n                    {translate('settings.pr_decoration.binding.no_bindings.link')}\n                  </Link>\n                )\n              }}\n            />\n          ) : (\n            translate('settings.pr_decoration.binding.no_bindings')\n          )}\n        </Alert>\n      </div>\n    );\n  }\n\n  const selected = formData.key && instances.find(i => i.key === formData.key);\n  const alm = selected && selected.alm;\n\n  return (\n    <div>\n      <header className=\"page-header\">\n        <h1 className=\"page-title\">{translate('settings.pr_decoration.binding.title')}</h1>\n      </header>\n\n      <div className=\"markdown small spacer-top big-spacer-bottom\">\n        {translate('settings.pr_decoration.binding.description')}\n      </div>\n\n      <form\n        onSubmit={(event: React.SyntheticEvent<HTMLFormElement>) => {\n          event.preventDefault();\n          props.onSubmit();\n        }}>\n        <MandatoryFieldsExplanation className=\"form-field\" />\n\n        <div className=\"settings-definition big-spacer-bottom\">\n          <div className=\"settings-definition-left\">\n            <label className=\"h3\" htmlFor=\"name\">\n              {translate('settings.pr_decoration.binding.form.name')}\n              <MandatoryFieldMarker className=\"spacer-right\" />\n            </label>\n            <div className=\"markdown small spacer-top\">\n              {translate('settings.pr_decoration.binding.form.name.help')}\n            </div>\n          </div>\n          <div className=\"settings-definition-right\">\n            <Select\n              autosize={true}\n              className=\"abs-width-400 big-spacer-top\"\n              clearable={false}\n              id=\"name\"\n              menuContainerStyle={{\n                maxWidth: '210%' /* Allow double the width of the select */,\n                width: 'auto'\n              }}\n              onChange={(instance: AlmSettingsInstance) => props.onFieldChange('key', instance.key)}\n              optionRenderer={optionRenderer}\n              options={instances}\n              searchable={false}\n              value={formData.key}\n              valueKey=\"key\"\n              valueRenderer={optionRenderer}\n            />\n          </div>\n        </div>\n\n        {alm && (\n          <AlmSpecificForm\n            alm={alm}\n            instances={instances}\n            formData={formData}\n            onFieldChange={props.onFieldChange}\n            monorepoEnabled={monorepoEnabled}\n          />\n        )}\n\n        <div className=\"display-flex-center big-spacer-top action-section\">\n          {isChanged && (\n            <SubmitButton className=\"spacer-right button-success\" disabled={updating || !isValid}>\n              <span data-test=\"project-settings__alm-save\">{translate('save')}</span>\n              <DeferredSpinner className=\"spacer-left\" loading={updating} />\n            </SubmitButton>\n          )}\n          {!updating && successfullyUpdated && (\n            <span className=\"text-success spacer-right\">\n              <AlertSuccessIcon className=\"spacer-right\" />\n              {translate('settings.state.saved')}\n            </span>\n          )}\n          {isConfigured && (\n            <>\n              <Button className=\"spacer-right\" onClick={props.onReset}>\n                <span data-test=\"project-settings__alm-reset\">{translate('reset_verb')}</span>\n              </Button>\n              {!isChanged && (\n                <Button onClick={props.onCheckConfiguration} disabled={checkingConfiguration}>\n                  {translate('settings.pr_decoration.binding.check_configuration')}\n                  <DeferredSpinner className=\"spacer-left\" loading={checkingConfiguration} />\n                </Button>\n              )}\n            </>\n          )}\n        </div>\n        {!checkingConfiguration && configurationErrors?.errors && (\n          <Alert variant=\"error\" display=\"inline\" className=\"big-spacer-top\">\n            <p className=\"spacer-bottom\">\n              {translate('settings.pr_decoration.binding.check_configuration.failure')}\n            </p>\n            <ul className=\"list-styled\">\n              {configurationErrors.errors.map((error, i) => (\n                // eslint-disable-next-line react/no-array-index-key\n                <li key={i}>{error.msg}</li>\n              ))}\n            </ul>\n            {configurationErrors.scope === ProjectAlmBindingConfigurationErrorScope.Global && (\n              <p>\n                {isSysAdmin ? (\n                  <FormattedMessage\n                    id=\"settings.pr_decoration.binding.check_configuration.failure.check_global_settings\"\n                    defaultMessage={translate(\n                      'settings.pr_decoration.binding.check_configuration.failure.check_global_settings'\n                    )}\n                    values={{\n                      link: (\n                        <Link to={getGlobalSettingsUrl(ALM_INTEGRATION, { alm })}>\n                          {translate(\n                            'settings.pr_decoration.binding.check_configuration.failure.check_global_settings.link'\n                          )}\n                        </Link>\n                      )\n                    }}\n                  />\n                ) : (\n                  translate('settings.pr_decoration.binding.check_configuration.contact_admin')\n                )}\n              </p>\n            )}\n          </Alert>\n        )}\n        {isConfigured && !isChanged && !checkingConfiguration && !configurationErrors && (\n          <Alert variant=\"success\" display=\"inline\" className=\"big-spacer-top\">\n            {translate('settings.pr_decoration.binding.check_configuration.success')}\n          </Alert>\n        )}\n      </form>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport {\n  deleteProjectAlmBinding,\n  getAlmSettings,\n  getProjectAlmBinding,\n  setProjectAzureBinding,\n  setProjectBitbucketBinding,\n  setProjectBitbucketCloudBinding,\n  setProjectGithubBinding,\n  setProjectGitlabBinding,\n  validateProjectAlmBinding\n} from '../../../../api/alm-settings';\nimport throwGlobalError from '../../../../app/utils/throwGlobalError';\nimport { withCurrentUser } from '../../../../components/hoc/withCurrentUser';\nimport { HttpStatus } from '../../../../helpers/request';\nimport { hasGlobalPermission } from '../../../../helpers/users';\nimport { getAppState, Store } from '../../../../store/rootReducer';\nimport {\n  AlmKeys,\n  AlmSettingsInstance,\n  ProjectAlmBindingConfigurationErrors,\n  ProjectAlmBindingResponse\n} from '../../../../types/alm-settings';\nimport { EditionKey } from '../../../../types/editions';\nimport { Permissions } from '../../../../types/permissions';\nimport PRDecorationBindingRenderer from './PRDecorationBindingRenderer';\n\ntype FormData = T.Omit<ProjectAlmBindingResponse, 'alm'>;\n\ninterface StateProps {\n  monorepoEnabled: boolean;\n}\n\ninterface Props {\n  component: T.Component;\n  currentUser: T.CurrentUser;\n}\n\ninterface State {\n  formData: FormData;\n  instances: AlmSettingsInstance[];\n  isChanged: boolean;\n  isConfigured: boolean;\n  isValid: boolean;\n  loading: boolean;\n  originalData?: FormData;\n  updating: boolean;\n  successfullyUpdated: boolean;\n  checkingConfiguration: boolean;\n  configurationErrors?: ProjectAlmBindingConfigurationErrors;\n}\n\nconst REQUIRED_FIELDS_BY_ALM: {\n  [almKey in AlmKeys]: Array<keyof T.Omit<FormData, 'key'>>;\n} = {\n  [AlmKeys.Azure]: ['repository', 'slug'],\n  [AlmKeys.BitbucketServer]: ['repository', 'slug'],\n  [AlmKeys.BitbucketCloud]: ['repository'],\n  [AlmKeys.GitHub]: ['repository'],\n  [AlmKeys.GitLab]: ['repository']\n};\n\nexport class PRDecorationBinding extends React.PureComponent<Props & StateProps, State> {\n  mounted = false;\n  state: State = {\n    formData: { key: '', monorepo: false },\n    instances: [],\n    isChanged: false,\n    isConfigured: false,\n    isValid: false,\n    loading: true,\n    updating: false,\n    successfullyUpdated: false,\n    checkingConfiguration: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchDefinitions();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchDefinitions = () => {\n    const project = this.props.component.key;\n    return Promise.all([getAlmSettings(project), this.getProjectBinding(project)])\n      .then(([instances, originalData]) => {\n        if (this.mounted) {\n          this.setState(({ formData }) => {\n            const newFormData = originalData || formData;\n            return {\n              formData: newFormData,\n              instances: instances || [],\n              isChanged: false,\n              isConfigured: !!originalData,\n              isValid: this.validateForm(newFormData),\n              loading: false,\n              originalData: newFormData,\n              configurationErrors: undefined\n            };\n          });\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      })\n      .then(() => this.checkConfiguration());\n  };\n\n  getProjectBinding(project: string): Promise<ProjectAlmBindingResponse | undefined> {\n    return getProjectAlmBinding(project).catch((response: Response) => {\n      if (response && response.status === HttpStatus.NotFound) {\n        return undefined;\n      }\n      return throwGlobalError(response);\n    });\n  }\n\n  catchError = () => {\n    if (this.mounted) {\n      this.setState({ updating: false });\n    }\n  };\n\n  handleReset = () => {\n    const { component } = this.props;\n    this.setState({ updating: true });\n    deleteProjectAlmBinding(component.key)\n      .then(() => {\n        if (this.mounted) {\n          this.setState({\n            formData: {\n              key: '',\n              repository: '',\n              slug: '',\n              monorepo: false\n            },\n            originalData: undefined,\n            isChanged: false,\n            isConfigured: false,\n            updating: false,\n            successfullyUpdated: true,\n            configurationErrors: undefined\n          });\n        }\n      })\n      .catch(this.catchError);\n  };\n\n  submitProjectAlmBinding(\n    alm: AlmKeys,\n    key: string,\n    almSpecificFields?: T.Omit<FormData, 'key'>\n  ): Promise<void> {\n    const almSetting = key;\n    const project = this.props.component.key;\n    const repository = almSpecificFields?.repository;\n    const slug = almSpecificFields?.slug;\n    const monorepo = almSpecificFields?.monorepo ?? false;\n\n    if (!repository) {\n      return Promise.reject();\n    }\n\n    switch (alm) {\n      case AlmKeys.Azure: {\n        if (!slug) {\n          return Promise.reject();\n        }\n        return setProjectAzureBinding({\n          almSetting,\n          project,\n          projectName: slug,\n          repositoryName: repository,\n          monorepo\n        });\n      }\n      case AlmKeys.BitbucketServer: {\n        if (!slug) {\n          return Promise.reject();\n        }\n        return setProjectBitbucketBinding({\n          almSetting,\n          project,\n          repository,\n          slug,\n          monorepo\n        });\n      }\n      case AlmKeys.BitbucketCloud: {\n        return setProjectBitbucketCloudBinding({\n          almSetting,\n          project,\n          repository,\n          monorepo\n        });\n      }\n      case AlmKeys.GitHub: {\n        // By default it must remain true.\n        const summaryCommentEnabled = almSpecificFields?.summaryCommentEnabled ?? true;\n        return setProjectGithubBinding({\n          almSetting,\n          project,\n          repository,\n          summaryCommentEnabled,\n          monorepo\n        });\n      }\n\n      case AlmKeys.GitLab: {\n        return setProjectGitlabBinding({\n          almSetting,\n          project,\n          repository,\n          monorepo\n        });\n      }\n\n      default:\n        return Promise.reject();\n    }\n  }\n\n  checkConfiguration = async () => {\n    const {\n      component: { key: projectKey }\n    } = this.props;\n\n    const { isConfigured } = this.state;\n\n    if (!isConfigured) {\n      return;\n    }\n\n    this.setState({ checkingConfiguration: true, configurationErrors: undefined });\n\n    const configurationErrors = await validateProjectAlmBinding(projectKey).catch(error => error);\n\n    if (this.mounted) {\n      this.setState({ checkingConfiguration: false, configurationErrors });\n    }\n  };\n\n  handleSubmit = () => {\n    this.setState({ updating: true });\n    const {\n      formData: { key, ...additionalFields },\n      instances\n    } = this.state;\n\n    const selected = instances.find(i => i.key === key);\n    if (!key || !selected) {\n      return;\n    }\n\n    this.submitProjectAlmBinding(selected.alm, key, additionalFields)\n      .then(() => {\n        if (this.mounted) {\n          this.setState({\n            updating: false,\n            successfullyUpdated: true\n          });\n        }\n      })\n      .then(this.fetchDefinitions)\n      .catch(this.catchError);\n  };\n\n  isDataSame(\n    { key, repository = '', slug = '', summaryCommentEnabled = false, monorepo = false }: FormData,\n    {\n      key: oKey = '',\n      repository: oRepository = '',\n      slug: oSlug = '',\n      summaryCommentEnabled: osummaryCommentEnabled = false,\n      monorepo: omonorepo = false\n    }: FormData\n  ) {\n    return (\n      key === oKey &&\n      repository === oRepository &&\n      slug === oSlug &&\n      summaryCommentEnabled === osummaryCommentEnabled &&\n      monorepo === omonorepo\n    );\n  }\n\n  handleFieldChange = (id: keyof ProjectAlmBindingResponse, value: string | boolean) => {\n    this.setState(({ formData, originalData }) => {\n      const newFormData = {\n        ...formData,\n        [id]: value\n      };\n\n      return {\n        formData: newFormData,\n        isValid: this.validateForm(newFormData),\n        isChanged: !this.isDataSame(newFormData, originalData || { key: '', monorepo: false }),\n        successfullyUpdated: false\n      };\n    });\n  };\n\n  validateForm = ({ key, ...additionalFields }: State['formData']) => {\n    const { instances } = this.state;\n    const selected = instances.find(i => i.key === key);\n    if (!key || !selected) {\n      return false;\n    }\n    return REQUIRED_FIELDS_BY_ALM[selected.alm].reduce(\n      (result: boolean, field) => result && Boolean(additionalFields[field]),\n      true\n    );\n  };\n\n  handleCheckConfiguration = async () => {\n    await this.checkConfiguration();\n  };\n\n  render() {\n    const { currentUser, monorepoEnabled } = this.props;\n\n    return (\n      <PRDecorationBindingRenderer\n        onFieldChange={this.handleFieldChange}\n        onReset={this.handleReset}\n        onSubmit={this.handleSubmit}\n        onCheckConfiguration={this.handleCheckConfiguration}\n        monorepoEnabled={monorepoEnabled}\n        isSysAdmin={hasGlobalPermission(currentUser, Permissions.Admin)}\n        {...this.state}\n      />\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store): StateProps => ({\n  // This feature trigger will be replaced when SONAR-14349 is implemented\n  monorepoEnabled: [EditionKey.enterprise, EditionKey.datacenter].includes(\n    getAppState(state).edition as EditionKey\n  )\n});\n\nexport default connect(mapStateToProps)(withCurrentUser(PRDecorationBinding));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  ALM_INTEGRATION,\n  ANALYSIS_SCOPE_CATEGORY,\n  LANGUAGES_CATEGORY,\n  NEW_CODE_PERIOD_CATEGORY,\n  PULL_REQUEST_DECORATION_BINDING_CATEGORY\n} from './AdditionalCategoryKeys';\nimport AlmIntegration from './almIntegration/AlmIntegration';\nimport { AnalysisScope } from './AnalysisScope';\nimport Languages from './Languages';\nimport NewCodePeriod from './NewCodePeriod';\nimport PullRequestDecorationBinding from './pullRequestDecorationBinding/PRDecorationBinding';\n\nexport interface AdditionalCategoryComponentProps {\n  component: T.Component | undefined;\n  selectedCategory: string;\n}\n\nexport interface AdditionalCategory {\n  availableGlobally: boolean;\n  availableForProject: boolean;\n  displayTab: boolean;\n  key: string;\n  name: string;\n  renderComponent: (props: AdditionalCategoryComponentProps) => React.ReactNode;\n  requiresBranchesEnabled?: boolean;\n}\n\nexport const ADDITIONAL_CATEGORIES: AdditionalCategory[] = [\n  {\n    key: LANGUAGES_CATEGORY,\n    name: translate('property.category.languages'),\n    renderComponent: getLanguagesComponent,\n    availableGlobally: true,\n    availableForProject: true,\n    displayTab: true\n  },\n  {\n    key: NEW_CODE_PERIOD_CATEGORY,\n    name: translate('settings.new_code_period.category'),\n    renderComponent: getNewCodePeriodComponent,\n    availableGlobally: true,\n    availableForProject: false,\n    displayTab: true\n  },\n  {\n    key: ANALYSIS_SCOPE_CATEGORY,\n    name: translate('property.category.exclusions'),\n    renderComponent: getAnalysisScopeComponent,\n    availableGlobally: true,\n    availableForProject: true,\n    displayTab: false\n  },\n  {\n    key: ALM_INTEGRATION,\n    name: translate('property.category.almintegration'),\n    renderComponent: getAlmIntegrationComponent,\n    availableGlobally: true,\n    availableForProject: false,\n    displayTab: false\n  },\n  {\n    key: PULL_REQUEST_DECORATION_BINDING_CATEGORY,\n    name: translate('settings.pr_decoration.binding.category'),\n    renderComponent: getPullRequestDecorationBindingComponent,\n    availableGlobally: false,\n    availableForProject: true,\n    displayTab: true,\n    requiresBranchesEnabled: true\n  }\n];\n\nfunction getLanguagesComponent(props: AdditionalCategoryComponentProps) {\n  return <Languages {...props} />;\n}\n\nfunction getNewCodePeriodComponent() {\n  return <NewCodePeriod />;\n}\n\nfunction getAnalysisScopeComponent(props: AdditionalCategoryComponentProps) {\n  return <AnalysisScope {...props} />;\n}\n\nfunction getAlmIntegrationComponent(props: AdditionalCategoryComponentProps) {\n  return <AlmIntegration {...props} />;\n}\n\nfunction getPullRequestDecorationBindingComponent(props: AdditionalCategoryComponentProps) {\n  return props.component && <PullRequestDecorationBinding component={props.component} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { IndexLink } from 'react-router';\nimport { getGlobalSettingsUrl, getProjectSettingsUrl } from '../../../helpers/urls';\nimport { getAppState, getSettingsAppAllCategories, Store } from '../../../store/rootReducer';\nimport { getCategoryName } from '../utils';\nimport { ADDITIONAL_CATEGORIES } from './AdditionalCategories';\nimport CATEGORY_OVERRIDES from './CategoryOverrides';\n\nexport interface CategoriesListProps {\n  branchesEnabled?: boolean;\n  categories: string[];\n  component?: T.Component;\n  defaultCategory: string;\n  selectedCategory: string;\n}\n\nexport function CategoriesList(props: CategoriesListProps) {\n  const { branchesEnabled, categories, component, defaultCategory, selectedCategory } = props;\n\n  const categoriesWithName = categories\n    .filter(key => !CATEGORY_OVERRIDES[key.toLowerCase()])\n    .map(key => ({\n      key,\n      name: getCategoryName(key)\n    }))\n    .concat(\n      ADDITIONAL_CATEGORIES.filter(c => c.displayTab)\n        .filter(c =>\n          component\n            ? // Project settings\n              c.availableForProject\n            : // Global settings\n              c.availableGlobally\n        )\n        .filter(c => branchesEnabled || !c.requiresBranchesEnabled)\n    );\n  const sortedCategories = sortBy(categoriesWithName, category => category.name.toLowerCase());\n\n  return (\n    <ul className=\"side-tabs-menu\">\n      {sortedCategories.map(c => {\n        const category = c.key !== defaultCategory ? c.key.toLowerCase() : undefined;\n        return (\n          <li key={c.key}>\n            <IndexLink\n              className={classNames({\n                active: c.key.toLowerCase() === selectedCategory.toLowerCase()\n              })}\n              title={c.name}\n              to={\n                component\n                  ? getProjectSettingsUrl(component.key, category)\n                  : getGlobalSettingsUrl(category)\n              }>\n              {c.name}\n            </IndexLink>\n          </li>\n        );\n      })}\n    </ul>\n  );\n}\n\nconst mapStateToProps = (state: Store) => ({\n  categories: getSettingsAppAllCategories(state),\n  branchesEnabled: getAppState(state).branchesEnabled\n});\n\nexport default connect(mapStateToProps)(CategoriesList);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport OutsideClickHandler from '../../../components/controls/OutsideClickHandler';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { SettingCategoryDefinition } from '../../../types/settings';\nimport { buildSettingLink, isRealSettingKey } from '../utils';\n\nexport interface SettingsSearchRendererProps {\n  className?: string;\n  results?: SettingCategoryDefinition[];\n  searchQuery: string;\n  selectedResult?: string;\n  showResults: boolean;\n  onClickOutside: () => void;\n  onMouseOverResult: (key: string) => void;\n  onSearchInputChange: (query: string) => void;\n  onSearchInputFocus: () => void;\n  onSearchInputKeyDown: (event: React.KeyboardEvent) => void;\n}\n\nexport default function SettingsSearchRenderer(props: SettingsSearchRendererProps) {\n  const { className, results, searchQuery, selectedResult, showResults } = props;\n\n  const scrollableNodeRef = React.useRef(null);\n  const selectedNodeRef = React.useRef<HTMLLIElement>(null);\n\n  React.useEffect(() => {\n    const parent = scrollableNodeRef.current;\n    const selectedNode = selectedNodeRef.current;\n    if (selectedNode && parent) {\n      scrollToElement(selectedNode, { topOffset: 30, bottomOffset: 30, parent });\n    }\n  });\n\n  return (\n    <OutsideClickHandler onClickOutside={props.onClickOutside}>\n      <div className={classNames('dropdown', className)}>\n        <SearchBox\n          onChange={props.onSearchInputChange}\n          onFocus={props.onSearchInputFocus}\n          onKeyDown={props.onSearchInputKeyDown}\n          placeholder={translate('settings.search.placeholder')}\n          value={searchQuery}\n        />\n        {showResults && (\n          <DropdownOverlay noPadding={true}>\n            <ul className=\"settings-search-results menu\" ref={scrollableNodeRef}>\n              {results && results.length > 0 ? (\n                results.map(r => (\n                  <li\n                    key={r.key}\n                    className={classNames('spacer-bottom spacer-top', {\n                      active: selectedResult === r.key\n                    })}\n                    ref={selectedResult === r.key ? selectedNodeRef : undefined}>\n                    <Link\n                      onClick={props.onClickOutside}\n                      onMouseEnter={() => props.onMouseOverResult(r.key)}\n                      to={buildSettingLink(r)}>\n                      <div className=\"settings-search-result-title display-flex-space-between\">\n                        <h3>{r.name || r.subCategory}</h3>\n                      </div>\n                      {isRealSettingKey(r.key) && (\n                        <div className=\"note spacer-top\">\n                          {translateWithParameters('settings.key_x', r.key)}\n                        </div>\n                      )}\n                    </Link>\n                  </li>\n                ))\n              ) : (\n                <div className=\"big-padded\">{translate('no_results')}</div>\n              )}\n            </ul>\n          </DropdownOverlay>\n        )}\n      </div>\n    </OutsideClickHandler>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce, keyBy } from 'lodash';\nimport lunr, { LunrIndex } from 'lunr';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { InjectedRouter } from 'react-router';\nimport { withRouter } from '../../../components/hoc/withRouter';\nimport { KeyCodes } from '../../../helpers/keycodes';\nimport { getSettingsAppAllDefinitions, Store } from '../../../store/rootReducer';\nimport { SettingCategoryDefinition } from '../../../types/settings';\nimport { ADDITIONAL_SETTING_DEFINITIONS, buildSettingLink } from '../utils';\nimport SettingsSearchRenderer from './SettingsSearchRenderer';\n\ninterface Props {\n  className?: string;\n  definitions: SettingCategoryDefinition[];\n  router: InjectedRouter;\n}\n\ninterface State {\n  results?: SettingCategoryDefinition[];\n  searchQuery: string;\n  selectedResult?: string;\n  showResults: boolean;\n}\n\nconst DEBOUNCE_DELAY = 250;\n\nexport class SettingsSearch extends React.Component<Props, State> {\n  definitionsByKey: T.Dict<SettingCategoryDefinition>;\n  index: LunrIndex;\n  state: State = {\n    searchQuery: '',\n    showResults: false\n  };\n\n  constructor(props: Props) {\n    super(props);\n\n    this.doSearch = debounce(this.doSearch, DEBOUNCE_DELAY);\n    this.handleFocus = debounce(this.handleFocus, DEBOUNCE_DELAY);\n\n    const definitions = props.definitions.concat(ADDITIONAL_SETTING_DEFINITIONS);\n    this.index = this.buildSearchIndex(definitions);\n    this.definitionsByKey = keyBy(definitions, 'key');\n  }\n\n  buildSearchIndex(definitions: SettingCategoryDefinition[]) {\n    return lunr(function() {\n      this.ref('key');\n      this.field('key');\n      this.field('name');\n      this.field('description');\n      this.field('splitkey');\n\n      definitions.forEach(definition => {\n        this.add({ ...definition, splitkey: definition.key.replace('.', ' ') });\n      });\n    });\n  }\n\n  doSearch = (query: string) => {\n    const cleanQuery = query.replace(/[\\^\\-+:~*]/g, '');\n\n    if (!cleanQuery) {\n      this.setState({ showResults: false });\n      return;\n    }\n\n    const results = this.index\n      .search(\n        cleanQuery\n          .split(/\\s+/)\n          .map(s => `${s} *${s}*`)\n          .join(' ')\n      )\n      .map(match => this.definitionsByKey[match.ref]);\n\n    this.setState({ showResults: true, results, selectedResult: results[0]?.key });\n  };\n\n  hideResults = () => {\n    this.setState({ showResults: false });\n  };\n\n  handleFocus = () => {\n    const { searchQuery, showResults } = this.state;\n    if (searchQuery && !showResults) {\n      this.setState({ showResults: true });\n    }\n  };\n\n  handleSearchChange = (searchQuery: string) => {\n    this.setState({ searchQuery });\n    this.doSearch(searchQuery);\n  };\n\n  handleMouseOverResult = (key: string) => {\n    this.setState({ selectedResult: key });\n  };\n\n  handleKeyDown = (event: React.KeyboardEvent) => {\n    switch (event.keyCode) {\n      case KeyCodes.Enter:\n        event.preventDefault();\n        this.openSelected();\n        return;\n      case KeyCodes.UpArrow:\n        event.preventDefault();\n        this.selectPrevious();\n        return;\n      case KeyCodes.DownArrow:\n        event.preventDefault();\n        this.selectNext();\n        // keep this return to prevent fall-through in case more cases will be adder later\n        // eslint-disable-next-line no-useless-return\n        return;\n    }\n  };\n\n  selectPrevious = () => {\n    const { results, selectedResult } = this.state;\n\n    if (results && selectedResult) {\n      const index = results.findIndex(r => r.key === selectedResult);\n\n      if (index > 0) {\n        this.setState({ selectedResult: results[index - 1].key });\n      }\n    }\n  };\n\n  selectNext = () => {\n    const { results, selectedResult } = this.state;\n\n    if (results && selectedResult) {\n      const index = results.findIndex(r => r.key === selectedResult);\n\n      if (index < results.length - 1) {\n        this.setState({ selectedResult: results[index + 1].key });\n      }\n    }\n  };\n\n  openSelected = () => {\n    const { router } = this.props;\n    const { selectedResult } = this.state;\n    if (selectedResult) {\n      const definition = this.definitionsByKey[selectedResult];\n      router.push(buildSettingLink(definition));\n      this.setState({ showResults: false });\n    }\n  };\n\n  render() {\n    const { className } = this.props;\n\n    return (\n      <SettingsSearchRenderer\n        className={className}\n        onClickOutside={this.hideResults}\n        onMouseOverResult={this.handleMouseOverResult}\n        onSearchInputChange={this.handleSearchChange}\n        onSearchInputFocus={this.handleFocus}\n        onSearchInputKeyDown={this.handleKeyDown}\n        {...this.state}\n      />\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({\n  definitions: getSettingsAppAllDefinitions(state)\n});\n\nexport default withRouter(connect(mapStateToProps)(SettingsSearch));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport InstanceMessage from '../../../components/common/InstanceMessage';\nimport { translate } from '../../../helpers/l10n';\nimport SettingsSearch from './SettingsSearch';\n\nexport interface PageHeaderProps {\n  component?: T.Component;\n}\n\nexport default function PageHeader({ component }: PageHeaderProps) {\n  const title = component ? translate('project_settings.page') : translate('settings.page');\n\n  const description = component ? (\n    translate('project_settings.page.description')\n  ) : (\n    <InstanceMessage message={translate('settings.page.description')} />\n  );\n\n  return (\n    <header className={classNames('top-bar-outer', { 'with-search': component === undefined })}>\n      <div className=\"top-bar\">\n        <div\n          className={classNames('top-bar-inner bordered-bottom big-padded-top padded-bottom', {\n            'with-search': component === undefined\n          })}>\n          <h1 className=\"page-title\">{title}</h1>\n          <div className=\"page-description spacer-top\">{description}</div>\n          {!component && <SettingsSearch className=\"big-spacer-top\" />}\n        </div>\n      </div>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { find } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { WithRouterProps } from 'react-router';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  addSideBarClass,\n  addWhitePageClass,\n  removeSideBarClass,\n  removeWhitePageClass\n} from '../../../helpers/pages';\nimport { getSettingsAppDefaultCategory, Store } from '../../../store/rootReducer';\nimport { fetchSettings } from '../store/actions';\nimport '../styles.css';\nimport { ADDITIONAL_CATEGORIES } from './AdditionalCategories';\nimport AllCategoriesList from './AllCategoriesList';\nimport CategoryDefinitionsList from './CategoryDefinitionsList';\nimport CATEGORY_OVERRIDES from './CategoryOverrides';\nimport PageHeader from './PageHeader';\n\ninterface Props {\n  component?: T.Component;\n  defaultCategory: string;\n  fetchSettings(component?: string): Promise<void>;\n}\n\ninterface State {\n  loading: boolean;\n}\n\nexport class SettingsApp extends React.PureComponent<Props & WithRouterProps, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    addSideBarClass();\n    addWhitePageClass();\n    this.fetchSettings();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.component !== this.props.component) {\n      this.fetchSettings();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    removeSideBarClass();\n    removeWhitePageClass();\n  }\n\n  fetchSettings = () => {\n    const { component } = this.props;\n    this.props.fetchSettings(component && component.key).then(this.stopLoading, this.stopLoading);\n  };\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  render() {\n    if (this.state.loading) {\n      return null;\n    }\n\n    const { query } = this.props.location;\n    const originalCategory = (query.category as string) || this.props.defaultCategory;\n    const overriddenCategory = CATEGORY_OVERRIDES[originalCategory.toLowerCase()];\n    const selectedCategory = overriddenCategory || originalCategory;\n    const foundAdditionalCategory = find(ADDITIONAL_CATEGORIES, c => c.key === selectedCategory);\n    const isProjectSettings = this.props.component;\n    const shouldRenderAdditionalCategory =\n      foundAdditionalCategory &&\n      ((isProjectSettings && foundAdditionalCategory.availableForProject) ||\n        (!isProjectSettings && foundAdditionalCategory.availableGlobally));\n\n    return (\n      <div id=\"settings-page\">\n        <Suggestions suggestions=\"settings\" />\n        <Helmet defer={false} title={translate('settings.page')} />\n        <PageHeader component={this.props.component} />\n\n        <div className=\"layout-page\">\n          <ScreenPositionHelper className=\"layout-page-side-outer\">\n            {({ top }) => (\n              <div className=\"layout-page-side\" style={{ top }}>\n                <div className=\"layout-page-side-inner\">\n                  <AllCategoriesList\n                    component={this.props.component}\n                    defaultCategory={this.props.defaultCategory}\n                    selectedCategory={selectedCategory}\n                  />\n                </div>\n              </div>\n            )}\n          </ScreenPositionHelper>\n\n          <div className=\"layout-page-main\">\n            <div className=\"layout-page-main-inner\">\n              <div className=\"big-padded\">\n                {foundAdditionalCategory && shouldRenderAdditionalCategory ? (\n                  foundAdditionalCategory.renderComponent({\n                    component: this.props.component,\n                    selectedCategory: originalCategory\n                  })\n                ) : (\n                  <CategoryDefinitionsList\n                    category={selectedCategory}\n                    component={this.props.component}\n                  />\n                )}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({\n  defaultCategory: getSettingsAppDefaultCategory(state)\n});\n\nconst mapDispatchToProps = { fetchSettings: fetchSettings as any };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SettingsApp);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { encryptValue } from '../../../api/settings';\nimport { SubmitButton } from '../../../components/controls/buttons';\nimport { ClipboardButton } from '../../../components/controls/clipboard';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  generateSecretKey: () => Promise<void>;\n}\n\ninterface State {\n  encryptedValue?: string;\n  encrypting: boolean;\n  generating: boolean;\n  value: string;\n}\n\nexport default class EncryptionForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { encrypting: false, generating: false, value: '' };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.setState({ value: event.currentTarget.value });\n  };\n\n  handleEncrypt = (event: React.FormEvent) => {\n    event.preventDefault();\n    this.setState({ encrypting: true });\n    encryptValue(this.state.value).then(\n      ({ encryptedValue }) => {\n        if (this.mounted) {\n          this.setState({ encryptedValue, encrypting: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ encrypting: false });\n        }\n      }\n    );\n  };\n\n  handleGenerateSecretKey = (event: React.FormEvent) => {\n    event.preventDefault();\n    this.setState({ generating: true });\n    this.props.generateSecretKey().then(this.stopGenerating, this.stopGenerating);\n  };\n\n  stopGenerating = () => {\n    if (this.mounted) {\n      this.setState({ generating: false });\n    }\n  };\n\n  render() {\n    const { encryptedValue, encrypting, generating } = this.state;\n    return (\n      <div id=\"encryption-form-container\">\n        <div className=\"spacer-bottom\">{translate('encryption.form_intro')}</div>\n        <form className=\"big-spacer-bottom\" id=\"encryption-form\" onSubmit={this.handleEncrypt}>\n          <textarea\n            autoFocus={true}\n            className=\"abs-width-600\"\n            id=\"encryption-form-value\"\n            onChange={this.handleChange}\n            required={true}\n            rows={5}\n            value={this.state.value}\n          />\n          <div className=\"spacer-top\">\n            <SubmitButton disabled={encrypting || generating}>\n              {translate('encryption.encrypt')}\n            </SubmitButton>\n            <DeferredSpinner className=\"spacer-left\" loading={encrypting} />\n          </div>\n        </form>\n\n        {encryptedValue && (\n          <div>\n            <span className=\"little-spacer-right\">{translate('encryption.encrypted_value')}</span>\n            <input\n              className=\"input-clear input-code input-super-large\"\n              id=\"encrypted-value\"\n              readOnly={true}\n              type=\"text\"\n              value={encryptedValue}\n            />\n            <ClipboardButton className=\"little-spacer-left\" copyValue={encryptedValue} />\n          </div>\n        )}\n\n        <form\n          className=\"huge-spacer-top bordered-top\"\n          id=\"encryption-new-key-form\"\n          onSubmit={this.handleGenerateSecretKey}>\n          <p className=\"big-spacer-top spacer-bottom\">\n            <FormattedMessage\n              defaultMessage={translate('encryption.form_note')}\n              id=\"encryption.form_note\"\n              values={{\n                moreInformationLink: (\n                  <Link to=\"/documentation/instance-administration/security/\" target=\"_blank\">\n                    {translate('more_information')}\n                  </Link>\n                )\n              }}\n            />\n          </p>\n\n          <SubmitButton disabled={generating || encrypting}>\n            {translate('encryption.generate_new_secret_key')}{' '}\n          </SubmitButton>\n          <DeferredSpinner className=\"spacer-left\" loading={generating} />\n        </form>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { SubmitButton } from '../../../components/controls/buttons';\nimport { ClipboardButton } from '../../../components/controls/clipboard';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  generateSecretKey: () => Promise<void>;\n  secretKey?: string;\n}\n\ninterface State {\n  submitting: boolean;\n}\n\nexport default class GenerateSecretKeyForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { submitting: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ submitting: true });\n    this.props.generateSecretKey().then(this.stopSubmitting, this.stopSubmitting);\n  };\n\n  stopSubmitting = () => {\n    if (this.mounted) {\n      this.setState({ submitting: false });\n    }\n  };\n\n  render() {\n    const { secretKey } = this.props;\n    const { submitting } = this.state;\n    return (\n      <div id=\"generate-secret-key-form-container\">\n        {secretKey ? (\n          <>\n            <div className=\"big-spacer-bottom\">\n              <h3 className=\"spacer-bottom\">{translate('encryption.secret_key')}</h3>\n              <input\n                className=\"input-clear input-code input-large\"\n                id=\"secret-key\"\n                readOnly={true}\n                type=\"text\"\n                value={secretKey}\n              />\n              <ClipboardButton className=\"little-spacer-left\" copyValue={secretKey} />\n            </div>\n            <h3 className=\"spacer-bottom\">{translate('encryption.how_to_use')}</h3>\n            <div className=\"markdown\">\n              <ul>\n                <li>\n                  <FormattedMessage\n                    defaultMessage={translate('encryption.how_to_use.content1')}\n                    id=\"encryption.how_to_use.content1\"\n                    values={{\n                      secret_file: <code>~/.sonar/sonar-secret.txt</code>,\n                      property: <code>sonar.secretKeyPath</code>,\n                      propreties_file: <code>conf/sonar.properties</code>\n                    }}\n                  />\n                </li>\n                <li>{translate('encryption.how_to_use.content2')}</li>\n                <li>\n                  <FormattedMessage\n                    defaultMessage={translate('encryption.how_to_use.content3')}\n                    id=\"encryption.how_to_use.content3\"\n                    values={{\n                      property: <code>sonar.secretKeyPath</code>\n                    }}\n                  />\n                </li>\n                <li>{translate('encryption.how_to_use.content4')}</li>\n              </ul>\n            </div>\n          </>\n        ) : (\n          <form id=\"generate-secret-key-form\" onSubmit={this.handleSubmit}>\n            <p className=\"spacer-bottom\">\n              <FormattedMessage\n                defaultMessage={translate('encryption.secret_key_description')}\n                id=\"encryption.secret_key_description\"\n                values={{\n                  moreInformationLink: (\n                    <Link to=\"/documentation/instance-administration/security/\" target=\"_blank\">\n                      {translate('more_information')}\n                    </Link>\n                  )\n                }}\n              />\n            </p>\n            <SubmitButton disabled={submitting}>\n              {translate('encryption.generate_secret_key')}\n            </SubmitButton>\n            <DeferredSpinner className=\"spacer-left\" loading={submitting} />\n          </form>\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { checkSecretKey, generateSecretKey } from '../../../api/settings';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport EncryptionForm from './EncryptionForm';\nimport GenerateSecretKeyForm from './GenerateSecretKeyForm';\n\ninterface State {\n  loading: boolean;\n  secretKey?: string;\n  secretKeyAvailable?: boolean;\n}\n\nexport default class EncryptionApp extends React.PureComponent<{}, State> {\n  state: State = { loading: true };\n  mounted = false;\n\n  componentDidMount() {\n    this.mounted = true;\n    this.checkSecretKey();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  checkSecretKey = () => {\n    checkSecretKey().then(\n      ({ secretKeyAvailable }) => {\n        if (this.mounted) {\n          this.setState({ loading: false, secretKeyAvailable });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  generateSecretKey = () => {\n    return generateSecretKey().then(({ secretKey }) => {\n      if (this.mounted) {\n        this.setState({ secretKey, secretKeyAvailable: false });\n      }\n    });\n  };\n\n  render() {\n    const { loading, secretKey, secretKeyAvailable } = this.state;\n    return (\n      <div className=\"page page-limited\" id=\"encryption-page\">\n        <Helmet defer={false} title={translate('property.category.security.encryption')} />\n        <header className=\"page-header\">\n          <h1 className=\"page-title\">{translate('property.category.security.encryption')}</h1>\n          <DeferredSpinner loading={loading} />\n        </header>\n\n        {!loading && !secretKeyAvailable && (\n          <GenerateSecretKeyForm generateSecretKey={this.generateSecretKey} secretKey={secretKey} />\n        )}\n\n        {secretKeyAvailable && <EncryptionForm generateSecretKey={this.generateSecretKey} />}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/SettingsApp')) }\n  },\n  {\n    path: 'encryption',\n    component: lazyLoadComponent(() => import('./encryption/EncryptionApp'))\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { SystemUpgrade } from '../../types/system';\nimport { ButtonLink } from '../controls/buttons';\nimport DropdownIcon from '../icons/DropdownIcon';\nimport DateFormatter from '../intl/DateFormatter';\n\ninterface Props {\n  className?: string;\n  upgrades: SystemUpgrade[];\n}\n\ninterface State {\n  showMore: boolean;\n}\n\nexport default class SystemUpgradeIntermediate extends React.PureComponent<Props, State> {\n  state: State = { showMore: false };\n\n  toggleIntermediatVersions = () => {\n    this.setState(state => ({ showMore: !state.showMore }));\n  };\n\n  render() {\n    const { showMore } = this.state;\n    const { upgrades } = this.props;\n    if (upgrades.length <= 0) {\n      return null;\n    }\n\n    return (\n      <div className={this.props.className}>\n        <ButtonLink className=\"little-spacer-bottom\" onClick={this.toggleIntermediatVersions}>\n          {showMore\n            ? translate('system.hide_intermediate_versions')\n            : translate('system.show_intermediate_versions')}\n          <DropdownIcon className=\"little-spacer-left\" turned={showMore} />\n        </ButtonLink>\n        {showMore &&\n          upgrades.map(upgrade => (\n            <div className=\"note system-upgrade-intermediate\" key={upgrade.version}>\n              {upgrade.releaseDate && (\n                <DateFormatter date={upgrade.releaseDate} long={true}>\n                  {formattedDate => (\n                    <p>\n                      <b className=\"little-spacer-right\">SonarQube {upgrade.version}</b>\n                      {formattedDate}\n                      {upgrade.changeLogUrl && (\n                        <a\n                          className=\"spacer-left\"\n                          href={upgrade.changeLogUrl}\n                          rel=\"noopener noreferrer\"\n                          target=\"_blank\">\n                          {translate('system.release_notes')}\n                        </a>\n                      )}\n                    </p>\n                  )}\n                </DateFormatter>\n              )}\n              {upgrade.description && <p className=\"little-spacer-top\">{upgrade.description}</p>}\n            </div>\n          ))}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport {\n  getEdition,\n  getEditionDownloadFilename,\n  getEditionDownloadUrl\n} from '../../helpers/editions';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { EditionKey } from '../../types/editions';\nimport { SystemUpgrade } from '../../types/system';\nimport DateFormatter from '../intl/DateFormatter';\nimport SystemUpgradeIntermediate from './SystemUpgradeIntermediate';\n\nexport interface SystemUpgradeItemProps {\n  edition: EditionKey | undefined;\n  isLTSVersion: boolean;\n  isPatch: boolean;\n  systemUpgrades: SystemUpgrade[];\n}\n\nexport default function SystemUpgradeItem(props: SystemUpgradeItemProps) {\n  const { edition, isPatch, isLTSVersion, systemUpgrades } = props;\n  const lastUpgrade = systemUpgrades[0];\n  const downloadUrl = getEditionDownloadUrl(\n    getEdition(edition || EditionKey.community),\n    lastUpgrade\n  );\n  let header = translate('system.latest_version');\n  if (isLTSVersion) {\n    header = translate('system.lts_version');\n  } else if (isPatch) {\n    header = translate('system.latest_patch');\n  }\n\n  return (\n    <div className=\"system-upgrade-version it__upgrade-list-item\">\n      <h3 className=\"h1 spacer-bottom\">\n        <strong>{header}</strong>\n        {!isPatch && (\n          <a\n            className=\"spacer-left medium\"\n            href=\"https://www.sonarqube.org/whats-new/?referrer=sonarqube\"\n            rel=\"noopener noreferrer\"\n            target=\"_blank\">\n            {translate('system.see_whats_new')}\n          </a>\n        )}\n      </h3>\n      <p>\n        <FormattedMessage\n          defaultMessage={translate('system.version_is_availble')}\n          id=\"system.version_is_availble\"\n          values={{ version: <b>SonarQube {lastUpgrade.version}</b> }}\n        />\n      </p>\n      <p className=\"spacer-top\">{lastUpgrade.description}</p>\n      <div className=\"big-spacer-top\">\n        {lastUpgrade.releaseDate && (\n          <DateFormatter date={lastUpgrade.releaseDate} long={true}>\n            {formattedDate => (\n              <span>{translateWithParameters('system.released_x', formattedDate)}</span>\n            )}\n          </DateFormatter>\n        )}\n        {lastUpgrade.changeLogUrl && (\n          <a\n            className=\"spacer-left\"\n            href={lastUpgrade.changeLogUrl}\n            rel=\"noopener noreferrer\"\n            target=\"_blank\">\n            {translate('system.release_notes')}\n          </a>\n        )}\n      </div>\n      <SystemUpgradeIntermediate className=\"spacer-top\" upgrades={systemUpgrades.slice(1)} />\n      <div className=\"big-spacer-top\">\n        <a\n          className=\"button\"\n          download={getEditionDownloadFilename(downloadUrl)}\n          href={downloadUrl}\n          rel=\"noopener noreferrer\"\n          target=\"_blank\">\n          {translateWithParameters('system.download_x', lastUpgrade.version)}\n        </a>\n        <a\n          className=\"spacer-left\"\n          href=\"https://redirect.sonarsource.com/doc/upgrading.html\"\n          rel=\"noopener noreferrer\"\n          target=\"_blank\">\n          {translate('system.how_to_upgrade')}\n        </a>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy, sortBy } from 'lodash';\nimport { SystemUpgrade } from '../../types/system';\n\nexport enum UpdateUseCase {\n  NewMinorVersion = 'new_minor_version',\n  NewPatch = 'new_patch',\n  PreLTS = 'pre_lts',\n  PreviousLTS = 'previous_lts'\n}\n\nexport function sortUpgrades(upgrades: SystemUpgrade[]): SystemUpgrade[] {\n  return sortBy(upgrades, [\n    (upgrade: SystemUpgrade) => -Number(upgrade.version.split('.')[0]),\n    (upgrade: SystemUpgrade) => -Number(upgrade.version.split('.')[1] || 0),\n    (upgrade: SystemUpgrade) => -Number(upgrade.version.split('.')[2] || 0)\n  ]);\n}\n\nexport function groupUpgrades(upgrades: SystemUpgrade[]): SystemUpgrade[][] {\n  const groupedVersions = groupBy(upgrades, upgrade => upgrade.version.split('.')[0]);\n  const sortedMajor = sortBy(Object.keys(groupedVersions), key => -Number(key));\n  return sortedMajor.map(key => groupedVersions[key]);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { filter, flatMap, isEmpty, negate } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { EditionKey } from '../../types/editions';\nimport { SystemUpgrade } from '../../types/system';\nimport { ResetButtonLink } from '../controls/buttons';\nimport Modal from '../controls/Modal';\nimport { withAppState } from '../hoc/withAppState';\nimport { Alert, AlertVariant } from '../ui/Alert';\nimport SystemUpgradeItem from './SystemUpgradeItem';\nimport { UpdateUseCase } from './utils';\n\ninterface Props {\n  appState: Pick<T.AppState, 'edition' | 'version'>;\n  onClose: () => void;\n  systemUpgrades: SystemUpgrade[][];\n  latestLTS: string;\n  updateUseCase?: UpdateUseCase;\n}\n\nconst MAP_ALERT: { [key in UpdateUseCase]?: AlertVariant } = {\n  [UpdateUseCase.NewPatch]: 'warning',\n  [UpdateUseCase.PreLTS]: 'warning',\n  [UpdateUseCase.PreviousLTS]: 'error'\n};\n\ninterface State {\n  upgrading: boolean;\n}\n\nexport class SystemUpgradeForm extends React.PureComponent<Props, State> {\n  versionParser = /^(\\d+)\\.(\\d+)(\\.(\\d+))?/;\n  state: State = { upgrading: false };\n\n  render() {\n    const { upgrading } = this.state;\n    const { appState, systemUpgrades, latestLTS, updateUseCase } = this.props;\n    let systemUpgradesWithPatch: SystemUpgrade[][] = [];\n    const alertVariant = updateUseCase ? MAP_ALERT[updateUseCase] : undefined;\n    const header = translate('system.system_upgrade');\n    const parsedVersion = this.versionParser.exec(appState.version);\n    let patches: SystemUpgrade[] = [];\n    if (updateUseCase === UpdateUseCase.NewPatch && parsedVersion !== null) {\n      const [, major, minor] = parsedVersion;\n      const majoMinorVersion = `${major}.${minor}`;\n      patches = flatMap(systemUpgrades, upgrades =>\n        filter(upgrades, upgrade => upgrade.version.startsWith(majoMinorVersion))\n      );\n      systemUpgradesWithPatch = systemUpgrades\n        .map(upgrades => upgrades.filter(upgrade => !upgrade.version.startsWith(majoMinorVersion)))\n        .filter(negate(isEmpty));\n      systemUpgradesWithPatch.push(patches);\n    } else {\n      let untilLTS = false;\n      for (const upgrades of systemUpgrades) {\n        if (untilLTS === false) {\n          systemUpgradesWithPatch.push(upgrades);\n          untilLTS = upgrades.some(upgrade => upgrade.version.startsWith(latestLTS));\n        }\n      }\n    }\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <div className=\"modal-head\">\n          <h2>{header}</h2>\n        </div>\n\n        <div className=\"modal-body\">\n          {alertVariant && updateUseCase && (\n            <Alert variant={alertVariant} className={`it__upgrade-alert-${updateUseCase}`}>\n              {translate('admin_notification.update', updateUseCase)}\n            </Alert>\n          )}\n          {systemUpgradesWithPatch.map(upgrades => (\n            <SystemUpgradeItem\n              edition={\n                appState.edition as EditionKey /* TODO: Fix once AppState is no longer ambiant. */\n              }\n              key={upgrades[upgrades.length - 1].version}\n              systemUpgrades={upgrades}\n              isPatch={upgrades === patches}\n              isLTSVersion={upgrades.some(upgrade => upgrade.version.startsWith(latestLTS))}\n            />\n          ))}\n        </div>\n        <div className=\"modal-foot\">\n          {upgrading && <i className=\"spinner spacer-right\" />}\n          <a\n            className=\"pull-left\"\n            href=\"https://www.sonarqube.org/downloads/?referrer=sonarqube\"\n            rel=\"noopener noreferrer\"\n            target=\"_blank\">\n            {translate('system.see_sonarqube_downloads')}\n          </a>\n          <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n        </div>\n      </Modal>\n    );\n  }\n}\n\nexport default withAppState(SystemUpgradeForm);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { SystemUpgrade } from '../../types/system';\nimport { Button } from '../controls/buttons';\nimport SystemUpgradeForm from './SystemUpgradeForm';\nimport { groupUpgrades, sortUpgrades, UpdateUseCase } from './utils';\n\ninterface Props {\n  latestLTS: string;\n  systemUpgrades: SystemUpgrade[];\n  updateUseCase?: UpdateUseCase;\n}\n\ninterface State {\n  openSystemUpgradeForm: boolean;\n}\n\nexport default class SystemUpgradeButton extends React.PureComponent<Props, State> {\n  state: State = { openSystemUpgradeForm: false };\n\n  handleOpenSystemUpgradeForm = () => {\n    this.setState({ openSystemUpgradeForm: true });\n  };\n\n  handleCloseSystemUpgradeForm = () => {\n    this.setState({ openSystemUpgradeForm: false });\n  };\n\n  render() {\n    const { latestLTS, systemUpgrades, updateUseCase } = this.props;\n    const { openSystemUpgradeForm } = this.state;\n    return (\n      <>\n        <Button className=\"spacer-left\" onClick={this.handleOpenSystemUpgradeForm}>\n          {translate('learn_more')}\n        </Button>\n        {openSystemUpgradeForm && (\n          <SystemUpgradeForm\n            onClose={this.handleCloseSystemUpgradeForm}\n            systemUpgrades={groupUpgrades(sortUpgrades(systemUpgrades))}\n            latestLTS={latestLTS}\n            updateUseCase={updateUseCase}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport { groupBy, isEmpty, mapValues } from 'lodash';\nimport * as React from 'react';\nimport { getSystemUpgrades } from '../../../api/system';\nimport { withAppState } from '../../../components/hoc/withAppState';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport { Alert, AlertVariant } from '../../../components/ui/Alert';\nimport DismissableAlert from '../../../components/ui/DismissableAlert';\nimport SystemUpgradeButton from '../../../components/upgrade/SystemUpgradeButton';\nimport { sortUpgrades, UpdateUseCase } from '../../../components/upgrade/utils';\nimport { translate } from '../../../helpers/l10n';\nimport { hasGlobalPermission, isLoggedIn } from '../../../helpers/users';\nimport { Permissions } from '../../../types/permissions';\nimport { SystemUpgrade } from '../../../types/system';\nimport './UpdateNotification.css';\n\nconst MONTH_BEFOR_PREVIOUS_LTS_NOTIFICATION = 6;\n\ntype GroupedSystemUpdate = {\n  [x: string]: T.Dict<SystemUpgrade[]>;\n};\n\nconst MAP_VARIANT: T.Dict<AlertVariant> = {\n  [UpdateUseCase.NewMinorVersion]: 'info',\n  [UpdateUseCase.NewPatch]: 'warning',\n  [UpdateUseCase.PreLTS]: 'warning',\n  [UpdateUseCase.PreviousLTS]: 'error'\n};\n\ninterface Props {\n  dismissable: boolean;\n  appState: Pick<T.AppState, 'version'>;\n  currentUser: T.CurrentUser;\n}\n\ninterface State {\n  dismissKey: string;\n  useCase: UpdateUseCase;\n  latestLTS: string;\n  systemUpgrades: SystemUpgrade[];\n  canSeeNotification: boolean;\n}\n\nexport class UpdateNotification extends React.PureComponent<Props, State> {\n  mounted = false;\n  versionParser = /^(\\d+)\\.(\\d+)(\\.(\\d+))?/;\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      dismissKey: '',\n      systemUpgrades: [],\n      latestLTS: '',\n      canSeeNotification: false,\n      useCase: UpdateUseCase.NewMinorVersion\n    };\n    this.fetchSystemUpgradeInformation();\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      prevProps.currentUser !== this.props.currentUser ||\n      this.props.appState.version !== prevProps.appState.version\n    ) {\n      this.fetchSystemUpgradeInformation();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  isPreLTSUpdate(parsedVersion: number[], latestLTS: string) {\n    const [currentMajor, currentMinor] = parsedVersion;\n    const [ltsMajor, ltsMinor] = latestLTS.split('.').map(Number);\n    return currentMajor < ltsMajor || (currentMajor === ltsMajor && currentMinor < ltsMinor);\n  }\n\n  isPreviousLTSUpdate(\n    parsedVersion: number[],\n    latestLTS: string,\n    systemUpgrades: GroupedSystemUpdate\n  ) {\n    const [ltsMajor, ltsMinor] = latestLTS.split('.').map(Number);\n    let ltsOlderThan6Month = false;\n    const beforeLts = this.isPreLTSUpdate(parsedVersion, latestLTS);\n    if (beforeLts) {\n      const allLTS = sortUpgrades(systemUpgrades[ltsMajor][ltsMinor]);\n      const ltsReleaseDate = new Date(allLTS[allLTS.length - 1]?.releaseDate || '');\n      if (isNaN(ltsReleaseDate.getTime())) {\n        // We can not parse the LTS date.\n        // It is unlikly that this could happen but consider LTS to be old.\n        return true;\n      }\n      ltsOlderThan6Month =\n        ltsReleaseDate.setMonth(ltsReleaseDate.getMonth() + MONTH_BEFOR_PREVIOUS_LTS_NOTIFICATION) -\n          Date.now() <\n        0;\n    }\n    return ltsOlderThan6Month && beforeLts;\n  }\n\n  isMinorUpdate(parsedVersion: number[], systemUpgrades: GroupedSystemUpdate) {\n    const [currentMajor, currentMinor] = parsedVersion;\n    const allMinor = systemUpgrades[currentMajor];\n    return Object.keys(allMinor)\n      .map(Number)\n      .some(minor => minor > currentMinor);\n  }\n\n  isPatchUpdate(parsedVersion: number[], systemUpgrades: GroupedSystemUpdate) {\n    const [currentMajor, currentMinor, currentPatch] = parsedVersion;\n    const allMinor = systemUpgrades[currentMajor];\n    const allPatch = sortUpgrades(allMinor[currentMinor] || []);\n\n    if (!isEmpty(allPatch)) {\n      const [, , latestPatch] = allPatch[0].version.split('.').map(Number);\n      const effectiveCurrentPatch = isNaN(currentPatch) ? 0 : currentPatch;\n      const effectiveLatestPatch = isNaN(latestPatch) ? 0 : latestPatch;\n      return effectiveCurrentPatch < effectiveLatestPatch;\n    }\n    return false;\n  }\n\n  async fetchSystemUpgradeInformation() {\n    if (\n      !isLoggedIn(this.props.currentUser) ||\n      !hasGlobalPermission(this.props.currentUser, Permissions.Admin)\n    ) {\n      this.noPromptToShow();\n      return;\n    }\n\n    const regExpParsedVersion = this.versionParser.exec(this.props.appState.version);\n    if (regExpParsedVersion === null) {\n      this.noPromptToShow();\n      return;\n    }\n    regExpParsedVersion.shift();\n    const parsedVersion = regExpParsedVersion.map(Number).map(n => (isNaN(n) ? 0 : n));\n\n    const { upgrades, latestLTS } = await getSystemUpgrades();\n\n    if (isEmpty(upgrades)) {\n      // No new upgrades\n      this.noPromptToShow();\n      return;\n    }\n    const systemUpgrades = mapValues(\n      groupBy(upgrades, upgrade => {\n        const [major] = upgrade.version.split('.');\n        return major;\n      }),\n      upgrades =>\n        groupBy(upgrades, upgrade => {\n          const [, minor] = upgrade.version.split('.');\n          return minor;\n        })\n    );\n\n    let useCase = UpdateUseCase.NewMinorVersion;\n\n    if (this.isPreviousLTSUpdate(parsedVersion, latestLTS, systemUpgrades)) {\n      useCase = UpdateUseCase.PreviousLTS;\n    } else if (this.isPreLTSUpdate(parsedVersion, latestLTS)) {\n      useCase = UpdateUseCase.PreLTS;\n    } else if (this.isPatchUpdate(parsedVersion, systemUpgrades)) {\n      useCase = UpdateUseCase.NewPatch;\n    } else if (this.isMinorUpdate(parsedVersion, systemUpgrades)) {\n      useCase = UpdateUseCase.NewMinorVersion;\n    }\n\n    const latest = [...upgrades].sort(\n      (upgrade1, upgrade2) =>\n        new Date(upgrade2.releaseDate || '').getTime() -\n        new Date(upgrade1.releaseDate || '').getTime()\n    )[0];\n\n    const dismissKey = useCase + latest.version;\n\n    if (this.mounted) {\n      this.setState({\n        latestLTS,\n        useCase,\n        dismissKey,\n        systemUpgrades: upgrades,\n        canSeeNotification: true\n      });\n    }\n  }\n\n  noPromptToShow() {\n    if (this.mounted) {\n      this.setState({ canSeeNotification: false });\n    }\n  }\n\n  render() {\n    const { dismissable } = this.props;\n    const { latestLTS, systemUpgrades, canSeeNotification, useCase, dismissKey } = this.state;\n    if (!canSeeNotification) {\n      return null;\n    }\n    return dismissable ? (\n      <DismissableAlert\n        alertKey={dismissKey}\n        variant={MAP_VARIANT[useCase]}\n        className={`promote-update-notification it__upgrade-prompt-${useCase}`}>\n        {translate('admin_notification.update', useCase)}\n        <SystemUpgradeButton\n          systemUpgrades={systemUpgrades}\n          updateUseCase={useCase}\n          latestLTS={latestLTS}\n        />\n      </DismissableAlert>\n    ) : (\n      <Alert variant={MAP_VARIANT[useCase]} className={`it__upgrade-prompt-${useCase}`}>\n        {translate('admin_notification.update', useCase)}\n        <SystemUpgradeButton\n          systemUpgrades={systemUpgrades}\n          updateUseCase={useCase}\n          latestLTS={latestLTS}\n        />\n      </Alert>\n    );\n  }\n}\n\nexport default withCurrentUser(withAppState(UpdateNotification));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { each, memoize, omit, omitBy, pickBy, sortBy } from 'lodash';\nimport { formatMeasure } from '../../helpers/measures';\nimport { cleanQuery, parseAsArray, parseAsString, serializeStringArray } from '../../helpers/query';\n\nexport interface Query {\n  expandedCards: string[];\n}\n\nexport const LOGS_LEVELS = ['INFO', 'DEBUG', 'TRACE'];\nconst DEFAULT_LOG_LEVEL = LOGS_LEVELS[0];\n\nexport const APP_NODES_FIELD = 'Application Nodes';\nexport const ALMS_FIELD = 'ALMs';\nexport const BUNDLED_FIELD = 'Bundled';\nexport const CE_FIELD_PREFIX = 'Compute Engine';\nexport const CE_LOGGING_FIELD = 'Compute Engine Logging';\nexport const HA_FIELD = 'High Availability';\nexport const HEALTH_CAUSES_FIELD = 'Health Causes';\nexport const HEALTH_FIELD = 'Health';\nexport const LOGS_LEVEL_FIELD = 'Logs Level';\nexport const NAME_FIELD = 'Name';\nexport const NCLOC_FIELD = 'ncloc';\nexport const PLUGINS_FIELD = 'Plugins';\nexport const SEARCH_NODES_FIELD = 'Search Nodes';\nexport const SEARCH_PREFIX = 'Search';\nexport const SERVER_ID_FIELD = 'Server ID';\nexport const SETTINGS_FIELD = 'Settings';\nexport const STATE_FIELD = 'State';\nexport const STATS_FIELD = 'Statistics';\nexport const SYSTEM_FIELD = 'System';\nexport const VERSION_FIELD = 'Version';\nexport const WEB_LOGGING_FIELD = 'Web Logging';\nexport const WEB_PREFIX = 'Web';\n\nexport function ignoreInfoFields(sysInfoObject: T.SysInfoValueObject) {\n  return omit(sysInfoObject, [\n    ALMS_FIELD,\n    BUNDLED_FIELD,\n    HEALTH_FIELD,\n    HEALTH_CAUSES_FIELD,\n    NAME_FIELD,\n    PLUGINS_FIELD,\n    SETTINGS_FIELD,\n    SERVER_ID_FIELD,\n    VERSION_FIELD\n  ]);\n}\n\nexport function getHealth(sysInfoObject: T.SysInfoBase) {\n  return sysInfoObject[HEALTH_FIELD];\n}\n\nexport function getHealthCauses(sysInfoObject: T.SysInfoBase) {\n  return sysInfoObject[HEALTH_CAUSES_FIELD];\n}\n\nexport function getLogsLevel(sysInfoObject?: T.SysInfoValueObject): string {\n  if (sysInfoObject !== undefined) {\n    if (isLogInfoBlock(sysInfoObject)) {\n      return sysInfoObject[LOGS_LEVEL_FIELD];\n    } else if (hasLoggingInfo(sysInfoObject)) {\n      return sortBy(\n        [\n          getLogsLevel(sysInfoObject[WEB_LOGGING_FIELD]),\n          getLogsLevel(sysInfoObject[CE_LOGGING_FIELD])\n        ],\n        logLevel => LOGS_LEVELS.indexOf(logLevel)\n      )[1];\n    }\n  }\n  return DEFAULT_LOG_LEVEL;\n}\n\nexport function getAppNodes(sysInfoData: T.SysInfoCluster): T.SysInfoAppNode[] {\n  return sysInfoData[APP_NODES_FIELD];\n}\n\nexport function getSearchNodes(sysInfoData: T.SysInfoCluster): T.SysInfoSearchNode[] {\n  return sysInfoData[SEARCH_NODES_FIELD];\n}\n\nexport function isCluster(\n  sysInfoData: T.SysInfoCluster | T.SysInfoStandalone\n): sysInfoData is T.SysInfoCluster {\n  return sysInfoData[SYSTEM_FIELD] && sysInfoData[SYSTEM_FIELD][HA_FIELD] === true;\n}\n\nexport function isLogInfoBlock(\n  sysInfoObject: T.SysInfoValueObject\n): sysInfoObject is T.SysInfoLogging {\n  return sysInfoObject[LOGS_LEVEL_FIELD] !== undefined;\n}\n\nexport function hasLoggingInfo(\n  sysInfoObject: T.SysInfoValueObject\n): sysInfoObject is T.SysInfoStandalone | T.SysInfoAppNode {\n  return Boolean(sysInfoObject[WEB_LOGGING_FIELD] || sysInfoObject[CE_LOGGING_FIELD]);\n}\n\nexport function getServerId(sysInfoData: T.SysInfoCluster | T.SysInfoStandalone): string {\n  return sysInfoData && sysInfoData[SYSTEM_FIELD][SERVER_ID_FIELD];\n}\n\nexport function getVersion(sysInfoData: T.SysInfoStandalone): string | undefined {\n  return sysInfoData && sysInfoData[SYSTEM_FIELD][VERSION_FIELD];\n}\n\nexport function getClusterVersion(sysInfoData: T.SysInfoCluster): string | undefined {\n  const appNodes = getAppNodes(sysInfoData);\n  return appNodes.length > 0 ? appNodes[0][SYSTEM_FIELD][VERSION_FIELD] : undefined;\n}\n\nexport function getSystemLogsLevel(sysInfoData: T.SysInfoCluster | T.SysInfoStandalone): string {\n  if (isCluster(sysInfoData)) {\n    const logLevels = sortBy(getAppNodes(sysInfoData).map(getLogsLevel), logLevel =>\n      LOGS_LEVELS.indexOf(logLevel)\n    );\n    return logLevels.length > 0 ? logLevels[logLevels.length - 1] : DEFAULT_LOG_LEVEL;\n  } else {\n    return getLogsLevel(sysInfoData);\n  }\n}\n\nexport function getNodeName(nodeInfo: T.SysInfoAppNode | T.SysInfoSearchNode): string {\n  return nodeInfo[NAME_FIELD];\n}\n\nfunction getSystemData(sysInfoData: T.SysInfoBase): T.SysInfoValueObject {\n  const statData: T.SysInfoValueObject = {};\n  const statistics = sysInfoData[STATS_FIELD] as T.SysInfoValueObject; // TODO\n  if (statistics) {\n    statData['Lines of Code'] = formatMeasure(statistics[NCLOC_FIELD] as number, 'INT');\n  }\n  return { ...sysInfoData[SYSTEM_FIELD], ...statData };\n}\n\nexport function getClusterMainCardSection(sysInfoData: T.SysInfoCluster): T.SysInfoValueObject {\n  return {\n    ...getSystemData(sysInfoData),\n    ...omit(sysInfoData, [\n      APP_NODES_FIELD,\n      PLUGINS_FIELD,\n      SEARCH_NODES_FIELD,\n      SETTINGS_FIELD,\n      STATS_FIELD,\n      SYSTEM_FIELD\n    ])\n  };\n}\n\nexport function getStandaloneMainSections(sysInfoData: T.SysInfoBase): T.SysInfoValueObject {\n  return {\n    ...getSystemData(sysInfoData),\n    ...(omitBy(\n      sysInfoData,\n      (value, key) =>\n        value == null ||\n        [PLUGINS_FIELD, SETTINGS_FIELD, STATS_FIELD, SYSTEM_FIELD].includes(key) ||\n        key.startsWith(CE_FIELD_PREFIX) ||\n        key.startsWith(SEARCH_PREFIX) ||\n        key.startsWith(WEB_PREFIX)\n    ) as T.SysInfoValueObject)\n  };\n}\n\nexport function getStandaloneSecondarySections(sysInfoData: T.SysInfoBase): T.SysInfoSection {\n  return {\n    Web: pickBy(sysInfoData, (_, key) => key.startsWith(WEB_PREFIX)) as T.SysInfoValueObject,\n    'Compute Engine': pickBy(sysInfoData, (_, key) =>\n      key.startsWith(CE_FIELD_PREFIX)\n    ) as T.SysInfoValueObject,\n    'Search Engine': pickBy(sysInfoData, (_, key) =>\n      key.startsWith(SEARCH_PREFIX)\n    ) as T.SysInfoValueObject\n  };\n}\n\nexport function getFileNameSuffix(suffix?: string) {\n  const now = new Date();\n  return (\n    `${suffix ? suffix + '-' : ''}` +\n    `${now.getFullYear()}-${now.getMonth() + 1}-` +\n    `${now.getDate()}-${now.getHours()}-${now.getMinutes()}`\n  );\n}\n\nexport function groupSections(sysInfoData: T.SysInfoValueObject) {\n  const mainSection: T.SysInfoValueObject = {};\n  const sections: T.SysInfoSection = {};\n  each(sysInfoData, (item, key) => {\n    if (typeof item !== 'object' || item instanceof Array) {\n      mainSection[key] = item;\n    } else {\n      sections[key] = item;\n    }\n  });\n  return { mainSection, sections };\n}\n\nexport const parseQuery = memoize(\n  (urlQuery: T.RawQuery): Query => ({\n    expandedCards: parseAsArray(urlQuery.expand, parseAsString)\n  })\n);\n\nexport const serializeQuery = memoize(\n  (query: Query): T.RawQuery =>\n    cleanQuery({\n      expand: serializeStringArray(query.expandedCards)\n    })\n);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport './StatusIndicator.css';\n\nexport interface StatusIndicatorProps {\n  className?: string;\n  color?: string;\n  size?: string;\n}\n\nexport default function StatusIndicator({ className, color, size }: StatusIndicatorProps) {\n  return (\n    <>\n      {color ? translate('system.current_health', color) : undefined}\n      <i\n        className={classNames(\n          'spacer-left',\n          'status-indicator',\n          color,\n          {\n            'small-status-indicator': size === 'small',\n            'big-status-indicator': size === 'big'\n          },\n          className\n        )}\n      />\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Alert } from '../../../../components/ui/Alert';\n\ninterface Props {\n  className?: string;\n  health: T.HealthType;\n  healthCause: string;\n}\n\nexport default function HealthCauseItem({ className, health, healthCause }: Props) {\n  return (\n    <Alert\n      className={classNames('boxed-group-accordion-alert', className)}\n      display=\"inline\"\n      variant={health === 'RED' ? 'error' : 'warning'}>\n      {healthCause}\n    </Alert>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport StatusIndicator from '../../../../components/common/StatusIndicator';\nimport Tooltip from '../../../../components/controls/Tooltip';\nimport { translateWithParameters } from '../../../../helpers/l10n';\nimport HealthCauseItem from './HealthCauseItem';\n\ninterface Props {\n  biggerHealth?: boolean;\n  name?: string;\n  className?: string;\n  health: T.HealthType;\n  healthCauses?: string[];\n}\n\nexport default function HealthItem({ biggerHealth, className, name, health, healthCauses }: Props) {\n  const hasHealthCauses = healthCauses && healthCauses.length > 0 && health !== 'GREEN';\n  const statusIndicator = (\n    <StatusIndicator color={health.toLowerCase()} size={biggerHealth ? 'big' : undefined} />\n  );\n  return (\n    <div className={classNames('system-info-health-info', className)}>\n      {hasHealthCauses &&\n        healthCauses!.map((cause, idx) => (\n          <HealthCauseItem className=\"spacer-right\" health={health} healthCause={cause} key={idx} />\n        ))}\n      {name ? (\n        <Tooltip overlay={translateWithParameters('system.current_health_of_x', name)}>\n          <span>{statusIndicator}</span>\n        </Tooltip>\n      ) : (\n        statusIndicator\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { map } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\nimport { HEALTH_FIELD, STATE_FIELD } from '../../utils';\nimport HealthItem from './HealthItem';\n\nexport interface Props {\n  name: string;\n  value: T.SysInfoValue;\n}\n\nexport default function SysInfoItem({ name, value }: Props) {\n  if (name === HEALTH_FIELD || name === STATE_FIELD) {\n    return <HealthItem className=\"no-margin\" health={value as T.HealthType} />;\n  }\n  if (value instanceof Array) {\n    return <code>{JSON.stringify(value)}</code>;\n  }\n  switch (typeof value) {\n    case 'boolean':\n      return <>{translate(value ? 'yes' : 'no')}</>;\n    case 'object':\n      return (\n        <table className=\"data\">\n          <tbody>\n            {map(value, (v, n) => (\n              <tr key={n}>\n                <td className=\"thin nowrap\">{n}</td>\n                <td>\n                  <SysInfoItem name={n} value={v} />\n                </td>\n              </tr>\n            ))}\n          </tbody>\n        </table>\n      );\n    default:\n      return <code>{value}</code>;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { map } from 'lodash';\nimport * as React from 'react';\nimport SysInfoItem from './SysInfoItem';\n\ninterface Props {\n  name?: string;\n  items: T.SysInfoValueObject;\n}\n\nexport default function Section({ name, items }: Props) {\n  return (\n    <div className=\"system-info-section\">\n      {name && <h4 className=\"spacer-bottom\">{name}</h4>}\n      <table className=\"data zebra\" id={name}>\n        <tbody>\n          {map(items, (value, name) => {\n            return (\n              <tr key={name}>\n                <td className=\"thin\">\n                  <div className=\"system-info-section-item-name\">{name}</div>\n                </td>\n                <td style={{ wordBreak: 'break-all' }}>\n                  <SysInfoItem name={name} value={value} />\n                </td>\n              </tr>\n            );\n          })}\n        </tbody>\n      </table>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { map } from 'lodash';\nimport * as React from 'react';\nimport BoxedGroupAccordion from '../../../../components/controls/BoxedGroupAccordion';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport { getLogsLevel, groupSections, LOGS_LEVELS } from '../../utils';\nimport HealthItem from './HealthItem';\nimport Section from './Section';\n\ninterface Props {\n  biggerHealth?: boolean;\n  health?: T.HealthType;\n  healthCauses?: string[];\n  onClick: (toggledCard: string) => void;\n  open: boolean;\n  name: string;\n  sysInfoData: T.SysInfoValueObject;\n}\n\nexport default function HealthCard({\n  biggerHealth,\n  health,\n  healthCauses,\n  onClick,\n  open,\n  name,\n  sysInfoData\n}: Props) {\n  const { mainSection, sections } = groupSections(sysInfoData);\n  const showFields = open && mainSection && Object.keys(mainSection).length > 0;\n  const showSections = open && sections;\n  const logLevel = getLogsLevel(sysInfoData);\n  const showLogLevelWarning = logLevel && logLevel !== LOGS_LEVELS[0];\n  return (\n    <BoxedGroupAccordion\n      data={name}\n      onClick={onClick}\n      open={open}\n      renderHeader={() => (\n        <>\n          {showLogLevelWarning && (\n            <Alert\n              className=\"boxed-group-accordion-alert spacer-left\"\n              display=\"inline\"\n              variant=\"warning\">\n              {translate('system.log_level.warning.short')}\n            </Alert>\n          )}\n          {health && (\n            <HealthItem\n              biggerHealth={biggerHealth}\n              className=\"pull-right\"\n              health={health}\n              healthCauses={healthCauses}\n              name={name}\n            />\n          )}\n        </>\n      )}\n      title={name}>\n      {showFields && <Section items={mainSection} />}\n      {showSections &&\n        map(sections, (section, name) => <Section items={section} key={name} name={name} />)}\n    </BoxedGroupAccordion>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  getAppNodes,\n  getClusterMainCardSection,\n  getHealth,\n  getHealthCauses,\n  getNodeName,\n  getSearchNodes,\n  ignoreInfoFields\n} from '../utils';\nimport HealthCard from './info-items/HealthCard';\n\ninterface Props {\n  expandedCards: string[];\n  sysInfoData: T.SysInfoCluster;\n  toggleCard: (toggledCard: string) => void;\n}\n\nexport default function ClusterSysInfos({ expandedCards, sysInfoData, toggleCard }: Props) {\n  const mainCardName = 'System';\n  return (\n    <>\n      <HealthCard\n        biggerHealth={true}\n        health={getHealth(sysInfoData)}\n        healthCauses={getHealthCauses(sysInfoData)}\n        name={mainCardName}\n        onClick={toggleCard}\n        open={expandedCards.includes(mainCardName)}\n        sysInfoData={ignoreInfoFields(getClusterMainCardSection(sysInfoData))}\n      />\n      <li className=\"note system-info-health-title\">\n        {translate('system.application_nodes_title')}\n      </li>\n      {sortBy(getAppNodes(sysInfoData), getNodeName).map((node: T.SysInfoAppNode) => (\n        <HealthCard\n          health={getHealth(node)}\n          healthCauses={getHealthCauses(node)}\n          key={getNodeName(node)}\n          name={getNodeName(node)}\n          onClick={toggleCard}\n          open={expandedCards.includes(getNodeName(node))}\n          sysInfoData={ignoreInfoFields(node)}\n        />\n      ))}\n      <li className=\"note system-info-health-title\">{translate('system.search_nodes_title')}</li>\n      {sortBy(getSearchNodes(sysInfoData), getNodeName).map((node: T.SysInfoSearchNode) => (\n        <HealthCard\n          key={getNodeName(node)}\n          name={getNodeName(node)}\n          onClick={toggleCard}\n          open={expandedCards.includes(getNodeName(node))}\n          sysInfoData={ignoreInfoFields(node)}\n        />\n      ))}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { restart } from '../../api/system';\nimport { Button } from '../../components/controls/buttons';\nimport ConfirmButton from '../../components/controls/ConfirmButton';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  className?: string;\n  fetchSystemStatus: () => void;\n  systemStatus: T.SysStatus;\n}\n\nexport default class RestartButton extends React.PureComponent<Props> {\n  handleConfirm = () => {\n    return restart().then(this.props.fetchSystemStatus);\n  };\n\n  render() {\n    const { className, systemStatus } = this.props;\n    return (\n      <ConfirmButton\n        confirmButtonText={translate('restart')}\n        modalBody={\n          <>\n            <p className=\"spacer-top spacer-bottom\">\n              {translate('system.are_you_sure_to_restart')}\n            </p>\n            <p>{translate('system.forcing_shutdown_not_recommended')}</p>\n          </>\n        }\n        modalHeader={translate('system.restart_server')}\n        onConfirm={this.handleConfirm}>\n        {({ onClick }) => (\n          <Button\n            className={classNames('button-red', className)}\n            disabled={systemStatus !== 'UP'}\n            onClick={onClick}>\n            {systemStatus === 'RESTARTING'\n              ? translate('system.restart_in_progress')\n              : translate('system.restart_server')}\n          </Button>\n        )}\n      </ConfirmButton>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setLogLevel } from '../../../api/system';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\nimport { LOGS_LEVELS } from '../utils';\n\ninterface Props {\n  infoMsg: string;\n  logLevel: string;\n  onChange: (level: string) => void;\n  onClose: () => void;\n}\n\ninterface State {\n  newLevel: string;\n  updating: boolean;\n}\n\nexport default class ChangeLogLevelForm extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = { newLevel: props.logLevel, updating: false };\n  }\n\n  handleFormSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const { newLevel } = this.state;\n    if (!this.state.updating) {\n      this.setState({ updating: true });\n      setLogLevel(newLevel).then(\n        () => this.props.onChange(newLevel),\n        () => this.setState({ updating: false })\n      );\n    }\n  };\n\n  handleLevelChange = (event: React.ChangeEvent<HTMLInputElement>) =>\n    this.setState({ newLevel: event.currentTarget.value });\n\n  render() {\n    const { updating, newLevel } = this.state;\n    const header = translate('system.set_log_level');\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <form id=\"set-log-level-form\" onSubmit={this.handleFormSubmit}>\n          <div className=\"modal-head\">\n            <h2>{header}</h2>\n          </div>\n          <div className=\"modal-body\">\n            {LOGS_LEVELS.map(level => (\n              <p className=\"spacer-bottom\" key={level}>\n                <input\n                  checked={level === newLevel}\n                  className=\"spacer-right text-middle\"\n                  id={`loglevel-${level}`}\n                  name=\"system.log_levels\"\n                  onChange={this.handleLevelChange}\n                  type=\"radio\"\n                  value={level}\n                />\n                <label className=\"text-middle\" htmlFor={`loglevel-${level}`}>\n                  {level}\n                </label>\n              </p>\n            ))}\n            <Alert className=\"spacer-top\" variant=\"info\">\n              {this.props.infoMsg}\n            </Alert>\n            {newLevel !== 'INFO' && (\n              <Alert className=\"spacer-top\" variant=\"warning\">\n                {translate('system.log_level.warning')}\n              </Alert>\n            )}\n          </div>\n          <div className=\"modal-foot\">\n            {updating && <i className=\"spinner spacer-right\" />}\n            <SubmitButton disabled={updating} id=\"set-log-level-submit\">\n              {translate('save')}\n            </SubmitButton>\n            <ResetButtonLink id=\"set-log-level-cancel\" onClick={this.props.onClose}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </div>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport AdminContext from '../../../app/components/AdminContext';\nimport RestartButton from '../../../components/common/RestartButton';\nimport { Button, EditButton } from '../../../components/controls/buttons';\nimport Dropdown from '../../../components/controls/Dropdown';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { getFileNameSuffix } from '../utils';\nimport ChangeLogLevelForm from './ChangeLogLevelForm';\n\ninterface Props {\n  canDownloadLogs: boolean;\n  canRestart: boolean;\n  cluster: boolean;\n  logLevel: string;\n  onLogLevelChange: () => void;\n  serverId?: string;\n}\n\ninterface State {\n  logLevel: string;\n  openLogsLevelForm: boolean;\n}\n\nexport default class PageActions extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      logLevel: props.logLevel,\n      openLogsLevelForm: false\n    };\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    if (nextProps.logLevel !== this.state.logLevel) {\n      this.setState({ logLevel: nextProps.logLevel });\n    }\n  }\n\n  handleLogsLevelOpen = () => {\n    this.setState({ openLogsLevelForm: true });\n  };\n\n  handleLogsLevelChange = (logLevel: string) => {\n    this.setState({ logLevel });\n    this.props.onLogLevelChange();\n    this.handleLogsLevelClose();\n  };\n\n  handleLogsLevelClose = () => {\n    this.setState({ openLogsLevelForm: false });\n  };\n\n  removeElementFocus = (event: React.SyntheticEvent<HTMLElement>) => {\n    event.currentTarget.blur();\n  };\n\n  render() {\n    const infoUrl = getBaseUrl() + '/api/system/info';\n    const logsUrl = getBaseUrl() + '/api/system/logs';\n    return (\n      <div className=\"page-actions\">\n        <span>\n          <span className=\"text-middle\">\n            {translate('system.logs_level')}\n            {':'}\n            <strong className=\"little-spacer-left\">{this.state.logLevel}</strong>\n          </span>\n          <EditButton\n            className=\"spacer-left button-small\"\n            id=\"edit-logs-level-button\"\n            onClick={this.handleLogsLevelOpen}\n          />\n        </span>\n        {this.props.canDownloadLogs && (\n          <Dropdown\n            className=\"display-inline-block spacer-left\"\n            overlay={\n              <ul className=\"menu\">\n                <li>\n                  <a\n                    download=\"sonarqube_app.log\"\n                    href={logsUrl + '?process=app'}\n                    id=\"logs-link\"\n                    rel=\"noopener noreferrer\"\n                    target=\"_blank\">\n                    Main Process\n                  </a>\n                </li>\n                <li>\n                  <a\n                    download=\"sonarqube_ce.log\"\n                    href={logsUrl + '?process=ce'}\n                    id=\"ce-logs-link\"\n                    rel=\"noopener noreferrer\"\n                    target=\"_blank\">\n                    Compute Engine\n                  </a>\n                </li>\n                <li>\n                  <a\n                    download=\"sonarqube_es.log\"\n                    href={logsUrl + '?process=es'}\n                    id=\"es-logs-link\"\n                    rel=\"noopener noreferrer\"\n                    target=\"_blank\">\n                    Search Engine\n                  </a>\n                </li>\n                <li>\n                  <a\n                    download=\"sonarqube_web.log\"\n                    href={logsUrl + '?process=web'}\n                    id=\"web-logs-link\"\n                    rel=\"noopener noreferrer\"\n                    target=\"_blank\">\n                    Web Server\n                  </a>\n                </li>\n                <li>\n                  <a\n                    download=\"sonarqube_access.log\"\n                    href={logsUrl + '?process=access'}\n                    id=\"access-logs-link\"\n                    rel=\"noopener noreferrer\"\n                    target=\"_blank\">\n                    Access Logs\n                  </a>\n                </li>\n              </ul>\n            }>\n            <Button>\n              {translate('system.download_logs')}\n              <DropdownIcon className=\"little-spacer-left\" />\n            </Button>\n          </Dropdown>\n        )}\n        <a\n          className=\"button spacer-left\"\n          download={`sonarqube-support-info-${getFileNameSuffix(this.props.serverId)}.json`}\n          href={infoUrl}\n          id=\"download-link\"\n          onClick={this.removeElementFocus}\n          rel=\"noopener noreferrer\"\n          target=\"_blank\">\n          {translate('system.download_system_info')}\n        </a>\n        {this.props.canRestart && (\n          <AdminContext.Consumer>\n            {({ fetchSystemStatus, systemStatus }) => (\n              <RestartButton\n                className=\"spacer-left\"\n                fetchSystemStatus={fetchSystemStatus}\n                systemStatus={systemStatus}\n              />\n            )}\n          </AdminContext.Consumer>\n        )}\n        {this.state.openLogsLevelForm && (\n          <ChangeLogLevelForm\n            infoMsg={translate(\n              this.props.cluster ? 'system.cluster_log_level.info' : 'system.log_level.info'\n            )}\n            logLevel={this.state.logLevel}\n            onChange={this.handleLogsLevelChange}\n            onClose={this.handleLogsLevelClose}\n          />\n        )}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { ClipboardButton } from '../../../components/controls/clipboard';\nimport { Alert } from '../../../components/ui/Alert';\nimport { toShortNotSoISOString } from '../../../helpers/dates';\nimport { translate } from '../../../helpers/l10n';\nimport { getAppState, Store } from '../../../store/rootReducer';\nimport PageActions from './PageActions';\n\nexport interface Props {\n  isCluster: boolean;\n  loading: boolean;\n  logLevel: string;\n  onLogLevelChange: () => void;\n  productionDatabase: boolean;\n  serverId?: string;\n  showActions: boolean;\n  version?: string;\n}\n\nexport function PageHeader(props: Props) {\n  const {\n    isCluster,\n    loading,\n    logLevel,\n    serverId,\n    showActions,\n    version,\n    productionDatabase\n  } = props;\n  return (\n    <header className=\"page-header\">\n      <h1 className=\"page-title\">{translate('system_info.page')}</h1>\n      {showActions && (\n        <PageActions\n          canDownloadLogs={!isCluster}\n          canRestart={!isCluster}\n          cluster={isCluster}\n          logLevel={logLevel}\n          onLogLevelChange={props.onLogLevelChange}\n          serverId={serverId}\n        />\n      )}\n      {loading && (\n        <div className=\"page-actions\">\n          <i className=\"spinner\" />\n        </div>\n      )}\n      {serverId && version && (\n        <div className=\"system-info-copy-paste-id-info boxed-group \">\n          {!productionDatabase && (\n            <Alert className=\"width-100\" variant=\"warning\">\n              {translate('system.not_production_database_warning')}\n            </Alert>\n          )}\n          <div className=\"display-flex-center\">\n            <div className=\"flex-1\">\n              <table className=\"width-100\">\n                <tbody>\n                  <tr>\n                    <th>\n                      <strong>{translate('system.server_id')}</strong>\n                    </th>\n                    <td>\n                      <code>{serverId}</code>\n                    </td>\n                  </tr>\n                  <tr>\n                    <th>\n                      <strong>{translate('system.version')}</strong>\n                    </th>\n                    <td>{version}</td>\n                  </tr>\n                </tbody>\n              </table>\n            </div>\n            <ClipboardButton\n              className=\"flex-0\"\n              copyValue={`SonarQube ID information\nServer ID: ${serverId}\nVersion: ${version}\nDate: ${toShortNotSoISOString(Date.now())}\n`}>\n              {translate('system.copy_id_info')}\n            </ClipboardButton>\n          </div>\n        </div>\n      )}\n    </header>\n  );\n}\n\nconst mapStateToProps = (store: Store) => ({\n  productionDatabase: getAppState(store).productionDatabase\n});\n\nexport default connect(mapStateToProps)(PageHeader);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { map } from 'lodash';\nimport * as React from 'react';\nimport {\n  getHealth,\n  getHealthCauses,\n  getStandaloneMainSections,\n  getStandaloneSecondarySections,\n  ignoreInfoFields\n} from '../utils';\nimport HealthCard from './info-items/HealthCard';\n\ninterface Props {\n  expandedCards: string[];\n  sysInfoData: T.SysInfoStandalone;\n  toggleCard: (toggledCard: string) => void;\n}\n\nexport default function StandAloneSysInfos({ expandedCards, sysInfoData, toggleCard }: Props) {\n  const mainCardName = 'System';\n  return (\n    <>\n      <HealthCard\n        biggerHealth={true}\n        health={getHealth(sysInfoData)}\n        healthCauses={getHealthCauses(sysInfoData)}\n        name={mainCardName}\n        onClick={toggleCard}\n        open={expandedCards.includes(mainCardName)}\n        sysInfoData={ignoreInfoFields(getStandaloneMainSections(sysInfoData))}\n      />\n      {map(getStandaloneSecondarySections(sysInfoData), (section, name) => (\n        <HealthCard\n          key={name}\n          name={name}\n          onClick={toggleCard}\n          open={expandedCards.includes(name)}\n          sysInfoData={ignoreInfoFields(section)}\n        />\n      ))}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { withRouter, WithRouterProps } from 'react-router';\nimport { getSystemInfo } from '../../../api/system';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport UpdateNotification from '../../../app/components/update-notification/UpdateNotification';\nimport { translate } from '../../../helpers/l10n';\nimport '../styles.css';\nimport {\n  getClusterVersion,\n  getServerId,\n  getSystemLogsLevel,\n  getVersion,\n  isCluster,\n  parseQuery,\n  Query,\n  serializeQuery\n} from '../utils';\nimport ClusterSysInfos from './ClusterSysInfos';\nimport PageHeader from './PageHeader';\nimport StandaloneSysInfos from './StandaloneSysInfos';\n\ntype Props = WithRouterProps;\n\ninterface State {\n  loading: boolean;\n  sysInfoData?: T.SysInfoCluster | T.SysInfoStandalone;\n}\n\nexport class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchSysInfo();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchSysInfo = () => {\n    this.setState({ loading: true });\n    getSystemInfo().then(\n      sysInfoData => {\n        if (this.mounted) {\n          this.setState({ loading: false, sysInfoData });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  toggleSysInfoCards = (toggledCard: string) => {\n    const query = parseQuery(this.props.location.query);\n    let expandedCards;\n    if (query.expandedCards.includes(toggledCard)) {\n      expandedCards = query.expandedCards.filter(card => card !== toggledCard);\n    } else {\n      expandedCards = query.expandedCards.concat(toggledCard);\n    }\n    this.updateQuery({ expandedCards });\n  };\n\n  updateQuery = (newQuery: Query) => {\n    const query = serializeQuery({ ...parseQuery(this.props.location.query), ...newQuery });\n    this.props.router.replace({ pathname: this.props.location.pathname, query });\n  };\n\n  renderSysInfo() {\n    const { sysInfoData } = this.state;\n    if (!sysInfoData) {\n      return null;\n    }\n\n    const query = parseQuery(this.props.location.query);\n    if (isCluster(sysInfoData)) {\n      return (\n        <ClusterSysInfos\n          expandedCards={query.expandedCards}\n          sysInfoData={sysInfoData}\n          toggleCard={this.toggleSysInfoCards}\n        />\n      );\n    }\n    return (\n      <StandaloneSysInfos\n        expandedCards={query.expandedCards}\n        sysInfoData={sysInfoData}\n        toggleCard={this.toggleSysInfoCards}\n      />\n    );\n  }\n\n  render() {\n    const { loading, sysInfoData } = this.state;\n    return (\n      <div className=\"page page-limited\">\n        <Suggestions suggestions=\"system_info\" />\n        <Helmet defer={false} title={translate('system_info.page')} />\n        <div className=\"page-notifs\">\n          <UpdateNotification dismissable={false} />\n        </div>\n        {sysInfoData && (\n          <PageHeader\n            isCluster={isCluster(sysInfoData)}\n            loading={loading}\n            logLevel={getSystemLogsLevel(sysInfoData)}\n            onLogLevelChange={this.fetchSysInfo}\n            serverId={getServerId(sysInfoData)}\n            showActions={sysInfoData !== undefined}\n            version={\n              isCluster(sysInfoData) ? getClusterVersion(sysInfoData) : getVersion(sysInfoData)\n            }\n          />\n        )}\n        {this.renderSysInfo()}\n      </div>\n    );\n  }\n}\n\nexport default withRouter(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/App')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport TutorialSelection from '../../../components/tutorials/TutorialSelection';\nimport handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { ProjectAlmBindingResponse } from '../../../types/alm-settings';\n\nexport interface TutorialsAppProps {\n  component: T.Component;\n  currentUser: T.CurrentUser;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nexport function TutorialsApp(props: TutorialsAppProps) {\n  const { component, currentUser, projectBinding } = props;\n\n  if (!isLoggedIn(currentUser)) {\n    handleRequiredAuthentication();\n    return null;\n  }\n\n  return (\n    <div className=\"page page-limited\">\n      <TutorialSelection\n        component={component}\n        currentUser={currentUser}\n        projectBinding={projectBinding}\n      />\n    </div>\n  );\n}\n\nexport default withCurrentUser(TutorialsApp);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/TutorialsApp')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DeleteButton } from '../../../components/controls/buttons';\n\nexport interface Props {\n  idx: number;\n  scmAccount: string;\n  onChange: (idx: number, scmAccount: string) => void;\n  onRemove: (idx: number) => void;\n}\n\nexport default class UserScmAccountInput extends React.PureComponent<Props> {\n  handleChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.props.onChange(this.props.idx, event.currentTarget.value);\n\n  handleRemove = () => this.props.onRemove(this.props.idx);\n\n  render() {\n    return (\n      <div className=\"js-scm-account display-flex-row spacer-bottom\">\n        <input\n          maxLength={255}\n          onChange={this.handleChange}\n          type=\"text\"\n          value={this.props.scmAccount}\n        />\n        <DeleteButton onClick={this.handleRemove} />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { uniq } from 'lodash';\nimport * as React from 'react';\nimport { createUser, updateUser } from '../../../api/users';\nimport throwGlobalError from '../../../app/utils/throwGlobalError';\nimport { Button, ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport { Alert } from '../../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { parseError } from '../../../helpers/request';\nimport UserScmAccountInput from './UserScmAccountInput';\n\nexport interface Props {\n  onClose: () => void;\n  onUpdateUsers: () => void;\n  user?: T.User;\n}\n\ninterface State {\n  email: string;\n  error?: string;\n  login: string;\n  name: string;\n  password: string;\n  scmAccounts: string[];\n}\n\nexport default class UserForm extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    const { user } = props;\n    if (user) {\n      this.state = {\n        email: user.email || '',\n        login: user.login,\n        name: user.name || '',\n        password: '',\n        scmAccounts: user.scmAccounts || []\n      };\n    } else {\n      this.state = {\n        email: '',\n        login: '',\n        name: '',\n        password: '',\n        scmAccounts: []\n      };\n    }\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleError = (response: Response) => {\n    if (!this.mounted || ![400, 500].includes(response.status)) {\n      return throwGlobalError(response);\n    } else {\n      return parseError(response).then(\n        errorMsg => this.setState({ error: errorMsg }),\n        throwGlobalError\n      );\n    }\n  };\n\n  handleEmailChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ email: event.currentTarget.value });\n\n  handleLoginChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ login: event.currentTarget.value });\n\n  handleNameChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ name: event.currentTarget.value });\n\n  handlePasswordChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ password: event.currentTarget.value });\n\n  handleCreateUser = () => {\n    return createUser({\n      email: this.state.email || undefined,\n      login: this.state.login,\n      name: this.state.name,\n      password: this.state.password,\n      scmAccount: uniq(this.state.scmAccounts)\n    }).then(() => {\n      this.props.onUpdateUsers();\n      this.props.onClose();\n    }, this.handleError);\n  };\n\n  handleUpdateUser = () => {\n    const { user } = this.props;\n    return updateUser({\n      email: user!.local ? this.state.email : undefined,\n      login: this.state.login,\n      name: user!.local ? this.state.name : undefined,\n      scmAccount: uniq(this.state.scmAccounts)\n    }).then(() => {\n      this.props.onUpdateUsers();\n      this.props.onClose();\n    }, this.handleError);\n  };\n\n  handleAddScmAccount = () => {\n    this.setState(({ scmAccounts }) => ({ scmAccounts: scmAccounts.concat('') }));\n  };\n\n  handleUpdateScmAccount = (idx: number, scmAccount: string) =>\n    this.setState(({ scmAccounts: oldScmAccounts }) => {\n      const scmAccounts = oldScmAccounts.slice();\n      scmAccounts[idx] = scmAccount;\n      return { scmAccounts };\n    });\n\n  handleRemoveScmAccount = (idx: number) =>\n    this.setState(({ scmAccounts }) => ({\n      scmAccounts: scmAccounts.slice(0, idx).concat(scmAccounts.slice(idx + 1))\n    }));\n\n  render() {\n    const { user } = this.props;\n    const { error } = this.state;\n\n    const header = user ? translate('users.update_user') : translate('users.create_user');\n    return (\n      <SimpleModal\n        header={header}\n        onClose={this.props.onClose}\n        onSubmit={user ? this.handleUpdateUser : this.handleCreateUser}\n        size=\"small\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form autoComplete=\"off\" id=\"user-form\" onSubmit={onFormSubmit}>\n            <header className=\"modal-head\">\n              <h2>{header}</h2>\n            </header>\n\n            <div className=\"modal-body modal-container\">\n              {error && <Alert variant=\"error\">{error}</Alert>}\n\n              {!error && user && !user.local && (\n                <Alert variant=\"warning\">{translate('users.cannot_update_delegated_user')}</Alert>\n              )}\n\n              <MandatoryFieldsExplanation className=\"modal-field\" />\n\n              {!user && (\n                <div className=\"modal-field\">\n                  <label htmlFor=\"create-user-login\">\n                    {translate('login')}\n                    <MandatoryFieldMarker />\n                  </label>\n                  {/* keep this fake field to hack browser autofill */}\n                  <input className=\"hidden\" name=\"login-fake\" type=\"text\" />\n                  <input\n                    autoFocus={true}\n                    id=\"create-user-login\"\n                    maxLength={255}\n                    minLength={3}\n                    name=\"login\"\n                    onChange={this.handleLoginChange}\n                    required={true}\n                    type=\"text\"\n                    value={this.state.login}\n                  />\n                  <p className=\"note\">{translateWithParameters('users.minimum_x_characters', 3)}</p>\n                </div>\n              )}\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-user-name\">\n                  {translate('name')}\n                  <MandatoryFieldMarker />\n                </label>\n                {/* keep this fake field to hack browser autofill */}\n                <input className=\"hidden\" name=\"name-fake\" type=\"text\" />\n                <input\n                  autoFocus={!!user}\n                  disabled={user && !user.local}\n                  id=\"create-user-name\"\n                  maxLength={200}\n                  name=\"name\"\n                  onChange={this.handleNameChange}\n                  required={true}\n                  type=\"text\"\n                  value={this.state.name}\n                />\n              </div>\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-user-email\">{translate('users.email')}</label>\n                {/* keep this fake field to hack browser autofill */}\n                <input className=\"hidden\" name=\"email-fake\" type=\"email\" />\n                <input\n                  disabled={user && !user.local}\n                  id=\"create-user-email\"\n                  maxLength={100}\n                  name=\"email\"\n                  onChange={this.handleEmailChange}\n                  type=\"email\"\n                  value={this.state.email}\n                />\n              </div>\n              {!user && (\n                <div className=\"modal-field\">\n                  <label htmlFor=\"create-user-password\">\n                    {translate('password')}\n                    <MandatoryFieldMarker />\n                  </label>\n                  {/* keep this fake field to hack browser autofill */}\n                  <input className=\"hidden\" name=\"password-fake\" type=\"password\" />\n                  <input\n                    id=\"create-user-password\"\n                    name=\"password\"\n                    onChange={this.handlePasswordChange}\n                    required={true}\n                    type=\"password\"\n                    value={this.state.password}\n                  />\n                </div>\n              )}\n              <div className=\"modal-field\">\n                <label>{translate('my_profile.scm_accounts')}</label>\n                {this.state.scmAccounts.map((scm, idx) => (\n                  <UserScmAccountInput\n                    idx={idx}\n                    key={idx}\n                    onChange={this.handleUpdateScmAccount}\n                    onRemove={this.handleRemoveScmAccount}\n                    scmAccount={scm}\n                  />\n                ))}\n                <div className=\"spacer-bottom\">\n                  <Button className=\"js-scm-account-add\" onClick={this.handleAddScmAccount}>\n                    {translate('add_verb')}\n                  </Button>\n                </div>\n                <p className=\"note\">{translate('user.login_or_email_used_as_scm_account')}</p>\n              </div>\n            </div>\n\n            <footer className=\"modal-foot\">\n              {submitting && <i className=\"spinner spacer-right\" />}\n              <SubmitButton disabled={submitting}>\n                {user ? translate('update_verb') : translate('create')}\n              </SubmitButton>\n              <ResetButtonLink onClick={onCloseClick}>{translate('cancel')}</ResetButtonLink>\n            </footer>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate } from '../../helpers/l10n';\nimport UserForm from './components/UserForm';\n\ninterface Props {\n  loading: boolean;\n  onUpdateUsers: () => void;\n}\n\ninterface State {\n  openUserForm: boolean;\n}\n\nexport default class Header extends React.PureComponent<Props, State> {\n  state: State = { openUserForm: false };\n\n  handleOpenUserForm = () => {\n    this.setState({ openUserForm: true });\n  };\n\n  handleCloseUserForm = () => {\n    this.setState({ openUserForm: false });\n  };\n\n  render() {\n    return (\n      <header className=\"page-header\" id=\"users-header\">\n        <h1 className=\"page-title\">{translate('users.page')}</h1>\n        <DeferredSpinner loading={this.props.loading} />\n\n        <div className=\"page-actions\">\n          <Button id=\"users-create\" onClick={this.handleOpenUserForm}>\n            {translate('users.create_user')}\n          </Button>\n        </div>\n\n        <p className=\"page-description\">{translate('users.page.description')}</p>\n        {this.state.openUserForm && (\n          <UserForm onClose={this.handleCloseUserForm} onUpdateUsers={this.props.onUpdateUsers} />\n        )}\n      </header>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport SearchBox from '../../components/controls/SearchBox';\nimport { translate } from '../../helpers/l10n';\nimport { Query } from './utils';\n\ninterface Props {\n  query: Query;\n  updateQuery: (newQuery: Partial<Query>) => void;\n}\n\nexport default class Search extends React.PureComponent<Props> {\n  handleSearch = (search: string) => {\n    this.props.updateQuery({ search });\n  };\n\n  render() {\n    const { query } = this.props;\n\n    return (\n      <div className=\"panel panel-vertical bordered-bottom spacer-bottom\" id=\"users-search\">\n        <SearchBox\n          minLength={2}\n          onChange={this.handleSearch}\n          placeholder={translate('search.search_by_login_or_name')}\n          value={query.search}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ResetButtonLink } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { translate } from '../../../helpers/l10n';\nimport TokensForm from './TokensForm';\n\ninterface Props {\n  user: T.User;\n  onClose: () => void;\n  updateTokensCount: (login: string, tokensCount: number) => void;\n}\n\nexport default function TokensFormModal(props: Props) {\n  return (\n    <Modal contentLabel={translate('users.tokens')} onRequestClose={props.onClose}>\n      <header className=\"modal-head\">\n        <h2>\n          <FormattedMessage\n            defaultMessage={translate('users.user_X_tokens')}\n            id=\"users.user_X_tokens\"\n            values={{ user: <em>{props.user.name}</em> }}\n          />\n        </h2>\n      </header>\n      <div className=\"modal-body modal-container\">\n        <TokensForm\n          deleteConfirmation=\"inline\"\n          login={props.user.login}\n          updateTokensCount={props.updateTokensCount}\n        />\n      </div>\n      <footer className=\"modal-foot\">\n        <ResetButtonLink onClick={props.onClose}>{translate('Done')}</ResetButtonLink>\n      </footer>\n    </Modal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { deactivateUser } from '../../../api/users';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\nexport interface Props {\n  onClose: () => void;\n  onUpdateUsers: () => void;\n  user: T.UserActive;\n}\n\ninterface State {\n  submitting: boolean;\n}\n\nexport default class DeactivateForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { submitting: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleDeactivate = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    this.setState({ submitting: true });\n    deactivateUser({ login: this.props.user.login }).then(\n      () => {\n        this.props.onUpdateUsers();\n        this.props.onClose();\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ submitting: false });\n        }\n      }\n    );\n  };\n\n  render() {\n    const { user } = this.props;\n    const { submitting } = this.state;\n\n    const header = translate('users.deactivate_user');\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <form autoComplete=\"off\" id=\"deactivate-user-form\" onSubmit={this.handleDeactivate}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n          </header>\n          <div className=\"modal-body\">\n            {translateWithParameters('users.deactivate_user.confirmation', user.name, user.login)}\n          </div>\n          <footer className=\"modal-foot\">\n            {submitting && <i className=\"spinner spacer-right\" />}\n            <SubmitButton className=\"js-confirm button-red\" disabled={submitting}>\n              {translate('users.deactivate')}\n            </SubmitButton>\n            <ResetButtonLink className=\"js-modal-close\" onClick={this.props.onClose}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { changePassword } from '../../../api/users';\nimport addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage';\nimport throwGlobalError from '../../../app/utils/throwGlobalError';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { Alert } from '../../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\nimport { parseError } from '../../../helpers/request';\n\ninterface Props {\n  isCurrentUser: boolean;\n  onClose: () => void;\n  user: T.User;\n}\n\ninterface State {\n  confirmPassword: string;\n  error?: string;\n  newPassword: string;\n  oldPassword: string;\n  submitting: boolean;\n}\n\nexport default class PasswordForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    confirmPassword: '',\n    newPassword: '',\n    oldPassword: '',\n    submitting: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleError = (response: Response) => {\n    if (!this.mounted || response.status !== 400) {\n      return throwGlobalError(response);\n    } else {\n      return parseError(response).then(\n        errorMsg => this.setState({ error: errorMsg, submitting: false }),\n        throwGlobalError\n      );\n    }\n  };\n\n  handleConfirmPasswordChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ confirmPassword: event.currentTarget.value });\n\n  handleNewPasswordChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ newPassword: event.currentTarget.value });\n\n  handleOldPasswordChange = (event: React.SyntheticEvent<HTMLInputElement>) =>\n    this.setState({ oldPassword: event.currentTarget.value });\n\n  handleChangePassword = (event: React.SyntheticEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    if (\n      this.state.newPassword.length > 0 &&\n      this.state.newPassword === this.state.confirmPassword\n    ) {\n      this.setState({ submitting: true });\n      changePassword({\n        login: this.props.user.login,\n        password: this.state.newPassword,\n        previousPassword: this.state.oldPassword\n      }).then(() => {\n        addGlobalSuccessMessage(translate('my_profile.password.changed'));\n        this.props.onClose();\n      }, this.handleError);\n    }\n  };\n\n  render() {\n    const { error, submitting, newPassword, confirmPassword } = this.state;\n\n    const header = translate('my_profile.password.title');\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose} size=\"small\">\n        <form autoComplete=\"off\" id=\"user-password-form\" onSubmit={this.handleChangePassword}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n          </header>\n          <div className=\"modal-body\">\n            {error && <Alert variant=\"error\">{error}</Alert>}\n\n            <MandatoryFieldsExplanation className=\"modal-field\" />\n\n            {this.props.isCurrentUser && (\n              <div className=\"modal-field\">\n                <label htmlFor=\"old-user-password\">\n                  {translate('my_profile.password.old')}\n                  <MandatoryFieldMarker />\n                </label>\n                {/* keep this fake field to hack browser autofill */}\n                <input className=\"hidden\" name=\"old-password-fake\" type=\"password\" />\n                <input\n                  id=\"old-user-password\"\n                  name=\"old-password\"\n                  onChange={this.handleOldPasswordChange}\n                  required={true}\n                  type=\"password\"\n                  value={this.state.oldPassword}\n                />\n              </div>\n            )}\n            <div className=\"modal-field\">\n              <label htmlFor=\"user-password\">\n                {translate('my_profile.password.new')}\n                <MandatoryFieldMarker />\n              </label>\n              {/* keep this fake field to hack browser autofill */}\n              <input className=\"hidden\" name=\"password-fake\" type=\"password\" />\n              <input\n                id=\"user-password\"\n                name=\"password\"\n                onChange={this.handleNewPasswordChange}\n                required={true}\n                type=\"password\"\n                value={this.state.newPassword}\n              />\n            </div>\n            <div className=\"modal-field\">\n              <label htmlFor=\"confirm-user-password\">\n                {translate('my_profile.password.confirm')}\n                <MandatoryFieldMarker />\n              </label>\n              {/* keep this fake field to hack browser autofill */}\n              <input className=\"hidden\" name=\"confirm-password-fake\" type=\"password\" />\n              <input\n                id=\"confirm-user-password\"\n                name=\"confirm-password\"\n                onChange={this.handleConfirmPasswordChange}\n                required={true}\n                type=\"password\"\n                value={this.state.confirmPassword}\n              />\n            </div>\n          </div>\n          <footer className=\"modal-foot\">\n            {submitting && <i className=\"spinner spacer-right\" />}\n            <SubmitButton disabled={submitting || !newPassword || newPassword !== confirmPassword}>\n              {translate('change_verb')}\n            </SubmitButton>\n            <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>\n          </footer>\n        </form>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ActionsDropdown, {\n  ActionsDropdownDivider,\n  ActionsDropdownItem\n} from '../../../components/controls/ActionsDropdown';\nimport { translate } from '../../../helpers/l10n';\nimport { isUserActive } from '../../../helpers/users';\nimport DeactivateForm from './DeactivateForm';\nimport PasswordForm from './PasswordForm';\nimport UserForm from './UserForm';\n\ninterface Props {\n  isCurrentUser: boolean;\n  onUpdateUsers: () => void;\n  user: T.User;\n}\n\ninterface State {\n  openForm?: string;\n}\n\nexport default class UserActions extends React.PureComponent<Props, State> {\n  state: State = {};\n\n  handleOpenDeactivateForm = () => {\n    this.setState({ openForm: 'deactivate' });\n  };\n\n  handleOpenPasswordForm = () => {\n    this.setState({ openForm: 'password' });\n  };\n\n  handleOpenUpdateForm = () => {\n    this.setState({ openForm: 'update' });\n  };\n\n  handleCloseForm = () => {\n    this.setState({ openForm: undefined });\n  };\n\n  renderActions = () => {\n    const { user } = this.props;\n    return (\n      <ActionsDropdown>\n        <ActionsDropdownItem className=\"js-user-update\" onClick={this.handleOpenUpdateForm}>\n          {translate('update_details')}\n        </ActionsDropdownItem>\n        {user.local && (\n          <ActionsDropdownItem\n            className=\"js-user-change-password\"\n            onClick={this.handleOpenPasswordForm}>\n            {translate('my_profile.password.title')}\n          </ActionsDropdownItem>\n        )}\n        <ActionsDropdownDivider />\n        {isUserActive(user) && (\n          <ActionsDropdownItem\n            className=\"js-user-deactivate\"\n            destructive={true}\n            onClick={this.handleOpenDeactivateForm}>\n            {translate('users.deactivate')}\n          </ActionsDropdownItem>\n        )}\n      </ActionsDropdown>\n    );\n  };\n\n  render() {\n    const { openForm } = this.state;\n    const { isCurrentUser, onUpdateUsers, user } = this.props;\n\n    return (\n      <>\n        {this.renderActions()}\n        {openForm === 'deactivate' && isUserActive(user) && (\n          <DeactivateForm\n            onClose={this.handleCloseForm}\n            onUpdateUsers={onUpdateUsers}\n            user={user}\n          />\n        )}\n        {openForm === 'password' && (\n          <PasswordForm isCurrentUser={isCurrentUser} onClose={this.handleCloseForm} user={user} />\n        )}\n        {openForm === 'update' && (\n          <UserForm onClose={this.handleCloseForm} onUpdateUsers={onUpdateUsers} user={user} />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { find, without } from 'lodash';\nimport * as React from 'react';\nimport { getUserGroups, UserGroup } from '../../../api/users';\nimport { addUserToGroup, removeUserFromGroup } from '../../../api/user_groups';\nimport Modal from '../../../components/controls/Modal';\nimport SelectList, {\n  SelectListFilter,\n  SelectListSearchParams\n} from '../../../components/controls/SelectList';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onClose: () => void;\n  onUpdateUsers: () => void;\n  user: T.User;\n}\n\ninterface State {\n  needToReload: boolean;\n  lastSearchParams?: SelectListSearchParams;\n  groups: UserGroup[];\n  groupsTotalCount?: number;\n  selectedGroups: string[];\n}\n\nexport default class GroupsForm extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      needToReload: false,\n      groups: [],\n      selectedGroups: []\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchUsers = (searchParams: SelectListSearchParams) =>\n    getUserGroups({\n      login: this.props.user.login,\n      p: searchParams.page,\n      ps: searchParams.pageSize,\n      q: searchParams.query !== '' ? searchParams.query : undefined,\n      selected: searchParams.filter\n    }).then(data => {\n      if (this.mounted) {\n        this.setState(prevState => {\n          const more = searchParams.page != null && searchParams.page > 1;\n\n          const groups = more ? [...prevState.groups, ...data.groups] : data.groups;\n          const newSeletedGroups = data.groups.filter(gp => gp.selected).map(gp => gp.name);\n          const selectedGroups = more\n            ? [...prevState.selectedGroups, ...newSeletedGroups]\n            : newSeletedGroups;\n\n          return {\n            lastSearchParams: searchParams,\n            needToReload: false,\n            groups,\n            groupsTotalCount: data.paging.total,\n            selectedGroups\n          };\n        });\n      }\n    });\n\n  handleSelect = (name: string) =>\n    addUserToGroup({\n      name,\n      login: this.props.user.login\n    }).then(() => {\n      if (this.mounted) {\n        this.setState((state: State) => ({\n          needToReload: true,\n          selectedGroups: [...state.selectedGroups, name]\n        }));\n      }\n    });\n\n  handleUnselect = (name: string) =>\n    removeUserFromGroup({\n      name,\n      login: this.props.user.login\n    }).then(() => {\n      if (this.mounted) {\n        this.setState((state: State) => ({\n          needToReload: true,\n          selectedGroups: without(state.selectedGroups, name)\n        }));\n      }\n    });\n\n  handleCloseClick = (event: React.SyntheticEvent<HTMLElement>) => {\n    event.preventDefault();\n    this.handleClose();\n  };\n\n  handleClose = () => {\n    this.props.onUpdateUsers();\n    this.props.onClose();\n  };\n\n  renderElement = (name: string): React.ReactNode => {\n    const group = find(this.state.groups, { name });\n    return (\n      <div className=\"select-list-list-item\">\n        {group === undefined ? (\n          name\n        ) : (\n          <>\n            {group.name}\n            <br />\n            <span className=\"note\">{group.description}</span>\n          </>\n        )}\n      </div>\n    );\n  };\n\n  render() {\n    const header = translate('users.update_groups');\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.handleClose}>\n        <div className=\"modal-head\">\n          <h2>{header}</h2>\n        </div>\n\n        <div className=\"modal-body modal-container\">\n          <SelectList\n            elements={this.state.groups.map(group => group.name)}\n            elementsTotalCount={this.state.groupsTotalCount}\n            needToReload={\n              this.state.needToReload &&\n              this.state.lastSearchParams &&\n              this.state.lastSearchParams.filter !== SelectListFilter.All\n            }\n            onSearch={this.fetchUsers}\n            onSelect={this.handleSelect}\n            onUnselect={this.handleUnselect}\n            renderElement={this.renderElement}\n            selectedElements={this.state.selectedGroups}\n            withPaging={true}\n          />\n        </div>\n\n        <footer className=\"modal-foot\">\n          <a className=\"js-modal-close\" href=\"#\" onClick={this.handleCloseClick}>\n            {translate('Done')}\n          </a>\n        </footer>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonIcon } from '../../../components/controls/buttons';\nimport BulletListIcon from '../../../components/icons/BulletListIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport GroupsForm from './GroupsForm';\n\ninterface Props {\n  groups: string[];\n  onUpdateUsers: () => void;\n  user: T.User;\n}\n\ninterface State {\n  openForm: boolean;\n  showMore: boolean;\n}\n\nconst GROUPS_LIMIT = 3;\n\nexport default class UserGroups extends React.PureComponent<Props, State> {\n  state: State = { openForm: false, showMore: false };\n\n  handleOpenForm = () => this.setState({ openForm: true });\n  handleCloseForm = () => this.setState({ openForm: false });\n\n  toggleShowMore = (evt: React.SyntheticEvent<HTMLAnchorElement>) => {\n    evt.preventDefault();\n    this.setState(state => ({ showMore: !state.showMore }));\n  };\n\n  render() {\n    const { groups } = this.props;\n    const limit = groups.length > GROUPS_LIMIT ? GROUPS_LIMIT - 1 : GROUPS_LIMIT;\n    return (\n      <ul>\n        {groups.slice(0, limit).map(group => (\n          <li className=\"little-spacer-bottom\" key={group}>\n            {group}\n          </li>\n        ))}\n        {groups.length > GROUPS_LIMIT &&\n          this.state.showMore &&\n          groups.slice(limit).map(group => (\n            <li className=\"little-spacer-bottom\" key={group}>\n              {group}\n            </li>\n          ))}\n        <li className=\"little-spacer-bottom\">\n          {groups.length > GROUPS_LIMIT && !this.state.showMore && (\n            <a className=\"js-user-more-groups spacer-right\" href=\"#\" onClick={this.toggleShowMore}>\n              {translateWithParameters('more_x', groups.length - limit)}\n            </a>\n          )}\n          <ButtonIcon\n            className=\"js-user-groups button-small\"\n            onClick={this.handleOpenForm}\n            tooltip={translate('users.update_groups')}>\n            <BulletListIcon />\n          </ButtonIcon>\n        </li>\n        {this.state.openForm && (\n          <GroupsForm\n            onClose={this.handleCloseForm}\n            onUpdateUsers={this.props.onUpdateUsers}\n            user={this.props.user}\n          />\n        )}\n      </ul>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../../app/theme';\nimport { getTextColor } from '../../../helpers/colors';\nimport { getBaseUrl } from '../../../helpers/system';\n\nexport interface Props {\n  identityProvider?: T.IdentityProvider;\n  user: T.User;\n}\n\nexport default function UserListItemIdentity({ identityProvider, user }: Props) {\n  return (\n    <td className=\"text-middle\">\n      <div>\n        <strong className=\"js-user-name\">{user.name}</strong>\n        <span className=\"js-user-login note little-spacer-left\">{user.login}</span>\n      </div>\n      {user.email && <div className=\"js-user-email little-spacer-top\">{user.email}</div>}\n      {!user.local && user.externalProvider !== 'sonarqube' && (\n        <ExternalProvider identityProvider={identityProvider} user={user} />\n      )}\n    </td>\n  );\n}\n\nexport function ExternalProvider({ identityProvider, user }: Props) {\n  if (!identityProvider) {\n    return (\n      <div className=\"js-user-identity-provider little-spacer-top\">\n        <span>\n          {user.externalProvider}: {user.externalIdentity}\n        </span>\n      </div>\n    );\n  }\n\n  return (\n    <div className=\"js-user-identity-provider little-spacer-top\">\n      <div\n        className=\"identity-provider\"\n        style={{\n          backgroundColor: identityProvider.backgroundColor,\n          color: getTextColor(identityProvider.backgroundColor, colors.secondFontColor)\n        }}>\n        <img\n          alt={identityProvider.name}\n          className=\"little-spacer-right\"\n          height=\"14\"\n          src={getBaseUrl() + identityProvider.iconPath}\n          width=\"14\"\n        />\n        {user.externalIdentity}\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translateWithParameters } from '../../../helpers/l10n';\n\ninterface Props {\n  scmAccounts: string[];\n}\n\ninterface State {\n  showMore: boolean;\n}\n\nconst SCM_LIMIT = 3;\n\nexport default class UserScmAccounts extends React.PureComponent<Props, State> {\n  state: State = { showMore: false };\n\n  toggleShowMore = (evt: React.SyntheticEvent<HTMLAnchorElement>) => {\n    evt.preventDefault();\n    this.setState(state => ({ showMore: !state.showMore }));\n  };\n\n  render() {\n    const { scmAccounts } = this.props;\n    const limit = scmAccounts.length > SCM_LIMIT ? SCM_LIMIT - 1 : SCM_LIMIT;\n    return (\n      <ul className=\"js-scm-accounts\">\n        {scmAccounts.slice(0, limit).map((scmAccount, idx) => (\n          <li className=\"little-spacer-bottom\" key={idx}>\n            {scmAccount}\n          </li>\n        ))}\n        {scmAccounts.length > SCM_LIMIT &&\n          (this.state.showMore ? (\n            scmAccounts.slice(limit).map((scmAccount, idx) => (\n              <li className=\"little-spacer-bottom\" key={idx + limit}>\n                {scmAccount}\n              </li>\n            ))\n          ) : (\n            <li className=\"little-spacer-bottom\">\n              <a className=\"js-user-more-scm\" href=\"#\" onClick={this.toggleShowMore}>\n                {translateWithParameters('more_x', scmAccounts.length - limit)}\n              </a>\n            </li>\n          ))}\n      </ul>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonIcon } from '../../../components/controls/buttons';\nimport BulletListIcon from '../../../components/icons/BulletListIcon';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport Avatar from '../../../components/ui/Avatar';\nimport { translate } from '../../../helpers/l10n';\nimport TokensFormModal from './TokensFormModal';\nimport UserActions from './UserActions';\nimport UserGroups from './UserGroups';\nimport UserListItemIdentity from './UserListItemIdentity';\nimport UserScmAccounts from './UserScmAccounts';\n\ninterface Props {\n  identityProvider?: T.IdentityProvider;\n  isCurrentUser: boolean;\n  onUpdateUsers: () => void;\n  updateTokensCount: (login: string, tokensCount: number) => void;\n  user: T.User;\n}\n\ninterface State {\n  openTokenForm: boolean;\n}\n\nexport default class UserListItem extends React.PureComponent<Props, State> {\n  state: State = { openTokenForm: false };\n\n  handleOpenTokensForm = () => this.setState({ openTokenForm: true });\n  handleCloseTokensForm = () => this.setState({ openTokenForm: false });\n\n  render() {\n    const { identityProvider, onUpdateUsers, user } = this.props;\n\n    return (\n      <tr>\n        <td className=\"thin nowrap text-middle\">\n          <Avatar hash={user.avatar} name={user.name} size={36} />\n        </td>\n        <UserListItemIdentity identityProvider={identityProvider} user={user} />\n        <td className=\"thin nowrap text-middle\">\n          <UserScmAccounts scmAccounts={user.scmAccounts || []} />\n        </td>\n        <td className=\"thin nowrap text-middle\">\n          <DateFromNow date={user.lastConnectionDate} hourPrecision={true} />\n        </td>\n        <td className=\"thin nowrap text-middle\">\n          <UserGroups groups={user.groups || []} onUpdateUsers={onUpdateUsers} user={user} />\n        </td>\n        <td className=\"thin nowrap text-middle\">\n          {user.tokensCount}\n          <ButtonIcon\n            className=\"js-user-tokens spacer-left button-small\"\n            onClick={this.handleOpenTokensForm}\n            tooltip={translate('users.update_tokens')}>\n            <BulletListIcon />\n          </ButtonIcon>\n        </td>\n        <td className=\"thin nowrap text-right text-middle\">\n          <UserActions\n            isCurrentUser={this.props.isCurrentUser}\n            onUpdateUsers={onUpdateUsers}\n            user={user}\n          />\n        </td>\n        {this.state.openTokenForm && (\n          <TokensFormModal\n            onClose={this.handleCloseTokensForm}\n            updateTokensCount={this.props.updateTokensCount}\n            user={user}\n          />\n        )}\n      </tr>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport UserListItem from './components/UserListItem';\n\ninterface Props {\n  currentUser: { isLoggedIn: boolean; login?: string };\n  identityProviders: T.IdentityProvider[];\n  onUpdateUsers: () => void;\n  updateTokensCount: (login: string, tokensCount: number) => void;\n  users: T.User[];\n}\n\nexport default function UsersList({\n  currentUser,\n  identityProviders,\n  onUpdateUsers,\n  updateTokensCount,\n  users\n}: Props) {\n  return (\n    <div className=\"boxed-group boxed-group-inner\">\n      <table className=\"data zebra\" id=\"users-list\">\n        <thead>\n          <tr>\n            <th />\n            <th className=\"nowrap\" />\n            <th className=\"nowrap\">{translate('my_profile.scm_accounts')}</th>\n            <th className=\"nowrap\">{translate('users.last_connection')}</th>\n            <th className=\"nowrap\">{translate('my_profile.groups')}</th>\n            <th className=\"nowrap\">{translate('users.tokens')}</th>\n            <th className=\"nowrap\">&nbsp;</th>\n          </tr>\n        </thead>\n        <tbody>\n          {users.map(user => (\n            <UserListItem\n              identityProvider={identityProviders.find(\n                provider => user.externalProvider === provider.key\n              )}\n              isCurrentUser={currentUser.isLoggedIn && currentUser.login === user.login}\n              key={user.login}\n              onUpdateUsers={onUpdateUsers}\n              updateTokensCount={updateTokensCount}\n              user={user}\n            />\n          ))}\n        </tbody>\n      </table>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { memoize } from 'lodash';\nimport { cleanQuery, parseAsString, serializeString } from '../../helpers/query';\n\nexport interface Query {\n  search: string;\n}\n\nexport const parseQuery = memoize(\n  (urlQuery: T.RawQuery): Query => ({\n    search: parseAsString(urlQuery['search'])\n  })\n);\n\nexport const serializeQuery = memoize(\n  (query: Query): T.RawQuery =>\n    cleanQuery({\n      search: query.search ? serializeString(query.search) : undefined\n    })\n);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { getIdentityProviders, searchUsers } from '../../api/users';\nimport Suggestions from '../../app/components/embed-docs-modal/Suggestions';\nimport ListFooter from '../../components/controls/ListFooter';\nimport { withCurrentUser } from '../../components/hoc/withCurrentUser';\nimport { Location, Router, withRouter } from '../../components/hoc/withRouter';\nimport { translate } from '../../helpers/l10n';\nimport Header from './Header';\nimport Search from './Search';\nimport UsersList from './UsersList';\nimport { parseQuery, Query, serializeQuery } from './utils';\n\ninterface Props {\n  currentUser: { isLoggedIn: boolean; login?: string };\n  location: Pick<Location, 'query'>;\n  router: Pick<Router, 'push'>;\n}\n\ninterface State {\n  identityProviders: T.IdentityProvider[];\n  loading: boolean;\n  paging?: T.Paging;\n  users: T.User[];\n}\n\nexport class UsersApp extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { identityProviders: [], loading: true, users: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchIdentityProviders();\n    this.fetchUsers();\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    if (nextProps.location.query.search !== this.props.location.query.search) {\n      this.fetchUsers(nextProps);\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  finishLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  fetchIdentityProviders = () =>\n    getIdentityProviders().then(({ identityProviders }) => {\n      if (this.mounted) {\n        this.setState({ identityProviders });\n      }\n    });\n\n  fetchUsers = ({ location } = this.props) => {\n    this.setState({ loading: true });\n    searchUsers({ q: parseQuery(location.query).search }).then(({ paging, users }) => {\n      if (this.mounted) {\n        this.setState({ loading: false, paging, users });\n      }\n    }, this.finishLoading);\n  };\n\n  fetchMoreUsers = () => {\n    const { paging } = this.state;\n    if (paging) {\n      this.setState({ loading: true });\n      searchUsers({\n        p: paging.pageIndex + 1,\n        q: parseQuery(this.props.location.query).search\n      }).then(({ paging, users }) => {\n        if (this.mounted) {\n          this.setState(state => ({ loading: false, users: [...state.users, ...users], paging }));\n        }\n      }, this.finishLoading);\n    }\n  };\n\n  updateQuery = (newQuery: Partial<Query>) => {\n    const query = serializeQuery({ ...parseQuery(this.props.location.query), ...newQuery });\n    this.props.router.push({ ...this.props.location, query });\n  };\n\n  updateTokensCount = (login: string, tokensCount: number) => {\n    this.setState(state => ({\n      users: state.users.map(user => (user.login === login ? { ...user, tokensCount } : user))\n    }));\n  };\n\n  render() {\n    const query = parseQuery(this.props.location.query);\n    const { loading, paging, users } = this.state;\n    return (\n      <div className=\"page page-limited\" id=\"users-page\">\n        <Suggestions suggestions=\"users\" />\n        <Helmet defer={false} title={translate('users.page')} />\n        <Header loading={loading} onUpdateUsers={this.fetchUsers} />\n        <Search query={query} updateQuery={this.updateQuery} />\n        <UsersList\n          currentUser={this.props.currentUser}\n          identityProviders={this.state.identityProviders}\n          onUpdateUsers={this.fetchUsers}\n          updateTokensCount={this.updateTokensCount}\n          users={users}\n        />\n        {paging !== undefined && (\n          <ListFooter\n            count={users.length}\n            loadMore={this.fetchMoreUsers}\n            ready={!loading}\n            total={paging.total}\n          />\n        )}\n      </div>\n    );\n  }\n}\n\nexport default withRouter(withCurrentUser(UsersApp));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./UsersApp')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON } from '../helpers/request';\n\ninterface RawDomain {\n  actions: T.WebApi.Action[];\n  deprecatedSince?: string;\n  description: string;\n  internal: boolean;\n  path: string;\n  since?: string;\n}\n\nexport function fetchWebApi(showInternal = true): Promise<RawDomain[]> {\n  return getJSON('/api/webservices/list', { include_internals: showInternal })\n    .then(r => r.webServices)\n    .catch(throwGlobalError);\n}\n\nexport function fetchResponseExample(domain: string, action: string): Promise<T.WebApi.Example> {\n  return getJSON('/api/webservices/response_example', { controller: domain, action }).catch(\n    throwGlobalError\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { memoize } from 'lodash';\nimport {\n  cleanQuery,\n  parseAsOptionalBoolean,\n  parseAsString,\n  serializeString\n} from '../../helpers/query';\n\nexport interface Query {\n  search: string;\n  deprecated: boolean;\n  internal: boolean;\n}\n\nexport function actionsFilter(query: Query, domain: T.WebApi.Domain, action: T.WebApi.Action) {\n  const lowSearchQuery = query.search.toLowerCase();\n  return (\n    (query.internal || !action.internal) &&\n    (query.deprecated || !action.deprecatedSince) &&\n    (getActionKey(domain.path, action.key).includes(lowSearchQuery) ||\n      (action.description || '').toLowerCase().includes(lowSearchQuery))\n  );\n}\n\nexport function getActionKey(domainPath: string, actionKey: string) {\n  return domainPath + '/' + actionKey;\n}\n\nexport const isDomainPathActive = (path: string, splat: string) => {\n  const pathTokens = path.split('/');\n  const splatTokens = splat.split('/');\n\n  if (pathTokens.length > splatTokens.length) {\n    return false;\n  }\n\n  for (let i = 0; i < pathTokens.length; i++) {\n    if (pathTokens[i] !== splatTokens[i]) {\n      return false;\n    }\n  }\n\n  return true;\n};\n\nexport const parseQuery = memoize(\n  (urlQuery: T.RawQuery): Query => ({\n    search: parseAsString(urlQuery['query']),\n    deprecated: parseAsOptionalBoolean(urlQuery['deprecated']) || false,\n    internal: parseAsOptionalBoolean(urlQuery['internal']) || false\n  })\n);\n\nexport const serializeQuery = memoize(\n  (query: Partial<Query>): T.RawQuery =>\n    cleanQuery({\n      query: query.search ? serializeString(query.search) : undefined,\n      deprecated: query.deprecated || undefined,\n      internal: query.internal || undefined\n    })\n);\n\nexport function parseVersion(version: string) {\n  const match = /(\\d+)\\.(\\d+)/.exec(version);\n  if (match) {\n    return { major: Number(match[1]), minor: Number(match[2]) };\n  } else {\n    return undefined;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\ninterface Props {\n  changelog: T.WebApi.Changelog[];\n}\n\nexport default function ActionChangelog({ changelog }: Props) {\n  return (\n    <ul className=\"big-spacer-top\">\n      {changelog.map((item, index) => (\n        <li className=\"spacer-top\" key={index}>\n          <span className=\"spacer-right badge\">{item.version}</span>\n          {item.description}\n        </li>\n      ))}\n    </ul>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { parseVersion } from '../utils';\n\nexport default function DeprecatedBadge({ since }: { since?: string }) {\n  const version = since && parseVersion(since);\n  const overlay = version\n    ? translateWithParameters('api_documentation.will_be_removed_in_x', `${version.major + 2}.0`)\n    : translate('api_documentation.deprecation_tooltip');\n  const label = since\n    ? translateWithParameters('api_documentation.deprecated_since_x', since)\n    : translate('api_documentation.deprecated');\n  return (\n    <Tooltip overlay={overlay}>\n      <span className=\"badge badge-warning\">{label}</span>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate } from '../../../helpers/l10n';\n\nexport default function InternalBadge() {\n  return (\n    <Tooltip overlay={translate('api_documentation.internal_tooltip')}>\n      <span className=\"badge badge-error\">{translate('internal')}</span>\n    </Tooltip>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport DeprecatedBadge from './DeprecatedBadge';\nimport InternalBadge from './InternalBadge';\n\ninterface Props {\n  params: T.WebApi.Param[];\n  showDeprecated: boolean;\n  showInternal: boolean;\n}\n\nexport default class Params extends React.PureComponent<Props> {\n  renderKey(param: T.WebApi.Param) {\n    return (\n      <td className=\"markdown\" style={{ width: 180 }}>\n        <code>{param.key}</code>\n\n        {param.internal && (\n          <div className=\"little-spacer-top\">\n            <InternalBadge />\n          </div>\n        )}\n\n        {param.deprecatedSince && (\n          <div className=\"little-spacer-top\">\n            <DeprecatedBadge since={param.deprecatedSince} />\n          </div>\n        )}\n\n        {this.props.showDeprecated && param.deprecatedKey && (\n          <div className=\"little-spacer-top\">\n            <code>{param.deprecatedKey}</code>\n          </div>\n        )}\n\n        {this.props.showDeprecated && param.deprecatedKey && param.deprecatedKeySince && (\n          <div className=\"little-spacer-top\">\n            <DeprecatedBadge since={param.deprecatedKeySince} />\n          </div>\n        )}\n\n        <div className=\"note little-spacer-top\">{param.required ? 'required' : 'optional'}</div>\n\n        {param.since && (\n          <div className=\"note little-spacer-top\">\n            {translateWithParameters('since_x', param.since)}\n          </div>\n        )}\n      </td>\n    );\n  }\n\n  renderConstraint(param: T.WebApi.Param, field: keyof T.WebApi.Param, label: string) {\n    const value = param[field];\n    if (value !== undefined) {\n      return (\n        <div className=\"little-spacer-top\">\n          <h4>{translate('api_documentation', label)}</h4>\n          <code>{value}</code>\n        </div>\n      );\n    } else {\n      return null;\n    }\n  }\n\n  render() {\n    const { params, showDeprecated, showInternal } = this.props;\n    const displayedParameters = params\n      .filter(p => showDeprecated || !p.deprecatedSince)\n      .filter(p => showInternal || !p.internal);\n    return (\n      <div className=\"web-api-params\">\n        <table>\n          <tbody>\n            {displayedParameters.map(param => (\n              <tr key={param.key}>\n                {this.renderKey(param)}\n\n                <td>\n                  <div\n                    className=\"markdown\"\n                    // Safe: comes from the backend\n                    dangerouslySetInnerHTML={{ __html: param.description }}\n                  />\n                </td>\n\n                <td style={{ width: 250 }}>\n                  {param.possibleValues && (\n                    <div>\n                      <h4>{translate('api_documentation.possible_values')}</h4>\n                      <ul className=\"list-styled\">\n                        {param.possibleValues.map(value => (\n                          <li className=\"little-spacer-top\" key={value}>\n                            <code>{value}</code>\n                          </li>\n                        ))}\n                      </ul>\n                    </div>\n                  )}\n\n                  {this.renderConstraint(param, 'defaultValue', 'default_values')}\n                  {this.renderConstraint(param, 'exampleValue', 'example_values')}\n                  {this.renderConstraint(param, 'maxValuesAllowed', 'max_values')}\n                  {this.renderConstraint(param, 'minimumValue', 'min_value')}\n                  {this.renderConstraint(param, 'maximumValue', 'max_value')}\n                  {this.renderConstraint(param, 'minimumLength', 'min_length')}\n                  {this.renderConstraint(param, 'maximumLength', 'max_length')}\n                </td>\n              </tr>\n            ))}\n          </tbody>\n        </table>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { fetchResponseExample as fetchResponseExampleApi } from '../../../api/web-api';\n\ninterface Props {\n  action: T.WebApi.Action;\n  domain: T.WebApi.Domain;\n}\n\ninterface State {\n  responseExample?: T.WebApi.Example;\n}\n\nexport default class ResponseExample extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchResponseExample();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.action !== this.props.action) {\n      this.fetchResponseExample();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchResponseExample() {\n    const { domain, action } = this.props;\n    fetchResponseExampleApi(domain.path, action.key).then(\n      responseExample => this.setState({ responseExample }),\n      () => {}\n    );\n  }\n\n  render() {\n    const { responseExample } = this.state;\n\n    return (\n      <div className=\"web-api-response\">\n        {responseExample && <pre style={{ whiteSpace: 'pre-wrap' }}>{responseExample.example}</pre>}\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport LinkIcon from '../../../components/icons/LinkIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { getActionKey, serializeQuery } from '../utils';\nimport ActionChangelog from './ActionChangelog';\nimport DeprecatedBadge from './DeprecatedBadge';\nimport InternalBadge from './InternalBadge';\nimport Params from './Params';\nimport ResponseExample from './ResponseExample';\n\ninterface Props {\n  action: T.WebApi.Action;\n  domain: T.WebApi.Domain;\n  showDeprecated: boolean;\n  showInternal: boolean;\n}\n\ninterface State {\n  showChangelog: boolean;\n  showParams: boolean;\n  showResponse: boolean;\n}\n\nexport default class Action extends React.PureComponent<Props, State> {\n  state: State = {\n    showChangelog: false,\n    showParams: false,\n    showResponse: false\n  };\n\n  handleShowParamsClick = (e: React.SyntheticEvent<HTMLElement>) => {\n    e.preventDefault();\n    this.setState(state => ({\n      showChangelog: false,\n      showResponse: false,\n      showParams: !state.showParams\n    }));\n  };\n\n  handleShowResponseClick = (e: React.SyntheticEvent<HTMLElement>) => {\n    e.preventDefault();\n    this.setState(state => ({\n      showChangelog: false,\n      showParams: false,\n      showResponse: !state.showResponse\n    }));\n  };\n\n  handleChangelogClick = (e: React.SyntheticEvent<HTMLElement>) => {\n    e.preventDefault();\n    this.setState(state => ({\n      showChangelog: !state.showChangelog,\n      showParams: false,\n      showResponse: false\n    }));\n  };\n\n  renderTabs() {\n    const { action } = this.props;\n    const { showChangelog, showParams, showResponse } = this.state;\n\n    if (action.params || action.hasResponseExample || action.changelog.length > 0) {\n      return (\n        <ul className=\"web-api-action-actions tabs\">\n          {action.params && (\n            <li>\n              <a\n                className={classNames({ selected: showParams })}\n                href=\"#\"\n                onClick={this.handleShowParamsClick}>\n                {translate('api_documentation.parameters')}\n              </a>\n            </li>\n          )}\n\n          {action.hasResponseExample && (\n            <li>\n              <a\n                className={classNames({ selected: showResponse })}\n                href=\"#\"\n                onClick={this.handleShowResponseClick}>\n                {translate('api_documentation.response_example')}\n              </a>\n            </li>\n          )}\n\n          {action.changelog.length > 0 && (\n            <li>\n              <a\n                className={classNames({ selected: showChangelog })}\n                href=\"#\"\n                onClick={this.handleChangelogClick}>\n                {translate('api_documentation.changelog')}\n              </a>\n            </li>\n          )}\n        </ul>\n      );\n    }\n\n    return null;\n  }\n\n  render() {\n    const { action, domain } = this.props;\n    const { showChangelog, showParams, showResponse } = this.state;\n    const verb = action.post ? 'POST' : 'GET';\n    const actionKey = getActionKey(domain.path, action.key);\n\n    return (\n      <div className=\"boxed-group\" id={actionKey}>\n        <header className=\"web-api-action-header boxed-group-header\">\n          <Link\n            className=\"spacer-right link-no-underline\"\n            to={{\n              pathname: '/web_api/' + actionKey,\n              query: serializeQuery({\n                deprecated: Boolean(action.deprecatedSince),\n                internal: Boolean(action.internal)\n              })\n            }}>\n            <LinkIcon />\n          </Link>\n\n          <h3 className=\"web-api-action-title\">\n            {verb}\n            &nbsp;\n            {actionKey}\n          </h3>\n\n          {action.internal && (\n            <span className=\"spacer-left\">\n              <InternalBadge />\n            </span>\n          )}\n\n          {action.since && (\n            <span className=\"spacer-left badge\">\n              {translateWithParameters('since_x', action.since)}\n            </span>\n          )}\n\n          {action.deprecatedSince && (\n            <span className=\"spacer-left\">\n              <DeprecatedBadge since={action.deprecatedSince} />\n            </span>\n          )}\n        </header>\n\n        <div className=\"boxed-group-inner\">\n          <div\n            className=\"web-api-action-description markdown\"\n            // Safe: comes from the backend\n            dangerouslySetInnerHTML={{ __html: action.description }}\n          />\n\n          {this.renderTabs()}\n\n          {showParams && action.params && (\n            <Params\n              params={action.params}\n              showDeprecated={this.props.showDeprecated}\n              showInternal={this.props.showInternal}\n            />\n          )}\n\n          {showResponse && action.hasResponseExample && (\n            <ResponseExample action={action} domain={domain} />\n          )}\n\n          {showChangelog && <ActionChangelog changelog={action.changelog} />}\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { actionsFilter, getActionKey, Query } from '../utils';\nimport Action from './Action';\nimport DeprecatedBadge from './DeprecatedBadge';\nimport InternalBadge from './InternalBadge';\n\ninterface Props {\n  domain: T.WebApi.Domain;\n  query: Query;\n}\n\nexport default function Domain({ domain, query }: Props) {\n  const filteredActions = domain.actions.filter(action => actionsFilter(query, domain, action));\n\n  return (\n    <div className=\"web-api-domain\">\n      <header className=\"web-api-domain-header\">\n        <h2 className=\"web-api-domain-title\">{domain.path}</h2>\n\n        {domain.deprecatedSince && (\n          <span className=\"spacer-left\">\n            <DeprecatedBadge since={domain.deprecatedSince} />\n          </span>\n        )}\n\n        {domain.internal && (\n          <span className=\"spacer-left\">\n            <InternalBadge />\n          </span>\n        )}\n      </header>\n\n      {domain.description && (\n        <div\n          className=\"web-api-domain-description markdown\"\n          // Safe: comes from the backend\n          dangerouslySetInnerHTML={{ __html: domain.description }}\n        />\n      )}\n\n      <div className=\"web-api-domain-actions\">\n        {filteredActions.map(action => (\n          <Action\n            action={action}\n            domain={domain}\n            key={getActionKey(domain.path, action.key)}\n            showDeprecated={query.deprecated}\n            showInternal={query.internal}\n          />\n        ))}\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { actionsFilter, isDomainPathActive, Query, serializeQuery } from '../utils';\nimport DeprecatedBadge from './DeprecatedBadge';\nimport InternalBadge from './InternalBadge';\n\ninterface Props {\n  domains: T.WebApi.Domain[];\n  query: Query;\n  splat: string;\n}\n\nexport default function Menu(props: Props) {\n  const { domains, query, splat } = props;\n  const filteredDomains = (domains || [])\n    .map(domain => {\n      const filteredActions = domain.actions.filter(action => actionsFilter(query, domain, action));\n      return { ...domain, filteredActions };\n    })\n    .filter(domain => domain.filteredActions.length);\n\n  const renderDomain = (domain: T.WebApi.Domain) => {\n    const internal = !domain.actions.find(action => !action.internal);\n    return (\n      <Link\n        className={classNames('list-group-item', {\n          active: isDomainPathActive(domain.path, splat)\n        })}\n        key={domain.path}\n        to={{ pathname: '/web_api/' + domain.path, query: serializeQuery(query) }}>\n        <h3 className=\"list-group-item-heading\">\n          {domain.path}\n          {domain.deprecatedSince && <DeprecatedBadge since={domain.deprecatedSince} />}\n          {internal && <InternalBadge />}\n        </h3>\n      </Link>\n    );\n  };\n\n  return (\n    <div className=\"api-documentation-results panel\">\n      <div className=\"list-group\">{filteredDomains.map(renderDomain)}</div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport { translate } from '../../../helpers/l10n';\nimport { Query } from '../utils';\n\ninterface Props {\n  query: Query;\n  onSearch: (search: string) => void;\n  onToggleInternal: () => void;\n  onToggleDeprecated: () => void;\n}\n\nexport default function Search(props: Props) {\n  const { query, onToggleInternal, onToggleDeprecated } = props;\n\n  return (\n    <div className=\"web-api-search\">\n      <div>\n        <SearchBox\n          onChange={props.onSearch}\n          placeholder={translate('api_documentation.search')}\n          value={query.search}\n        />\n      </div>\n\n      <div className=\"big-spacer-top\">\n        <Checkbox checked={query.internal} className=\"text-middle\" onCheck={onToggleInternal}>\n          <span className=\"little-spacer-left\">{translate('api_documentation.show_internal')}</span>\n        </Checkbox>\n        <HelpTooltip\n          className=\"spacer-left\"\n          overlay={translate('api_documentation.internal_tooltip')}\n        />\n      </div>\n\n      <div className=\"spacer-top\">\n        <Checkbox checked={query.deprecated} className=\"text-middle\" onCheck={onToggleDeprecated}>\n          <span className=\"little-spacer-left\">\n            {translate('api_documentation.show_deprecated')}\n          </span>\n        </Checkbox>\n        <HelpTooltip\n          className=\"spacer-left\"\n          overlay={translate('api_documentation.deprecation_tooltip')}\n        />\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { maxBy } from 'lodash';\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { Link, withRouter, WithRouterProps } from 'react-router';\nimport { fetchWebApi } from '../../../api/web-api';\nimport A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';\nimport { translate } from '../../../helpers/l10n';\nimport { addSideBarClass, removeSideBarClass } from '../../../helpers/pages';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport '../styles/web-api.css';\nimport {\n  getActionKey,\n  isDomainPathActive,\n  parseQuery,\n  parseVersion,\n  Query,\n  serializeQuery\n} from '../utils';\nimport Domain from './Domain';\nimport Menu from './Menu';\nimport Search from './Search';\n\ntype Props = WithRouterProps;\n\ninterface State {\n  domains: T.WebApi.Domain[];\n}\n\nexport class WebApiApp extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { domains: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchList();\n    addSideBarClass();\n  }\n\n  componentDidUpdate() {\n    this.enforceFlags();\n    this.scrollToAction();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    removeSideBarClass();\n  }\n\n  fetchList() {\n    fetchWebApi().then(\n      domains => {\n        if (this.mounted) {\n          this.setState({ domains: this.parseDomains(domains) });\n        }\n      },\n      () => {}\n    );\n  }\n\n  parseDomains(domains: any[]): T.WebApi.Domain[] {\n    return domains.map(domain => {\n      const deprecated = getLatestDeprecatedAction(domain);\n      const internal = !domain.actions.find((action: any) => !action.internal);\n      return { ...domain, deprecatedSince: deprecated && deprecated.deprecatedSince, internal };\n    });\n  }\n\n  scrollToAction = () => {\n    const splat = this.props.params.splat || '';\n    const action = document.getElementById(splat);\n    if (action) {\n      scrollToElement(action, { topOffset: 20, bottomOffset: 20 });\n    } else {\n      window.scrollTo(0, 0);\n    }\n  };\n\n  updateQuery = (newQuery: Partial<Query>) => {\n    const query = serializeQuery({ ...parseQuery(this.props.location.query), ...newQuery });\n    this.props.router.push({ pathname: this.props.location.pathname, query });\n  };\n\n  enforceFlags() {\n    const splat = this.props.params.splat || '';\n    const { domains } = this.state;\n    const query = parseQuery(this.props.location.query);\n\n    const domain = domains.find(domain => splat.startsWith(domain.path));\n    if (domain) {\n      const action = domain.actions.find(action => getActionKey(domain.path, action.key) === splat);\n      const internal = Boolean(!query.internal && (domain.internal || (action && action.internal)));\n      const deprecated = Boolean(\n        !query.deprecated && (domain.deprecatedSince || (action && action.deprecatedSince))\n      );\n      if (internal || deprecated) {\n        this.updateQuery({ internal, deprecated });\n      }\n    }\n  }\n\n  handleSearch = (search: string) => {\n    this.updateQuery({ search });\n  };\n\n  toggleFlag(flag: 'deprecated' | 'internal', domainFlag: 'deprecatedSince' | 'internal') {\n    const splat = this.props.params.splat || '';\n    const { domains } = this.state;\n    const domain = domains.find(domain => isDomainPathActive(domain.path, splat));\n    const query = parseQuery(this.props.location.query);\n    const value = !query[flag];\n\n    if (domain && domain[domainFlag] && !value) {\n      this.props.router.push({\n        pathname: '/web_api',\n        query: serializeQuery({ ...query, [flag]: false })\n      });\n    } else {\n      this.updateQuery({ [flag]: value });\n    }\n  }\n\n  handleToggleInternal = () => {\n    this.toggleFlag('internal', 'internal');\n  };\n\n  handleToggleDeprecated = () => {\n    this.toggleFlag('deprecated', 'deprecatedSince');\n  };\n\n  render() {\n    const splat = this.props.params.splat || '';\n    const query = parseQuery(this.props.location.query);\n    const { domains } = this.state;\n\n    const domain = domains.find(domain => isDomainPathActive(domain.path, splat));\n\n    return (\n      <div className=\"layout-page\">\n        <Suggestions suggestions=\"api_documentation\" />\n        <Helmet defer={false} title={translate('api_documentation.page')} />\n        <ScreenPositionHelper className=\"layout-page-side-outer\">\n          {({ top }) => (\n            <div className=\"layout-page-side\" style={{ top }}>\n              <div className=\"layout-page-side-inner\">\n                <div className=\"layout-page-filters\">\n                  <A11ySkipTarget anchor=\"webapi_main\" />\n\n                  <div className=\"web-api-page-header\">\n                    <Link to=\"/web_api/\">\n                      <h1>{translate('api_documentation.page')}</h1>\n                    </Link>\n                  </div>\n\n                  <Search\n                    onSearch={this.handleSearch}\n                    onToggleDeprecated={this.handleToggleDeprecated}\n                    onToggleInternal={this.handleToggleInternal}\n                    query={query}\n                  />\n\n                  <Menu domains={this.state.domains} query={query} splat={splat} />\n                </div>\n              </div>\n            </div>\n          )}\n        </ScreenPositionHelper>\n\n        <div className=\"layout-page-main\">\n          <div className=\"layout-page-main-inner\">\n            {domain && <Domain domain={domain} key={domain.path} query={query} />}\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default withRouter(WebApiApp);\n\n/** Checks if all actions are deprecated, and returns the latest deprecated one */\nfunction getLatestDeprecatedAction(domain: Pick<T.WebApi.Domain, 'actions'>) {\n  const noVersion = { major: 0, minor: 0 };\n  const allActionsDeprecated = domain.actions.every(\n    ({ deprecatedSince }) => deprecatedSince !== undefined\n  );\n  const latestDeprecation =\n    allActionsDeprecated &&\n    maxBy(domain.actions, action => {\n      const version = (action.deprecatedSince && parseVersion(action.deprecatedSince)) || noVersion;\n      return version.major * 1024 + version.minor;\n    });\n  return latestDeprecation || undefined;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/WebApiApp')) }\n  },\n  {\n    path: '**',\n    component: lazyLoadComponent(() => import('./components/WebApiApp'))\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON } from '../helpers/request';\n\nexport function createWebhook(data: {\n  name: string;\n  project?: string;\n  secret?: string;\n  url: string;\n}): Promise<{ webhook: T.Webhook }> {\n  return postJSON('/api/webhooks/create', data).catch(throwGlobalError);\n}\n\nexport function deleteWebhook(data: { webhook: string }): Promise<void | Response> {\n  return post('/api/webhooks/delete', data).catch(throwGlobalError);\n}\n\nexport function searchWebhooks(data: { project?: string }): Promise<{ webhooks: T.Webhook[] }> {\n  return getJSON('/api/webhooks/list', data).catch(throwGlobalError);\n}\n\nexport function updateWebhook(data: {\n  webhook: string;\n  name: string;\n  secret?: string;\n  url: string;\n}): Promise<void | Response> {\n  return post('/api/webhooks/update', data).catch(throwGlobalError);\n}\n\nexport function searchDeliveries(data: {\n  ceTaskId?: string;\n  componentKey?: string;\n  webhook?: string;\n  p?: number;\n  ps?: number;\n}): Promise<{\n  deliveries: T.WebhookDelivery[];\n  paging: T.Paging;\n}> {\n  return getJSON('/api/webhooks/deliveries', data).catch(throwGlobalError);\n}\n\nexport function getDelivery(data: {\n  deliveryId: string;\n}): Promise<{ delivery: T.WebhookDelivery & { payload: string } }> {\n  return getJSON('/api/webhooks/delivery', data).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport AlertErrorIcon from '../icons/AlertErrorIcon';\nimport AlertSuccessIcon from '../icons/AlertSuccessIcon';\n\ninterface Props {\n  children: (props: { className?: string }) => React.ReactNode;\n  description?: string;\n  dirty: boolean;\n  error: string | undefined;\n  label?: React.ReactNode;\n  touched: boolean | undefined;\n}\n\nexport default function ModalValidationField(props: Props) {\n  const { description, dirty, error } = props;\n\n  const isValid = dirty && props.touched && error === undefined;\n  const showError = dirty && props.touched && error !== undefined;\n  return (\n    <div className=\"modal-validation-field\">\n      {props.label}\n      {props.children({ className: classNames({ 'is-invalid': showError, 'is-valid': isValid }) })}\n      {showError && <AlertErrorIcon className=\"little-spacer-top\" />}\n      {isValid && <AlertSuccessIcon className=\"little-spacer-top\" />}\n      {showError && <p className=\"text-danger\">{error}</p>}\n      {description && <div className=\"modal-field-description\">{description}</div>}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport ModalValidationField from './ModalValidationField';\n\ninterface Props {\n  autoFocus?: boolean;\n  className?: string;\n  description?: string;\n  dirty: boolean;\n  disabled: boolean;\n  error: string | undefined;\n  id?: string;\n  label?: React.ReactNode;\n  name: string;\n  onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;\n  onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;\n  placeholder?: string;\n  touched: boolean | undefined;\n  type?: string;\n  value: string;\n}\n\nexport default function InputValidationField({ className, ...props }: Props) {\n  const { description, dirty, error, label, touched, ...inputProps } = props;\n  const modalValidationProps = { description, dirty, error, label, touched };\n  return (\n    <ModalValidationField {...modalValidationProps}>\n      {({ className: validationClassName }) => (\n        <input className={classNames(className, validationClassName)} {...inputProps} />\n      )}\n    </ModalValidationField>\n  );\n}\n", "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __createBinding;\r\n(function (factory) {\r\n    var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n    if (typeof define === \"function\" && define.amd) {\r\n        define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n    }\r\n    else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n        factory(createExporter(root, createExporter(module.exports)));\r\n    }\r\n    else {\r\n        factory(createExporter(root));\r\n    }\r\n    function createExporter(exports, previous) {\r\n        if (exports !== root) {\r\n            if (typeof Object.create === \"function\") {\r\n                Object.defineProperty(exports, \"__esModule\", { value: true });\r\n            }\r\n            else {\r\n                exports.__esModule = true;\r\n            }\r\n        }\r\n        return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n    }\r\n})\r\n(function (exporter) {\r\n    var extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\n    __extends = function (d, b) {\r\n        extendStatics(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    };\r\n\r\n    __assign = Object.assign || function (t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n\r\n    __rest = function (s, e) {\r\n        var t = {};\r\n        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n            t[p] = s[p];\r\n        if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n            for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n                if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                    t[p[i]] = s[p[i]];\r\n            }\r\n        return t;\r\n    };\r\n\r\n    __decorate = function (decorators, target, key, desc) {\r\n        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n        if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n        return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n    };\r\n\r\n    __param = function (paramIndex, decorator) {\r\n        return function (target, key) { decorator(target, key, paramIndex); }\r\n    };\r\n\r\n    __metadata = function (metadataKey, metadataValue) {\r\n        if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n    };\r\n\r\n    __awaiter = function (thisArg, _arguments, P, generator) {\r\n        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n        return new (P || (P = Promise))(function (resolve, reject) {\r\n            function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n            function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n            function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n            step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n        });\r\n    };\r\n\r\n    __generator = function (thisArg, body) {\r\n        var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n        return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n        function verb(n) { return function (v) { return step([n, v]); }; }\r\n        function step(op) {\r\n            if (f) throw new TypeError(\"Generator is already executing.\");\r\n            while (_) try {\r\n                if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n                if (y = 0, t) op = [op[0] & 2, t.value];\r\n                switch (op[0]) {\r\n                    case 0: case 1: t = op; break;\r\n                    case 4: _.label++; return { value: op[1], done: false };\r\n                    case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                    case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                    default:\r\n                        if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                        if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                        if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                        if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                        if (t[2]) _.ops.pop();\r\n                        _.trys.pop(); continue;\r\n                }\r\n                op = body.call(thisArg, _);\r\n            } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n            if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n        }\r\n    };\r\n\r\n    __createBinding = function(o, m, k, k2) {\r\n        if (k2 === undefined) k2 = k;\r\n        o[k2] = m[k];\r\n    };\r\n\r\n    __exportStar = function (m, exports) {\r\n        for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n    };\r\n\r\n    __values = function (o) {\r\n        var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n        if (m) return m.call(o);\r\n        if (o && typeof o.length === \"number\") return {\r\n            next: function () {\r\n                if (o && i >= o.length) o = void 0;\r\n                return { value: o && o[i++], done: !o };\r\n            }\r\n        };\r\n        throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n    };\r\n\r\n    __read = function (o, n) {\r\n        var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n        if (!m) return o;\r\n        var i = m.call(o), r, ar = [], e;\r\n        try {\r\n            while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n        }\r\n        catch (error) { e = { error: error }; }\r\n        finally {\r\n            try {\r\n                if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n            }\r\n            finally { if (e) throw e.error; }\r\n        }\r\n        return ar;\r\n    };\r\n\r\n    __spread = function () {\r\n        for (var ar = [], i = 0; i < arguments.length; i++)\r\n            ar = ar.concat(__read(arguments[i]));\r\n        return ar;\r\n    };\r\n\r\n    __spreadArrays = function () {\r\n        for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n        for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n                r[k] = a[j];\r\n        return r;\r\n    };\r\n\r\n    __await = function (v) {\r\n        return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n    };\r\n\r\n    __asyncGenerator = function (thisArg, _arguments, generator) {\r\n        if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n        var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n        return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n        function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n        function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n        function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);  }\r\n        function fulfill(value) { resume(\"next\", value); }\r\n        function reject(value) { resume(\"throw\", value); }\r\n        function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n    };\r\n\r\n    __asyncDelegator = function (o) {\r\n        var i, p;\r\n        return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n        function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n    };\r\n\r\n    __asyncValues = function (o) {\r\n        if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n        var m = o[Symbol.asyncIterator], i;\r\n        return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n        function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n        function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n    };\r\n\r\n    __makeTemplateObject = function (cooked, raw) {\r\n        if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n        return cooked;\r\n    };\r\n\r\n    __importStar = function (mod) {\r\n        if (mod && mod.__esModule) return mod;\r\n        var result = {};\r\n        if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n        result[\"default\"] = mod;\r\n        return result;\r\n    };\r\n\r\n    __importDefault = function (mod) {\r\n        return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n    };\r\n\r\n    __classPrivateFieldGet = function (receiver, privateMap) {\r\n        if (!privateMap.has(receiver)) {\r\n            throw new TypeError(\"attempted to get private field on non-instance\");\r\n        }\r\n        return privateMap.get(receiver);\r\n    };\r\n\r\n    __classPrivateFieldSet = function (receiver, privateMap, value) {\r\n        if (!privateMap.has(receiver)) {\r\n            throw new TypeError(\"attempted to set private field on non-instance\");\r\n        }\r\n        privateMap.set(receiver, value);\r\n        return value;\r\n    };\r\n\r\n    exporter(\"__extends\", __extends);\r\n    exporter(\"__assign\", __assign);\r\n    exporter(\"__rest\", __rest);\r\n    exporter(\"__decorate\", __decorate);\r\n    exporter(\"__param\", __param);\r\n    exporter(\"__metadata\", __metadata);\r\n    exporter(\"__awaiter\", __awaiter);\r\n    exporter(\"__generator\", __generator);\r\n    exporter(\"__exportStar\", __exportStar);\r\n    exporter(\"__createBinding\", __createBinding);\r\n    exporter(\"__values\", __values);\r\n    exporter(\"__read\", __read);\r\n    exporter(\"__spread\", __spread);\r\n    exporter(\"__spreadArrays\", __spreadArrays);\r\n    exporter(\"__await\", __await);\r\n    exporter(\"__asyncGenerator\", __asyncGenerator);\r\n    exporter(\"__asyncDelegator\", __asyncDelegator);\r\n    exporter(\"__asyncValues\", __asyncValues);\r\n    exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n    exporter(\"__importStar\", __importStar);\r\n    exporter(\"__importDefault\", __importDefault);\r\n    exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n    exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n});\r\n", "import tslib from '../tslib.js';\r\nconst {\r\n    __extends,\r\n    __assign,\r\n    __rest,\r\n    __decorate,\r\n    __param,\r\n    __metadata,\r\n    __awaiter,\r\n    __generator,\r\n    __exportStar,\r\n    __createBinding,\r\n    __values,\r\n    __read,\r\n    __spread,\r\n    __spreadArrays,\r\n    __await,\r\n    __asyncGenerator,\r\n    __asyncDelegator,\r\n    __asyncValues,\r\n    __makeTemplateObject,\r\n    __importStar,\r\n    __importDefault,\r\n    __classPrivateFieldGet,\r\n    __classPrivateFieldSet,\r\n} = tslib;\r\nexport {\r\n    __extends,\r\n    __assign,\r\n    __rest,\r\n    __decorate,\r\n    __param,\r\n    __metadata,\r\n    __awaiter,\r\n    __generator,\r\n    __exportStar,\r\n    __createBinding,\r\n    __values,\r\n    __read,\r\n    __spread,\r\n    __spreadArrays,\r\n    __await,\r\n    __asyncGenerator,\r\n    __asyncDelegator,\r\n    __asyncValues,\r\n    __makeTemplateObject,\r\n    __importStar,\r\n    __importDefault,\r\n    __classPrivateFieldGet,\r\n    __classPrivateFieldSet,\r\n};\r\n", "'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n    childContextTypes: true,\n    contextTypes: true,\n    defaultProps: true,\n    displayName: true,\n    getDefaultProps: true,\n    getDerivedStateFromProps: true,\n    mixins: true,\n    propTypes: true,\n    type: true\n};\n\nvar KNOWN_STATICS = {\n    name: true,\n    length: true,\n    prototype: true,\n    caller: true,\n    callee: true,\n    arguments: true,\n    arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n    if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n        if (objectPrototype) {\n            var inheritedComponent = getPrototypeOf(sourceComponent);\n            if (inheritedComponent && inheritedComponent !== objectPrototype) {\n                hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n            }\n        }\n\n        var keys = getOwnPropertyNames(sourceComponent);\n\n        if (getOwnPropertySymbols) {\n            keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n        }\n\n        for (var i = 0; i < keys.length; ++i) {\n            var key = keys[i];\n            if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n                var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n                try { // Avoid failures from read-only properties\n                    defineProperty(targetComponent, key, descriptor);\n                } catch (e) {}\n            }\n        }\n\n        return targetComponent;\n    }\n\n    return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n", "// @flow\n'use strict';\n\nvar key = '__global_unique_id__';\n\nmodule.exports = function() {\n  return global[key] = (global[key] || 0) + 1;\n};\n", "\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;", "/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;", "'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _gud = require('gud');\n\nvar _gud2 = _interopRequireDefault(_gud);\n\nvar _warning = require('fbjs/lib/warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\nvar MAX_SIGNED_31_BIT_INT = 1073741823;\n\n// Inlined Object.is polyfill.\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction objectIs(x, y) {\n  if (x === y) {\n    return x !== 0 || 1 / x === 1 / y;\n  } else {\n    return x !== x && y !== y;\n  }\n}\n\nfunction createEventEmitter(value) {\n  var handlers = [];\n  return {\n    on: function on(handler) {\n      handlers.push(handler);\n    },\n    off: function off(handler) {\n      handlers = handlers.filter(function (h) {\n        return h !== handler;\n      });\n    },\n    get: function get() {\n      return value;\n    },\n    set: function set(newValue, changedBits) {\n      value = newValue;\n      handlers.forEach(function (handler) {\n        return handler(value, changedBits);\n      });\n    }\n  };\n}\n\nfunction onlyChild(children) {\n  return Array.isArray(children) ? children[0] : children;\n}\n\nfunction createReactContext(defaultValue, calculateChangedBits) {\n  var _Provider$childContex, _Consumer$contextType;\n\n  var contextProp = '__create-react-context-' + (0, _gud2.default)() + '__';\n\n  var Provider = function (_Component) {\n    _inherits(Provider, _Component);\n\n    function Provider() {\n      var _temp, _this, _ret;\n\n      _classCallCheck(this, Provider);\n\n      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.emitter = createEventEmitter(_this.props.value), _temp), _possibleConstructorReturn(_this, _ret);\n    }\n\n    Provider.prototype.getChildContext = function getChildContext() {\n      var _ref;\n\n      return _ref = {}, _ref[contextProp] = this.emitter, _ref;\n    };\n\n    Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n      if (this.props.value !== nextProps.value) {\n        var oldValue = this.props.value;\n        var newValue = nextProps.value;\n        var changedBits = void 0;\n\n        if (objectIs(oldValue, newValue)) {\n          changedBits = 0; // No change\n        } else {\n          changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n          if (process.env.NODE_ENV !== 'production') {\n            (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);\n          }\n\n          changedBits |= 0;\n\n          if (changedBits !== 0) {\n            this.emitter.set(nextProps.value, changedBits);\n          }\n        }\n      }\n    };\n\n    Provider.prototype.render = function render() {\n      return this.props.children;\n    };\n\n    return Provider;\n  }(_react.Component);\n\n  Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = _propTypes2.default.object.isRequired, _Provider$childContex);\n\n  var Consumer = function (_Component2) {\n    _inherits(Consumer, _Component2);\n\n    function Consumer() {\n      var _temp2, _this2, _ret2;\n\n      _classCallCheck(this, Consumer);\n\n      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      return _ret2 = (_temp2 = (_this2 = _possibleConstructorReturn(this, _Component2.call.apply(_Component2, [this].concat(args))), _this2), _this2.state = {\n        value: _this2.getValue()\n      }, _this2.onUpdate = function (newValue, changedBits) {\n        var observedBits = _this2.observedBits | 0;\n        if ((observedBits & changedBits) !== 0) {\n          _this2.setState({ value: _this2.getValue() });\n        }\n      }, _temp2), _possibleConstructorReturn(_this2, _ret2);\n    }\n\n    Consumer.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n      var observedBits = nextProps.observedBits;\n\n      this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n      : observedBits;\n    };\n\n    Consumer.prototype.componentDidMount = function componentDidMount() {\n      if (this.context[contextProp]) {\n        this.context[contextProp].on(this.onUpdate);\n      }\n      var observedBits = this.props.observedBits;\n\n      this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n      : observedBits;\n    };\n\n    Consumer.prototype.componentWillUnmount = function componentWillUnmount() {\n      if (this.context[contextProp]) {\n        this.context[contextProp].off(this.onUpdate);\n      }\n    };\n\n    Consumer.prototype.getValue = function getValue() {\n      if (this.context[contextProp]) {\n        return this.context[contextProp].get();\n      } else {\n        return defaultValue;\n      }\n    };\n\n    Consumer.prototype.render = function render() {\n      return onlyChild(this.props.children)(this.state.value);\n    };\n\n    return Consumer;\n  }(_react.Component);\n\n  Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = _propTypes2.default.object, _Consumer$contextType);\n\n\n  return {\n    Provider: Provider,\n    Consumer: Consumer\n  };\n}\n\nexports.default = createReactContext;\nmodule.exports = exports['default'];", "'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _implementation = require('./implementation');\n\nvar _implementation2 = _interopRequireDefault(_implementation);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _react2.default.createContext || _implementation2.default;\nmodule.exports = exports['default'];", "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n  // Don't return `map.set` because it's not chainable in IE 11.\n  map.set(pair[0], pair[1]);\n  return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n  // Don't return `set.add` because it's not chainable in IE 11.\n  set.add(value);\n  return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n    nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n    Map = getNative(root, 'Map'),\n    Promise = getNative(root, 'Promise'),\n    Set = getNative(root, 'Set'),\n    WeakMap = getNative(root, 'WeakMap'),\n    nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var cache = this.__data__;\n  if (cache instanceof ListCache) {\n    var pairs = cache.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      return this;\n    }\n    cache = this.__data__ = new MapCache(pairs);\n  }\n  cache.set(key, value);\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  // Safari 9 makes `arguments.length` enumerable in strict mode.\n  var result = (isArray(value) || isArguments(value))\n    ? baseTimes(value.length, String)\n    : [];\n\n  var length = result.length,\n      skipIndexes = !!length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    object[key] = value;\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n  var result;\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      if (isHostObject(value)) {\n        return object ? value : {};\n      }\n      result = initCloneObject(isFunc ? {} : value);\n      if (!isDeep) {\n        return copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, baseClone, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (!isArr) {\n    var props = isFull ? getAllKeys(value) : keys(value);\n  }\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n  });\n  return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n  return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var result = new buffer.constructor(buffer.length);\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n  return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n  return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    assignValue(object, key, newValue === undefined ? source[key] : newValue);\n  }\n  return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = objectToString.call(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : undefined;\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return cloneMap(object, isDeep, cloneFunc);\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return cloneSet(object, isDeep, cloneFunc);\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return !!length &&\n    (typeof value == 'number' || reIsUint.test(value)) &&\n    (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n  return baseClone(value, true, true);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = cloneDeep;\n", "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reLeadingDot = /^\\./,\n    rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array ? array.length : 0,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n    splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n    nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n  string = toString(string);\n\n  var result = [];\n  if (reLeadingDot.test(string)) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, string) {\n    result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result);\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\n/**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\nfunction toPath(value) {\n  if (isArray(value)) {\n    return arrayMap(value, toKey);\n  }\n  return isSymbol(value) ? [value] : copyArray(stringToPath(value));\n}\n\nmodule.exports = toPath;\n", "'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\n\nfunction equal(a, b) {\n  if (a === b) return true;\n\n  var arrA = isArray(a)\n    , arrB = isArray(b)\n    , i\n    , length\n    , key;\n\n  if (arrA && arrB) {\n    length = a.length;\n    if (length != b.length) return false;\n    for (i = 0; i < length; i++)\n      if (!equal(a[i], b[i])) return false;\n    return true;\n  }\n\n  if (arrA != arrB) return false;\n\n  var dateA = a instanceof Date\n    , dateB = b instanceof Date;\n  if (dateA != dateB) return false;\n  if (dateA && dateB) return a.getTime() == b.getTime();\n\n  var regexpA = a instanceof RegExp\n    , regexpB = b instanceof RegExp;\n  if (regexpA != regexpB) return false;\n  if (regexpA && regexpB) return a.toString() == b.toString();\n\n  if (a instanceof Object && b instanceof Object) {\n    var keys = keyList(a);\n    length = keys.length;\n\n    if (length !== keyList(b).length)\n      return false;\n\n    for (i = 0; i < length; i++)\n      if (!hasProp.call(b, keys[i])) return false;\n\n    for (i = 0; i < length; i++) {\n      key = keys[i];\n      if (key === '_owner' && a.$$typeof && a._store) {\n        // React-specific: avoid traversing React elements' _owner.\n        //  _owner contains circular references\n        // and is not needed when comparing the actual elements (and not their owners)\n        // .$$typeof and ._store on just reasonable markers of a react element\n        continue;\n      } else {\n        // all other properties should be traversed as usual\n        if (!equal(a[key], b[key])) return false;\n      }\n    }\n\n    return true;\n  }\n\n  return false;\n}\n\nmodule.exports = function exportedEqual(a, b) {\n  try {\n    return equal(a, b);\n  } catch (error) {\n    if (error.message && error.message.match(/stack|recursion/i)) {\n      // warn on circular references, don't crash\n      // browsers give this different errors name and messages:\n      // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n      // firefox: \"InternalError\", too much recursion\"\n      // edge: \"Error\", \"Out of stack space\"\n      console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n      return false;\n    }\n    // some other error. we should definitely know about these\n    throw error;\n  }\n};\n", "var isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tObject.keys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tObject.keys(source).forEach(function(key) {\n\t\tif (!options.isMergeableObject(source[key]) || !target[key]) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = deepmerge(target[key], source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nexport default deepmerge_1;\n", "import * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport createContext from 'create-react-context';\nimport { FormikContext } from './types';\n\nexport const {\n  Provider: FormikProvider,\n  Consumer: FormikConsumer,\n} = createContext<FormikContext<any>>({} as any);\n\n/**\n * Connect any component to Formik context, and inject as a prop called `formik`;\n * @param Comp React Component\n */\nexport function connect<OuterProps, Values = {}>(\n  Comp: React.ComponentType<OuterProps & { formik: FormikContext<Values> }>\n) {\n  const C: React.SFC<OuterProps> = (props: OuterProps) => (\n    <FormikConsumer>\n      {formik => <Comp {...props} formik={formik} />}\n    </FormikConsumer>\n  );\n  // Assign Comp to C.WrappedComponent so we can access the inner component in tests\n  // For example, <Field.WrappedComponent /> gets us <FieldInner/>\n  (C as React.SFC<OuterProps> & {\n    WrappedComponent: React.ReactNode;\n  }).WrappedComponent = Comp;\n\n  return hoistNonReactStatics<\n    OuterProps,\n    OuterProps & { formik: FormikContext<Values> }\n  >(\n    C,\n    Comp as React.ComponentClass<OuterProps & { formik: FormikContext<Values> }> // cast type to ComponentClass (even if SFC)\n  ) as React.ComponentClass<OuterProps> & {\n    WrappedComponent: React.ComponentClass<\n      OuterProps & { formik: FormikContext<Values> }\n    >;\n  };\n}\n", "import cloneDeep from 'lodash.clonedeep';\nimport toPath from 'lodash.topath';\nimport * as React from 'react';\n\n/**\n * Deeply get a value from an object via it's path.\n */\nexport function getIn(\n  obj: any,\n  key: string | string[],\n  def?: any,\n  p: number = 0\n) {\n  const path = toPath(key);\n  while (obj && p < path.length) {\n    obj = obj[path[p++]];\n  }\n  return obj === undefined ? def : obj;\n}\n\n/**\n * Deeply set a value from in object via it's path.\n * @see https://github.com/developit/linkstate\n */\nexport function setIn(obj: any, path: string, value: any): any {\n  let res: any = {};\n  let resVal: any = res;\n  let i = 0;\n  let pathArray = toPath(path);\n\n  for (; i < pathArray.length - 1; i++) {\n    const currentPath: string = pathArray[i];\n    let currentObj: any = getIn(obj, pathArray.slice(0, i + 1));\n\n    if (resVal[currentPath]) {\n      resVal = resVal[currentPath];\n    } else if (currentObj) {\n      resVal = resVal[currentPath] = cloneDeep(currentObj);\n    } else {\n      const nextPath: string = pathArray[i + 1];\n      resVal = resVal[currentPath] =\n        isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n    }\n  }\n\n  if (value === undefined) {\n    delete resVal[pathArray[i]];\n  } else {\n    resVal[pathArray[i]] = value;\n  }\n\n  const result = { ...obj, ...res };\n\n  // If the path array has a single element, the loop did not run.\n  // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n  if (i === 0 && value === undefined) {\n    delete result[pathArray[i]];\n  }\n\n  return result;\n}\n\n/**\n * Recursively a set the same value for all keys and arrays nested object, cloning\n * @param object\n * @param value\n * @param visited\n * @param response\n */\nexport function setNestedObjectValues<T>(\n  object: any,\n  value: any,\n  visited: any = new WeakMap(),\n  response: any = {}\n): T {\n  for (let k of Object.keys(object)) {\n    const val = object[k];\n    if (isObject(val)) {\n      if (!visited.get(val)) {\n        visited.set(val, true);\n        // In order to keep array values consistent for both dot path  and\n        // bracket syntax, we need to check if this is an array so that\n        // this will output  { friends: [true] } and not { friends: { \"0\": true } }\n        response[k] = Array.isArray(val) ? [] : {};\n        setNestedObjectValues(val, value, visited, response[k]);\n      }\n    } else {\n      response[k] = value;\n    }\n  }\n\n  return response;\n}\n\n// Assertions\n\n/** @private is the given object a Function? */\nexport const isFunction = (obj: any): obj is Function =>\n  typeof obj === 'function';\n\n/** @private is the given object an Object? */\nexport const isObject = (obj: any): boolean =>\n  obj !== null && typeof obj === 'object';\n\n/** @private is the given object an integer? */\nexport const isInteger = (obj: any): boolean =>\n  String(Math.floor(Number(obj))) === obj;\n\n/** @private is the given object a string? */\nexport const isString = (obj: any): obj is string =>\n  Object.prototype.toString.call(obj) === '[object String]';\n\n/** @private is the given object a NaN? */\nexport const isNaN = (obj: any): boolean => obj !== obj;\n\n/** @private Does a React component have exactly 0 children? */\nexport const isEmptyChildren = (children: any): boolean =>\n  React.Children.count(children) === 0;\n\n/** @private is the given object/value a promise? */\nexport const isPromise = (value: any): value is PromiseLike<any> =>\n  isObject(value) && isFunction(value.then);\n\n/**\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\n * not safe to call document.activeElement if there is nothing focused.\n *\n * The activeElement will be null only if the document or document body is not\n * yet defined.\n *\n * @param {?Document} doc Defaults to current document.\n * @return {Element | null}\n * @see https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/dom/getActiveElement.js\n */\nexport function getActiveElement(doc?: Document): Element | null {\n  doc = doc || (typeof document !== 'undefined' ? document : undefined);\n  if (typeof doc === 'undefined') {\n    return null;\n  }\n  try {\n    return doc.activeElement || doc.body;\n  } catch (e) {\n    return doc.body;\n  }\n}\n", "import * as React from 'react';\nimport isEqual from 'react-fast-compare';\nimport warning from 'warning';\nimport deepmerge from 'deepmerge';\nimport { FormikProvider } from './connect';\nimport {\n  FormikActions,\n  FormikConfig,\n  FormikErrors,\n  FormikState,\n  FormikTouched,\n  FormikValues,\n  FormikContext,\n} from './types';\nimport {\n  isEmptyChildren,\n  isFunction,\n  isNaN,\n  isPromise,\n  isString,\n  setIn,\n  setNestedObjectValues,\n  getActiveElement,\n  getIn,\n} from './utils';\n\nexport class Formik<Values = {}, ExtraProps = {}> extends React.Component<\n  FormikConfig<Values> & ExtraProps,\n  FormikState<any>\n> {\n  static defaultProps = {\n    validateOnChange: true,\n    validateOnBlur: true,\n    isInitialValid: false,\n    enableReinitialize: false,\n  };\n\n  initialValues: Values;\n  didMount: boolean;\n  hcCache: {\n    [key: string]: (e: string | React.ChangeEvent<any>) => void;\n  } = {};\n  hbCache: {\n    [key: string]: (e: any) => void;\n  } = {};\n  fields: {\n    [field: string]: {\n      validate?: ((value: any) => string | Promise<void> | undefined);\n    };\n  };\n\n  constructor(props: FormikConfig<Values> & ExtraProps) {\n    super(props);\n    this.state = {\n      values: props.initialValues || ({} as any),\n      errors: {},\n      touched: {},\n      isSubmitting: false,\n      isValidating: false,\n      submitCount: 0,\n    };\n    this.didMount = false;\n    this.fields = {};\n    this.initialValues = props.initialValues || ({} as any);\n    warning(\n      !(props.component && props.render),\n      'You should not use <Formik component> and <Formik render> in the same <Formik> component; <Formik render> will be ignored'\n    );\n\n    warning(\n      !(props.component && props.children && !isEmptyChildren(props.children)),\n      'You should not use <Formik component> and <Formik children> in the same <Formik> component; <Formik children> will be ignored'\n    );\n\n    warning(\n      !(props.render && props.children && !isEmptyChildren(props.children)),\n      'You should not use <Formik render> and <Formik children> in the same <Formik> component; <Formik children> will be ignored'\n    );\n  }\n\n  registerField = (\n    name: string,\n    fns: {\n      reset?: ((nextValues?: any) => void);\n      validate?: ((value: any) => string | Promise<void> | undefined);\n    }\n  ) => {\n    this.fields[name] = fns;\n  };\n\n  unregisterField = (name: string) => {\n    delete this.fields[name];\n  };\n\n  componentDidMount() {\n    this.didMount = true;\n  }\n\n  componentWillUnmount() {\n    // This allows us to prevent setting state on an\n    // unmounted component. This can occur if Formik is in a modal, and submission\n    // toggles show/hide, and validation of a blur field takes longer than validation\n    // before a submit.\n    // @see https://github.com/jaredpalmer/formik/issues/597\n    // @see https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html\n    this.didMount = false;\n  }\n\n  componentDidUpdate(prevProps: Readonly<FormikConfig<Values> & ExtraProps>) {\n    // If the initialValues change, reset the form\n    if (\n      this.props.enableReinitialize &&\n      !isEqual(prevProps.initialValues, this.props.initialValues)\n    ) {\n      this.initialValues = this.props.initialValues;\n      // @todo refactor to use getDerivedStateFromProps?\n      this.resetForm(this.props.initialValues);\n    }\n  }\n\n  setErrors = (errors: FormikErrors<Values>) => {\n    this.setState({ errors });\n  };\n\n  setTouched = (touched: FormikTouched<Values>) => {\n    this.setState({ touched }, () => {\n      if (this.props.validateOnBlur) {\n        this.runValidations(this.state.values);\n      }\n    });\n  };\n\n  setValues = (values: FormikValues) => {\n    this.setState({ values }, () => {\n      if (this.props.validateOnChange) {\n        this.runValidations(values);\n      }\n    });\n  };\n\n  setStatus = (status?: any) => {\n    this.setState({ status });\n  };\n\n  setError = (error: any) => {\n    if (process.env.NODE_ENV !== 'production') {\n      console.warn(\n        `Warning: Formik\\'s setError(error) is deprecated and may be removed in future releases. Please use Formik\\'s setStatus(status) instead. It works identically. For more info see https://github.com/jaredpalmer/formik#setstatus-status-any--void`\n      );\n    }\n    this.setState({ error });\n  };\n\n  setSubmitting = (isSubmitting: boolean) => {\n    this.setState({ isSubmitting });\n  };\n\n  /**\n   * Run field level validation\n   */\n  validateField = (field: string) => {\n    this.setState({ isValidating: true });\n    this.runSingleFieldLevelValidation(\n      field,\n      getIn(this.state.values, field)\n    ).then(error => {\n      if (this.didMount) {\n        this.setState({\n          errors: setIn(this.state.errors, field, error),\n          isValidating: false,\n        });\n      }\n    });\n  };\n\n  runSingleFieldLevelValidation = (\n    field: string,\n    value: void | string\n  ): Promise<string> => {\n    return new Promise(resolve =>\n      resolve(this.fields[field].validate!(value))\n    ).then(x => x, e => e);\n  };\n\n  runFieldLevelValidations(\n    values: FormikValues\n  ): Promise<FormikErrors<Values>> {\n    const fieldKeysWithValidation: string[] = Object.keys(this.fields).filter(\n      f =>\n        this.fields &&\n        this.fields[f] &&\n        this.fields[f].validate &&\n        isFunction(this.fields[f].validate)\n    );\n\n    // Construct an array with all of the field validation functions\n    const fieldValidations: Promise<string>[] =\n      fieldKeysWithValidation.length > 0\n        ? fieldKeysWithValidation.map(f =>\n            this.runSingleFieldLevelValidation(f, getIn(values, f))\n          )\n        : [Promise.resolve('DO_NOT_DELETE_YOU_WILL_BE_FIRED')]; // use special case ;)\n\n    return Promise.all(fieldValidations).then((fieldErrorsList: string[]) =>\n      fieldErrorsList.reduce(\n        (prev, curr, index) => {\n          if (curr === 'DO_NOT_DELETE_YOU_WILL_BE_FIRED') {\n            return prev;\n          }\n          if (!!curr) {\n            prev = setIn(prev, fieldKeysWithValidation[index], curr);\n          }\n          return prev;\n        },\n        {} as FormikErrors<Values>\n      )\n    );\n  }\n\n  runValidateHandler(values: FormikValues): Promise<FormikErrors<Values>> {\n    return new Promise(resolve => {\n      const maybePromisedErrors = (this.props.validate as any)(values);\n      if (maybePromisedErrors === undefined) {\n        resolve({});\n      } else if (isPromise(maybePromisedErrors)) {\n        (maybePromisedErrors as Promise<any>).then(\n          () => {\n            resolve({});\n          },\n          errors => {\n            resolve(errors);\n          }\n        );\n      } else {\n        resolve(maybePromisedErrors);\n      }\n    });\n  }\n\n  /**\n   * Run validation against a Yup schema and optionally run a function if successful\n   */\n  runValidationSchema = (values: FormikValues) => {\n    return new Promise(resolve => {\n      const { validationSchema } = this.props;\n      const schema = isFunction(validationSchema)\n        ? validationSchema()\n        : validationSchema;\n      validateYupSchema(values, schema).then(\n        () => {\n          resolve({});\n        },\n        (err: any) => {\n          resolve(yupToFormErrors(err));\n        }\n      );\n    });\n  };\n\n  /**\n   * Run all validations methods and update state accordingly\n   */\n  runValidations = (\n    values: FormikValues = this.state.values\n  ): Promise<FormikErrors<Values>> => {\n    this.setState({ isValidating: true });\n    return Promise.all([\n      this.runFieldLevelValidations(values),\n      this.props.validationSchema ? this.runValidationSchema(values) : {},\n      this.props.validate ? this.runValidateHandler(values) : {},\n    ]).then(([fieldErrors, schemaErrors, handlerErrors]) => {\n      const combinedErrors = deepmerge.all<FormikErrors<Values>>(\n        [fieldErrors, schemaErrors, handlerErrors],\n        { arrayMerge }\n      );\n\n      if (this.didMount) {\n        this.setState({ isValidating: false, errors: combinedErrors });\n      }\n\n      return combinedErrors;\n    });\n  };\n\n  handleChange = (\n    eventOrPath: string | React.ChangeEvent<any>\n  ): void | ((eventOrTextValue: string | React.ChangeEvent<any>) => void) => {\n    // @todo someone make this less disgusting.\n    //\n    // executeChange is the core of handleChange, we'll use it cache change\n    // handlers like Preact's linkState.\n    const executeChange = (\n      eventOrTextValue: string | React.ChangeEvent<any>,\n      maybePath?: string\n    ) => {\n      // By default, assume that the first argument is a string. This allows us to use\n      // handleChange with React Native and React Native Web's onChangeText prop which\n      // provides just the value of the input.\n      let field = maybePath;\n      let val = eventOrTextValue;\n      let parsed;\n      // If the first argument is not a string though, it has to be a synthetic React Event (or a fake one),\n      // so we handle like we would a normal HTML change event.\n      if (!isString(eventOrTextValue)) {\n        // If we can, persist the event\n        // @see https://reactjs.org/docs/events.html#event-pooling\n        if ((eventOrTextValue as React.ChangeEvent<any>).persist) {\n          (eventOrTextValue as React.ChangeEvent<any>).persist();\n        }\n        const {\n          type,\n          name,\n          id,\n          value,\n          checked,\n          outerHTML,\n        } = (eventOrTextValue as React.ChangeEvent<any>).target;\n        field = maybePath ? maybePath : name ? name : id;\n        if (!field && process.env.NODE_ENV !== 'production') {\n          warnAboutMissingIdentifier({\n            htmlContent: outerHTML,\n            documentationAnchorLink: 'handlechange-e-reactchangeeventany--void',\n            handlerName: 'handleChange',\n          });\n        }\n        val = /number|range/.test(type)\n          ? ((parsed = parseFloat(value)), isNaN(parsed) ? '' : parsed)\n          : /checkbox/.test(type) ? checked : value;\n      }\n\n      if (field) {\n        // Set form fields by name\n        this.setState(prevState => ({\n          ...prevState,\n          values: setIn(prevState.values, field!, val),\n        }));\n\n        if (this.props.validateOnChange) {\n          this.runValidations(setIn(this.state.values, field, val));\n        }\n      }\n    };\n\n    // Actually execute logic above....\n    // cache these handlers by key like Preact's linkState does for perf boost\n    if (isString(eventOrPath)) {\n      return isFunction(this.hcCache[eventOrPath])\n        ? this.hcCache[eventOrPath] // return the cached handled\n        : (this.hcCache[eventOrPath] = (\n            // make a new one\n            event: React.ChangeEvent<any> | string\n          ) =>\n            executeChange(\n              event /* string or event, does not matter */,\n              eventOrPath /* this is path to the field now */\n            ));\n    } else {\n      executeChange(eventOrPath);\n    }\n  };\n\n  setFieldValue = (\n    field: string,\n    value: any,\n    shouldValidate: boolean = true\n  ) => {\n    // Set form field by name\n    this.setState(\n      prevState => ({\n        ...prevState,\n        values: setIn(prevState.values, field, value),\n      }),\n      () => {\n        if (this.props.validateOnChange && shouldValidate) {\n          this.runValidations(this.state.values);\n        }\n      }\n    );\n  };\n\n  handleSubmit = (e: React.FormEvent<HTMLFormElement> | undefined) => {\n    if (e && e.preventDefault) {\n      e.preventDefault();\n    }\n\n    // Warn if form submission is triggered by a <button> without a\n    // specified `type` attribute during development. This mitigates\n    // a common gotcha in forms with both reset and submit buttons,\n    // where the dev forgets to add type=\"button\" to the reset button.\n    if (\n      process.env.NODE_ENV !== 'production' &&\n      typeof document !== 'undefined'\n    ) {\n      // Safely get the active element (works with IE)\n      const activeElement = getActiveElement();\n      if (\n        activeElement !== null &&\n        activeElement instanceof HTMLButtonElement\n      ) {\n        warning(\n          !!(\n            activeElement.attributes &&\n            activeElement.attributes.getNamedItem('type')\n          ),\n          'You submitted a Formik form using a button with an unspecified `type` attribute.  Most browsers default button elements to `type=\"submit\"`. If this is not a submit button, please add `type=\"button\"`.'\n        );\n      }\n    }\n\n    this.submitForm();\n  };\n\n  submitForm = () => {\n    // Recursively set all values to `true`.\n    this.setState(prevState => ({\n      touched: setNestedObjectValues<FormikTouched<Values>>(\n        prevState.values,\n        true\n      ),\n      isSubmitting: true,\n      submitCount: prevState.submitCount + 1,\n    }));\n\n    return this.runValidations().then(combinedErrors => {\n      const isValid = Object.keys(combinedErrors).length === 0;\n      if (isValid) {\n        this.executeSubmit();\n      } else if (this.didMount) {\n        // ^^^ Make sure Formik is still mounted before calling setState\n        this.setState({ isSubmitting: false });\n      }\n    });\n  };\n\n  executeSubmit = () => {\n    this.props.onSubmit(this.state.values, this.getFormikActions());\n  };\n\n  handleBlur = (eventOrString: any): void | ((e: any) => void) => {\n    const executeBlur = (e: any, path?: string) => {\n      if (e.persist) {\n        e.persist();\n      }\n      const { name, id, outerHTML } = e.target;\n      const field = path ? path : name ? name : id;\n\n      if (!field && process.env.NODE_ENV !== 'production') {\n        warnAboutMissingIdentifier({\n          htmlContent: outerHTML,\n          documentationAnchorLink: 'handleblur-e-any--void',\n          handlerName: 'handleBlur',\n        });\n      }\n\n      this.setState(prevState => ({\n        touched: setIn(prevState.touched, field, true),\n      }));\n\n      if (this.props.validateOnBlur) {\n        this.runValidations(this.state.values);\n      }\n    };\n\n    if (isString(eventOrString)) {\n      // cache these handlers by key like Preact's linkState does for perf boost\n      return isFunction(this.hbCache[eventOrString])\n        ? this.hbCache[eventOrString]\n        : (this.hbCache[eventOrString] = (event: any) =>\n            executeBlur(event, eventOrString));\n    } else {\n      executeBlur(eventOrString);\n    }\n  };\n\n  setFieldTouched = (\n    field: string,\n    touched: boolean = true,\n    shouldValidate: boolean = true\n  ) => {\n    // Set touched field by name\n    this.setState(\n      prevState => ({\n        ...prevState,\n        touched: setIn(prevState.touched, field, touched),\n      }),\n      () => {\n        if (this.props.validateOnBlur && shouldValidate) {\n          this.runValidations(this.state.values);\n        }\n      }\n    );\n  };\n\n  setFieldError = (field: string, message: string | undefined) => {\n    // Set form field by name\n    this.setState(prevState => ({\n      ...prevState,\n      errors: setIn(prevState.errors, field, message),\n    }));\n  };\n\n  resetForm = (nextValues?: Values) => {\n    const values = nextValues ? nextValues : this.props.initialValues;\n\n    this.initialValues = values;\n\n    this.setState({\n      isSubmitting: false,\n      isValidating: false,\n      errors: {},\n      touched: {},\n      error: undefined,\n      status: undefined,\n      values,\n      submitCount: 0,\n    });\n  };\n\n  handleReset = () => {\n    if (this.props.onReset) {\n      const maybePromisedOnReset = (this.props.onReset as any)(\n        this.state.values,\n        this.getFormikActions()\n      );\n\n      if (isPromise(maybePromisedOnReset)) {\n        (maybePromisedOnReset as Promise<any>).then(this.resetForm);\n      } else {\n        this.resetForm();\n      }\n    } else {\n      this.resetForm();\n    }\n  };\n\n  setFormikState = (s: any, callback?: (() => void)) =>\n    this.setState(s, callback);\n\n  getFormikActions = (): FormikActions<Values> => {\n    return {\n      resetForm: this.resetForm,\n      submitForm: this.submitForm,\n      validateForm: this.runValidations,\n      validateField: this.validateField,\n      setError: this.setError,\n      setErrors: this.setErrors,\n      setFieldError: this.setFieldError,\n      setFieldTouched: this.setFieldTouched,\n      setFieldValue: this.setFieldValue,\n      setStatus: this.setStatus,\n      setSubmitting: this.setSubmitting,\n      setTouched: this.setTouched,\n      setValues: this.setValues,\n      setFormikState: this.setFormikState,\n    };\n  };\n\n  getFormikComputedProps = () => {\n    const { isInitialValid } = this.props;\n    const dirty = !isEqual(this.initialValues, this.state.values);\n    return {\n      dirty,\n      isValid: dirty\n        ? this.state.errors && Object.keys(this.state.errors).length === 0\n        : isInitialValid !== false && isFunction(isInitialValid)\n          ? (isInitialValid as (props: this['props']) => boolean)(this.props)\n          : (isInitialValid as boolean),\n      initialValues: this.initialValues,\n    };\n  };\n\n  getFormikBag = () => {\n    return {\n      ...this.state,\n      ...this.getFormikActions(),\n      ...this.getFormikComputedProps(),\n      // Field needs to communicate with Formik during resets\n      registerField: this.registerField,\n      unregisterField: this.unregisterField,\n      handleBlur: this.handleBlur,\n      handleChange: this.handleChange,\n      handleReset: this.handleReset,\n      handleSubmit: this.handleSubmit,\n      validateOnChange: this.props.validateOnChange,\n      validateOnBlur: this.props.validateOnBlur,\n    };\n  };\n\n  getFormikContext = (): FormikContext<any> => {\n    return {\n      ...this.getFormikBag(),\n      validationSchema: this.props.validationSchema,\n      validate: this.props.validate,\n    };\n  };\n\n  render() {\n    const { component, render, children } = this.props;\n    const props = this.getFormikBag();\n    const ctx = this.getFormikContext();\n    return (\n      <FormikProvider value={ctx}>\n        {component\n          ? React.createElement(component as any, props)\n          : render\n            ? (render as any)(props)\n            : children // children come last, always called\n              ? typeof children === 'function'\n                ? (children as any)(props)\n                : !isEmptyChildren(children)\n                  ? React.Children.only(children)\n                  : null\n              : null}\n      </FormikProvider>\n    );\n  }\n}\n\nfunction warnAboutMissingIdentifier({\n  htmlContent,\n  documentationAnchorLink,\n  handlerName,\n}: {\n  htmlContent: string;\n  documentationAnchorLink: string;\n  handlerName: string;\n}) {\n  console.error(\n    `Warning: Formik called \\`${handlerName}\\`, but you forgot to pass an \\`id\\` or \\`name\\` attribute to your input:\n\n    ${htmlContent}\n\n    Formik cannot determine which value to update. For more info see https://github.com/jaredpalmer/formik#${documentationAnchorLink}\n  `\n  );\n}\n\n/**\n * Transform Yup ValidationError to a more usable object\n */\nexport function yupToFormErrors<Values>(yupError: any): FormikErrors<Values> {\n  let errors: any = {} as FormikErrors<Values>;\n  for (let err of yupError.inner) {\n    if (!errors[err.path]) {\n      errors = setIn(errors, err.path, err.message);\n    }\n  }\n  return errors;\n}\n\n/**\n * Validate a yup schema.\n */\nexport function validateYupSchema<T extends FormikValues>(\n  values: T,\n  schema: any,\n  sync: boolean = false,\n  context: any = {}\n): Promise<Partial<T>> {\n  let validateData: Partial<T> = {};\n  for (let k in values) {\n    if (values.hasOwnProperty(k)) {\n      const key = String(k);\n      validateData[key] = values[key] !== '' ? values[key] : undefined;\n    }\n  }\n  return schema[sync ? 'validateSync' : 'validate'](validateData, {\n    abortEarly: false,\n    context: context,\n  });\n}\n\n/**\n * deepmerge array merging algorithm\n * https://github.com/KyleAMathews/deepmerge#combine-array\n */\nfunction arrayMerge(target: any[], source: any[], options: any): any[] {\n  const destination = target.slice();\n\n  source.forEach(function(e: any, i: number) {\n    if (typeof destination[i] === 'undefined') {\n      const cloneRequested = options.clone !== false;\n      const shouldClone = cloneRequested && options.isMergeableObject(e);\n      destination[i] = shouldClone\n        ? deepmerge(Array.isArray(e) ? [] : {}, e, options)\n        : e;\n    } else if (options.isMergeableObject(e)) {\n      destination[i] = deepmerge(target[i], e, options);\n    } else if (target.indexOf(e) === -1) {\n      destination.push(e);\n    }\n  });\n  return destination;\n}\n", "import * as React from 'react';\nimport warning from 'warning';\nimport { connect } from './connect';\nimport {\n  FormikProps,\n  GenericFieldHTMLAttributes,\n  FormikContext,\n} from './types';\nimport { getIn, isEmptyChildren, isFunction } from './utils';\n\n/**\n * Note: These typings could be more restrictive, but then it would limit the\n * reusability of custom <Field/> components.\n *\n * @example\n * interface MyProps {\n *   ...\n * }\n *\n * export const MyInput: React.SFC<MyProps & FieldProps> = ({\n *   field,\n *   form,\n *   ...props\n * }) =>\n *   <div>\n *     <input {...field} {...props}/>\n *     {form.touched[field.name] && form.errors[field.name]}\n *   </div>\n */\nexport interface FieldProps<V = any> {\n  field: {\n    /** Classic React change handler, keyed by input name */\n    onChange: (e: React.ChangeEvent<any>) => void;\n    /** Mark input as touched */\n    onBlur: (e: any) => void;\n    /** Value of the input */\n    value: any;\n    /* name of the input */\n    name: string;\n  };\n  form: FormikProps<V>; // if ppl want to restrict this for a given form, let them.\n}\n\nexport interface FieldConfig {\n  /**\n   * Field component to render. Can either be a string like 'select' or a component.\n   */\n  component?:\n    | string\n    | React.ComponentType<FieldProps<any>>\n    | React.ComponentType<void>;\n\n  /**\n   * Render prop (works like React router's <Route render={props =>} />)\n   */\n  render?: ((props: FieldProps<any>) => React.ReactNode);\n\n  /**\n   * Children render function <Field name>{props => ...}</Field>)\n   */\n  children?: ((props: FieldProps<any>) => React.ReactNode) | React.ReactNode;\n\n  /**\n   * Validate a single field value independently\n   */\n  validate?: ((value: any) => string | Promise<void> | undefined);\n\n  /**\n   * Field name\n   */\n  name: string;\n\n  /** HTML input type */\n  type?: string;\n\n  /** Field value */\n  value?: any;\n\n  /** Inner ref */\n  innerRef?: (instance: any) => void;\n}\n\nexport type FieldAttributes<T> = GenericFieldHTMLAttributes & FieldConfig & T;\n\n/**\n * Custom Field component for quickly hooking into Formik\n * context and wiring up forms.\n */\nclass FieldInner<Props = {}, Values = {}> extends React.Component<\n  FieldAttributes<Props> & { formik: FormikContext<Values> },\n  {}\n> {\n  constructor(\n    props: FieldAttributes<Props> & { formik: FormikContext<Values> }\n  ) {\n    super(props);\n\n    const { render, children, component, formik } = props;\n    warning(\n      !(component && render),\n      'You should not use <Field component> and <Field render> in the same <Field> component; <Field component> will be ignored'\n    );\n\n    warning(\n      !(component && children && isFunction(children)),\n      'You should not use <Field component> and <Field children> as a function in the same <Field> component; <Field component> will be ignored.'\n    );\n\n    warning(\n      !(render && children && !isEmptyChildren(children)),\n      'You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored'\n    );\n\n    // Register the Field with the parent Formik. Parent will cycle through\n    // registered Field's validate fns right prior to submit\n    formik.registerField(props.name, {\n      validate: props.validate,\n    });\n  }\n\n  componentDidUpdate(\n    prevProps: FieldAttributes<Props> & { formik: FormikContext<Values> }\n  ) {\n    if (this.props.name !== prevProps.name) {\n      this.props.formik.unregisterField(prevProps.name);\n      this.props.formik.registerField(this.props.name, {\n        validate: this.props.validate,\n      });\n    }\n\n    if (this.props.validate !== prevProps.validate) {\n      this.props.formik.registerField(this.props.name, {\n        validate: this.props.validate,\n      });\n    }\n  }\n\n  componentWillUnmount() {\n    this.props.formik.unregisterField(this.props.name);\n  }\n\n  render() {\n    const {\n      validate,\n      name,\n      render,\n      children,\n      component = 'input',\n      formik,\n      ...props\n    } = (this.props as FieldAttributes<Props> & {\n      formik: FormikContext<Values>;\n    }) as any;\n    const {\n      validate: _validate,\n      validationSchema: _validationSchema,\n      ...restOfFormik\n    } = formik;\n    const field = {\n      value:\n        props.type === 'radio' || props.type === 'checkbox'\n          ? props.value // React uses checked={} for these inputs\n          : getIn(formik.values, name),\n      name,\n      onChange: formik.handleChange,\n      onBlur: formik.handleBlur,\n    };\n    const bag = { field, form: restOfFormik };\n\n    if (render) {\n      return (render as any)(bag);\n    }\n\n    if (isFunction(children)) {\n      return (children as (props: FieldProps<any>) => React.ReactNode)(bag);\n    }\n\n    if (typeof component === 'string') {\n      const { innerRef, ...rest } = props;\n      return React.createElement(component as any, {\n        ref: innerRef,\n        ...field,\n        ...rest,\n        children,\n      });\n    }\n\n    return React.createElement(component as any, {\n      ...bag,\n      ...props,\n      children,\n    });\n  }\n}\n\nexport const Field = connect<FieldAttributes<any>, any>(FieldInner);\n", "import * as React from 'react';\nimport { connect } from './connect';\n\nexport type FormikFormProps = Pick<\n  React.FormHTMLAttributes<HTMLFormElement>,\n  Exclude<keyof React.FormHTMLAttributes<HTMLFormElement>, 'onSubmit'>\n>;\n\nexport const Form = connect<FormikFormProps>(\n  ({ formik: { handleSubmit }, ...props }) => (\n    <form onSubmit={handleSubmit} {...props} />\n  )\n);\n\nForm.displayName = 'Form';\n", "import hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nimport { Formik } from './Formik';\nimport {\n  FormikActions,\n  FormikProps,\n  FormikSharedConfig,\n  FormikValues,\n} from './types';\nimport { isFunction } from './utils';\n\n/**\n * State, handlers, and helpers injected as props into the wrapped form component.\n * Used with withFormik()\n *\n * @deprecated  Use `OuterProps & FormikProps<Values>` instead.\n */\nexport type InjectedFormikProps<Props, Values> = Props & FormikProps<Values>;\n\n/**\n * Formik actions + { props }\n */\nexport type FormikBag<P, V> = { props: P } & FormikActions<V>;\n\n/**\n * withFormik() configuration options. Backwards compatible.\n */\nexport interface WithFormikConfig<\n  Props,\n  Values extends FormikValues = FormikValues,\n  DeprecatedPayload = Values\n> extends FormikSharedConfig {\n  /**\n   * Set the display name of the component. Useful for React DevTools.\n   */\n  displayName?: string;\n\n  /**\n   * Submission handler\n   */\n  handleSubmit: (values: Values, formikBag: FormikBag<Props, Values>) => void;\n\n  /**\n   * Map props to the form values\n   */\n  mapPropsToValues?: (props: Props) => Values;\n\n  /**\n   * @deprecated in 0.9.0 (but needed to break TS types)\n   */\n  mapValuesToPayload?: (values: Values) => DeprecatedPayload;\n\n  /**\n   * A Yup Schema or a function that returns a Yup schema\n   */\n  validationSchema?: any | ((props: Props) => any);\n\n  /**\n   * Validation function. Must return an error object or promise that\n   * throws an error object where that object keys map to corresponding value.\n   */\n  validate?: (values: Values, props: Props) => void | object | Promise<any>;\n}\n\nexport type CompositeComponent<P> =\n  | React.ComponentClass<P>\n  | React.StatelessComponent<P>;\n\nexport interface ComponentDecorator<TOwnProps, TMergedProps> {\n  (component: CompositeComponent<TMergedProps>): React.ComponentType<TOwnProps>;\n}\n\nexport interface InferableComponentDecorator<TOwnProps> {\n  <T extends CompositeComponent<TOwnProps>>(component: T): T;\n}\n\n/**\n * A public higher-order component to access the imperative API\n */\nexport function withFormik<\n  OuterProps,\n  Values extends FormikValues,\n  Payload = Values\n>({\n  mapPropsToValues = (vanillaProps: OuterProps): Values => {\n    let val: Values = {} as Values;\n    for (let k in vanillaProps) {\n      if (\n        vanillaProps.hasOwnProperty(k) &&\n        typeof vanillaProps[k] !== 'function'\n      ) {\n        val[k] = vanillaProps[k];\n      }\n    }\n    return val as Values;\n  },\n  ...config\n}: WithFormikConfig<OuterProps, Values, Payload>): ComponentDecorator<\n  OuterProps,\n  OuterProps & FormikProps<Values>\n> {\n  return function createFormik(\n    Component: CompositeComponent<OuterProps & FormikProps<Values>>\n  ): React.ComponentClass<OuterProps> {\n    const componentDisplayName =\n      Component.displayName ||\n      Component.name ||\n      (Component.constructor && Component.constructor.name) ||\n      'Component';\n    /**\n     * We need to use closures here for to provide the wrapped component's props to\n     * the respective withFormik config methods.\n     */\n    class C extends React.Component<OuterProps, {}> {\n      static displayName = `WithFormik(${componentDisplayName})`;\n\n      validate = (values: Values): void | object | Promise<any> => {\n        return config.validate!(values, this.props);\n      };\n\n      validationSchema = () => {\n        return isFunction(config.validationSchema)\n          ? config.validationSchema!(this.props)\n          : config.validationSchema;\n      };\n\n      handleSubmit = (values: Values, actions: FormikActions<Values>) => {\n        return config.handleSubmit(values, {\n          ...actions,\n          props: this.props,\n        });\n      };\n\n      /**\n       * Just avoiding a render callback for perf here\n       */\n      renderFormComponent = (formikProps: FormikProps<Values>) => {\n        return <Component {...this.props} {...formikProps} />;\n      };\n\n      render() {\n        return (\n          <Formik\n            {...this.props as any}\n            {...config}\n            validate={config.validate && this.validate}\n            validationSchema={config.validationSchema && this.validationSchema}\n            initialValues={mapPropsToValues(this.props)}\n            onSubmit={this.handleSubmit as any}\n            render={this.renderFormComponent}\n          />\n        );\n      }\n    }\n\n    return hoistNonReactStatics<OuterProps, OuterProps & FormikProps<Values>>(\n      C,\n      Component as React.ComponentClass<OuterProps & FormikProps<Values>> // cast type to ComponentClass (even if SFC)\n    ) as React.ComponentClass<OuterProps>;\n  };\n}\n", "import * as React from 'react';\nimport cloneDeep from 'lodash.clonedeep';\nimport { connect } from './connect';\nimport {\n  FormikContext,\n  FormikState,\n  SharedRenderProps,\n  FormikProps,\n} from './types';\nimport { getIn, isEmptyChildren, isFunction, setIn } from './utils';\n\nexport type FieldArrayConfig = {\n  /** Really the path to the array field to be updated */\n  name: string;\n  /** Should field array validate the form AFTER array updates/changes? */\n  validateOnChange?: boolean;\n} & SharedRenderProps<ArrayHelpers & { form: FormikProps<any> }>;\nexport interface ArrayHelpers {\n  /** Imperatively add a value to the end of an array */\n  push: (obj: any) => void;\n  /** Curried fn to add a value to the end of an array */\n  handlePush: (obj: any) => () => void;\n  /** Imperatively swap two values in an array */\n  swap: (indexA: number, indexB: number) => void;\n  /** Curried fn to swap two values in an array */\n  handleSwap: (indexA: number, indexB: number) => () => void;\n  /** Imperatively move an element in an array to another index */\n  move: (from: number, to: number) => void;\n  /** Imperatively move an element in an array to another index */\n  handleMove: (from: number, to: number) => () => void;\n  /** Imperatively insert an element at a given index into the array */\n  insert: (index: number, value: any) => void;\n  /** Curried fn to insert an element at a given index into the array */\n  handleInsert: (index: number, value: any) => () => void;\n  /** Imperatively replace a value at an index of an array  */\n  replace: (index: number, value: any) => void;\n  /** Curried fn to replace an element at a given index into the array */\n  handleReplace: (index: number, value: any) => () => void;\n  /** Imperatively add an element to the beginning of an array and return its length */\n  unshift: (value: any) => number;\n  /** Curried fn to add an element to the beginning of an array */\n  handleUnshift: (value: any) => () => void;\n  /** Curried fn to remove an element at an index of an array */\n  handleRemove: (index: number) => () => void;\n  /** Curried fn to remove a value from the end of the array */\n  handlePop: () => () => void;\n  /** Imperatively remove and element at an index of an array */\n  remove<T>(index: number): T | undefined;\n  /** Imperatively remove and return value from the end of the array */\n  pop<T>(): T | undefined;\n}\n\n/**\n * Some array helpers!\n */\nexport const move = (array: any[], from: number, to: number) => {\n  const copy = [...(array || [])];\n  const value = copy[from];\n  copy.splice(from, 1);\n  copy.splice(to, 0, value);\n  return copy;\n};\n\nexport const swap = (array: any[], indexA: number, indexB: number) => {\n  const copy = [...(array || [])];\n  const a = copy[indexA];\n  copy[indexA] = copy[indexB];\n  copy[indexB] = a;\n  return copy;\n};\n\nexport const insert = (array: any[], index: number, value: any) => {\n  const copy = [...(array || [])];\n  copy.splice(index, 0, value);\n  return copy;\n};\n\nexport const replace = (array: any[], index: number, value: any) => {\n  const copy = [...(array || [])];\n  copy[index] = value;\n  return copy;\n};\nclass FieldArrayInner<Values = {}> extends React.Component<\n  FieldArrayConfig & { formik: FormikContext<Values> },\n  {}\n> {\n  static defaultProps = {\n    validateOnChange: true,\n  };\n\n  constructor(props: FieldArrayConfig & { formik: FormikContext<Values> }) {\n    super(props);\n    // We need TypeScript generics on these, so we'll bind them in the constructor\n    this.remove = this.remove.bind(this);\n    this.pop = this.pop.bind(this);\n  }\n\n  updateArrayField = (\n    fn: Function,\n    alterTouched: boolean,\n    alterErrors: boolean\n  ) => {\n    const {\n      name,\n      validateOnChange,\n      formik: { setFormikState, validateForm, values, touched, errors },\n    } = this.props;\n    setFormikState(\n      (prevState: FormikState<any>) => ({\n        ...prevState,\n        values: setIn(prevState.values, name, fn(getIn(values, name))),\n        errors: alterErrors\n          ? setIn(prevState.errors, name, fn(getIn(errors, name)))\n          : prevState.errors,\n        touched: alterTouched\n          ? setIn(prevState.touched, name, fn(getIn(touched, name)))\n          : prevState.touched,\n      }),\n      () => {\n        if (validateOnChange) {\n          validateForm();\n        }\n      }\n    );\n  };\n\n  push = (value: any) =>\n    this.updateArrayField(\n      (array: any[]) => [...(array || []), cloneDeep(value)],\n      false,\n      false\n    );\n\n  handlePush = (value: any) => () => this.push(value);\n\n  swap = (indexA: number, indexB: number) =>\n    this.updateArrayField(\n      (array: any[]) => swap(array, indexA, indexB),\n      false,\n      false\n    );\n\n  handleSwap = (indexA: number, indexB: number) => () =>\n    this.swap(indexA, indexB);\n\n  move = (from: number, to: number) =>\n    this.updateArrayField(\n      (array: any[]) => move(array, from, to),\n      false,\n      false\n    );\n\n  handleMove = (from: number, to: number) => () => this.move(from, to);\n\n  insert = (index: number, value: any) =>\n    this.updateArrayField(\n      (array: any[]) => insert(array, index, value),\n      false,\n      false\n    );\n\n  handleInsert = (index: number, value: any) => () => this.insert(index, value);\n\n  replace = (index: number, value: any) =>\n    this.updateArrayField(\n      (array: any[]) => replace(array, index, value),\n      false,\n      false\n    );\n\n  handleReplace = (index: number, value: any) => () =>\n    this.replace(index, value);\n\n  unshift = (value: any) => {\n    let arr = [];\n    this.updateArrayField(\n      (array: any[]) => {\n        arr = array ? [value, ...array] : [value];\n        return arr;\n      },\n      false,\n      false\n    );\n    return arr.length;\n  };\n\n  handleUnshift = (value: any) => () => this.unshift(value);\n\n  remove<T>(index: number): T {\n    // We need to make sure we also remove relevant pieces of `touched` and `errors`\n    let result: any;\n    this.updateArrayField(\n      // so this gets call 3 times\n      (array?: any[]) => {\n        const copy = array ? [...array] : [];\n        if (!result) {\n          result = copy[index];\n        }\n        if (isFunction(copy.splice)) {\n          copy.splice(index, 1);\n        }\n        return copy;\n      },\n      true,\n      true\n    );\n\n    return result;\n  }\n\n  handleRemove = (index: number) => () => this.remove<any>(index);\n\n  pop<T>(): T {\n    // Remove relevant pieces of `touched` and `errors` too!\n    let result: any;\n    this.updateArrayField(\n      // so this gets call 3 times\n      (array: any[]) => {\n        const tmp = array;\n        if (!result) {\n          result = tmp && tmp.pop && tmp.pop();\n        }\n        return tmp;\n      },\n      true,\n      true\n    );\n\n    return result;\n  }\n\n  handlePop = () => () => this.pop<any>();\n\n  render() {\n    const arrayHelpers: ArrayHelpers = {\n      push: this.push,\n      pop: this.pop,\n      swap: this.swap,\n      move: this.move,\n      insert: this.insert,\n      replace: this.replace,\n      unshift: this.unshift,\n      remove: this.remove,\n      handlePush: this.handlePush,\n      handlePop: this.handlePop,\n      handleSwap: this.handleSwap,\n      handleMove: this.handleMove,\n      handleInsert: this.handleInsert,\n      handleReplace: this.handleReplace,\n      handleUnshift: this.handleUnshift,\n      handleRemove: this.handleRemove,\n    };\n\n    const {\n      component,\n      render,\n      children,\n      name,\n      formik: {\n        validate: _validate,\n        validationSchema: _validationSchema,\n        ...restOfFormik\n      },\n    } = this.props;\n\n    const props = { ...arrayHelpers, form: restOfFormik, name };\n\n    return component\n      ? React.createElement(component as any, props)\n      : render\n        ? (render as any)(props)\n        : children // children come last, always called\n          ? typeof children === 'function'\n            ? (children as any)(props)\n            : !isEmptyChildren(children) ? React.Children.only(children) : null\n          : null;\n  }\n}\n\nexport const FieldArray = connect<FieldArrayConfig, any>(FieldArrayInner);\n", "import * as React from 'react';\nimport warning from 'warning';\nimport { connect } from './connect';\nimport {\n  FormikProps,\n  GenericFieldHTMLAttributes,\n  FormikContext,\n} from './types';\nimport { getIn, isEmptyChildren, isFunction } from './utils';\n\nexport interface FastFieldProps<V = any> {\n  field: {\n    /** Classic React change handler, keyed by input name */\n    onChange: (e: React.ChangeEvent<any>) => void;\n    /** Mark input as touched */\n    onBlur: (e: any) => void;\n    /** Value of the input */\n    value: any;\n    /* name of the input */\n    name: string;\n  };\n  form: FormikProps<V>; // if ppl want to restrict this for a given form, let them.\n}\n\nexport interface FastFieldConfig<T> {\n  /**\n   * Field component to render. Can either be a string like 'select' or a component.\n   */\n  component?:\n    | string\n    | React.ComponentType<FastFieldProps<any>>\n    | React.ComponentType<void>;\n\n  /**\n   * Render prop (works like React router's <Route render={props =>} />)\n   */\n  render?: ((props: FastFieldProps<any>) => React.ReactNode);\n\n  /**\n   * Children render function <Field name>{props => ...}</Field>)\n   */\n  children?:\n    | ((props: FastFieldProps<any>) => React.ReactNode)\n    | React.ReactNode;\n\n  /**\n   * Validate a single field value independently\n   */\n  validate?: ((value: any) => string | Promise<void> | undefined);\n\n  /** Override FastField's default shouldComponentUpdate */\n  shouldUpdate?: (\n    props: T & GenericFieldHTMLAttributes & { formik: FormikContext<any> }\n  ) => boolean;\n\n  /**\n   * Field name\n   */\n  name: string;\n\n  /** HTML input type */\n  type?: string;\n\n  /** Field value */\n  value?: any;\n\n  /** Inner ref */\n  innerRef?: (instance: any) => void;\n}\n\nexport type FastFieldAttributes<T> = GenericFieldHTMLAttributes &\n  FastFieldConfig<T> &\n  T;\n\n/**\n * Custom Field component for quickly hooking into Formik\n * context and wiring up forms.\n */\nclass FastFieldInner<Values = {}, Props = {}> extends React.Component<\n  FastFieldAttributes<Props> & { formik: FormikContext<Values> },\n  {}\n> {\n  constructor(\n    props: FastFieldAttributes<Props> & { formik: FormikContext<Values> }\n  ) {\n    super(props);\n    const { render, children, component } = props;\n    warning(\n      !(component && render),\n      'You should not use <FastField component> and <FastField render> in the same <FastField> component; <FastField component> will be ignored'\n    );\n\n    warning(\n      !(component && children && isFunction(children)),\n      'You should not use <FastField component> and <FastField children> as a function in the same <FastField> component; <FastField component> will be ignored.'\n    );\n\n    warning(\n      !(render && children && !isEmptyChildren(children)),\n      'You should not use <FastField render> and <FastField children> in the same <FastField> component; <FastField children> will be ignored'\n    );\n  }\n\n  shouldComponentUpdate(\n    props: FastFieldAttributes<Props> & { formik: FormikContext<Values> }\n  ) {\n    if (this.props.shouldUpdate) {\n      return this.props.shouldUpdate(props);\n    } else if (\n      getIn(this.props.formik.values, this.props.name) !==\n        getIn(props.formik.values, this.props.name) ||\n      getIn(this.props.formik.errors, this.props.name) !==\n        getIn(props.formik.errors, this.props.name) ||\n      getIn(this.props.formik.touched, this.props.name) !==\n        getIn(props.formik.touched, this.props.name) ||\n      Object.keys(this.props).length !== Object.keys(props).length\n    ) {\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  componentDidMount() {\n    this.props.formik.registerField(this.props.name, {\n      validate: this.props.validate,\n    });\n  }\n\n  componentDidUpdate(\n    prevProps: FastFieldAttributes<Props> & { formik: FormikContext<Values> }\n  ) {\n    if (this.props.name !== prevProps.name) {\n      this.props.formik.unregisterField(prevProps.name);\n      this.props.formik.registerField(this.props.name, {\n        validate: this.props.validate,\n      });\n    }\n\n    if (this.props.validate !== prevProps.validate) {\n      this.props.formik.registerField(this.props.name, {\n        validate: this.props.validate,\n      });\n    }\n  }\n\n  componentWillUnmount() {\n    this.props.formik.unregisterField(this.props.name);\n  }\n\n  render() {\n    const {\n      validate,\n      name,\n      render,\n      children,\n      component = 'input',\n      formik,\n      ...props\n    } = (this.props as FastFieldAttributes<Props> & {\n      formik: FormikContext<Values>;\n    }) as any;\n    const {\n      validate: _validate,\n      validationSchema: _validationSchema,\n      ...restOfFormik\n    } = formik;\n    const field = {\n      value:\n        props.type === 'radio' || props.type === 'checkbox'\n          ? props.value // React uses checked={} for these inputs\n          : getIn(formik.values, name),\n      name,\n      onChange: formik.handleChange,\n      onBlur: formik.handleBlur,\n    };\n    const bag = { field, form: restOfFormik };\n\n    if (render) {\n      return (render as any)(bag);\n    }\n\n    if (isFunction(children)) {\n      return (children as (props: FastFieldProps<any>) => React.ReactNode)(bag);\n    }\n\n    if (typeof component === 'string') {\n      const { innerRef, ...rest } = props;\n      return React.createElement(component as any, {\n        ref: innerRef,\n        ...field,\n        ...rest,\n        children,\n      });\n    }\n\n    return React.createElement(component as any, {\n      ...bag,\n      ...props,\n      children,\n    });\n  }\n}\n\nexport const FastField = connect<FastFieldAttributes<any>, any>(FastFieldInner);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Formik, FormikActions, FormikProps } from 'formik';\nimport * as React from 'react';\n\nexport type ChildrenProps<V> = T.Omit<FormikProps<V>, 'handleSubmit'>;\n\ninterface Props<V> {\n  children: (props: ChildrenProps<V>) => React.ReactNode;\n  initialValues: V;\n  isInitialValid?: boolean;\n  onSubmit: (data: V) => Promise<void>;\n  validate: (data: V) => { [P in keyof V]?: string } | Promise<{ [P in keyof V]?: string }>;\n}\n\nexport default class ValidationForm<V> extends React.Component<Props<V>> {\n  mounted = false;\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSubmit = (data: V, { setSubmitting }: FormikActions<V>) => {\n    const result = this.props.onSubmit(data);\n    const stopSubmitting = () => {\n      if (this.mounted) {\n        setSubmitting(false);\n      }\n    };\n\n    if (result) {\n      result.then(stopSubmitting, stopSubmitting);\n    } else {\n      stopSubmitting();\n    }\n  };\n\n  render() {\n    return (\n      <Formik<V>\n        initialValues={this.props.initialValues}\n        isInitialValid={this.props.isInitialValid}\n        onSubmit={this.handleSubmit}\n        validate={this.props.validate}>\n        {({ handleSubmit, ...props }) => (\n          <form onSubmit={handleSubmit}>{this.props.children(props)}</form>\n        )}\n      </Formik>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport DeferredSpinner from '../ui/DeferredSpinner';\nimport { ResetButtonLink, SubmitButton } from './buttons';\nimport Modal, { ModalProps } from './Modal';\nimport ValidationForm, { ChildrenProps } from './ValidationForm';\n\ninterface Props<V> extends ModalProps {\n  children: (props: ChildrenProps<V>) => React.ReactNode;\n  confirmButtonText: string;\n  header: string;\n  initialValues: V;\n  isDestructive?: boolean;\n  isInitialValid?: boolean;\n  onClose: () => void;\n  onSubmit: (data: V) => Promise<void>;\n  validate: (data: V) => { [P in keyof V]?: string };\n}\n\nexport default class ValidationModal<V> extends React.PureComponent<Props<V>> {\n  handleSubmit = (data: V) => {\n    return this.props.onSubmit(data).then(() => {\n      this.props.onClose();\n    });\n  };\n\n  render() {\n    return (\n      <Modal\n        contentLabel={this.props.header}\n        noBackdrop={this.props.noBackdrop}\n        onRequestClose={this.props.onClose}\n        size={this.props.size}>\n        <ValidationForm\n          initialValues={this.props.initialValues}\n          isInitialValid={this.props.isInitialValid}\n          onSubmit={this.handleSubmit}\n          validate={this.props.validate}>\n          {props => (\n            <>\n              <header className=\"modal-head\">\n                <h2>{this.props.header}</h2>\n              </header>\n\n              <div className=\"modal-body\">{this.props.children(props)}</div>\n\n              <footer className=\"modal-foot\">\n                <DeferredSpinner className=\"spacer-right\" loading={props.isSubmitting} />\n                <SubmitButton\n                  className={this.props.isDestructive ? 'button-red' : undefined}\n                  disabled={props.isSubmitting || !props.isValid || !props.dirty}>\n                  {this.props.confirmButtonText}\n                </SubmitButton>\n                <ResetButtonLink disabled={props.isSubmitting} onClick={this.props.onClose}>\n                  {translate('cancel')}\n                </ResetButtonLink>\n              </footer>\n            </>\n          )}\n        </ValidationForm>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { isWebUri } from 'valid-url';\nimport InputValidationField from '../../../components/controls/InputValidationField';\nimport ValidationModal from '../../../components/controls/ValidationModal';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onClose: () => void;\n  onDone: (data: Values) => Promise<void>;\n  webhook?: T.Webhook;\n}\n\ninterface Values {\n  name: string;\n  secret: string;\n  url: string;\n}\n\nexport default class CreateWebhookForm extends React.PureComponent<Props> {\n  handleCancelClick = (event: React.SyntheticEvent<HTMLButtonElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.props.onClose();\n  };\n\n  handleValidate = (data: Values) => {\n    const { name, secret, url } = data;\n    const errors: { name?: string; secret?: string; url?: string } = {};\n    if (!name.trim()) {\n      errors.name = translate('webhooks.name.required');\n    }\n    if (!url.trim()) {\n      errors.url = translate('webhooks.url.required');\n    } else if (!url.startsWith('http://') && !url.startsWith('https://')) {\n      errors.url = translate('webhooks.url.bad_protocol');\n    } else if (!isWebUri(url)) {\n      errors.url = translate('webhooks.url.bad_format');\n    }\n    if (secret && secret.length > 200) {\n      errors.secret = translate('webhooks.secret.bad_format');\n    }\n    return errors;\n  };\n\n  render() {\n    const { webhook } = this.props;\n    const isUpdate = !!webhook;\n    const modalHeader = isUpdate ? translate('webhooks.update') : translate('webhooks.create');\n    const confirmButtonText = isUpdate ? translate('update_verb') : translate('create');\n    return (\n      <ValidationModal\n        confirmButtonText={confirmButtonText}\n        header={modalHeader}\n        initialValues={{\n          name: (webhook && webhook.name) || '',\n          secret: (webhook && webhook.secret) || '',\n          url: (webhook && webhook.url) || ''\n        }}\n        isInitialValid={isUpdate}\n        onClose={this.props.onClose}\n        onSubmit={this.props.onDone}\n        size=\"small\"\n        validate={this.handleValidate}>\n        {({ dirty, errors, handleBlur, handleChange, isSubmitting, touched, values }) => (\n          <>\n            <MandatoryFieldsExplanation className=\"big-spacer-bottom\" />\n\n            <InputValidationField\n              autoFocus={true}\n              dirty={dirty}\n              disabled={isSubmitting}\n              error={errors.name}\n              id=\"webhook-name\"\n              label={\n                <label htmlFor=\"webhook-name\">\n                  {translate('webhooks.name')}\n                  <MandatoryFieldMarker />\n                </label>\n              }\n              name=\"name\"\n              onBlur={handleBlur}\n              onChange={handleChange}\n              touched={touched.name}\n              type=\"text\"\n              value={values.name}\n            />\n            <InputValidationField\n              description={translate('webhooks.url.description')}\n              dirty={dirty}\n              disabled={isSubmitting}\n              error={errors.url}\n              id=\"webhook-url\"\n              label={\n                <label htmlFor=\"webhook-url\">\n                  {translate('webhooks.url')}\n                  <MandatoryFieldMarker />\n                </label>\n              }\n              name=\"url\"\n              onBlur={handleBlur}\n              onChange={handleChange}\n              touched={touched.url}\n              type=\"text\"\n              value={values.url}\n            />\n            <InputValidationField\n              description={translate('webhooks.secret.description')}\n              dirty={dirty}\n              disabled={isSubmitting}\n              error={errors.secret}\n              id=\"webhook-secret\"\n              label={<label htmlFor=\"webhook-secret\">{translate('webhooks.secret')}</label>}\n              name=\"secret\"\n              onBlur={handleBlur}\n              onChange={handleChange}\n              touched={touched.secret}\n              type=\"password\"\n              value={values.secret}\n            />\n          </>\n        )}\n      </ValidationModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../../components/controls/buttons';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport CreateWebhookForm from './CreateWebhookForm';\n\ninterface Props {\n  loading: boolean;\n  onCreate: (data: { name: string; secret?: string; url: string }) => Promise<void>;\n  webhooksCount: number;\n}\n\ninterface State {\n  openCreate: boolean;\n}\n\nconst WEBHOOKS_LIMIT = 10;\n\nexport default class PageActions extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { openCreate: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleCreateClose = () => {\n    if (this.mounted) {\n      this.setState({ openCreate: false });\n    }\n  };\n\n  handleCreateOpen = () => {\n    this.setState({ openCreate: true });\n  };\n\n  renderCreate = () => {\n    if (this.props.webhooksCount >= WEBHOOKS_LIMIT) {\n      return (\n        <Tooltip overlay={translateWithParameters('webhooks.maximum_reached', WEBHOOKS_LIMIT)}>\n          <Button className=\"js-webhook-create disabled\">{translate('create')}</Button>\n        </Tooltip>\n      );\n    }\n\n    return (\n      <>\n        <Button className=\"js-webhook-create\" onClick={this.handleCreateOpen}>\n          {translate('create')}\n        </Button>\n        {this.state.openCreate && (\n          <CreateWebhookForm onClose={this.handleCreateClose} onDone={this.props.onCreate} />\n        )}\n      </>\n    );\n  };\n\n  render() {\n    if (this.props.loading) {\n      return null;\n    }\n\n    return <div className=\"page-actions\">{this.renderCreate()}</div>;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  children?: React.ReactNode;\n  loading: boolean;\n}\n\nexport default function PageHeader({ children, loading }: Props) {\n  return (\n    <header className=\"page-header\">\n      <h1 className=\"page-title\">{translate('webhooks.page')}</h1>\n      {loading && <i className=\"spinner\" />}\n\n      {children}\n\n      <p className=\"page-description\">\n        <FormattedMessage\n          defaultMessage={translate('webhooks.description')}\n          id=\"webhooks.description\"\n          values={{\n            url: (\n              <Link to=\"/documentation/project-administration/webhooks/\">\n                {translate('webhooks.documentation_link')}\n              </Link>\n            )\n          }}\n        />\n      </p>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\n\ninterface Props {\n  onClose: () => void;\n  onSubmit: () => Promise<void>;\n  webhook: T.Webhook;\n}\n\nexport default function DeleteWebhookForm({ onClose, onSubmit, webhook }: Props) {\n  const header = translate('webhooks.delete');\n\n  return (\n    <SimpleModal header={header} onClose={onClose} onSubmit={onSubmit}>\n      {({ onCloseClick, onFormSubmit, submitting }) => (\n        <form onSubmit={onFormSubmit}>\n          <header className=\"modal-head\">\n            <h2>{header}</h2>\n          </header>\n\n          <div className=\"modal-body\">\n            {translateWithParameters('webhooks.delete.confirm', webhook.name)}\n          </div>\n\n          <footer className=\"modal-foot\">\n            <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n            <SubmitButton className=\"button-red\" disabled={submitting}>\n              {translate('delete')}\n            </SubmitButton>\n            <ResetButtonLink disabled={submitting} onClick={onCloseClick}>\n              {translate('cancel')}\n            </ResetButtonLink>\n          </footer>\n        </form>\n      )}\n    </SimpleModal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport CodeSnippet from '../../../components/common/CodeSnippet';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\n\ninterface Props {\n  className?: string;\n  delivery: T.WebhookDelivery;\n  loading: boolean;\n  payload: string | undefined;\n}\n\nexport default function DeliveryItem({ className, delivery, loading, payload }: Props) {\n  return (\n    <div className={className}>\n      <p className=\"spacer-bottom\">\n        {translateWithParameters(\n          'webhooks.delivery.response_x',\n          delivery.httpStatus || translate('webhooks.delivery.server_unreachable')\n        )}\n      </p>\n      <p className=\"spacer-bottom\">\n        {translateWithParameters(\n          'webhooks.delivery.duration_x',\n          formatMeasure(delivery.durationMs, 'MILLISEC')\n        )}\n      </p>\n      <p className=\"spacer-bottom\">{translate('webhooks.delivery.payload')}</p>\n      <DeferredSpinner className=\"spacer-left spacer-top\" loading={loading}>\n        {payload && <CodeSnippet noCopy={true} snippet={formatPayload(payload)} />}\n      </DeferredSpinner>\n    </div>\n  );\n}\n\nfunction formatPayload(payload: string) {\n  try {\n    return JSON.stringify(JSON.parse(payload), undefined, 2);\n  } catch (error) {\n    return payload;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getDelivery } from '../../../api/webhooks';\nimport BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion';\nimport AlertErrorIcon from '../../../components/icons/AlertErrorIcon';\nimport AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport DeliveryItem from './DeliveryItem';\n\ninterface Props {\n  delivery: T.WebhookDelivery;\n}\n\ninterface State {\n  loading: boolean;\n  open: boolean;\n  payload?: string;\n}\n\nexport default class DeliveryAccordion extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false, open: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchPayload = ({ delivery } = this.props) => {\n    this.setState({ loading: true });\n    return getDelivery({ deliveryId: delivery.id }).then(\n      ({ delivery }) => {\n        if (this.mounted) {\n          this.setState({ payload: delivery.payload, loading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  formatPayload = (payload: string) => {\n    try {\n      return JSON.stringify(JSON.parse(payload), undefined, 2);\n    } catch (error) {\n      return payload;\n    }\n  };\n\n  handleClick = () => {\n    if (!this.state.payload) {\n      this.fetchPayload();\n    }\n    this.setState(({ open }) => ({ open: !open }));\n  };\n\n  render() {\n    const { delivery } = this.props;\n    const { loading, open, payload } = this.state;\n\n    return (\n      <BoxedGroupAccordion\n        onClick={this.handleClick}\n        open={open}\n        renderHeader={() =>\n          delivery.success ? (\n            <AlertSuccessIcon className=\"pull-right js-success\" />\n          ) : (\n            <AlertErrorIcon className=\"pull-right js-error\" />\n          )\n        }\n        title={<DateTimeFormatter date={delivery.at} />}>\n        <DeliveryItem\n          className=\"big-spacer-left\"\n          delivery={delivery}\n          loading={loading}\n          payload={payload}\n        />\n      </BoxedGroupAccordion>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { searchDeliveries } from '../../../api/webhooks';\nimport { ResetButtonLink } from '../../../components/controls/buttons';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport Modal from '../../../components/controls/Modal';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport DeliveryAccordion from './DeliveryAccordion';\n\ninterface Props {\n  onClose: () => void;\n  webhook: T.Webhook;\n}\n\ninterface State {\n  deliveries: T.WebhookDelivery[];\n  loading: boolean;\n  paging?: T.Paging;\n}\n\nconst PAGE_SIZE = 10;\n\nexport default class DeliveriesForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { deliveries: [], loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchDeliveries();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchDeliveries = ({ webhook } = this.props) => {\n    searchDeliveries({ webhook: webhook.key, ps: PAGE_SIZE }).then(({ deliveries, paging }) => {\n      if (this.mounted) {\n        this.setState({ deliveries, loading: false, paging });\n      }\n    }, this.stopLoading);\n  };\n\n  fetchMoreDeliveries = ({ webhook } = this.props) => {\n    const { paging } = this.state;\n    if (paging) {\n      this.setState({ loading: true });\n      searchDeliveries({ webhook: webhook.key, p: paging.pageIndex + 1, ps: PAGE_SIZE }).then(\n        ({ deliveries, paging }) => {\n          if (this.mounted) {\n            this.setState((state: State) => ({\n              deliveries: [...state.deliveries, ...deliveries],\n              loading: false,\n              paging\n            }));\n          }\n        },\n        this.stopLoading\n      );\n    }\n  };\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  render() {\n    const { webhook } = this.props;\n    const { deliveries, loading, paging } = this.state;\n    const header = translateWithParameters('webhooks.deliveries_for_x', webhook.name);\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n        <div className=\"modal-body modal-container\">\n          {deliveries.map(delivery => (\n            <DeliveryAccordion delivery={delivery} key={delivery.id} />\n          ))}\n          <div className=\"text-center\">\n            <DeferredSpinner loading={loading} />\n          </div>\n          {paging !== undefined && (\n            <ListFooter\n              className=\"little-spacer-bottom\"\n              count={deliveries.length}\n              loadMore={this.fetchMoreDeliveries}\n              ready={!loading}\n              total={paging.total}\n            />\n          )}\n        </div>\n        <footer className=\"modal-foot\">\n          <ResetButtonLink className=\"js-modal-close\" onClick={this.props.onClose}>\n            {translate('close')}\n          </ResetButtonLink>\n        </footer>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ActionsDropdown, {\n  ActionsDropdownDivider,\n  ActionsDropdownItem\n} from '../../../components/controls/ActionsDropdown';\nimport { translate } from '../../../helpers/l10n';\nimport CreateWebhookForm from './CreateWebhookForm';\nimport DeleteWebhookForm from './DeleteWebhookForm';\nimport DeliveriesForm from './DeliveriesForm';\n\ninterface Props {\n  onDelete: (webhook: string) => Promise<void>;\n  onUpdate: (data: { webhook: string; name: string; url: string }) => Promise<void>;\n  webhook: T.Webhook;\n}\n\ninterface State {\n  deleting: boolean;\n  deliveries: boolean;\n  updating: boolean;\n}\n\nexport default class WebhookActions extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { deleting: false, deliveries: false, updating: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleDelete = () => {\n    return this.props.onDelete(this.props.webhook.key);\n  };\n\n  handleDeleteClick = () => {\n    this.setState({ deleting: true });\n  };\n\n  handleDeletingStop = () => {\n    if (this.mounted) {\n      this.setState({ deleting: false });\n    }\n  };\n\n  handleDeliveriesClick = () => {\n    this.setState({ deliveries: true });\n  };\n\n  handleDeliveriesStop = () => {\n    this.setState({ deliveries: false });\n  };\n\n  handleUpdate = (data: { name: string; url: string }) => {\n    return this.props.onUpdate({ ...data, webhook: this.props.webhook.key });\n  };\n\n  handleUpdateClick = () => {\n    this.setState({ updating: true });\n  };\n\n  handleUpdatingStop = () => {\n    this.setState({ updating: false });\n  };\n\n  render() {\n    const { webhook } = this.props;\n    return (\n      <>\n        <ActionsDropdown className=\"big-spacer-left\">\n          <ActionsDropdownItem className=\"js-webhook-update\" onClick={this.handleUpdateClick}>\n            {translate('update_verb')}\n          </ActionsDropdownItem>\n          {webhook.latestDelivery && (\n            <ActionsDropdownItem\n              className=\"js-webhook-deliveries\"\n              onClick={this.handleDeliveriesClick}>\n              {translate('webhooks.deliveries.show')}\n            </ActionsDropdownItem>\n          )}\n          <ActionsDropdownDivider />\n          <ActionsDropdownItem\n            className=\"js-webhook-delete\"\n            destructive={true}\n            onClick={this.handleDeleteClick}>\n            {translate('delete')}\n          </ActionsDropdownItem>\n        </ActionsDropdown>\n\n        {this.state.deliveries && (\n          <DeliveriesForm onClose={this.handleDeliveriesStop} webhook={webhook} />\n        )}\n\n        {this.state.updating && (\n          <CreateWebhookForm\n            onClose={this.handleUpdatingStop}\n            onDone={this.handleUpdate}\n            webhook={webhook}\n          />\n        )}\n\n        {this.state.deleting && (\n          <DeleteWebhookForm\n            onClose={this.handleDeletingStop}\n            onSubmit={this.handleDelete}\n            webhook={webhook}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getDelivery } from '../../../api/webhooks';\nimport { ResetButtonLink } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport DeliveryItem from './DeliveryItem';\n\ninterface Props {\n  delivery: T.WebhookDelivery;\n  onClose: () => void;\n  webhook: T.Webhook;\n}\n\ninterface State {\n  loading: boolean;\n  payload?: string;\n}\n\nexport default class LatestDeliveryForm extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchPayload();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchPayload = ({ delivery } = this.props) => {\n    return getDelivery({ deliveryId: delivery.id }).then(\n      ({ delivery }) => {\n        if (this.mounted) {\n          this.setState({ payload: delivery.payload, loading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  formatPayload = (payload: string) => {\n    try {\n      return JSON.stringify(JSON.parse(payload), undefined, 2);\n    } catch (error) {\n      return payload;\n    }\n  };\n\n  render() {\n    const { delivery, webhook } = this.props;\n    const { loading, payload } = this.state;\n    const header = translateWithParameters('webhooks.latest_delivery_for_x', webhook.name);\n\n    return (\n      <Modal contentLabel={header} onRequestClose={this.props.onClose}>\n        <header className=\"modal-head\">\n          <h2>{header}</h2>\n        </header>\n        <DeliveryItem\n          className=\"modal-body modal-container\"\n          delivery={delivery}\n          loading={loading}\n          payload={payload}\n        />\n        <footer className=\"modal-foot\">\n          <ResetButtonLink className=\"js-modal-close\" onClick={this.props.onClose}>\n            {translate('close')}\n          </ResetButtonLink>\n        </footer>\n      </Modal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonIcon } from '../../../components/controls/buttons';\nimport AlertErrorIcon from '../../../components/icons/AlertErrorIcon';\nimport AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';\nimport BulletListIcon from '../../../components/icons/BulletListIcon';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport { translate } from '../../../helpers/l10n';\nimport LatestDeliveryForm from './LatestDeliveryForm';\n\ninterface Props {\n  webhook: T.Webhook;\n}\n\ninterface State {\n  modal: boolean;\n}\n\nexport default class WebhookItemLatestDelivery extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { modal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleClick = () => {\n    this.setState({ modal: true });\n  };\n\n  handleModalClose = () => {\n    if (this.mounted) {\n      this.setState({ modal: false });\n    }\n  };\n\n  render() {\n    const { webhook } = this.props;\n    if (!webhook.latestDelivery) {\n      return <span>{translate('webhooks.last_execution.none')}</span>;\n    }\n\n    const { modal } = this.state;\n    return (\n      <>\n        {webhook.latestDelivery.success ? (\n          <AlertSuccessIcon className=\"text-text-top\" />\n        ) : (\n          <AlertErrorIcon className=\"text-text-top\" />\n        )}\n        <span className=\"spacer-left display-inline-flex-center\">\n          <DateTimeFormatter date={webhook.latestDelivery.at} />\n          <ButtonIcon className=\"button-small little-spacer-left\" onClick={this.handleClick}>\n            <BulletListIcon />\n          </ButtonIcon>\n        </span>\n\n        {modal && (\n          <LatestDeliveryForm\n            delivery={webhook.latestDelivery}\n            onClose={this.handleModalClose}\n            webhook={webhook}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport WebhookActions from './WebhookActions';\nimport WebhookItemLatestDelivery from './WebhookItemLatestDelivery';\n\ninterface Props {\n  onDelete: (webhook: string) => Promise<void>;\n  onUpdate: (data: { webhook: string; name: string; url: string }) => Promise<void>;\n  webhook: T.Webhook;\n}\n\nexport default function WebhookItem({ onDelete, onUpdate, webhook }: Props) {\n  return (\n    <tr>\n      <td>{webhook.name}</td>\n      <td>{webhook.url}</td>\n      <td>{webhook.secret ? translate('yes') : translate('no')}</td>\n      <td>\n        <WebhookItemLatestDelivery webhook={webhook} />\n      </td>\n      <td className=\"thin nowrap text-right\">\n        <WebhookActions onDelete={onDelete} onUpdate={onUpdate} webhook={webhook} />\n      </td>\n    </tr>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport WebhookItem from './WebhookItem';\n\ninterface Props {\n  onDelete: (webhook: string) => Promise<void>;\n  onUpdate: (data: { webhook: string; name: string; url: string }) => Promise<void>;\n  webhooks: T.Webhook[];\n}\n\nexport default class WebhooksList extends React.PureComponent<Props> {\n  renderHeader = () => (\n    <thead>\n      <tr>\n        <th>{translate('name')}</th>\n        <th>{translate('webhooks.url')}</th>\n        <th>{translate('webhooks.secret_header')}</th>\n        <th>{translate('webhooks.last_execution')}</th>\n        <th />\n      </tr>\n    </thead>\n  );\n\n  render() {\n    const { webhooks } = this.props;\n    if (webhooks.length < 1) {\n      return <p>{translate('webhooks.no_result')}</p>;\n    }\n    return (\n      <table className=\"data zebra\">\n        {this.renderHeader()}\n        <tbody>\n          {sortBy(webhooks, webhook => webhook.name.toLowerCase()).map(webhook => (\n            <WebhookItem\n              key={webhook.key}\n              onDelete={this.props.onDelete}\n              onUpdate={this.props.onUpdate}\n              webhook={webhook}\n            />\n          ))}\n        </tbody>\n      </table>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { createWebhook, deleteWebhook, searchWebhooks, updateWebhook } from '../../../api/webhooks';\nimport Suggestions from '../../../app/components/embed-docs-modal/Suggestions';\nimport { translate } from '../../../helpers/l10n';\nimport PageActions from './PageActions';\nimport PageHeader from './PageHeader';\nimport WebhooksList from './WebhooksList';\n\ninterface Props {\n  component?: T.LightComponent;\n}\n\ninterface State {\n  loading: boolean;\n  webhooks: T.Webhook[];\n}\n\nexport default class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true, webhooks: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchWebhooks();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchWebhooks = () => {\n    return searchWebhooks(this.getScopeParams()).then(\n      ({ webhooks }) => {\n        if (this.mounted) {\n          this.setState({ loading: false, webhooks });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  getScopeParams = ({ component } = this.props) => {\n    return {\n      project: component && component.key\n    };\n  };\n\n  handleCreate = (data: { name: string; secret?: string; url: string }) => {\n    const createData = {\n      name: data.name,\n      url: data.url,\n      ...(data.secret && { secret: data.secret }),\n      ...this.getScopeParams()\n    };\n\n    return createWebhook(createData).then(({ webhook }) => {\n      if (this.mounted) {\n        this.setState(({ webhooks }) => ({ webhooks: [...webhooks, webhook] }));\n      }\n    });\n  };\n\n  handleDelete = (webhook: string) => {\n    return deleteWebhook({ webhook }).then(() => {\n      if (this.mounted) {\n        this.setState(({ webhooks }) => ({\n          webhooks: webhooks.filter(item => item.key !== webhook)\n        }));\n      }\n    });\n  };\n\n  handleUpdate = (data: { webhook: string; name: string; secret?: string; url: string }) => {\n    const udpateData = {\n      webhook: data.webhook,\n      name: data.name,\n      url: data.url,\n      ...(data.secret && { secret: data.secret })\n    };\n\n    return updateWebhook(udpateData).then(() => {\n      if (this.mounted) {\n        this.setState(({ webhooks }) => ({\n          webhooks: webhooks.map(webhook =>\n            webhook.key === data.webhook\n              ? { ...webhook, name: data.name, secret: data.secret, url: data.url }\n              : webhook\n          )\n        }));\n      }\n    });\n  };\n\n  render() {\n    const { loading, webhooks } = this.state;\n\n    return (\n      <>\n        <Suggestions suggestions=\"webhooks\" />\n        <Helmet defer={false} title={translate('webhooks.page')} />\n\n        <div className=\"page page-limited\">\n          <PageHeader loading={loading}>\n            <PageActions\n              loading={loading}\n              onCreate={this.handleCreate}\n              webhooksCount={webhooks.length}\n            />\n          </PageHeader>\n\n          {!loading && (\n            <div className=\"boxed-group boxed-group-inner\">\n              <WebhooksList\n                onDelete={this.handleDelete}\n                onUpdate={this.handleUpdate}\n                webhooks={webhooks}\n              />\n            </div>\n          )}\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\n\nconst routes = [\n  {\n    indexRoute: { component: lazyLoadComponent(() => import('./components/App')) }\n  }\n];\n\nexport default routes;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { createContext } from 'react';\nimport { IndexationContextInterface } from '../../../types/indexation';\n\nexport const IndexationContext = createContext<IndexationContextInterface | null>(null);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { IndexationContext } from '../../app/components/indexation/IndexationContext';\nimport { IndexationContextInterface } from '../../types/indexation';\nimport { getWrappedDisplayName } from './utils';\n\nexport interface WithIndexationContextProps {\n  indexationContext: IndexationContextInterface;\n}\n\nexport default function withIndexationContext<P>(\n  WrappedComponent: React.ComponentType<P & WithIndexationContextProps>\n) {\n  return class WithIndexationContext extends React.PureComponent<\n    Omit<P, keyof WithIndexationContextProps>\n  > {\n    static displayName = getWrappedDisplayName(WrappedComponent, 'withIndexationContext');\n\n    render() {\n      return (\n        <IndexationContext.Consumer>\n          {indexationContext => {\n            if (indexationContext) {\n              return (\n                <WrappedComponent indexationContext={indexationContext} {...(this.props as P)} />\n              );\n            }\n\n            return null;\n          }}\n        </IndexationContext.Consumer>\n      );\n    }\n  };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport withIndexationContext, {\n  WithIndexationContextProps\n} from '../../../components/hoc/withIndexationContext';\nimport { Alert } from '../../../components/ui/Alert';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props extends WithIndexationContextProps {\n  pageContext?: PageContext;\n  component?: Pick<T.Component, 'qualifier' | 'name'>;\n}\n\nexport enum PageContext {\n  Issues = 'issues',\n  Portfolios = 'portfolios'\n}\n\nexport class PageUnavailableDueToIndexation extends React.PureComponent<Props> {\n  componentDidUpdate() {\n    if (\n      this.props.indexationContext.status.isCompleted &&\n      !this.props.indexationContext.status.hasFailures\n    ) {\n      window.location.reload();\n    }\n  }\n\n  render() {\n    const { pageContext, component } = this.props;\n    let messageKey = 'indexation.page_unavailable.title';\n\n    if (pageContext) {\n      messageKey = `${messageKey}.${pageContext}`;\n    }\n\n    return (\n      <div className=\"page-wrapper-simple\">\n        <div className=\"page-simple\">\n          <h1 className=\"big-spacer-bottom\">\n            <FormattedMessage\n              id={messageKey}\n              defaultMessage={translate(messageKey)}\n              values={{\n                componentQualifier: translate('qualifier', component?.qualifier ?? ''),\n                componentName: <em>{component?.name}</em>\n              }}\n            />\n          </h1>\n          <Alert variant=\"info\">\n            <p>{translate('indexation.page_unavailable.description')}</p>\n            <p className=\"spacer-top\">\n              {translate('indexation.page_unavailable.description.additional_information')}\n            </p>\n          </Alert>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default withIndexationContext(PageUnavailableDueToIndexation);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { IndexationContext } from '../../app/components/indexation/IndexationContext';\nimport PageUnavailableDueToIndexation, {\n  PageContext\n} from '../../app/components/indexation/PageUnavailableDueToIndexation';\n\nexport default function withIndexationGuard<P>(\n  WrappedComponent: React.ComponentType<P>,\n  pageContext: PageContext\n) {\n  return class WithIndexationGuard extends React.PureComponent<P> {\n    render() {\n      return (\n        <IndexationContext.Consumer>\n          {context =>\n            context?.status.isCompleted && !context?.status.hasFailures ? (\n              <WrappedComponent {...this.props} />\n            ) : (\n              <PageUnavailableDueToIndexation pageContext={pageContext} />\n            )\n          }\n        </IndexationContext.Consumer>\n      );\n    }\n  };\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport Modal from '../../components/controls/Modal';\nimport { translate } from '../../helpers/l10n';\n\ntype Shortcuts = Array<{\n  category: string;\n  shortcuts: Array<{\n    keys: string[];\n    action: string;\n  }>;\n}>;\n\nconst CATEGORIES: { left: Shortcuts; right: Shortcuts } = {\n  left: [\n    {\n      category: 'global',\n      shortcuts: [\n        { keys: ['s'], action: 'search' },\n        { keys: ['?'], action: 'open_shortcuts' }\n      ]\n    },\n    {\n      category: 'issues_page',\n      shortcuts: [\n        { keys: ['\u2191', '\u2193'], action: 'navigate' },\n        { keys: ['\u2192'], action: 'source_code' },\n        { keys: ['\u2190'], action: 'back' },\n        { keys: ['alt', '+', '\u2191', '\u2193'], action: 'navigate_locations' },\n        { keys: ['alt', '+', '\u2190', '\u2192'], action: 'switch_flows' },\n        { keys: ['f'], action: 'transition' },\n        { keys: ['a'], action: 'assign' },\n        { keys: ['m'], action: 'assign_to_me' },\n        { keys: ['i'], action: 'severity' },\n        { keys: ['c'], action: 'comment' },\n        { keys: ['ctrl', '+', 'enter'], action: 'submit_comment' },\n        { keys: ['t'], action: 'tags' }\n      ]\n    }\n  ],\n  right: [\n    {\n      category: 'code_page',\n      shortcuts: [\n        { keys: ['\u2191', '\u2193'], action: 'select_files' },\n        { keys: ['\u2192'], action: 'open_file' },\n        { keys: ['\u2190'], action: 'back' }\n      ]\n    },\n    {\n      category: 'measures_page',\n      shortcuts: [\n        { keys: ['\u2191', '\u2193'], action: 'select_files' },\n        { keys: ['\u2192'], action: 'open_file' },\n        { keys: ['\u2190'], action: 'back' }\n      ]\n    },\n    {\n      category: 'rules_page',\n      shortcuts: [\n        { keys: ['\u2191', '\u2193'], action: 'navigate' },\n        { keys: ['\u2192'], action: 'rule_details' },\n        { keys: ['\u2190'], action: 'back' }\n      ]\n    }\n  ]\n};\n\nfunction renderShortcuts(list: Shortcuts) {\n  return (\n    <>\n      {list.map(({ category, shortcuts }) => (\n        <div key={category} className=\"spacer-bottom\">\n          <h3 className=\"null-spacer-top\">{translate('keyboard_shortcuts', category, 'title')}</h3>\n          <table>\n            <thead>\n              <tr>\n                <th>{translate('keyboard_shortcuts.shortcut')}</th>\n                <th>{translate('keyboard_shortcuts.action')}</th>\n              </tr>\n            </thead>\n            <tbody>\n              {shortcuts.map(({ action, keys }) => (\n                <tr key={action}>\n                  <td>\n                    {keys.map(k =>\n                      k === '+' ? (\n                        <span key={k} className=\"little-spacer-right\">\n                          {k}\n                        </span>\n                      ) : (\n                        <code key={k} className=\"little-spacer-right\">\n                          {k}\n                        </code>\n                      )\n                    )}\n                  </td>\n                  <td>{translate('keyboard_shortcuts', category, action)}</td>\n                </tr>\n              ))}\n            </tbody>\n          </table>\n        </div>\n      ))}\n    </>\n  );\n}\n\nexport default function KeyboardShortcutsModal() {\n  const [display, setDisplay] = React.useState(false);\n\n  React.useEffect(() => {\n    const handleKeyPress = (event: KeyboardEvent) => {\n      const { tagName } = event.target as HTMLElement;\n\n      if (['INPUT', 'SELECT', 'TEXTAREA'].includes(tagName)) {\n        return; // Ignore keys when typed in an input\n      }\n\n      if (event.key === '?') {\n        setDisplay(d => !d);\n      }\n    };\n\n    window.addEventListener('keypress', handleKeyPress);\n\n    return () => {\n      window.removeEventListener('keypress', handleKeyPress);\n    };\n  }, [setDisplay]);\n\n  if (!display) {\n    return null;\n  }\n\n  const title = translate('keyboard_shortcuts.title');\n\n  return (\n    <Modal contentLabel={title} onRequestClose={() => setDisplay(false)} size=\"medium\">\n      <div className=\"modal-head\">\n        <h2>{title}</h2>\n      </div>\n\n      <div className=\"modal-body modal-container markdown display-flex-start shortcuts-modal\">\n        <div className=\"flex-1\">{renderShortcuts(CATEGORIES.left)}</div>\n        <div className=\"flex-1 huge-spacer-left\">{renderShortcuts(CATEGORIES.right)}</div>\n      </div>\n\n      <div className=\"modal-foot\">\n        <Button onClick={() => setDisplay(false)}>{translate('close')}</Button>\n      </div>\n    </Modal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n// The body of the `gtm` function comes from Google Tag Manager docs; let's keep it like it was written.\n// @ts-ignore\n// prettier-ignore\n// eslint-disable-next-line\nconst gtm = id => (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});const f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);}(window,document,'script','dataLayer',id));\n\nmodule.exports = { gtm };\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { FormattedMessage } from 'react-intl';\nimport NotFound from '../../../app/components/NotFound';\nimport ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown';\nimport BoxedTabs from '../../../components/controls/BoxedTabs';\nimport {\n  Button,\n  EditButton,\n  ResetButtonLink,\n  SubmitButton\n} from '../../../components/controls/buttons';\nimport Checkbox from '../../../components/controls/Checkbox';\nimport ConfirmButton from '../../../components/controls/ConfirmButton';\nimport Dropdown from '../../../components/controls/Dropdown';\nimport Favorite from '../../../components/controls/Favorite';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport HomePageSelect from '../../../components/controls/HomePageSelect';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport Modal from '../../../components/controls/Modal';\nimport Radio from '../../../components/controls/Radio';\nimport RadioToggle from '../../../components/controls/RadioToggle';\nimport ReloadButton from '../../../components/controls/ReloadButton';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport SearchSelect from '../../../components/controls/SearchSelect';\nimport Select from '../../../components/controls/Select';\nimport SelectList, { SelectListFilter } from '../../../components/controls/SelectList';\nimport SimpleModal from '../../../components/controls/SimpleModal';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport AlertErrorIcon from '../../../components/icons/AlertErrorIcon';\nimport AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';\nimport AlertWarnIcon from '../../../components/icons/AlertWarnIcon';\nimport BranchIcon from '../../../components/icons/BranchIcon';\nimport BranchLikeIcon from '../../../components/icons/BranchLikeIcon';\nimport CheckIcon from '../../../components/icons/CheckIcon';\nimport ClearIcon from '../../../components/icons/ClearIcon';\nimport DetachIcon from '../../../components/icons/DetachIcon';\nimport DropdownIcon from '../../../components/icons/DropdownIcon';\nimport HelpIcon from '../../../components/icons/HelpIcon';\nimport LockIcon from '../../../components/icons/LockIcon';\nimport PlusCircleIcon from '../../../components/icons/PlusCircleIcon';\nimport PullRequestIcon from '../../../components/icons/PullRequestIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon';\nimport VulnerabilityIcon from '../../../components/icons/VulnerabilityIcon';\nimport DateFormatter from '../../../components/intl/DateFormatter';\nimport DateFromNow from '../../../components/intl/DateFromNow';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport { Alert } from '../../../components/ui/Alert';\nimport CoverageRating from '../../../components/ui/CoverageRating';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport DuplicationsRating from '../../../components/ui/DuplicationsRating';\nimport Level from '../../../components/ui/Level';\nimport MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';\nimport Rating from '../../../components/ui/Rating';\nimport {\n  getBranchLikeQuery,\n  isBranch,\n  isMainBranch,\n  isPullRequest,\n  sortBranches\n} from '../../../helpers/branch-like';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport * as measures from '../../../helpers/measures';\nimport {\n  get,\n  getJSON,\n  getText,\n  omitNil,\n  parseError,\n  post,\n  postJSON,\n  postJSONBody,\n  request\n} from '../../../helpers/request';\nimport {\n  getStandards,\n  renderCWECategory,\n  renderOwaspTop10Category,\n  renderSansTop25Category,\n  renderSonarSourceSecurityCategory\n} from '../../../helpers/security-standard';\nimport {\n  getComponentIssuesUrl,\n  getComponentSecurityHotspotsUrl,\n  getRulesUrl\n} from '../../../helpers/urls';\nimport addGlobalSuccessMessage from '../../utils/addGlobalSuccessMessage';\nimport throwGlobalError from '../../utils/throwGlobalError';\nimport A11ySkipTarget from '../a11y/A11ySkipTarget';\nimport Suggestions from '../embed-docs-modal/Suggestions';\n\nconst exposeLibraries = () => {\n  const global = window as any;\n\n  global.SonarRequest = {\n    request,\n    get,\n    getJSON,\n    getText,\n    omitNil,\n    parseError,\n    post,\n    postJSON,\n    postJSONBody,\n    throwGlobalError,\n    addGlobalSuccessMessage\n  };\n  global.t = translate;\n  global.tp = translateWithParameters;\n\n  /**\n   * @deprecated since SonarQube 8.7\n   */\n  Object.defineProperty(global, 'SonarHelpers', {\n    get: () => {\n      // eslint-disable-next-line no-console\n      console.warn('SonarHelpers usages are deprecated since SonarQube 8.7');\n      return {\n        getBranchLikeQuery,\n        isBranch,\n        isMainBranch,\n        isPullRequest,\n        sortBranches,\n        getStandards,\n        renderCWECategory,\n        renderOwaspTop10Category,\n        renderSansTop25Category,\n        renderSonarSourceSecurityCategory,\n        getComponentIssuesUrl,\n        getComponentSecurityHotspotsUrl,\n        getRulesUrl\n      };\n    }\n  });\n\n  /**\n   * @deprecated since SonarQube 8.7\n   */\n  Object.defineProperty(global, 'SonarMeasures', {\n    get: () => {\n      // eslint-disable-next-line no-console\n      console.warn('SonarMeasures usages are deprecated since SonarQube 8.7');\n      return { ...measures };\n    }\n  });\n\n  /**\n   * @deprecated since SonarQube 8.7\n   */\n  Object.defineProperty(global, 'SonarComponents', {\n    get: () => {\n      // eslint-disable-next-line no-console\n      console.warn('SonarComponents usages are deprecated since SonarQube 8.7');\n      return {\n        A11ySkipTarget,\n        ActionsDropdown,\n        ActionsDropdownItem,\n        Alert,\n        AlertErrorIcon,\n        AlertSuccessIcon,\n        AlertWarnIcon,\n        BranchIcon: BranchLikeIcon,\n        BoxedTabs,\n        Button,\n        Checkbox,\n        CheckIcon,\n        ClearIcon,\n        ConfirmButton,\n        CoverageRating,\n        DateFormatter,\n        DateFromNow,\n        DateTimeFormatter,\n        DeferredSpinner,\n        DetachIcon,\n        Dropdown,\n        DropdownIcon,\n        DuplicationsRating,\n        EditButton,\n        Favorite,\n        FormattedMessage,\n        HelpIcon,\n        HelpTooltip,\n        HomePageSelect,\n        Level,\n        ListFooter,\n        LockIcon,\n        LongLivingBranchIcon: BranchIcon,\n        MandatoryFieldMarker,\n        MandatoryFieldsExplanation,\n        Modal,\n        NotFound,\n        PlusCircleIcon,\n        PullRequestIcon,\n        QualifierIcon,\n        Radio,\n        RadioToggle,\n        Rating,\n        ReloadButton,\n        ResetButtonLink,\n        SearchBox,\n        SearchSelect,\n        SecurityHotspotIcon,\n        Select,\n        SelectList,\n        SelectListFilter,\n        SimpleModal,\n        SubmitButton,\n        Suggestions,\n        Tooltip,\n        VulnerabilityIcon\n      };\n    }\n  });\n};\n\nexport default exposeLibraries;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getBaseUrl } from '../helpers/system';\nimport { getExtensionFromCache } from './extensionsHandler';\n\nlet librariesExposed = false;\n\nexport function installScript(url: string, target: 'body' | 'head' = 'body'): Promise<any> {\n  return new Promise(resolve => {\n    const scriptTag = document.createElement('script');\n    scriptTag.src = `${getBaseUrl()}${url}`;\n    scriptTag.onload = resolve;\n    document.getElementsByTagName(target)[0].appendChild(scriptTag);\n  });\n}\n\nexport async function getExtensionStart(key: string) {\n  const fromCache = getExtensionFromCache(key);\n  if (fromCache) {\n    return Promise.resolve(fromCache);\n  }\n\n  if (!librariesExposed) {\n    librariesExposed = true;\n    // Async import allows to reduce initial vendor bundle size\n    const exposeLibraries = (await import('../app/components/extensions/exposeLibraries')).default;\n    exposeLibraries();\n  }\n\n  await installScript(`/static/${key}.js`);\n\n  const start = getExtensionFromCache(key);\n  if (start) {\n    return start;\n  }\n  return Promise.reject();\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { Location, withRouter } from '../../components/hoc/withRouter';\nimport { gtm } from '../../helpers/analytics';\nimport { installScript } from '../../helpers/extensions';\nimport { getWebAnalyticsPageHandlerFromCache } from '../../helpers/extensionsHandler';\nimport { getInstance } from '../../helpers/system';\nimport { getAppState, getGlobalSettingValue, Store } from '../../store/rootReducer';\n\ninterface Props {\n  location: Location;\n  trackingIdGTM?: string;\n  webAnalytics?: string;\n}\n\ninterface State {\n  lastLocation?: string;\n}\n\nexport class PageTracker extends React.Component<Props, State> {\n  state: State = {};\n\n  componentDidMount() {\n    const { trackingIdGTM, webAnalytics } = this.props;\n\n    if (webAnalytics && !getWebAnalyticsPageHandlerFromCache()) {\n      installScript(webAnalytics, 'head');\n    }\n\n    if (trackingIdGTM) {\n      gtm(trackingIdGTM);\n    }\n  }\n\n  trackPage = () => {\n    const { location, trackingIdGTM } = this.props;\n    const { lastLocation } = this.state;\n    const { dataLayer } = window as any;\n    const locationChanged = location.pathname !== lastLocation;\n    const webAnalyticsPageChange = getWebAnalyticsPageHandlerFromCache();\n\n    if (webAnalyticsPageChange && locationChanged) {\n      this.setState({ lastLocation: location.pathname });\n      setTimeout(() => webAnalyticsPageChange(location.pathname), 500);\n    } else if (dataLayer && dataLayer.push && trackingIdGTM && location.pathname !== '/') {\n      this.setState({ lastLocation: location.pathname });\n      setTimeout(() => dataLayer.push({ event: 'render-end' }), 500);\n    }\n  };\n\n  render() {\n    const { trackingIdGTM, webAnalytics } = this.props;\n\n    return (\n      <Helmet\n        defaultTitle={getInstance()}\n        defer={false}\n        onChangeClientState={trackingIdGTM || webAnalytics ? this.trackPage : undefined}>\n        {this.props.children}\n      </Helmet>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => {\n  const trackingIdGTM = getGlobalSettingValue(state, 'sonar.analytics.gtm.trackingId');\n  return {\n    trackingIdGTM: trackingIdGTM && trackingIdGTM.value,\n    webAnalytics: getAppState(state).webAnalyticsJsPath\n  };\n};\n\nexport default withRouter(connect(mapStateToProps)(PageTracker));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\nimport { fetchLanguages } from '../../store/rootActions';\nimport { getGlobalSettingValue, Store } from '../../store/rootReducer';\nimport KeyboardShortcutsModal from './KeyboardShortcutsModal';\n\nconst PageTracker = lazyLoadComponent(() => import('./PageTracker'));\n\ninterface Props {\n  fetchLanguages: () => void;\n  enableGravatar: boolean;\n  gravatarServerUrl: string;\n}\n\nexport class App extends React.PureComponent<Props> {\n  mounted = false;\n\n  componentDidMount() {\n    this.mounted = true;\n    this.props.fetchLanguages();\n    this.setScrollbarWidth();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  setScrollbarWidth = () => {\n    // See https://stackoverflow.com/questions/13382516/getting-scroll-bar-width-using-javascript\n    const outer = document.createElement('div');\n    outer.style.visibility = 'hidden';\n    outer.style.width = '100px';\n    outer.style.setProperty('msOverflowStyle', 'scrollbar');\n\n    document.body.appendChild(outer);\n\n    const widthNoScroll = outer.offsetWidth;\n    outer.style.overflow = 'scroll';\n\n    const inner = document.createElement('div');\n    inner.style.width = '100%';\n    outer.appendChild(inner);\n\n    const widthWithScroll = inner.offsetWidth;\n\n    if (outer.parentNode) {\n      outer.parentNode.removeChild(outer);\n    }\n\n    document.body.style.setProperty('--sbw', `${widthNoScroll - widthWithScroll}px`);\n  };\n\n  renderPreconnectLink = () => {\n    const parser = document.createElement('a');\n    parser.href = this.props.gravatarServerUrl;\n    if (parser.hostname !== window.location.hostname) {\n      return <link href={parser.origin} rel=\"preconnect\" />;\n    } else {\n      return null;\n    }\n  };\n\n  render() {\n    return (\n      <>\n        <PageTracker>{this.props.enableGravatar && this.renderPreconnectLink()}</PageTracker>\n        {this.props.children}\n        <KeyboardShortcutsModal />\n      </>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => {\n  const enableGravatar = getGlobalSettingValue(state, 'sonar.lf.enableGravatar');\n  const gravatarServerUrl = getGlobalSettingValue(state, 'sonar.lf.gravatarServerUrl');\n  return {\n    enableGravatar: Boolean(enableGravatar && enableGravatar.value === 'true'),\n    gravatarServerUrl: (gravatarServerUrl && gravatarServerUrl.value) || ''\n  };\n};\n\nconst mapDispatchToProps = { fetchLanguages };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(App);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\n\nexport default class WorkspacePortal extends React.PureComponent {\n  el: HTMLElement;\n\n  constructor(props: {}) {\n    super(props);\n    this.el = document.createElement('div');\n    this.el.classList.add('workspace');\n  }\n\n  componentDidMount() {\n    document.body.appendChild(this.el);\n  }\n\n  componentWillUnmount() {\n    document.body.removeChild(this.el);\n  }\n\n  render() {\n    return createPortal(this.props.children, this.el);\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport QualifierIcon from '../../components/icons/QualifierIcon';\nimport { collapsePath } from '../../helpers/path';\nimport { ComponentDescriptor } from './context';\n\ninterface Props {\n  component: ComponentDescriptor;\n  limited?: boolean;\n}\n\nexport default function WorkspaceComponentTitle({ component, limited }: Props) {\n  const { name = '\u2014' } = component;\n  return (\n    <>\n      {component.qualifier && (\n        <QualifierIcon className=\"little-spacer-right\" qualifier={component.qualifier} />\n      )}\n      {limited ? collapsePath(name, 15) : name}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ClearButton } from '../../components/controls/buttons';\n\nexport interface Props {\n  children: React.ReactNode;\n  onClose: () => void;\n  onOpen: () => void;\n}\n\nexport default class WorkspaceNavItem extends React.PureComponent<Props> {\n  handleNameClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.props.onOpen();\n  };\n\n  render() {\n    return (\n      <li className=\"workspace-nav-item\">\n        <a className=\"workspace-nav-item-link\" href=\"#\" onClick={this.handleNameClick}>\n          {this.props.children}\n        </a>\n        <ClearButton\n          className=\"js-close workspace-nav-item-close workspace-header-icon button-small little-spacer-left\"\n          color=\"#fff\"\n          iconProps={{ size: 12 }}\n          onClick={this.props.onClose}\n        />\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ComponentDescriptor } from './context';\nimport WorkspaceComponentTitle from './WorkspaceComponentTitle';\nimport WorkspaceNavItem from './WorkspaceNavItem';\n\nexport interface Props {\n  component: ComponentDescriptor;\n  onClose: (componentKey: string) => void;\n  onOpen: (componentKey: string) => void;\n}\n\nexport default class WorkspaceNavComponent extends React.PureComponent<Props> {\n  handleClose = () => {\n    this.props.onClose(this.props.component.key);\n  };\n\n  handleOpen = () => {\n    this.props.onOpen(this.props.component.key);\n  };\n\n  render() {\n    return (\n      <WorkspaceNavItem onClose={this.handleClose} onOpen={this.handleOpen}>\n        <WorkspaceComponentTitle component={this.props.component} limited={true} />\n      </WorkspaceNavItem>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function LightBulbIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M10.042 5.083a.3.3 0 0 1-.292.292.3.3 0 0 1-.292-.292c0-.629-.975-.875-1.458-.875a.3.3 0 0 1-.292-.291A.3.3 0 0 1 8 3.625c.848 0 2.042.447 2.042 1.458zm1.458 0c0-1.823-1.85-2.916-3.5-2.916S4.5 3.26 4.5 5.083c0 .584.237 1.194.62 1.641.173.2.373.392.556.602.647.774 1.194 1.686 1.285 2.716h2.078c.091-1.03.638-1.942 1.285-2.716.183-.21.383-.402.556-.602.383-.447.62-1.057.62-1.64zm1.167 0c0 .94-.31 1.75-.94 2.443-.628.693-1.457 1.668-1.53 2.643a.876.876 0 0 1 .428.748.852.852 0 0 1-.228.583.852.852 0 0 1 .228.583c0 .301-.155.575-.41.739a.89.89 0 0 1 .118.428c0 .592-.465.875-.993.875A1.479 1.479 0 0 1 8 15a1.479 1.479 0 0 1-1.34-.875c-.528 0-.993-.283-.993-.875 0-.146.045-.3.118-.428a.876.876 0 0 1-.41-.739c0-.218.082-.428.228-.583a.852.852 0 0 1-.228-.583c0-.301.164-.593.428-.748-.073-.975-.902-1.95-1.53-2.643a3.507 3.507 0 0 1-.94-2.443C3.333 2.604 5.694 1 8 1c2.306 0 4.667 1.604 4.667 4.083z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { colors } from '../../app/theme';\nimport LightBulbIcon from '../../components/icons/LightBulbIcon';\nimport { RuleDescriptor } from './context';\n\ninterface Props {\n  limited?: boolean;\n  rule: RuleDescriptor;\n}\n\nexport default function WorkspaceRuleTitle({ limited, rule }: Props) {\n  const { name = '\u2014' } = rule;\n  return (\n    <>\n      <LightBulbIcon className=\"little-spacer-right\" fill={colors.blue} />\n      {limited ? <span className=\"text-limited\">{name}</span> : name}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { RuleDescriptor } from './context';\nimport WorkspaceNavItem from './WorkspaceNavItem';\nimport WorkspaceRuleTitle from './WorkspaceRuleTitle';\n\nexport interface Props {\n  rule: RuleDescriptor;\n  onClose: (ruleKey: string) => void;\n  onOpen: (ruleKey: string) => void;\n}\n\nexport default class WorkspaceNavRule extends React.PureComponent<Props> {\n  handleClose = () => {\n    this.props.onClose(this.props.rule.key);\n  };\n\n  handleOpen = () => {\n    this.props.onOpen(this.props.rule.key);\n  };\n\n  render() {\n    return (\n      <WorkspaceNavItem onClose={this.handleClose} onOpen={this.handleOpen}>\n        <WorkspaceRuleTitle limited={true} rule={this.props.rule} />\n      </WorkspaceNavItem>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ComponentDescriptor, RuleDescriptor } from './context';\nimport WorkspaceNavComponent from './WorkspaceNavComponent';\nimport WorkspaceNavRule from './WorkspaceNavRule';\n\nexport interface Props {\n  components: ComponentDescriptor[];\n  rules: RuleDescriptor[];\n  onComponentClose: (componentKey: string) => void;\n  onComponentOpen: (componentKey: string) => void;\n  onRuleClose: (ruleKey: string) => void;\n  onRuleOpen: (ruleKey: string) => void;\n  open: { component?: string; rule?: string };\n}\n\nexport default function WorkspaceNav(props: Props) {\n  // do not show a tab for the currently open component/rule\n  const components = props.components.filter(x => x.key !== props.open.component);\n  const rules = props.rules.filter(x => x.key !== props.open.rule);\n\n  return (\n    <nav className=\"workspace-nav\">\n      <ul className=\"workspace-nav-list\">\n        {components.map(component => (\n          <WorkspaceNavComponent\n            component={component}\n            key={`component-${component.key}`}\n            onClose={props.onComponentClose}\n            onOpen={props.onComponentOpen}\n          />\n        ))}\n\n        {rules.map(rule => (\n          <WorkspaceNavRule\n            key={`rule-${rule.key}`}\n            onClose={props.onRuleClose}\n            onOpen={props.onRuleOpen}\n            rule={rule}\n          />\n        ))}\n      </ul>\n    </nav>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function CollapseIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8 8.509v3.56c0 .138-.05.257-.151.357-.1.101-.22.151-.358.151a.489.489 0 0 1-.357-.15l-1.145-1.145-2.638 2.639a.251.251 0 0 1-.366 0l-.906-.906a.251.251 0 0 1 0-.366l2.639-2.638-1.144-1.145a.489.489 0 0 1-.151-.357c0-.138.05-.257.15-.358.101-.1.22-.151.358-.151h3.56c.138 0 .257.05.358.151.1.1.151.22.151.358zm6-5.34c0 .068-.026.129-.08.182l-2.638 2.638 1.144 1.145c.101.1.151.22.151.357 0 .138-.05.257-.15.358-.101.1-.22.151-.358.151h-3.56a.489.489 0 0 1-.358-.151A.489.489 0 0 1 8 7.491v-3.56c0-.138.05-.257.151-.357.1-.101.22-.151.358-.151.137 0 .257.05.357.15l1.145 1.145 2.638-2.639a.251.251 0 0 1 .366 0l.906.906c.053.053.079.114.079.183z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ExpandIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M7.898 9.25a.247.247 0 0 1-.078.18l-2.593 2.593 1.125 1.125a.48.48 0 0 1 .148.352.48.48 0 0 1-.148.352A.48.48 0 0 1 6 14H2.5a.48.48 0 0 1-.352-.148A.48.48 0 0 1 2 13.5V10a.48.48 0 0 1 .148-.352A.48.48 0 0 1 2.5 9.5a.48.48 0 0 1 .352.148l1.125 1.125L6.57 8.18a.247.247 0 0 1 .36 0l.89.89a.247.247 0 0 1 .078.18zM14 2.5V6a.48.48 0 0 1-.148.352.48.48 0 0 1-.352.148.48.48 0 0 1-.352-.148l-1.125-1.125L9.43 7.82a.247.247 0 0 1-.36 0l-.89-.89a.247.247 0 0 1 0-.36l2.593-2.593-1.125-1.125A.48.48 0 0 1 9.5 2.5a.48.48 0 0 1 .148-.352A.48.48 0 0 1 10 2h3.5a.48.48 0 0 1 .352.148A.48.48 0 0 1 14 2.5z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function MinimizeIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M14 12.1v1.267c0 .176-.08.325-.239.448a.918.918 0 0 1-.58.185H2.819a.918.918 0 0 1-.58-.185C2.08 13.692 2 13.543 2 13.367V12.1c0-.176.08-.326.239-.449a.918.918 0 0 1 .58-.185h10.363c.227 0 .42.062.58.185.158.123.238.273.238.449z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { DraggableCore, DraggableData } from 'react-draggable';\nimport { ButtonIcon } from '../../components/controls/buttons';\nimport ClearIcon from '../../components/icons/ClearIcon';\nimport CollapseIcon from '../../components/icons/CollapseIcon';\nimport ExpandIcon from '../../components/icons/ExpandIcon';\nimport { IconProps } from '../../components/icons/Icon';\nimport MinimizeIcon from '../../components/icons/MinimizeIcon';\nimport { translate } from '../../helpers/l10n';\n\nexport interface Props {\n  children: React.ReactNode;\n  maximized?: boolean;\n  onClose: () => void;\n  onCollapse: () => void;\n  onMaximize: () => void;\n  onMinimize: () => void;\n  onResize: (deltaY: number) => void;\n}\n\nexport default class WorkspaceHeader extends React.PureComponent<Props> {\n  handleDrag = (_event: MouseEvent, data: DraggableData) => {\n    this.props.onResize(data.deltaY);\n  };\n\n  render() {\n    return (\n      <header className=\"workspace-viewer-header\">\n        <h6 className=\"workspace-viewer-name\">{this.props.children}</h6>\n\n        <DraggableCore offsetParent={document.body} onDrag={this.handleDrag}>\n          <div className=\"workspace-viewer-resize js-resize\" />\n        </DraggableCore>\n\n        <div className=\"workspace-viewer-actions\">\n          <WorkspaceHeaderButton\n            icon={MinimizeIcon}\n            onClick={this.props.onCollapse}\n            tooltip=\"workspace.minimize\"\n          />\n\n          {this.props.maximized ? (\n            <WorkspaceHeaderButton\n              icon={CollapseIcon}\n              onClick={this.props.onMinimize}\n              tooltip=\"workspace.normal_size\"\n            />\n          ) : (\n            <WorkspaceHeaderButton\n              icon={ExpandIcon}\n              onClick={this.props.onMaximize}\n              tooltip=\"workspace.full_window\"\n            />\n          )}\n\n          <WorkspaceHeaderButton\n            icon={ClearIcon}\n            onClick={this.props.onClose}\n            tooltip=\"workspace.close\"\n          />\n        </div>\n      </header>\n    );\n  }\n}\n\ninterface WorkspaceHeaderButtonProps {\n  icon: React.SFC<IconProps>;\n  onClick: () => void;\n  tooltip: string;\n}\n\nfunction WorkspaceHeaderButton({ icon: Icon, onClick, tooltip }: WorkspaceHeaderButtonProps) {\n  return (\n    <ButtonIcon\n      className=\"workspace-header-icon\"\n      color=\"#fff\"\n      onClick={onClick}\n      tooltip={translate(tooltip)}>\n      <Icon fill={undefined} />\n    </ButtonIcon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { keyBy } from 'lodash';\nimport * as React from 'react';\nimport { getRuleDetails, getRulesApp } from '../../api/rules';\nimport RuleDetailsDescription from '../../apps/coding-rules/components/RuleDetailsDescription';\nimport RuleDetailsMeta from '../../apps/coding-rules/components/RuleDetailsMeta';\nimport '../../apps/coding-rules/styles.css';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\n\ninterface Props {\n  onLoad: (details: { name: string }) => void;\n  ruleKey: string;\n}\n\ninterface State {\n  loading: boolean;\n  referencedRepositories: T.Dict<{ key: string; language: string; name: string }>;\n  ruleDetails?: T.RuleDetails;\n}\n\nexport default class WorkspaceRuleDetails extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true, referencedRepositories: {} };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchRuleDetails();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.ruleKey !== this.props.ruleKey) {\n      this.fetchRuleDetails();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchRuleDetails = () => {\n    this.setState({ loading: true });\n    Promise.all([getRulesApp(), getRuleDetails({ key: this.props.ruleKey })]).then(\n      ([{ repositories }, { rule }]) => {\n        if (this.mounted) {\n          this.setState({\n            loading: false,\n            referencedRepositories: keyBy(repositories, 'key'),\n            ruleDetails: rule\n          });\n          this.props.onLoad({ name: rule.name });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  noOp = () => {};\n\n  render() {\n    return (\n      <DeferredSpinner loading={this.state.loading}>\n        {this.state.ruleDetails && (\n          <>\n            <RuleDetailsMeta\n              canWrite={false}\n              hideSimilarRulesFilter={true}\n              onFilterChange={this.noOp}\n              onTagsChange={this.noOp}\n              referencedRepositories={this.state.referencedRepositories}\n              ruleDetails={this.state.ruleDetails}\n            />\n            <RuleDetailsDescription\n              canWrite={false}\n              onChange={this.noOp}\n              ruleDetails={this.state.ruleDetails}\n            />\n          </>\n        )}\n      </DeferredSpinner>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { RuleDescriptor } from './context';\nimport WorkspaceHeader, { Props as WorkspaceHeaderProps } from './WorkspaceHeader';\nimport WorkspaceRuleDetails from './WorkspaceRuleDetails';\nimport WorkspaceRuleTitle from './WorkspaceRuleTitle';\n\nexport interface Props extends T.Omit<WorkspaceHeaderProps, 'children' | 'onClose'> {\n  rule: RuleDescriptor;\n  height: number;\n  onClose: (componentKey: string) => void;\n  onLoad: (details: { key: string; name: string }) => void;\n}\n\ninterface State {\n  loading: boolean;\n}\n\nexport default class WorkspaceRuleViewer extends React.PureComponent<Props> {\n  state: State = { loading: true };\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.rule.key !== this.props.rule.key) {\n      this.setState({ loading: true });\n    }\n  }\n\n  handleClose = () => {\n    this.props.onClose(this.props.rule.key);\n  };\n\n  handleLoaded = (rule: { name: string }) => {\n    this.props.onLoad({ key: this.props.rule.key, name: rule.name });\n    // Allow time for the actual rendering, and the browser to pick it up.\n    setTimeout(() => {\n      this.setState({ loading: false });\n    }, 1000);\n  };\n\n  render() {\n    const { rule } = this.props;\n    const { loading } = this.state;\n\n    return (\n      <div className=\"workspace-viewer\">\n        <WorkspaceHeader\n          maximized={this.props.maximized}\n          onClose={this.handleClose}\n          onCollapse={this.props.onCollapse}\n          onMaximize={this.props.onMaximize}\n          onMinimize={this.props.onMinimize}\n          onResize={this.props.onResize}>\n          <WorkspaceRuleTitle rule={rule} />\n        </WorkspaceHeader>\n\n        <div\n          aria-busy={loading}\n          aria-live=\"polite\"\n          className=\"workspace-viewer-container\"\n          style={{ height: this.props.height }}>\n          <WorkspaceRuleDetails onLoad={this.handleLoaded} ruleKey={rule.key} />\n        </div>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getParents } from '../../api/components';\nimport { isPullRequest } from '../../helpers/branch-like';\nimport { scrollToElement } from '../../helpers/scrolling';\nimport { fetchBranchStatus } from '../../store/rootActions';\nimport { BranchLike } from '../../types/branch-like';\nimport SourceViewer from '../SourceViewer/SourceViewer';\nimport { ComponentDescriptor } from './context';\nimport WorkspaceComponentTitle from './WorkspaceComponentTitle';\nimport WorkspaceHeader, { Props as WorkspaceHeaderProps } from './WorkspaceHeader';\n\nexport interface Props extends T.Omit<WorkspaceHeaderProps, 'children' | 'onClose'> {\n  component: ComponentDescriptor;\n  fetchBranchStatus: (branchLike: BranchLike, projectKey: string) => Promise<void>;\n  height: number;\n  onClose: (componentKey: string) => void;\n  onLoad: (details: { key: string; name: string; qualifier: string }) => void;\n}\n\nexport class WorkspaceComponentViewer extends React.PureComponent<Props> {\n  container?: HTMLElement | null;\n\n  constructor(props: Props) {\n    super(props);\n    this.refreshBranchStatus = debounce(this.refreshBranchStatus, 1000);\n  }\n\n  componentDidMount() {\n    if (document.documentElement) {\n      document.documentElement.classList.add('with-workspace');\n    }\n  }\n\n  componentWillUnmount() {\n    if (document.documentElement) {\n      document.documentElement.classList.remove('with-workspace');\n    }\n  }\n\n  handleClose = () => {\n    this.props.onClose(this.props.component.key);\n  };\n\n  handleIssueChange = (_: T.Issue) => {\n    this.refreshBranchStatus();\n  };\n\n  handleLoaded = (component: T.SourceViewerFile) => {\n    this.props.onLoad({\n      key: this.props.component.key,\n      name: component.path,\n      qualifier: component.q\n    });\n\n    if (this.container && this.props.component.line) {\n      const row = this.container.querySelector(\n        `.source-line[data-line-number=\"${this.props.component.line}\"]`\n      );\n      if (row) {\n        scrollToElement(row, {\n          smooth: false,\n          parent: this.container,\n          topOffset: 50,\n          bottomOffset: 50\n        });\n      }\n    }\n  };\n\n  refreshBranchStatus = () => {\n    const { component } = this.props;\n    const { branchLike } = component;\n    if (branchLike && isPullRequest(branchLike)) {\n      getParents(component.key).then(\n        (parents?: any[]) => {\n          if (parents && parents.length > 0) {\n            this.props.fetchBranchStatus(branchLike, parents.pop().key);\n          }\n        },\n        () => {}\n      );\n    }\n  };\n\n  render() {\n    const { component } = this.props;\n\n    return (\n      <div className=\"workspace-viewer\">\n        <WorkspaceHeader\n          maximized={this.props.maximized}\n          onClose={this.handleClose}\n          onCollapse={this.props.onCollapse}\n          onMaximize={this.props.onMaximize}\n          onMinimize={this.props.onMinimize}\n          onResize={this.props.onResize}>\n          <WorkspaceComponentTitle component={component} />\n        </WorkspaceHeader>\n\n        <div\n          className=\"workspace-viewer-container\"\n          ref={node => (this.container = node)}\n          style={{ height: this.props.height }}>\n          <SourceViewer\n            aroundLine={component.line}\n            branchLike={component.branchLike}\n            component={component.key}\n            highlightedLine={component.line}\n            onIssueChange={this.handleIssueChange}\n            onLoaded={this.handleLoaded}\n          />\n        </div>\n      </div>\n    );\n  }\n}\n\nconst mapDispatchToProps = { fetchBranchStatus: fetchBranchStatus as any };\n\nexport default connect(null, mapDispatchToProps)(WorkspaceComponentViewer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { omit, uniqBy } from 'lodash';\nimport * as React from 'react';\nimport { getRulesApp } from '../../api/rules';\nimport { get, save } from '../../helpers/storage';\nimport { lazyLoadComponent } from '../lazyLoadComponent';\nimport { ComponentDescriptor, RuleDescriptor, WorkspaceContext } from './context';\nimport './styles.css';\nimport WorkspacePortal from './WorkspacePortal';\n\nconst WORKSPACE = 'sonarqube-workspace';\nconst WorkspaceNav = lazyLoadComponent(() => import('./WorkspaceNav'), 'WorkspaceNav');\nconst WorkspaceRuleViewer = lazyLoadComponent(\n  () => import('./WorkspaceRuleViewer'),\n  'WorkspaceRuleViewer'\n);\nconst WorkspaceComponentViewer = lazyLoadComponent(\n  () => import('./WorkspaceComponentViewer'),\n  'WorkspaceComponentViewer'\n);\n\ninterface State {\n  components: ComponentDescriptor[];\n  externalRulesRepoNames: T.Dict<string>;\n  height: number;\n  maximized?: boolean;\n  open: { component?: string; rule?: string };\n  rules: RuleDescriptor[];\n}\n\nexport const MIN_HEIGHT = 0.05;\nexport const MAX_HEIGHT = 0.85;\nexport const INITIAL_HEIGHT = 300;\n\nexport const TYPE_KEY = '__type__';\nexport enum WorkspaceTypes {\n  Rule = 'rule',\n  Component = 'component'\n}\n\nexport default class Workspace extends React.PureComponent<{}, State> {\n  mounted = false;\n\n  constructor(props: {}) {\n    super(props);\n    this.state = {\n      externalRulesRepoNames: {},\n      height: INITIAL_HEIGHT,\n      open: {},\n      ...this.loadWorkspace()\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchRuleNames();\n  }\n\n  componentDidUpdate(_: {}, prevState: State) {\n    if (prevState.components !== this.state.components || prevState.rules !== this.state.rules) {\n      this.saveWorkspace();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchRuleNames = async () => {\n    const { repositories } = await getRulesApp();\n    const externalRulesRepoNames: T.Dict<string> = {};\n    repositories\n      .filter(({ key }) => key.startsWith('external_'))\n      .forEach(({ key, name }) => {\n        externalRulesRepoNames[key.replace('external_', '')] = name;\n      });\n    this.setState({ externalRulesRepoNames });\n  };\n\n  loadWorkspace = () => {\n    try {\n      const data: any[] = JSON.parse(get(WORKSPACE) || '');\n      const components: ComponentDescriptor[] = data.filter(\n        x => x[TYPE_KEY] === WorkspaceTypes.Component\n      );\n      const rules: RuleDescriptor[] = data.filter(x => x[TYPE_KEY] === WorkspaceTypes.Rule);\n      return { components, rules };\n    } catch {\n      // Fail silently.\n      return { components: [], rules: [] };\n    }\n  };\n\n  saveWorkspace = () => {\n    const data = [\n      // Do not save line number, next time the file is open, it should be open\n      // on the first line.\n      ...this.state.components.map(x =>\n        omit({ ...x, [TYPE_KEY]: WorkspaceTypes.Component }, 'line')\n      ),\n      ...this.state.rules.map(x => ({ ...x, [TYPE_KEY]: WorkspaceTypes.Rule }))\n    ];\n    save(WORKSPACE, JSON.stringify(data));\n  };\n\n  handleOpenComponent = (component: ComponentDescriptor) => {\n    this.setState((state: State) => ({\n      components: uniqBy([...state.components, component], c => c.key),\n      open: { component: component.key }\n    }));\n  };\n\n  handleComponentReopen = (componentKey: string) => {\n    this.setState({ open: { component: componentKey } });\n  };\n\n  handleOpenRule = (rule: RuleDescriptor) => {\n    this.setState((state: State) => ({\n      open: { rule: rule.key },\n      rules: uniqBy([...state.rules, rule], r => r.key)\n    }));\n  };\n\n  handleRuleReopen = (ruleKey: string) => {\n    this.setState({ open: { rule: ruleKey } });\n  };\n\n  handleComponentClose = (componentKey: string) => {\n    this.setState((state: State) => ({\n      components: state.components.filter(x => x.key !== componentKey),\n      open: {\n        ...state.open,\n        component: state.open.component === componentKey ? undefined : state.open.component\n      }\n    }));\n  };\n\n  handleRuleClose = (ruleKey: string) => {\n    this.setState((state: State) => ({\n      rules: state.rules.filter(x => x.key !== ruleKey),\n      open: {\n        ...state.open,\n        rule: state.open.rule === ruleKey ? undefined : state.open.rule\n      }\n    }));\n  };\n\n  handleComponentLoad = (details: { key: string; name: string; qualifier: string }) => {\n    if (this.mounted) {\n      const { key, name, qualifier } = details;\n      this.setState((state: State) => ({\n        components: state.components.map(component =>\n          component.key === key ? { ...component, name, qualifier } : component\n        )\n      }));\n    }\n  };\n\n  handleRuleLoad = (details: { key: string; name: string }) => {\n    if (this.mounted) {\n      const { key, name } = details;\n      this.setState((state: State) => ({\n        rules: state.rules.map(rule => (rule.key === key ? { ...rule, name } : rule))\n      }));\n    }\n  };\n\n  handleCollapse = () => {\n    this.setState({ open: {} });\n  };\n\n  handleMaximize = () => {\n    this.setState({ maximized: true });\n  };\n\n  handleMinimize = () => {\n    this.setState({ maximized: false });\n  };\n\n  handleResize = (deltaY: number) => {\n    const minHeight = window.innerHeight * MIN_HEIGHT;\n    const maxHeight = window.innerHeight * MAX_HEIGHT;\n    this.setState((state: State) => ({\n      height: Math.min(maxHeight, Math.max(minHeight, state.height - deltaY))\n    }));\n  };\n\n  render() {\n    const { components, externalRulesRepoNames, height, maximized, open, rules } = this.state;\n\n    const openComponent = open.component && components.find(x => x.key === open.component);\n    const openRule = open.rule && rules.find(x => x.key === open.rule);\n\n    const actualHeight = maximized ? window.innerHeight * MAX_HEIGHT : height;\n\n    return (\n      <WorkspaceContext.Provider\n        value={{\n          externalRulesRepoNames,\n          openComponent: this.handleOpenComponent,\n          openRule: this.handleOpenRule\n        }}>\n        {this.props.children}\n        <WorkspacePortal>\n          {(components.length > 0 || rules.length > 0) && (\n            <WorkspaceNav\n              components={components}\n              onComponentClose={this.handleComponentClose}\n              onComponentOpen={this.handleComponentReopen}\n              onRuleClose={this.handleRuleClose}\n              onRuleOpen={this.handleRuleReopen}\n              open={open}\n              rules={rules}\n            />\n          )}\n          {openComponent && (\n            <WorkspaceComponentViewer\n              component={openComponent}\n              height={actualHeight}\n              maximized={maximized}\n              onClose={this.handleComponentClose}\n              onCollapse={this.handleCollapse}\n              onLoad={this.handleComponentLoad}\n              onMaximize={this.handleMaximize}\n              onMinimize={this.handleMinimize}\n              onResize={this.handleResize}\n            />\n          )}\n          {openRule && (\n            <WorkspaceRuleViewer\n              height={actualHeight}\n              maximized={maximized}\n              onClose={this.handleRuleClose}\n              onCollapse={this.handleCollapse}\n              onLoad={this.handleRuleLoad}\n              onMaximize={this.handleMaximize}\n              onMinimize={this.handleMinimize}\n              onResize={this.handleResize}\n              rule={openRule}\n            />\n          )}\n        </WorkspacePortal>\n      </WorkspaceContext.Provider>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport * as React from 'react';\nimport { A11yContext } from './A11yContext';\n\ninterface State {\n  links: T.A11ySkipLink[];\n}\n\nexport default class A11yProvider extends React.Component<{}, State> {\n  keys: string[] = [];\n  state: State = { links: [] };\n\n  addA11ySkipLink = (link: T.A11ySkipLink) => {\n    this.setState(prevState => {\n      const links = [...prevState.links];\n      links.push({ ...link, weight: link.weight || 0 });\n      return { links };\n    });\n  };\n\n  removeA11ySkipLink = (link: T.A11ySkipLink) => {\n    this.setState(prevState => {\n      const links = prevState.links.filter(l => l.key !== link.key);\n      return { links };\n    });\n  };\n\n  render() {\n    const links = sortBy(this.state.links, 'weight');\n    return (\n      <A11yContext.Provider\n        value={{\n          addA11ySkipLink: this.addA11ySkipLink,\n          links,\n          removeA11ySkipLink: this.removeA11ySkipLink\n        }}>\n        {this.props.children}\n      </A11yContext.Provider>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { A11yContext } from './A11yContext';\nimport './A11ySkipLinks.css';\n\nexport default function A11ySkipLinks() {\n  return (\n    <A11yContext.Consumer>\n      {({ links }) =>\n        links.map(link => (\n          <a className=\"a11y-skip-link\" href={`#a11y_target__${link.key}`} key={link.key}>\n            {link.label}\n          </a>\n        ))\n      }\n    </A11yContext.Consumer>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport suggestionsJson from 'Docs/EmbedDocsSuggestions.json';\nimport * as React from 'react';\nimport { isSonarCloud } from '../../../helpers/system';\nimport { SuggestionsContext } from './SuggestionsContext';\n\ntype SuggestionsJson = T.Dict<T.SuggestionLink[]>;\n\ninterface State {\n  suggestions: T.SuggestionLink[];\n}\n\nexport default class SuggestionsProvider extends React.Component<{}, State> {\n  keys: string[] = [];\n  state: State = { suggestions: [] };\n\n  fetchSuggestions = () => {\n    const jsonList = suggestionsJson as SuggestionsJson;\n    let suggestions: T.SuggestionLink[] = [];\n    this.keys.forEach(key => {\n      if (jsonList[key]) {\n        suggestions = [...jsonList[key], ...suggestions];\n      }\n    });\n    if (!isSonarCloud()) {\n      suggestions = suggestions.filter(suggestion => suggestion.scope !== 'sonarcloud');\n    }\n    this.setState({ suggestions });\n  };\n\n  addSuggestions = (newKey: string) => {\n    this.keys = [...this.keys, newKey];\n    this.fetchSuggestions();\n  };\n\n  removeSuggestions = (oldKey: string) => {\n    this.keys = this.keys.filter(key => key !== oldKey);\n    this.fetchSuggestions();\n  };\n\n  render() {\n    return (\n      <SuggestionsContext.Provider\n        value={{\n          addSuggestions: this.addSuggestions,\n          removeSuggestions: this.removeSuggestions,\n          suggestions: this.state.suggestions\n        }}>\n        {this.props.children}\n      </SuggestionsContext.Provider>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getIndexationStatus } from '../../../api/ce';\nimport { get, remove, save } from '../../../helpers/storage';\nimport { IndexationStatus } from '../../../types/indexation';\n\nconst POLLING_INTERVAL_MS = 5000;\nconst LS_INDEXATION_COMPLETED_NOTIFICATION_SHOULD_BE_DISPLAYED =\n  'display_indexation_completed_notification';\n\nexport default class IndexationNotificationHelper {\n  private static interval?: NodeJS.Timeout;\n\n  static startPolling(onNewStatus: (status: IndexationStatus) => void) {\n    this.stopPolling();\n\n    // eslint-disable-next-line promise/catch-or-return\n    this.poll(onNewStatus).then(status => {\n      if (!status.isCompleted) {\n        this.interval = setInterval(() => this.poll(onNewStatus), POLLING_INTERVAL_MS);\n      }\n    });\n  }\n\n  static stopPolling() {\n    if (this.interval) {\n      clearInterval(this.interval);\n    }\n  }\n\n  static async poll(onNewStatus: (status: IndexationStatus) => void) {\n    const status = await getIndexationStatus();\n\n    onNewStatus(status);\n\n    if (status.isCompleted) {\n      this.stopPolling();\n    }\n\n    return status;\n  }\n\n  static markCompletedNotificationAsToDisplay() {\n    save(LS_INDEXATION_COMPLETED_NOTIFICATION_SHOULD_BE_DISPLAYED, true.toString());\n  }\n\n  static markCompletedNotificationAsDisplayed() {\n    remove(LS_INDEXATION_COMPLETED_NOTIFICATION_SHOULD_BE_DISPLAYED);\n  }\n\n  static shouldDisplayCompletedNotification() {\n    return JSON.parse(\n      get(LS_INDEXATION_COMPLETED_NOTIFICATION_SHOULD_BE_DISPLAYED) || false.toString()\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n/* eslint-disable react/no-unused-state */\nimport * as React from 'react';\nimport { withAppState } from '../../../components/hoc/withAppState';\nimport { IndexationContextInterface, IndexationStatus } from '../../../types/indexation';\nimport { IndexationContext } from './IndexationContext';\nimport IndexationNotificationHelper from './IndexationNotificationHelper';\n\ninterface Props {\n  appState: Pick<T.AppState, 'needIssueSync'>;\n}\n\nexport class IndexationContextProvider extends React.PureComponent<\n  React.PropsWithChildren<Props>,\n  IndexationContextInterface\n> {\n  mounted = false;\n\n  componentDidMount() {\n    this.mounted = true;\n\n    if (this.props.appState.needIssueSync) {\n      IndexationNotificationHelper.startPolling(this.handleNewStatus);\n    } else {\n      this.setState({ status: { isCompleted: true, percentCompleted: 100, hasFailures: false } });\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n\n    IndexationNotificationHelper.stopPolling();\n  }\n\n  handleNewStatus = (newIndexationStatus: IndexationStatus) => {\n    if (this.mounted) {\n      this.setState({ status: newIndexationStatus });\n    }\n  };\n\n  render() {\n    return (\n      <IndexationContext.Provider value={this.state}>\n        {this.props.children}\n      </IndexationContext.Provider>\n    );\n  }\n}\n\nexport default withAppState(IndexationContextProvider);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport interface IndexationStatus {\n  isCompleted: boolean;\n  percentCompleted: number;\n  hasFailures: boolean;\n}\n\nexport interface IndexationContextInterface {\n  status: IndexationStatus;\n}\n\nexport enum IndexationNotificationType {\n  InProgress = 'InProgress',\n  InProgressWithFailure = 'InProgressWithFailure',\n  Completed = 'Completed',\n  CompletedWithFailure = 'CompletedWithFailure'\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Alert, AlertProps } from '../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { IndexationNotificationType } from '../../../types/indexation';\nimport { TaskStatuses, TaskTypes } from '../../../types/tasks';\n\nexport interface IndexationNotificationRendererProps {\n  type: IndexationNotificationType;\n  percentCompleted: number;\n  isSystemAdmin: boolean;\n}\n\nconst NOTIFICATION_VARIANTS: { [key in IndexationNotificationType]: AlertProps['variant'] } = {\n  [IndexationNotificationType.InProgress]: 'warning',\n  [IndexationNotificationType.InProgressWithFailure]: 'error',\n  [IndexationNotificationType.Completed]: 'success',\n  [IndexationNotificationType.CompletedWithFailure]: 'error'\n};\n\nexport default function IndexationNotificationRenderer(props: IndexationNotificationRendererProps) {\n  const { type } = props;\n\n  return (\n    <div className=\"indexation-notification-wrapper\">\n      <Alert\n        className=\"indexation-notification-banner\"\n        display=\"banner\"\n        variant={NOTIFICATION_VARIANTS[type]}>\n        <div className=\"display-flex-center\">\n          {type === IndexationNotificationType.Completed && renderCompletedBanner(props)}\n          {type === IndexationNotificationType.CompletedWithFailure &&\n            renderCompletedWithFailureBanner(props)}\n          {type === IndexationNotificationType.InProgress && renderInProgressBanner(props)}\n          {type === IndexationNotificationType.InProgressWithFailure &&\n            renderInProgressWithFailureBanner(props)}\n        </div>\n      </Alert>\n    </div>\n  );\n}\n\nfunction renderCompletedBanner(_props: IndexationNotificationRendererProps) {\n  return <span className=\"spacer-right\">{translate('indexation.completed')}</span>;\n}\n\nfunction renderCompletedWithFailureBanner(props: IndexationNotificationRendererProps) {\n  const { isSystemAdmin } = props;\n\n  return (\n    <span className=\"spacer-right\">\n      <FormattedMessage\n        id=\"indexation.completed_with_error\"\n        defaultMessage={translate('indexation.completed_with_error')}\n        values={{\n          link: isSystemAdmin\n            ? renderBackgroundTasksPageLink(true, translate('indexation.completed_with_error.link'))\n            : translate('indexation.completed_with_error.link')\n        }}\n      />\n    </span>\n  );\n}\n\nfunction renderInProgressBanner(props: IndexationNotificationRendererProps) {\n  const { percentCompleted, isSystemAdmin } = props;\n\n  return (\n    <>\n      <span className=\"spacer-right\">{translate('indexation.in_progress')}</span>\n      <i className=\"spinner spacer-right\" />\n      <span className=\"spacer-right\">\n        {translateWithParameters('indexation.progression', percentCompleted)}\n      </span>\n      {isSystemAdmin && (\n        <span className=\"spacer-right\">\n          <FormattedMessage\n            id=\"indexation.admin_link\"\n            defaultMessage={translate('indexation.admin_link')}\n            values={{\n              link: renderBackgroundTasksPageLink(false, translate('background_tasks.page'))\n            }}\n          />\n        </span>\n      )}\n    </>\n  );\n}\n\nfunction renderInProgressWithFailureBanner(props: IndexationNotificationRendererProps) {\n  const { percentCompleted, isSystemAdmin } = props;\n\n  return (\n    <>\n      <span className=\"spacer-right\">{translate('indexation.in_progress')}</span>\n      <i className=\"spinner spacer-right\" />\n      <span className=\"spacer-right\">\n        <FormattedMessage\n          id=\"indexation.progression_with_error\"\n          defaultMessage={translateWithParameters(\n            'indexation.progression_with_error',\n            percentCompleted\n          )}\n          values={{\n            link: isSystemAdmin\n              ? renderBackgroundTasksPageLink(\n                  true,\n                  translate('indexation.progression_with_error.link')\n                )\n              : translate('indexation.progression_with_error.link')\n          }}\n        />\n      </span>\n    </>\n  );\n}\n\nfunction renderBackgroundTasksPageLink(hasError: boolean, text: string) {\n  return (\n    <Link\n      to={{\n        pathname: '/admin/background_tasks',\n        query: {\n          taskType: TaskTypes.IssueSync,\n          status: hasError ? TaskStatuses.Failed : undefined\n        }\n      }}>\n      {text}\n    </Link>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport withIndexationContext, {\n  WithIndexationContextProps\n} from '../../../components/hoc/withIndexationContext';\nimport { hasGlobalPermission, isLoggedIn } from '../../../helpers/users';\nimport { IndexationNotificationType } from '../../../types/indexation';\nimport { Permissions } from '../../../types/permissions';\nimport './IndexationNotification.css';\nimport IndexationNotificationHelper from './IndexationNotificationHelper';\nimport IndexationNotificationRenderer from './IndexationNotificationRenderer';\n\ninterface Props extends WithIndexationContextProps {\n  currentUser: T.CurrentUser;\n}\n\ninterface State {\n  notificationType?: IndexationNotificationType;\n}\n\nexport class IndexationNotification extends React.PureComponent<Props, State> {\n  state: State = {};\n  isSystemAdmin = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.isSystemAdmin =\n      isLoggedIn(this.props.currentUser) &&\n      hasGlobalPermission(this.props.currentUser, Permissions.Admin);\n  }\n\n  componentDidMount() {\n    this.refreshNotification();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.indexationContext.status !== this.props.indexationContext.status) {\n      this.refreshNotification();\n    }\n  }\n\n  refreshNotification() {\n    const { isCompleted, hasFailures } = this.props.indexationContext.status;\n\n    if (!isCompleted) {\n      IndexationNotificationHelper.markCompletedNotificationAsToDisplay();\n      this.setState({\n        notificationType: hasFailures\n          ? IndexationNotificationType.InProgressWithFailure\n          : IndexationNotificationType.InProgress\n      });\n    } else if (hasFailures) {\n      this.setState({ notificationType: IndexationNotificationType.CompletedWithFailure });\n    } else if (IndexationNotificationHelper.shouldDisplayCompletedNotification()) {\n      this.setState({\n        notificationType: IndexationNotificationType.Completed\n      });\n      IndexationNotificationHelper.markCompletedNotificationAsDisplayed();\n    } else {\n      this.setState({ notificationType: undefined });\n    }\n  }\n\n  render() {\n    const { notificationType } = this.state;\n    const {\n      indexationContext: {\n        status: { percentCompleted }\n      }\n    } = this.props;\n\n    if (notificationType === undefined) {\n      return null;\n    }\n\n    return (\n      <IndexationNotificationRenderer\n        type={notificationType}\n        percentCompleted={percentCompleted}\n        isSystemAdmin={this.isSystemAdmin}\n      />\n    );\n  }\n}\n\nexport default withCurrentUser(withIndexationContext(IndexationNotification));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { SuggestionsContext } from './SuggestionsContext';\n\ninterface Props {\n  onClose: () => void;\n}\n\nexport default class EmbedDocsPopup extends React.PureComponent<Props> {\n  renderTitle(text: string) {\n    return <li className=\"menu-header\">{text}</li>;\n  }\n\n  renderSuggestions = ({ suggestions }: { suggestions: T.SuggestionLink[] }) => {\n    if (suggestions.length === 0) {\n      return null;\n    }\n    return (\n      <>\n        {this.renderTitle(translate('embed_docs.suggestion'))}\n        {suggestions.map((suggestion, index) => (\n          <li key={index}>\n            <Link onClick={this.props.onClose} target=\"_blank\" to={suggestion.link}>\n              {suggestion.text}\n            </Link>\n          </li>\n        ))}\n        <li className=\"divider\" />\n      </>\n    );\n  };\n\n  renderIconLink(link: string, icon: string, text: string) {\n    return (\n      <a href={link} rel=\"noopener noreferrer\" target=\"_blank\">\n        <img\n          alt={text}\n          className=\"spacer-right\"\n          height=\"18\"\n          src={`${getBaseUrl()}/images/${icon}`}\n          width=\"18\"\n        />\n        {text}\n      </a>\n    );\n  }\n\n  render() {\n    return (\n      <DropdownOverlay>\n        <ul className=\"menu abs-width-240\">\n          <SuggestionsContext.Consumer>{this.renderSuggestions}</SuggestionsContext.Consumer>\n          <li>\n            <Link onClick={this.props.onClose} target=\"_blank\" to=\"/documentation\">\n              {translate('embed_docs.documentation')}\n            </Link>\n          </li>\n          <li>\n            <Link onClick={this.props.onClose} to=\"/web_api\">\n              {translate('api_documentation.page')}\n            </Link>\n          </li>\n          <li className=\"divider\" />\n          <li>\n            <a href=\"https://community.sonarsource.com/\" rel=\"noopener noreferrer\" target=\"_blank\">\n              {translate('embed_docs.get_help')}\n            </a>\n          </li>\n          <li className=\"divider\" />\n          {this.renderTitle(translate('embed_docs.stay_connected'))}\n          <li>\n            {this.renderIconLink(\n              'https://www.sonarqube.org/whats-new/?referrer=sonarqube',\n              'embed-doc/sq-icon.svg',\n              translate('embed_docs.news')\n            )}\n          </li>\n          <li>\n            {this.renderIconLink(\n              'https://twitter.com/SonarQube',\n              'embed-doc/twitter-icon.svg',\n              'Twitter'\n            )}\n          </li>\n        </ul>\n      </DropdownOverlay>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport Toggler from '../../../components/controls/Toggler';\nimport HelpIcon from '../../../components/icons/HelpIcon';\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\nimport { translate } from '../../../helpers/l10n';\n\nconst EmbedDocsPopup = lazyLoadComponent(() => import('./EmbedDocsPopup'));\n\ninterface State {\n  helpOpen: boolean;\n}\n\nexport default class EmbedDocsPopupHelper extends React.PureComponent<{}, State> {\n  mounted = false;\n  state: State = { helpOpen: false };\n\n  setHelpDisplay = (helpOpen: boolean) => {\n    this.setState({ helpOpen });\n  };\n\n  handleClick = () => {\n    this.toggleHelp();\n  };\n\n  toggleHelp = () => {\n    this.setState(state => {\n      return { helpOpen: !state.helpOpen };\n    });\n  };\n\n  closeHelp = () => {\n    this.setState({ helpOpen: false });\n  };\n\n  render() {\n    return (\n      <li className=\"dropdown\">\n        <Toggler\n          onRequestClose={this.closeHelp}\n          open={this.state.helpOpen}\n          overlay={<EmbedDocsPopup onClose={this.closeHelp} />}>\n          <ButtonLink\n            aria-expanded={this.state.helpOpen}\n            aria-haspopup={true}\n            className=\"navbar-help navbar-icon\"\n            onClick={this.handleClick}\n            title={translate('help')}>\n            <HelpIcon />\n          </ButtonLink>\n        </Toggler>\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ClockIcon({ className, ...iconProps }: IconProps) {\n  return (\n    <Icon className={classNames('icon-clock', className)} {...iconProps}>\n      <g fill=\"#fff\" stroke=\"#ADADAD\" transform=\"matrix(1.4 0 0 1.4 .3 .7)\">\n        <circle cx=\"5.5\" cy=\"5.2\" r=\"5\" />\n        <path d=\"M5.6 2.9v2.7l2-.5\" fillRule=\"nonzero\" />\n      </g>\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { sortBy } from 'lodash';\nimport { ComponentQualifier } from '../../../../js/types/component';\n\nconst ORDER = [\n  ComponentQualifier.Developper,\n  ComponentQualifier.Portfolio,\n  ComponentQualifier.SubPortfolio,\n  ComponentQualifier.Application,\n  ComponentQualifier.Project,\n  ComponentQualifier.SubProject\n];\n\nexport function sortQualifiers(qualifiers: string[]) {\n  return sortBy(qualifiers, qualifier => ORDER.indexOf(qualifier as ComponentQualifier));\n}\n\nexport interface ComponentResult {\n  isFavorite?: boolean;\n  isRecentlyBrowsed?: boolean;\n  key: string;\n  match?: string;\n  name: string;\n  project?: string;\n  qualifier: string;\n}\n\nexport interface Results {\n  [qualifier: string]: ComponentResult[];\n}\n\nexport interface More {\n  [qualifier: string]: number;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  allowMore: boolean;\n  loadingMore?: string;\n  onMoreClick: (qualifier: string) => void;\n  onSelect: (qualifier: string) => void;\n  qualifier: string;\n  selected: boolean;\n}\n\nexport default class SearchShowMore extends React.PureComponent<Props> {\n  handleMoreClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.stopPropagation();\n    event.currentTarget.blur();\n    const { qualifier } = event.currentTarget.dataset;\n    if (qualifier) {\n      this.props.onMoreClick(qualifier);\n    }\n  };\n\n  handleMoreMouseEnter = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    const { qualifier } = event.currentTarget.dataset;\n    if (qualifier) {\n      this.props.onSelect(`qualifier###${qualifier}`);\n    }\n  };\n\n  render() {\n    const { loadingMore, qualifier, selected } = this.props;\n\n    return (\n      <li className={classNames('menu-footer', { active: selected })} key={`more-${qualifier}`}>\n        <DeferredSpinner className=\"navbar-search-icon\" loading={loadingMore === qualifier}>\n          <a\n            className={classNames({ 'cursor-not-allowed': !this.props.allowMore })}\n            data-qualifier={qualifier}\n            href=\"#\"\n            onClick={this.handleMoreClick}\n            onMouseEnter={this.handleMoreMouseEnter}>\n            <div className=\"pull-right text-muted-2 menu-footer-note\">\n              <FormattedMessage\n                defaultMessage={translate('search.show_more.hint')}\n                id=\"search.show_more.hint\"\n                values={{\n                  key: <span className=\"shortcut-button shortcut-button-small\">Enter</span>\n                }}\n              />\n            </div>\n            <span>{translate('show_more')}</span>\n          </a>\n        </DeferredSpinner>\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport SearchShowMore from './SearchShowMore';\nimport { ComponentResult, More, Results, sortQualifiers } from './utils';\n\nexport interface Props {\n  allowMore: boolean;\n  loadingMore?: string;\n  more: More;\n  onMoreClick: (qualifier: string) => void;\n  onSelect: (componentKey: string) => void;\n  renderNoResults: () => React.ReactElement<any>;\n  renderResult: (component: ComponentResult) => React.ReactNode;\n  results: Results;\n  selected?: string;\n}\n\nexport default function SearchResults(props: Props): React.ReactElement<Props> {\n  const qualifiers = Object.keys(props.results);\n  const renderedComponents: React.ReactNode[] = [];\n\n  sortQualifiers(qualifiers).forEach(qualifier => {\n    const components = props.results[qualifier];\n\n    if (components.length > 0 && renderedComponents.length > 0) {\n      renderedComponents.push(<li className=\"divider\" key={`divider-${qualifier}`} />);\n    }\n\n    if (components.length > 0) {\n      renderedComponents.push(\n        <li className=\"menu-header\" key={`header-${qualifier}`}>\n          {translate('qualifiers', qualifier)}\n        </li>\n      );\n    }\n\n    components.forEach(component => renderedComponents.push(props.renderResult(component)));\n\n    const more = props.more[qualifier];\n    if (more !== undefined && more > 0) {\n      renderedComponents.push(\n        <SearchShowMore\n          allowMore={props.allowMore}\n          key={`more-${qualifier}`}\n          loadingMore={props.loadingMore}\n          onMoreClick={props.onMoreClick}\n          onSelect={props.onSelect}\n          qualifier={qualifier}\n          selected={props.selected === `qualifier###${qualifier}`}\n        />\n      );\n    }\n  });\n\n  return renderedComponents.length > 0 ? (\n    <ul className=\"menu\">{renderedComponents}</ul>\n  ) : (\n    props.renderNoResults()\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { ComponentQualifier } from '../../../../js/types/component';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport ClockIcon from '../../../components/icons/ClockIcon';\nimport FavoriteIcon from '../../../components/icons/FavoriteIcon';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport { getComponentOverviewUrl } from '../../../helpers/urls';\nimport { ComponentResult } from './utils';\n\ninterface Props {\n  component: ComponentResult;\n  innerRef: (componentKey: string, node: HTMLElement | null) => void;\n  onClose: () => void;\n  onSelect: (componentKey: string) => void;\n  projects: T.Dict<{ name: string }>;\n  selected: boolean;\n}\n\ninterface State {\n  tooltipVisible: boolean;\n}\n\nconst TOOLTIP_DELAY = 1000;\n\nexport default class SearchResult extends React.PureComponent<Props, State> {\n  interval?: number;\n  state: State = { tooltipVisible: false };\n\n  componentDidMount() {\n    if (this.props.selected) {\n      this.scheduleTooltip();\n    }\n  }\n\n  componentWillReceiveProps(nextProps: Props) {\n    if (!this.props.selected && nextProps.selected) {\n      this.scheduleTooltip();\n    } else if (this.props.selected && !nextProps.selected) {\n      this.unscheduleTooltip();\n      this.setState({ tooltipVisible: false });\n    }\n  }\n\n  componentWillUnmount() {\n    this.unscheduleTooltip();\n  }\n\n  scheduleTooltip = () => {\n    this.interval = window.setTimeout(() => {\n      this.setState({ tooltipVisible: true });\n    }, TOOLTIP_DELAY);\n  };\n\n  unscheduleTooltip = () => {\n    if (this.interval) {\n      window.clearInterval(this.interval);\n    }\n  };\n\n  handleMouseEnter = () => {\n    this.props.onSelect(this.props.component.key);\n  };\n\n  renderProject = (component: ComponentResult) => {\n    if (\n      ComponentQualifier.SubProject !== (component.qualifier as ComponentQualifier) ||\n      component.project == null\n    ) {\n      return null;\n    }\n\n    const project = this.props.projects[component.project];\n    return project ? (\n      <div className=\"navbar-search-item-right text-muted-2\">{project.name}</div>\n    ) : null;\n  };\n\n  render() {\n    const { component } = this.props;\n\n    const to = getComponentOverviewUrl(component.key, component.qualifier);\n\n    return (\n      <li\n        className={this.props.selected ? 'active' : undefined}\n        key={component.key}\n        ref={node => this.props.innerRef(component.key, node)}>\n        <Tooltip\n          mouseEnterDelay={TOOLTIP_DELAY / 1000}\n          overlay={component.key}\n          placement=\"left\"\n          visible={this.state.tooltipVisible}>\n          <Link data-key={component.key} onClick={this.props.onClose} to={to}>\n            <span className=\"navbar-search-item-link\" onMouseEnter={this.handleMouseEnter}>\n              <span className=\"navbar-search-item-icons little-spacer-right\">\n                {component.isFavorite && <FavoriteIcon favorite={true} size={12} />}\n                {!component.isFavorite && component.isRecentlyBrowsed && <ClockIcon size={12} />}\n                <QualifierIcon className=\"little-spacer-right\" qualifier={component.qualifier} />\n              </span>\n\n              {component.match ? (\n                <span\n                  className=\"navbar-search-item-match\"\n                  // Safe: comes from the backend\n                  dangerouslySetInnerHTML={{ __html: component.match }}\n                />\n              ) : (\n                <span className=\"navbar-search-item-match\">{component.name}</span>\n              )}\n\n              {this.renderProject(component)}\n            </span>\n          </Link>\n        </Tooltip>\n      </li>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport key from 'keymaster';\nimport { debounce, keyBy, uniqBy } from 'lodash';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { withRouter, WithRouterProps } from 'react-router';\nimport { getSuggestions } from '../../../api/components';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport OutsideClickHandler from '../../../components/controls/OutsideClickHandler';\nimport SearchBox from '../../../components/controls/SearchBox';\nimport ClockIcon from '../../../components/icons/ClockIcon';\nimport { lazyLoadComponent } from '../../../components/lazyLoadComponent';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { getComponentOverviewUrl } from '../../../helpers/urls';\nimport { ComponentQualifier } from '../../../types/component';\nimport RecentHistory from '../RecentHistory';\nimport './Search.css';\nimport { ComponentResult, More, Results, sortQualifiers } from './utils';\n\nconst SearchResults = lazyLoadComponent(() => import('./SearchResults'));\nconst SearchResult = lazyLoadComponent(() => import('./SearchResult'));\n\ninterface OwnProps {\n  currentUser: T.CurrentUser;\n}\n\ntype Props = OwnProps & WithRouterProps;\n\ninterface State {\n  loading: boolean;\n  loadingMore?: string;\n  more: More;\n  open: boolean;\n  projects: T.Dict<{ name: string }>;\n  query: string;\n  results: Results;\n  selected?: string;\n  shortQuery: boolean;\n}\n\nexport class Search extends React.PureComponent<Props, State> {\n  input?: HTMLInputElement | null;\n  node?: HTMLElement | null;\n  nodes: T.Dict<HTMLElement>;\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n    this.nodes = {};\n    this.search = debounce(this.search, 250);\n    this.state = {\n      loading: false,\n      more: {},\n      open: false,\n      projects: {},\n      query: '',\n      results: {},\n      shortQuery: false\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    key('s', () => {\n      this.focusInput();\n      this.openSearch();\n      return false;\n    });\n  }\n\n  componentWillUpdate() {\n    this.nodes = {};\n  }\n\n  componentDidUpdate(_prevProps: Props, prevState: State) {\n    if (prevState.selected !== this.state.selected) {\n      this.scrollToSelected();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    key.unbind('s');\n  }\n\n  focusInput = () => {\n    if (this.input) {\n      this.input.focus();\n    }\n  };\n\n  handleClickOutside = () => {\n    this.closeSearch(false);\n  };\n\n  handleFocus = () => {\n    if (!this.state.open) {\n      // simulate click to close any other dropdowns\n      const body = document.documentElement;\n      if (body) {\n        body.click();\n      }\n    }\n    this.openSearch();\n  };\n\n  openSearch = () => {\n    if (!this.state.open && !this.state.query) {\n      this.search('');\n    }\n    this.setState({ open: true });\n  };\n\n  closeSearch = (clear = true) => {\n    if (this.input) {\n      this.input.blur();\n    }\n    if (clear) {\n      this.setState({\n        more: {},\n        open: false,\n        projects: {},\n        query: '',\n        results: {},\n        selected: undefined,\n        shortQuery: false\n      });\n    } else {\n      this.setState({ open: false });\n    }\n  };\n\n  getPlainComponentsList = (results: Results, more: More) =>\n    sortQualifiers(Object.keys(results)).reduce((components, qualifier) => {\n      const next = [...components, ...results[qualifier].map(component => component.key)];\n      if (more[qualifier]) {\n        next.push('qualifier###' + qualifier);\n      }\n      return next;\n    }, []);\n\n  stopLoading = () => {\n    if (this.mounted) {\n      this.setState({ loading: false });\n    }\n  };\n\n  search = (query: string) => {\n    if (query.length === 0 || query.length >= 2) {\n      this.setState({ loading: true });\n      const recentlyBrowsed = RecentHistory.get().map(component => component.key);\n      getSuggestions(query, recentlyBrowsed).then(response => {\n        // compare `this.state.query` and `query` to handle two request done almost at the same time\n        // in this case only the request that matches the current query should be taken\n        if (this.mounted && this.state.query === query) {\n          const results: Results = {};\n          const more: More = {};\n          response.results.forEach(group => {\n            results[group.q] = group.items.map(item => ({ ...item, qualifier: group.q }));\n            more[group.q] = group.more;\n          });\n          const list = this.getPlainComponentsList(results, more);\n          this.setState(state => ({\n            loading: false,\n            more,\n            projects: { ...state.projects, ...keyBy(response.projects, 'key') },\n            results,\n            selected: list.length > 0 ? list[0] : undefined,\n            shortQuery: query.length > 2 && response.warning === 'short_input'\n          }));\n        }\n      }, this.stopLoading);\n    } else {\n      this.setState({ loading: false });\n    }\n  };\n\n  searchMore = (qualifier: string) => {\n    const { query } = this.state;\n    if (query.length === 1) {\n      return;\n    }\n\n    this.setState({ loading: true, loadingMore: qualifier });\n    const recentlyBrowsed = RecentHistory.get().map(component => component.key);\n    getSuggestions(query, recentlyBrowsed, qualifier).then(response => {\n      if (this.mounted) {\n        const group = response.results.find(group => group.q === qualifier);\n        const moreResults = (group ? group.items : []).map(item => ({ ...item, qualifier }));\n        this.setState(state => ({\n          loading: false,\n          loadingMore: undefined,\n          more: { ...state.more, [qualifier]: 0 },\n          projects: { ...state.projects, ...keyBy(response.projects, 'key') },\n          results: {\n            ...state.results,\n            [qualifier]: uniqBy([...state.results[qualifier], ...moreResults], 'key')\n          },\n          selected: moreResults.length > 0 ? moreResults[0].key : state.selected\n        }));\n        this.focusInput();\n      }\n    }, this.stopLoading);\n  };\n\n  handleQueryChange = (query: string) => {\n    this.setState({ query, shortQuery: query.length === 1 });\n    this.search(query);\n  };\n\n  selectPrevious = () => {\n    this.setState(({ more, results, selected }) => {\n      if (selected) {\n        const list = this.getPlainComponentsList(results, more);\n        const index = list.indexOf(selected);\n        return index > 0 ? { selected: list[index - 1] } : null;\n      } else {\n        return null;\n      }\n    });\n  };\n\n  selectNext = () => {\n    this.setState(({ more, results, selected }) => {\n      if (selected) {\n        const list = this.getPlainComponentsList(results, more);\n        const index = list.indexOf(selected);\n        return index >= 0 && index < list.length - 1 ? { selected: list[index + 1] } : null;\n      } else {\n        return null;\n      }\n    });\n  };\n\n  openSelected = () => {\n    const { results, selected } = this.state;\n\n    if (!selected) {\n      return;\n    }\n\n    if (selected.startsWith('qualifier###')) {\n      this.searchMore(selected.substr(12));\n    } else {\n      let qualifier = ComponentQualifier.Project;\n\n      if ((results[ComponentQualifier.Portfolio] ?? []).find(r => r.key === selected)) {\n        qualifier = ComponentQualifier.Portfolio;\n      } else if ((results[ComponentQualifier.SubPortfolio] ?? []).find(r => r.key === selected)) {\n        qualifier = ComponentQualifier.SubPortfolio;\n      }\n\n      this.props.router.push(getComponentOverviewUrl(selected, qualifier));\n\n      this.closeSearch();\n    }\n  };\n\n  scrollToSelected = () => {\n    if (this.state.selected) {\n      const node = this.nodes[this.state.selected];\n      if (node && this.node) {\n        scrollToElement(node, { topOffset: 30, bottomOffset: 30, parent: this.node });\n      }\n    }\n  };\n\n  handleKeyDown = (event: React.KeyboardEvent) => {\n    switch (event.keyCode) {\n      case 13:\n        event.preventDefault();\n        this.openSelected();\n        return;\n      case 38:\n        event.preventDefault();\n        this.selectPrevious();\n        return;\n      case 40:\n        event.preventDefault();\n        this.selectNext();\n        // keep this return to prevent fall-through in case more cases will be adder later\n        // eslint-disable-next-line no-useless-return\n        return;\n    }\n  };\n\n  handleSelect = (selected: string) => {\n    this.setState({ selected });\n  };\n\n  innerRef = (component: string, node: HTMLElement | null) => {\n    if (node) {\n      this.nodes[component] = node;\n    }\n  };\n\n  searchInputRef = (node: HTMLInputElement | null) => {\n    this.input = node;\n  };\n\n  renderResult = (component: ComponentResult) => (\n    <SearchResult\n      component={component}\n      innerRef={this.innerRef}\n      key={component.key}\n      onClose={this.closeSearch}\n      onSelect={this.handleSelect}\n      projects={this.state.projects}\n      selected={this.state.selected === component.key}\n    />\n  );\n\n  renderNoResults = () => (\n    <div className=\"navbar-search-no-results\">\n      {translateWithParameters('no_results_for_x', this.state.query)}\n    </div>\n  );\n\n  render() {\n    const search = (\n      <li className=\"navbar-search dropdown\">\n        <DeferredSpinner className=\"navbar-search-icon\" loading={this.state.loading} />\n\n        <SearchBox\n          autoFocus={this.state.open}\n          innerRef={this.searchInputRef}\n          minLength={2}\n          onChange={this.handleQueryChange}\n          onFocus={this.handleFocus}\n          onKeyDown={this.handleKeyDown}\n          placeholder={translate('search.placeholder')}\n          value={this.state.query}\n        />\n\n        {this.state.shortQuery && (\n          <span className=\"navbar-search-input-hint\">\n            {translateWithParameters('select2.tooShort', 2)}\n          </span>\n        )}\n\n        {this.state.open && Object.keys(this.state.results).length > 0 && (\n          <DropdownOverlay noPadding={true}>\n            <div className=\"global-navbar-search-dropdown\" ref={node => (this.node = node)}>\n              <SearchResults\n                allowMore={this.state.query.length !== 1}\n                loadingMore={this.state.loadingMore}\n                more={this.state.more}\n                onMoreClick={this.searchMore}\n                onSelect={this.handleSelect}\n                renderNoResults={this.renderNoResults}\n                renderResult={this.renderResult}\n                results={this.state.results}\n                selected={this.state.selected}\n              />\n              <div className=\"dropdown-bottom-hint\">\n                <div className=\"pull-right\">\n                  <ClockIcon className=\"little-spacer-right\" size={12} />\n                  {translate('recently_browsed')}\n                </div>\n                <FormattedMessage\n                  defaultMessage={translate('search.shortcut_hint')}\n                  id=\"search.shortcut_hint\"\n                  values={{\n                    shortcut: <span className=\"shortcut-button shortcut-button-small\">s</span>\n                  }}\n                />\n              </div>\n            </div>\n          </DropdownOverlay>\n        )}\n      </li>\n    );\n\n    return this.state.open ? (\n      <OutsideClickHandler onClickOutside={this.handleClickOutside}>{search}</OutsideClickHandler>\n    ) : (\n      search\n    );\n  }\n}\n\nexport default withRouter<OwnProps>(Search);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router';\nimport { translate } from '../../../../helpers/l10n';\nimport { getBaseUrl } from '../../../../helpers/system';\nimport { getGlobalSettingValue, Store } from '../../../../store/rootReducer';\n\ninterface StateProps {\n  customLogoUrl?: string;\n  customLogoWidth?: string | number;\n}\n\nexport function GlobalNavBranding({ customLogoUrl, customLogoWidth }: StateProps) {\n  const title = translate('layout.sonar.slogan');\n  const url = customLogoUrl || `${getBaseUrl()}/images/logo.svg?v=6.6`;\n  const width = customLogoUrl ? customLogoWidth || 100 : 83;\n\n  return (\n    <Link className=\"navbar-brand\" to=\"/\">\n      <img alt={title} height={30} src={url} title={title} width={width} />\n    </Link>\n  );\n}\n\nexport function SonarCloudNavBranding() {\n  return (\n    <GlobalNavBranding\n      customLogoUrl={`${getBaseUrl()}/images/sonarcloud-logo.svg`}\n      customLogoWidth={105}\n    />\n  );\n}\n\nconst mapStateToProps = (state: Store): StateProps => {\n  const customLogoUrl = getGlobalSettingValue(state, 'sonar.lf.logoUrl');\n  const customLogoWidth = getGlobalSettingValue(state, 'sonar.lf.logoWidthPx');\n  return {\n    customLogoUrl: customLogoUrl && customLogoUrl.value,\n    customLogoWidth: customLogoWidth && customLogoWidth.value\n  };\n};\n\nexport default connect(mapStateToProps)(GlobalNavBranding);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { isMySet } from '../../../../apps/issues/utils';\nimport Dropdown from '../../../../components/controls/Dropdown';\nimport DropdownIcon from '../../../../components/icons/DropdownIcon';\nimport { translate } from '../../../../helpers/l10n';\nimport { getQualityGatesUrl } from '../../../../helpers/urls';\nimport { ComponentQualifier } from '../../../../types/component';\n\ninterface Props {\n  appState: Pick<T.AppState, 'canAdmin' | 'globalPages' | 'qualifiers'>;\n  currentUser: T.CurrentUser;\n  location: { pathname: string };\n}\n\nexport default class GlobalNavMenu extends React.PureComponent<Props> {\n  renderProjects() {\n    const active =\n      this.props.location.pathname.startsWith('/projects') &&\n      this.props.location.pathname !== '/projects/create';\n\n    return (\n      <li>\n        <Link className={classNames({ active })} to=\"/projects\">\n          {translate('projects.page')}\n        </Link>\n      </li>\n    );\n  }\n\n  renderPortfolios() {\n    return (\n      <li>\n        <Link activeClassName=\"active\" to=\"/portfolios\">\n          {translate('portfolios.page')}\n        </Link>\n      </li>\n    );\n  }\n\n  renderIssuesLink() {\n    const active = this.props.location.pathname.startsWith('/issues');\n\n    const query =\n      this.props.currentUser.isLoggedIn && isMySet()\n        ? { resolved: 'false', myIssues: 'true' }\n        : { resolved: 'false' };\n    return (\n      <li>\n        <Link className={classNames({ active })} to={{ pathname: '/issues', query }}>\n          {translate('issues.page')}\n        </Link>\n      </li>\n    );\n  }\n\n  renderRulesLink() {\n    return (\n      <li>\n        <Link activeClassName=\"active\" to=\"/coding_rules\">\n          {translate('coding_rules.page')}\n        </Link>\n      </li>\n    );\n  }\n\n  renderProfilesLink() {\n    return (\n      <li>\n        <Link activeClassName=\"active\" to=\"/profiles\">\n          {translate('quality_profiles.page')}\n        </Link>\n      </li>\n    );\n  }\n\n  renderQualityGatesLink() {\n    return (\n      <li>\n        <Link activeClassName=\"active\" to={getQualityGatesUrl()}>\n          {translate('quality_gates.page')}\n        </Link>\n      </li>\n    );\n  }\n\n  renderAdministrationLink() {\n    if (!this.props.appState.canAdmin) {\n      return null;\n    }\n\n    return (\n      <li>\n        <Link activeClassName=\"active\" to=\"/admin\">\n          {translate('layout.settings')}\n        </Link>\n      </li>\n    );\n  }\n\n  renderGlobalPageLink = ({ key, name }: T.Extension) => {\n    return (\n      <li key={key}>\n        <Link to={`/extension/${key}`}>{name}</Link>\n      </li>\n    );\n  };\n\n  renderMore() {\n    const { globalPages = [] } = this.props.appState;\n    const withoutPortfolios = globalPages.filter(page => page.key !== 'governance/portfolios');\n    if (withoutPortfolios.length === 0) {\n      return null;\n    }\n    return (\n      <Dropdown\n        overlay={<ul className=\"menu\">{withoutPortfolios.map(this.renderGlobalPageLink)}</ul>}\n        tagName=\"li\">\n        {({ onToggleClick, open }) => (\n          <a\n            aria-expanded={open}\n            aria-haspopup=\"menu\"\n            role=\"button\"\n            className={classNames('dropdown-toggle', { active: open })}\n            href=\"#\"\n            id=\"global-navigation-more\"\n            onClick={onToggleClick}>\n            {translate('more')}\n            <DropdownIcon className=\"little-spacer-left text-middle\" />\n          </a>\n        )}\n      </Dropdown>\n    );\n  }\n\n  render() {\n    const governanceInstalled = this.props.appState.qualifiers.includes(\n      ComponentQualifier.Portfolio\n    );\n\n    return (\n      <ul className=\"global-navbar-menu\">\n        {this.renderProjects()}\n        {governanceInstalled && this.renderPortfolios()}\n        {this.renderIssuesLink()}\n        {this.renderRulesLink()}\n        {this.renderProfilesLink()}\n        {this.renderQualityGatesLink()}\n        {this.renderAdministrationLink()}\n        {this.renderMore()}\n      </ul>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport Dropdown from '../../../../components/controls/Dropdown';\nimport { Router, withRouter } from '../../../../components/hoc/withRouter';\nimport Avatar from '../../../../components/ui/Avatar';\nimport { translate } from '../../../../helpers/l10n';\nimport { getBaseUrl } from '../../../../helpers/system';\nimport { isLoggedIn } from '../../../../helpers/users';\nimport { rawSizes } from '../../../theme';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  router: Pick<Router, 'push'>;\n}\n\nexport class GlobalNavUser extends React.PureComponent<Props> {\n  handleLogin = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    const returnTo = encodeURIComponent(window.location.pathname + window.location.search);\n    window.location.href =\n      getBaseUrl() + `/sessions/new?return_to=${returnTo}${window.location.hash}`;\n  };\n\n  handleLogout = (event: React.SyntheticEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    this.props.router.push('/sessions/logout');\n  };\n\n  renderAuthenticated() {\n    const currentUser = this.props.currentUser as T.LoggedInUser;\n    return (\n      <Dropdown\n        className=\"js-user-authenticated\"\n        overlay={\n          <ul className=\"menu\">\n            <li className=\"menu-item\">\n              <div className=\"text-ellipsis text-muted\" title={currentUser.name}>\n                <strong>{currentUser.name}</strong>\n              </div>\n              {currentUser.email != null && (\n                <div\n                  className=\"little-spacer-top text-ellipsis text-muted\"\n                  title={currentUser.email}>\n                  {currentUser.email}\n                </div>\n              )}\n            </li>\n            <li className=\"divider\" />\n            <li>\n              <Link to=\"/account\">{translate('my_account.page')}</Link>\n            </li>\n            <li>\n              <a href=\"#\" onClick={this.handleLogout}>\n                {translate('layout.logout')}\n              </a>\n            </li>\n          </ul>\n        }\n        tagName=\"li\">\n        <a className=\"dropdown-toggle navbar-avatar\" href=\"#\" title={currentUser.name}>\n          <Avatar\n            hash={currentUser.avatar}\n            name={currentUser.name}\n            size={rawSizes.globalNavContentHeightRaw}\n          />\n        </a>\n      </Dropdown>\n    );\n  }\n\n  renderAnonymous() {\n    return (\n      <li>\n        <a className=\"navbar-login\" href=\"/sessions/new\" onClick={this.handleLogin}>\n          {translate('layout.login')}\n        </a>\n      </li>\n    );\n  }\n\n  render() {\n    return isLoggedIn(this.props.currentUser) ? this.renderAuthenticated() : this.renderAnonymous();\n  }\n}\n\nexport default withRouter(GlobalNavUser);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport NavBar from '../../../../components/ui/NavBar';\nimport { getAppState, getCurrentUser, Store } from '../../../../store/rootReducer';\nimport { rawSizes } from '../../../theme';\nimport EmbedDocsPopupHelper from '../../embed-docs-modal/EmbedDocsPopupHelper';\nimport Search from '../../search/Search';\nimport './GlobalNav.css';\nimport GlobalNavBranding from './GlobalNavBranding';\nimport GlobalNavMenu from './GlobalNavMenu';\nimport GlobalNavUser from './GlobalNavUser';\n\nexport interface GlobalNavProps {\n  appState: Pick<T.AppState, 'canAdmin' | 'globalPages' | 'qualifiers'>;\n  currentUser: T.CurrentUser;\n  location: { pathname: string };\n}\n\nexport function GlobalNav(props: GlobalNavProps) {\n  const { appState, currentUser, location } = props;\n  return (\n    <NavBar className=\"navbar-global\" height={rawSizes.globalNavHeightRaw} id=\"global-navigation\">\n      <GlobalNavBranding />\n\n      <GlobalNavMenu appState={appState} currentUser={currentUser} location={location} />\n\n      <ul className=\"global-navbar-menu global-navbar-menu-right\">\n        <EmbedDocsPopupHelper />\n        <Search currentUser={currentUser} />\n        <GlobalNavUser currentUser={currentUser} />\n      </ul>\n    </NavBar>\n  );\n}\n\nconst mapStateToProps = (state: Store) => {\n  return {\n    currentUser: getCurrentUser(state),\n    appState: getAppState(state)\n  };\n};\n\nexport default connect(mapStateToProps)(GlobalNav);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { dismissSonarlintAd } from '../../../api/users';\nimport { ButtonLink } from '../../../components/controls/buttons';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { setSonarlintAd } from '../../../store/users';\nimport './PromotionNotification.css';\n\nexport interface PromotionNotificationProps {\n  setSonarlintAd: () => void;\n  currentUser: T.CurrentUser;\n}\n\nexport function PromotionNotification(props: PromotionNotificationProps) {\n  const { currentUser } = props;\n\n  if (!isLoggedIn(currentUser) || currentUser.sonarLintAdSeen) {\n    return null;\n  }\n\n  const onClick = () => {\n    dismissSonarlintAd();\n    props.setSonarlintAd();\n  };\n\n  return (\n    <div className=\"toaster display-flex-center big-padded-left big-padded-right\">\n      <div className=\"toaster-icon spacer-right\">\n        <img alt=\"SonarQube + SonarLint\" src={`${getBaseUrl()}/images/sq-sl.png`} />\n      </div>\n      <div className=\"toaster-content flex-1 padded-left padded-right big-padded-top big-padded-bottom\">\n        <span className=\"toaster-title text-bold medium\">\n          {translate('promotion.sonarlint.title')}\n        </span>\n        <p className=\"spacer-top\">{translate('promotion.sonarlint.content')}</p>\n      </div>\n      <div className=\"toaster-actions spacer-left padded-left display-flex-column display-flex-center\">\n        <a\n          className=\"button button-primary big-spacer-bottom\"\n          href=\"https://www.sonarqube.org/sonarlint/?referrer=sonarqube-welcome\"\n          rel=\"noreferrer\"\n          onClick={onClick}\n          target=\"_blank\">\n          {translate('learn_more')}\n        </a>\n        <ButtonLink className=\"toaster-link\" onClick={onClick}>\n          {translate('dismiss')}\n        </ButtonLink>\n      </div>\n    </div>\n  );\n}\n\nconst dispatchToProps = { setSonarlintAd };\n\nexport default connect(null, dispatchToProps)(withCurrentUser(PromotionNotification));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON } from '../helpers/request';\n\nexport interface License {\n  contactEmail: string;\n  edition: string;\n  expiresAt: string;\n  isExpired: boolean;\n  isOfficialDistribution: boolean;\n  isSupported: boolean;\n  isValidEdition: boolean;\n  isValidServerId: boolean;\n  loc: number;\n  maxLoc: number;\n  plugins: string[];\n  remainingLocThreshold: number;\n  serverId: string;\n  type: string;\n}\n\nexport function isValidLicense(): Promise<{ isValidLicense: boolean }> {\n  return getJSON('/api/editions/is_valid_license');\n}\n\nexport function showLicense(): Promise<License> {\n  return getJSON('/api/editions/show_license').catch((response: Response) => {\n    if (response && response.status === 404) {\n      return undefined;\n    }\n    return throwGlobalError(response);\n  });\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { ResetButtonLink } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { translate } from '../../../helpers/l10n';\n\ninterface Props {\n  onClose: () => void;\n}\n\nexport default function LicensePromptModal({ onClose }: Props) {\n  const header = translate('license.prompt.title');\n  return (\n    <Modal contentLabel={header} onRequestClose={onClose}>\n      <header className=\"modal-head\">\n        <h2>{header}</h2>\n      </header>\n      <div className=\"modal-body\">\n        <FormattedMessage\n          defaultMessage={translate('license.prompt.description')}\n          id=\"license.prompt.description\"\n          values={{\n            url: (\n              <Link onClick={onClose} to=\"/admin/extension/license/app\">\n                {translate('license.prompt.link')}\n              </Link>\n            )\n          }}\n        />\n      </div>\n      <footer className=\"modal-foot\">\n        <ResetButtonLink onClick={onClose}>{translate('cancel')}</ResetButtonLink>\n      </footer>\n    </Modal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { differenceInDays } from 'date-fns';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { showLicense } from '../../api/marketplace';\nimport { Location, Router, withRouter } from '../../components/hoc/withRouter';\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\nimport { parseDate, toShortNotSoISOString } from '../../helpers/dates';\nimport { hasMessage } from '../../helpers/l10n';\nimport { get, save } from '../../helpers/storage';\nimport { isLoggedIn } from '../../helpers/users';\nimport { getAppState, getCurrentUser, Store } from '../../store/rootReducer';\nimport { EditionKey } from '../../types/editions';\n\nconst LicensePromptModal = lazyLoadComponent(\n  () => import('../../apps/marketplace/components/LicensePromptModal'),\n  'LicensePromptModal'\n);\n\ninterface StateProps {\n  canAdmin?: boolean;\n  currentEdition?: EditionKey;\n  currentUser: T.CurrentUser;\n}\n\ninterface OwnProps {\n  children?: React.ReactNode;\n}\n\ninterface WithRouterProps {\n  location: Pick<Location, 'pathname'>;\n  router: Pick<Router, 'push'>;\n}\n\ntype Props = StateProps & OwnProps & WithRouterProps;\n\ninterface State {\n  open?: boolean;\n}\n\nconst LICENSE_PROMPT = 'sonarqube.license.prompt';\n\nexport class StartupModal extends React.PureComponent<Props, State> {\n  state: State = {};\n\n  componentDidMount() {\n    this.tryAutoOpenLicense();\n  }\n\n  closeLicense = () => {\n    this.setState({ open: false });\n  };\n\n  tryAutoOpenLicense = () => {\n    const { canAdmin, currentEdition, currentUser } = this.props;\n    const hasLicenseManager = hasMessage('license.prompt.title');\n    const hasLicensedEdition = currentEdition && currentEdition !== EditionKey.community;\n\n    if (canAdmin && hasLicensedEdition && isLoggedIn(currentUser) && hasLicenseManager) {\n      const lastPrompt = get(LICENSE_PROMPT, currentUser.login);\n\n      if (!lastPrompt || differenceInDays(new Date(), parseDate(lastPrompt)) >= 1) {\n        showLicense()\n          .then(license => {\n            if (!license || !license.isValidEdition) {\n              save(LICENSE_PROMPT, toShortNotSoISOString(new Date()), currentUser.login);\n              this.setState({ open: true });\n            }\n          })\n          .catch(() => {});\n      }\n    }\n  };\n\n  render() {\n    const { open } = this.state;\n    return (\n      <>\n        {this.props.children}\n        {open && <LicensePromptModal onClose={this.closeLicense} />}\n      </>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store): StateProps => ({\n  canAdmin: getAppState(state).canAdmin,\n  currentEdition: getAppState(state).edition as EditionKey, // TODO: Fix once AppState is no longer ambiant.\n  currentUser: getCurrentUser(state)\n});\n\nexport default connect(mapStateToProps)(withRouter(StartupModal));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Workspace from '../../components/workspace/Workspace';\nimport A11yProvider from './a11y/A11yProvider';\nimport A11ySkipLinks from './a11y/A11ySkipLinks';\nimport SuggestionsProvider from './embed-docs-modal/SuggestionsProvider';\nimport GlobalFooterContainer from './GlobalFooterContainer';\nimport GlobalMessagesContainer from './GlobalMessagesContainer';\nimport IndexationContextProvider from './indexation/IndexationContextProvider';\nimport IndexationNotification from './indexation/IndexationNotification';\nimport GlobalNav from './nav/global/GlobalNav';\nimport PromotionNotification from './promotion-notification/PromotionNotification';\nimport StartupModal from './StartupModal';\nimport UpdateNotification from './update-notification/UpdateNotification';\n\nexport interface Props {\n  children: React.ReactNode;\n  footer?: React.ReactNode;\n  location: { pathname: string };\n}\n\nexport default function GlobalContainer(props: Props) {\n  // it is important to pass `location` down to `GlobalNav` to trigger render on url change\n  const { footer = <GlobalFooterContainer /> } = props;\n  return (\n    <SuggestionsProvider>\n      <A11yProvider>\n        <StartupModal>\n          <A11ySkipLinks />\n\n          <div className=\"global-container\">\n            <div className=\"page-wrapper\" id=\"container\">\n              <div className=\"page-container\">\n                <Workspace>\n                  <IndexationContextProvider>\n                    <GlobalNav location={props.location} />\n                    <GlobalMessagesContainer />\n                    <IndexationNotification />\n                    <UpdateNotification dismissable={true} />\n                    {props.children}\n                  </IndexationContextProvider>\n                </Workspace>\n              </div>\n              <PromotionNotification />\n            </div>\n            {footer}\n          </div>\n        </StartupModal>\n      </A11yProvider>\n    </SuggestionsProvider>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { WithRouterProps } from 'react-router';\nimport { getSystemStatus } from '../../helpers/system';\n\nexport default class MigrationContainer extends React.PureComponent<WithRouterProps> {\n  componentDidMount() {\n    if (getSystemStatus() !== 'UP') {\n      this.props.router.push({\n        pathname: '/maintenance',\n        query: {\n          return_to: window.location.pathname + window.location.search + window.location.hash\n        }\n      });\n    }\n  }\n\n  render() {\n    if (getSystemStatus() !== 'UP') {\n      return null;\n    }\n    return this.props.children;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router';\nimport { translate } from '../../helpers/l10n';\n\nexport default function ComponentContainerNotFound() {\n  return (\n    <>\n      <Helmet defaultTitle={translate('404_not_found')} defer={false} />\n      <div className=\"page-wrapper-simple\" id=\"bd\">\n        <div className=\"page-simple\" id=\"nonav\">\n          <h2 className=\"big-spacer-bottom\">{translate('dashboard.project_not_found')}</h2>\n          <p className=\"spacer-bottom\">{translate('dashboard.project_not_found.2')}</p>\n          <p>\n            <Link to=\"/\">{translate('go_back_to_homepage')}</Link>\n          </p>\n        </div>\n      </div>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport './ContextNavBar.css';\nimport NavBar, { NavBarProps } from './NavBar';\n\ninterface Props extends NavBarProps {\n  className?: string;\n  id?: string;\n  height: number;\n}\n\nexport default function ContextNavBar({ className, ...other }: Props) {\n  return <NavBar className={classNames('navbar-context', className)} {...other} />;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { isValidLicense } from '../../../../api/marketplace';\nimport { withAppState } from '../../../../components/hoc/withAppState';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\nimport { ComponentQualifier } from '../../../../types/component';\nimport { Task } from '../../../../types/tasks';\n\ninterface Props {\n  appState: Pick<T.AppState, 'canAdmin'>;\n  currentTask?: Task;\n}\n\ninterface State {\n  isValidLicense?: boolean;\n  loading: boolean;\n}\n\nexport class ComponentNavLicenseNotif extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: false };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchIsValidLicense();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchIsValidLicense = () => {\n    this.setState({ loading: true });\n    isValidLicense().then(\n      ({ isValidLicense }) => {\n        if (this.mounted) {\n          this.setState({ isValidLicense, loading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  render() {\n    const { currentTask } = this.props;\n    const { isValidLicense, loading } = this.state;\n\n    if (loading || !currentTask || !currentTask.errorType) {\n      return null;\n    }\n\n    if (isValidLicense && currentTask.errorType !== 'LICENSING_LOC') {\n      return (\n        <Alert display=\"banner\" variant=\"error\">\n          {translateWithParameters(\n            'component_navigation.status.last_blocked_due_to_bad_license_X',\n            translate('qualifier', currentTask.componentQualifier || ComponentQualifier.Project)\n          )}\n        </Alert>\n      );\n    }\n\n    return (\n      <Alert display=\"banner\" variant=\"error\">\n        <span className=\"little-spacer-right\">{currentTask.errorMessage}</span>\n        {this.props.appState.canAdmin ? (\n          <Link to=\"/admin/extension/license/app\">\n            {translate('license.component_navigation.button', currentTask.errorType)}.\n          </Link>\n        ) : (\n          translate('please_contact_administrator')\n        )}\n      </Alert>\n    );\n  }\n}\n\nexport default withAppState(ComponentNavLicenseNotif);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link, WithRouterProps } from 'react-router';\nimport { STATUSES } from '../../../../apps/background-tasks/constants';\nimport { withRouter } from '../../../../components/hoc/withRouter';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { hasMessage, translate } from '../../../../helpers/l10n';\nimport { getComponentBackgroundTaskUrl } from '../../../../helpers/urls';\nimport { Task, TaskStatuses } from '../../../../types/tasks';\nimport ComponentNavLicenseNotif from './ComponentNavLicenseNotif';\n\ninterface Props extends Pick<WithRouterProps, 'location'> {\n  component: T.Component;\n  currentTask?: Task;\n  currentTaskOnSameBranch?: boolean;\n  isInProgress?: boolean;\n  isPending?: boolean;\n}\n\nexport class ComponentNavBgTaskNotif extends React.PureComponent<Props> {\n  renderMessage(messageKey: string, status?: string, branch?: string) {\n    const { component, currentTask, location } = this.props;\n    const backgroundTaskUrl = getComponentBackgroundTaskUrl(component.key, status);\n    const canSeeBackgroundTasks =\n      component.configuration && component.configuration.showBackgroundTasks;\n    const isOnBackgroundTaskPage = location.pathname === backgroundTaskUrl.pathname;\n\n    let type;\n    if (currentTask && hasMessage('background_task.type', currentTask.type)) {\n      messageKey += '_X';\n      type = translate('background_task.type', currentTask.type);\n    }\n\n    let url;\n    let stacktrace;\n    if (canSeeBackgroundTasks) {\n      messageKey += '.admin';\n\n      if (isOnBackgroundTaskPage) {\n        messageKey += '.help';\n        stacktrace = translate('background_tasks.show_stacktrace');\n      } else {\n        messageKey += '.link';\n        url = <Link to={backgroundTaskUrl}>{translate('background_tasks.page')}</Link>;\n      }\n    }\n\n    return (\n      <FormattedMessage\n        defaultMessage={translate(messageKey)}\n        id={messageKey}\n        values={{ branch, url, stacktrace, type }}\n      />\n    );\n  }\n\n  render() {\n    const { currentTask, currentTaskOnSameBranch, isInProgress, isPending } = this.props;\n    if (isInProgress) {\n      return (\n        <Alert display=\"banner\" variant=\"info\">\n          {this.renderMessage('component_navigation.status.in_progress')}\n        </Alert>\n      );\n    } else if (isPending) {\n      return (\n        <Alert display=\"banner\" variant=\"info\">\n          {this.renderMessage('component_navigation.status.pending', STATUSES.ALL)}\n        </Alert>\n      );\n    } else if (currentTask && currentTask.status === TaskStatuses.Failed) {\n      if (\n        currentTask.errorType &&\n        hasMessage('license.component_navigation.button', currentTask.errorType)\n      ) {\n        return <ComponentNavLicenseNotif currentTask={currentTask} />;\n      }\n      const branch =\n        currentTask.branch ||\n        `${currentTask.pullRequest}${\n          currentTask.pullRequestTitle ? ' - ' + currentTask.pullRequestTitle : ''\n        }`;\n      let message;\n      if (currentTaskOnSameBranch === false && branch) {\n        message = this.renderMessage(\n          'component_navigation.status.failed_branch',\n          undefined,\n          branch\n        );\n      } else {\n        message = this.renderMessage('component_navigation.status.failed');\n      }\n\n      return (\n        <Alert className=\"null-spacer-bottom\" display=\"banner\" variant=\"error\">\n          {message}\n        </Alert>\n      );\n    }\n    return null;\n  }\n}\n\nexport default withRouter(ComponentNavBgTaskNotif);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../../../apps/settings/components/AdditionalCategoryKeys';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport { getProjectSettingsUrl } from '../../../../helpers/urls';\n\nexport interface ComponentNavProjectBindingErrorNotifProps {\n  component: T.Component;\n}\n\nexport function ComponentNavProjectBindingErrorNotif(\n  props: ComponentNavProjectBindingErrorNotifProps\n) {\n  const { component } = props;\n  let action;\n\n  if (component.configuration?.showSettings) {\n    action = (\n      <Link to={getProjectSettingsUrl(component.key, PULL_REQUEST_DECORATION_BINDING_CATEGORY)}>\n        {translate('component_navigation.pr_deco.action.check_project_settings')}\n      </Link>\n    );\n  } else {\n    action = translate('component_navigation.pr_deco.action.contact_project_admin');\n  }\n\n  return (\n    <Alert display=\"banner\" variant=\"warning\">\n      <FormattedMessage\n        defaultMessage={translate('component_navigation.pr_deco.error_detected_X')}\n        id=\"component_navigation.pr_deco.error_detected_X\"\n        values={{ action }}\n      />\n    </Alert>\n  );\n}\n\nexport default ComponentNavProjectBindingErrorNotif;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport DocumentationTooltip from '../../../../../components/common/DocumentationTooltip';\nimport HelpTooltip from '../../../../../components/controls/HelpTooltip';\nimport BranchLikeIcon from '../../../../../components/icons/BranchLikeIcon';\nimport DropdownIcon from '../../../../../components/icons/DropdownIcon';\nimport PlusCircleIcon from '../../../../../components/icons/PlusCircleIcon';\nimport { getBranchLikeDisplayName } from '../../../../../helpers/branch-like';\nimport { translate, translateWithParameters } from '../../../../../helpers/l10n';\nimport { getApplicationAdminUrl } from '../../../../../helpers/urls';\nimport { AlmKeys, ProjectAlmBindingResponse } from '../../../../../types/alm-settings';\nimport { BranchLike } from '../../../../../types/branch-like';\nimport { ComponentQualifier } from '../../../../../types/component';\nimport { colors } from '../../../../theme';\n\nexport interface CurrentBranchLikeProps {\n  branchesEnabled: boolean;\n  component: T.Component;\n  currentBranchLike: BranchLike;\n  hasManyBranches: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nexport function CurrentBranchLike(props: CurrentBranchLikeProps) {\n  const {\n    branchesEnabled,\n    component,\n    component: { configuration },\n    currentBranchLike,\n    hasManyBranches,\n    projectBinding\n  } = props;\n\n  const displayName = getBranchLikeDisplayName(currentBranchLike);\n  const isApplication = component.qualifier === ComponentQualifier.Application;\n  const canAdminComponent = configuration && configuration.showSettings;\n  const isGitLab = projectBinding !== undefined && projectBinding.alm === AlmKeys.GitLab;\n\n  const additionalIcon = () => {\n    const plusIcon = <PlusCircleIcon fill={colors.blue} size={12} />;\n\n    if (branchesEnabled && hasManyBranches) {\n      return <DropdownIcon />;\n    }\n\n    if (isApplication) {\n      if (!hasManyBranches && canAdminComponent) {\n        return (\n          <HelpTooltip\n            overlay={\n              <>\n                <p>{translate('application.branches.help')}</p>\n                <hr className=\"spacer-top spacer-bottom\" />\n                <Link to={getApplicationAdminUrl(component.key)}>\n                  {translate('application.branches.link')}\n                </Link>\n              </>\n            }>\n            {plusIcon}\n          </HelpTooltip>\n        );\n      }\n    } else {\n      if (!branchesEnabled) {\n        return (\n          <DocumentationTooltip\n            content={\n              projectBinding !== undefined\n                ? translateWithParameters(\n                    `branch_like_navigation.no_branch_support.content_x.${isGitLab ? 'mr' : 'pr'}`,\n                    translate('alm', projectBinding.alm)\n                  )\n                : translate('branch_like_navigation.no_branch_support.content')\n            }\n            data-test=\"branches-support-disabled\"\n            links={[\n              {\n                href: 'https://redirect.sonarsource.com/editions/developer.html',\n                label: translate('learn_more')\n              }\n            ]}\n            title={\n              projectBinding !== undefined\n                ? translate(\n                    'branch_like_navigation.no_branch_support.title',\n                    isGitLab ? 'mr' : 'pr'\n                  )\n                : translate('branch_like_navigation.no_branch_support.title')\n            }>\n            {plusIcon}\n          </DocumentationTooltip>\n        );\n      }\n\n      if (!hasManyBranches) {\n        return (\n          <DocumentationTooltip\n            content={translate('branch_like_navigation.only_one_branch.content')}\n            data-test=\"only-one-branch-like\"\n            links={[\n              {\n                href: '/documentation/branches/overview/',\n                label: translate('branch_like_navigation.only_one_branch.documentation')\n              },\n              {\n                href: '/documentation/analysis/pull-request/',\n                label: translate('branch_like_navigation.only_one_branch.pr_analysis')\n              },\n              {\n                href: `/tutorials?id=${component.key}`,\n                label: translate('branch_like_navigation.tutorial_for_ci'),\n                inPlace: true\n              }\n            ]}\n            title={translate('branch_like_navigation.only_one_branch.title')}>\n            {plusIcon}\n          </DocumentationTooltip>\n        );\n      }\n    }\n\n    return null;\n  };\n\n  return (\n    <span className=\"display-flex-center flex-shrink text-ellipsis\">\n      <BranchLikeIcon branchLike={currentBranchLike} />\n      <span\n        className=\"spacer-left spacer-right flex-shrink text-ellipsis js-branch-like-name\"\n        title={displayName}>\n        {displayName}\n      </span>\n      {additionalIcon()}\n    </span>\n  );\n}\n\nexport default React.memo(CurrentBranchLike);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport BranchStatus from '../../../../../components/common/BranchStatus';\nimport BranchLikeIcon from '../../../../../components/icons/BranchLikeIcon';\nimport { getBranchLikeDisplayName, isMainBranch } from '../../../../../helpers/branch-like';\nimport { translate } from '../../../../../helpers/l10n';\nimport { BranchLike } from '../../../../../types/branch-like';\n\nexport interface MenuItemProps {\n  branchLike: BranchLike;\n  component: T.Component;\n  indent?: boolean;\n  onSelect: (branchLike: BranchLike) => void;\n  selected: boolean;\n  setSelectedNode?: (node: HTMLLIElement) => void;\n}\n\nexport function MenuItem(props: MenuItemProps) {\n  const { branchLike, component, indent, setSelectedNode, onSelect, selected } = props;\n  const displayName = getBranchLikeDisplayName(branchLike);\n\n  return (\n    <li\n      className={classNames('item', {\n        active: selected\n      })}\n      onClick={() => onSelect(branchLike)}\n      ref={selected ? setSelectedNode : undefined}>\n      <div\n        className={classNames('display-flex-center display-flex-space-between', {\n          'big-spacer-left': indent\n        })}>\n        <div className=\"item-name text-ellipsis\" title={displayName}>\n          <BranchLikeIcon branchLike={branchLike} />\n          <span className=\"spacer-left\">{displayName}</span>\n          {isMainBranch(branchLike) && (\n            <span className=\"badge spacer-left\">{translate('branches.main_branch')}</span>\n          )}\n        </div>\n        <div className=\"spacer-left\">\n          <BranchStatus branchLike={branchLike} component={component.key} />\n        </div>\n      </div>\n    </li>\n  );\n}\n\nexport default React.memo(MenuItem);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../../../components/controls/HelpTooltip';\nimport { getBranchLikeKey, isSameBranchLike } from '../../../../../helpers/branch-like';\nimport { translate } from '../../../../../helpers/l10n';\nimport { scrollToElement } from '../../../../../helpers/scrolling';\nimport { isDefined } from '../../../../../helpers/types';\nimport { BranchLike, BranchLikeTree } from '../../../../../types/branch-like';\nimport MenuItem from './MenuItem';\n\nexport interface MenuItemListProps {\n  branchLikeTree: BranchLikeTree;\n  component: T.Component;\n  hasResults: boolean;\n  onSelect: (branchLike: BranchLike) => void;\n  selectedBranchLike: BranchLike | undefined;\n}\n\nexport function MenuItemList(props: MenuItemListProps) {\n  let listNode: HTMLUListElement | null = null;\n  let selectedNode: HTMLLIElement | null = null;\n\n  React.useEffect(() => {\n    if (listNode && selectedNode) {\n      scrollToElement(selectedNode, { parent: listNode, smooth: false });\n    }\n  });\n\n  const { branchLikeTree, component, hasResults, onSelect, selectedBranchLike } = props;\n\n  const renderItem = (branchLike: BranchLike, indent?: boolean) => (\n    <MenuItem\n      branchLike={branchLike}\n      component={component}\n      indent={indent}\n      key={getBranchLikeKey(branchLike)}\n      onSelect={onSelect}\n      selected={isSameBranchLike(branchLike, selectedBranchLike)}\n      setSelectedNode={node => (selectedNode = node)}\n    />\n  );\n\n  return (\n    <ul className=\"item-list\" ref={node => (listNode = node)}>\n      {!hasResults && (\n        <li className=\"item\">\n          <span className=\"note\">{translate('no_results')}</span>\n        </li>\n      )}\n\n      {/* BRANCHES & PR */}\n      {[branchLikeTree.mainBranchTree, ...branchLikeTree.branchTree].filter(isDefined).map(tree => (\n        <React.Fragment key={getBranchLikeKey(tree.branch)}>\n          {renderItem(tree.branch)}\n          {tree.pullRequests.length > 0 && (\n            <>\n              <li className=\"item header\">\n                <span className=\"big-spacer-left\">\n                  {translate('branch_like_navigation.pull_requests')}\n                </span>\n              </li>\n              {tree.pullRequests.map(pr => renderItem(pr, true))}\n            </>\n          )}\n          <hr />\n        </React.Fragment>\n      ))}\n\n      {/* PARENTLESS PR (for display during search) */}\n      {branchLikeTree.parentlessPullRequests.length > 0 && (\n        <>\n          <li className=\"item header\">{translate('branch_like_navigation.pull_requests')}</li>\n          {branchLikeTree.parentlessPullRequests.map(pr => renderItem(pr))}\n        </>\n      )}\n\n      {/* ORPHAN PR */}\n      {branchLikeTree.orphanPullRequests.length > 0 && (\n        <>\n          <li className=\"item header\">\n            {translate('branch_like_navigation.orphan_pull_requests')}\n            <HelpTooltip\n              className=\"little-spacer-left\"\n              overlay={translate('branch_like_navigation.orphan_pull_requests.tooltip')}\n            />\n          </li>\n          {branchLikeTree.orphanPullRequests.map(pr => renderItem(pr))}\n        </>\n      )}\n    </ul>\n  );\n}\n\nexport default React.memo(MenuItemList);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { DropdownOverlay } from '../../../../../components/controls/Dropdown';\nimport SearchBox from '../../../../../components/controls/SearchBox';\nimport { Router, withRouter } from '../../../../../components/hoc/withRouter';\nimport {\n  getBrancheLikesAsTree,\n  isBranch,\n  isPullRequest,\n  isSameBranchLike\n} from '../../../../../helpers/branch-like';\nimport { KeyCodes } from '../../../../../helpers/keycodes';\nimport { translate } from '../../../../../helpers/l10n';\nimport { getBranchLikeUrl } from '../../../../../helpers/urls';\nimport { BranchLike, BranchLikeTree } from '../../../../../types/branch-like';\nimport { ComponentQualifier } from '../../../../../types/component';\nimport MenuItemList from './MenuItemList';\n\ninterface Props {\n  branchLikes: BranchLike[];\n  canAdminComponent?: boolean;\n  component: T.Component;\n  currentBranchLike: BranchLike;\n  onClose: () => void;\n  router: Pick<Router, 'push'>;\n}\n\ninterface State {\n  branchLikesToDisplay: BranchLike[];\n  branchLikesToDisplayTree: BranchLikeTree;\n  query: string;\n  selectedBranchLike: BranchLike | undefined;\n}\n\nexport class Menu extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n\n    let selectedBranchLike = undefined;\n\n    if (props.branchLikes.some(b => isSameBranchLike(b, props.currentBranchLike))) {\n      selectedBranchLike = props.currentBranchLike;\n    } else if (props.branchLikes.length > 0) {\n      selectedBranchLike = props.branchLikes[0];\n    }\n\n    this.state = {\n      query: '',\n      selectedBranchLike,\n      ...this.processBranchLikes(props.branchLikes)\n    };\n  }\n\n  processBranchLikes = (branchLikes: BranchLike[]) => {\n    const tree = getBrancheLikesAsTree(branchLikes);\n    return {\n      branchLikesToDisplay: [\n        ...(tree.mainBranchTree\n          ? [tree.mainBranchTree.branch, ...tree.mainBranchTree.pullRequests]\n          : []),\n        ...tree.branchTree.reduce((prev, t) => [...prev, t.branch, ...t.pullRequests], []),\n        ...tree.parentlessPullRequests,\n        ...tree.orphanPullRequests\n      ],\n      branchLikesToDisplayTree: tree\n    };\n  };\n\n  openHighlightedBranchLike = () => {\n    if (this.state.selectedBranchLike) {\n      this.handleOnSelect(this.state.selectedBranchLike);\n    }\n  };\n\n  highlightSiblingBranchlike = (indexDelta: number) => {\n    const selectBranchLikeIndex = this.state.branchLikesToDisplay.findIndex(b =>\n      isSameBranchLike(b, this.state.selectedBranchLike)\n    );\n    const newIndex = selectBranchLikeIndex + indexDelta;\n\n    if (\n      selectBranchLikeIndex !== -1 &&\n      newIndex >= 0 &&\n      newIndex < this.state.branchLikesToDisplay.length\n    ) {\n      this.setState(({ branchLikesToDisplay }) => ({\n        selectedBranchLike: branchLikesToDisplay[newIndex]\n      }));\n    }\n  };\n\n  handleKeyDown = (event: React.KeyboardEvent) => {\n    switch (event.keyCode) {\n      case KeyCodes.Enter:\n        event.preventDefault();\n        this.openHighlightedBranchLike();\n        break;\n      case KeyCodes.UpArrow:\n        event.preventDefault();\n        this.highlightSiblingBranchlike(-1);\n        break;\n      case KeyCodes.DownArrow:\n        event.preventDefault();\n        this.highlightSiblingBranchlike(+1);\n        break;\n    }\n  };\n\n  handleSearchChange = (query: string) => {\n    const q = query.toLowerCase();\n\n    const filterBranch = (branch: BranchLike) =>\n      isBranch(branch) && branch.name.toLowerCase().includes(q);\n    const filterPullRequest = (pr: BranchLike) =>\n      isPullRequest(pr) && (pr.title.toLowerCase().includes(q) || pr.key.toLowerCase().includes(q));\n\n    const filteredBranchLikes = this.props.branchLikes.filter(\n      bl => filterBranch(bl) || filterPullRequest(bl)\n    );\n\n    this.setState({\n      query: q,\n      selectedBranchLike: filteredBranchLikes.length > 0 ? filteredBranchLikes[0] : undefined,\n      ...this.processBranchLikes(filteredBranchLikes)\n    });\n  };\n\n  handleOnSelect = (branchLike: BranchLike) => {\n    this.setState({ selectedBranchLike: branchLike }, () => {\n      this.props.onClose();\n      this.props.router.push(getBranchLikeUrl(this.props.component.key, branchLike));\n    });\n  };\n\n  render() {\n    const { canAdminComponent, component, onClose } = this.props;\n    const {\n      branchLikesToDisplay,\n      branchLikesToDisplayTree,\n      query,\n      selectedBranchLike\n    } = this.state;\n\n    const showManageLink = component.qualifier === ComponentQualifier.Project && canAdminComponent;\n    const hasResults = branchLikesToDisplay.length > 0;\n\n    return (\n      <DropdownOverlay className=\"branch-like-navigation-menu\" noPadding={true}>\n        <div className=\"search-box-container\">\n          <SearchBox\n            autoFocus={true}\n            onChange={this.handleSearchChange}\n            onKeyDown={this.handleKeyDown}\n            placeholder={translate('branch_like_navigation.search_for_branch_like')}\n            value={query}\n          />\n        </div>\n\n        <div className=\"item-list-container\">\n          <MenuItemList\n            branchLikeTree={branchLikesToDisplayTree}\n            component={component}\n            hasResults={hasResults}\n            onSelect={this.handleOnSelect}\n            selectedBranchLike={selectedBranchLike}\n          />\n        </div>\n\n        {showManageLink && (\n          <div className=\"hint-container text-right\">\n            <Link\n              onClick={() => onClose()}\n              to={{ pathname: '/project/branches', query: { id: component.key } }}>\n              {translate('branch_like_navigation.manage')}\n            </Link>\n          </div>\n        )}\n      </DropdownOverlay>\n    );\n  }\n}\n\nexport default withRouter(Menu);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Toggler from '../../../../../components/controls/Toggler';\nimport { withAppState } from '../../../../../components/hoc/withAppState';\nimport { ProjectAlmBindingResponse } from '../../../../../types/alm-settings';\nimport { BranchLike } from '../../../../../types/branch-like';\nimport './BranchLikeNavigation.css';\nimport CurrentBranchLike from './CurrentBranchLike';\nimport Menu from './Menu';\n\nexport interface BranchLikeNavigationProps {\n  appState: Pick<T.AppState, 'branchesEnabled'>;\n  branchLikes: BranchLike[];\n  component: T.Component;\n  currentBranchLike: BranchLike;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nexport function BranchLikeNavigation(props: BranchLikeNavigationProps) {\n  const {\n    appState: { branchesEnabled },\n    branchLikes,\n    component,\n    component: { configuration },\n    currentBranchLike,\n    projectBinding\n  } = props;\n\n  const [isMenuOpen, setIsMenuOpen] = React.useState(false);\n\n  const canAdminComponent = configuration && configuration.showSettings;\n  const hasManyBranches = branchLikes.length >= 2;\n  const isMenuEnabled = branchesEnabled && hasManyBranches;\n\n  const currentBranchLikeElement = (\n    <CurrentBranchLike\n      branchesEnabled={Boolean(branchesEnabled)}\n      component={component}\n      currentBranchLike={currentBranchLike}\n      hasManyBranches={hasManyBranches}\n      projectBinding={projectBinding}\n    />\n  );\n\n  return (\n    <span\n      className={classNames('big-spacer-left flex-0 branch-like-navigation-toggler-container', {\n        dropdown: isMenuEnabled\n      })}>\n      {isMenuEnabled ? (\n        <Toggler\n          onRequestClose={() => setIsMenuOpen(false)}\n          open={isMenuOpen}\n          overlay={\n            <Menu\n              branchLikes={branchLikes}\n              canAdminComponent={canAdminComponent}\n              component={component}\n              currentBranchLike={currentBranchLike}\n              onClose={() => setIsMenuOpen(false)}\n            />\n          }>\n          <a\n            className=\"link-base-color link-no-underline\"\n            href=\"#\"\n            onClick={() => setIsMenuOpen(!isMenuOpen)}>\n            {currentBranchLikeElement}\n          </a>\n        </Toggler>\n      ) : (\n        currentBranchLikeElement\n      )}\n    </span>\n  );\n}\n\nexport default withAppState(React.memo(BranchLikeNavigation));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { isPullRequest } from '../../../../../helpers/branch-like';\nimport { translate } from '../../../../../helpers/l10n';\nimport { BranchLike } from '../../../../../types/branch-like';\n\nexport interface CurrentBranchLikeMergeInformationProps {\n  currentBranchLike: BranchLike;\n}\n\nexport function CurrentBranchLikeMergeInformation(props: CurrentBranchLikeMergeInformationProps) {\n  const { currentBranchLike } = props;\n\n  if (!isPullRequest(currentBranchLike)) {\n    return null;\n  }\n\n  return (\n    <span className=\"big-spacer-left flex-shrink note text-ellipsis\">\n      <FormattedMessage\n        defaultMessage={translate('branch_like_navigation.for_merge_into_x_from_y')}\n        id=\"branch_like_navigation.for_merge_into_x_from_y\"\n        values={{\n          target: <strong>{currentBranchLike.target}</strong>,\n          branch: <strong>{currentBranchLike.branch}</strong>\n        }}\n      />\n    </span>\n  );\n}\n\nexport default React.memo(CurrentBranchLikeMergeInformation);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { last } from 'lodash';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport QualifierIcon from '../../../../components/icons/QualifierIcon';\nimport { isMainBranch } from '../../../../helpers/branch-like';\nimport { getComponentOverviewUrl } from '../../../../helpers/urls';\nimport { BranchLike } from '../../../../types/branch-like';\n\ninterface Props {\n  component: T.Component;\n  currentBranchLike: BranchLike | undefined;\n}\n\nexport function Breadcrumb(props: Props) {\n  const {\n    component: { breadcrumbs },\n    currentBranchLike\n  } = props;\n  const lastBreadcrumbElement = last(breadcrumbs);\n  const isNoMainBranch = currentBranchLike && !isMainBranch(currentBranchLike);\n\n  return (\n    <div className=\"big flex-shrink display-flex-center\">\n      {breadcrumbs.map((breadcrumbElement, i) => {\n        const isFirst = i === 0;\n        const isNotLast = i < breadcrumbs.length - 1;\n\n        return (\n          <span className=\"flex-shrink display-flex-center\" key={breadcrumbElement.key}>\n            {isFirst && lastBreadcrumbElement && (\n              <QualifierIcon className=\"spacer-right\" qualifier={lastBreadcrumbElement.qualifier} />\n            )}\n            {isNoMainBranch || isNotLast ? (\n              <Link\n                className=\"link-no-underline text-ellipsis\"\n                title={breadcrumbElement.name}\n                to={getComponentOverviewUrl(breadcrumbElement.key, breadcrumbElement.qualifier)}>\n                {breadcrumbElement.name}\n              </Link>\n            ) : (\n              <span className=\"text-ellipsis\" title={breadcrumbElement.name}>\n                {breadcrumbElement.name}\n              </span>\n            )}\n            {isNotLast && <span className=\"slash-separator\" />}\n          </span>\n        );\n      })}\n    </div>\n  );\n}\n\nexport default React.memo(Breadcrumb);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport Favorite from '../../../../components/controls/Favorite';\nimport { isLoggedIn } from '../../../../helpers/users';\nimport { getCurrentUser, Store } from '../../../../store/rootReducer';\nimport { ProjectAlmBindingResponse } from '../../../../types/alm-settings';\nimport { BranchLike } from '../../../../types/branch-like';\nimport BranchLikeNavigation from './branch-like/BranchLikeNavigation';\nimport CurrentBranchLikeMergeInformation from './branch-like/CurrentBranchLikeMergeInformation';\nimport { Breadcrumb } from './Breadcrumb';\n\nexport interface HeaderProps {\n  branchLikes: BranchLike[];\n  component: T.Component;\n  currentBranchLike: BranchLike | undefined;\n  currentUser: T.CurrentUser;\n  projectBinding?: ProjectAlmBindingResponse;\n}\n\nexport function Header(props: HeaderProps) {\n  const { branchLikes, component, currentBranchLike, currentUser, projectBinding } = props;\n\n  return (\n    <>\n      <Helmet title={component.name} />\n      <header className=\"display-flex-center flex-shrink\">\n        <Breadcrumb component={component} currentBranchLike={currentBranchLike} />\n        {isLoggedIn(currentUser) && (\n          <Favorite\n            className=\"spacer-left\"\n            component={component.key}\n            favorite={Boolean(component.isFavorite)}\n            qualifier={component.qualifier}\n          />\n        )}\n        {currentBranchLike && (\n          <>\n            <BranchLikeNavigation\n              branchLikes={branchLikes}\n              component={component}\n              currentBranchLike={currentBranchLike}\n              projectBinding={projectBinding}\n            />\n            <CurrentBranchLikeMergeInformation currentBranchLike={currentBranchLike} />\n          </>\n        )}\n      </header>\n    </>\n  );\n}\n\nconst mapStateToProps = (state: Store) => ({\n  currentUser: getCurrentUser(state)\n});\n\nexport default connect(mapStateToProps)(React.memo(Header));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { lazyLoadComponent } from '../../../../components/lazyLoadComponent';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport { TaskWarning } from '../../../../types/tasks';\n\nconst AnalysisWarningsModal = lazyLoadComponent(\n  () => import('../../../../components/common/AnalysisWarningsModal'),\n  'AnalysisWarningsModal'\n);\n\ninterface Props {\n  componentKey: string;\n  onWarningDismiss: () => void;\n  warnings: TaskWarning[];\n}\n\ninterface State {\n  modal: boolean;\n}\n\nexport default class ComponentNavWarnings extends React.PureComponent<Props, State> {\n  state: State = { modal: false };\n\n  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n    event.preventDefault();\n    event.currentTarget.blur();\n    this.setState({ modal: true });\n  };\n\n  handleCloseModal = () => {\n    this.setState({ modal: false });\n  };\n\n  render() {\n    return (\n      <>\n        <Alert className=\"js-component-analysis-warnings flex-1\" display=\"inline\" variant=\"warning\">\n          <FormattedMessage\n            defaultMessage={translate('component_navigation.last_analysis_had_warnings')}\n            id=\"component_navigation.last_analysis_had_warnings\"\n            values={{\n              warnings: (\n                <a href=\"#\" onClick={this.handleClick}>\n                  <FormattedMessage\n                    defaultMessage={translate('component_navigation.x_warnings')}\n                    id=\"component_navigation.x_warnings\"\n                    values={{\n                      warningsCount: this.props.warnings.length\n                    }}\n                  />\n                </a>\n              )\n            }}\n          />\n        </Alert>\n        {this.state.modal && (\n          <AnalysisWarningsModal\n            componentKey={this.props.componentKey}\n            onClose={this.handleCloseModal}\n            onWarningDismiss={this.props.onWarningDismiss}\n            warnings={this.props.warnings}\n          />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport BranchStatus from '../../../../components/common/BranchStatus';\nimport HomePageSelect from '../../../../components/controls/HomePageSelect';\nimport DetachIcon from '../../../../components/icons/DetachIcon';\nimport DateTimeFormatter from '../../../../components/intl/DateTimeFormatter';\nimport { isBranch, isPullRequest } from '../../../../helpers/branch-like';\nimport { translate } from '../../../../helpers/l10n';\nimport { isLoggedIn } from '../../../../helpers/users';\nimport { getCurrentUser, Store } from '../../../../store/rootReducer';\nimport { BranchLike } from '../../../../types/branch-like';\nimport { ComponentQualifier } from '../../../../types/component';\nimport { TaskWarning } from '../../../../types/tasks';\nimport ComponentNavWarnings from './ComponentNavWarnings';\nimport './HeaderMeta.css';\n\nexport interface HeaderMetaProps {\n  branchLike?: BranchLike;\n  currentUser: T.CurrentUser;\n  component: T.Component;\n  onWarningDismiss: () => void;\n  warnings: TaskWarning[];\n}\n\nexport function HeaderMeta(props: HeaderMetaProps) {\n  const { branchLike, component, currentUser, warnings } = props;\n\n  const isABranch = isBranch(branchLike);\n  const currentPage = getCurrentPage(component, branchLike);\n  const displayVersion = component.version !== undefined && isABranch;\n\n  return (\n    <>\n      <div className=\"display-flex-center flex-0 small\">\n        {warnings.length > 0 && (\n          <span className=\"header-meta-warnings\">\n            <ComponentNavWarnings\n              componentKey={component.key}\n              onWarningDismiss={props.onWarningDismiss}\n              warnings={warnings}\n            />\n          </span>\n        )}\n        {component.analysisDate && (\n          <span className=\"spacer-left nowrap note\">\n            <DateTimeFormatter date={component.analysisDate} />\n          </span>\n        )}\n        {displayVersion && (\n          <span className=\"spacer-left nowrap note\">{`${translate('version')} ${\n            component.version\n          }`}</span>\n        )}\n        {isLoggedIn(currentUser) && currentPage !== undefined && !isPullRequest(branchLike) && (\n          <HomePageSelect className=\"spacer-left\" currentPage={currentPage} />\n        )}\n      </div>\n      {isPullRequest(branchLike) && (\n        <div className=\"navbar-context-meta-secondary display-inline-flex-center\">\n          {branchLike.url !== undefined && (\n            <a\n              className=\"display-inline-flex-center big-spacer-right\"\n              href={branchLike.url}\n              rel=\"noopener noreferrer\"\n              target=\"_blank\">\n              {translate('branches.see_the_pr')}\n              <DetachIcon className=\"little-spacer-left\" size={12} />\n            </a>\n          )}\n          <BranchStatus branchLike={branchLike} component={component.key} />\n        </div>\n      )}\n    </>\n  );\n}\n\nexport function getCurrentPage(component: T.Component, branchLike: BranchLike | undefined) {\n  let currentPage: T.HomePage | undefined;\n\n  const branch = isBranch(branchLike) && !branchLike.isMain ? branchLike.name : undefined;\n\n  switch (component.qualifier) {\n    case ComponentQualifier.Portfolio:\n    case ComponentQualifier.SubPortfolio:\n      currentPage = { type: 'PORTFOLIO', component: component.key };\n      break;\n    case ComponentQualifier.Application:\n      currentPage = {\n        type: 'APPLICATION',\n        component: component.key,\n        branch\n      };\n      break;\n    case ComponentQualifier.Project:\n      // when home page is set to the default branch of a project, its name is returned as `undefined`\n      currentPage = {\n        type: 'PROJECT',\n        component: component.key,\n        branch\n      };\n      break;\n  }\n\n  return currentPage;\n}\n\nconst mapStateToProps = (state: Store) => ({\n  currentUser: getCurrentUser(state)\n});\n\nexport default connect(mapStateToProps)(HeaderMeta);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link, LinkProps } from 'react-router';\nimport Dropdown from '../../../../components/controls/Dropdown';\nimport Tooltip from '../../../../components/controls/Tooltip';\nimport { withAppState } from '../../../../components/hoc/withAppState';\nimport BulletListIcon from '../../../../components/icons/BulletListIcon';\nimport DropdownIcon from '../../../../components/icons/DropdownIcon';\nimport NavBarTabs from '../../../../components/ui/NavBarTabs';\nimport { getBranchLikeQuery, isPullRequest } from '../../../../helpers/branch-like';\nimport { hasMessage, translate } from '../../../../helpers/l10n';\nimport { getPortfolioUrl, getProjectQueryUrl } from '../../../../helpers/urls';\nimport { BranchLike, BranchParameters } from '../../../../types/branch-like';\nimport { ComponentQualifier, isPortfolioLike } from '../../../../types/component';\nimport './Menu.css';\n\nconst SETTINGS_URLS = [\n  '/application/console',\n  '/project/admin',\n  '/project/baseline',\n  '/project/branches',\n  '/project/settings',\n  '/project/quality_profiles',\n  '/project/quality_gate',\n  '/project/links',\n  '/project_roles',\n  '/project/history',\n  'background_tasks',\n  '/project/key',\n  '/project/deletion',\n  '/project/webhooks'\n];\n\ninterface Props {\n  appState: Pick<T.AppState, 'branchesEnabled'>;\n  branchLike: BranchLike | undefined;\n  branchLikes: BranchLike[] | undefined;\n  component: T.Component;\n  isInProgress?: boolean;\n  isPending?: boolean;\n  onToggleProjectInfo: () => void;\n}\n\ntype Query = BranchParameters & { id: string };\n\nfunction MenuLink({\n  hasAnalysis,\n  label,\n  ...props\n}: LinkProps & { hasAnalysis: boolean; label: React.ReactNode }) {\n  return hasAnalysis ? (\n    <Link {...props}>{label}</Link>\n  ) : (\n    <Tooltip overlay={translate('layout.must_be_configured')}>\n      <a aria-disabled=\"true\" className=\"disabled-link\">\n        {label}\n      </a>\n    </Tooltip>\n  );\n}\n\nexport class Menu extends React.PureComponent<Props> {\n  hasAnalysis = () => {\n    const { branchLikes = [], component, isInProgress, isPending } = this.props;\n    const hasBranches = branchLikes.length > 1;\n    return hasBranches || isInProgress || isPending || component.analysisDate !== undefined;\n  };\n\n  isProject = () => {\n    return this.props.component.qualifier === ComponentQualifier.Project;\n  };\n\n  isDeveloper = () => {\n    return this.props.component.qualifier === ComponentQualifier.Developper;\n  };\n\n  isPortfolio = () => {\n    const { qualifier } = this.props.component;\n    return isPortfolioLike(qualifier);\n  };\n\n  isApplication = () => {\n    return this.props.component.qualifier === ComponentQualifier.Application;\n  };\n\n  getConfiguration = () => {\n    return this.props.component.configuration || {};\n  };\n\n  getQuery = (): Query => {\n    return { id: this.props.component.key, ...getBranchLikeQuery(this.props.branchLike) };\n  };\n\n  renderDashboardLink = ({ id, ...branchLike }: Query, isPortfolio: boolean) => {\n    return (\n      <li>\n        <Link\n          activeClassName=\"active\"\n          to={isPortfolio ? getPortfolioUrl(id) : getProjectQueryUrl(id, branchLike)}>\n          {translate('overview.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderCodeLink = (\n    hasAnalysis: boolean,\n    query: Query,\n    isApplication: boolean,\n    isPortfolio: boolean\n  ) => {\n    if (this.isDeveloper()) {\n      return null;\n    }\n\n    return (\n      <li>\n        <MenuLink\n          activeClassName=\"active\"\n          hasAnalysis={hasAnalysis}\n          label={\n            isPortfolio || isApplication ? translate('view_projects.page') : translate('code.page')\n          }\n          to={{ pathname: '/code', query }}\n        />\n      </li>\n    );\n  };\n\n  renderActivityLink = (hasAnalysis: boolean, query: Query) => {\n    const { branchLike } = this.props;\n\n    if (isPullRequest(branchLike)) {\n      return null;\n    }\n\n    return (\n      <li>\n        <MenuLink\n          activeClassName=\"active\"\n          hasAnalysis={hasAnalysis}\n          label={translate('project_activity.page')}\n          to={{ pathname: '/project/activity', query }}\n        />\n      </li>\n    );\n  };\n\n  renderIssuesLink = (hasAnalysis: boolean, query: Query) => {\n    return (\n      <li>\n        <MenuLink\n          activeClassName=\"active\"\n          hasAnalysis={hasAnalysis}\n          label={translate('issues.page')}\n          to={{ pathname: '/project/issues', query: { ...query, resolved: 'false' } }}\n        />\n      </li>\n    );\n  };\n\n  renderComponentMeasuresLink = (hasAnalysis: boolean, query: Query) => {\n    return (\n      <li>\n        <MenuLink\n          activeClassName=\"active\"\n          hasAnalysis={hasAnalysis}\n          label={translate('layout.measures')}\n          to={{ pathname: '/component_measures', query }}\n        />\n      </li>\n    );\n  };\n\n  renderSecurityHotspotsLink = (hasAnalysis: boolean, query: Query, isPortfolio: boolean) => {\n    return (\n      !isPortfolio && (\n        <li>\n          <MenuLink\n            activeClassName=\"active\"\n            hasAnalysis={hasAnalysis}\n            label={translate('layout.security_hotspots')}\n            to={{ pathname: '/security_hotspots', query }}\n          />\n        </li>\n      )\n    );\n  };\n\n  renderSecurityReports = (hasAnalysis: boolean, query: Query) => {\n    const { branchLike, component } = this.props;\n    const { extensions = [] } = component;\n\n    if (isPullRequest(branchLike)) {\n      return null;\n    }\n\n    const hasSecurityReportsEnabled = extensions.some(extension =>\n      extension.key.startsWith('securityreport/')\n    );\n\n    if (!hasSecurityReportsEnabled) {\n      return null;\n    }\n\n    return (\n      <li>\n        <MenuLink\n          activeClassName=\"active\"\n          hasAnalysis={hasAnalysis}\n          label={translate('layout.security_reports')}\n          to={{\n            pathname: '/project/extension/securityreport/securityreport',\n            query\n          }}\n        />\n      </li>\n    );\n  };\n\n  renderAdministration = (\n    query: Query,\n    isProject: boolean,\n    isApplication: boolean,\n    isPortfolio: boolean\n  ) => {\n    const { branchLike, component } = this.props;\n\n    if (!this.getConfiguration().showSettings || isPullRequest(branchLike)) {\n      return null;\n    }\n\n    const isSettingsActive = SETTINGS_URLS.some(url => window.location.href.indexOf(url) !== -1);\n\n    const adminLinks = this.renderAdministrationLinks(query, isProject, isApplication, isPortfolio);\n    if (!adminLinks.some(link => link != null)) {\n      return null;\n    }\n\n    return (\n      <Dropdown\n        data-test=\"administration\"\n        overlay={<ul className=\"menu\">{adminLinks}</ul>}\n        tagName=\"li\">\n        {({ onToggleClick, open }) => (\n          <a\n            aria-expanded={open}\n            aria-haspopup=\"menu\"\n            role=\"button\"\n            className={classNames('dropdown-toggle', { active: isSettingsActive || open })}\n            href=\"#\"\n            id=\"component-navigation-admin\"\n            onClick={onToggleClick}>\n            {hasMessage('layout.settings', component.qualifier)\n              ? translate('layout.settings', component.qualifier)\n              : translate('layout.settings')}\n            <DropdownIcon className=\"little-spacer-left\" />\n          </a>\n        )}\n      </Dropdown>\n    );\n  };\n\n  renderAdministrationLinks = (\n    query: Query,\n    isProject: boolean,\n    isApplication: boolean,\n    isPortfolio: boolean\n  ) => {\n    return [\n      this.renderSettingsLink(query, isApplication, isPortfolio),\n      this.renderBranchesLink(query, isProject),\n      this.renderBaselineLink(query, isApplication, isPortfolio),\n      this.renderConsoleAppLink(query, isApplication),\n      this.renderReportSettingsLink(query, isApplication),\n      ...this.renderAdminExtensions(query, isApplication),\n      this.renderImportExportLink(query),\n      this.renderProfilesLink(query),\n      this.renderQualityGateLink(query),\n      this.renderLinksLink(query),\n      this.renderPermissionsLink(query),\n      this.renderBackgroundTasksLink(query),\n      this.renderUpdateKeyLink(query),\n      this.renderWebhooksLink(query, isProject),\n      this.renderDeletionLink(query)\n    ];\n  };\n\n  renderProjectInformationButton = (isProject: boolean, isApplication: boolean) => {\n    if (isPullRequest(this.props.branchLike)) {\n      return null;\n    }\n\n    return (\n      (isProject || isApplication) && (\n        <li>\n          <a\n            className=\"menu-button\"\n            onClick={(e: React.SyntheticEvent<HTMLAnchorElement>) => {\n              e.preventDefault();\n              e.currentTarget.blur();\n              this.props.onToggleProjectInfo();\n            }}\n            role=\"button\"\n            tabIndex={0}>\n            <BulletListIcon className=\"little-spacer-right\" />\n            {translate(isProject ? 'project' : 'application', 'info.title')}\n          </a>\n        </li>\n      )\n    );\n  };\n\n  renderSettingsLink = (query: Query, isApplication: boolean, isPortfolio: boolean) => {\n    if (!this.getConfiguration().showSettings || isApplication || isPortfolio) {\n      return null;\n    }\n    return (\n      <li key=\"settings\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/settings', query }}>\n          {translate('project_settings.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderBranchesLink = (query: Query, isProject: boolean) => {\n    if (\n      !this.props.appState.branchesEnabled ||\n      !isProject ||\n      !this.getConfiguration().showSettings\n    ) {\n      return null;\n    }\n\n    return (\n      <li key=\"branches\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/branches', query }}>\n          {translate('project_branch_pull_request.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderBaselineLink = (query: Query, isApplication: boolean, isPortfolio: boolean) => {\n    if (!this.getConfiguration().showSettings || isApplication || isPortfolio) {\n      return null;\n    }\n    return (\n      <li key=\"baseline\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/baseline', query }}>\n          {translate('project_baseline.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderConsoleAppLink = (query: Query, isApplication: boolean) => {\n    if (!isApplication) {\n      return null;\n    }\n    return (\n      <li key=\"app-console\">\n        <Link activeClassName=\"active\" to={{ pathname: '/application/console', query }}>\n          {translate('application_console.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderReportSettingsLink = (query: Query, isApplication: boolean) => {\n    const extensions = this.getConfiguration().extensions || [];\n    const hasGovernance = extensions.find(e => e.key === 'governance/console');\n\n    if (!isApplication || !hasGovernance) {\n      return null;\n    }\n\n    return (\n      <li key=\"report-settings\">\n        <Link activeClassName=\"active\" to={{ pathname: '/application/settings', query }}>\n          {translate('application_settings.report')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderImportExportLink = (query: Query) => {\n    return (\n      <li key=\"import-export\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/import_export', query }}>\n          {translate('project_dump.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderProfilesLink = (query: Query) => {\n    if (!this.getConfiguration().showQualityProfiles) {\n      return null;\n    }\n    return (\n      <li key=\"profiles\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/quality_profiles', query }}>\n          {translate('project_quality_profiles.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderQualityGateLink = (query: Query) => {\n    if (!this.getConfiguration().showQualityGates) {\n      return null;\n    }\n    return (\n      <li key=\"quality_gate\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/quality_gate', query }}>\n          {translate('project_quality_gate.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderLinksLink = (query: Query) => {\n    if (!this.getConfiguration().showLinks) {\n      return null;\n    }\n    return (\n      <li key=\"links\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/links', query }}>\n          {translate('project_links.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderPermissionsLink = (query: Query) => {\n    if (!this.getConfiguration().showPermissions) {\n      return null;\n    }\n    return (\n      <li key=\"permissions\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project_roles', query }}>\n          {translate('permissions.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderBackgroundTasksLink = (query: Query) => {\n    if (!this.getConfiguration().showBackgroundTasks) {\n      return null;\n    }\n    return (\n      <li key=\"background_tasks\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/background_tasks', query }}>\n          {translate('background_tasks.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderUpdateKeyLink = (query: Query) => {\n    if (!this.getConfiguration().showUpdateKey) {\n      return null;\n    }\n    return (\n      <li key=\"update_key\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/key', query }}>\n          {translate('update_key.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderWebhooksLink = (query: Query, isProject: boolean) => {\n    if (!this.getConfiguration().showSettings || !isProject) {\n      return null;\n    }\n    return (\n      <li key=\"webhooks\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/webhooks', query }}>\n          {translate('webhooks.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderDeletionLink = (query: Query) => {\n    const { qualifier } = this.props.component;\n\n    if (!this.getConfiguration().showSettings) {\n      return null;\n    }\n\n    if (\n      ![\n        ComponentQualifier.Project,\n        ComponentQualifier.Portfolio,\n        ComponentQualifier.Application\n      ].includes(qualifier as ComponentQualifier)\n    ) {\n      return null;\n    }\n\n    return (\n      <li key=\"project_delete\">\n        <Link activeClassName=\"active\" to={{ pathname: '/project/deletion', query }}>\n          {translate('deletion.page')}\n        </Link>\n      </li>\n    );\n  };\n\n  renderExtension = ({ key, name }: T.Extension, isAdmin: boolean, baseQuery: Query) => {\n    const pathname = isAdmin ? `/project/admin/extension/${key}` : `/project/extension/${key}`;\n    const query = { ...baseQuery, qualifier: this.props.component.qualifier };\n    return (\n      <li key={key}>\n        <Link activeClassName=\"active\" to={{ pathname, query }}>\n          {name}\n        </Link>\n      </li>\n    );\n  };\n\n  renderAdminExtensions = (query: Query, isApplication: boolean) => {\n    const extensions = this.getConfiguration().extensions || [];\n    return extensions\n      .filter(e => !isApplication || e.key !== 'governance/console')\n      .map(e => this.renderExtension(e, true, query));\n  };\n\n  renderExtensions = (query: Query) => {\n    const extensions = this.props.component.extensions || [];\n    const withoutSecurityExtension = extensions.filter(\n      extension => !extension.key.startsWith('securityreport/')\n    );\n\n    if (withoutSecurityExtension.length === 0) {\n      return null;\n    }\n\n    return (\n      <Dropdown\n        data-test=\"extensions\"\n        overlay={\n          <ul className=\"menu\">\n            {withoutSecurityExtension.map(e => this.renderExtension(e, false, query))}\n          </ul>\n        }\n        tagName=\"li\">\n        {({ onToggleClick, open }) => (\n          <a\n            aria-expanded={open}\n            aria-haspopup=\"menu\"\n            role=\"button\"\n            className={classNames('dropdown-toggle', { active: open })}\n            href=\"#\"\n            id=\"component-navigation-more\"\n            onClick={onToggleClick}>\n            {translate('more')}\n            <DropdownIcon className=\"little-spacer-left\" />\n          </a>\n        )}\n      </Dropdown>\n    );\n  };\n\n  render() {\n    const isProject = this.isProject();\n    const isApplication = this.isApplication();\n    const isPortfolio = this.isPortfolio();\n    const hasAnalysis = this.hasAnalysis();\n    const query = this.getQuery();\n    return (\n      <div className=\"display-flex-center display-flex-space-between\">\n        <NavBarTabs>\n          {this.renderDashboardLink(query, isPortfolio)}\n          {this.renderIssuesLink(hasAnalysis, query)}\n          {this.renderSecurityHotspotsLink(hasAnalysis, query, isPortfolio)}\n          {this.renderSecurityReports(hasAnalysis, query)}\n          {this.renderComponentMeasuresLink(hasAnalysis, query)}\n          {this.renderCodeLink(hasAnalysis, query, isApplication, isPortfolio)}\n          {this.renderActivityLink(hasAnalysis, query)}\n          {this.renderExtensions(query)}\n        </NavBarTabs>\n        <NavBarTabs>\n          {this.renderAdministration(query, isProject, isApplication, isPortfolio)}\n          {this.renderProjectInformationButton(isProject, isApplication)}\n        </NavBarTabs>\n      </div>\n    );\n  }\n}\n\nexport default withAppState(Menu);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ClearButton } from '../../../../../components/controls/buttons';\nimport EscKeydownHandler from '../../../../../components/controls/EscKeydownHandler';\nimport OutsideClickHandler from '../../../../../components/controls/OutsideClickHandler';\nimport { translate } from '../../../../../helpers/l10n';\nimport './InfoDrawer.css';\n\nexport interface InfoDrawerProps {\n  children: React.ReactNode;\n  displayed: boolean;\n  onClose: () => void;\n  top: number;\n}\n\nexport default function InfoDrawer(props: InfoDrawerProps) {\n  const { children, displayed, onClose, top } = props;\n\n  return (\n    <div\n      className={classNames('info-drawer info-drawer-pane', { open: displayed })}\n      style={{ top }}>\n      <div className=\"close-button\">\n        <ClearButton aria-label={translate('close')} onClick={onClose} />\n      </div>\n      {displayed && (\n        <EscKeydownHandler onKeydown={onClose}>\n          <OutsideClickHandler onClickOutside={onClose}>\n            <div className=\"display-flex-column max-height-100\">{children}</div>\n          </OutsideClickHandler>\n        </EscKeydownHandler>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, postJSON } from '../helpers/request';\n\nexport function getProjectBadgesToken(project: string) {\n  return getJSON('/api/project_badges/token', { project })\n    .then(({ token }) => token)\n    .catch(throwGlobalError);\n}\n\nexport function renewProjectBadgesToken(project: string) {\n  return postJSON('/api/project_badges/renew_token', { project }).catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getLocalizedMetricName } from '../../../../../../helpers/l10n';\nimport { omitNil } from '../../../../../../helpers/request';\nimport { getHostUrl, getPathUrlAsString, getProjectUrl } from '../../../../../../helpers/urls';\n\nexport type BadgeColors = 'white' | 'black' | 'orange';\nexport type BadgeFormats = 'md' | 'url';\n\nexport interface BadgeOptions {\n  branch?: string;\n  format?: BadgeFormats;\n  project?: string;\n  metric?: string;\n  pullRequest?: string;\n}\n\nexport enum BadgeType {\n  measure = 'measure',\n  qualityGate = 'quality_gate'\n}\n\nexport function getBadgeSnippet(type: BadgeType, options: BadgeOptions, token: string) {\n  const url = getBadgeUrl(type, options, token);\n  const { branch, format = 'md', metric = 'alert_status', project } = options;\n\n  if (format === 'url') {\n    return url;\n  } else {\n    let label;\n    let projectUrl;\n\n    switch (type) {\n      case BadgeType.measure:\n        label = getLocalizedMetricName({ key: metric });\n        break;\n      case BadgeType.qualityGate:\n      default:\n        label = 'Quality gate';\n        break;\n    }\n\n    if (project) {\n      projectUrl = getPathUrlAsString(getProjectUrl(project, branch), false);\n    }\n\n    const mdImage = `![${label}](${url})`;\n    return projectUrl ? `[${mdImage}](${projectUrl})` : mdImage;\n  }\n}\n\nexport function getBadgeUrl(\n  type: BadgeType,\n  { branch, project, metric = 'alert_status', pullRequest }: BadgeOptions,\n  token: string\n) {\n  switch (type) {\n    case BadgeType.qualityGate:\n      return `${getHostUrl()}/api/project_badges/quality_gate?${new URLSearchParams(\n        omitNil({ branch, project, pullRequest, token })\n      ).toString()}`;\n    case BadgeType.measure:\n    default:\n      return `${getHostUrl()}/api/project_badges/measure?${new URLSearchParams(\n        omitNil({ branch, project, metric, pullRequest, token })\n      ).toString()}`;\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Button } from '../../../../../../components/controls/buttons';\nimport { translate } from '../../../../../../helpers/l10n';\nimport { BadgeType } from './utils';\n\ninterface Props {\n  onClick: (type: BadgeType) => void;\n  selected: boolean;\n  type: BadgeType;\n  url: string;\n}\n\nexport default class BadgeButton extends React.PureComponent<Props> {\n  handleClick = () => {\n    this.props.onClick(this.props.type);\n  };\n\n  render() {\n    const { selected, type, url } = this.props;\n    const width = type !== BadgeType.measure ? '128px' : undefined;\n    return (\n      <Button className={classNames('badge-button', { selected })} onClick={this.handleClick}>\n        <img alt={translate('overview.badges', type, 'alt')} src={url} width={width} />\n      </Button>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { fetchWebApi } from '../../../../../../api/web-api';\nimport Select from '../../../../../../components/controls/Select';\nimport { getLocalizedMetricName, translate } from '../../../../../../helpers/l10n';\nimport { BadgeFormats, BadgeOptions, BadgeType } from './utils';\n\ninterface Props {\n  className?: string;\n  metrics: T.Dict<T.Metric>;\n  options: BadgeOptions;\n  type: BadgeType;\n  updateOptions: (options: Partial<BadgeOptions>) => void;\n}\n\ninterface State {\n  badgeMetrics: string[];\n}\n\nexport default class BadgeParams extends React.PureComponent<Props> {\n  mounted = false;\n\n  state: State = { badgeMetrics: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchBadgeMetrics();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchBadgeMetrics() {\n    fetchWebApi(false).then(\n      webservices => {\n        if (this.mounted) {\n          const domain = webservices.find(d => d.path === 'api/project_badges');\n          const ws = domain && domain.actions.find(w => w.key === 'measure');\n          const param = ws && ws.params && ws.params.find(p => p.key === 'metric');\n          if (param && param.possibleValues) {\n            this.setState({ badgeMetrics: param.possibleValues });\n          }\n        }\n      },\n      () => {}\n    );\n  }\n\n  getColorOptions = () => {\n    return ['white', 'black', 'orange'].map(color => ({\n      label: translate('overview.badges.options.colors', color),\n      value: color\n    }));\n  };\n\n  getFormatOptions = () => {\n    return ['md', 'url'].map(format => ({\n      label: translate('overview.badges.options.formats', format),\n      value: format\n    }));\n  };\n\n  getMetricOptions = () => {\n    return this.state.badgeMetrics.map(key => {\n      const metric = this.props.metrics[key];\n      return {\n        value: key,\n        label: metric ? getLocalizedMetricName(metric) : key\n      };\n    });\n  };\n\n  handleFormatChange = ({ value }: { value: BadgeFormats }) => {\n    this.props.updateOptions({ format: value });\n  };\n\n  handleMetricChange = ({ value }: { value: string }) => {\n    this.props.updateOptions({ metric: value });\n  };\n\n  renderBadgeType = (type: BadgeType, options: BadgeOptions) => {\n    if (type === BadgeType.measure) {\n      return (\n        <>\n          <label className=\"spacer-right\" htmlFor=\"badge-metric\">\n            {translate('overview.badges.metric')}:\n          </label>\n          <Select\n            className=\"input-medium\"\n            clearable={false}\n            menuStyle={{ maxHeight: 100 }}\n            name=\"badge-metric\"\n            onChange={this.handleMetricChange}\n            options={this.getMetricOptions()}\n            searchable={false}\n            value={options.metric}\n          />\n        </>\n      );\n    } else {\n      return null;\n    }\n  };\n\n  render() {\n    const { className, options, type } = this.props;\n    return (\n      <div className={className}>\n        {this.renderBadgeType(type, options)}\n\n        <label\n          className={classNames('spacer-right', {\n            'spacer-top': type !== BadgeType.qualityGate\n          })}\n          htmlFor=\"badge-format\">\n          {translate('format')}:\n        </label>\n        <Select\n          className=\"input-medium\"\n          clearable={false}\n          name=\"badge-format\"\n          onChange={this.handleFormatChange}\n          options={this.getFormatOptions()}\n          searchable={false}\n          value={this.props.options.format || 'md'}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport {\n  getProjectBadgesToken,\n  renewProjectBadgesToken\n} from '../../../../../../api/project-badges';\nimport CodeSnippet from '../../../../../../components/common/CodeSnippet';\nimport { Button } from '../../../../../../components/controls/buttons';\nimport { Alert } from '../../../../../../components/ui/Alert';\nimport DeferredSpinner from '../../../../../../components/ui/DeferredSpinner';\nimport { getBranchLikeQuery } from '../../../../../../helpers/branch-like';\nimport { translate } from '../../../../../../helpers/l10n';\nimport { BranchLike } from '../../../../../../types/branch-like';\nimport { MetricKey } from '../../../../../../types/metrics';\nimport BadgeButton from './BadgeButton';\nimport BadgeParams from './BadgeParams';\nimport './styles.css';\nimport { BadgeOptions, BadgeType, getBadgeSnippet, getBadgeUrl } from './utils';\n\ninterface Props {\n  branchLike?: BranchLike;\n  metrics: T.Dict<T.Metric>;\n  component: T.Component;\n}\n\ninterface State {\n  isRenewing: boolean;\n  token: string;\n  selectedType: BadgeType;\n  badgeOptions: BadgeOptions;\n}\n\nexport default class ProjectBadges extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    isRenewing: false,\n    token: '',\n    selectedType: BadgeType.measure,\n    badgeOptions: { metric: MetricKey.alert_status }\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchToken();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  async fetchToken() {\n    const {\n      component: { key }\n    } = this.props;\n    const token = await getProjectBadgesToken(key).catch(() => '');\n    if (this.mounted) {\n      this.setState({ token });\n    }\n  }\n\n  handleSelectBadge = (selectedType: BadgeType) => {\n    this.setState({ selectedType });\n  };\n\n  handleUpdateOptions = (options: Partial<BadgeOptions>) => {\n    this.setState(state => ({\n      badgeOptions: { ...state.badgeOptions, ...options }\n    }));\n  };\n\n  handleRenew = async () => {\n    const {\n      component: { key }\n    } = this.props;\n\n    this.setState({ isRenewing: true });\n    await renewProjectBadgesToken(key).catch(() => {});\n    await this.fetchToken();\n    if (this.mounted) {\n      this.setState({ isRenewing: false });\n    }\n  };\n\n  render() {\n    const {\n      branchLike,\n      component: { key: project, qualifier, configuration }\n    } = this.props;\n    const { isRenewing, selectedType, badgeOptions, token } = this.state;\n    const fullBadgeOptions = {\n      project,\n      ...badgeOptions,\n      ...getBranchLikeQuery(branchLike)\n    };\n    const canRenew = configuration?.showSettings;\n\n    return (\n      <div className=\"display-flex-column\">\n        <h3>{translate('overview.badges.get_badge', qualifier)}</h3>\n        <p className=\"big-spacer-bottom\">{translate('overview.badges.description', qualifier)}</p>\n        <BadgeButton\n          onClick={this.handleSelectBadge}\n          selected={BadgeType.measure === selectedType}\n          type={BadgeType.measure}\n          url={getBadgeUrl(BadgeType.measure, fullBadgeOptions, token)}\n        />\n        <p className=\"huge-spacer-bottom spacer-top\">\n          {translate('overview.badges', BadgeType.measure, 'description', qualifier)}\n        </p>\n        <BadgeButton\n          onClick={this.handleSelectBadge}\n          selected={BadgeType.qualityGate === selectedType}\n          type={BadgeType.qualityGate}\n          url={getBadgeUrl(BadgeType.qualityGate, fullBadgeOptions, token)}\n        />\n        <p className=\"huge-spacer-bottom spacer-top\">\n          {translate('overview.badges', BadgeType.qualityGate, 'description', qualifier)}\n        </p>\n        <BadgeParams\n          className=\"big-spacer-bottom display-flex-column\"\n          metrics={this.props.metrics}\n          options={badgeOptions}\n          type={selectedType}\n          updateOptions={this.handleUpdateOptions}\n        />\n        {isRenewing ? (\n          <div className=\"spacer-top spacer-bottom display-flex-row display-flex-justify-center\">\n            <DeferredSpinner className=\"spacer-top spacer-bottom\" loading={isRenewing} />\n          </div>\n        ) : (\n          <CodeSnippet\n            isOneLine={true}\n            snippet={getBadgeSnippet(selectedType, fullBadgeOptions, token)}\n          />\n        )}\n\n        <Alert variant=\"warning\">\n          <p>\n            {translate('overview.badges.leak_warning')}{' '}\n            {canRenew && translate('overview.badges.renew.description')}\n          </p>\n          {canRenew && (\n            <Button\n              disabled={isRenewing}\n              className=\"spacer-top it__project-info-renew-badge\"\n              onClick={this.handleRenew}>\n              {translate('overview.badges.renew')}\n            </Button>\n          )}\n        </Alert>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport BackIcon from '../../../../../components/icons/BackIcon';\nimport { translate } from '../../../../../helpers/l10n';\n\nexport interface InfoDrawerPageProps {\n  children: React.ReactNode;\n  displayed: boolean;\n  onPageChange: () => void;\n}\n\nexport default function InfoDrawerPage(props: InfoDrawerPageProps) {\n  const { children, displayed, onPageChange } = props;\n  return (\n    <div\n      className={classNames(\n        'info-drawer-page info-drawer-pane display-flex-column overflow-hidden',\n        {\n          open: displayed\n        }\n      )}>\n      <h2 className=\"back-button big-padded bordered-bottom\" onClick={() => onPageChange()}>\n        <BackIcon className=\"little-spacer-right\" />\n        {translate('back')}\n      </h2>\n\n      {displayed && <div className=\"overflow-y-auto big-padded\">{children}</div>}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport NotificationsList from '../../../../../../apps/account/notifications/NotificationsList';\nimport {\n  withNotifications,\n  WithNotificationsProps\n} from '../../../../../../components/hoc/withNotifications';\nimport { Alert } from '../../../../../../components/ui/Alert';\nimport DeferredSpinner from '../../../../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../../../../helpers/l10n';\n\ninterface Props {\n  component: T.Component;\n}\n\nexport function ProjectNotifications(props: WithNotificationsProps & Props) {\n  const { channels, component, loading, notifications, perProjectTypes } = props;\n\n  const handleAddNotification = ({ channel, type }: { channel: string; type: string }) => {\n    props.addNotification({ project: component.key, channel, type });\n  };\n\n  const handleRemoveNotification = ({ channel, type }: { channel: string; type: string }) => {\n    props.removeNotification({\n      project: component.key,\n      channel,\n      type\n    });\n  };\n\n  const getCheckboxId = (type: string, channel: string) => {\n    return `project-notification-${component.key}-${type}-${channel}`;\n  };\n\n  const projectNotifications = notifications.filter(n => n.project && n.project === component.key);\n\n  return (\n    <>\n      <h3>{translate('project.info.notifications')}</h3>\n\n      <Alert className=\"spacer-top\" variant=\"info\">\n        {translate('notification.dispatcher.information')}\n      </Alert>\n\n      <DeferredSpinner loading={loading}>\n        <table className=\"data zebra notifications-table\">\n          <thead>\n            <tr>\n              <th aria-label={translate('project')} />\n              {channels.map(channel => (\n                <th className=\"text-center\" key={channel}>\n                  <h4>{translate('notification.channel', channel)}</h4>\n                </th>\n              ))}\n            </tr>\n          </thead>\n\n          <NotificationsList\n            channels={channels}\n            checkboxId={getCheckboxId}\n            notifications={projectNotifications}\n            onAdd={handleAddNotification}\n            onRemove={handleRemoveNotification}\n            project={true}\n            types={perProjectTypes}\n          />\n        </table>\n      </DeferredSpinner>\n    </>\n  );\n}\n\nexport default withNotifications(ProjectNotifications);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport enum ProjectInformationPages {\n  main,\n  badges,\n  notifications\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ChevronRightIcon from '../../../../../components/icons/ChevronRightIcon';\n\nexport interface DrawerLinkProps<P> {\n  label: string;\n  onPageChange: (page: P) => void;\n  to: P;\n}\n\nexport function DrawerLink<P>(props: DrawerLinkProps<P>) {\n  const { label, to } = props;\n\n  return (\n    <a\n      className=\"display-flex-space-between bordered-bottom big-padded\"\n      onClick={() => props.onPageChange(to)}\n      role=\"link\"\n      tabIndex={0}>\n      {label}\n      <ChevronRightIcon />\n    </a>\n  );\n}\n\nexport default React.memo(DrawerLink);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ClipboardButton } from '../../../../../../components/controls/clipboard';\nimport { translate } from '../../../../../../helpers/l10n';\n\ninterface Props {\n  componentKey: string;\n  qualifier: string;\n}\n\nexport default function MetaKey({ componentKey, qualifier }: Props) {\n  return (\n    <>\n      <h3>{translate('overview.project_key', qualifier)}</h3>\n      <div className=\"display-flex-center\">\n        <input className=\"overview-key\" readOnly={true} type=\"text\" value={componentKey} />\n        <ClipboardButton className=\"little-spacer-left\" copyValue={componentKey} />\n      </div>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post, postJSON } from '../helpers/request';\n\nexport function getProjectLinks(projectKey: string): Promise<T.ProjectLink[]> {\n  return getJSON('/api/project_links/search', { projectKey }).then(r => r.links, throwGlobalError);\n}\n\nexport function deleteLink(linkId: string) {\n  return post('/api/project_links/delete', { id: linkId }).catch(throwGlobalError);\n}\n\nexport function createLink(data: {\n  name: string;\n  projectKey: string;\n  url: string;\n}): Promise<T.ProjectLink> {\n  return postJSON('/api/project_links/create', data).then(r => r.link, throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getProjectLinks } from '../../../../../../api/projectLinks';\nimport { translate } from '../../../../../../helpers/l10n';\nimport { orderLinks } from '../../../../../../helpers/projectLinks';\nimport MetaLink from './MetaLink';\n\ninterface Props {\n  component: T.LightComponent;\n}\n\ninterface State {\n  links?: T.ProjectLink[];\n}\n\nexport default class MetaLinks extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {};\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadLinks();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.component.key !== this.props.component.key) {\n      this.loadLinks();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadLinks = () =>\n    getProjectLinks(this.props.component.key).then(\n      links => {\n        if (this.mounted) {\n          this.setState({ links });\n        }\n      },\n      () => {}\n    );\n\n  render() {\n    const { links } = this.state;\n\n    if (!links || links.length === 0) {\n      return null;\n    }\n\n    const orderedLinks = orderLinks(links);\n\n    return (\n      <>\n        <div className=\"big-padded bordered-bottom\">\n          <h3>{translate('overview.external_links')}</h3>\n          <ul className=\"project-info-list\">\n            {orderedLinks.map(link => (\n              <MetaLink key={link.id} link={link} />\n            ))}\n          </ul>\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../../../../../helpers/l10n';\nimport { getQualityGateUrl } from '../../../../../../helpers/urls';\n\ninterface Props {\n  qualityGate: { isDefault?: boolean; key: string; name: string };\n}\n\nexport default function MetaQualityGate({ qualityGate }: Props) {\n  return (\n    <>\n      <h3>{translate('project.info.quality_gate')}</h3>\n\n      <ul className=\"project-info-list\">\n        <li>\n          {qualityGate.isDefault && (\n            <span className=\"note spacer-right\">({translate('default')})</span>\n          )}\n          <Link to={getQualityGateUrl(qualityGate.key)}>{qualityGate.name}</Link>\n        </li>\n      </ul>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router';\nimport { searchRules } from '../../../../../../api/rules';\nimport Tooltip from '../../../../../../components/controls/Tooltip';\nimport { translate, translateWithParameters } from '../../../../../../helpers/l10n';\nimport { getQualityProfileUrl } from '../../../../../../helpers/urls';\nimport { getLanguages, Store } from '../../../../../../store/rootReducer';\n\ninterface StateProps {\n  languages: T.Languages;\n}\n\ninterface OwnProps {\n  headerClassName?: string;\n  profiles: T.ComponentQualityProfile[];\n}\n\ninterface State {\n  deprecatedByKey: T.Dict<number>;\n}\n\nexport class MetaQualityProfiles extends React.PureComponent<StateProps & OwnProps, State> {\n  mounted = false;\n  state: State = { deprecatedByKey: {} };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.loadDeprecatedRules();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  loadDeprecatedRules() {\n    const existingProfiles = this.props.profiles.filter(p => !p.deleted);\n    const requests = existingProfiles.map(profile =>\n      this.loadDeprecatedRulesForProfile(profile.key)\n    );\n    Promise.all(requests).then(\n      responses => {\n        if (this.mounted) {\n          const deprecatedByKey: T.Dict<number> = {};\n          responses.forEach((count, i) => {\n            const profileKey = existingProfiles[i].key;\n            deprecatedByKey[profileKey] = count;\n          });\n          this.setState({ deprecatedByKey });\n        }\n      },\n      () => {}\n    );\n  }\n\n  loadDeprecatedRulesForProfile(profileKey: string) {\n    const data = {\n      activation: 'true',\n      ps: 1,\n      qprofile: profileKey,\n      statuses: 'DEPRECATED'\n    };\n    return searchRules(data).then(r => r.total);\n  }\n\n  getDeprecatedRulesCount(profile: { key: string }) {\n    const count = this.state.deprecatedByKey[profile.key];\n    return count || 0;\n  }\n\n  renderProfile(profile: T.ComponentQualityProfile) {\n    const languageFromStore = this.props.languages[profile.language];\n    const languageName = languageFromStore ? languageFromStore.name : profile.language;\n\n    const inner = (\n      <div className=\"text-ellipsis\">\n        <span className=\"note spacer-right\">({languageName})</span>\n        {profile.deleted ? (\n          profile.name\n        ) : (\n          <Link to={getQualityProfileUrl(profile.name, profile.language)}>{profile.name}</Link>\n        )}\n      </div>\n    );\n\n    if (profile.deleted) {\n      const tooltip = translateWithParameters('overview.deleted_profile', profile.name);\n      return (\n        <Tooltip key={profile.key} overlay={tooltip}>\n          <li className=\"project-info-deleted-profile\">{inner}</li>\n        </Tooltip>\n      );\n    }\n\n    const count = this.getDeprecatedRulesCount(profile);\n\n    if (count > 0) {\n      const tooltip = translateWithParameters('overview.deprecated_profile', count);\n      return (\n        <Tooltip key={profile.key} overlay={tooltip}>\n          <li className=\"project-info-deprecated-rules\">{inner}</li>\n        </Tooltip>\n      );\n    }\n\n    return <li key={profile.key}>{inner}</li>;\n  }\n\n  render() {\n    const { headerClassName, profiles } = this.props;\n\n    return (\n      <>\n        <h3 className={headerClassName}>{translate('overview.quality_profiles')}</h3>\n\n        <ul className=\"project-info-list\">\n          {profiles.map(profile => this.renderProfile(profile))}\n        </ul>\n      </>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({\n  languages: getLanguages(state)\n});\n\nexport default connect(mapStateToProps)(MetaQualityProfiles);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport DrilldownLink from '../../../../../../components/shared/DrilldownLink';\nimport SizeRating from '../../../../../../components/ui/SizeRating';\nimport { translate } from '../../../../../../helpers/l10n';\nimport { formatMeasure, localizeMetric } from '../../../../../../helpers/measures';\nimport { ComponentQualifier } from '../../../../../../types/component';\nimport { MetricKey } from '../../../../../../types/metrics';\n\nexport interface MetaSizeProps {\n  component: T.Component;\n  measures: T.Measure[];\n}\n\nexport default function MetaSize({ component, measures }: MetaSizeProps) {\n  const isApp = component.qualifier === ComponentQualifier.Application;\n  const ncloc = measures.find(measure => measure.metric === MetricKey.ncloc);\n  const projects = isApp\n    ? measures.find(measure => measure.metric === MetricKey.projects)\n    : undefined;\n\n  return (\n    <>\n      <div className=\"display-flex-row display-inline-flex-baseline\">\n        <h3>{localizeMetric(MetricKey.ncloc)}</h3>\n        <span className=\"spacer-left small\">({translate('project.info.main_branch')})</span>\n      </div>\n      <div className=\"display-flex-center\">\n        {ncloc ? (\n          <>\n            <DrilldownLink className=\"huge\" component={component.key} metric={MetricKey.ncloc}>\n              {formatMeasure(ncloc.value, 'SHORT_INT')}\n            </DrilldownLink>\n\n            <span className=\"spacer-left\">\n              <SizeRating value={Number(ncloc.value)} />\n            </span>\n          </>\n        ) : (\n          <span>0</span>\n        )}\n\n        {isApp && (\n          <span className=\"huge-spacer-left display-inline-flex-center\">\n            {projects ? (\n              <DrilldownLink component={component.key} metric={MetricKey.projects}>\n                <span className=\"big\">{formatMeasure(projects.value, 'SHORT_INT')}</span>\n              </DrilldownLink>\n            ) : (\n              <span className=\"big\">0</span>\n            )}\n            <span className=\"little-spacer-left text-muted\">\n              {translate('metric.projects.name')}\n            </span>\n          </span>\n        )}\n      </div>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { difference, without } from 'lodash';\nimport * as React from 'react';\nimport { searchProjectTags } from '../../../../../../api/components';\nimport TagsSelector from '../../../../../../components/tags/TagsSelector';\n\ninterface Props {\n  project: string;\n  selectedTags: string[];\n  setProjectTags: (tags: string[]) => void;\n}\n\ninterface State {\n  searchResult: string[];\n}\n\nconst LIST_SIZE = 10;\n\nexport default class MetaTagsSelector extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { searchResult: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  onSearch = (query: string) => {\n    return searchProjectTags({\n      q: query,\n      ps: Math.min(this.props.selectedTags.length - 1 + LIST_SIZE, 100)\n    }).then(\n      ({ tags }) => {\n        if (this.mounted) {\n          this.setState({ searchResult: tags });\n        }\n      },\n      () => {}\n    );\n  };\n\n  onSelect = (tag: string) => {\n    this.props.setProjectTags([...this.props.selectedTags, tag]);\n  };\n\n  onUnselect = (tag: string) => {\n    this.props.setProjectTags(without(this.props.selectedTags, tag));\n  };\n\n  render() {\n    const availableTags = difference(this.state.searchResult, this.props.selectedTags);\n    return (\n      <TagsSelector\n        listSize={LIST_SIZE}\n        onSearch={this.onSearch}\n        onSelect={this.onSelect}\n        onUnselect={this.onUnselect}\n        selectedTags={this.props.selectedTags}\n        tags={availableTags}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setApplicationTags, setProjectTags } from '../../../../../../api/components';\nimport { ButtonLink } from '../../../../../../components/controls/buttons';\nimport Dropdown from '../../../../../../components/controls/Dropdown';\nimport TagsList from '../../../../../../components/tags/TagsList';\nimport { PopupPlacement } from '../../../../../../components/ui/popups';\nimport { translate } from '../../../../../../helpers/l10n';\nimport { ComponentQualifier } from '../../../../../../types/component';\nimport MetaTagsSelector from './MetaTagsSelector';\n\ninterface Props {\n  component: T.Component;\n  onComponentChange: (changes: {}) => void;\n}\n\nexport default class MetaTags extends React.PureComponent<Props> {\n  card?: HTMLDivElement | null;\n  tagsList?: HTMLElement | null;\n  tagsSelector?: HTMLDivElement | null;\n\n  canUpdateTags = () => {\n    const { configuration } = this.props.component;\n    return configuration && configuration.showSettings;\n  };\n\n  getPopupPos = (eltPos: ClientRect, containerPos: ClientRect) => ({\n    top: eltPos.height,\n    right: containerPos.width - eltPos.width\n  });\n\n  setTags = (values: string[]) => {\n    const { component } = this.props;\n\n    if (component.qualifier === ComponentQualifier.Application) {\n      return setApplicationTags({\n        application: component.key,\n        tags: values.join(',')\n      });\n    } else {\n      return setProjectTags({\n        project: component.key,\n        tags: values.join(',')\n      });\n    }\n  };\n\n  handleSetProjectTags = (values: string[]) => {\n    this.setTags(values).then(\n      () => this.props.onComponentChange({ tags: values }),\n      () => {}\n    );\n  };\n\n  render() {\n    const { key } = this.props.component;\n    const tags = this.props.component.tags || [];\n\n    if (this.canUpdateTags()) {\n      return (\n        <div className=\"big-spacer-top project-info-tags\" ref={card => (this.card = card)}>\n          <Dropdown\n            closeOnClick={false}\n            closeOnClickOutside={true}\n            overlay={\n              <MetaTagsSelector\n                project={key}\n                selectedTags={tags}\n                setProjectTags={this.handleSetProjectTags}\n              />\n            }\n            overlayPlacement={PopupPlacement.BottomLeft}>\n            <ButtonLink innerRef={tagsList => (this.tagsList = tagsList)} stopPropagation={true}>\n              <TagsList allowUpdate={true} tags={tags.length ? tags : [translate('no_tags')]} />\n            </ButtonLink>\n          </Dropdown>\n        </div>\n      );\n    } else {\n      return (\n        <div className=\"big-spacer-top project-info-tags\">\n          <TagsList\n            allowUpdate={false}\n            className=\"note\"\n            tags={tags.length ? tags : [translate('no_tags')]}\n          />\n        </div>\n      );\n    }\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport PrivacyBadgeContainer from '../../../../../components/common/PrivacyBadgeContainer';\nimport { translate } from '../../../../../helpers/l10n';\nimport { ComponentQualifier } from '../../../../../types/component';\nimport DrawerLink from './DrawerLink';\nimport MetaKey from './meta/MetaKey';\nimport MetaLinks from './meta/MetaLinks';\nimport MetaQualityGate from './meta/MetaQualityGate';\nimport MetaQualityProfiles from './meta/MetaQualityProfiles';\nimport MetaSize from './meta/MetaSize';\nimport MetaTags from './meta/MetaTags';\nimport { ProjectInformationPages } from './ProjectInformationPages';\n\nexport interface ProjectInformationRendererProps {\n  canConfigureNotifications: boolean;\n  canUseBadges: boolean;\n  component: T.Component;\n  measures?: T.Measure[];\n  onComponentChange: (changes: {}) => void;\n  onPageChange: (page: ProjectInformationPages) => void;\n}\n\nexport function ProjectInformationRenderer(props: ProjectInformationRendererProps) {\n  const { canConfigureNotifications, canUseBadges, component, measures = [] } = props;\n\n  const isApp = component.qualifier === ComponentQualifier.Application;\n\n  return (\n    <>\n      <div>\n        <h2 className=\"big-padded bordered-bottom\">\n          {translate(isApp ? 'application' : 'project', 'info.title')}\n        </h2>\n      </div>\n\n      <div className=\"overflow-y-auto\">\n        <div className=\"big-padded bordered-bottom\">\n          <div className=\"display-flex-center\">\n            <h3 className=\"spacer-right\">{translate('project.info.description')}</h3>\n            {component.visibility && (\n              <PrivacyBadgeContainer\n                qualifier={component.qualifier}\n                visibility={component.visibility}\n              />\n            )}\n          </div>\n\n          {component.description && (\n            <p className=\"it__project-description\">{component.description}</p>\n          )}\n\n          <MetaTags component={component} onComponentChange={props.onComponentChange} />\n        </div>\n\n        <div className=\"big-padded bordered-bottom it__project-loc-value\">\n          <MetaSize component={component} measures={measures} />\n        </div>\n\n        {!isApp &&\n          (component.qualityGate ||\n            (component.qualityProfiles && component.qualityProfiles.length > 0)) && (\n            <>\n              <div className=\"big-padded bordered-bottom\">\n                {component.qualityGate && <MetaQualityGate qualityGate={component.qualityGate} />}\n\n                {component.qualityProfiles && component.qualityProfiles.length > 0 && (\n                  <MetaQualityProfiles\n                    headerClassName={component.qualityGate ? 'big-spacer-top' : undefined}\n                    profiles={component.qualityProfiles}\n                  />\n                )}\n              </div>\n            </>\n          )}\n\n        {!isApp && <MetaLinks component={component} />}\n\n        <div className=\"big-padded bordered-bottom\">\n          <MetaKey componentKey={component.key} qualifier={component.qualifier} />\n        </div>\n\n        {canUseBadges && (\n          <DrawerLink\n            label={translate('overview.badges.get_badge', component.qualifier)}\n            onPageChange={props.onPageChange}\n            to={ProjectInformationPages.badges}\n          />\n        )}\n        {canConfigureNotifications && (\n          <DrawerLink\n            label={translate('project.info.to_notifications')}\n            onPageChange={props.onPageChange}\n            to={ProjectInformationPages.notifications}\n          />\n        )}\n      </div>\n    </>\n  );\n}\n\nexport default React.memo(ProjectInformationRenderer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getMeasures } from '../../../../../api/measures';\nimport { isLoggedIn } from '../../../../../helpers/users';\nimport { fetchMetrics } from '../../../../../store/rootActions';\nimport { getCurrentUser, getMetrics, Store } from '../../../../../store/rootReducer';\nimport { BranchLike } from '../../../../../types/branch-like';\nimport { ComponentQualifier } from '../../../../../types/component';\nimport { MetricKey } from '../../../../../types/metrics';\nimport ProjectBadges from './badges/ProjectBadges';\nimport InfoDrawerPage from './InfoDrawerPage';\nimport ProjectNotifications from './notifications/ProjectNotifications';\nimport './ProjectInformation.css';\nimport { ProjectInformationPages } from './ProjectInformationPages';\nimport ProjectInformationRenderer from './ProjectInformationRenderer';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.Component;\n  currentUser: T.CurrentUser;\n  fetchMetrics: () => void;\n  onComponentChange: (changes: {}) => void;\n  metrics: T.Dict<T.Metric>;\n}\n\ninterface State {\n  measures?: T.Measure[];\n  page: ProjectInformationPages;\n}\n\nexport class ProjectInformation extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    page: ProjectInformationPages.main\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.props.fetchMetrics();\n    this.loadMeasures();\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  setPage = (page: ProjectInformationPages = ProjectInformationPages.main) => {\n    this.setState({ page });\n  };\n\n  loadMeasures = () => {\n    const {\n      component: { key }\n    } = this.props;\n\n    return getMeasures({\n      component: key,\n      metricKeys: [MetricKey.ncloc, MetricKey.projects].join()\n    }).then(measures => {\n      if (this.mounted) {\n        this.setState({ measures });\n      }\n    });\n  };\n\n  render() {\n    const { branchLike, component, currentUser, metrics } = this.props;\n    const { measures, page } = this.state;\n\n    const canConfigureNotifications =\n      isLoggedIn(currentUser) && component.qualifier === ComponentQualifier.Project;\n    const canUseBadges =\n      metrics !== undefined &&\n      (component.qualifier === ComponentQualifier.Application ||\n        component.qualifier === ComponentQualifier.Project);\n\n    return (\n      <>\n        <ProjectInformationRenderer\n          canConfigureNotifications={canConfigureNotifications}\n          canUseBadges={canUseBadges}\n          component={component}\n          measures={measures}\n          onComponentChange={this.props.onComponentChange}\n          onPageChange={this.setPage}\n        />\n        {canUseBadges && (\n          <InfoDrawerPage\n            displayed={page === ProjectInformationPages.badges}\n            onPageChange={this.setPage}>\n            <ProjectBadges branchLike={branchLike} metrics={metrics} component={component} />\n          </InfoDrawerPage>\n        )}\n        {canConfigureNotifications && (\n          <InfoDrawerPage\n            displayed={page === ProjectInformationPages.notifications}\n            onPageChange={this.setPage}>\n            <ProjectNotifications component={component} />\n          </InfoDrawerPage>\n        )}\n      </>\n    );\n  }\n}\n\nconst mapDispatchToProps = { fetchMetrics };\n\nconst mapStateToProps = (state: Store) => ({\n  currentUser: getCurrentUser(state),\n  metrics: getMetrics(state)\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ProjectInformation);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport ContextNavBar from '../../../../components/ui/ContextNavBar';\nimport {\n  ProjectAlmBindingConfigurationErrors,\n  ProjectAlmBindingResponse\n} from '../../../../types/alm-settings';\nimport { BranchLike } from '../../../../types/branch-like';\nimport { ComponentQualifier } from '../../../../types/component';\nimport { Task, TaskStatuses, TaskWarning } from '../../../../types/tasks';\nimport { rawSizes } from '../../../theme';\nimport RecentHistory from '../../RecentHistory';\nimport ComponentNavBgTaskNotif from './ComponentNavBgTaskNotif';\nimport ComponentNavProjectBindingErrorNotif from './ComponentNavProjectBindingErrorNotif';\nimport Header from './Header';\nimport HeaderMeta from './HeaderMeta';\nimport Menu from './Menu';\nimport InfoDrawer from './projectInformation/InfoDrawer';\nimport ProjectInformation from './projectInformation/ProjectInformation';\n\nexport interface ComponentNavProps {\n  branchLikes: BranchLike[];\n  currentBranchLike: BranchLike | undefined;\n  component: T.Component;\n  currentTask?: Task;\n  currentTaskOnSameBranch?: boolean;\n  isInProgress?: boolean;\n  isPending?: boolean;\n  onComponentChange: (changes: Partial<T.Component>) => void;\n  onWarningDismiss: () => void;\n  projectBinding?: ProjectAlmBindingResponse;\n  projectBindingErrors?: ProjectAlmBindingConfigurationErrors;\n  warnings: TaskWarning[];\n}\n\nconst ALERT_HEIGHT = 30;\n\nexport default function ComponentNav(props: ComponentNavProps) {\n  const {\n    branchLikes,\n    component,\n    currentBranchLike,\n    currentTask,\n    currentTaskOnSameBranch,\n    isInProgress,\n    isPending,\n    projectBinding,\n    projectBindingErrors,\n    warnings\n  } = props;\n  const { contextNavHeightRaw, globalNavHeightRaw } = rawSizes;\n\n  const [displayProjectInfo, setDisplayProjectInfo] = React.useState(false);\n\n  React.useEffect(() => {\n    const { breadcrumbs, key, name } = component;\n    const { qualifier } = breadcrumbs[breadcrumbs.length - 1];\n    if (\n      [\n        ComponentQualifier.Project,\n        ComponentQualifier.Portfolio,\n        ComponentQualifier.Application,\n        ComponentQualifier.Developper\n      ].includes(qualifier as ComponentQualifier)\n    ) {\n      RecentHistory.add(key, name, qualifier.toLowerCase());\n    }\n  }, [component, component.key]);\n\n  let contextNavHeight = contextNavHeightRaw;\n\n  let bgTaskNotifComponent;\n  if (isInProgress || isPending || (currentTask && currentTask.status === TaskStatuses.Failed)) {\n    bgTaskNotifComponent = (\n      <ComponentNavBgTaskNotif\n        component={component}\n        currentTask={currentTask}\n        currentTaskOnSameBranch={currentTaskOnSameBranch}\n        isInProgress={isInProgress}\n        isPending={isPending}\n      />\n    );\n    contextNavHeight += ALERT_HEIGHT;\n  }\n\n  let prDecoNotifComponent;\n  if (projectBindingErrors !== undefined) {\n    prDecoNotifComponent = <ComponentNavProjectBindingErrorNotif component={component} />;\n    contextNavHeight += ALERT_HEIGHT;\n  }\n\n  return (\n    <ContextNavBar\n      height={contextNavHeight}\n      id=\"context-navigation\"\n      notif={\n        <>\n          {bgTaskNotifComponent}\n          {prDecoNotifComponent}\n        </>\n      }>\n      <div\n        className={classNames('display-flex-center display-flex-space-between little-padded-top', {\n          'padded-bottom': warnings.length === 0\n        })}>\n        <Header\n          branchLikes={branchLikes}\n          component={component}\n          currentBranchLike={currentBranchLike}\n          projectBinding={projectBinding}\n        />\n        <HeaderMeta\n          branchLike={currentBranchLike}\n          component={component}\n          onWarningDismiss={props.onWarningDismiss}\n          warnings={warnings}\n        />\n      </div>\n      <Menu\n        branchLike={currentBranchLike}\n        branchLikes={branchLikes}\n        component={component}\n        isInProgress={isInProgress}\n        isPending={isPending}\n        onToggleProjectInfo={() => setDisplayProjectInfo(!displayProjectInfo)}\n      />\n      <InfoDrawer\n        displayed={displayProjectInfo}\n        onClose={() => setDisplayProjectInfo(false)}\n        top={globalNavHeightRaw + contextNavHeightRaw}>\n        <ProjectInformation\n          branchLike={currentBranchLike}\n          component={component}\n          onComponentChange={props.onComponentChange}\n        />\n      </InfoDrawer>\n    </ContextNavBar>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { differenceBy } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getProjectAlmBinding, validateProjectAlmBinding } from '../../api/alm-settings';\nimport { getBranches, getPullRequests } from '../../api/branches';\nimport { getAnalysisStatus, getTasksForComponent } from '../../api/ce';\nimport { getComponentData } from '../../api/components';\nimport { getComponentNavigation } from '../../api/nav';\nimport { withAppState } from '../../components/hoc/withAppState';\nimport { Location, Router, withRouter } from '../../components/hoc/withRouter';\nimport {\n  getBranchLikeQuery,\n  isBranch,\n  isMainBranch,\n  isPullRequest\n} from '../../helpers/branch-like';\nimport { HttpStatus } from '../../helpers/request';\nimport { getPortfolioUrl } from '../../helpers/urls';\nimport { registerBranchStatus, requireAuthorization } from '../../store/rootActions';\nimport {\n  ProjectAlmBindingConfigurationErrors,\n  ProjectAlmBindingResponse\n} from '../../types/alm-settings';\nimport { BranchLike } from '../../types/branch-like';\nimport { ComponentQualifier, isPortfolioLike } from '../../types/component';\nimport { Task, TaskStatuses, TaskTypes, TaskWarning } from '../../types/tasks';\nimport ComponentContainerNotFound from './ComponentContainerNotFound';\nimport { ComponentContext } from './ComponentContext';\nimport PageUnavailableDueToIndexation from './indexation/PageUnavailableDueToIndexation';\nimport ComponentNav from './nav/component/ComponentNav';\n\ninterface Props {\n  appState: Pick<T.AppState, 'branchesEnabled'>;\n  children: React.ReactElement;\n  location: Pick<Location, 'query' | 'pathname'>;\n  registerBranchStatus: (branchLike: BranchLike, component: string, status: T.Status) => void;\n  requireAuthorization: (router: Pick<Router, 'replace'>) => void;\n  router: Pick<Router, 'replace'>;\n}\n\ninterface State {\n  branchLike?: BranchLike;\n  branchLikes: BranchLike[];\n  component?: T.Component;\n  currentTask?: Task;\n  isPending: boolean;\n  loading: boolean;\n  projectBinding?: ProjectAlmBindingResponse;\n  projectBindingErrors?: ProjectAlmBindingConfigurationErrors;\n  tasksInProgress?: Task[];\n  warnings: TaskWarning[];\n}\n\nconst FETCH_STATUS_WAIT_TIME = 3000;\n\nexport class ComponentContainer extends React.PureComponent<Props, State> {\n  watchStatusTimer?: number;\n  mounted = false;\n  state: State = { branchLikes: [], isPending: false, loading: true, warnings: [] };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchComponent();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (\n      prevProps.location.query.id !== this.props.location.query.id ||\n      prevProps.location.query.branch !== this.props.location.query.branch ||\n      prevProps.location.query.pullRequest !== this.props.location.query.pullRequest\n    ) {\n      this.fetchComponent();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    window.clearTimeout(this.watchStatusTimer);\n  }\n\n  fetchComponent = async () => {\n    const { branch, id: key, pullRequest } = this.props.location.query;\n    this.setState({ loading: true });\n\n    let componentWithQualifier;\n    try {\n      const [nav, { component }] = await Promise.all([\n        getComponentNavigation({ component: key, branch, pullRequest }),\n        getComponentData({ component: key, branch, pullRequest })\n      ]);\n      componentWithQualifier = this.addQualifier({ ...nav, ...component });\n    } catch (e) {\n      if (this.mounted) {\n        if (e && e.status === HttpStatus.Forbidden) {\n          this.props.requireAuthorization(this.props.router);\n        } else {\n          this.setState({ component: undefined, loading: false });\n        }\n      }\n      return;\n    }\n\n    /*\n     * There used to be a redirect from /dashboard to /portfolio which caused issues.\n     * Links should be fixed to not rely on this redirect, but:\n     * This is a fail-safe in case there are still some faulty links remaining.\n     */\n    if (\n      this.props.location.pathname.match('dashboard') &&\n      isPortfolioLike(componentWithQualifier.qualifier)\n    ) {\n      this.props.router.replace(getPortfolioUrl(componentWithQualifier.key));\n    }\n\n    const { branchLike, branchLikes } = await this.fetchBranches(componentWithQualifier);\n\n    let projectBinding;\n    if (componentWithQualifier.qualifier === ComponentQualifier.Project) {\n      projectBinding = await getProjectAlmBinding(key).catch(() => undefined);\n    }\n\n    if (this.mounted) {\n      this.setState({\n        branchLike,\n        branchLikes,\n        component: componentWithQualifier,\n        projectBinding,\n        loading: false\n      });\n\n      this.fetchStatus(componentWithQualifier.key);\n      this.fetchWarnings(componentWithQualifier, branchLike);\n      this.fetchProjectBindingErrors(componentWithQualifier);\n    }\n  };\n\n  fetchBranches = async (componentWithQualifier: T.Component) => {\n    const breadcrumb = componentWithQualifier.breadcrumbs.find(({ qualifier }) => {\n      return ([ComponentQualifier.Application, ComponentQualifier.Project] as string[]).includes(\n        qualifier\n      );\n    });\n\n    let branchLike = undefined;\n    let branchLikes: BranchLike[] = [];\n\n    if (breadcrumb) {\n      const { key } = breadcrumb;\n      const [branches, pullRequests] = await Promise.all([\n        getBranches(key),\n        breadcrumb.qualifier === ComponentQualifier.Application\n          ? Promise.resolve([])\n          : getPullRequests(key)\n      ]);\n\n      branchLikes = [...branches, ...pullRequests];\n      branchLike = this.getCurrentBranchLike(branchLikes);\n\n      this.registerBranchStatuses(branchLikes, componentWithQualifier);\n    }\n\n    return { branchLike, branchLikes };\n  };\n\n  fetchStatus = (componentKey: string) => {\n    getTasksForComponent(componentKey).then(\n      ({ current, queue }) => {\n        if (this.mounted) {\n          let shouldFetchComponent = false;\n          this.setState(\n            ({ branchLike, component, currentTask, tasksInProgress }) => {\n              const newCurrentTask = this.getCurrentTask(current, branchLike);\n              const pendingTasks = this.getPendingTasksForBranchLike(queue, branchLike);\n              const newTasksInProgress = this.getInProgressTasks(pendingTasks);\n\n              shouldFetchComponent = this.computeShouldFetchComponent(\n                tasksInProgress,\n                newTasksInProgress,\n                currentTask,\n                newCurrentTask,\n                component\n              );\n\n              if (this.needsAnotherCheck(shouldFetchComponent, component, newTasksInProgress)) {\n                // Refresh the status as long as there is tasks in progress or no analysis\n                window.clearTimeout(this.watchStatusTimer);\n                this.watchStatusTimer = window.setTimeout(\n                  () => this.fetchStatus(componentKey),\n                  FETCH_STATUS_WAIT_TIME\n                );\n              }\n\n              const isPending = pendingTasks.some(task => task.status === TaskStatuses.Pending);\n              return {\n                currentTask: newCurrentTask,\n                isPending,\n                tasksInProgress: newTasksInProgress\n              };\n            },\n            () => {\n              if (shouldFetchComponent) {\n                this.fetchComponent();\n              }\n            }\n          );\n        }\n      },\n      () => {}\n    );\n  };\n\n  fetchWarnings = (component: T.Component, branchLike?: BranchLike) => {\n    if (component.qualifier === ComponentQualifier.Project) {\n      getAnalysisStatus({\n        component: component.key,\n        ...getBranchLikeQuery(branchLike)\n      }).then(\n        ({ component }) => {\n          this.setState({ warnings: component.warnings });\n        },\n        () => {}\n      );\n    }\n  };\n\n  fetchProjectBindingErrors = async (component: T.Component) => {\n    if (\n      component.qualifier === ComponentQualifier.Project &&\n      component.analysisDate === undefined &&\n      this.props.appState.branchesEnabled\n    ) {\n      const projectBindingErrors = await validateProjectAlmBinding(component.key).catch(\n        () => undefined\n      );\n      if (this.mounted) {\n        this.setState({ projectBindingErrors });\n      }\n    }\n  };\n\n  addQualifier = (component: T.Component) => ({\n    ...component,\n    qualifier: component.breadcrumbs[component.breadcrumbs.length - 1].qualifier\n  });\n\n  getCurrentBranchLike = (branchLikes: BranchLike[]) => {\n    const { query } = this.props.location;\n    return query.pullRequest\n      ? branchLikes.find(b => isPullRequest(b) && b.key === query.pullRequest)\n      : branchLikes.find(b => isBranch(b) && (query.branch ? b.name === query.branch : b.isMain));\n  };\n\n  getCurrentTask = (current: Task, branchLike?: BranchLike) => {\n    if (!current || !this.isReportRelatedTask(current)) {\n      return undefined;\n    }\n\n    return current.status === TaskStatuses.Failed || this.isSameBranch(current, branchLike)\n      ? current\n      : undefined;\n  };\n\n  getPendingTasksForBranchLike = (pendingTasks: Task[], branchLike?: BranchLike) => {\n    return pendingTasks.filter(\n      task => this.isReportRelatedTask(task) && this.isSameBranch(task, branchLike)\n    );\n  };\n\n  getInProgressTasks = (pendingTasks: Task[]) => {\n    return pendingTasks.filter(task => task.status === TaskStatuses.InProgress);\n  };\n\n  isReportRelatedTask = (task: Task) => {\n    return [TaskTypes.AppRefresh, TaskTypes.Report, TaskTypes.ViewRefresh].includes(task.type);\n  };\n\n  computeShouldFetchComponent = (\n    tasksInProgress: Task[] | undefined,\n    newTasksInProgress: Task[],\n    currentTask: Task | undefined,\n    newCurrentTask: Task | undefined,\n    component: T.Component | undefined\n  ) => {\n    const progressHasChanged = Boolean(\n      tasksInProgress &&\n        (newTasksInProgress.length !== tasksInProgress.length ||\n          differenceBy(newTasksInProgress, tasksInProgress, 'id').length > 0)\n    );\n\n    const currentTaskHasChanged = Boolean(\n      (!currentTask && newCurrentTask) ||\n        (currentTask && newCurrentTask && currentTask.id !== newCurrentTask.id)\n    );\n\n    if (progressHasChanged) {\n      return true;\n    } else if (currentTaskHasChanged && component) {\n      // We return true if:\n      // - there was no prior analysis date (means this is an empty project, and\n      //   a new analysis came in)\n      // - OR, there was a prior analysis date (non-empty project) AND there were\n      //   some tasks in progress before\n      return (\n        Boolean(!component.analysisDate) ||\n        Boolean(component.analysisDate && tasksInProgress?.length)\n      );\n    }\n    return false;\n  };\n\n  needsAnotherCheck = (\n    shouldFetchComponent: boolean,\n    component: T.Component | undefined,\n    newTasksInProgress: Task[]\n  ) => {\n    return (\n      !shouldFetchComponent &&\n      component &&\n      (newTasksInProgress.length > 0 || !component.analysisDate)\n    );\n  };\n\n  isSameBranch = (task: Pick<Task, 'branch' | 'pullRequest'>, branchLike?: BranchLike) => {\n    if (branchLike) {\n      if (isMainBranch(branchLike)) {\n        return (!task.pullRequest && !task.branch) || branchLike.name === task.branch;\n      }\n      if (isPullRequest(branchLike)) {\n        return branchLike.key === task.pullRequest;\n      }\n      if (isBranch(branchLike)) {\n        return branchLike.name === task.branch;\n      }\n    }\n    return !task.branch && !task.pullRequest;\n  };\n\n  registerBranchStatuses = (branchLikes: BranchLike[], component: T.Component) => {\n    branchLikes.forEach(branchLike => {\n      if (branchLike.status) {\n        this.props.registerBranchStatus(\n          branchLike,\n          component.key,\n          branchLike.status.qualityGateStatus\n        );\n      }\n    });\n  };\n\n  handleComponentChange = (changes: Partial<T.Component>) => {\n    if (this.mounted) {\n      this.setState(state => {\n        if (state.component) {\n          const newComponent: T.Component = { ...state.component, ...changes };\n          return { component: newComponent };\n        }\n        return null;\n      });\n    }\n  };\n\n  handleBranchesChange = () => {\n    if (this.mounted && this.state.component) {\n      this.fetchBranches(this.state.component).then(\n        ({ branchLike, branchLikes }) => {\n          if (this.mounted) {\n            this.setState({ branchLike, branchLikes });\n          }\n        },\n        () => {}\n      );\n    }\n  };\n\n  handleWarningDismiss = () => {\n    const { component } = this.state;\n    if (component !== undefined) {\n      this.fetchWarnings(component);\n    }\n  };\n\n  render() {\n    const { component, loading } = this.state;\n\n    if (!loading && !component) {\n      return <ComponentContainerNotFound />;\n    }\n\n    if (component?.needIssueSync) {\n      return <PageUnavailableDueToIndexation component={component} />;\n    }\n\n    const {\n      branchLike,\n      branchLikes,\n      currentTask,\n      isPending,\n      projectBinding,\n      projectBindingErrors,\n      tasksInProgress\n    } = this.state;\n    const isInProgress = tasksInProgress && tasksInProgress.length > 0;\n\n    return (\n      <div>\n        {component &&\n          !([ComponentQualifier.File, ComponentQualifier.TestFile] as string[]).includes(\n            component.qualifier\n          ) && (\n            <ComponentNav\n              branchLikes={branchLikes}\n              component={component}\n              currentBranchLike={branchLike}\n              currentTask={currentTask}\n              currentTaskOnSameBranch={currentTask && this.isSameBranch(currentTask, branchLike)}\n              isInProgress={isInProgress}\n              isPending={isPending}\n              onComponentChange={this.handleComponentChange}\n              onWarningDismiss={this.handleWarningDismiss}\n              projectBinding={projectBinding}\n              projectBindingErrors={projectBindingErrors}\n              warnings={this.state.warnings}\n            />\n          )}\n        {loading ? (\n          <div className=\"page page-limited\">\n            <i className=\"spinner\" />\n          </div>\n        ) : (\n          <ComponentContext.Provider value={{ branchLike, component }}>\n            {React.cloneElement(this.props.children, {\n              branchLike,\n              branchLikes,\n              component,\n              isInProgress,\n              isPending,\n              onBranchesChange: this.handleBranchesChange,\n              onComponentChange: this.handleComponentChange,\n              projectBinding\n            })}\n          </ComponentContext.Provider>\n        )}\n      </div>\n    );\n  }\n}\n\nconst mapDispatchToProps = { registerBranchStatus, requireAuthorization };\n\nexport default withAppState(withRouter(connect(null, mapDispatchToProps)(ComponentContainer)));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { injectIntl, WrappedComponentProps } from 'react-intl';\nimport { connect } from 'react-redux';\nimport { Location, Router, withRouter } from '../../../components/hoc/withRouter';\nimport { getExtensionStart } from '../../../helpers/extensions';\nimport { getCurrentL10nBundle, translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\nimport { addGlobalErrorMessage } from '../../../store/globalMessages';\nimport { getCurrentUser, Store } from '../../../store/rootReducer';\nimport { ExtensionStartMethod } from '../../../types/extension';\nimport * as theme from '../../theme';\nimport getStore from '../../utils/getStore';\n\ninterface Props extends WrappedComponentProps {\n  currentUser: T.CurrentUser;\n  extension: T.Extension;\n  location: Location;\n  onFail: (message: string) => void;\n  options?: T.Dict<any>;\n  router: Router;\n}\n\ninterface State {\n  extensionElement?: React.ReactElement<any>;\n}\n\nexport class Extension extends React.PureComponent<Props, State> {\n  container?: HTMLElement | null;\n  stop?: Function;\n  state: State = {};\n\n  componentDidMount() {\n    this.startExtension();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.extension !== this.props.extension) {\n      this.stopExtension();\n      this.startExtension();\n    } else if (prevProps.location !== this.props.location) {\n      this.startExtension();\n    }\n  }\n\n  componentWillUnmount() {\n    this.stopExtension();\n  }\n\n  handleStart = (start: ExtensionStartMethod) => {\n    const store = getStore();\n    const result = start({\n      store,\n      el: this.container,\n      currentUser: this.props.currentUser,\n      intl: this.props.intl,\n      location: this.props.location,\n      router: this.props.router,\n      theme,\n      baseUrl: getBaseUrl(),\n      l10nBundle: getCurrentL10nBundle(),\n      ...this.props.options\n    });\n\n    if (result) {\n      if (React.isValidElement(result)) {\n        this.setState({ extensionElement: result });\n      } else if (typeof result === 'function') {\n        this.stop = result;\n      }\n    }\n  };\n\n  handleFailure = () => {\n    this.props.onFail(translate('page_extension_failed'));\n  };\n\n  startExtension() {\n    getExtensionStart(this.props.extension.key).then(this.handleStart, this.handleFailure);\n  }\n\n  stopExtension() {\n    if (this.stop) {\n      this.stop();\n      this.stop = undefined;\n    } else {\n      this.setState({ extensionElement: undefined });\n    }\n  }\n\n  render() {\n    return (\n      <div>\n        <Helmet title={this.props.extension.name} />\n        {this.state.extensionElement ? (\n          this.state.extensionElement\n        ) : (\n          <div ref={container => (this.container = container)} />\n        )}\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({ currentUser: getCurrentUser(state) });\nconst mapDispatchToProps = { onFail: addGlobalErrorMessage };\n\nexport default injectIntl(withRouter(connect(mapStateToProps, mapDispatchToProps)(Extension)));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { BranchLike } from '../../../types/branch-like';\nimport NotFound from '../NotFound';\nimport Extension from './Extension';\n\nexport interface ProjectPageExtensionProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  location: { query: { id: string } };\n  params: {\n    extensionKey: string;\n    pluginKey: string;\n  };\n}\n\nexport default function ProjectPageExtension(props: ProjectPageExtensionProps) {\n  const { extensionKey, pluginKey } = props.params;\n  const { branchLike, component } = props;\n  const extension =\n    component.extensions &&\n    component.extensions.find(p => p.key === `${pluginKey}/${extensionKey}`);\n  return extension ? (\n    <Extension extension={extension} options={{ branchLike, component }} />\n  ) : (\n    <NotFound withContainer={false} />\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport throwGlobalError from '../app/utils/throwGlobalError';\nimport { getJSON, post } from '../helpers/request';\nimport { BranchParameters } from '../types/branch-like';\nimport {\n  Hotspot,\n  HotspotAssignRequest,\n  HotspotComment,\n  HotspotResolution,\n  HotspotSearchResponse,\n  HotspotSetStatusRequest,\n  HotspotStatus\n} from '../types/security-hotspots';\n\nconst HOTSPOTS_SEARCH_URL = '/api/hotspots/search';\n\nexport function assignSecurityHotspot(\n  hotspotKey: string,\n  data: HotspotAssignRequest\n): Promise<void> {\n  return post('/api/hotspots/assign', { hotspot: hotspotKey, ...data }).catch(throwGlobalError);\n}\n\nexport function setSecurityHotspotStatus(\n  hotspotKey: string,\n  data: HotspotSetStatusRequest\n): Promise<void> {\n  return post('/api/hotspots/change_status', { hotspot: hotspotKey, ...data }).catch(\n    throwGlobalError\n  );\n}\n\nexport function commentSecurityHotspot(hotspotKey: string, comment: string): Promise<void> {\n  return post('/api/hotspots/add_comment', { hotspot: hotspotKey, comment }).catch(\n    throwGlobalError\n  );\n}\n\nexport function deleteSecurityHotspotComment(commentKey: string): Promise<void> {\n  return post('/api/hotspots/delete_comment', { comment: commentKey }).catch(throwGlobalError);\n}\n\nexport function editSecurityHotspotComment(\n  commentKey: string,\n  comment: string\n): Promise<HotspotComment> {\n  return post('/api/hotspots/edit_comment', { comment: commentKey, text: comment }).catch(\n    throwGlobalError\n  );\n}\n\nexport function getSecurityHotspots(\n  data: {\n    projectKey: string;\n    p: number;\n    ps: number;\n    status?: HotspotStatus;\n    resolution?: HotspotResolution;\n    onlyMine?: boolean;\n    sinceLeakPeriod?: boolean;\n  } & BranchParameters\n): Promise<HotspotSearchResponse> {\n  return getJSON(HOTSPOTS_SEARCH_URL, data).catch(throwGlobalError);\n}\n\nexport function getSecurityHotspotList(\n  hotspotKeys: string[],\n  data: {\n    projectKey: string;\n  } & BranchParameters\n): Promise<HotspotSearchResponse> {\n  return getJSON(HOTSPOTS_SEARCH_URL, { ...data, hotspots: hotspotKeys.join() }).catch(\n    throwGlobalError\n  );\n}\n\nexport function getSecurityHotspotDetails(securityHotspotKey: string): Promise<Hotspot> {\n  return getJSON('/api/hotspots/show', { hotspot: securityHotspotKey })\n    .then((response: Hotspot & { users: T.UserBase[] }) => {\n      const { users, ...hotspot } = response;\n\n      if (users) {\n        if (hotspot.assignee) {\n          hotspot.assigneeUser = users.find(u => u.login === hotspot.assignee) || {\n            active: true,\n            login: hotspot.assignee\n          };\n        }\n        hotspot.authorUser = users.find(u => u.login === hotspot.author) || {\n          active: true,\n          login: hotspot.author\n        };\n        hotspot.comment.forEach(c => {\n          c.user = users.find(u => u.login === c.login) || { active: true, login: c.login };\n        });\n      }\n\n      return hotspot;\n    })\n    .catch(throwGlobalError);\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { ComponentQualifier } from './component';\n\nexport enum RiskExposure {\n  LOW = 'LOW',\n  MEDIUM = 'MEDIUM',\n  HIGH = 'HIGH'\n}\n\nexport enum HotspotStatus {\n  TO_REVIEW = 'TO_REVIEW',\n  REVIEWED = 'REVIEWED'\n}\n\nexport enum HotspotResolution {\n  FIXED = 'FIXED',\n  SAFE = 'SAFE'\n}\n\nexport enum HotspotStatusFilter {\n  FIXED = 'FIXED',\n  SAFE = 'SAFE',\n  TO_REVIEW = 'TO_REVIEW'\n}\n\nexport enum HotspotStatusOption {\n  FIXED = 'FIXED',\n  SAFE = 'SAFE',\n  TO_REVIEW = 'TO_REVIEW'\n}\n\nexport interface HotspotFilters {\n  assignedToMe: boolean;\n  sinceLeakPeriod: boolean;\n  status: HotspotStatusFilter;\n}\n\nexport interface RawHotspot {\n  assignee?: string;\n  author?: string;\n  component: string;\n  creationDate: string;\n  key: string;\n  line?: number;\n  message: string;\n  project: string;\n  resolution?: HotspotResolution;\n  rule: string;\n  securityCategory: string;\n  status: HotspotStatus;\n  subProject?: string;\n  updateDate: string;\n  vulnerabilityProbability: RiskExposure;\n}\n\nexport interface Hotspot {\n  assignee?: string;\n  assigneeUser?: T.UserBase;\n  author: string;\n  authorUser: T.UserBase;\n  canChangeStatus: boolean;\n  changelog: T.IssueChangelog[];\n  comment: HotspotComment[];\n  component: HotspotComponent;\n  creationDate: string;\n  key: string;\n  line?: number;\n  message: string;\n  project: HotspotComponent;\n  resolution?: HotspotResolution;\n  rule: HotspotRule;\n  status: HotspotStatus;\n  textRange?: T.TextRange;\n  updateDate: string;\n  users: T.UserBase[];\n}\n\nexport interface HotspotComponent {\n  key: string;\n  qualifier: ComponentQualifier;\n  name: string;\n  longName: string;\n  path: string;\n  branch?: string;\n  pullRequest?: string;\n}\n\nexport interface HotspotUpdateFields {\n  status: HotspotStatus;\n  resolution?: HotspotResolution;\n}\n\nexport interface HotspotUpdate extends HotspotUpdateFields {\n  key: string;\n}\n\nexport interface HotspotRule {\n  fixRecommendations?: string;\n  key: string;\n  name: string;\n  riskDescription?: string;\n  securityCategory: string;\n  vulnerabilityDescription?: string;\n  vulnerabilityProbability: RiskExposure;\n}\n\nexport interface HotspotComment {\n  key: string;\n  htmlText: string;\n  markdown: string;\n  updatable: boolean;\n  createdAt: string;\n  login: string;\n  user: T.UserBase;\n}\n\nexport interface ReviewHistoryElement {\n  type: ReviewHistoryType;\n  date: string;\n  user: Pick<T.UserBase, 'active' | 'avatar' | 'name'>;\n  diffs?: T.IssueChangelogDiff[];\n  html?: string;\n  key?: string;\n  updatable?: boolean;\n  markdown?: string;\n}\n\nexport enum ReviewHistoryType {\n  Creation,\n  Diff,\n  Comment\n}\n\nexport interface HotspotSearchResponse {\n  components?: { key: string; qualifier: string; name: string }[];\n  hotspots: RawHotspot[];\n  paging: T.Paging;\n}\n\nexport interface HotspotSetStatusRequest {\n  status: HotspotStatus;\n  resolution?: HotspotResolution;\n  comment?: string;\n}\n\nexport interface HotspotAssignRequest {\n  assignee?: string;\n  comment?: string;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { translate } from '../../../helpers/l10n';\nimport { getBaseUrl } from '../../../helpers/system';\n\nexport interface EmptyHotspotsPageProps {\n  filtered: boolean;\n  filterByFile: boolean;\n  isStaticListOfHotspots: boolean;\n}\n\nexport default function EmptyHotspotsPage(props: EmptyHotspotsPageProps) {\n  const { filtered, filterByFile, isStaticListOfHotspots } = props;\n\n  let translationRoot;\n  if (filterByFile) {\n    translationRoot = 'no_hotspots_for_file';\n  } else if (isStaticListOfHotspots) {\n    translationRoot = 'no_hotspots_for_keys';\n  } else if (filtered) {\n    translationRoot = 'no_hotspots_for_filters';\n  } else {\n    translationRoot = 'no_hotspots';\n  }\n\n  return (\n    <div className=\"display-flex-column display-flex-center huge-spacer-top\">\n      <img\n        alt={translate('hotspots.page')}\n        className=\"huge-spacer-top\"\n        height={100}\n        src={`${getBaseUrl()}/images/${\n          filtered && !filterByFile ? 'filter-large' : 'hotspot-large'\n        }.svg`}\n      />\n      <h1 className=\"huge-spacer-top\">{translate(`hotspots.${translationRoot}.title`)}</h1>\n      <div className=\"abs-width-400 text-center big-spacer-top\">\n        {translate(`hotspots.${translationRoot}.description`)}\n      </div>\n      {!(filtered || isStaticListOfHotspots) && (\n        <Link\n          className=\"big-spacer-top\"\n          target=\"_blank\"\n          to={{ pathname: '/documentation/user-guide/security-hotspots/' }}>\n          {translate('hotspots.learn_more')}\n        </Link>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport HelpTooltip from '../../../components/controls/HelpTooltip';\nimport RadioToggle from '../../../components/controls/RadioToggle';\nimport Select from '../../../components/controls/Select';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport Measure from '../../../components/measure/Measure';\nimport CoverageRating from '../../../components/ui/CoverageRating';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { ComponentQualifier } from '../../../types/component';\nimport { HotspotFilters, HotspotStatusFilter } from '../../../types/security-hotspots';\n\nexport interface FilterBarProps {\n  currentUser: T.CurrentUser;\n  component: T.Component;\n  filters: HotspotFilters;\n  hotspotsReviewedMeasure?: string;\n  isStaticListOfHotspots: boolean;\n  loadingMeasure: boolean;\n  onBranch: boolean;\n  onChangeFilters: (filters: Partial<HotspotFilters>) => void;\n  onShowAllHotspots: () => void;\n}\n\nconst statusOptions: Array<{ label: string; value: string }> = [\n  { value: HotspotStatusFilter.TO_REVIEW, label: translate('hotspot.filters.status.to_review') },\n  { value: HotspotStatusFilter.FIXED, label: translate('hotspot.filters.status.fixed') },\n  { value: HotspotStatusFilter.SAFE, label: translate('hotspot.filters.status.safe') }\n];\n\nconst periodOptions = [\n  { value: true, label: translate('hotspot.filters.period.since_leak_period') },\n  { value: false, label: translate('hotspot.filters.period.overall') }\n];\n\nexport enum AssigneeFilterOption {\n  ALL = 'all',\n  ME = 'me'\n}\n\nconst assigneeFilterOptions = [\n  { value: AssigneeFilterOption.ME, label: translate('hotspot.filters.assignee.assigned_to_me') },\n  { value: AssigneeFilterOption.ALL, label: translate('hotspot.filters.assignee.all') }\n];\n\nexport function FilterBar(props: FilterBarProps) {\n  const {\n    currentUser,\n    component,\n    filters,\n    hotspotsReviewedMeasure,\n    isStaticListOfHotspots,\n    loadingMeasure,\n    onBranch\n  } = props;\n  const isProject = component.qualifier === ComponentQualifier.Project;\n\n  return (\n    <div className=\"filter-bar-outer\">\n      <div className=\"filter-bar\">\n        <div className=\"filter-bar-inner display-flex-center\">\n          {isStaticListOfHotspots ? (\n            <a\n              id=\"show_all_hotspot\"\n              onClick={() => props.onShowAllHotspots()}\n              role=\"link\"\n              tabIndex={0}>\n              {translate('hotspot.filters.show_all')}\n            </a>\n          ) : (\n            <div className=\"display-flex-space-between width-100\">\n              <div className=\"display-flex-center\">\n                <h3 className=\"huge-spacer-right\">{translate('hotspot.filters.title')}</h3>\n\n                {isLoggedIn(currentUser) && (\n                  <RadioToggle\n                    className=\"huge-spacer-right\"\n                    name=\"assignee-filter\"\n                    onCheck={(value: AssigneeFilterOption) =>\n                      props.onChangeFilters({ assignedToMe: value === AssigneeFilterOption.ME })\n                    }\n                    options={assigneeFilterOptions}\n                    value={\n                      filters.assignedToMe ? AssigneeFilterOption.ME : AssigneeFilterOption.ALL\n                    }\n                  />\n                )}\n\n                <span className=\"spacer-right\">{translate('status')}</span>\n                <Select\n                  className=\"input-medium big-spacer-right\"\n                  clearable={false}\n                  onChange={(option: { value: HotspotStatusFilter }) =>\n                    props.onChangeFilters({ status: option.value })\n                  }\n                  options={statusOptions}\n                  searchable={false}\n                  value={filters.status}\n                />\n\n                {onBranch && (\n                  <Select\n                    className=\"input-medium big-spacer-right\"\n                    clearable={false}\n                    onChange={(option: { value: boolean }) =>\n                      props.onChangeFilters({ sinceLeakPeriod: option.value })\n                    }\n                    options={periodOptions}\n                    searchable={false}\n                    value={filters.sinceLeakPeriod}\n                  />\n                )}\n              </div>\n\n              {isProject && (\n                <div className=\"display-flex-center\">\n                  <span className=\"little-spacer-right\">\n                    {translate('metric.security_hotspots_reviewed.name')}\n                  </span>\n                  <HelpTooltip\n                    className=\"big-spacer-right\"\n                    overlay={translate('hotspots.reviewed.tooltip')}\n                  />\n                  <DeferredSpinner loading={loadingMeasure}>\n                    {hotspotsReviewedMeasure && <CoverageRating value={hotspotsReviewedMeasure} />}\n                    <Measure\n                      className=\"spacer-left huge it__hs-review-percentage\"\n                      metricKey={\n                        onBranch && !filters.sinceLeakPeriod\n                          ? 'security_hotspots_reviewed'\n                          : 'new_security_hotspots_reviewed'\n                      }\n                      metricType=\"PERCENT\"\n                      value={hotspotsReviewedMeasure}\n                    />\n                  </DeferredSpinner>\n                </div>\n              )}\n            </div>\n          )}\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default withCurrentUser(FilterBar);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { groupBy, sortBy } from 'lodash';\nimport {\n  renderCWECategory,\n  renderOwaspTop10Category,\n  renderSansTop25Category,\n  renderSonarSourceSecurityCategory\n} from '../../helpers/security-standard';\nimport { SecurityStandard } from '../../types/security';\nimport {\n  Hotspot,\n  HotspotResolution,\n  HotspotStatus,\n  HotspotStatusFilter,\n  HotspotStatusOption,\n  RawHotspot,\n  ReviewHistoryElement,\n  ReviewHistoryType,\n  RiskExposure\n} from '../../types/security-hotspots';\n\nexport const RISK_EXPOSURE_LEVELS = [RiskExposure.HIGH, RiskExposure.MEDIUM, RiskExposure.LOW];\nexport const SECURITY_STANDARDS = [\n  SecurityStandard.SONARSOURCE,\n  SecurityStandard.OWASP_TOP10,\n  SecurityStandard.SANS_TOP25,\n  SecurityStandard.CWE\n];\n\nexport const SECURITY_STANDARD_RENDERER = {\n  [SecurityStandard.OWASP_TOP10]: renderOwaspTop10Category,\n  [SecurityStandard.SANS_TOP25]: renderSansTop25Category,\n  [SecurityStandard.SONARSOURCE]: renderSonarSourceSecurityCategory,\n  [SecurityStandard.CWE]: renderCWECategory\n};\n\nexport function mapRules(rules: Array<{ key: string; name: string }>): T.Dict<string> {\n  return rules.reduce((ruleMap: T.Dict<string>, r) => {\n    ruleMap[r.key] = r.name;\n    return ruleMap;\n  }, {});\n}\n\nexport function groupByCategory(\n  hotspots: RawHotspot[] = [],\n  securityCategories: T.StandardSecurityCategories\n) {\n  const groups = groupBy(hotspots, h => h.securityCategory);\n\n  return Object.keys(groups).map(key => ({\n    key,\n    title: getCategoryTitle(key, securityCategories),\n    hotspots: groups[key]\n  }));\n}\n\nexport function sortHotspots(\n  hotspots: RawHotspot[],\n  securityCategories: T.Dict<{ title: string }>\n) {\n  return sortBy(hotspots, [\n    h => RISK_EXPOSURE_LEVELS.indexOf(h.vulnerabilityProbability),\n    h => getCategoryTitle(h.securityCategory, securityCategories),\n    h => h.message\n  ]);\n}\n\nfunction getCategoryTitle(key: string, securityCategories: T.StandardSecurityCategories) {\n  return securityCategories[key] ? securityCategories[key].title : key;\n}\n\nexport function constructSourceViewerFile(\n  { component, project }: Hotspot,\n  lines?: number\n): T.SourceViewerFile {\n  return {\n    key: component.key,\n    measures: { lines: lines ? lines.toString() : undefined },\n    path: component.path || '',\n    project: project.key,\n    projectName: project.name,\n    q: component.qualifier,\n    uuid: ''\n  };\n}\n\nexport function getHotspotReviewHistory(hotspot: Hotspot): ReviewHistoryElement[] {\n  const history: ReviewHistoryElement[] = [];\n\n  if (hotspot.creationDate) {\n    history.push({\n      type: ReviewHistoryType.Creation,\n      date: hotspot.creationDate,\n      user: {\n        ...hotspot.authorUser,\n        name: hotspot.authorUser.name || hotspot.authorUser.login\n      }\n    });\n  }\n\n  if (hotspot.changelog && hotspot.changelog.length > 0) {\n    history.push(\n      ...hotspot.changelog.map(log => ({\n        type: ReviewHistoryType.Diff,\n        date: log.creationDate,\n        user: {\n          active: log.isUserActive,\n          avatar: log.avatar,\n          name: log.userName || log.user\n        },\n        diffs: log.diffs\n      }))\n    );\n  }\n\n  if (hotspot.comment && hotspot.comment.length > 0) {\n    history.push(\n      ...hotspot.comment.map(comment => ({\n        type: ReviewHistoryType.Comment,\n        date: comment.createdAt,\n        updatable: comment.updatable,\n        user: {\n          ...comment.user,\n          name: comment.user.name || comment.user.login\n        },\n        html: comment.htmlText,\n        key: comment.key,\n        markdown: comment.markdown\n      }))\n    );\n  }\n\n  return sortBy(history, elt => elt.date).reverse();\n}\n\nconst STATUS_AND_RESOLUTION_TO_STATUS_OPTION = {\n  [HotspotStatus.TO_REVIEW]: HotspotStatusOption.TO_REVIEW,\n  [HotspotStatus.REVIEWED]: HotspotStatusOption.FIXED,\n  [HotspotResolution.FIXED]: HotspotStatusOption.FIXED,\n  [HotspotResolution.SAFE]: HotspotStatusOption.SAFE\n};\n\nexport function getStatusOptionFromStatusAndResolution(\n  status: HotspotStatus,\n  resolution?: HotspotResolution\n) {\n  // Resolution is the most determinist info here, so we use it first to get the matching status option\n  // If not provided, we use the status (which will be TO_REVIEW)\n  return STATUS_AND_RESOLUTION_TO_STATUS_OPTION[resolution ?? status];\n}\n\nconst STATUS_OPTION_TO_STATUS_AND_RESOLUTION_MAP = {\n  [HotspotStatusOption.TO_REVIEW]: { status: HotspotStatus.TO_REVIEW, resolution: undefined },\n  [HotspotStatusOption.FIXED]: {\n    status: HotspotStatus.REVIEWED,\n    resolution: HotspotResolution.FIXED\n  },\n  [HotspotStatusOption.SAFE]: {\n    status: HotspotStatus.REVIEWED,\n    resolution: HotspotResolution.SAFE\n  }\n};\n\nexport function getStatusAndResolutionFromStatusOption(statusOption: HotspotStatusOption) {\n  return STATUS_OPTION_TO_STATUS_AND_RESOLUTION_MAP[statusOption];\n}\n\nconst STATUS_OPTION_TO_STATUS_FILTER = {\n  [HotspotStatusOption.TO_REVIEW]: HotspotStatusFilter.TO_REVIEW,\n  [HotspotStatusOption.FIXED]: HotspotStatusFilter.FIXED,\n  [HotspotStatusOption.SAFE]: HotspotStatusFilter.SAFE\n};\n\nexport function getStatusFilterFromStatusOption(statusOption: HotspotStatusOption) {\n  return STATUS_OPTION_TO_STATUS_FILTER[statusOption];\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport Icon, { IconProps } from './Icon';\n\nexport default function ChevronUpIcon({ fill = 'currentColor', ...iconProps }: IconProps) {\n  return (\n    <Icon {...iconProps}>\n      <path\n        d=\"M8.28 4.404l4.602 4.604a.382.382 0 0 1 .118.279c0 .108-.04.2-.118.279l-1.03 1.03a.382.382 0 0 1-.278.117.382.382 0 0 1-.28-.117L8 7.3l-3.294 3.295a.382.382 0 0 1-.28.117.382.382 0 0 1-.279-.117l-1.03-1.03A.382.382 0 0 1 3 9.286c0-.107.04-.2.118-.278L7.72 4.404A.382.382 0 0 1 8 4.287c.108 0 .201.04.28.117z\"\n        style={{ fill }}\n      />\n    </Icon>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { translate } from '../../../helpers/l10n';\nimport { RawHotspot } from '../../../types/security-hotspots';\nimport { getStatusOptionFromStatusAndResolution } from '../utils';\n\nexport interface HotspotListItemProps {\n  hotspot: RawHotspot;\n  onClick: (hotspot: RawHotspot) => void;\n  selected: boolean;\n}\n\nexport default function HotspotListItem(props: HotspotListItemProps) {\n  const { hotspot, selected } = props;\n  return (\n    <a\n      className={classNames('hotspot-item', { highlight: selected })}\n      href=\"#\"\n      onClick={() => !selected && props.onClick(hotspot)}>\n      <div className=\"little-spacer-left\">{hotspot.message}</div>\n      <div className=\"badge spacer-top\">\n        {translate(\n          'hotspots.status_option',\n          getStatusOptionFromStatusAndResolution(hotspot.status, hotspot.resolution)\n        )}\n      </div>\n    </a>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport ChevronDownIcon from '../../../components/icons/ChevronDownIcon';\nimport ChevronUpIcon from '../../../components/icons/ChevronUpIcon';\nimport { RawHotspot } from '../../../types/security-hotspots';\nimport HotspotListItem from './HotspotListItem';\n\nexport interface HotspotCategoryProps {\n  categoryKey: string;\n  expanded: boolean;\n  hotspots: RawHotspot[];\n  onHotspotClick: (hotspot: RawHotspot) => void;\n  onToggleExpand?: (categoryKey: string, value: boolean) => void;\n  selectedHotspot: RawHotspot;\n  title: string;\n  isLastAndIncomplete: boolean;\n}\n\nexport default function HotspotCategory(props: HotspotCategoryProps) {\n  const { categoryKey, expanded, hotspots, selectedHotspot, title, isLastAndIncomplete } = props;\n\n  if (hotspots.length < 1) {\n    return null;\n  }\n\n  const risk = hotspots[0].vulnerabilityProbability;\n\n  return (\n    <div className={classNames('hotspot-category', risk)}>\n      {props.onToggleExpand ? (\n        <a\n          className={classNames(\n            'hotspot-category-header display-flex-space-between display-flex-center',\n            { 'contains-selected-hotspot': selectedHotspot.securityCategory === categoryKey }\n          )}\n          href=\"#\"\n          onClick={() => props.onToggleExpand && props.onToggleExpand(categoryKey, !expanded)}>\n          <strong className=\"flex-1 spacer-right break-word\">{title}</strong>\n          <span>\n            <span className=\"counter-badge\">\n              {hotspots.length}\n              {isLastAndIncomplete && '+'}\n            </span>\n            {expanded ? (\n              <ChevronUpIcon className=\"big-spacer-left\" />\n            ) : (\n              <ChevronDownIcon className=\"big-spacer-left\" />\n            )}\n          </span>\n        </a>\n      ) : (\n        <div className=\"hotspot-category-header\">\n          <strong className=\"flex-1 spacer-right break-word\">{title}</strong>\n        </div>\n      )}\n      {expanded && (\n        <ul>\n          {hotspots.map(h => (\n            <li data-hotspot-key={h.key} key={h.key}>\n              <HotspotListItem\n                hotspot={h}\n                onClick={props.onHotspotClick}\n                selected={h.key === selectedHotspot.key}\n              />\n            </li>\n          ))}\n        </ul>\n      )}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport { groupBy } from 'lodash';\nimport * as React from 'react';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { addSideBarClass, removeSideBarClass } from '../../../helpers/pages';\nimport { HotspotStatusFilter, RawHotspot, RiskExposure } from '../../../types/security-hotspots';\nimport { groupByCategory, RISK_EXPOSURE_LEVELS } from '../utils';\nimport HotspotCategory from './HotspotCategory';\nimport './HotspotList.css';\n\ninterface Props {\n  hotspots: RawHotspot[];\n  hotspotsTotal: number;\n  isStaticListOfHotspots: boolean;\n  loadingMore: boolean;\n  onHotspotClick: (hotspot: RawHotspot) => void;\n  onLoadMore: () => void;\n  securityCategories: T.StandardSecurityCategories;\n  selectedHotspot: RawHotspot;\n  statusFilter: HotspotStatusFilter;\n}\n\ninterface State {\n  expandedCategories: T.Dict<boolean>;\n  groupedHotspots: Array<{\n    risk: RiskExposure;\n    categories: Array<{ key: string; hotspots: RawHotspot[]; title: string }>;\n  }>;\n}\n\nexport default class HotspotList extends React.Component<Props, State> {\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      expandedCategories: { [props.selectedHotspot.securityCategory]: true },\n      groupedHotspots: this.groupHotspots(props.hotspots, props.securityCategories)\n    };\n  }\n\n  componentDidMount() {\n    addSideBarClass();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    // Force open the category of selected hotspot\n    if (\n      this.props.selectedHotspot.securityCategory !== prevProps.selectedHotspot.securityCategory\n    ) {\n      this.handleToggleCategory(this.props.selectedHotspot.securityCategory, true);\n    }\n\n    // Compute the hotspot tree from the list\n    if (\n      this.props.hotspots !== prevProps.hotspots ||\n      this.props.securityCategories !== prevProps.securityCategories\n    ) {\n      const groupedHotspots = this.groupHotspots(\n        this.props.hotspots,\n        this.props.securityCategories\n      );\n      this.setState({ groupedHotspots });\n    }\n  }\n\n  componentWillUnmount() {\n    removeSideBarClass();\n  }\n\n  groupHotspots = (hotspots: RawHotspot[], securityCategories: T.StandardSecurityCategories) => {\n    const risks = groupBy(hotspots, h => h.vulnerabilityProbability);\n\n    return RISK_EXPOSURE_LEVELS.map(risk => ({\n      risk,\n      categories: groupByCategory(risks[risk], securityCategories)\n    })).filter(risk => risk.categories.length > 0);\n  };\n\n  handleToggleCategory = (categoryKey: string, value: boolean) => {\n    this.setState(({ expandedCategories }) => ({\n      expandedCategories: { ...expandedCategories, [categoryKey]: value }\n    }));\n  };\n\n  render() {\n    const {\n      hotspots,\n      hotspotsTotal,\n      isStaticListOfHotspots,\n      loadingMore,\n      selectedHotspot,\n      statusFilter\n    } = this.props;\n\n    const { expandedCategories, groupedHotspots } = this.state;\n\n    return (\n      <div className=\"huge-spacer-bottom\">\n        <h1 className=\"hotspot-list-header bordered-bottom\">\n          <SecurityHotspotIcon className=\"spacer-right\" />\n          {translateWithParameters(\n            isStaticListOfHotspots ? 'hotspots.list_title' : `hotspots.list_title.${statusFilter}`,\n            hotspotsTotal\n          )}\n        </h1>\n        <ul className=\"big-spacer-bottom\">\n          {groupedHotspots.map((riskGroup, riskGroupIndex) => {\n            const isLastRiskGroup = riskGroupIndex === groupedHotspots.length - 1;\n\n            return (\n              <li className=\"big-spacer-bottom\" key={riskGroup.risk}>\n                <div className=\"hotspot-risk-header little-spacer-left\">\n                  <span>{translate('hotspots.risk_exposure')}:</span>\n                  <div className={classNames('hotspot-risk-badge', 'spacer-left', riskGroup.risk)}>\n                    {translate('risk_exposure', riskGroup.risk)}\n                  </div>\n                </div>\n                <ul>\n                  {riskGroup.categories.map((cat, categoryIndex) => {\n                    const isLastCategory = categoryIndex === riskGroup.categories.length - 1;\n\n                    return (\n                      <li className=\"spacer-bottom\" key={cat.key}>\n                        <HotspotCategory\n                          categoryKey={cat.key}\n                          expanded={expandedCategories[cat.key]}\n                          hotspots={cat.hotspots}\n                          onHotspotClick={this.props.onHotspotClick}\n                          onToggleExpand={this.handleToggleCategory}\n                          selectedHotspot={selectedHotspot}\n                          title={cat.title}\n                          isLastAndIncomplete={\n                            isLastRiskGroup && isLastCategory && hotspots.length < hotspotsTotal\n                          }\n                        />\n                      </li>\n                    );\n                  })}\n                </ul>\n              </li>\n            );\n          })}\n        </ul>\n        <ListFooter\n          count={hotspots.length}\n          loadMore={!loadingMore ? this.props.onLoadMore : undefined}\n          loading={loadingMore}\n          total={hotspotsTotal}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ListFooter from '../../../components/controls/ListFooter';\nimport Tooltip from '../../../components/controls/Tooltip';\nimport QualifierIcon from '../../../components/icons/QualifierIcon';\nimport SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon';\nimport { translateWithParameters } from '../../../helpers/l10n';\nimport { addSideBarClass, removeSideBarClass } from '../../../helpers/pages';\nimport { fileFromPath } from '../../../helpers/path';\nimport { ComponentQualifier } from '../../../types/component';\nimport { SecurityStandard, Standards } from '../../../types/security';\nimport { RawHotspot } from '../../../types/security-hotspots';\nimport { SECURITY_STANDARD_RENDERER } from '../utils';\nimport HotspotListItem from './HotspotListItem';\n\nexport interface HotspotSimpleListProps {\n  filterByCategory?: {\n    standard: SecurityStandard;\n    category: string;\n  };\n  filterByCWE?: string;\n  filterByFile?: string;\n  hotspots: RawHotspot[];\n  hotspotsTotal: number;\n  loadingMore: boolean;\n  onHotspotClick: (hotspot: RawHotspot) => void;\n  onLoadMore: () => void;\n  selectedHotspot: RawHotspot;\n  standards: Standards;\n}\n\nexport default class HotspotSimpleList extends React.Component<HotspotSimpleListProps> {\n  componentDidMount() {\n    addSideBarClass();\n  }\n\n  componentWillUnmount() {\n    removeSideBarClass();\n  }\n\n  render() {\n    const {\n      filterByCategory,\n      filterByCWE,\n      filterByFile,\n      hotspots,\n      hotspotsTotal,\n      loadingMore,\n      selectedHotspot,\n      standards\n    } = this.props;\n\n    const categoryLabel =\n      filterByCategory &&\n      SECURITY_STANDARD_RENDERER[filterByCategory.standard](standards, filterByCategory.category);\n\n    const cweLabel =\n      filterByCWE && SECURITY_STANDARD_RENDERER[SecurityStandard.CWE](standards, filterByCWE);\n\n    return (\n      <div className=\"hotspots-list-single-category huge-spacer-bottom\">\n        <h1 className=\"hotspot-list-header bordered-bottom\">\n          <SecurityHotspotIcon className=\"spacer-right\" />\n          {translateWithParameters('hotspots.list_title', hotspotsTotal)}\n        </h1>\n        <div className=\"big-spacer-bottom\">\n          <div className=\"hotspot-category\">\n            <div className=\"hotspot-category-header\">\n              <strong className=\"flex-1 spacer-right break-word\">\n                {filterByFile ? (\n                  <Tooltip overlay={filterByFile}>\n                    <span>\n                      <QualifierIcon\n                        className=\"little-spacer-right\"\n                        qualifier={ComponentQualifier.File}\n                      />\n                      {fileFromPath(filterByFile)}\n                    </span>\n                  </Tooltip>\n                ) : (\n                  <>\n                    {categoryLabel}\n                    {categoryLabel && cweLabel && <hr />}\n                    {cweLabel}\n                  </>\n                )}\n              </strong>\n            </div>\n            <ul>\n              {hotspots.map(h => (\n                <li data-hotspot-key={h.key} key={h.key}>\n                  <HotspotListItem\n                    hotspot={h}\n                    onClick={this.props.onHotspotClick}\n                    selected={h.key === selectedHotspot.key}\n                  />\n                </li>\n              ))}\n            </ul>\n          </div>\n        </div>\n        <ListFooter\n          count={hotspots.length}\n          loadMore={!loadingMore ? this.props.onLoadMore : undefined}\n          loading={loadingMore}\n          total={hotspotsTotal}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { DropdownOverlay } from '../../../../components/controls/Dropdown';\nimport SearchBox from '../../../../components/controls/SearchBox';\nimport Avatar from '../../../../components/ui/Avatar';\nimport DeferredSpinner from '../../../../components/ui/DeferredSpinner';\nimport { PopupPlacement } from '../../../../components/ui/popups';\nimport { translate } from '../../../../helpers/l10n';\nimport './AssigneeSelection.css';\n\nexport interface HotspotAssigneeSelectRendererProps {\n  highlighted?: T.UserActive;\n  loading: boolean;\n  onKeyDown: (event: React.KeyboardEvent) => void;\n  onSearch: (query: string) => void;\n  onSelect: (user?: T.UserActive) => void;\n  query?: string;\n  suggestedUsers?: T.UserActive[];\n}\n\nexport default function AssigneeSelectionRenderer(props: HotspotAssigneeSelectRendererProps) {\n  const { highlighted, loading, query, suggestedUsers } = props;\n\n  return (\n    <>\n      <div className=\"display-flex-center\">\n        <SearchBox\n          autoFocus={true}\n          onChange={props.onSearch}\n          onKeyDown={props.onKeyDown}\n          placeholder={translate('hotspots.assignee.select_user')}\n          value={query}\n        />\n        {loading && <DeferredSpinner className=\"spacer-left\" />}\n      </div>\n\n      {!loading && (\n        <div className=\"position-relative\">\n          <DropdownOverlay noPadding={true} placement={PopupPlacement.BottomLeft}>\n            <ul className=\"hotspot-assignee-search-results\">\n              {suggestedUsers &&\n                suggestedUsers.map(suggestion => (\n                  <li\n                    className={classNames('padded', {\n                      active: highlighted && highlighted.login === suggestion.login\n                    })}\n                    key={suggestion.login}\n                    onClick={() => props.onSelect(suggestion)}>\n                    {suggestion.login && (\n                      <Avatar\n                        className=\"spacer-right\"\n                        hash={suggestion.avatar}\n                        name={suggestion.name}\n                        size={16}\n                      />\n                    )}\n                    {suggestion.name}\n                  </li>\n                ))}\n            </ul>\n          </DropdownOverlay>\n        </div>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { debounce } from 'lodash';\nimport * as React from 'react';\nimport { searchUsers } from '../../../../api/users';\nimport { KeyCodes } from '../../../../helpers/keycodes';\nimport { translate } from '../../../../helpers/l10n';\nimport { isUserActive } from '../../../../helpers/users';\nimport AssigneeSelectionRenderer from './AssigneeSelectionRenderer';\n\ninterface Props {\n  allowCurrentUserSelection: boolean;\n  loggedInUser: T.LoggedInUser;\n  onSelect: (user: T.UserActive) => void;\n}\n\ninterface State {\n  highlighted?: T.UserActive;\n  loading: boolean;\n  query?: string;\n  suggestedUsers: T.UserActive[];\n}\n\nconst UNASSIGNED: T.UserActive = { login: '', name: translate('unassigned') };\n\nexport default class AssigneeSelection extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      loading: false,\n      suggestedUsers: props.allowCurrentUserSelection\n        ? [props.loggedInUser, UNASSIGNED]\n        : [UNASSIGNED]\n    };\n\n    this.handleSearch = debounce(this.handleSearch, 250);\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleSearch = (query: string) => {\n    if (this.mounted) {\n      if (query.length < 2) {\n        this.handleNoSearch(query);\n      } else {\n        this.handleActualSearch(query);\n      }\n    }\n  };\n\n  handleNoSearch = (query: string) => {\n    const { allowCurrentUserSelection, loggedInUser } = this.props;\n\n    this.setState({\n      loading: false,\n      query,\n      suggestedUsers: allowCurrentUserSelection ? [loggedInUser, UNASSIGNED] : [UNASSIGNED]\n    });\n  };\n\n  handleActualSearch = (query: string) => {\n    this.setState({ loading: true, query });\n    searchUsers({ q: query })\n      .then(result => {\n        if (this.mounted) {\n          this.setState({\n            loading: false,\n            query,\n            suggestedUsers: (result.users.filter(isUserActive) as T.UserActive[]).concat(UNASSIGNED)\n          });\n        }\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      });\n  };\n\n  handleKeyDown = (event: React.KeyboardEvent) => {\n    switch (event.keyCode) {\n      case KeyCodes.Enter:\n        event.preventDefault();\n        this.selectHighlighted();\n        break;\n      case KeyCodes.UpArrow:\n        event.preventDefault();\n        this.highlightPrevious();\n        break;\n      case KeyCodes.DownArrow:\n        event.preventDefault();\n        this.highlightNext();\n        break;\n    }\n  };\n\n  getCurrentIndex = () => {\n    const { highlighted, suggestedUsers } = this.state;\n\n    return highlighted\n      ? suggestedUsers.findIndex(suggestion => suggestion.login === highlighted.login)\n      : -1;\n  };\n\n  highlightIndex = (index: number) => {\n    const { suggestedUsers } = this.state;\n\n    if (suggestedUsers.length > 0) {\n      if (index < 0) {\n        index = suggestedUsers.length - 1;\n      } else if (index >= suggestedUsers.length) {\n        index = 0;\n      }\n\n      this.setState({ highlighted: suggestedUsers[index] });\n    }\n  };\n\n  highlightPrevious = () => {\n    this.highlightIndex(this.getCurrentIndex() - 1);\n  };\n\n  highlightNext = () => {\n    this.highlightIndex(this.getCurrentIndex() + 1);\n  };\n\n  selectHighlighted = () => {\n    const { highlighted } = this.state;\n\n    if (highlighted !== undefined) {\n      this.props.onSelect(highlighted);\n    }\n  };\n\n  render() {\n    const { highlighted, loading, query, suggestedUsers } = this.state;\n\n    return (\n      <AssigneeSelectionRenderer\n        highlighted={highlighted}\n        loading={loading}\n        onKeyDown={this.handleKeyDown}\n        onSearch={this.handleSearch}\n        onSelect={this.props.onSelect}\n        query={query}\n        suggestedUsers={suggestedUsers}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { EditButton } from '../../../../components/controls/buttons';\nimport EscKeydownHandler from '../../../../components/controls/EscKeydownHandler';\nimport OutsideClickHandler from '../../../../components/controls/OutsideClickHandler';\nimport DeferredSpinner from '../../../../components/ui/DeferredSpinner';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\nimport AssigneeSelection from './AssigneeSelection';\n\nexport interface AssigneeRendererProps {\n  canEdit: boolean;\n  editing: boolean;\n  loading: boolean;\n\n  assignee?: T.UserBase;\n  loggedInUser?: T.LoggedInUser;\n\n  onAssign: (user: T.UserActive) => void;\n  onEnterEditionMode: () => void;\n  onExitEditionMode: () => void;\n}\n\nexport default function AssigneeRenderer(props: AssigneeRendererProps) {\n  const { assignee, canEdit, loggedInUser, editing, loading } = props;\n\n  return (\n    <DeferredSpinner loading={loading}>\n      {!editing && (\n        <div className=\"display-flex-center\">\n          <strong className=\"nowrap\">\n            {assignee &&\n              (assignee.active\n                ? assignee.name ?? assignee.login\n                : translateWithParameters('user.x_deleted', assignee.name ?? assignee.login))}\n            {!assignee && translate('unassigned')}\n          </strong>\n          {loggedInUser && canEdit && (\n            <EditButton className=\"spacer-left\" onClick={props.onEnterEditionMode} />\n          )}\n        </div>\n      )}\n\n      {loggedInUser && editing && (\n        <EscKeydownHandler onKeydown={props.onExitEditionMode}>\n          <OutsideClickHandler onClickOutside={props.onExitEditionMode}>\n            <AssigneeSelection\n              allowCurrentUserSelection={loggedInUser.login !== assignee?.login}\n              loggedInUser={loggedInUser}\n              onSelect={props.onAssign}\n            />\n          </OutsideClickHandler>\n        </EscKeydownHandler>\n      )}\n    </DeferredSpinner>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { assignSecurityHotspot } from '../../../../api/security-hotspots';\nimport addGlobalSuccessMessage from '../../../../app/utils/addGlobalSuccessMessage';\nimport { withCurrentUser } from '../../../../components/hoc/withCurrentUser';\nimport { translate, translateWithParameters } from '../../../../helpers/l10n';\nimport { isLoggedIn } from '../../../../helpers/users';\nimport { Hotspot, HotspotStatus } from '../../../../types/security-hotspots';\nimport AssigneeRenderer from './AssigneeRenderer';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  hotspot: Hotspot;\n\n  onAssigneeChange: () => void;\n}\n\ninterface State {\n  editing: boolean;\n  loading: boolean;\n}\n\nexport class Assignee extends React.PureComponent<Props, State> {\n  mounted = false;\n  state = {\n    editing: false,\n    loading: false\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleEnterEditionMode = () => {\n    this.setState({ editing: true });\n  };\n\n  handleExitEditionMode = () => {\n    this.setState({ editing: false });\n  };\n\n  handleAssign = (newAssignee: T.UserActive) => {\n    this.setState({ loading: true });\n    assignSecurityHotspot(this.props.hotspot.key, {\n      assignee: newAssignee?.login\n    })\n      .then(() => {\n        if (this.mounted) {\n          this.setState({ editing: false, loading: false });\n          this.props.onAssigneeChange();\n        }\n      })\n      .then(() =>\n        addGlobalSuccessMessage(\n          newAssignee.login\n            ? translateWithParameters('hotspots.assign.success', newAssignee.name)\n            : translate('hotspots.assign.unassign.success')\n        )\n      )\n      .catch(() => this.setState({ loading: false }));\n  };\n\n  render() {\n    const {\n      currentUser,\n      hotspot: { assigneeUser, status }\n    } = this.props;\n    const { editing, loading } = this.state;\n\n    const canEdit = status === HotspotStatus.TO_REVIEW;\n\n    return (\n      <AssigneeRenderer\n        assignee={assigneeUser}\n        canEdit={canEdit}\n        editing={editing}\n        loading={loading}\n        loggedInUser={isLoggedIn(currentUser) ? currentUser : undefined}\n        onAssign={this.handleAssign}\n        onEnterEditionMode={this.handleEnterEditionMode}\n        onExitEditionMode={this.handleExitEditionMode}\n      />\n    );\n  }\n}\n\nexport default withCurrentUser(Assignee);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as globalMessages from '../../store/globalMessages';\nimport getStore from './getStore';\n\nexport default function addGlobalErrorMessage(message: string): void {\n  const store = getStore();\n  store.dispatch(globalMessages.addGlobalErrorMessage(message));\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { getHostUrl } from '../helpers/urls';\nimport { Ide } from '../types/sonarlint';\n\nconst SONARLINT_PORT_START = 64120;\nconst SONARLINT_PORT_RANGE = 11;\n\nexport async function probeSonarLintServers(): Promise<Array<Ide>> {\n  const probedPorts = buildPortRange();\n  const probeRequests = probedPorts.map(p =>\n    fetch(buildSonarLintEndpoint(p, '/status'))\n      .then(r => r.json())\n      .then(json => {\n        const { ideName, description } = json;\n        return { port: p, ideName, description } as Ide;\n      })\n      .catch(() => undefined)\n  );\n  const results = await Promise.all(probeRequests);\n  return results.filter(r => r !== undefined) as Ide[];\n}\n\nexport function openHotspot(calledPort: number, projectKey: string, hotspotKey: string) {\n  const showUrl = new URL(buildSonarLintEndpoint(calledPort, '/hotspots/show'));\n  showUrl.searchParams.set('server', getHostUrl());\n  showUrl.searchParams.set('project', projectKey);\n  showUrl.searchParams.set('hotspot', hotspotKey);\n  return fetch(showUrl.toString());\n}\n\n/**\n * @returns [ start , ... , start + size - 1 ]\n */\nexport function buildPortRange(start = SONARLINT_PORT_START, size = SONARLINT_PORT_RANGE) {\n  return Array.from(Array(size).keys()).map(p => start + p);\n}\n\nfunction buildSonarLintEndpoint(port: number, path: string) {\n  return `http://localhost:${port}/sonarlint/api${path}`;\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Ide } from '../../../types/sonarlint';\n\nexport const HotspotOpenInIdeOverlay = ({\n  ides,\n  onIdeSelected\n}: {\n  ides: Array<Ide>;\n  onIdeSelected: (ide: Ide) => Promise<void>;\n}) =>\n  ides.length > 1 ? (\n    <ul className=\"menu\">\n      {ides.map(ide => {\n        const { ideName, description } = ide;\n        const label = ideName + (description ? ` - ${description}` : '');\n        return (\n          <li key={ide.port}>\n            <a href=\"#\" onClick={() => onIdeSelected(ide)}>\n              {label}\n            </a>\n          </li>\n        );\n      })}\n    </ul>\n  ) : null;\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport addGlobalErrorMessage from '../../../app/utils/addGlobalErrorMessage';\nimport addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage';\nimport { Button } from '../../../components/controls/buttons';\nimport { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport Toggler from '../../../components/controls/Toggler';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { openHotspot, probeSonarLintServers } from '../../../helpers/sonarlint';\nimport { Ide } from '../../../types/sonarlint';\nimport { HotspotOpenInIdeOverlay } from './HotspotOpenInIdeOverlay';\n\ninterface Props {\n  projectKey: string;\n  hotspotKey: string;\n}\n\ninterface State {\n  loading: boolean;\n  ides: Array<Ide>;\n}\n\nexport default class HotspotOpenInIdeButton extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  state = {\n    loading: false,\n    ides: []\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleOnClick = async () => {\n    this.setState({ loading: true, ides: [] });\n    const ides = await probeSonarLintServers();\n    if (ides.length === 0) {\n      if (this.mounted) {\n        this.setState({ loading: false });\n      }\n      this.showError();\n    } else if (ides.length === 1) {\n      this.openHotspot(ides[0]);\n    } else if (this.mounted) {\n      this.setState({ loading: false, ides });\n    }\n  };\n\n  openHotspot = (ide: Ide) => {\n    this.setState({ loading: true, ides: [] });\n    const { projectKey, hotspotKey } = this.props;\n    return openHotspot(ide.port, projectKey, hotspotKey)\n      .then(this.showSuccess)\n      .catch(this.showError)\n      .finally(this.cleanState);\n  };\n\n  showError = () => addGlobalErrorMessage(translate('hotspots.open_in_ide.failure'));\n\n  showSuccess = () => addGlobalSuccessMessage(translate('hotspots.open_in_ide.success'));\n\n  cleanState = () => {\n    if (this.mounted) {\n      this.setState({ loading: false, ides: [] });\n    }\n  };\n\n  render() {\n    return (\n      <Toggler\n        open={this.state.ides.length > 1}\n        onRequestClose={this.cleanState}\n        overlay={\n          <DropdownOverlay>\n            <HotspotOpenInIdeOverlay ides={this.state.ides} onIdeSelected={this.openHotspot} />\n          </DropdownOverlay>\n        }>\n        <Button onClick={this.handleOnClick}>\n          {translate('hotspots.open_in_ide.open')}\n          <DeferredSpinner loading={this.state.loading} className=\"spacer-left\" />\n        </Button>\n      </Toggler>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport FormattingTips from '../../../components/common/FormattingTips';\nimport { Button, ResetButtonLink } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\n\nexport interface HotspotCommentPopupProps {\n  markdownComment: string;\n  onCommentEditSubmit: (comment: string) => void;\n  onCancelEdit: () => void;\n}\n\nexport default function HotspotCommentPopup(props: HotspotCommentPopupProps) {\n  const [comment, setComment] = React.useState(props.markdownComment);\n\n  return (\n    <div className=\"issue-comment-bubble-popup\">\n      <div className=\"issue-comment-form-text\">\n        <textarea\n          autoFocus={true}\n          onChange={event => setComment(event.target.value)}\n          rows={2}\n          value={comment}\n        />\n      </div>\n      <div className=\"spacer-top display-flex-space-between\">\n        <div className=\"issue-comment-form-tips\">\n          <FormattingTips />\n        </div>\n        <div className=\"\">\n          <Button\n            className=\"little-spacer-right\"\n            onClick={() => props.onCommentEditSubmit(comment)}>\n            {translate('save')}\n          </Button>\n          <ResetButtonLink\n            onClick={() => {\n              setComment('');\n              props.onCancelEdit();\n            }}>\n            {translate('cancel')}\n          </ResetButtonLink>\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Button, ButtonLink, DeleteButton, EditButton } from '../../../components/controls/buttons';\nimport Dropdown, { DropdownOverlay } from '../../../components/controls/Dropdown';\nimport Toggler from '../../../components/controls/Toggler';\nimport DateTimeFormatter from '../../../components/intl/DateTimeFormatter';\nimport IssueChangelogDiff from '../../../components/issue/components/IssueChangelogDiff';\nimport Avatar from '../../../components/ui/Avatar';\nimport { PopupPlacement } from '../../../components/ui/popups';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { sanitizeString } from '../../../helpers/sanitize';\nimport { Hotspot, ReviewHistoryType } from '../../../types/security-hotspots';\nimport { getHotspotReviewHistory } from '../utils';\nimport HotspotCommentPopup from './HotspotCommentPopup';\n\nexport interface HotspotReviewHistoryProps {\n  hotspot: Hotspot;\n  onDeleteComment: (key: string) => void;\n  onEditComment: (key: string, comment: string) => void;\n  onShowFullHistory: () => void;\n  showFullHistory: boolean;\n}\n\nexport const MAX_RECENT_ACTIVITY = 5;\n\nexport default function HotspotReviewHistory(props: HotspotReviewHistoryProps) {\n  const { hotspot, showFullHistory } = props;\n  const fullReviewHistory = getHotspotReviewHistory(hotspot);\n  const [editedCommentKey, setEditedCommentKey] = React.useState('');\n\n  const reviewHistory = showFullHistory\n    ? fullReviewHistory\n    : fullReviewHistory.slice(0, MAX_RECENT_ACTIVITY);\n\n  return (\n    <>\n      <ul>\n        {reviewHistory.map((historyElt, historyIndex) => {\n          const { user, type, diffs, date, html, key, updatable, markdown } = historyElt;\n          return (\n            <li\n              className={classNames('padded-top padded-bottom', {\n                'bordered-top': historyIndex > 0\n              })}\n              key={historyIndex}>\n              <div className=\"display-flex-center\">\n                {user.name && (\n                  <>\n                    <Avatar\n                      className=\"little-spacer-right\"\n                      hash={user.avatar}\n                      name={user.name}\n                      size={20}\n                    />\n                    <strong>\n                      {user.active\n                        ? user.name\n                        : translateWithParameters('user.x_deleted', user.name)}\n                    </strong>\n                    {type === ReviewHistoryType.Creation && (\n                      <span className=\"little-spacer-left\">\n                        {translate('hotspots.review_history.created')}\n                      </span>\n                    )}\n                    {type === ReviewHistoryType.Comment && (\n                      <span className=\"little-spacer-left\">\n                        {translate('hotspots.review_history.comment_added')}\n                      </span>\n                    )}\n                    <span className=\"little-spacer-left little-spacer-right\">-</span>\n                  </>\n                )}\n                <DateTimeFormatter date={date} />\n              </div>\n\n              {type === ReviewHistoryType.Diff && diffs && (\n                <div className=\"spacer-top\">\n                  {diffs.map((diff, diffIndex) => (\n                    <IssueChangelogDiff diff={diff} key={diffIndex} />\n                  ))}\n                </div>\n              )}\n\n              {type === ReviewHistoryType.Comment && key && html && markdown && (\n                <div className=\"spacer-top display-flex-space-between\">\n                  <div\n                    className=\"markdown\"\n                    // eslint-disable-next-line react/no-danger\n                    dangerouslySetInnerHTML={{ __html: sanitizeString(html) }}\n                  />\n                  {updatable && (\n                    <div>\n                      <div className=\"dropdown\">\n                        <Toggler\n                          onRequestClose={() => {\n                            setEditedCommentKey('');\n                          }}\n                          open={key === editedCommentKey}\n                          overlay={\n                            <DropdownOverlay placement={PopupPlacement.BottomRight}>\n                              <HotspotCommentPopup\n                                markdownComment={markdown}\n                                onCancelEdit={() => setEditedCommentKey('')}\n                                onCommentEditSubmit={comment => {\n                                  setEditedCommentKey('');\n                                  props.onEditComment(key, comment);\n                                }}\n                              />\n                            </DropdownOverlay>\n                          }>\n                          <EditButton\n                            className=\"button-small\"\n                            onClick={() => setEditedCommentKey(key)}\n                          />\n                        </Toggler>\n                      </div>\n                      <Dropdown\n                        onOpen={() => setEditedCommentKey('')}\n                        overlay={\n                          <div className=\"padded abs-width-150\">\n                            <p>{translate('issue.comment.delete_confirm_message')}</p>\n                            <Button\n                              className=\"button-red big-spacer-top pull-right\"\n                              onClick={() => props.onDeleteComment(key)}>\n                              {translate('delete')}\n                            </Button>\n                          </div>\n                        }\n                        overlayPlacement={PopupPlacement.BottomRight}>\n                        <DeleteButton className=\"button-small\" />\n                      </Dropdown>\n                    </div>\n                  )}\n                </div>\n              )}\n            </li>\n          );\n        })}\n      </ul>\n      {!showFullHistory && fullReviewHistory.length > MAX_RECENT_ACTIVITY && (\n        <ButtonLink className=\"spacer-top\" onClick={props.onShowFullHistory}>\n          {translate('show_all')}\n        </ButtonLink>\n      )}\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport {\n  commentSecurityHotspot,\n  deleteSecurityHotspotComment,\n  editSecurityHotspotComment\n} from '../../../api/security-hotspots';\nimport FormattingTips from '../../../components/common/FormattingTips';\nimport { Button } from '../../../components/controls/buttons';\nimport { translate } from '../../../helpers/l10n';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { Hotspot } from '../../../types/security-hotspots';\nimport HotspotReviewHistory from './HotspotReviewHistory';\n\ninterface Props {\n  currentUser: T.CurrentUser;\n  hotspot: Hotspot;\n  commentTextRef: React.RefObject<HTMLTextAreaElement>;\n  onCommentUpdate: () => void;\n}\n\ninterface State {\n  comment: string;\n  showFullHistory: boolean;\n}\n\nexport default class HotspotReviewHistoryAndComments extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      comment: '',\n      showFullHistory: false\n    };\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.hotspot.key !== this.props.hotspot.key) {\n      this.setState({\n        comment: '',\n        showFullHistory: false\n      });\n    }\n  }\n\n  handleCommentChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    this.setState({ comment: event.target.value });\n  };\n\n  handleSubmitComment = () => {\n    return commentSecurityHotspot(this.props.hotspot.key, this.state.comment).then(() => {\n      this.setState({ comment: '' });\n      this.props.onCommentUpdate();\n    });\n  };\n\n  handleDeleteComment = (key: string) => {\n    return deleteSecurityHotspotComment(key).then(() => {\n      this.props.onCommentUpdate();\n    });\n  };\n\n  handleEditComment = (key: string, comment: string) => {\n    return editSecurityHotspotComment(key, comment).then(() => {\n      this.props.onCommentUpdate();\n    });\n  };\n\n  handleShowFullHistory = () => {\n    this.setState({ showFullHistory: true });\n  };\n\n  render() {\n    const { currentUser, hotspot, commentTextRef } = this.props;\n    const { comment, showFullHistory } = this.state;\n    return (\n      <div className=\"padded it__hs-review-history\">\n        {isLoggedIn(currentUser) && (\n          <div className=\"big-spacer-top\">\n            <div className=\"little-spacer-bottom\">{translate('hotspots.comment.field')}</div>\n            <textarea\n              className=\"form-field fixed-width width-100 spacer-bottom\"\n              onChange={this.handleCommentChange}\n              ref={commentTextRef}\n              rows={2}\n              value={comment}\n            />\n            <div className=\"display-flex-space-between display-flex-center \">\n              <FormattingTips className=\"huge-spacer-bottom\" />\n              <div>\n                <Button\n                  className=\"huge-spacer-bottom\"\n                  id=\"hotspot-comment-box-submit\"\n                  onClick={this.handleSubmitComment}>\n                  {translate('hotspots.comment.submit')}\n                </Button>\n              </div>\n            </div>\n          </div>\n        )}\n\n        <h2 className=\"spacer-top big-spacer-bottom\">{translate('hotspot.section.activity')}</h2>\n\n        <HotspotReviewHistory\n          hotspot={hotspot}\n          onDeleteComment={this.handleDeleteComment}\n          onEditComment={this.handleEditComment}\n          onShowFullHistory={this.handleShowFullHistory}\n          showFullHistory={showFullHistory}\n        />\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { SourceViewerContext } from '../../../components/SourceViewer/SourceViewerContext';\nimport SourceViewerHeaderSlim from '../../../components/SourceViewer/SourceViewerHeaderSlim';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { translate } from '../../../helpers/l10n';\nimport { BranchLike } from '../../../types/branch-like';\nimport { Hotspot } from '../../../types/security-hotspots';\nimport SnippetViewer from '../../issues/crossComponentSourceViewer/SnippetViewer';\n\nexport interface HotspotSnippetContainerRendererProps {\n  branchLike?: BranchLike;\n  displayProjectName?: boolean;\n  highlightedSymbols: string[];\n  hotspot: Hotspot;\n  loading: boolean;\n  locations: { [line: number]: T.LinearIssueLocation[] };\n  onExpandBlock: (direction: T.ExpandDirection) => Promise<void>;\n  onSymbolClick: (symbols: string[]) => void;\n  sourceLines: T.SourceLine[];\n  sourceViewerFile: T.SourceViewerFile;\n}\n\nconst noop = () => undefined;\n\nexport default function HotspotSnippetContainerRenderer(\n  props: HotspotSnippetContainerRendererProps\n) {\n  const {\n    branchLike,\n    displayProjectName,\n    highlightedSymbols,\n    hotspot,\n    loading,\n    locations,\n    sourceLines,\n    sourceViewerFile\n  } = props;\n\n  return (\n    <>\n      {!loading && sourceLines.length === 0 && (\n        <p className=\"spacer-bottom\">{translate('hotspots.no_associated_lines')}</p>\n      )}\n      <div className=\"bordered big-spacer-bottom\">\n        <SourceViewerHeaderSlim\n          branchLike={branchLike}\n          expandable={false}\n          displayProjectName={displayProjectName}\n          linkToProject={false}\n          loading={loading}\n          onExpand={noop}\n          sourceViewerFile={sourceViewerFile}\n        />\n        <DeferredSpinner className=\"big-spacer\" loading={loading}>\n          {sourceLines.length > 0 && (\n            <SourceViewerContext.Provider /* Used by LineOptionsPopup */\n              value={{ branchLike, file: sourceViewerFile }}>\n              <SnippetViewer\n                branchLike={undefined}\n                component={sourceViewerFile}\n                displayLineNumberOptions={false}\n                displaySCM={false}\n                expandBlock={(_i, direction) => props.onExpandBlock(direction)}\n                handleCloseIssues={noop}\n                handleOpenIssues={noop}\n                handleSymbolClick={props.onSymbolClick}\n                highlightedLocationMessage={undefined}\n                highlightedSymbols={highlightedSymbols}\n                index={0}\n                issue={hotspot}\n                issuesByLine={{}}\n                lastSnippetOfLastGroup={false}\n                locations={[]}\n                locationsByLine={locations}\n                onIssueChange={noop}\n                onIssuePopupToggle={noop}\n                onLocationSelect={noop}\n                openIssuesByLine={{}}\n                renderDuplicationPopup={noop}\n                snippet={sourceLines}\n              />\n            </SourceViewerContext.Provider>\n          )}\n        </DeferredSpinner>\n      </div>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getSources } from '../../../api/components';\nimport { locationsByLine } from '../../../components/SourceViewer/helpers/indexing';\nimport { getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { BranchLike } from '../../../types/branch-like';\nimport { ComponentQualifier } from '../../../types/component';\nimport { Hotspot } from '../../../types/security-hotspots';\nimport { constructSourceViewerFile } from '../utils';\nimport HotspotSnippetContainerRenderer from './HotspotSnippetContainerRenderer';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.Component;\n  hotspot: Hotspot;\n}\n\ninterface State {\n  highlightedSymbols: string[];\n  lastLine?: number;\n  loading: boolean;\n  sourceLines: T.SourceLine[];\n}\n\nconst BUFFER_LINES = 5;\nconst EXPAND_BY_LINES = 50;\n\nexport default class HotspotSnippetContainer extends React.Component<Props, State> {\n  mounted = false;\n  state: State = {\n    highlightedSymbols: [],\n    loading: true,\n    sourceLines: []\n  };\n\n  componentWillMount() {\n    this.mounted = true;\n    this.fetchSources();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.hotspot.key !== this.props.hotspot.key) {\n      this.fetchSources();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  checkLastLine(lines: T.SourceLine[], target: number): number | undefined {\n    if (lines.length < 1) {\n      return undefined;\n    }\n    const lastLineReceived = lines[lines.length - 1].line;\n    if (lastLineReceived < target) {\n      return lastLineReceived;\n    }\n    return undefined;\n  }\n\n  async fetchSources() {\n    const {\n      branchLike,\n      hotspot: { component, textRange }\n    } = this.props;\n\n    if (!textRange) {\n      // Hotspot not associated to any loc\n      this.setState({ loading: false, lastLine: undefined, sourceLines: [] });\n      return;\n    }\n\n    const from = Math.max(1, textRange.startLine - BUFFER_LINES);\n    // Add 1 to check for end-of-file:\n    const to = textRange.endLine + BUFFER_LINES + 1;\n\n    this.setState({ loading: true });\n\n    let sourceLines = await getSources({\n      key: component.key,\n      from,\n      to,\n      ...getBranchLikeQuery(branchLike)\n    }).catch(() => [] as T.SourceLine[]);\n\n    if (this.mounted) {\n      const lastLine = this.checkLastLine(sourceLines, to);\n\n      // remove extra sourceline if we didn't reach the end:\n      sourceLines = lastLine ? sourceLines : sourceLines.slice(0, -1);\n      this.setState({ lastLine, loading: false, sourceLines });\n    }\n  }\n\n  handleExpansion = (direction: T.ExpandDirection) => {\n    const { branchLike, hotspot } = this.props;\n    const { sourceLines } = this.state;\n\n    const range =\n      direction === 'up'\n        ? {\n            from: Math.max(1, sourceLines[0].line - EXPAND_BY_LINES),\n            to: sourceLines[0].line - 1\n          }\n        : {\n            from: sourceLines[sourceLines.length - 1].line + 1,\n            // Add 1 to check for end-of-file:\n            to: sourceLines[sourceLines.length - 1].line + EXPAND_BY_LINES + 1\n          };\n\n    return getSources({\n      key: hotspot.component.key,\n      ...range,\n      ...getBranchLikeQuery(branchLike)\n    }).then(additionalLines => {\n      const { lastLine: previousLastLine } = this.state;\n\n      const lastLine =\n        direction === 'down' ? this.checkLastLine(additionalLines, range.to) : previousLastLine;\n\n      let concatSourceLines;\n      if (direction === 'up') {\n        concatSourceLines = additionalLines.concat(sourceLines);\n      } else {\n        // remove extra sourceline if we didn't reach the end:\n        concatSourceLines = sourceLines.concat(\n          lastLine ? additionalLines : additionalLines.slice(0, -1)\n        );\n      }\n\n      this.setState({\n        lastLine,\n        sourceLines: concatSourceLines\n      });\n    });\n  };\n\n  handleSymbolClick = (highlightedSymbols: string[]) => {\n    this.setState({ highlightedSymbols });\n  };\n\n  render() {\n    const { branchLike, component, hotspot } = this.props;\n    const { highlightedSymbols, lastLine, loading, sourceLines } = this.state;\n\n    const locations = locationsByLine([hotspot]);\n\n    const sourceViewerFile = constructSourceViewerFile(hotspot, lastLine);\n\n    return (\n      <HotspotSnippetContainerRenderer\n        branchLike={branchLike}\n        displayProjectName={component.qualifier === ComponentQualifier.Application}\n        highlightedSymbols={highlightedSymbols}\n        hotspot={hotspot}\n        loading={loading}\n        locations={locations}\n        onExpandBlock={this.handleExpansion}\n        onSymbolClick={this.handleSymbolClick}\n        sourceLines={sourceLines}\n        sourceViewerFile={sourceViewerFile}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport BoxedTabs from '../../../components/controls/BoxedTabs';\nimport Tab from '../../../components/controls/Tabs';\nimport { translate } from '../../../helpers/l10n';\nimport { sanitizeString } from '../../../helpers/sanitize';\nimport { Hotspot } from '../../../types/security-hotspots';\n\ninterface Props {\n  hotspot: Hotspot;\n}\n\ninterface State {\n  currentTab: Tab;\n  tabs: Tab[];\n}\n\ninterface Tab {\n  key: TabKeys;\n  label: React.ReactNode;\n  content: string;\n}\n\nexport enum TabKeys {\n  RiskDescription = 'risk',\n  VulnerabilityDescription = 'vulnerability',\n  FixRecommendation = 'fix'\n}\n\nexport default class HotspotViewerTabs extends React.PureComponent<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    const tabs = this.computeTabs();\n    this.state = {\n      currentTab: tabs[0],\n      tabs\n    };\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (this.props.hotspot.key !== prevProps.hotspot.key) {\n      const tabs = this.computeTabs();\n      this.setState({\n        currentTab: tabs[0],\n        tabs\n      });\n    }\n  }\n\n  handleSelectTabs = (tabKey: TabKeys) => {\n    const { tabs } = this.state;\n    const currentTab = tabs.find(tab => tab.key === tabKey)!;\n    this.setState({ currentTab });\n  };\n\n  computeTabs() {\n    const { hotspot } = this.props;\n    return [\n      {\n        key: TabKeys.RiskDescription,\n        label: translate('hotspots.tabs.risk_description'),\n        content: hotspot.rule.riskDescription || ''\n      },\n      {\n        key: TabKeys.VulnerabilityDescription,\n        label: translate('hotspots.tabs.vulnerability_description'),\n        content: hotspot.rule.vulnerabilityDescription || ''\n      },\n      {\n        key: TabKeys.FixRecommendation,\n        label: translate('hotspots.tabs.fix_recommendations'),\n        content: hotspot.rule.fixRecommendations || ''\n      }\n    ].filter(tab => Boolean(tab.content));\n  }\n\n  render() {\n    const { tabs, currentTab } = this.state;\n    if (tabs.length === 0) {\n      return null;\n    }\n\n    return (\n      <>\n        <BoxedTabs onSelect={this.handleSelectTabs} selected={currentTab.key} tabs={tabs} />\n        <div className=\"bordered huge-spacer-bottom\">\n          <div\n            className=\"markdown big-padded\"\n            // eslint-disable-next-line react/no-danger\n            dangerouslySetInnerHTML={{ __html: sanitizeString(currentTab.content) }}\n          />\n        </div>\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../../../helpers/l10n';\nimport { HotspotStatusOption } from '../../../../types/security-hotspots';\n\nexport interface StatusDescriptionProps {\n  statusOption: HotspotStatusOption;\n  showTitle?: boolean;\n}\n\nexport default function StatusDescription(props: StatusDescriptionProps) {\n  const { statusOption, showTitle } = props;\n\n  return (\n    <div>\n      <h3>\n        {showTitle && `${translate('status')}: `}\n        {translate('hotspots.status_option', statusOption)}\n      </h3>\n      <span>{translate('hotspots.status_option', statusOption, 'description')}</span>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport FormattingTips from '../../../../components/common/FormattingTips';\nimport { SubmitButton } from '../../../../components/controls/buttons';\nimport Radio from '../../../../components/controls/Radio';\nimport { translate } from '../../../../helpers/l10n';\nimport { HotspotStatusOption } from '../../../../types/security-hotspots';\nimport StatusDescription from './StatusDescription';\n\nexport interface StatusSelectionRendererProps {\n  selectedStatus: HotspotStatusOption;\n  onStatusChange: (statusOption: HotspotStatusOption) => void;\n\n  comment?: string;\n  onCommentChange: (comment: string) => void;\n\n  onSubmit: () => void;\n\n  loading: boolean;\n  submitDisabled: boolean;\n}\n\nexport default function StatusSelectionRenderer(props: StatusSelectionRendererProps) {\n  const { comment, loading, selectedStatus, submitDisabled } = props;\n\n  const renderOption = (status: HotspotStatusOption) => {\n    return (\n      <Radio\n        checked={selectedStatus === status}\n        className=\"big-spacer-bottom\"\n        onCheck={props.onStatusChange}\n        value={status}>\n        <StatusDescription statusOption={status} />\n      </Radio>\n    );\n  };\n\n  return (\n    <div className=\"abs-width-400\">\n      <div className=\"big-padded\">\n        {renderOption(HotspotStatusOption.TO_REVIEW)}\n        {renderOption(HotspotStatusOption.FIXED)}\n        {renderOption(HotspotStatusOption.SAFE)}\n      </div>\n\n      <hr />\n      <div className=\"big-padded display-flex-column\">\n        <label className=\"text-bold\" htmlFor=\"comment-textarea\">\n          {translate('hotspots.status.add_comment')}\n        </label>\n        <textarea\n          className=\"spacer-top form-field fixed-width spacer-bottom\"\n          id=\"comment-textarea\"\n          onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) =>\n            props.onCommentChange(event.currentTarget.value)\n          }\n          rows={4}\n          value={comment}\n        />\n        <FormattingTips />\n\n        <div className=\"big-spacer-top display-flex-justify-end display-flex-center\">\n          <SubmitButton disabled={submitDisabled || loading} onClick={props.onSubmit}>\n            {translate('hotspots.status.change_status')}\n          </SubmitButton>\n\n          {loading && <i className=\"spacer-left spinner\" />}\n        </div>\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setSecurityHotspotStatus } from '../../../../api/security-hotspots';\nimport { Hotspot, HotspotStatusOption } from '../../../../types/security-hotspots';\nimport {\n  getStatusAndResolutionFromStatusOption,\n  getStatusOptionFromStatusAndResolution\n} from '../../utils';\nimport StatusSelectionRenderer from './StatusSelectionRenderer';\n\ninterface Props {\n  hotspot: Hotspot;\n  onStatusOptionChange: (statusOption: HotspotStatusOption) => Promise<void>;\n}\n\ninterface State {\n  comment?: string;\n  loading: boolean;\n  initialStatus: HotspotStatusOption;\n  selectedStatus: HotspotStatusOption;\n}\n\nexport default class StatusSelection extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    const initialStatus = getStatusOptionFromStatusAndResolution(\n      props.hotspot.status,\n      props.hotspot.resolution\n    );\n\n    this.state = {\n      loading: false,\n      initialStatus,\n      selectedStatus: initialStatus\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleStatusChange = (selectedStatus: HotspotStatusOption) => {\n    this.setState({ selectedStatus });\n  };\n\n  handleCommentChange = (comment: string) => {\n    this.setState({ comment });\n  };\n\n  handleSubmit = () => {\n    const { hotspot } = this.props;\n    const { comment, initialStatus, selectedStatus } = this.state;\n\n    if (selectedStatus && selectedStatus !== initialStatus) {\n      this.setState({ loading: true });\n      setSecurityHotspotStatus(hotspot.key, {\n        ...getStatusAndResolutionFromStatusOption(selectedStatus),\n        comment: comment || undefined\n      })\n        .then(async () => {\n          await this.props.onStatusOptionChange(selectedStatus);\n          this.setState({ loading: false });\n        })\n        .catch(() => this.setState({ loading: false }));\n    }\n  };\n\n  render() {\n    const { comment, initialStatus, loading, selectedStatus } = this.state;\n    const submitDisabled = selectedStatus === initialStatus;\n\n    return (\n      <StatusSelectionRenderer\n        comment={comment}\n        loading={loading}\n        onCommentChange={this.handleCommentChange}\n        onStatusChange={this.handleStatusChange}\n        onSubmit={this.handleSubmit}\n        selectedStatus={selectedStatus}\n        submitDisabled={submitDisabled}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Button } from '../../../../components/controls/buttons';\nimport { DropdownOverlay } from '../../../../components/controls/Dropdown';\nimport Toggler from '../../../../components/controls/Toggler';\nimport Tooltip from '../../../../components/controls/Tooltip';\nimport { withCurrentUser } from '../../../../components/hoc/withCurrentUser';\nimport DropdownIcon from '../../../../components/icons/DropdownIcon';\nimport { PopupPlacement } from '../../../../components/ui/popups';\nimport { translate } from '../../../../helpers/l10n';\nimport { isLoggedIn } from '../../../../helpers/users';\nimport { Hotspot, HotspotStatusOption } from '../../../../types/security-hotspots';\nimport { getStatusOptionFromStatusAndResolution } from '../../utils';\nimport StatusDescription from './StatusDescription';\nimport StatusSelection from './StatusSelection';\n\nexport interface StatusProps {\n  currentUser: T.CurrentUser;\n  hotspot: Hotspot;\n\n  onStatusChange: (statusOption: HotspotStatusOption) => Promise<void>;\n}\n\nexport function Status(props: StatusProps) {\n  const { currentUser, hotspot } = props;\n  const [isOpen, setIsOpen] = React.useState(false);\n\n  const statusOption = getStatusOptionFromStatusAndResolution(hotspot.status, hotspot.resolution);\n  const readonly = !hotspot.canChangeStatus || !isLoggedIn(currentUser);\n\n  return (\n    <div>\n      <StatusDescription showTitle={true} statusOption={statusOption} />\n      <div className=\"spacer-top\">\n        <Tooltip\n          overlay={readonly ? translate('hotspots.status.cannot_change_status') : null}\n          placement=\"bottom\">\n          <div className=\"dropdown display-inline-block\">\n            <Toggler\n              closeOnClickOutside={true}\n              closeOnEscape={true}\n              onRequestClose={() => setIsOpen(false)}\n              open={isOpen}\n              overlay={\n                <DropdownOverlay noPadding={true} placement={PopupPlacement.Bottom}>\n                  <StatusSelection\n                    hotspot={hotspot}\n                    onStatusOptionChange={async status => {\n                      await props.onStatusChange(status);\n                      setIsOpen(false);\n                    }}\n                  />\n                </DropdownOverlay>\n              }>\n              <Button\n                className={classNames('dropdown-toggle')}\n                id=\"status-trigger\"\n                onClick={() => setIsOpen(true)}\n                disabled={readonly}>\n                <span>{translate('hotspots.status.select_status')}</span>\n                <DropdownIcon className=\"little-spacer-left\" />\n              </Button>\n            </Toggler>\n          </div>\n        </Tooltip>\n      </div>\n    </div>\n  );\n}\n\nexport default withCurrentUser(Status);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Button, ButtonLink } from '../../../components/controls/buttons';\nimport Modal from '../../../components/controls/Modal';\nimport { translate, translateWithParameters } from '../../../helpers/l10n';\nimport { formatMeasure } from '../../../helpers/measures';\nimport { HotspotStatusOption } from '../../../types/security-hotspots';\n\nexport interface StatusUpdateSuccessModalProps {\n  hotspotsReviewedMeasure?: string;\n  lastStatusChangedTo?: HotspotStatusOption;\n  onClose: () => void;\n  onSwitchFilterToStatusOfUpdatedHotspot: () => void;\n}\n\nexport default function StatusUpdateSuccessModal(props: StatusUpdateSuccessModalProps) {\n  const { hotspotsReviewedMeasure, lastStatusChangedTo } = props;\n\n  if (!lastStatusChangedTo) {\n    return null;\n  }\n\n  const closingHotspots = lastStatusChangedTo !== HotspotStatusOption.TO_REVIEW;\n  const statusLabel = translate('hotspots.status_option', lastStatusChangedTo);\n  const modalTitle = closingHotspots\n    ? translate('hotspots.congratulations')\n    : translate('hotspots.update.success');\n\n  return (\n    <Modal contentLabel={modalTitle}>\n      <div className=\"modal-head\">\n        <h2\n          className={classNames('huge text-normal', {\n            'text-success': closingHotspots\n          })}>\n          {modalTitle}\n        </h2>\n      </div>\n\n      <div className=\"modal-body\">\n        <FormattedMessage\n          id=\"hotspots.successfully_changed_to_x\"\n          defaultMessage={translate('hotspots.successfully_changed_to_x')}\n          values={{\n            status_label: statusLabel,\n            status_change: (\n              <strong>\n                {translateWithParameters('hotspots.successful_status_change_to_x', statusLabel)}\n              </strong>\n            )\n          }}\n        />\n        {closingHotspots && (\n          <p className=\"spacer-top\">\n            <FormattedMessage\n              id=\"hotspots.x_done_keep_going\"\n              defaultMessage={translate('hotspots.x_done_keep_going')}\n              values={{\n                percentage: (\n                  <strong>\n                    {formatMeasure(hotspotsReviewedMeasure, 'PERCENT', {\n                      omitExtraDecimalZeros: true\n                    })}\n                  </strong>\n                )\n              }}\n            />\n          </p>\n        )}\n      </div>\n\n      <div className=\"modal-foot modal-foot-clear display-flex-center display-flex-space-between\">\n        <ButtonLink onClick={props.onSwitchFilterToStatusOfUpdatedHotspot}>\n          {translateWithParameters('hotspots.see_x_hotspots', statusLabel)}\n        </ButtonLink>\n        <Button className=\"button-primary padded\" onClick={props.onClose}>\n          {translate('hotspots.continue_to_next_hotspot')}\n        </Button>\n      </div>\n    </Modal>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { Link } from 'react-router';\nimport { Button } from '../../../components/controls/buttons';\nimport { ClipboardButton } from '../../../components/controls/clipboard';\nimport { withCurrentUser } from '../../../components/hoc/withCurrentUser';\nimport LinkIcon from '../../../components/icons/LinkIcon';\nimport DeferredSpinner from '../../../components/ui/DeferredSpinner';\nimport { fillBranchLike, getBranchLikeQuery } from '../../../helpers/branch-like';\nimport { translate } from '../../../helpers/l10n';\nimport {\n  getComponentSecurityHotspotsUrl,\n  getPathUrlAsString,\n  getRuleUrl\n} from '../../../helpers/urls';\nimport { isLoggedIn } from '../../../helpers/users';\nimport { BranchLike } from '../../../types/branch-like';\nimport { Hotspot, HotspotStatusOption } from '../../../types/security-hotspots';\nimport Assignee from './assignee/Assignee';\nimport HotspotOpenInIdeButton from './HotspotOpenInIdeButton';\nimport HotspotReviewHistoryAndComments from './HotspotReviewHistoryAndComments';\nimport HotspotSnippetContainer from './HotspotSnippetContainer';\nimport './HotspotViewer.css';\nimport HotspotViewerTabs from './HotspotViewerTabs';\nimport Status from './status/Status';\nimport StatusUpdateSuccessModal from './StatusUpdateSuccessModal';\n\nexport interface HotspotViewerRendererProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  currentUser: T.CurrentUser;\n  hotspot?: Hotspot;\n  hotspotsReviewedMeasure?: string;\n  lastStatusChangedTo?: HotspotStatusOption;\n  loading: boolean;\n  commentTextRef: React.RefObject<HTMLTextAreaElement>;\n  onCloseStatusUpdateSuccessModal: () => void;\n  onUpdateHotspot: (statusUpdate?: boolean, statusOption?: HotspotStatusOption) => Promise<void>;\n  onShowCommentForm: () => void;\n  onSwitchFilterToStatusOfUpdatedHotspot: () => void;\n  showStatusUpdateSuccessModal: boolean;\n  securityCategories: T.StandardSecurityCategories;\n}\n\nexport function HotspotViewerRenderer(props: HotspotViewerRendererProps) {\n  const {\n    branchLike,\n    component,\n    currentUser,\n    hotspot,\n    hotspotsReviewedMeasure,\n    loading,\n    lastStatusChangedTo,\n    showStatusUpdateSuccessModal,\n    securityCategories,\n    commentTextRef\n  } = props;\n\n  const permalink = getPathUrlAsString(\n    getComponentSecurityHotspotsUrl(component.key, {\n      ...getBranchLikeQuery(branchLike),\n      hotspots: hotspot?.key\n    }),\n    false\n  );\n\n  return (\n    <DeferredSpinner className=\"big-spacer-left big-spacer-top\" loading={loading}>\n      {showStatusUpdateSuccessModal && (\n        <StatusUpdateSuccessModal\n          hotspotsReviewedMeasure={hotspotsReviewedMeasure}\n          lastStatusChangedTo={lastStatusChangedTo}\n          onClose={props.onCloseStatusUpdateSuccessModal}\n          onSwitchFilterToStatusOfUpdatedHotspot={props.onSwitchFilterToStatusOfUpdatedHotspot}\n        />\n      )}\n\n      {hotspot && (\n        <div className=\"big-padded hotspot-content\">\n          <div className=\"huge-spacer-bottom display-flex-space-between\">\n            <div className=\"display-flex-column\">\n              <strong className=\"big big-spacer-right little-spacer-bottom\">\n                {hotspot.message}\n              </strong>\n              <div>\n                <span className=\"note padded-right\">{hotspot.rule.name}</span>\n                <Link className=\"small\" to={getRuleUrl(hotspot.rule.key)} target=\"_blank\">\n                  {hotspot.rule.key}\n                </Link>\n              </div>\n            </div>\n            <div className=\"display-flex-row flex-0\">\n              {isLoggedIn(currentUser) && (\n                <>\n                  <div className=\"dropdown spacer-right flex-1-0-auto\">\n                    <Button className=\"it__hs-add-comment\" onClick={props.onShowCommentForm}>\n                      {translate('hotspots.comment.open')}\n                    </Button>\n                  </div>\n                  <div className=\"dropdown spacer-right flex-1-0-auto\">\n                    <HotspotOpenInIdeButton\n                      hotspotKey={hotspot.key}\n                      projectKey={hotspot.project.key}\n                    />\n                  </div>\n                </>\n              )}\n              <ClipboardButton className=\"flex-1-0-auto\" copyValue={permalink}>\n                <LinkIcon className=\"spacer-right\" />\n                <span>{translate('hotspots.get_permalink')}</span>\n              </ClipboardButton>\n            </div>\n          </div>\n\n          <div className=\"huge-spacer-bottom display-flex-row display-flex-space-between\">\n            <div className=\"hotspot-information display-flex-column display-flex-space-between\">\n              <div className=\"display-flex-center\">\n                <span className=\"big-spacer-right\">{translate('category')}</span>\n                <strong className=\"nowrap\">\n                  {securityCategories[hotspot.rule.securityCategory].title}\n                </strong>\n              </div>\n              <div className=\"display-flex-center\">\n                <span className=\"big-spacer-right\">{translate('hotspots.risk_exposure')}</span>\n                <div\n                  className={classNames(\n                    'hotspot-risk-badge',\n                    hotspot.rule.vulnerabilityProbability\n                  )}>\n                  {translate('risk_exposure', hotspot.rule.vulnerabilityProbability)}\n                </div>\n              </div>\n              <div className=\"display-flex-center it__hs-assignee\">\n                <span className=\"big-spacer-right\">{translate('assignee')}</span>\n                <div>\n                  <Assignee hotspot={hotspot} onAssigneeChange={props.onUpdateHotspot} />\n                </div>\n              </div>\n            </div>\n            <div className=\"huge-spacer-left abs-width-400\">\n              <Status\n                hotspot={hotspot}\n                onStatusChange={statusOption => props.onUpdateHotspot(true, statusOption)}\n              />\n            </div>\n          </div>\n\n          <HotspotSnippetContainer\n            branchLike={fillBranchLike(hotspot.project.branch, hotspot.project.pullRequest)}\n            component={component}\n            hotspot={hotspot}\n          />\n          <HotspotViewerTabs hotspot={hotspot} />\n          <HotspotReviewHistoryAndComments\n            commentTextRef={commentTextRef}\n            currentUser={currentUser}\n            hotspot={hotspot}\n            onCommentUpdate={props.onUpdateHotspot}\n          />\n        </div>\n      )}\n    </DeferredSpinner>\n  );\n}\n\nexport default withCurrentUser(HotspotViewerRenderer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { getSecurityHotspotDetails } from '../../../api/security-hotspots';\nimport { scrollToElement } from '../../../helpers/scrolling';\nimport { BranchLike } from '../../../types/branch-like';\nimport {\n  Hotspot,\n  HotspotStatusFilter,\n  HotspotStatusOption\n} from '../../../types/security-hotspots';\nimport { getStatusFilterFromStatusOption } from '../utils';\nimport HotspotViewerRenderer from './HotspotViewerRenderer';\n\ninterface Props {\n  branchLike?: BranchLike;\n  component: T.Component;\n  hotspotKey: string;\n  hotspotsReviewedMeasure?: string;\n  onSwitchStatusFilter: (option: HotspotStatusFilter) => void;\n  onUpdateHotspot: (hotspotKey: string) => Promise<void>;\n  securityCategories: T.StandardSecurityCategories;\n}\n\ninterface State {\n  hotspot?: Hotspot;\n  lastStatusChangedTo?: HotspotStatusOption;\n  loading: boolean;\n  showStatusUpdateSuccessModal: boolean;\n}\n\nconst SCROLL_TO_COMMENT_BOTTOM_OFFSET = 300;\n\nexport default class HotspotViewer extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State;\n  commentTextRef: React.RefObject<HTMLTextAreaElement>;\n\n  constructor(props: Props) {\n    super(props);\n    this.commentTextRef = React.createRef<HTMLTextAreaElement>();\n    this.state = { loading: false, showStatusUpdateSuccessModal: false };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchHotspot();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.hotspotKey !== this.props.hotspotKey) {\n      this.fetchHotspot();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchHotspot = () => {\n    this.setState({ loading: true });\n    return getSecurityHotspotDetails(this.props.hotspotKey)\n      .then(hotspot => {\n        if (this.mounted) {\n          this.setState({ hotspot, loading: false });\n        }\n        return hotspot;\n      })\n      .catch(() => this.mounted && this.setState({ loading: false }));\n  };\n\n  handleHotspotUpdate = async (statusUpdate = false, statusOption?: HotspotStatusOption) => {\n    const { hotspotKey } = this.props;\n\n    if (statusUpdate) {\n      this.setState({ lastStatusChangedTo: statusOption, showStatusUpdateSuccessModal: true });\n      await this.props.onUpdateHotspot(hotspotKey);\n    } else {\n      await this.fetchHotspot();\n    }\n  };\n\n  handleScrollToCommentForm = () => {\n    if (this.commentTextRef.current) {\n      this.commentTextRef.current.focus({ preventScroll: true });\n      scrollToElement(this.commentTextRef.current, {\n        bottomOffset: SCROLL_TO_COMMENT_BOTTOM_OFFSET\n      });\n    }\n  };\n\n  handleSwitchFilterToStatusOfUpdatedHotspot = () => {\n    const { lastStatusChangedTo } = this.state;\n    if (lastStatusChangedTo) {\n      this.props.onSwitchStatusFilter(getStatusFilterFromStatusOption(lastStatusChangedTo));\n    }\n  };\n\n  handleCloseStatusUpdateSuccessModal = () => {\n    this.setState({ showStatusUpdateSuccessModal: false });\n  };\n\n  render() {\n    const { branchLike, component, hotspotsReviewedMeasure, securityCategories } = this.props;\n    const { hotspot, lastStatusChangedTo, loading, showStatusUpdateSuccessModal } = this.state;\n\n    return (\n      <HotspotViewerRenderer\n        branchLike={branchLike}\n        component={component}\n        commentTextRef={this.commentTextRef}\n        hotspot={hotspot}\n        hotspotsReviewedMeasure={hotspotsReviewedMeasure}\n        lastStatusChangedTo={lastStatusChangedTo}\n        loading={loading}\n        onCloseStatusUpdateSuccessModal={this.handleCloseStatusUpdateSuccessModal}\n        onSwitchFilterToStatusOfUpdatedHotspot={this.handleSwitchFilterToStatusOfUpdatedHotspot}\n        onShowCommentForm={this.handleScrollToCommentForm}\n        onUpdateHotspot={this.handleHotspotUpdate}\n        showStatusUpdateSuccessModal={showStatusUpdateSuccessModal}\n        securityCategories={securityCategories}\n      />\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget';\nimport Suggestions from '../../app/components/embed-docs-modal/Suggestions';\nimport ScreenPositionHelper from '../../components/common/ScreenPositionHelper';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { isBranch } from '../../helpers/branch-like';\nimport { translate } from '../../helpers/l10n';\nimport { scrollToElement } from '../../helpers/scrolling';\nimport { BranchLike } from '../../types/branch-like';\nimport { SecurityStandard, Standards } from '../../types/security';\nimport { HotspotFilters, HotspotStatusFilter, RawHotspot } from '../../types/security-hotspots';\nimport EmptyHotspotsPage from './components/EmptyHotspotsPage';\nimport FilterBar from './components/FilterBar';\nimport HotspotList from './components/HotspotList';\nimport HotspotSimpleList from './components/HotspotSimpleList';\nimport HotspotViewer from './components/HotspotViewer';\nimport './styles.css';\n\nexport interface SecurityHotspotsAppRendererProps {\n  branchLike?: BranchLike;\n  component: T.Component;\n  filterByCategory?: {\n    standard: SecurityStandard;\n    category: string;\n  };\n  filterByCWE?: string;\n  filterByFile?: string;\n  filters: HotspotFilters;\n  hotspots: RawHotspot[];\n  hotspotsReviewedMeasure?: string;\n  hotspotsTotal: number;\n  isStaticListOfHotspots: boolean;\n  loading: boolean;\n  loadingMeasure: boolean;\n  loadingMore: boolean;\n  onChangeFilters: (filters: Partial<HotspotFilters>) => void;\n  onHotspotClick: (hotspot: RawHotspot) => void;\n  onLoadMore: () => void;\n  onShowAllHotspots: () => void;\n  onSwitchStatusFilter: (option: HotspotStatusFilter) => void;\n  onUpdateHotspot: (hotspotKey: string) => Promise<void>;\n  selectedHotspot: RawHotspot | undefined;\n  securityCategories: T.StandardSecurityCategories;\n  standards: Standards;\n}\n\nexport default function SecurityHotspotsAppRenderer(props: SecurityHotspotsAppRendererProps) {\n  const {\n    branchLike,\n    component,\n    filterByCategory,\n    filterByCWE,\n    filterByFile,\n    filters,\n    hotspots,\n    hotspotsReviewedMeasure,\n    hotspotsTotal,\n    isStaticListOfHotspots,\n    loading,\n    loadingMeasure,\n    loadingMore,\n    securityCategories,\n    selectedHotspot,\n    standards\n  } = props;\n\n  const scrollableRef = React.useRef(null);\n\n  React.useEffect(() => {\n    const parent = scrollableRef.current;\n    const element =\n      selectedHotspot && document.querySelector(`[data-hotspot-key=\"${selectedHotspot.key}\"]`);\n    if (parent && element) {\n      scrollToElement(element, { parent, smooth: true, topOffset: 100, bottomOffset: 100 });\n    }\n  }, [selectedHotspot]);\n\n  return (\n    <div id=\"security_hotspots\">\n      <Suggestions suggestions=\"security_hotspots\" />\n      <Helmet title={translate('hotspots.page')} />\n      <A11ySkipTarget anchor=\"security_hotspots_main\" />\n\n      <FilterBar\n        component={component}\n        filters={filters}\n        hotspotsReviewedMeasure={hotspotsReviewedMeasure}\n        isStaticListOfHotspots={isStaticListOfHotspots}\n        loadingMeasure={loadingMeasure}\n        onBranch={isBranch(branchLike)}\n        onChangeFilters={props.onChangeFilters}\n        onShowAllHotspots={props.onShowAllHotspots}\n      />\n\n      {loading && (\n        <div className=\"layout-page\">\n          <div className=\"layout-page-side-inner\">\n            <DeferredSpinner className=\"big-spacer-top\" />\n          </div>\n        </div>\n      )}\n\n      {!loading &&\n        (hotspots.length === 0 || !selectedHotspot ? (\n          <EmptyHotspotsPage\n            filtered={\n              filters.assignedToMe ||\n              (isBranch(branchLike) && filters.sinceLeakPeriod) ||\n              filters.status !== HotspotStatusFilter.TO_REVIEW\n            }\n            filterByFile={Boolean(filterByFile)}\n            isStaticListOfHotspots={isStaticListOfHotspots}\n          />\n        ) : (\n          <div className=\"layout-page\">\n            <ScreenPositionHelper className=\"layout-page-side-outer\">\n              {({ top }) => (\n                <div className=\"layout-page-side\" ref={scrollableRef} style={{ top }}>\n                  <div className=\"layout-page-side-inner\">\n                    {filterByCategory || filterByCWE || filterByFile ? (\n                      <HotspotSimpleList\n                        filterByCategory={filterByCategory}\n                        filterByCWE={filterByCWE}\n                        filterByFile={filterByFile}\n                        hotspots={hotspots}\n                        hotspotsTotal={hotspotsTotal}\n                        loadingMore={loadingMore}\n                        onHotspotClick={props.onHotspotClick}\n                        onLoadMore={props.onLoadMore}\n                        selectedHotspot={selectedHotspot}\n                        standards={standards}\n                      />\n                    ) : (\n                      <HotspotList\n                        hotspots={hotspots}\n                        hotspotsTotal={hotspotsTotal}\n                        isStaticListOfHotspots={isStaticListOfHotspots}\n                        loadingMore={loadingMore}\n                        onHotspotClick={props.onHotspotClick}\n                        onLoadMore={props.onLoadMore}\n                        securityCategories={securityCategories}\n                        selectedHotspot={selectedHotspot}\n                        statusFilter={filters.status}\n                      />\n                    )}\n                  </div>\n                </div>\n              )}\n            </ScreenPositionHelper>\n\n            <div className=\"layout-page-main\">\n              <HotspotViewer\n                branchLike={branchLike}\n                component={component}\n                hotspotKey={selectedHotspot.key}\n                hotspotsReviewedMeasure={hotspotsReviewedMeasure}\n                onSwitchStatusFilter={props.onSwitchStatusFilter}\n                onUpdateHotspot={props.onUpdateHotspot}\n                securityCategories={securityCategories}\n              />\n            </div>\n          </div>\n        ))}\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport key from 'keymaster';\nimport { flatMap, range } from 'lodash';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getMeasures } from '../../api/measures';\nimport { getSecurityHotspotList, getSecurityHotspots } from '../../api/security-hotspots';\nimport { withCurrentUser } from '../../components/hoc/withCurrentUser';\nimport { Router } from '../../components/hoc/withRouter';\nimport { getLeakValue } from '../../components/measure/utils';\nimport { getBranchLikeQuery, isPullRequest, isSameBranchLike } from '../../helpers/branch-like';\nimport { getStandards } from '../../helpers/security-standard';\nimport { isLoggedIn } from '../../helpers/users';\nimport { fetchBranchStatus } from '../../store/rootActions';\nimport { BranchLike } from '../../types/branch-like';\nimport { SecurityStandard, Standards } from '../../types/security';\nimport {\n  HotspotFilters,\n  HotspotResolution,\n  HotspotStatus,\n  HotspotStatusFilter,\n  RawHotspot\n} from '../../types/security-hotspots';\nimport SecurityHotspotsAppRenderer from './SecurityHotspotsAppRenderer';\nimport './styles.css';\nimport { SECURITY_STANDARDS } from './utils';\n\nconst HOTSPOT_KEYMASTER_SCOPE = 'hotspots-list';\nconst PAGE_SIZE = 500;\ninterface DispatchProps {\n  fetchBranchStatus: (branchLike: BranchLike, projectKey: string) => void;\n}\n\ninterface OwnProps {\n  branchLike?: BranchLike;\n  currentUser: T.CurrentUser;\n  component: T.Component;\n  location: Location;\n  router: Router;\n}\n\ntype Props = DispatchProps & OwnProps;\n\ninterface State {\n  filterByCategory?: { standard: SecurityStandard; category: string };\n  filterByCWE?: string;\n  filterByFile?: string;\n  filters: HotspotFilters;\n  hotspotKeys?: string[];\n  hotspots: RawHotspot[];\n  hotspotsPageIndex: number;\n  hotspotsReviewedMeasure?: string;\n  hotspotsTotal: number;\n  loading: boolean;\n  loadingMeasure: boolean;\n  loadingMore: boolean;\n  selectedHotspot: RawHotspot | undefined;\n  standards: Standards;\n}\n\nexport class SecurityHotspotsApp extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      loading: true,\n      loadingMeasure: false,\n      loadingMore: false,\n      hotspots: [],\n      hotspotsTotal: 0,\n      hotspotsPageIndex: 1,\n      selectedHotspot: undefined,\n      standards: {\n        [SecurityStandard.OWASP_TOP10]: {},\n        [SecurityStandard.SANS_TOP25]: {},\n        [SecurityStandard.SONARSOURCE]: {},\n        [SecurityStandard.CWE]: {}\n      },\n      filters: {\n        ...this.constructFiltersFromProps(props),\n        status: HotspotStatusFilter.TO_REVIEW\n      }\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchInitialData();\n    this.registerKeyboardEvents();\n  }\n\n  componentDidUpdate(previous: Props) {\n    if (\n      this.props.component.key !== previous.component.key ||\n      this.props.location.query.hotspots !== previous.location.query.hotspots ||\n      SECURITY_STANDARDS.some(s => this.props.location.query[s] !== previous.location.query[s]) ||\n      this.props.location.query.file !== previous.location.query.file\n    ) {\n      this.fetchInitialData();\n    }\n\n    if (\n      !isSameBranchLike(this.props.branchLike, previous.branchLike) ||\n      isLoggedIn(this.props.currentUser) !== isLoggedIn(previous.currentUser) ||\n      this.props.location.query.assignedToMe !== previous.location.query.assignedToMe ||\n      this.props.location.query.sinceLeakPeriod !== previous.location.query.sinceLeakPeriod\n    ) {\n      this.setState(({ filters }) => ({\n        filters: { ...this.constructFiltersFromProps, ...filters }\n      }));\n    }\n  }\n\n  componentWillUnmount() {\n    this.unregisterKeyboardEvents();\n    this.mounted = false;\n  }\n\n  registerKeyboardEvents() {\n    key.setScope(HOTSPOT_KEYMASTER_SCOPE);\n    key('up', HOTSPOT_KEYMASTER_SCOPE, () => {\n      this.selectNeighboringHotspot(-1);\n      return false;\n    });\n    key('down', HOTSPOT_KEYMASTER_SCOPE, () => {\n      this.selectNeighboringHotspot(+1);\n      return false;\n    });\n  }\n\n  selectNeighboringHotspot = (shift: number) => {\n    this.setState(({ hotspots, selectedHotspot }) => {\n      const index = selectedHotspot && hotspots.findIndex(h => h.key === selectedHotspot.key);\n\n      if (index !== undefined && index > -1) {\n        const newIndex = Math.max(0, Math.min(hotspots.length - 1, index + shift));\n        return {\n          selectedHotspot: hotspots[newIndex]\n        };\n      }\n\n      return { selectedHotspot };\n    });\n  };\n\n  unregisterKeyboardEvents() {\n    key.deleteScope(HOTSPOT_KEYMASTER_SCOPE);\n  }\n\n  constructFiltersFromProps(\n    props: Props\n  ): Pick<HotspotFilters, 'assignedToMe' | 'sinceLeakPeriod'> {\n    return {\n      assignedToMe: props.location.query.assignedToMe === 'true' && isLoggedIn(props.currentUser),\n      sinceLeakPeriod:\n        isPullRequest(props.branchLike) || props.location.query.sinceLeakPeriod === 'true'\n    };\n  }\n\n  handleCallFailure = () => {\n    if (this.mounted) {\n      this.setState({ loading: false, loadingMore: false });\n    }\n  };\n\n  fetchInitialData() {\n    return Promise.all([\n      getStandards(),\n      this.fetchSecurityHotspots(),\n      this.fetchSecurityHotspotsReviewed()\n    ])\n      .then(([standards, { hotspots, paging }]) => {\n        if (!this.mounted) {\n          return;\n        }\n\n        const selectedHotspot = hotspots.length > 0 ? hotspots[0] : undefined;\n\n        this.setState({\n          hotspots,\n          hotspotsTotal: paging.total,\n          loading: false,\n          selectedHotspot,\n          standards\n        });\n      })\n      .catch(this.handleCallFailure);\n  }\n\n  fetchSecurityHotspotsReviewed = () => {\n    const { branchLike, component } = this.props;\n    const { filters } = this.state;\n\n    const reviewedHotspotsMetricKey = filters.sinceLeakPeriod\n      ? 'new_security_hotspots_reviewed'\n      : 'security_hotspots_reviewed';\n\n    this.setState({ loadingMeasure: true });\n    return getMeasures({\n      component: component.key,\n      metricKeys: reviewedHotspotsMetricKey,\n      ...getBranchLikeQuery(branchLike)\n    })\n      .then(measures => {\n        if (!this.mounted) {\n          return;\n        }\n        const measure = measures && measures.length > 0 ? measures[0] : undefined;\n        const hotspotsReviewedMeasure = filters.sinceLeakPeriod\n          ? getLeakValue(measure)\n          : measure?.value;\n\n        this.setState({ hotspotsReviewedMeasure, loadingMeasure: false });\n      })\n      .catch(() => {\n        if (this.mounted) {\n          this.setState({ loadingMeasure: false });\n        }\n      });\n  };\n\n  fetchSecurityHotspots(page = 1) {\n    const { branchLike, component, location } = this.props;\n    const { filters } = this.state;\n\n    const hotspotKeys = location.query.hotspots\n      ? (location.query.hotspots as string).split(',')\n      : undefined;\n\n    const standard = SECURITY_STANDARDS.find(\n      stnd => stnd !== SecurityStandard.CWE && location.query[stnd] !== undefined\n    );\n    const filterByCategory = standard\n      ? { standard, category: location.query[standard] }\n      : undefined;\n\n    const filterByCWE: string | undefined = location.query.cwe;\n\n    const filterByFile: string | undefined = location.query.file;\n\n    this.setState({ filterByCategory, filterByCWE, filterByFile, hotspotKeys });\n\n    if (hotspotKeys && hotspotKeys.length > 0) {\n      return getSecurityHotspotList(hotspotKeys, {\n        projectKey: component.key,\n        ...getBranchLikeQuery(branchLike)\n      });\n    }\n\n    if (filterByCategory || filterByCWE || filterByFile) {\n      const hotspotFilters: T.Dict<string> = {};\n\n      if (filterByCategory) {\n        hotspotFilters[filterByCategory.standard] = filterByCategory.category;\n      }\n      if (filterByCWE) {\n        hotspotFilters[SecurityStandard.CWE] = filterByCWE;\n      }\n      if (filterByFile) {\n        hotspotFilters.files = filterByFile;\n      }\n\n      return getSecurityHotspots({\n        ...hotspotFilters,\n        projectKey: component.key,\n        p: page,\n        ps: PAGE_SIZE,\n        status: HotspotStatus.TO_REVIEW, // we're only interested in unresolved hotspots\n        sinceLeakPeriod: filters.sinceLeakPeriod && Boolean(filterByFile), // only add leak period when filtering by file\n        ...getBranchLikeQuery(branchLike)\n      });\n    }\n\n    const status =\n      filters.status === HotspotStatusFilter.TO_REVIEW\n        ? HotspotStatus.TO_REVIEW\n        : HotspotStatus.REVIEWED;\n\n    const resolution =\n      filters.status === HotspotStatusFilter.TO_REVIEW\n        ? undefined\n        : HotspotResolution[filters.status];\n\n    return getSecurityHotspots({\n      projectKey: component.key,\n      p: page,\n      ps: PAGE_SIZE,\n      status,\n      resolution,\n      onlyMine: filters.assignedToMe,\n      sinceLeakPeriod: filters.sinceLeakPeriod,\n      ...getBranchLikeQuery(branchLike)\n    });\n  }\n\n  reloadSecurityHotspotList = () => {\n    this.setState({ loading: true });\n\n    return this.fetchSecurityHotspots()\n      .then(({ hotspots, paging }) => {\n        if (!this.mounted) {\n          return;\n        }\n\n        this.setState({\n          hotspots,\n          hotspotsPageIndex: 1,\n          hotspotsTotal: paging.total,\n          loading: false,\n          selectedHotspot: hotspots.length > 0 ? hotspots[0] : undefined\n        });\n      })\n      .catch(this.handleCallFailure);\n  };\n\n  handleChangeFilters = (changes: Partial<HotspotFilters>) => {\n    this.setState(\n      ({ filters }) => ({ filters: { ...filters, ...changes } }),\n      () => {\n        this.reloadSecurityHotspotList();\n        if (changes.sinceLeakPeriod !== undefined) {\n          this.fetchSecurityHotspotsReviewed();\n        }\n      }\n    );\n  };\n\n  handleChangeStatusFilter = (status: HotspotStatusFilter) => {\n    this.handleChangeFilters({ status });\n  };\n\n  handleHotspotClick = (selectedHotspot: RawHotspot) => this.setState({ selectedHotspot });\n\n  handleHotspotUpdate = (hotspotKey: string) => {\n    const { hotspots, hotspotsPageIndex } = this.state;\n    const { branchLike, component } = this.props;\n    const index = hotspots.findIndex(h => h.key === hotspotKey);\n\n    if (isPullRequest(branchLike)) {\n      this.props.fetchBranchStatus(branchLike, component.key);\n    }\n\n    return Promise.all(\n      range(hotspotsPageIndex).map(p => this.fetchSecurityHotspots(p + 1 /* pages are 1-indexed */))\n    )\n      .then(hotspotPages => {\n        const allHotspots = flatMap(hotspotPages, 'hotspots');\n\n        const { paging } = hotspotPages[hotspotPages.length - 1];\n\n        const nextHotspot = allHotspots[Math.min(index, allHotspots.length - 1)];\n\n        this.setState(({ selectedHotspot }) => ({\n          hotspots: allHotspots,\n          hotspotsPageIndex: paging.pageIndex,\n          hotspotsTotal: paging.total,\n          selectedHotspot: selectedHotspot?.key === hotspotKey ? nextHotspot : selectedHotspot\n        }));\n      })\n      .then(this.fetchSecurityHotspotsReviewed);\n  };\n\n  handleShowAllHotspots = () => {\n    this.props.router.push({\n      ...this.props.location,\n      query: {\n        ...this.props.location.query,\n        hotspots: undefined,\n        [SecurityStandard.CWE]: undefined,\n        [SecurityStandard.OWASP_TOP10]: undefined,\n        [SecurityStandard.SANS_TOP25]: undefined,\n        [SecurityStandard.SONARSOURCE]: undefined,\n        file: undefined\n      }\n    });\n  };\n\n  handleLoadMore = () => {\n    const { hotspots, hotspotsPageIndex: hotspotPages } = this.state;\n\n    this.setState({ loadingMore: true });\n\n    return this.fetchSecurityHotspots(hotspotPages + 1)\n      .then(({ hotspots: additionalHotspots }) => {\n        if (!this.mounted) {\n          return;\n        }\n\n        this.setState({\n          hotspots: [...hotspots, ...additionalHotspots],\n          hotspotsPageIndex: hotspotPages + 1,\n          loadingMore: false\n        });\n      })\n      .catch(this.handleCallFailure);\n  };\n\n  render() {\n    const { branchLike, component } = this.props;\n    const {\n      filterByCategory,\n      filterByCWE,\n      filterByFile,\n      filters,\n      hotspotKeys,\n      hotspots,\n      hotspotsReviewedMeasure,\n      hotspotsTotal,\n      loading,\n      loadingMeasure,\n      loadingMore,\n      selectedHotspot,\n      standards\n    } = this.state;\n\n    return (\n      <SecurityHotspotsAppRenderer\n        branchLike={branchLike}\n        component={component}\n        filters={filters}\n        filterByCategory={filterByCategory}\n        filterByCWE={filterByCWE}\n        filterByFile={filterByFile}\n        hotspots={hotspots}\n        hotspotsReviewedMeasure={hotspotsReviewedMeasure}\n        hotspotsTotal={hotspotsTotal}\n        isStaticListOfHotspots={Boolean(\n          (hotspotKeys && hotspotKeys.length > 0) || filterByCategory || filterByCWE || filterByFile\n        )}\n        loading={loading}\n        loadingMeasure={loadingMeasure}\n        loadingMore={loadingMore}\n        onChangeFilters={this.handleChangeFilters}\n        onHotspotClick={this.handleHotspotClick}\n        onLoadMore={this.handleLoadMore}\n        onShowAllHotspots={this.handleShowAllHotspots}\n        onSwitchStatusFilter={this.handleChangeStatusFilter}\n        onUpdateHotspot={this.handleHotspotUpdate}\n        securityCategories={standards[SecurityStandard.SONARSOURCE]}\n        selectedHotspot={selectedHotspot}\n        standards={standards}\n      />\n    );\n  }\n}\n\nconst mapDispatchToProps = { fetchBranchStatus };\n\nexport default withCurrentUser(connect(null, mapDispatchToProps)(SecurityHotspotsApp));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { BranchLike } from '../../types/branch-like';\nimport handleRequiredAuthorization from '../utils/handleRequiredAuthorization';\nimport A11ySkipTarget from './a11y/A11ySkipTarget';\n\ninterface Props {\n  children: JSX.Element;\n  branchLike?: BranchLike;\n  branchLikes: BranchLike[];\n  component: T.Component;\n  isInProgress?: boolean;\n  isPending?: boolean;\n  onBranchesChange: () => void;\n  onComponentChange: (changes: {}) => void;\n}\n\nexport default class ProjectAdminContainer extends React.PureComponent<Props> {\n  componentDidMount() {\n    this.checkPermissions();\n  }\n\n  componentDidUpdate() {\n    this.checkPermissions();\n  }\n\n  checkPermissions() {\n    if (!this.isProjectAdmin()) {\n      handleRequiredAuthorization();\n    }\n  }\n\n  isProjectAdmin() {\n    const { configuration } = this.props.component;\n    return configuration != null && configuration.showSettings;\n  }\n\n  render() {\n    if (!this.isProjectAdmin()) {\n      return null;\n    }\n\n    const { children, ...props } = this.props;\n    return (\n      <>\n        <A11ySkipTarget anchor=\"admin_main\" />\n        {React.cloneElement(children, props)}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { Location } from 'history';\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { addGlobalErrorMessage } from '../../../store/globalMessages';\nimport NotFound from '../NotFound';\nimport Extension from './Extension';\n\nexport interface ProjectAdminPageExtensionProps {\n  component: T.Component;\n  location: Location;\n  params: { extensionKey: string; pluginKey: string };\n}\n\nexport function ProjectAdminPageExtension(props: ProjectAdminPageExtensionProps) {\n  const {\n    component,\n    params: { extensionKey, pluginKey }\n  } = props;\n\n  const extension =\n    component.configuration &&\n    (component.configuration.extensions || []).find(p => p.key === `${pluginKey}/${extensionKey}`);\n\n  return extension ? (\n    <Extension extension={extension} options={{ component }} />\n  ) : (\n    <NotFound withContainer={false} />\n  );\n}\n\nconst mapDispatchToProps = { onFail: addGlobalErrorMessage };\n\nexport default connect(null, mapDispatchToProps)(ProjectAdminPageExtension);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { deleteApplication } from '../../api/application';\nimport { deletePortfolio, deleteProject } from '../../api/components';\nimport addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage';\nimport { Button } from '../../components/controls/buttons';\nimport ConfirmButton from '../../components/controls/ConfirmButton';\nimport { Router, withRouter } from '../../components/hoc/withRouter';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { isApplication, isPortfolioLike } from '../../types/component';\n\ninterface Props {\n  component: Pick<T.Component, 'key' | 'name' | 'qualifier'>;\n  router: Pick<Router, 'replace'>;\n}\n\nexport class Form extends React.PureComponent<Props> {\n  handleDelete = async () => {\n    const { component } = this.props;\n    let deleteMethod = deleteProject;\n    let redirectTo = '/';\n    if (isPortfolioLike(component.qualifier)) {\n      deleteMethod = deletePortfolio;\n      redirectTo = '/portfolios';\n    } else if (isApplication(component.qualifier)) {\n      deleteMethod = deleteApplication;\n    }\n\n    await deleteMethod(component.key);\n\n    addGlobalSuccessMessage(\n      translateWithParameters('project_deletion.resource_deleted', component.name)\n    );\n    this.props.router.replace(redirectTo);\n  };\n\n  render() {\n    const { component } = this.props;\n    return (\n      <ConfirmButton\n        confirmButtonText={translate('delete')}\n        isDestructive={true}\n        modalBody={translateWithParameters(\n          'project_deletion.delete_resource_confirmation',\n          component.name\n        )}\n        modalHeader={translate('qualifier.delete', component.qualifier)}\n        onConfirm={this.handleDelete}>\n        {({ onClick }) => (\n          <Button className=\"button-red\" id=\"delete-project\" onClick={onClick}>\n            {translate('delete')}\n          </Button>\n        )}\n      </ConfirmButton>\n    );\n  }\n}\n\nexport default withRouter(Form);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  component: Pick<T.Component, 'qualifier'>;\n}\n\nexport default function Header(props: Props) {\n  const { qualifier } = props.component;\n  let description: string;\n  if (['VW', 'SVW'].includes(qualifier)) {\n    description = translate('portfolio_deletion.page.description');\n  } else if (qualifier === 'APP') {\n    description = translate('application_deletion.page.description');\n  } else {\n    description = translate('project_deletion.page.description');\n  }\n\n  return (\n    <header className=\"page-header\">\n      <h1 className=\"page-title\">{translate('deletion.page')}</h1>\n      <div className=\"page-description\">{description}</div>\n    </header>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { translate } from '../../helpers/l10n';\nimport Form from './Form';\nimport Header from './Header';\n\ninterface Props {\n  component: Pick<T.Component, 'key' | 'name' | 'qualifier'>;\n}\n\nexport default function App(props: Props) {\n  return (\n    <div className=\"page page-limited\">\n      <Helmet defer={false} title={translate('deletion.page')} />\n      <Header component={props.component} />\n      <Form component={props.component} />\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';\nimport SimpleModal from '../../components/controls/SimpleModal';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../helpers/l10n';\n\ninterface Props {\n  onClose: () => void;\n  onSubmit: (name: string, url: string) => Promise<void>;\n}\n\ninterface State {\n  name: string;\n  url: string;\n}\n\nexport default class CreationModal extends React.PureComponent<Props, State> {\n  state: State = { name: '', url: '' };\n\n  handleSubmit = () => {\n    return this.props.onSubmit(this.state.name, this.state.url).then(this.props.onClose);\n  };\n\n  handleNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ name: event.currentTarget.value });\n  };\n\n  handleUrlChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    this.setState({ url: event.currentTarget.value });\n  };\n\n  render() {\n    const header = translate('project_links.create_new_project_link');\n\n    return (\n      <SimpleModal\n        header={header}\n        onClose={this.props.onClose}\n        onSubmit={this.handleSubmit}\n        size=\"small\">\n        {({ onCloseClick, onFormSubmit, submitting }) => (\n          <form onSubmit={onFormSubmit}>\n            <header className=\"modal-head\">\n              <h2>{header}</h2>\n            </header>\n\n            <div className=\"modal-body\">\n              <MandatoryFieldsExplanation className=\"modal-field\" />\n\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-link-name\">\n                  {translate('project_links.name')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  autoFocus={true}\n                  id=\"create-link-name\"\n                  maxLength={128}\n                  name=\"name\"\n                  onChange={this.handleNameChange}\n                  required={true}\n                  type=\"text\"\n                  value={this.state.name}\n                />\n              </div>\n\n              <div className=\"modal-field\">\n                <label htmlFor=\"create-link-url\">\n                  {translate('project_links.url')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  id=\"create-link-url\"\n                  maxLength={128}\n                  name=\"url\"\n                  onChange={this.handleUrlChange}\n                  required={true}\n                  type=\"text\"\n                  value={this.state.url}\n                />\n              </div>\n            </div>\n\n            <footer className=\"modal-foot\">\n              <DeferredSpinner className=\"spacer-right\" loading={submitting} />\n              <SubmitButton disabled={submitting} id=\"create-link-confirm\">\n                {translate('create')}\n              </SubmitButton>\n              <ResetButtonLink disabled={submitting} onClick={onCloseClick}>\n                {translate('cancel')}\n              </ResetButtonLink>\n            </footer>\n          </form>\n        )}\n      </SimpleModal>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Button } from '../../components/controls/buttons';\nimport { translate } from '../../helpers/l10n';\nimport CreationModal from './CreationModal';\n\ninterface Props {\n  onCreate: (name: string, url: string) => Promise<void>;\n}\n\ninterface State {\n  creationModal: boolean;\n}\n\nexport default class Header extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { creationModal: false };\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handleCreateClick = () => {\n    this.setState({ creationModal: true });\n  };\n\n  handleCreationModalClose = () => {\n    if (this.mounted) {\n      this.setState({ creationModal: false });\n    }\n  };\n\n  render() {\n    return (\n      <>\n        <header className=\"page-header\">\n          <h1 className=\"page-title\">{translate('project_links.page')}</h1>\n          <div className=\"page-actions\">\n            <Button id=\"create-project-link\" onClick={this.handleCreateClick}>\n              {translate('create')}\n            </Button>\n          </div>\n          <div className=\"page-description\">{translate('project_links.page.description')}</div>\n        </header>\n        {this.state.creationModal && (\n          <CreationModal onClose={this.handleCreationModalClose} onSubmit={this.props.onCreate} />\n        )}\n      </>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport isValidUri from '../../app/utils/isValidUri';\nimport { Button } from '../../components/controls/buttons';\nimport ConfirmButton from '../../components/controls/ConfirmButton';\nimport ProjectLinkIcon from '../../components/icons/ProjectLinkIcon';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { getLinkName, isProvided } from '../../helpers/projectLinks';\n\ninterface Props {\n  link: T.ProjectLink;\n  onDelete: (linkId: string) => Promise<void>;\n}\n\nexport default class LinkRow extends React.PureComponent<Props> {\n  renderNameForProvided = (link: T.ProjectLink) => {\n    return (\n      <div className=\"display-inline-block text-top\">\n        <div>\n          <span className=\"js-name\">{getLinkName(link)}</span>\n        </div>\n        <div className=\"note little-spacer-top\">\n          <span className=\"js-type\">{`sonar.links.${link.type}`}</span>\n        </div>\n      </div>\n    );\n  };\n\n  renderName = (link: T.ProjectLink) => {\n    return (\n      <div>\n        <ProjectLinkIcon className=\"little-spacer-right\" type={link.type} />\n        {isProvided(link) ? (\n          this.renderNameForProvided(link)\n        ) : (\n          <div className=\"display-inline-block text-top\">\n            <span className=\"js-name\">{link.name}</span>\n          </div>\n        )}\n      </div>\n    );\n  };\n\n  renderDeleteButton = (link: T.ProjectLink) => {\n    if (isProvided(link)) {\n      return null;\n    }\n\n    return (\n      <ConfirmButton\n        confirmButtonText={translate('delete')}\n        confirmData={link.id}\n        isDestructive={true}\n        modalBody={translateWithParameters(\n          'project_links.are_you_sure_to_delete_x_link',\n          link.name!\n        )}\n        modalHeader={translate('project_links.delete_project_link')}\n        onConfirm={this.props.onDelete}>\n        {({ onClick }) => (\n          <Button className=\"button-red js-delete-button\" onClick={onClick}>\n            {translate('delete')}\n          </Button>\n        )}\n      </ConfirmButton>\n    );\n  };\n\n  render() {\n    const { link } = this.props;\n\n    return (\n      <tr data-name={link.name}>\n        <td className=\"nowrap\">{this.renderName(link)}</td>\n        <td className=\"nowrap js-url\">\n          {isValidUri(link.url) ? (\n            <a href={link.url} rel=\"nofollow noreferrer noopener\" target=\"_blank\">\n              {link.url}\n            </a>\n          ) : (\n            link.url\n          )}\n        </td>\n        <td className=\"thin nowrap\">{this.renderDeleteButton(link)}</td>\n      </tr>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { translate } from '../../helpers/l10n';\nimport { orderLinks } from '../../helpers/projectLinks';\nimport LinkRow from './LinkRow';\n\ninterface Props {\n  links: T.ProjectLink[];\n  onDelete: (linkId: string) => Promise<void>;\n}\n\nexport default class Table extends React.PureComponent<Props> {\n  renderHeader() {\n    // keep empty cell for actions\n    return (\n      <thead>\n        <tr>\n          <th className=\"nowrap\">{translate('project_links.name')}</th>\n          <th className=\"nowrap width-100\">{translate('project_links.url')}</th>\n          <th className=\"thin\">&nbsp;</th>\n        </tr>\n      </thead>\n    );\n  }\n\n  render() {\n    if (!this.props.links.length) {\n      return <div className=\"note\">{translate('no_results')}</div>;\n    }\n\n    const orderedLinks = orderLinks(this.props.links);\n\n    const linkRows = orderedLinks.map(link => (\n      <LinkRow key={link.id} link={link} onDelete={this.props.onDelete} />\n    ));\n\n    return (\n      <div className=\"boxed-group boxed-group-inner\">\n        <table className=\"data zebra\" id=\"project-links\">\n          {this.renderHeader()}\n          <tbody>{linkRows}</tbody>\n        </table>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { createLink, deleteLink, getProjectLinks } from '../../api/projectLinks';\nimport DeferredSpinner from '../../components/ui/DeferredSpinner';\nimport { translate } from '../../helpers/l10n';\nimport Header from './Header';\nimport Table from './Table';\n\ninterface Props {\n  component: Pick<T.Component, 'key'>;\n}\n\ninterface State {\n  links?: T.ProjectLink[];\n  loading: boolean;\n}\n\nexport default class App extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = { loading: true };\n\n  componentDidMount() {\n    this.mounted = true;\n    this.fetchLinks();\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    if (prevProps.component.key !== this.props.component.key) {\n      this.fetchLinks();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchLinks = () => {\n    this.setState({ loading: true });\n    getProjectLinks(this.props.component.key).then(\n      links => {\n        if (this.mounted) {\n          this.setState({ links, loading: false });\n        }\n      },\n      () => {\n        if (this.mounted) {\n          this.setState({ loading: false });\n        }\n      }\n    );\n  };\n\n  handleCreateLink = (name: string, url: string) => {\n    return createLink({ name, projectKey: this.props.component.key, url }).then(link => {\n      if (this.mounted) {\n        this.setState(({ links = [] }) => ({\n          links: [...links, link]\n        }));\n      }\n    });\n  };\n\n  handleDeleteLink = (linkId: string) => {\n    return deleteLink(linkId).then(() => {\n      if (this.mounted) {\n        this.setState(({ links = [] }) => ({\n          links: links.filter(link => link.id !== linkId)\n        }));\n      }\n    });\n  };\n\n  render() {\n    return (\n      <div className=\"page page-limited\">\n        <Helmet defer={false} title={translate('project_links.page')} />\n        <Header onCreate={this.handleCreateLink} />\n        <DeferredSpinner loading={this.state.loading}>\n          {this.state.links && <Table links={this.state.links} onDelete={this.handleDeleteLink} />}\n        </DeferredSpinner>\n      </div>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ProjectKeyInput from '../../components/common/ProjectKeyInput';\nimport { Button, SubmitButton } from '../../components/controls/buttons';\nimport ConfirmButton from '../../components/controls/ConfirmButton';\nimport MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation';\nimport { translate, translateWithParameters } from '../../helpers/l10n';\nimport { validateProjectKey } from '../../helpers/projects';\nimport { ProjectKeyValidationResult } from '../../types/component';\n\nexport interface UpdateFormProps {\n  component: Pick<T.Component, 'key' | 'name'>;\n  onKeyChange: (newKey: string) => Promise<void>;\n}\n\nexport default function UpdateForm(props: UpdateFormProps) {\n  const { component } = props;\n  const [newKey, setNewKey] = React.useState<string | undefined>(undefined);\n  const value = newKey !== undefined ? newKey : component.key;\n  const hasChanged = value !== component.key;\n\n  const validationResult = validateProjectKey(value);\n  const error =\n    validationResult === ProjectKeyValidationResult.Valid\n      ? undefined\n      : translate('onboarding.create_project.project_key.error', validationResult);\n\n  return (\n    <ConfirmButton\n      confirmButtonText={translate('update_verb')}\n      confirmData={newKey}\n      modalBody={\n        <>\n          {translateWithParameters('update_key.are_you_sure_to_change_key', component.name)}\n          <div className=\"spacer-top\">\n            {translate('update_key.old_key')}\n            {': '}\n            <strong>{component.key}</strong>\n          </div>\n          <div className=\"spacer-top\">\n            {translate('update_key.new_key')}\n            {': '}\n            <strong>{newKey}</strong>\n          </div>\n        </>\n      }\n      modalHeader={translate('update_key.page')}\n      onConfirm={props.onKeyChange}>\n      {({ onFormSubmit }) => (\n        <form onSubmit={onFormSubmit}>\n          <MandatoryFieldsExplanation className=\"spacer-bottom\" />\n\n          <ProjectKeyInput\n            error={error}\n            label={translate('update_key.new_key')}\n            onProjectKeyChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n              setNewKey(e.currentTarget.value);\n            }}\n            touched={hasChanged}\n            placeholder={translate('update_key.new_key')}\n            projectKey={value}\n            autofocus={true}\n          />\n\n          <div className=\"spacer-top\">\n            <SubmitButton disabled={!hasChanged || error !== undefined} id=\"update-key-submit\">\n              {translate('update_verb')}\n            </SubmitButton>\n\n            <Button\n              className=\"spacer-left\"\n              disabled={!hasChanged}\n              id=\"update-key-reset\"\n              onClick={() => {\n                setNewKey(undefined);\n              }}\n              type=\"reset\">\n              {translate('reset_verb')}\n            </Button>\n          </div>\n        </form>\n      )}\n    </ConfirmButton>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { withRouter, WithRouterProps } from 'react-router';\nimport { changeKey } from '../../api/components';\nimport RecentHistory from '../../app/components/RecentHistory';\nimport { translate } from '../../helpers/l10n';\nimport UpdateForm from './UpdateForm';\n\ninterface Props {\n  component: Pick<T.Component, 'key' | 'name'>;\n}\n\nexport class Key extends React.PureComponent<Props & WithRouterProps> {\n  handleChangeKey = (newKey: string) => {\n    return changeKey({ from: this.props.component.key, to: newKey }).then(() => {\n      RecentHistory.remove(this.props.component.key);\n      this.props.router.replace({ pathname: '/project/key', query: { id: newKey } });\n    });\n  };\n\n  render() {\n    const { component } = this.props;\n    return (\n      <div className=\"page page-limited\" id=\"project-key\">\n        <Helmet defer={false} title={translate('update_key.page')} />\n        <header className=\"page-header\">\n          <h1 className=\"page-title\">{translate('update_key.page')}</h1>\n          <div className=\"page-description\">{translate('update_key.page.description')}</div>\n        </header>\n        <UpdateForm component={component} onKeyChange={this.handleChangeKey} />\n      </div>\n    );\n  }\n}\n\nexport default withRouter(Key);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { cancelPendingPlugins } from '../../../../api/plugins';\nimport InstanceMessage from '../../../../components/common/InstanceMessage';\nimport RestartButton from '../../../../components/common/RestartButton';\nimport { Button } from '../../../../components/controls/buttons';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport { PendingPluginResult } from '../../../../types/plugins';\n\ninterface Props {\n  fetchSystemStatus: () => void;\n  pending: PendingPluginResult;\n  refreshPending: () => void;\n  systemStatus: T.SysStatus;\n}\n\nexport default class PendingPluginsActionNotif extends React.PureComponent<Props> {\n  handleRevert = () => {\n    cancelPendingPlugins().then(this.props.refreshPending, () => {});\n  };\n\n  render() {\n    const { installing, updating, removing } = this.props.pending;\n    const hasPendingActions = installing.length || updating.length || removing.length;\n    if (!hasPendingActions) {\n      return null;\n    }\n\n    return (\n      <Alert className=\"js-pending\" display=\"banner\" variant=\"info\">\n        <div className=\"display-flex-center\">\n          <span className=\"little-spacer-right\">\n            <InstanceMessage message={translate('marketplace.instance_needs_to_be_restarted_to')} />\n          </span>\n          {[\n            { length: installing.length, msg: 'marketplace.install_x_plugins' },\n            { length: updating.length, msg: 'marketplace.update_x_plugins' },\n            { length: removing.length, msg: 'marketplace.uninstall_x_plugins' }\n          ]\n            .filter(({ length }) => length > 0)\n            .map(({ length, msg }, idx) => (\n              <span key={msg}>\n                {idx > 0 && '; '}\n                <FormattedMessage\n                  defaultMessage={translate(msg)}\n                  id={msg}\n                  values={{ nb: <strong>{length}</strong> }}\n                />\n              </span>\n            ))}\n\n          <RestartButton\n            className=\"spacer-left\"\n            fetchSystemStatus={this.props.fetchSystemStatus}\n            systemStatus={this.props.systemStatus}\n          />\n          <Button className=\"spacer-left js-cancel-all\" onClick={this.handleRevert}>\n            {translate('marketplace.revert')}\n          </Button>\n        </div>\n      </Alert>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router';\nimport { Alert } from '../../../../components/ui/Alert';\nimport { translate } from '../../../../helpers/l10n';\nimport { getInstance } from '../../../../helpers/system';\n\nexport default function SystemRestartNotif() {\n  return (\n    <Alert display=\"banner\" variant=\"info\">\n      <FormattedMessage\n        defaultMessage={translate('system.instance_restarting')}\n        id=\"system.instance_restarting\"\n        values={{\n          instance: getInstance(),\n          link: (\n            <Link to={{ pathname: '/admin/background_tasks' }}>\n              {translate('background_tasks.page')}\n            </Link>\n          )\n        }}\n      />\n    </Alert>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { IndexLink, Link } from 'react-router';\nimport Dropdown from '../../../../components/controls/Dropdown';\nimport DropdownIcon from '../../../../components/icons/DropdownIcon';\nimport ContextNavBar from '../../../../components/ui/ContextNavBar';\nimport NavBarTabs from '../../../../components/ui/NavBarTabs';\nimport { translate } from '../../../../helpers/l10n';\nimport { getBaseUrl } from '../../../../helpers/system';\nimport { AdminPageExtension } from '../../../../types/extension';\nimport { PendingPluginResult } from '../../../../types/plugins';\nimport { rawSizes } from '../../../theme';\nimport PendingPluginsActionNotif from './PendingPluginsActionNotif';\nimport SystemRestartNotif from './SystemRestartNotif';\n\ninterface Props {\n  extensions: T.Extension[];\n  fetchPendingPlugins: () => void;\n  fetchSystemStatus: () => void;\n  location: {};\n  pendingPlugins: PendingPluginResult;\n  systemStatus: T.SysStatus;\n}\n\nexport default class SettingsNav extends React.PureComponent<Props> {\n  static defaultProps = {\n    extensions: []\n  };\n\n  isSomethingActive(urls: string[]): boolean {\n    const path = window.location.pathname;\n    return urls.some((url: string) => path.indexOf(getBaseUrl() + url) === 0);\n  }\n\n  isSecurityActive() {\n    const urls = [\n      '/admin/users',\n      '/admin/groups',\n      '/admin/permissions',\n      '/admin/permission_templates'\n    ];\n    return this.isSomethingActive(urls);\n  }\n\n  isProjectsActive() {\n    const urls = ['/admin/projects_management', '/admin/background_tasks'];\n    return this.isSomethingActive(urls);\n  }\n\n  isSystemActive() {\n    const urls = ['/admin/system'];\n    return this.isSomethingActive(urls);\n  }\n\n  isMarketplace() {\n    const urls = ['/admin/marketplace'];\n    return this.isSomethingActive(urls);\n  }\n\n  isAudit() {\n    const urls = ['/admin/audit'];\n    return this.isSomethingActive(urls);\n  }\n\n  renderExtension = ({ key, name }: T.Extension) => {\n    return (\n      <li key={key}>\n        <Link activeClassName=\"active\" to={`/admin/extension/${key}`}>\n          {name}\n        </Link>\n      </li>\n    );\n  };\n\n  renderConfigurationTab() {\n    const extensionsWithoutSupport = this.props.extensions.filter(\n      extension => extension.key !== 'license/support'\n    );\n    return (\n      <Dropdown\n        overlay={\n          <ul className=\"menu\">\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/settings\">\n                {translate('settings.page')}\n              </IndexLink>\n            </li>\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/settings/encryption\">\n                {translate('property.category.security.encryption')}\n              </IndexLink>\n            </li>\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/webhooks\">\n                {translate('webhooks.page')}\n              </IndexLink>\n            </li>\n            {extensionsWithoutSupport.map(this.renderExtension)}\n          </ul>\n        }\n        tagName=\"li\">\n        {({ onToggleClick, open }) => (\n          <a\n            aria-expanded={open}\n            aria-haspopup=\"menu\"\n            role=\"button\"\n            className={classNames('dropdown-toggle', {\n              active:\n                open ||\n                (!this.isSecurityActive() &&\n                  !this.isProjectsActive() &&\n                  !this.isSystemActive() &&\n                  !this.isSomethingActive(['/admin/extension/license/support']) &&\n                  !this.isMarketplace() &&\n                  !this.isAudit())\n            })}\n            href=\"#\"\n            id=\"settings-navigation-configuration\"\n            onClick={onToggleClick}>\n            {translate('sidebar.project_settings')}\n            <DropdownIcon className=\"little-spacer-left\" />\n          </a>\n        )}\n      </Dropdown>\n    );\n  }\n\n  renderProjectsTab() {\n    return (\n      <Dropdown\n        overlay={\n          <ul className=\"menu\">\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/projects_management\">\n                {translate('management')}\n              </IndexLink>\n            </li>\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/background_tasks\">\n                {translate('background_tasks.page')}\n              </IndexLink>\n            </li>\n          </ul>\n        }\n        tagName=\"li\">\n        {({ onToggleClick, open }) => (\n          <a\n            aria-expanded={open}\n            aria-haspopup=\"menu\"\n            role=\"button\"\n            className={classNames('dropdown-toggle', { active: open || this.isProjectsActive() })}\n            href=\"#\"\n            onClick={onToggleClick}>\n            {translate('sidebar.projects')}\n            <DropdownIcon className=\"little-spacer-left\" />\n          </a>\n        )}\n      </Dropdown>\n    );\n  }\n\n  renderSecurityTab() {\n    return (\n      <Dropdown\n        overlay={\n          <ul className=\"menu\">\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/users\">\n                {translate('users.page')}\n              </IndexLink>\n            </li>\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/groups\">\n                {translate('user_groups.page')}\n              </IndexLink>\n            </li>\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/permissions\">\n                {translate('global_permissions.page')}\n              </IndexLink>\n            </li>\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/permission_templates\">\n                {translate('permission_templates')}\n              </IndexLink>\n            </li>\n          </ul>\n        }\n        tagName=\"li\">\n        {({ onToggleClick, open }) => (\n          <a\n            aria-expanded={open}\n            aria-haspopup=\"menu\"\n            role=\"button\"\n            className={classNames('dropdown-toggle', { active: open || this.isSecurityActive() })}\n            href=\"#\"\n            onClick={onToggleClick}>\n            {translate('sidebar.security')}\n            <DropdownIcon className=\"little-spacer-left\" />\n          </a>\n        )}\n      </Dropdown>\n    );\n  }\n\n  render() {\n    const { extensions, pendingPlugins } = this.props;\n    const hasSupportExtension = extensions.find(extension => extension.key === 'license/support');\n    const hasGovernanceExtension = extensions.find(\n      e => e.key === AdminPageExtension.GovernanceConsole\n    );\n    const totalPendingPlugins =\n      pendingPlugins.installing.length +\n      pendingPlugins.removing.length +\n      pendingPlugins.updating.length;\n    const contextNavHeight = rawSizes.contextNavHeightRaw;\n    let notifComponent;\n    if (this.props.systemStatus === 'RESTARTING') {\n      notifComponent = <SystemRestartNotif />;\n    } else if (totalPendingPlugins > 0) {\n      notifComponent = (\n        <PendingPluginsActionNotif\n          fetchSystemStatus={this.props.fetchSystemStatus}\n          pending={pendingPlugins}\n          refreshPending={this.props.fetchPendingPlugins}\n          systemStatus={this.props.systemStatus}\n        />\n      );\n    }\n\n    return (\n      <ContextNavBar\n        height={notifComponent ? contextNavHeight + 30 : contextNavHeight}\n        id=\"context-navigation\"\n        notif={notifComponent}>\n        <header className=\"navbar-context-header\">\n          <h1>{translate('layout.settings')}</h1>\n        </header>\n\n        <NavBarTabs>\n          {this.renderConfigurationTab()}\n          {this.renderSecurityTab()}\n          {this.renderProjectsTab()}\n\n          <li>\n            <IndexLink activeClassName=\"active\" to=\"/admin/system\">\n              {translate('sidebar.system')}\n            </IndexLink>\n          </li>\n\n          <li>\n            <IndexLink activeClassName=\"active\" to=\"/admin/marketplace\">\n              {translate('marketplace.page')}\n            </IndexLink>\n          </li>\n\n          {hasGovernanceExtension && (\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/audit\">\n                {translate('audit_logs.page')}\n              </IndexLink>\n            </li>\n          )}\n\n          {hasSupportExtension && (\n            <li>\n              <IndexLink activeClassName=\"active\" to=\"/admin/extension/license/support\">\n                {translate('support')}\n              </IndexLink>\n            </li>\n          )}\n        </NavBarTabs>\n      </ContextNavBar>\n    );\n  }\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { connect } from 'react-redux';\nimport { getSettingsNavigation } from '../../api/nav';\nimport { getPendingPlugins } from '../../api/plugins';\nimport { getSystemStatus, waitSystemUPStatus } from '../../api/system';\nimport handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization';\nimport { translate } from '../../helpers/l10n';\nimport { setAdminPages } from '../../store/appState';\nimport { getAppState, Store } from '../../store/rootReducer';\nimport { PendingPluginResult } from '../../types/plugins';\nimport AdminContext, { defaultPendingPlugins, defaultSystemStatus } from './AdminContext';\nimport SettingsNav from './nav/settings/SettingsNav';\n\ninterface Props {\n  appState: Pick<T.AppState, 'adminPages' | 'canAdmin'>;\n  location: {};\n  setAdminPages: (adminPages: T.Extension[]) => void;\n}\n\ninterface State {\n  pendingPlugins: PendingPluginResult;\n  systemStatus: T.SysStatus;\n}\n\nexport class AdminContainer extends React.PureComponent<Props, State> {\n  mounted = false;\n  state: State = {\n    pendingPlugins: defaultPendingPlugins,\n    systemStatus: defaultSystemStatus\n  };\n\n  componentDidMount() {\n    this.mounted = true;\n    if (!this.props.appState.canAdmin) {\n      handleRequiredAuthorization();\n    } else {\n      this.fetchNavigationSettings();\n      this.fetchPendingPlugins();\n      this.fetchSystemStatus();\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  fetchNavigationSettings = () => {\n    getSettingsNavigation().then(\n      r => this.props.setAdminPages(r.extensions),\n      () => {}\n    );\n  };\n\n  fetchPendingPlugins = () => {\n    getPendingPlugins().then(\n      pendingPlugins => {\n        if (this.mounted) {\n          this.setState({ pendingPlugins });\n        }\n      },\n      () => {}\n    );\n  };\n\n  fetchSystemStatus = () => {\n    getSystemStatus().then(\n      ({ status }) => {\n        if (this.mounted) {\n          this.setState({ systemStatus: status });\n          if (status === 'RESTARTING') {\n            this.waitRestartingDone();\n          }\n        }\n      },\n      () => {}\n    );\n  };\n\n  waitRestartingDone = () => {\n    waitSystemUPStatus().then(\n      ({ status }) => {\n        if (this.mounted) {\n          this.setState({ systemStatus: status });\n          document.location.reload();\n        }\n      },\n      () => {}\n    );\n  };\n\n  render() {\n    const { adminPages } = this.props.appState;\n\n    // Check that the adminPages are loaded\n    if (!adminPages) {\n      return null;\n    }\n\n    const { pendingPlugins, systemStatus } = this.state;\n    const defaultTitle = translate('layout.settings');\n\n    return (\n      <div>\n        <Helmet defaultTitle={defaultTitle} defer={false} titleTemplate={`%s - ${defaultTitle}`} />\n        <SettingsNav\n          extensions={adminPages}\n          fetchPendingPlugins={this.fetchPendingPlugins}\n          fetchSystemStatus={this.fetchSystemStatus}\n          location={this.props.location}\n          pendingPlugins={pendingPlugins}\n          systemStatus={systemStatus}\n        />\n        <AdminContext.Provider\n          value={{\n            fetchSystemStatus: this.fetchSystemStatus,\n            fetchPendingPlugins: this.fetchPendingPlugins,\n            pendingPlugins,\n            systemStatus\n          }}>\n          {this.props.children}\n        </AdminContext.Provider>\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: Store) => ({ appState: getAppState(state) });\n\nconst mapDispatchToProps = { setAdminPages };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AdminContainer);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getAppState, Store } from '../../../store/rootReducer';\nimport NotFound from '../NotFound';\nimport Extension from './Extension';\n\ninterface Props {\n  adminPages: T.Extension[] | undefined;\n  params: { extensionKey: string; pluginKey: string };\n}\n\nfunction GlobalAdminPageExtension(props: Props) {\n  const { extensionKey, pluginKey } = props.params;\n  const extension = (props.adminPages || []).find(p => p.key === `${pluginKey}/${extensionKey}`);\n  return extension ? <Extension extension={extension} /> : <NotFound withContainer={false} />;\n}\n\nconst mapStateToProps = (state: Store) => ({\n  adminPages: getAppState(state).adminPages\n});\n\nexport default connect(mapStateToProps)(GlobalAdminPageExtension);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\n\nexport default function FormattingHelp() {\n  return (\n    <div className=\"page page-limited\">\n      <h2 className=\"spacer-bottom\">Formatting Syntax</h2>\n      <table className=\"width-100 data zebra\">\n        <thead>\n          <tr>\n            <th>Write:</th>\n            <th>To display:</th>\n          </tr>\n        </thead>\n        <tbody>\n          <tr>\n            <td>*this text is bold*</td>\n            <td className=\"markdown\">\n              <strong>this text is bold</strong>\n            </td>\n          </tr>\n          <tr>\n            <td>https://sonarqube.org</td>\n            <td className=\"markdown\">\n              <a href=\"https://sonarqube.org\">https://sonarqube.org</a>\n            </td>\n          </tr>\n          <tr>\n            <td className=\"text-top\">[SonarQube\u2122 Home Page](https://www.sonarqube.org)</td>\n            <td className=\"markdown text-top\">\n              <a href=\"https://www.sonarqube.org\">SonarQube\u2122 Home Page</a>\n            </td>\n          </tr>\n          <tr>\n            <td className=\"text-top\">\n              * first item\n              <br />* second item\n            </td>\n            <td className=\"markdown\">\n              <ul>\n                <li>first item</li>\n                <li>second item</li>\n              </ul>\n            </td>\n          </tr>\n          <tr>\n            <td className=\"text-top\">\n              1. first item\n              <br />\n              1. second item\n            </td>\n            <td className=\"markdown text-top\">\n              <ol>\n                <li>first item</li>\n                <li>second item</li>\n              </ol>\n            </td>\n          </tr>\n          <tr>\n            <td className=\"text-top\">\n              = Heading Level 1<br />\n              == Heading Level 2<br />\n              === Heading Level 3<br />\n              ==== Heading Level 4<br />\n              ===== Heading Level 5<br />\n              ====== Heading Level 6<br />\n            </td>\n            <td className=\"markdown text-top\">\n              <h1>Heading Level 1</h1>\n              <h2>Heading Level 2</h2>\n              <h3>Heading Level 3</h3>\n              <h4>Heading Level 4</h4>\n              <h5>Heading Level 5</h5>\n              <h6>Heading Level 6</h6>\n            </td>\n          </tr>\n          <tr>\n            <td className=\"text-top\">``Lists#newArrayList()``</td>\n            <td className=\"markdown text-top\">\n              <code>Lists#newArrayList()</code>\n            </td>\n          </tr>\n          <tr>\n            <td className=\"text-top\">\n              ``\n              <br />\n              {'// code on multiple lines'}\n              <br />\n              {'public void foo() {'}\n              <br />\n              &nbsp;&nbsp;\n              {'// do some logic here'}\n              <br />\n              {'}'}\n              <br />\n              ``\n            </td>\n            <td className=\"markdown text-top\">\n              <pre>\n                {'// code on multiple lines\\npublic void foo() {\\n  // do some logic here\\n}'}\n              </pre>\n            </td>\n          </tr>\n          <tr>\n            <td className=\"text-top\">\n              Standard text\n              <br />\n              &gt; Blockquoted text\n              <br />\n              &gt; that spans multiple lines\n              <br />\n            </td>\n            <td className=\"markdown text-top\">\n              <p>Standard text</p>\n              <blockquote>\n                Blockquoted text\n                <br />\n                that spans multiple lines\n                <br />\n              </blockquote>\n            </td>\n          </tr>\n        </tbody>\n      </table>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\nimport GlobalFooterContainer from './GlobalFooterContainer';\n\nconst PageTracker = lazyLoadComponent(() => import('./PageTracker'));\n\ninterface Props {\n  children?: React.ReactNode;\n}\n\nexport default function SimpleSessionsContainer({ children }: Props) {\n  return (\n    <>\n      <PageTracker />\n\n      <div className=\"global-container\">\n        <div className=\"page-wrapper\" id=\"container\">\n          {children}\n        </div>\n        <GlobalFooterContainer hideLoggedInInfo={true} />\n      </div>\n    </>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { withCurrentUser } from '../../components/hoc/withCurrentUser';\nimport { Router, withRouter } from '../../components/hoc/withRouter';\nimport { getHomePageUrl } from '../../helpers/urls';\nimport { isLoggedIn } from '../../helpers/users';\n\nexport interface LandingProps {\n  currentUser: T.CurrentUser;\n  router: Router;\n}\n\nexport class Landing extends React.PureComponent<LandingProps> {\n  componentDidMount() {\n    const { currentUser } = this.props;\n    if (isLoggedIn(currentUser) && currentUser.homepage) {\n      const homepage = getHomePageUrl(currentUser.homepage);\n      this.props.router.replace(homepage);\n    } else {\n      this.props.router.replace('/projects');\n    }\n  }\n\n  render() {\n    return null;\n  }\n}\n\nexport default withRouter(withCurrentUser(Landing));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getAppState, Store } from '../../../store/rootReducer';\nimport NotFound from '../NotFound';\nimport Extension from './Extension';\n\ninterface Props {\n  globalPages: T.Extension[] | undefined;\n  params: { extensionKey: string; pluginKey: string };\n}\n\nfunction GlobalPageExtension(props: Props) {\n  const { extensionKey, pluginKey } = props.params;\n  const extension = (props.globalPages || []).find(p => p.key === `${pluginKey}/${extensionKey}`);\n  return extension ? <Extension extension={extension} /> : <NotFound withContainer={false} />;\n}\n\nconst mapStateToProps = (state: Store) => ({\n  globalPages: getAppState(state).globalPages\n});\n\nexport default connect(mapStateToProps)(GlobalPageExtension);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport withIndexationGuard from '../../../components/hoc/withIndexationGuard';\nimport { PageContext } from '../indexation/PageUnavailableDueToIndexation';\nimport GlobalPageExtension from './GlobalPageExtension';\n\nexport function PortfoliosPage() {\n  return <GlobalPageExtension params={{ pluginKey: 'governance', extensionKey: 'portfolios' }} />;\n}\n\nexport default withIndexationGuard(PortfoliosPage, PageContext.Portfolios);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport ResetPasswordForm from '../../components/common/ResetPasswordForm';\nimport { whenLoggedIn } from '../../components/hoc/whenLoggedIn';\nimport { translate } from '../../helpers/l10n';\nimport { getBaseUrl } from '../../helpers/system';\nimport GlobalMessagesContainer from './GlobalMessagesContainer';\n\nexport interface ResetPasswordProps {\n  currentUser: T.LoggedInUser;\n}\n\nexport function ResetPassword({ currentUser }: ResetPasswordProps) {\n  return (\n    <div className=\"page-wrapper-simple\">\n      <div className=\"page-simple\">\n        <GlobalMessagesContainer />\n\n        <h1 className=\"text-center huge\">{translate('my_account.reset_password')}</h1>\n        <p className=\"text-center huge-spacer-top huge-spacer-bottom\">\n          {translate('my_account.reset_password.explain')}\n        </p>\n\n        <div className=\"text-center\">\n          <h2 className=\"big-spacer-bottom big\">{translate('my_profile.password.title')}</h2>\n\n          <ResetPasswordForm\n            user={currentUser}\n            onPasswordChange={() => {\n              // Force a refresh for the backend to handle additional redirects.\n              window.location.href = getBaseUrl() + '/';\n            }}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default whenLoggedIn(ResetPassword);\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nexport const DEFAULT_ADMIN_LOGIN = 'admin';\nexport const DEFAULT_ADMIN_PASSWORD = 'admin';\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport GlobalMessagesContainer from '../../app/components/GlobalMessagesContainer';\nimport { SubmitButton } from '../../components/controls/buttons';\nimport { Location } from '../../components/hoc/withRouter';\nimport { Alert } from '../../components/ui/Alert';\nimport MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker';\nimport MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation';\nimport { translate } from '../../helpers/l10n';\nimport { getReturnUrl } from '../../helpers/urls';\nimport Unauthorized from '../sessions/components/Unauthorized';\nimport { DEFAULT_ADMIN_PASSWORD } from './constants';\n\nexport interface ChangeAdminPasswordAppRendererProps {\n  passwordValue: string;\n  confirmPasswordValue: string;\n  onConfirmPasswordChange: (password: string) => void;\n  onPasswordChange: (password: string) => void;\n  onSubmit: () => void;\n  canAdmin?: boolean;\n  canSubmit?: boolean;\n  submitting: boolean;\n  success: boolean;\n  location: Location;\n}\n\nexport default function ChangeAdminPasswordAppRenderer(props: ChangeAdminPasswordAppRendererProps) {\n  const {\n    canAdmin,\n    canSubmit,\n    confirmPasswordValue,\n    passwordValue,\n    location,\n    submitting,\n    success\n  } = props;\n\n  if (!canAdmin) {\n    return <Unauthorized />;\n  }\n\n  return (\n    <div className=\"page-wrapper-simple\">\n      <div className=\"page-simple\">\n        {success ? (\n          <Alert variant=\"success\">\n            <p className=\"spacer-bottom\">{translate('users.change_admin_password.form.success')}</p>\n            {/* We must not use Link here, because we need a refresh of the /api/navigation/global call. */}\n            <a href={getReturnUrl(location)}>\n              {translate('users.change_admin_password.form.continue_to_app')}\n            </a>\n          </Alert>\n        ) : (\n          <>\n            <GlobalMessagesContainer />\n\n            <h1 className=\"text-center bg-danger big padded\">\n              {translate('users.change_admin_password.instance_is_at_risk')}\n            </h1>\n            <p className=\"text-center huge huge-spacer-top\">\n              {translate('users.change_admin_password.header')}\n            </p>\n            <p className=\"text-center huge-spacer-top huge-spacer-bottom\">\n              {translate('users.change_admin_password.description')}\n            </p>\n\n            <form\n              className=\"text-center\"\n              onSubmit={(e: React.SyntheticEvent<HTMLFormElement>) => {\n                e.preventDefault();\n                props.onSubmit();\n              }}>\n              <h2 className=\"big-spacer-bottom big\">\n                {translate('users.change_admin_password.form.header')}\n              </h2>\n\n              <MandatoryFieldsExplanation className=\"form-field\" />\n\n              <div className=\"form-field\">\n                <label htmlFor=\"user-password\">\n                  {translate('users.change_admin_password.form.password')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  id=\"user-password\"\n                  name=\"password\"\n                  onChange={(e: React.SyntheticEvent<HTMLInputElement>) => {\n                    props.onPasswordChange(e.currentTarget.value);\n                  }}\n                  required={true}\n                  type=\"password\"\n                  value={passwordValue}\n                />\n              </div>\n\n              <div className=\"form-field\">\n                <label htmlFor=\"confirm-user-password\">\n                  {translate('users.change_admin_password.form.confirm')}\n                  <MandatoryFieldMarker />\n                </label>\n                <input\n                  id=\"confirm-user-password\"\n                  name=\"confirm-password\"\n                  onChange={(e: React.SyntheticEvent<HTMLInputElement>) => {\n                    props.onConfirmPasswordChange(e.currentTarget.value);\n                  }}\n                  required={true}\n                  type=\"password\"\n                  value={confirmPasswordValue}\n                />\n\n                {confirmPasswordValue === passwordValue &&\n                  passwordValue === DEFAULT_ADMIN_PASSWORD && (\n                    <Alert className=\"spacer-top\" variant=\"warning\">\n                      {translate('users.change_admin_password.form.cannot_use_default_password')}\n                    </Alert>\n                  )}\n              </div>\n\n              <div className=\"form-field\">\n                <SubmitButton disabled={!canSubmit || submitting}>\n                  {translate('update_verb')}\n                  {submitting && <i className=\"spinner spacer-left\" />}\n                </SubmitButton>\n              </div>\n            </form>\n          </>\n        )}\n      </div>\n    </div>\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { changePassword } from '../../api/users';\nimport { Location, withRouter } from '../../components/hoc/withRouter';\nimport { getAppState, Store } from '../../store/rootReducer';\nimport ChangeAdminPasswordAppRenderer from './ChangeAdminPasswordAppRenderer';\nimport { DEFAULT_ADMIN_LOGIN, DEFAULT_ADMIN_PASSWORD } from './constants';\n\ninterface Props {\n  canAdmin?: boolean;\n  instanceUsesDefaultAdminCredentials?: boolean;\n  location: Location;\n}\n\ninterface State {\n  passwordValue: string;\n  confirmPasswordValue: string;\n  canSubmit?: boolean;\n  submitting: boolean;\n  success: boolean;\n}\n\nexport class ChangeAdminPasswordApp extends React.PureComponent<Props, State> {\n  mounted = false;\n\n  constructor(props: Props) {\n    super(props);\n\n    this.state = {\n      passwordValue: '',\n      confirmPasswordValue: '',\n      submitting: false,\n      success: !props.instanceUsesDefaultAdminCredentials\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n  }\n\n  handlePasswordChange = (passwordValue: string) => {\n    this.setState({ passwordValue }, this.checkCanSubmit);\n  };\n\n  handleConfirmPasswordChange = (confirmPasswordValue: string) => {\n    this.setState({ confirmPasswordValue }, this.checkCanSubmit);\n  };\n\n  handleSubmit = async () => {\n    const { canSubmit, passwordValue } = this.state;\n    if (canSubmit) {\n      this.setState({ submitting: true });\n      const success = await changePassword({\n        login: DEFAULT_ADMIN_LOGIN,\n        password: passwordValue\n      }).then(\n        () => true,\n        () => false\n      );\n      if (this.mounted) {\n        this.setState({ submitting: false, success });\n      }\n    }\n  };\n\n  checkCanSubmit = () => {\n    this.setState(({ passwordValue, confirmPasswordValue }) => ({\n      canSubmit: passwordValue === confirmPasswordValue && passwordValue !== DEFAULT_ADMIN_PASSWORD\n    }));\n  };\n\n  render() {\n    const { canAdmin, location } = this.props;\n    const { canSubmit, confirmPasswordValue, passwordValue, submitting, success } = this.state;\n    return (\n      <ChangeAdminPasswordAppRenderer\n        canAdmin={canAdmin}\n        passwordValue={passwordValue}\n        confirmPasswordValue={confirmPasswordValue}\n        canSubmit={canSubmit}\n        onPasswordChange={this.handlePasswordChange}\n        onConfirmPasswordChange={this.handleConfirmPasswordChange}\n        onSubmit={this.handleSubmit}\n        submitting={submitting}\n        success={success}\n        location={location}\n      />\n    );\n  }\n}\n\nexport const mapStateToProps = (state: Store) => {\n  const { canAdmin, instanceUsesDefaultAdminCredentials } = getAppState(state);\n  return { canAdmin, instanceUsesDefaultAdminCredentials };\n};\n\nexport default connect(mapStateToProps)(withRouter(ChangeAdminPasswordApp));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport * as React from 'react';\nimport { setSimpleSettingValue } from '../../api/settings';\nimport { Button } from '../../components/controls/buttons';\nimport { whenLoggedIn } from '../../components/hoc/whenLoggedIn';\nimport { Router, withRouter } from '../../components/hoc/withRouter';\nimport { translate } from '../../helpers/l10n';\nimport { hasGlobalPermission } from '../../helpers/users';\nimport { Permissions } from '../../types/permissions';\nimport { RiskConsent } from '../../types/plugins';\nimport { SettingsKey } from '../../types/settings';\nimport GlobalMessagesContainer from './GlobalMessagesContainer';\nimport './PluginRiskConsent.css';\n\nexport interface PluginRiskConsentProps {\n  currentUser: T.LoggedInUser;\n  router: Router;\n}\n\nexport function PluginRiskConsent(props: PluginRiskConsentProps) {\n  const { router, currentUser } = props;\n\n  if (!hasGlobalPermission(currentUser, Permissions.Admin)) {\n    router.replace('/');\n    return null;\n  }\n\n  const acknowledgeRisk = async () => {\n    try {\n      await setSimpleSettingValue({\n        key: SettingsKey.PluginRiskConsent,\n        value: RiskConsent.Accepted\n      });\n\n      window.location.href = `/`; // force a refresh for the backend\n    } catch (_) {\n      /* Do nothing */\n    }\n  };\n\n  return (\n    <div className=\"plugin-risk-consent-page\">\n      <GlobalMessagesContainer />\n\n      <div className=\"plugin-risk-consent-content boxed-group\">\n        <div className=\"boxed-group-inner text-center\">\n          <h1 className=\"big-spacer-bottom\">{translate('plugin_risk_consent.title')}</h1>\n          <p className=\"big big-spacer-bottom\">{translate('plugin_risk_consent.description')}</p>\n          <p className=\"big huge-spacer-bottom\">{translate('plugin_risk_consent.description2')}</p>\n\n          <Button className=\"big-spacer-bottom\" onClick={acknowledgeRisk}>\n            {translate('plugin_risk_consent.action')}\n          </Button>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport default whenLoggedIn(withRouter(PluginRiskConsent));\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n/* eslint-disable react/jsx-sort-props */\nimport { Location } from 'history';\nimport { pick } from 'lodash';\nimport * as React from 'react';\nimport ReactDom, { render } from 'react-dom';\nimport { HelmetProvider } from 'react-helmet-async';\nimport { IntlProvider } from 'react-intl';\nimport { Provider } from 'react-redux';\nimport { IndexRoute, Redirect, Route, RouteConfig, RouteProps, Router } from 'react-router';\nimport accountRoutes from '../../apps/account/routes';\nimport applicationConsoleRoutes from '../../apps/application-console/routes';\nimport applicationSettingsRoutes from '../../apps/application-settings/routes';\nimport auditLogsRoutes from '../../apps/audit-logs/routes';\nimport backgroundTasksRoutes from '../../apps/background-tasks/routes';\nimport codeRoutes from '../../apps/code/routes';\nimport codingRulesRoutes from '../../apps/coding-rules/routes';\nimport componentMeasuresRoutes from '../../apps/component-measures/routes';\nimport documentationRoutes from '../../apps/documentation/routes';\nimport groupsRoutes from '../../apps/groups/routes';\nimport Issues from '../../apps/issues/components/AppContainer';\nimport { maintenanceRoutes, setupRoutes } from '../../apps/maintenance/routes';\nimport marketplaceRoutes from '../../apps/marketplace/routes';\nimport overviewRoutes from '../../apps/overview/routes';\nimport permissionTemplatesRoutes from '../../apps/permission-templates/routes';\nimport { globalPermissionsRoutes, projectPermissionsRoutes } from '../../apps/permissions/routes';\nimport portfolioRoutes from '../../apps/portfolio/routes';\nimport projectActivityRoutes from '../../apps/projectActivity/routes';\nimport projectBaselineRoutes from '../../apps/projectBaseline/routes';\nimport projectBranchesRoutes from '../../apps/projectBranches/routes';\nimport projectDumpRoutes from '../../apps/projectDump/routes';\nimport projectQualityGateRoutes from '../../apps/projectQualityGate/routes';\nimport projectQualityProfilesRoutes from '../../apps/projectQualityProfiles/routes';\nimport projectsRoutes from '../../apps/projects/routes';\nimport projectsManagementRoutes from '../../apps/projectsManagement/routes';\nimport qualityGatesRoutes from '../../apps/quality-gates/routes';\nimport qualityProfilesRoutes from '../../apps/quality-profiles/routes';\nimport sessionsRoutes from '../../apps/sessions/routes';\nimport settingsRoutes from '../../apps/settings/routes';\nimport systemRoutes from '../../apps/system/routes';\nimport tutorialsRoutes from '../../apps/tutorials/routes';\nimport usersRoutes from '../../apps/users/routes';\nimport webAPIRoutes from '../../apps/web-api/routes';\nimport webhooksRoutes from '../../apps/webhooks/routes';\nimport withIndexationGuard from '../../components/hoc/withIndexationGuard';\nimport { lazyLoadComponent } from '../../components/lazyLoadComponent';\nimport getHistory from '../../helpers/getHistory';\nimport App from '../components/App';\nimport GlobalContainer from '../components/GlobalContainer';\nimport { PageContext } from '../components/indexation/PageUnavailableDueToIndexation';\nimport MigrationContainer from '../components/MigrationContainer';\nimport getStore from './getStore';\n\n/*\n * Expose dependencies to extensions\n */\nfunction attachToGlobal() {\n  window.React = React;\n  window.ReactDOM = ReactDom;\n}\n\nfunction handleUpdate(this: { state: { location: Location } }) {\n  const { action } = this.state.location;\n\n  if (action === 'PUSH') {\n    window.scrollTo(0, 0);\n  }\n}\n\n// this is not an official api\nconst RouteWithChildRoutes = Route as React.ComponentClass<\n  RouteProps & { childRoutes: RouteConfig }\n>;\n\nfunction renderRedirects() {\n  return (\n    <>\n      <Route\n        path=\"/account/issues\"\n        onEnter={(_, replace) => {\n          replace({ pathname: '/issues', query: { myIssues: 'true', resolved: 'false' } });\n        }}\n      />\n\n      <Route\n        path=\"/codingrules\"\n        onEnter={(_, replace) => {\n          replace(`/coding_rules${window.location.hash}`);\n        }}\n      />\n\n      <Route\n        path=\"/dashboard/index/:key\"\n        onEnter={(nextState, replace) => {\n          replace({ pathname: '/dashboard', query: { id: nextState.params.key } });\n        }}\n      />\n\n      <Route\n        path=\"/issues/search\"\n        onEnter={(_, replace) => {\n          replace(`/issues${window.location.hash}`);\n        }}\n      />\n\n      <Redirect from=\"/admin\" to=\"/admin/settings\" />\n      <Redirect from=\"/background_tasks\" to=\"/admin/background_tasks\" />\n      <Redirect from=\"/component/index\" to=\"/component\" />\n      <Redirect from=\"/component_issues\" to=\"/project/issues\" />\n      <Redirect from=\"/dashboard/index\" to=\"/dashboard\" />\n      <Redirect\n        from=\"/documentation/analysis/languages/vb\"\n        to=\"/documentation/analysis/languages/vbnet/\"\n      />\n      <Redirect from=\"/governance\" to=\"/portfolio\" />\n      <Redirect from=\"/groups\" to=\"/admin/groups\" />\n      <Redirect from=\"/extension/governance/portfolios\" to=\"/portfolios\" />\n      <Redirect from=\"/permission_templates\" to=\"/admin/permission_templates\" />\n      <Redirect from=\"/profiles/index\" to=\"/profiles\" />\n      <Redirect from=\"/projects_admin\" to=\"/admin/projects_management\" />\n      <Redirect from=\"/quality_gates/index\" to=\"/quality_gates\" />\n      <Redirect from=\"/roles/global\" to=\"/admin/permissions\" />\n      <Redirect from=\"/admin/roles/global\" to=\"/admin/permissions\" />\n      <Redirect from=\"/settings\" to=\"/admin/settings\" />\n      <Redirect from=\"/settings/encryption\" to=\"/admin/settings/encryption\" />\n      <Redirect from=\"/settings/index\" to=\"/admin/settings\" />\n      <Redirect from=\"/sessions/login\" to=\"/sessions/new\" />\n      <Redirect from=\"/system\" to=\"/admin/system\" />\n      <Redirect from=\"/system/index\" to=\"/admin/system\" />\n      <Redirect from=\"/view\" to=\"/portfolio\" />\n      <Redirect from=\"/users\" to=\"/admin/users\" />\n      <Redirect from=\"/onboarding\" to=\"/projects/create\" />\n      <Redirect from=\"markdown/help\" to=\"formatting/help\" />\n    </>\n  );\n}\n\nfunction renderComponentRoutes() {\n  return (\n    <Route component={lazyLoadComponent(() => import('../components/ComponentContainer'))}>\n      <RouteWithChildRoutes path=\"code\" childRoutes={codeRoutes} />\n      <RouteWithChildRoutes path=\"component_measures\" childRoutes={componentMeasuresRoutes} />\n      <RouteWithChildRoutes path=\"dashboard\" childRoutes={overviewRoutes} />\n      <RouteWithChildRoutes path=\"portfolio\" childRoutes={portfolioRoutes} />\n      <RouteWithChildRoutes path=\"project/activity\" childRoutes={projectActivityRoutes} />\n      <Route\n        path=\"project/extension/:pluginKey/:extensionKey\"\n        component={lazyLoadComponent(() => import('../components/extensions/ProjectPageExtension'))}\n      />\n      <Route\n        path=\"project/issues\"\n        component={Issues}\n        onEnter={({ location: { query } }, replace) => {\n          if (query.types) {\n            if (query.types === 'SECURITY_HOTSPOT') {\n              replace({\n                pathname: '/security_hotspots',\n                query: { ...pick(query, ['id', 'branch', 'pullRequest']), assignedToMe: false }\n              });\n            } else {\n              query.types = query.types\n                .split(',')\n                .filter((type: string) => type !== 'SECURITY_HOTSPOT')\n                .join(',');\n            }\n          }\n        }}\n      />\n      <Route\n        path=\"security_hotspots\"\n        component={lazyLoadComponent(() =>\n          import('../../apps/security-hotspots/SecurityHotspotsApp')\n        )}\n      />\n      <RouteWithChildRoutes path=\"project/quality_gate\" childRoutes={projectQualityGateRoutes} />\n      <RouteWithChildRoutes\n        path=\"project/quality_profiles\"\n        childRoutes={projectQualityProfilesRoutes}\n      />\n      <RouteWithChildRoutes path=\"tutorials\" childRoutes={tutorialsRoutes} />\n      <Route component={lazyLoadComponent(() => import('../components/ProjectAdminContainer'))}>\n        <Route\n          path=\"project/admin/extension/:pluginKey/:extensionKey\"\n          component={lazyLoadComponent(() =>\n            import('../components/extensions/ProjectAdminPageExtension')\n          )}\n        />\n        <RouteWithChildRoutes path=\"project/background_tasks\" childRoutes={backgroundTasksRoutes} />\n        <RouteWithChildRoutes path=\"project/baseline\" childRoutes={projectBaselineRoutes} />\n        <RouteWithChildRoutes path=\"project/branches\" childRoutes={projectBranchesRoutes} />\n        <RouteWithChildRoutes path=\"project/import_export\" childRoutes={projectDumpRoutes} />\n        <RouteWithChildRoutes path=\"project/settings\" childRoutes={settingsRoutes} />\n        <RouteWithChildRoutes path=\"project_roles\" childRoutes={projectPermissionsRoutes} />\n        <RouteWithChildRoutes path=\"application/console\" childRoutes={applicationConsoleRoutes} />\n        <RouteWithChildRoutes path=\"application/settings\" childRoutes={applicationSettingsRoutes} />\n        <RouteWithChildRoutes path=\"project/webhooks\" childRoutes={webhooksRoutes} />\n        <Route\n          path=\"project/deletion\"\n          component={lazyLoadComponent(() => import('../../apps/projectDeletion/App'))}\n        />\n        <Route\n          path=\"project/links\"\n          component={lazyLoadComponent(() => import('../../apps/projectLinks/App'))}\n        />\n        <Route\n          path=\"project/key\"\n          component={lazyLoadComponent(() => import('../../apps/projectKey/Key'))}\n        />\n      </Route>\n    </Route>\n  );\n}\n\nfunction renderAdminRoutes() {\n  return (\n    <Route component={lazyLoadComponent(() => import('../components/AdminContainer'))} path=\"admin\">\n      <Route\n        path=\"extension/:pluginKey/:extensionKey\"\n        component={lazyLoadComponent(() =>\n          import('../components/extensions/GlobalAdminPageExtension')\n        )}\n      />\n      <RouteWithChildRoutes path=\"audit\" childRoutes={auditLogsRoutes} />\n      <RouteWithChildRoutes path=\"background_tasks\" childRoutes={backgroundTasksRoutes} />\n      <RouteWithChildRoutes path=\"groups\" childRoutes={groupsRoutes} />\n      <RouteWithChildRoutes path=\"permission_templates\" childRoutes={permissionTemplatesRoutes} />\n      <RouteWithChildRoutes path=\"permissions\" childRoutes={globalPermissionsRoutes} />\n      <RouteWithChildRoutes path=\"projects_management\" childRoutes={projectsManagementRoutes} />\n      <RouteWithChildRoutes path=\"settings\" childRoutes={settingsRoutes} />\n      <RouteWithChildRoutes path=\"system\" childRoutes={systemRoutes} />\n      <RouteWithChildRoutes path=\"marketplace\" childRoutes={marketplaceRoutes} />\n      <RouteWithChildRoutes path=\"users\" childRoutes={usersRoutes} />\n      <RouteWithChildRoutes path=\"webhooks\" childRoutes={webhooksRoutes} />\n    </Route>\n  );\n}\n\nexport default function startReactApp(\n  lang: string,\n  currentUser?: T.CurrentUser,\n  appState?: T.AppState\n) {\n  attachToGlobal();\n\n  const el = document.getElementById('content');\n\n  const history = getHistory();\n  const store = getStore(currentUser, appState);\n\n  render(\n    <HelmetProvider>\n      <Provider store={store}>\n        <IntlProvider defaultLocale={lang} locale={lang}>\n          <Router history={history} onUpdate={handleUpdate}>\n            {renderRedirects()}\n\n            <Route\n              path=\"formatting/help\"\n              component={lazyLoadComponent(() => import('../components/FormattingHelp'))}\n            />\n\n            <Route component={lazyLoadComponent(() => import('../components/SimpleContainer'))}>\n              <Route path=\"maintenance\">{maintenanceRoutes}</Route>\n              <Route path=\"setup\">{setupRoutes}</Route>\n            </Route>\n\n            <Route component={MigrationContainer}>\n              <Route\n                component={lazyLoadComponent(() =>\n                  import('../components/SimpleSessionsContainer')\n                )}>\n                <RouteWithChildRoutes path=\"/sessions\" childRoutes={sessionsRoutes} />\n              </Route>\n\n              <Route path=\"/\" component={App}>\n                <IndexRoute component={lazyLoadComponent(() => import('../components/Landing'))} />\n\n                <Route component={GlobalContainer}>\n                  <RouteWithChildRoutes path=\"account\" childRoutes={accountRoutes} />\n                  <RouteWithChildRoutes path=\"coding_rules\" childRoutes={codingRulesRoutes} />\n                  <RouteWithChildRoutes path=\"documentation\" childRoutes={documentationRoutes} />\n                  <Route\n                    path=\"extension/:pluginKey/:extensionKey\"\n                    component={lazyLoadComponent(() =>\n                      import('../components/extensions/GlobalPageExtension')\n                    )}\n                  />\n                  <Route\n                    path=\"issues\"\n                    component={withIndexationGuard(Issues, PageContext.Issues)}\n                  />\n                  <RouteWithChildRoutes path=\"projects\" childRoutes={projectsRoutes} />\n                  <RouteWithChildRoutes path=\"quality_gates\" childRoutes={qualityGatesRoutes} />\n                  <Route\n                    path=\"portfolios\"\n                    component={lazyLoadComponent(() =>\n                      import('../components/extensions/PortfoliosPage')\n                    )}\n                  />\n                  <RouteWithChildRoutes path=\"profiles\" childRoutes={qualityProfilesRoutes} />\n                  <RouteWithChildRoutes path=\"web_api\" childRoutes={webAPIRoutes} />\n\n                  {renderComponentRoutes()}\n\n                  {renderAdminRoutes()}\n                </Route>\n                <Route\n                  // We don't want this route to have any menu.\n                  // That is why we can not have it under the accountRoutes\n                  path=\"account/reset_password\"\n                  component={lazyLoadComponent(() => import('../components/ResetPassword'))}\n                />\n                <Route\n                  // We don't want this route to have any menu. This is why we define it here\n                  // rather than under the admin routes.\n                  path=\"admin/change_admin_password\"\n                  component={lazyLoadComponent(() =>\n                    import('../../apps/change-admin-password/ChangeAdminPasswordApp')\n                  )}\n                />\n                <Route\n                  // We don't want this route to have any menu. This is why we define it here\n                  // rather than under the admin routes.\n                  path=\"admin/plugin_risk_consent\"\n                  component={lazyLoadComponent(() => import('../components/PluginRiskConsent'))}\n                />\n                <Route\n                  path=\"not_found\"\n                  component={lazyLoadComponent(() => import('../components/NotFound'))}\n                />\n                <Route\n                  path=\"*\"\n                  component={lazyLoadComponent(() => import('../components/NotFound'))}\n                />\n              </Route>\n            </Route>\n          </Router>\n        </IntlProvider>\n      </Provider>\n    </HelmetProvider>,\n    el\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\nimport { installExtensionsHandler, installWebAnalyticsHandler } from '../helpers/extensionsHandler';\nimport { loadL10nBundle } from '../helpers/l10n';\nimport { parseJSON, request } from '../helpers/request';\nimport { getBaseUrl, getSystemStatus } from '../helpers/system';\nimport './styles/sonar.ts';\n\ninstallWebAnalyticsHandler();\n\nif (isMainApp()) {\n  installExtensionsHandler();\n\n  Promise.all([loadL10nBundle(), loadUser(), loadAppState(), loadApp()]).then(\n    ([l10nBundle, user, appState, startReactApp]) => {\n      startReactApp(l10nBundle.locale, user, appState);\n    },\n    error => {\n      if (isResponse(error) && error.status === 401) {\n        redirectToLogin();\n      } else {\n        logError(error);\n      }\n    }\n  );\n} else {\n  // login, maintenance or setup pages\n\n  const appStatePromise: Promise<T.AppState | undefined> = new Promise(resolve => {\n    loadAppState()\n      .then(data => {\n        resolve(data);\n      })\n      .catch(() => {\n        resolve(undefined);\n      });\n  });\n\n  Promise.all([loadL10nBundle(), appStatePromise, loadApp()]).then(\n    ([l10nBundle, appState, startReactApp]) => {\n      startReactApp(l10nBundle.locale, undefined, appState);\n    },\n    error => {\n      logError(error);\n    }\n  );\n}\n\nfunction loadUser() {\n  return request('/api/users/current')\n    .submit()\n    .then(checkStatus)\n    .then(parseJSON);\n}\n\nfunction loadAppState() {\n  return request('/api/navigation/global')\n    .submit()\n    .then(checkStatus)\n    .then(parseJSON);\n}\n\nfunction loadApp() {\n  return import(/* webpackChunkName: 'app' */ './utils/startReactApp').then(i => i.default);\n}\n\nfunction checkStatus(response: Response) {\n  return new Promise((resolve, reject) => {\n    if (response.status >= 200 && response.status < 300) {\n      resolve(response);\n    } else {\n      reject(response);\n    }\n  });\n}\n\nfunction isResponse(error: any): error is Response {\n  return typeof error.status === 'number';\n}\n\nfunction redirectToLogin() {\n  const returnTo = window.location.pathname + window.location.search + window.location.hash;\n  window.location.href = `${getBaseUrl()}/sessions/new?return_to=${encodeURIComponent(returnTo)}`;\n}\n\nfunction logError(error: any) {\n  // eslint-disable-next-line no-console\n  console.error('Application failed to start!', error);\n}\n\nfunction isMainApp() {\n  const { pathname } = window.location;\n  return (\n    getSystemStatus() === 'UP' &&\n    !pathname.startsWith(`${getBaseUrl()}/sessions`) &&\n    !pathname.startsWith(`${getBaseUrl()}/maintenance`) &&\n    !pathname.startsWith(`${getBaseUrl()}/setup`) &&\n    !pathname.startsWith(`${getBaseUrl()}/formatting/help`)\n  );\n}\n", "/*\n * SonarQube\n * Copyright (C) 2009-2021 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n */\n/*\n * The esbuild postcss plugin fails to handle CSS `@import`\n */\nimport './components/badges.css';\nimport './components/boxed-group.css';\nimport './components/columns.css';\nimport './components/component-name.css';\nimport './components/dropdowns.css';\nimport './components/global-loading.css';\nimport './components/issues.css';\nimport './components/list-groups.css';\nimport './components/menu.css';\nimport './components/page.css';\nimport './components/panels.css';\nimport './components/spinner.css';\nimport './components/ui.css';\nimport './init/base.css';\nimport './init/forms.css';\nimport './init/icons.css';\nimport './init/links.css';\nimport './init/lists.css';\nimport './init/misc.css';\nimport './init/tables.css';\nimport './init/type.css';\nimport './mixins.css';\nimport './print.css';\nimport './sonar-colorizer.css';\nimport './style.css';\n"],
5  "mappings": "81CAmBO,YAA6B,CAClC,MAAO,GApBT,gBCuBO,aAA6B,CAClC,MAAQ,QAxBV,GAqBa,IArBb,cAqBO,AAAM,GAAS,MAAO,SAAW,cCOxC,aAA2B,EAAa,EAA6B,CACnE,IAAW,GAAO,EAGpB,aAA0C,EAAyC,CACjF,IAAkB,IAAyB,GAGtC,cAAoC,CACzC,KAAoB,kBAAoB,IAGn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,KAAK,qBAAsB,IAC5B,KAGT,MAAO,IC9HF,GAAM,IAAO,EAAO,CACzB,IACA,OACA,UACA,UACA,OACA,UACA,QACA,QACA,IACA,MACA,MACA,MACA,QACA,aACA,OACA,KACA,SACA,SACA,UACA,SACA,OACA,OACA,MACA,WACA,UACA,OACA,WACA,KACA,YACA,MACA,UACA,MACA,SACA,MACA,MACA,KACA,KACA,UACA,KACA,WACA,aACA,SACA,OACA,SACA,OACA,KACA,KACA,KACA,KACA,KACA,KACA,OACA,SACA,SACA,KACA,OACA,IACA,MACA,QACA,MACA,MACA,QACA,SACA,KACA,OACA,MACA,OACA,UACA,OACA,WACA,QACA,MACA,OACA,KACA,WACA,SACA,SACA,IACA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OACA,UACA,SACA,SACA,QACA,SACA,SACA,OACA,SACA,SACA,QACA,MACA,UACA,MACA,QACA,QACA,KACA,WACA,WACA,QACA,KACA,QACA,OACA,KACA,QACA,KACA,IACA,KACA,MACA,QACA,QAIW,EAAM,EAAO,CACxB,MACA,IACA,WACA,cACA,eACA,eACA,gBACA,mBACA,SACA,WACA,OACA,OACA,UACA,SACA,OACA,IACA,QACA,WACA,QACA,QACA,OACA,iBACA,SACA,OACA,WACA,QACA,OACA,UACA,UACA,WACA,iBACA,OACA,OACA,QACA,SACA,SACA,OACA,WACA,QACA,OACA,QACA,OACA,UAGW,EAAa,EAAO,CAC/B,UACA,gBACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,iBAOW,GAAgB,EAAO,CAClC,UACA,gBACA,SACA,UACA,eACA,UACA,YACA,mBACA,iBACA,gBACA,gBACA,gBACA,QACA,YACA,OACA,eACA,YACA,UACA,gBACA,SACA,MACA,aACA,UACA,QAGW,GAAS,EAAO,CAC3B,OACA,WACA,SACA,UACA,QACA,SACA,KACA,aACA,gBACA,KACA,KACA,QACA,UACA,WACA,QACA,OACA,KACA,SACA,QACA,SACA,OACA,OACA,UACA,SACA,MACA,QACA,MACA,SACA,eAKW,GAAmB,EAAO,CACrC,UACA,cACA,aACA,WACA,YACA,UACA,UACA,SACA,SACA,QACA,YACA,aACA,iBACA,cACA,SAGW,GAAO,EAAO,CAAC,UCpRf,GAAO,EAAO,CACzB,SACA,SACA,QACA,MACA,iBACA,eACA,uBACA,WACA,aACA,UACA,SACA,UACA,cACA,cACA,UACA,OACA,QACA,QACA,QACA,OACA,UACA,WACA,eACA,SACA,cACA,WACA,WACA,UACA,MACA,WACA,0BACA,wBACA,WACA,YACA,UACA,eACA,OACA,MACA,UACA,SACA,SACA,OACA,OACA,WACA,KACA,YACA,YACA,QACA,OACA,QACA,OACA,OACA,UACA,OACA,MACA,MACA,YACA,QACA,SACA,MACA,YACA,WACA,QACA,OACA,UACA,aACA,SACA,OACA,UACA,UACA,cACA,cACA,SACA,UACA,UACA,aACA,WACA,MACA,WACA,MACA,WACA,OACA,OACA,UACA,aACA,QACA,WACA,QACA,OACA,QACA,OACA,UACA,QACA,MACA,SACA,OACA,QACA,UACA,WACA,QACA,YACA,OACA,SACA,SACA,QACA,QACA,UAGW,GAAM,EAAO,CACxB,gBACA,aACA,WACA,qBACA,SACA,gBACA,gBACA,UACA,gBACA,iBACA,QACA,OACA,KACA,QACA,OACA,gBACA,YACA,YACA,QACA,sBACA,8BACA,gBACA,kBACA,KACA,KACA,IACA,KACA,KACA,kBACA,YACA,UACA,UACA,MACA,WACA,YACA,MACA,OACA,eACA,YACA,SACA,cACA,cACA,gBACA,cACA,YACA,mBACA,eACA,aACA,eACA,cACA,KACA,KACA,KACA,KACA,aACA,WACA,gBACA,oBACA,SACA,OACA,KACA,kBACA,KACA,MACA,IACA,KACA,KACA,KACA,KACA,UACA,YACA,aACA,WACA,OACA,eACA,iBACA,eACA,mBACA,iBACA,QACA,aACA,aACA,eACA,eACA,cACA,cACA,mBACA,YACA,MACA,OACA,QACA,SACA,OACA,MACA,OACA,aACA,SACA,WACA,UACA,QACA,SACA,cACA,SACA,WACA,cACA,OACA,aACA,sBACA,mBACA,eACA,SACA,gBACA,sBACA,iBACA,IACA,KACA,KACA,SACA,OACA,OACA,cACA,YACA,UACA,SACA,SACA,QACA,OACA,kBACA,mBACA,mBACA,eACA,cACA,eACA,cACA,aACA,eACA,mBACA,oBACA,iBACA,kBACA,oBACA,iBACA,SACA,eACA,QACA,eACA,iBACA,WACA,UACA,UACA,YACA,cACA,kBACA,iBACA,aACA,OACA,KACA,KACA,UACA,SACA,UACA,aACA,UACA,aACA,gBACA,gBACA,QACA,eACA,OACA,eACA,mBACA,mBACA,IACA,KACA,KACA,QACA,IACA,KACA,KACA,IACA,eAGW,GAAS,EAAO,CAC3B,SACA,cACA,QACA,WACA,QACA,eACA,cACA,aACA,aACA,QACA,MACA,UACA,eACA,WACA,QACA,QACA,SACA,OACA,KACA,UACA,SACA,gBACA,SACA,SACA,iBACA,YACA,WACA,cACA,UACA,UACA,gBACA,WACA,WACA,OACA,WACA,WACA,aACA,UACA,SACA,SACA,cACA,gBACA,uBACA,YACA,YACA,aACA,WACA,iBACA,iBACA,YACA,UACA,QACA,UAGW,GAAM,EAAO,CACxB,aACA,SACA,cACA,YACA,gBClWW,GAAgB,EAAK,6BACrB,GAAW,EAAK,yBAChB,GAAY,EAAK,8BACjB,GAAY,EAAK,kBACjB,GAAiB,EAC5B,yFAEW,GAAoB,EAAK,yBACzB,GAAkB,EAC7B,+ZCQF,GAAM,IAAY,UAAA,CAAA,MAAO,OAAO,SAAW,YAAc,KAAO,QAU1D,GAA4B,SAAU,GAAc,GAAU,CAClE,GACE,OAAO,KAAP,YAAA,YAAA,GAAO,OAAiB,UACxB,MAAO,IAAa,cAAiB,WAErC,MAAO,MAMT,GAAI,IAAS,KACP,GAAY,wBAClB,AACE,GAAS,eACT,GAAS,cAAc,aAAa,KAEpC,IAAS,GAAS,cAAc,aAAa,KAG/C,GAAM,IAAa,YAAe,IAAS,IAAM,GAAS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QAIxB,EAAK,SAAS,iBAAiB,EAAK,QAAS,WAC7C,AAkBA,EAAK,uBAAyB,SAAU,EAAW,CACjD,GAAI,GAAQ,EAAU,OAAO,SAAU,EAAM,EAAU,CACrD,SAAK,GAAY,EACV,GACN,IAEH,MAAO,UAAU,EAAO,CACtB,GAAI,GAAS,EAAM,EAAM,cAAgB,EAAM,WAAY,MAAO,KAiBtE,EAAK,eAAiB,EAAK,uBAAuB,CAChD,IACA,OACA,QACA,SACA,QACA,MACA,SACA,OACA,KACA,QACA,KACA,MACA,MACA,MACA,KACA,KACA,KACA,UACA,OACA,MACA,KACA,MACA,SACA,QACA,OACA,MACA,KACA,OACA,SACA,OACA,OACA,QACA,MACA,OACA,MACA,MACA,MACA,MACA,OACA,KACA,MACA,OACA,MACA,MACA,MACA,UACA,IACA,KACA,KACA,OACA,KACA,KACA,MACA,OACA,QACA,MACA,OACA,SACA,MACA,KACA,QACA,OACA,OACA,KACA,UACA,KACA,MACA,MACA,KACA,MACA,QACA,KACA,OACA,KACA,QACA,MACA,MACA,SACA,OACA,MACA,OACA,MACA,SACA,QACA,KACA,OACA,OACA,OACA,MACA,QACA,OACA,OACA,QACA,QACA,OACA,OACA,MACA,KACA,MACA,OACA,KACA,QACA,MACA,KACA,OACA,OACA,OACA,QACA,QACA,QACA,MACA,OACA,MACA,OACA,OACA,QACA,MACA,MACA,SAGF,EAAK,SAAS,iBAAiB,EAAK,eAAgB,kBACpD,AAoBA,EAAK,QAAU,SAAU,EAAO,CAC9B,MAAO,GAAM,OAAO,SAAU,EAAG,CAC/B,MAAO,GAAE,QAAQ,OAAQ,IAAI,QAAQ,OAAQ,OAIjD,EAAK,SAAS,iBAAiB,EAAK,QAAS,WAC7C,AA0BA,EAAK,SAAW,UAAY,CAC1B,KAAK,MAAQ,GACb,KAAK,MAAQ,GACb,KAAK,GAAK,EAAK,SAAS,QACxB,EAAK,SAAS,SAAW,GAW3B,EAAK,SAAS,QAAU,EASxB,EAAK,SAAS,UAAY,SA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AAG,EAAE,MAAM,GAAK,EAAE,IAAK,8CAA8C,EAAE,EAAG,EAAE,WAAW,aAAa,EAAE,IAAK,OAAO,SAAS,SAAS,YAAY,GAExV,IAAO,QAAU,CAAE,WCzBnB,wCA8GM,KA4HC,IA1OP,eAmBA,KACA,KACA,KACA,KACA,KAMA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KAOA,IACA,KACA,KAWA,KAOA,KAKA,KACA,KACA,KACA,KAEA,AAAM,IAAkB,IAAM,CAC5B,GAAM,GAAS,OAEf,EAAO,aAAe,CACpB,WACA,OACA,WACA,YACA,WACA,cACA,QACA,YACA,iBACA,mBACA,4BAEF,EAAO,EAAI,EACX,EAAO,GAAK,EAKZ,OAAO,eAAe,EAAQ,eAAgB,CAC5C,IAAK,IAEH,SAAQ,KAAK,0DACN,CACL,sBACA,YACA,gBACA,iBACA,gBACA,gBACA,qBACA,4BACA,2BACA,qCACA,yBACA,mCACA,mBAQN,OAAO,eAAe,EAAQ,gBAAiB,CAC7C,IAAK,IAEH,SAAQ,KAAK,2DACN,KAAK,QAOhB,OAAO,eAAe,EAAQ,kBAAmB,CAC/C,IAAK,IAEH,SAAQ,KAAK,6DACN,CACL,kBACA,mBACA,uBACA,SACA,kBACA,oBACA,iBACA,WAAY,GACZ,aACA,UACA,YACA,aACA,aACA,iBACA,kBACA,iBACA,eACA,qBACA,mBACA,cACA,YACA,gBACA,sBACA,cACA,YACA,oBACA,YACA,eACA,kBACA,SACA,cACA,YACA,qBAAsB,GACtB,wBACA,8BACA,SACA,YACA,kBACA,mBACA,iBACA,SACA,eACA,UACA,gBACA,mBACA,aACA,gBACA,uBACA,UACA,cACA,oBACA,eACA,gBACA,eACA,WACA,0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